diff --git a/packages/debugger-frontend/BUILD_INFO b/packages/debugger-frontend/BUILD_INFO index ef0a40ec047abb..968f8de9d5cab5 100644 --- a/packages/debugger-frontend/BUILD_INFO +++ b/packages/debugger-frontend/BUILD_INFO @@ -1,5 +1,5 @@ -@generated SignedSource<> -Git revision: 8b84a77b2c82c670886ef064dfc92d6bce83e579 +@generated SignedSource<> +Git revision: 8cce39003f66f66a8fb4c0e581a2b5046cf9c1d1 Built with --nohooks: false Is local checkout: false Remote URL: https://github.com/facebook/react-native-devtools-frontend diff --git a/packages/debugger-frontend/dist/third-party/front_end/Images/react_native/learn-debugging-basics.jpg b/packages/debugger-frontend/dist/third-party/front_end/Images/react_native/learn-debugging-basics.jpg index c0bc0a25784e58..02fe75b825a001 100644 Binary files a/packages/debugger-frontend/dist/third-party/front_end/Images/react_native/learn-debugging-basics.jpg and b/packages/debugger-frontend/dist/third-party/front_end/Images/react_native/learn-debugging-basics.jpg differ diff --git a/packages/debugger-frontend/dist/third-party/front_end/Images/react_native/learn-native-debugging.jpg b/packages/debugger-frontend/dist/third-party/front_end/Images/react_native/learn-native-debugging.jpg index ea73f9d8a9c94f..85666894a73e91 100644 Binary files a/packages/debugger-frontend/dist/third-party/front_end/Images/react_native/learn-native-debugging.jpg and b/packages/debugger-frontend/dist/third-party/front_end/Images/react_native/learn-native-debugging.jpg differ diff --git a/packages/debugger-frontend/dist/third-party/front_end/Images/react_native/welcomeIcon.png b/packages/debugger-frontend/dist/third-party/front_end/Images/react_native/welcomeIcon.png index 6a010604d8392f..1e36e07feacad5 100644 Binary files a/packages/debugger-frontend/dist/third-party/front_end/Images/react_native/welcomeIcon.png and b/packages/debugger-frontend/dist/third-party/front_end/Images/react_native/welcomeIcon.png differ diff --git a/packages/debugger-frontend/dist/third-party/front_end/core/host/host.js b/packages/debugger-frontend/dist/third-party/front_end/core/host/host.js index 3e6a202afb4fed..2bd6d58f614e46 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/core/host/host.js +++ b/packages/debugger-frontend/dist/third-party/front_end/core/host/host.js @@ -1 +1 @@ -import*as e from"../common/common.js";import*as r from"../root/root.js";import*as t from"../i18n/i18n.js";import*as n from"../platform/platform.js";var o;!function(e){e.AppendedToURL="appendedToURL",e.CanceledSaveURL="canceledSaveURL",e.ColorThemeChanged="colorThemeChanged",e.ContextMenuCleared="contextMenuCleared",e.ContextMenuItemSelected="contextMenuItemSelected",e.DeviceCountUpdated="deviceCountUpdated",e.DevicesDiscoveryConfigChanged="devicesDiscoveryConfigChanged",e.DevicesPortForwardingStatusChanged="devicesPortForwardingStatusChanged",e.DevicesUpdated="devicesUpdated",e.DispatchMessage="dispatchMessage",e.DispatchMessageChunk="dispatchMessageChunk",e.EnterInspectElementMode="enterInspectElementMode",e.EyeDropperPickedColor="eyeDropperPickedColor",e.FileSystemsLoaded="fileSystemsLoaded",e.FileSystemRemoved="fileSystemRemoved",e.FileSystemAdded="fileSystemAdded",e.FileSystemFilesChangedAddedRemoved="FileSystemFilesChangedAddedRemoved",e.IndexingTotalWorkCalculated="indexingTotalWorkCalculated",e.IndexingWorked="indexingWorked",e.IndexingDone="indexingDone",e.KeyEventUnhandled="keyEventUnhandled",e.ReloadInspectedPage="reloadInspectedPage",e.RevealSourceLine="revealSourceLine",e.SavedURL="savedURL",e.SearchCompleted="searchCompleted",e.SetInspectedTabId="setInspectedTabId",e.SetUseSoftMenu="setUseSoftMenu",e.ShowPanel="showPanel"}(o||(o={}));const s=[[o.AppendedToURL,"appendedToURL",["url"]],[o.CanceledSaveURL,"canceledSaveURL",["url"]],[o.ColorThemeChanged,"colorThemeChanged",[]],[o.ContextMenuCleared,"contextMenuCleared",[]],[o.ContextMenuItemSelected,"contextMenuItemSelected",["id"]],[o.DeviceCountUpdated,"deviceCountUpdated",["count"]],[o.DevicesDiscoveryConfigChanged,"devicesDiscoveryConfigChanged",["config"]],[o.DevicesPortForwardingStatusChanged,"devicesPortForwardingStatusChanged",["status"]],[o.DevicesUpdated,"devicesUpdated",["devices"]],[o.DispatchMessage,"dispatchMessage",["messageObject"]],[o.DispatchMessageChunk,"dispatchMessageChunk",["messageChunk","messageSize"]],[o.EnterInspectElementMode,"enterInspectElementMode",[]],[o.EyeDropperPickedColor,"eyeDropperPickedColor",["color"]],[o.FileSystemsLoaded,"fileSystemsLoaded",["fileSystems"]],[o.FileSystemRemoved,"fileSystemRemoved",["fileSystemPath"]],[o.FileSystemAdded,"fileSystemAdded",["errorMessage","fileSystem"]],[o.FileSystemFilesChangedAddedRemoved,"fileSystemFilesChangedAddedRemoved",["changed","added","removed"]],[o.IndexingTotalWorkCalculated,"indexingTotalWorkCalculated",["requestId","fileSystemPath","totalWork"]],[o.IndexingWorked,"indexingWorked",["requestId","fileSystemPath","worked"]],[o.IndexingDone,"indexingDone",["requestId","fileSystemPath"]],[o.KeyEventUnhandled,"keyEventUnhandled",["event"]],[o.ReloadInspectedPage,"reloadInspectedPage",["hard"]],[o.RevealSourceLine,"revealSourceLine",["url","lineNumber","columnNumber"]],[o.SavedURL,"savedURL",["url","fileSystemPath"]],[o.SearchCompleted,"searchCompleted",["requestId","fileSystemPath","files"]],[o.SetInspectedTabId,"setInspectedTabId",["tabId"]],[o.SetUseSoftMenu,"setUseSoftMenu",["useSoftMenu"]],[o.ShowPanel,"showPanel",["panelName"]]];var i=Object.freeze({__proto__:null,EventDescriptors:s,get Events(){return o}});const a={systemError:"System error",connectionError:"Connection error",certificateError:"Certificate error",httpError:"HTTP error",cacheError:"Cache error",signedExchangeError:"Signed Exchange error",ftpError:"FTP error",certificateManagerError:"Certificate manager error",dnsResolverError:"DNS resolver error",unknownError:"Unknown error",httpErrorStatusCodeSS:"HTTP error: status code {PH1}, {PH2}",invalidUrl:"Invalid URL",decodingDataUrlFailed:"Decoding Data URL failed"},d=t.i18n.registerUIStrings("core/host/ResourceLoader.ts",a),c=t.i18n.getLocalizedString.bind(void 0,d);let l=0;const u={},m=function(e){return u[++l]=e,l},g=function(e){u[e].close(),delete u[e]},p=function(e,r){u[e].write(r)};function h(e,r,t){if(void 0===e||void 0===t)return null;if(0!==e){if(function(e){return e<=-300&&e>-400}(e))return c(a.httpErrorStatusCodeSS,{PH1:String(r),PH2:t});const n=function(e){return c(e>-100?a.systemError:e>-200?a.connectionError:e>-300?a.certificateError:e>-400?a.httpError:e>-500?a.cacheError:e>-600?a.signedExchangeError:e>-700?a.ftpError:e>-800?a.certificateManagerError:e>-900?a.dnsResolverError:a.unknownError)}(e);return`${n}: ${t}`}return null}const S=function(r,t,n,o,s){const i=m(n);if(new e.ParsedURL.ParsedURL(r).isDataURL())return void(e=>new Promise(((r,t)=>{const n=new XMLHttpRequest;n.withCredentials=!1,n.open("GET",e,!0),n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE){if(200!==n.status)return n.onreadystatechange=null,void t(new Error(String(n.status)));n.onreadystatechange=null,r(n.responseText)}},n.send(null)})))(r).then((function(e){p(i,e),l({statusCode:200})})).catch((function(e){l({statusCode:404,messageOverride:c(a.decodingDataUrlFailed)})}));if(!s&&function(e){try{const r=new URL(e);return"file:"===r.protocol&&""!==r.host}catch{return!1}}(r))return void(o&&o(!1,{},{statusCode:400,netError:-20,netErrorName:"net::BLOCKED_BY_CLIENT",message:"Loading from a remote file path is prohibited for security reasons."}));const d=[];if(t)for(const e in t)d.push(e+": "+t[e]);function l(e){if(o){const{success:r,description:t}=function(e){const{statusCode:r,netError:t,netErrorName:n,urlValid:o,messageOverride:s}=e;let i="";const d=r>=200&&r<300;if("string"==typeof s)i=s;else if(!d)if(void 0===t)i=c(!1===o?a.invalidUrl:a.unknownError);else{const e=h(t,r,n);e&&(i=e)}return console.assert(d===(0===i.length)),{success:d,description:{statusCode:r,netError:t,netErrorName:n,urlValid:o,message:i}}}(e);o(r,e.headers||{},t)}g(i)}f.loadNetworkResource(r,d.join("\r\n"),i,l)};var v=Object.freeze({__proto__:null,ResourceLoader:{},bindOutputStream:m,discardOutputStream:g,load:function(r,t,n,o){const s=new e.StringOutputStream.StringOutputStream;S(r,t,s,(function(e,r,t){n(e,r,s.data(),t)}),o)},loadAsStream:S,netErrorToMessage:h,streamWrite:p});const C={devtoolsS:"DevTools - {PH1}"},I=t.i18n.registerUIStrings("core/host/InspectorFrontendHost.ts",C),w=t.i18n.getLocalizedString.bind(void 0,I),k="/overrides";class E{#e=new Map;events;#r=null;recordedCountHistograms=[];recordedEnumeratedHistograms=[];recordedPerformanceHistograms=[];constructor(){function e(e){!("mac"===this.platform()?e.metaKey:e.ctrlKey)||"+"!==e.key&&"-"!==e.key||e.stopPropagation()}"undefined"!=typeof document&&document.addEventListener("keydown",(r=>{e.call(this,r)}),!0)}platform(){const e=navigator.userAgent;return e.includes("Windows NT")?"windows":e.includes("Mac OS X")?"mac":"linux"}loadCompleted(){}bringToFront(){}closeWindow(){}setIsDocked(e,r){window.setTimeout(r,0)}showSurvey(e,r){window.setTimeout((()=>r({surveyShown:!1})),0)}canShowSurvey(e,r){window.setTimeout((()=>r({canShowSurvey:!1})),0)}setInspectedPageBounds(e){}inspectElementCompleted(){}setInjectedScriptForOrigin(e,r){}inspectedURLChanged(e){document.title=w(C.devtoolsS,{PH1:e.replace(/^https?:\/\//,"")})}copyText(e){null!=e&&navigator.clipboard.writeText(e)}openInNewTab(r){e.ParsedURL.schemeIs(r,"javascript:")||window.open(r,"_blank")}openSearchResultsInNewTab(r){e.Console.Console.instance().error("Search is not enabled in hosted mode. Please inspect using chrome://inspect")}showItemInFolder(r){e.Console.Console.instance().error("Show item in folder is not enabled in hosted mode. Please inspect using chrome://inspect")}save(e,r,t,n){let s=this.#e.get(e);s||(s=[],this.#e.set(e,s)),s.push(r),this.events.dispatchEventToListeners(o.SavedURL,{url:e,fileSystemPath:e})}append(e,r){const t=this.#e.get(e);t&&(t.push(r),this.events.dispatchEventToListeners(o.AppendedToURL,e))}close(e){const r=this.#e.get(e)||[];this.#e.delete(e);let t="";if(e)try{const r=n.StringUtilities.trimURL(e);t=n.StringUtilities.removeURLFragment(r)}catch(r){t=e}const o=document.createElement("a");o.download=t;const s=new Blob([r.join("")],{type:"text/plain"}),i=URL.createObjectURL(s);o.href=i,o.click(),URL.revokeObjectURL(i)}sendMessageToBackend(e){}recordCountHistogram(e,r,t,n,o){this.recordedCountHistograms.length>=100&&this.recordedCountHistograms.shift(),this.recordedCountHistograms.push({histogramName:e,sample:r,min:t,exclusiveMax:n,bucketSize:o})}recordEnumeratedHistogram(e,r,t){this.recordedEnumeratedHistograms.length>=100&&this.recordedEnumeratedHistograms.shift(),this.recordedEnumeratedHistograms.push({actionName:e,actionCode:r})}recordPerformanceHistogram(e,r){this.recordedPerformanceHistograms.length>=100&&this.recordedPerformanceHistograms.shift(),this.recordedPerformanceHistograms.push({histogramName:e,duration:r})}recordUserMetricsAction(e){}connectAutomaticFileSystem(e,r,t,n){queueMicrotask((()=>n({success:!1})))}disconnectAutomaticFileSystem(e){}requestFileSystems(){this.events.dispatchEventToListeners(o.FileSystemsLoaded,[])}addFileSystem(e){window.webkitRequestFileSystem(window.TEMPORARY,1048576,(e=>{this.#r=e;const r={fileSystemName:"sandboxedRequestedFileSystem",fileSystemPath:k,rootURL:"filesystem:devtools://devtools/isolated/",type:"overrides"};this.events.dispatchEventToListeners(o.FileSystemAdded,{fileSystem:r})}))}removeFileSystem(e){const r=e=>{e.forEach((e=>{e.isDirectory?e.removeRecursively((()=>{})):e.isFile&&e.remove((()=>{}))}))};this.#r&&this.#r.root.createReader().readEntries(r),this.#r=null,this.events.dispatchEventToListeners(o.FileSystemRemoved,k)}isolatedFileSystem(e,r){return this.#r}loadNetworkResource(e,r,t,n){fetch(e).then((async e=>{const r=await e.arrayBuffer();let t=r;if(function(e){const r=new Uint8Array(e);return!(!r||r.length<3)&&31===r[0]&&139===r[1]&&8===r[2]}(r)){const e=new DecompressionStream("gzip"),n=e.writable.getWriter();n.write(r),n.close(),t=e.readable}return await new Response(t).text()})).then((function(e){p(t,e),n({statusCode:200,headers:void 0,messageOverride:void 0,netError:void 0,netErrorName:void 0,urlValid:void 0})})).catch((function(){n({statusCode:404,headers:void 0,messageOverride:void 0,netError:void 0,netErrorName:void 0,urlValid:void 0})}))}registerPreference(e,r){}getPreferences(e){const r={};for(const e in window.localStorage)r[e]=window.localStorage[e];e(r)}getPreference(e,r){r(window.localStorage[e])}setPreference(e,r){window.localStorage[e]=r}removePreference(e){delete window.localStorage[e]}clearPreferences(){window.localStorage.clear()}getSyncInformation(e){if("getSyncInformationForTesting"in globalThis)return e(globalThis.getSyncInformationForTesting());e({isSyncActive:!1,arePreferencesSynced:!1})}getHostConfig(e){const r={devToolsVeLogging:{enabled:!0},thirdPartyCookieControls:{thirdPartyCookieMetadataEnabled:!0,thirdPartyCookieHeuristicsEnabled:!0,managedBlockThirdPartyCookies:"Unset"}};if("hostConfigForTesting"in globalThis){const{hostConfigForTesting:e}=globalThis;for(const t of Object.keys(e)){const n=t=>{"object"==typeof r[t]&&"object"==typeof e[t]?r[t]={...r[t],...e[t]}:r[t]=e[t]??r[t]};n(t)}}e(r)}upgradeDraggedFileSystemPermissions(e){}indexPath(e,r,t){}stopIndexing(e){}searchInPath(e,r,t){}zoomFactor(){return 1}zoomIn(){}zoomOut(){}resetZoom(){}setWhitelistedShortcuts(e){}setEyeDropperActive(e){}showCertificateViewer(e){}reattach(e){e()}readyForTest(){}connectionReady(){}setOpenNewWindowForPopups(e){}setDevicesDiscoveryConfig(e){}setDevicesUpdatesEnabled(e){}openRemotePage(e,r){}openNodeFrontend(){}showContextMenuAtPoint(e,r,t,n){throw new Error("Soft context menu should be used")}isHostedMode(){return!0}setAddExtensionCallback(e){}async initialTargetId(){return null}doAidaConversation(e,r,t){t({error:"Not implemented"})}registerAidaClientEvent(e,r){r({error:"Not implemented"})}recordImpression(e){}recordResize(e){}recordClick(e){}recordHover(e){}recordDrag(e){}recordChange(e){}recordKeyDown(e){}recordSettingAccess(e){}}let f=globalThis.InspectorFrontendHost;class y{constructor(){for(const e of s)this[e[1]]=this.dispatch.bind(this,e[0],e[2],e[3])}dispatch(e,r,t,...n){if(r.length<2){try{f.events.dispatchEventToListeners(e,n[0])}catch(e){console.error(e+" "+e.stack)}return}const o={};for(let e=0;e=0&&(o.options??={},o.options.temperature=i),s&&(o.options??={},o.options.model_id=s),o}static async checkAccessPreconditions(){if(!navigator.onLine)return"no-internet";const e=await new Promise((e=>f.getSyncInformation((r=>e(r)))));return e.accountEmail?e.isSyncPaused?"sync-is-paused":"available":"no-account-email"}async*fetch(e,r){if(!f.doAidaConversation)throw new Error("doAidaConversation is not available");const t=(()=>{let{promise:e,resolve:t,reject:n}=Promise.withResolvers();return r?.signal?.addEventListener("abort",(()=>{n(new O)}),{once:!0}),{write:async r=>{t(r),({promise:e,resolve:t,reject:n}=Promise.withResolvers())},close:async()=>{t(null)},read:()=>e,fail:e=>n(e)}})(),n=m(t);let o;f.doAidaConversation(JSON.stringify(e),n,(e=>{403===e.statusCode?t.fail(new Error("Server responded: permission denied")):e.error?t.fail(new Error(`Cannot send request: ${e.error} ${e.detail||""}`)):"net::ERR_TIMED_OUT"===e.netErrorName?t.fail(new Error("doAidaConversation timed out")):200!==e.statusCode?t.fail(new Error(`Request failed: ${JSON.stringify(e)}`)):t.close()}));const s=[];let i=!1;const a=[];let d={rpcGlobalId:0};for(;o=await t.read();){let e,r=!1;if(o.length){o.startsWith(",")&&(o=o.slice(1)),o.startsWith("[")||(o="["+o),o.endsWith("]")||(o+="]");try{e=JSON.parse(o)}catch(e){throw new Error("Cannot parse chunk: "+o,{cause:e})}for(const t of e){if("metadata"in t&&(d=t.metadata,d?.attributionMetadata?.attributionAction===T.BLOCK))throw new N;if("textChunk"in t)i&&(s.push(_),i=!1),s.push(t.textChunk.text),r=!0;else if("codeChunk"in t)i||(s.push(_),i=!0),s.push(t.codeChunk.code),r=!0;else{if(!("functionCallChunk"in t))throw"error"in t?new Error(`Server responded: ${JSON.stringify(t)}`):new Error("Unknown chunk result");a.push({name:t.functionCallChunk.functionCall.name,args:t.functionCallChunk.functionCall.args})}}r&&(yield{explanation:s.join("")+(i?_:""),metadata:d,completed:!1})}}yield{explanation:s.join("")+(i?_:""),metadata:d,functionCalls:a.length?a:void 0,completed:!0}}registerClientEvent(e){const{promise:r,resolve:t}=Promise.withResolvers();return f.registerAidaClientEvent(JSON.stringify({client:M,event_time:(new Date).toISOString(),...e}),t),r}}let D;class H extends e.ObjectWrapper.ObjectWrapper{#t;#n;constructor(){super()}static instance(){return D||(D=new H),D}addEventListener(e,r){const t=!this.hasEventListeners(e),n=super.addEventListener(e,r);return t&&(window.clearTimeout(this.#t),this.pollAidaAvailability()),n}removeEventListener(e,r){super.removeEventListener(e,r),this.hasEventListeners(e)||window.clearTimeout(this.#t)}async pollAidaAvailability(){this.#t=window.setTimeout((()=>this.pollAidaAvailability()),2e3);const e=await L.checkAccessPreconditions();if(e!==this.#n){this.#n=e;const t=await new Promise((e=>f.getHostConfig(e)));Object.assign(r.Runtime.hostConfig,t),this.dispatchEventToListeners("aidaAvailabilityChanged")}}}var U=Object.freeze({__proto__:null,AidaAbortError:O,AidaBlockError:N,AidaClient:L,CLIENT_NAME:M,get CitationSourceType(){return x},get ClientFeature(){return P},get FunctionalityType(){return A},HostConfigTracker:H,get RecitationAction(){return T},get Role(){return b},get UserTier(){return R},convertToUserTierEnum:function(e){if(e)switch(e){case"TESTERS":return R.TESTERS;case"BETA":return R.BETA;case"PUBLIC":return R.PUBLIC}return R.BETA}});let W,B,V,G,j;function q(){return W||(W=f.platform()),W}var X=Object.freeze({__proto__:null,fontFamily:function(){if(j)return j;switch(q()){case"linux":j="Roboto, Ubuntu, Arial, sans-serif";break;case"mac":j="'Lucida Grande', sans-serif";break;case"windows":j="'Segoe UI', Tahoma, sans-serif"}return j},isCustomDevtoolsFrontend:function(){return void 0===G&&(G=window.location.toString().startsWith("devtools://devtools/custom/")),G},isMac:function(){return void 0===B&&(B="mac"===q()),B},isWin:function(){return void 0===V&&(V="windows"===q()),V},platform:q,setPlatformForTests:function(e){W=e,B=void 0,V=void 0}});let z=null;function K(){return null===z&&(z=new $),z}class ${#o="error";#s=new Set;#i=null;#a=null;#d="rn_inspector";#c={};#l=new Map;isEnabled(){return!0===globalThis.enableReactNativePerfMetrics}addEventListener(e){this.#s.add(e);return()=>{this.#s.delete(e)}}removeAllEventListeners(){this.#s.clear()}sendEvent(e){if(!0!==globalThis.enableReactNativePerfMetrics)return;const r=this.#u(e),t=[];for(const e of this.#s)try{e(r)}catch(e){t.push(e)}if(t.length>0){const e=new AggregateError(t);console.error("Error occurred when calling event listeners",e)}}registerPerfMetricsGlobalPostMessageHandler(){!0===globalThis.enableReactNativePerfMetrics&&!0===globalThis.enableReactNativePerfMetricsGlobalPostMessage&&this.addEventListener((e=>{window.postMessage({event:e,tag:"react-native-chrome-devtools-perf-metrics"},window.location.origin)}))}registerGlobalErrorReporting(){window.addEventListener("error",(e=>{const[r,t]=Y(`[RNPerfMetrics] uncaught error: ${e.message}`,e.error);this.sendEvent({eventName:"Browser.Error",params:{type:"error",message:r,error:t}})}),{passive:!0}),window.addEventListener("unhandledrejection",(e=>{const[r,t]=Y("[RNPerfMetrics] unhandled promise rejection",e.reason);this.sendEvent({eventName:"Browser.Error",params:{type:"rejectedPromise",message:r,error:t}})}),{passive:!0});const e=globalThis.console,r=e[this.#o];e[this.#o]=(...t)=>{try{const e=t[0],[r,n]=Y("[RNPerfMetrics] console.error",e);this.sendEvent({eventName:"Browser.Error",params:{message:r,error:n,type:"consoleError"}})}catch(e){const[r,t]=Y("[RNPerfMetrics] Error handling console.error",e);this.sendEvent({eventName:"Browser.Error",params:{message:r,error:t,type:"consoleError"}})}finally{r.apply(e,t)}}}setLaunchId(e){this.#i=e}setAppId(e){this.#a=e}setTelemetryInfo(e){this.#c=e}entryPointLoadingStarted(e){this.#d=e,this.sendEvent({eventName:"Entrypoint.LoadingStarted",entryPoint:e})}entryPointLoadingFinished(e){this.sendEvent({eventName:"Entrypoint.LoadingFinished",entryPoint:e})}browserVisibilityChanged(e){this.sendEvent({eventName:"Browser.VisibilityChange",params:{visibilityState:e}})}remoteDebuggingTerminated(e={}){this.sendEvent({eventName:"Connection.DebuggingTerminated",params:e})}developerResourceLoadingStarted(e,r){const t=Q(e);this.sendEvent({eventName:"DeveloperResource.LoadingStarted",params:{url:t,loadingMethod:r}})}developerResourceLoadingFinished(e,r,t){const n=Q(e);this.sendEvent({eventName:"DeveloperResource.LoadingFinished",params:{url:n,loadingMethod:r,success:t.success,errorMessage:t.errorDescription?.message}})}fuseboxSetClientMetadataStarted(){this.sendEvent({eventName:"FuseboxSetClientMetadataStarted"})}fuseboxSetClientMetadataFinished(e,r){if(e)this.sendEvent({eventName:"FuseboxSetClientMetadataFinished",params:{success:!0}});else{const[e,t]=Y("[RNPerfMetrics] Fusebox setClientMetadata failed",r);this.sendEvent({eventName:"FuseboxSetClientMetadataFinished",params:{success:!1,error:t,errorMessage:e}})}}heapSnapshotStarted(){this.sendEvent({eventName:"MemoryPanelActionStarted",params:{action:"snapshot"}})}heapSnapshotFinished(e){this.sendEvent({eventName:"MemoryPanelActionFinished",params:{action:"snapshot",success:e}})}heapProfilingStarted(){this.sendEvent({eventName:"MemoryPanelActionStarted",params:{action:"profiling"}})}heapProfilingFinished(e){this.sendEvent({eventName:"MemoryPanelActionFinished",params:{action:"profiling",success:e}})}heapSamplingStarted(){this.sendEvent({eventName:"MemoryPanelActionStarted",params:{action:"sampling"}})}heapSamplingFinished(e){this.sendEvent({eventName:"MemoryPanelActionFinished",params:{action:"sampling",success:e}})}stackTraceSymbolicationSucceeded(e){this.sendEvent({eventName:"StackTraceSymbolicationSucceeded",params:{specialHermesFrameTypes:e}})}stackTraceSymbolicationFailed(e,r,t){this.sendEvent({eventName:"StackTraceSymbolicationFailed",params:{stackTrace:e,line:r,reason:t}})}stackTraceFrameUrlResolutionSucceeded(){this.sendEvent({eventName:"StackTraceFrameUrlResolutionSucceeded"})}stackTraceFrameUrlResolutionFailed(e){this.sendEvent({eventName:"StackTraceFrameUrlResolutionFailed",params:{uniqueUrls:e}})}manualBreakpointSetSucceeded(e){this.sendEvent({eventName:"ManualBreakpointSetSucceeded",params:{bpSettingDuration:e}})}stackTraceFrameClicked(e){this.sendEvent({eventName:"StackTraceFrameClicked",params:{isLinkified:e}})}panelShown(e,r){}panelShownInLocation(e,r){this.sendEvent({eventName:"PanelShown",params:{location:r,newPanelName:e}}),this.#l.set(r,e)}#u(e){return{...e,...{timestamp:performance.timeOrigin+performance.now(),launchId:this.#i,appId:this.#a,entryPoint:this.#d,telemetryInfo:this.#c,currentPanels:this.#l}}}}function Q(e){const{url:r}=e;return"http"===e.scheme||"https"===e.scheme?r:`${r.slice(0,100)} …(omitted ${r.length-100} characters)`}function Y(e,r){if(r instanceof Error){return[`${e}: ${r.message}`,r]}const t=`${e}: ${String(r)}`;return[t,new Error(t,{cause:r})]}var J,Z,ee,re,te,ne,oe,se,ie,ae,de,ce,le,ue=Object.freeze({__proto__:null,getInstance:K});class me{#m;#g;#p;constructor(){this.#m=!1,this.#g=!1,this.#p=""}panelShown(e,r){const t=Z[e]||0;f.recordEnumeratedHistogram("DevTools.PanelShown",t,Z.MAX_VALUE),f.recordUserMetricsAction("DevTools_PanelShown_"+e),r||(this.#m=!0),K().panelShown(e,r)}panelShownInLocation(e,r){const t=ee[`${e}-${r}`]||0;f.recordEnumeratedHistogram("DevTools.PanelShownInLocation",t,ee.MAX_VALUE),K().panelShownInLocation(e,r)}settingsPanelShown(e){this.panelShown("settings-"+e)}sourcesPanelFileDebugged(e){const r=e&&te[e]||te.Unknown;f.recordEnumeratedHistogram("DevTools.SourcesPanelFileDebugged",r,te.MAX_VALUE)}sourcesPanelFileOpened(e){const r=e&&te[e]||te.Unknown;f.recordEnumeratedHistogram("DevTools.SourcesPanelFileOpened",r,te.MAX_VALUE)}networkPanelResponsePreviewOpened(e){const r=e&&te[e]||te.Unknown;f.recordEnumeratedHistogram("DevTools.NetworkPanelResponsePreviewOpened",r,te.MAX_VALUE)}actionTaken(e){f.recordEnumeratedHistogram("DevTools.ActionTaken",e,J.MAX_VALUE)}panelLoaded(e,r){this.#g||e!==this.#p||(this.#g=!0,requestAnimationFrame((()=>{window.setTimeout((()=>{performance.mark(r),this.#m||f.recordPerformanceHistogram(r,performance.now())}),0)})))}setLaunchPanel(e){this.#p=e}performanceTraceLoad(e){f.recordPerformanceHistogram("DevTools.TraceLoad",e.duration)}keybindSetSettingChanged(e){const r=ne[e]||0;f.recordEnumeratedHistogram("DevTools.KeybindSetSettingChanged",r,ne.MAX_VALUE)}keyboardShortcutFired(e){const r=oe[e]||oe.OtherShortcut;f.recordEnumeratedHistogram("DevTools.KeyboardShortcutFired",r,oe.MAX_VALUE)}issuesPanelOpenedFrom(e){f.recordEnumeratedHistogram("DevTools.IssuesPanelOpenedFrom",e,6)}issuesPanelIssueExpanded(e){if(void 0===e)return;const r=ie[e];void 0!==r&&f.recordEnumeratedHistogram("DevTools.IssuesPanelIssueExpanded",r,ie.MAX_VALUE)}issuesPanelResourceOpened(e,r){const t=ae[e+r];void 0!==t&&f.recordEnumeratedHistogram("DevTools.IssuesPanelResourceOpened",t,ae.MAX_VALUE)}issueCreated(e){const r=de[e];void 0!==r&&f.recordEnumeratedHistogram("DevTools.IssueCreated",r,de.MAX_VALUE)}experimentEnabledAtLaunch(e){const r=se[e];void 0!==r&&f.recordEnumeratedHistogram("DevTools.ExperimentEnabledAtLaunch",r,se.MAX_VALUE)}navigationSettingAtFirstTimelineLoad(e){f.recordEnumeratedHistogram("DevTools.TimelineNavigationSettingState",e,4)}experimentDisabledAtLaunch(e){const r=se[e];void 0!==r&&f.recordEnumeratedHistogram("DevTools.ExperimentDisabledAtLaunch",r,se.MAX_VALUE)}experimentChanged(e,r){const t=se[e];if(void 0===t)return;const n=r?"DevTools.ExperimentEnabled":"DevTools.ExperimentDisabled";f.recordEnumeratedHistogram(n,t,se.MAX_VALUE)}developerResourceLoaded(e){e>=8||f.recordEnumeratedHistogram("DevTools.DeveloperResourceLoaded",e,8)}developerResourceScheme(e){e>=9||f.recordEnumeratedHistogram("DevTools.DeveloperResourceScheme",e,9)}language(e){const r=ce[e];void 0!==r&&f.recordEnumeratedHistogram("DevTools.Language",r,ce.MAX_VALUE)}syncSetting(e){f.getSyncInformation((r=>{let t=1;r.isSyncActive&&!r.arePreferencesSynced?t=2:r.isSyncActive&&r.arePreferencesSynced&&(t=e?4:3),f.recordEnumeratedHistogram("DevTools.SyncSetting",t,5)}))}recordingAssertion(e){f.recordEnumeratedHistogram("DevTools.RecordingAssertion",e,4)}recordingToggled(e){f.recordEnumeratedHistogram("DevTools.RecordingToggled",e,3)}recordingReplayFinished(e){f.recordEnumeratedHistogram("DevTools.RecordingReplayFinished",e,5)}recordingReplaySpeed(e){f.recordEnumeratedHistogram("DevTools.RecordingReplaySpeed",e,5)}recordingReplayStarted(e){f.recordEnumeratedHistogram("DevTools.RecordingReplayStarted",e,4)}recordingEdited(e){f.recordEnumeratedHistogram("DevTools.RecordingEdited",e,11)}recordingExported(e){f.recordEnumeratedHistogram("DevTools.RecordingExported",e,6)}recordingCodeToggled(e){f.recordEnumeratedHistogram("DevTools.RecordingCodeToggled",e,3)}recordingCopiedToClipboard(e){f.recordEnumeratedHistogram("DevTools.RecordingCopiedToClipboard",e,9)}cssHintShown(e){f.recordEnumeratedHistogram("DevTools.CSSHintShown",e,14)}lighthouseModeRun(e){f.recordEnumeratedHistogram("DevTools.LighthouseModeRun",e,4)}lighthouseCategoryUsed(e){f.recordEnumeratedHistogram("DevTools.LighthouseCategoryUsed",e,6)}swatchActivated(e){f.recordEnumeratedHistogram("DevTools.SwatchActivated",e,11)}animationPlaybackRateChanged(e){f.recordEnumeratedHistogram("DevTools.AnimationPlaybackRateChanged",e,4)}animationPointDragged(e){f.recordEnumeratedHistogram("DevTools.AnimationPointDragged",e,5)}workspacesPopulated(e){f.recordPerformanceHistogram("DevTools.Workspaces.PopulateWallClocktime",e)}visualLoggingProcessingDone(e){f.recordPerformanceHistogram("DevTools.VisualLogging.ProcessingTime",e)}freestylerQueryLength(e){f.recordCountHistogram("DevTools.Freestyler.QueryLength",e,0,1e5,100)}freestylerEvalResponseSize(e){f.recordCountHistogram("DevTools.Freestyler.EvalResponseSize",e,0,1e5,100)}}!function(e){e[e.WindowDocked=1]="WindowDocked",e[e.WindowUndocked=2]="WindowUndocked",e[e.ScriptsBreakpointSet=3]="ScriptsBreakpointSet",e[e.TimelineStarted=4]="TimelineStarted",e[e.ProfilesCPUProfileTaken=5]="ProfilesCPUProfileTaken",e[e.ProfilesHeapProfileTaken=6]="ProfilesHeapProfileTaken",e[e.ConsoleEvaluated=8]="ConsoleEvaluated",e[e.FileSavedInWorkspace=9]="FileSavedInWorkspace",e[e.DeviceModeEnabled=10]="DeviceModeEnabled",e[e.AnimationsPlaybackRateChanged=11]="AnimationsPlaybackRateChanged",e[e.RevisionApplied=12]="RevisionApplied",e[e.FileSystemDirectoryContentReceived=13]="FileSystemDirectoryContentReceived",e[e.StyleRuleEdited=14]="StyleRuleEdited",e[e.CommandEvaluatedInConsolePanel=15]="CommandEvaluatedInConsolePanel",e[e.DOMPropertiesExpanded=16]="DOMPropertiesExpanded",e[e.ResizedViewInResponsiveMode=17]="ResizedViewInResponsiveMode",e[e.TimelinePageReloadStarted=18]="TimelinePageReloadStarted",e[e.ConnectToNodeJSFromFrontend=19]="ConnectToNodeJSFromFrontend",e[e.ConnectToNodeJSDirectly=20]="ConnectToNodeJSDirectly",e[e.CpuThrottlingEnabled=21]="CpuThrottlingEnabled",e[e.CpuProfileNodeFocused=22]="CpuProfileNodeFocused",e[e.CpuProfileNodeExcluded=23]="CpuProfileNodeExcluded",e[e.SelectFileFromFilePicker=24]="SelectFileFromFilePicker",e[e.SelectCommandFromCommandMenu=25]="SelectCommandFromCommandMenu",e[e.ChangeInspectedNodeInElementsPanel=26]="ChangeInspectedNodeInElementsPanel",e[e.StyleRuleCopied=27]="StyleRuleCopied",e[e.CoverageStarted=28]="CoverageStarted",e[e.LighthouseStarted=29]="LighthouseStarted",e[e.LighthouseFinished=30]="LighthouseFinished",e[e.ShowedThirdPartyBadges=31]="ShowedThirdPartyBadges",e[e.LighthouseViewTrace=32]="LighthouseViewTrace",e[e.FilmStripStartedRecording=33]="FilmStripStartedRecording",e[e.CoverageReportFiltered=34]="CoverageReportFiltered",e[e.CoverageStartedPerBlock=35]="CoverageStartedPerBlock",e[e["SettingsOpenedFromGear-deprecated"]=36]="SettingsOpenedFromGear-deprecated",e[e["SettingsOpenedFromMenu-deprecated"]=37]="SettingsOpenedFromMenu-deprecated",e[e["SettingsOpenedFromCommandMenu-deprecated"]=38]="SettingsOpenedFromCommandMenu-deprecated",e[e.TabMovedToDrawer=39]="TabMovedToDrawer",e[e.TabMovedToMainPanel=40]="TabMovedToMainPanel",e[e.CaptureCssOverviewClicked=41]="CaptureCssOverviewClicked",e[e.VirtualAuthenticatorEnvironmentEnabled=42]="VirtualAuthenticatorEnvironmentEnabled",e[e.SourceOrderViewActivated=43]="SourceOrderViewActivated",e[e.UserShortcutAdded=44]="UserShortcutAdded",e[e.ShortcutRemoved=45]="ShortcutRemoved",e[e.ShortcutModified=46]="ShortcutModified",e[e.CustomPropertyLinkClicked=47]="CustomPropertyLinkClicked",e[e.CustomPropertyEdited=48]="CustomPropertyEdited",e[e.ServiceWorkerNetworkRequestClicked=49]="ServiceWorkerNetworkRequestClicked",e[e.ServiceWorkerNetworkRequestClosedQuickly=50]="ServiceWorkerNetworkRequestClosedQuickly",e[e.NetworkPanelServiceWorkerRespondWith=51]="NetworkPanelServiceWorkerRespondWith",e[e.NetworkPanelCopyValue=52]="NetworkPanelCopyValue",e[e.ConsoleSidebarOpened=53]="ConsoleSidebarOpened",e[e.PerfPanelTraceImported=54]="PerfPanelTraceImported",e[e.PerfPanelTraceExported=55]="PerfPanelTraceExported",e[e.StackFrameRestarted=56]="StackFrameRestarted",e[e.CaptureTestProtocolClicked=57]="CaptureTestProtocolClicked",e[e.BreakpointRemovedFromRemoveButton=58]="BreakpointRemovedFromRemoveButton",e[e.BreakpointGroupExpandedStateChanged=59]="BreakpointGroupExpandedStateChanged",e[e.HeaderOverrideFileCreated=60]="HeaderOverrideFileCreated",e[e.HeaderOverrideEnableEditingClicked=61]="HeaderOverrideEnableEditingClicked",e[e.HeaderOverrideHeaderAdded=62]="HeaderOverrideHeaderAdded",e[e.HeaderOverrideHeaderEdited=63]="HeaderOverrideHeaderEdited",e[e.HeaderOverrideHeaderRemoved=64]="HeaderOverrideHeaderRemoved",e[e.HeaderOverrideHeadersFileEdited=65]="HeaderOverrideHeadersFileEdited",e[e.PersistenceNetworkOverridesEnabled=66]="PersistenceNetworkOverridesEnabled",e[e.PersistenceNetworkOverridesDisabled=67]="PersistenceNetworkOverridesDisabled",e[e.BreakpointRemovedFromContextMenu=68]="BreakpointRemovedFromContextMenu",e[e.BreakpointsInFileRemovedFromRemoveButton=69]="BreakpointsInFileRemovedFromRemoveButton",e[e.BreakpointsInFileRemovedFromContextMenu=70]="BreakpointsInFileRemovedFromContextMenu",e[e.BreakpointsInFileCheckboxToggled=71]="BreakpointsInFileCheckboxToggled",e[e.BreakpointsInFileEnabledDisabledFromContextMenu=72]="BreakpointsInFileEnabledDisabledFromContextMenu",e[e.BreakpointConditionEditedFromSidebar=73]="BreakpointConditionEditedFromSidebar",e[e.WorkspaceTabAddFolder=74]="WorkspaceTabAddFolder",e[e.WorkspaceTabRemoveFolder=75]="WorkspaceTabRemoveFolder",e[e.OverrideTabAddFolder=76]="OverrideTabAddFolder",e[e.OverrideTabRemoveFolder=77]="OverrideTabRemoveFolder",e[e.WorkspaceSourceSelected=78]="WorkspaceSourceSelected",e[e.OverridesSourceSelected=79]="OverridesSourceSelected",e[e.StyleSheetInitiatorLinkClicked=80]="StyleSheetInitiatorLinkClicked",e[e.BreakpointRemovedFromGutterContextMenu=81]="BreakpointRemovedFromGutterContextMenu",e[e.BreakpointRemovedFromGutterToggle=82]="BreakpointRemovedFromGutterToggle",e[e.StylePropertyInsideKeyframeEdited=83]="StylePropertyInsideKeyframeEdited",e[e.OverrideContentFromSourcesContextMenu=84]="OverrideContentFromSourcesContextMenu",e[e.OverrideContentFromNetworkContextMenu=85]="OverrideContentFromNetworkContextMenu",e[e.OverrideScript=86]="OverrideScript",e[e.OverrideStyleSheet=87]="OverrideStyleSheet",e[e.OverrideDocument=88]="OverrideDocument",e[e.OverrideFetchXHR=89]="OverrideFetchXHR",e[e.OverrideImage=90]="OverrideImage",e[e.OverrideFont=91]="OverrideFont",e[e.OverrideContentContextMenuSetup=92]="OverrideContentContextMenuSetup",e[e.OverrideContentContextMenuAbandonSetup=93]="OverrideContentContextMenuAbandonSetup",e[e.OverrideContentContextMenuActivateDisabled=94]="OverrideContentContextMenuActivateDisabled",e[e.OverrideContentContextMenuOpenExistingFile=95]="OverrideContentContextMenuOpenExistingFile",e[e.OverrideContentContextMenuSaveNewFile=96]="OverrideContentContextMenuSaveNewFile",e[e.ShowAllOverridesFromSourcesContextMenu=97]="ShowAllOverridesFromSourcesContextMenu",e[e.ShowAllOverridesFromNetworkContextMenu=98]="ShowAllOverridesFromNetworkContextMenu",e[e.AnimationGroupsCleared=99]="AnimationGroupsCleared",e[e.AnimationsPaused=100]="AnimationsPaused",e[e.AnimationsResumed=101]="AnimationsResumed",e[e.AnimatedNodeDescriptionClicked=102]="AnimatedNodeDescriptionClicked",e[e.AnimationGroupScrubbed=103]="AnimationGroupScrubbed",e[e.AnimationGroupReplayed=104]="AnimationGroupReplayed",e[e.OverrideTabDeleteFolderContextMenu=105]="OverrideTabDeleteFolderContextMenu",e[e.WorkspaceDropFolder=107]="WorkspaceDropFolder",e[e.WorkspaceSelectFolder=108]="WorkspaceSelectFolder",e[e.OverrideContentContextMenuSourceMappedWarning=109]="OverrideContentContextMenuSourceMappedWarning",e[e.OverrideContentContextMenuRedirectToDeployed=110]="OverrideContentContextMenuRedirectToDeployed",e[e.NewStyleRuleAdded=111]="NewStyleRuleAdded",e[e.TraceExpanded=112]="TraceExpanded",e[e.InsightConsoleMessageShown=113]="InsightConsoleMessageShown",e[e.InsightRequestedViaContextMenu=114]="InsightRequestedViaContextMenu",e[e.InsightRequestedViaHoverButton=115]="InsightRequestedViaHoverButton",e[e.InsightRatedPositive=117]="InsightRatedPositive",e[e.InsightRatedNegative=118]="InsightRatedNegative",e[e.InsightClosed=119]="InsightClosed",e[e.InsightErrored=120]="InsightErrored",e[e.InsightHoverButtonShown=121]="InsightHoverButtonShown",e[e.SelfXssWarningConsoleMessageShown=122]="SelfXssWarningConsoleMessageShown",e[e.SelfXssWarningDialogShown=123]="SelfXssWarningDialogShown",e[e.SelfXssAllowPastingInConsole=124]="SelfXssAllowPastingInConsole",e[e.SelfXssAllowPastingInDialog=125]="SelfXssAllowPastingInDialog",e[e.ToggleEmulateFocusedPageFromStylesPaneOn=126]="ToggleEmulateFocusedPageFromStylesPaneOn",e[e.ToggleEmulateFocusedPageFromStylesPaneOff=127]="ToggleEmulateFocusedPageFromStylesPaneOff",e[e.ToggleEmulateFocusedPageFromRenderingTab=128]="ToggleEmulateFocusedPageFromRenderingTab",e[e.ToggleEmulateFocusedPageFromCommandMenu=129]="ToggleEmulateFocusedPageFromCommandMenu",e[e.InsightGenerated=130]="InsightGenerated",e[e.InsightErroredApi=131]="InsightErroredApi",e[e.InsightErroredMarkdown=132]="InsightErroredMarkdown",e[e.ToggleShowWebVitals=133]="ToggleShowWebVitals",e[e.InsightErroredPermissionDenied=134]="InsightErroredPermissionDenied",e[e.InsightErroredCannotSend=135]="InsightErroredCannotSend",e[e.InsightErroredRequestFailed=136]="InsightErroredRequestFailed",e[e.InsightErroredCannotParseChunk=137]="InsightErroredCannotParseChunk",e[e.InsightErroredUnknownChunk=138]="InsightErroredUnknownChunk",e[e.InsightErroredOther=139]="InsightErroredOther",e[e.AutofillReceived=140]="AutofillReceived",e[e.AutofillReceivedAndTabAutoOpened=141]="AutofillReceivedAndTabAutoOpened",e[e.AnimationGroupSelected=142]="AnimationGroupSelected",e[e.ScrollDrivenAnimationGroupSelected=143]="ScrollDrivenAnimationGroupSelected",e[e.ScrollDrivenAnimationGroupScrubbed=144]="ScrollDrivenAnimationGroupScrubbed",e[e.AiAssistanceOpenedFromElementsPanel=145]="AiAssistanceOpenedFromElementsPanel",e[e.AiAssistanceOpenedFromStylesTab=146]="AiAssistanceOpenedFromStylesTab",e[e.ConsoleFilterByContext=147]="ConsoleFilterByContext",e[e.ConsoleFilterBySource=148]="ConsoleFilterBySource",e[e.ConsoleFilterByUrl=149]="ConsoleFilterByUrl",e[e.InsightConsentReminderShown=150]="InsightConsentReminderShown",e[e.InsightConsentReminderCanceled=151]="InsightConsentReminderCanceled",e[e.InsightConsentReminderConfirmed=152]="InsightConsentReminderConfirmed",e[e.InsightsOnboardingShown=153]="InsightsOnboardingShown",e[e.InsightsOnboardingCanceledOnPage1=154]="InsightsOnboardingCanceledOnPage1",e[e.InsightsOnboardingCanceledOnPage2=155]="InsightsOnboardingCanceledOnPage2",e[e.InsightsOnboardingConfirmed=156]="InsightsOnboardingConfirmed",e[e.InsightsOnboardingNextPage=157]="InsightsOnboardingNextPage",e[e.InsightsOnboardingPrevPage=158]="InsightsOnboardingPrevPage",e[e.InsightsOnboardingFeatureDisabled=159]="InsightsOnboardingFeatureDisabled",e[e.InsightsOptInTeaserShown=160]="InsightsOptInTeaserShown",e[e.InsightsOptInTeaserSettingsLinkClicked=161]="InsightsOptInTeaserSettingsLinkClicked",e[e.InsightsOptInTeaserConfirmedInSettings=162]="InsightsOptInTeaserConfirmedInSettings",e[e.InsightsReminderTeaserShown=163]="InsightsReminderTeaserShown",e[e.InsightsReminderTeaserConfirmed=164]="InsightsReminderTeaserConfirmed",e[e.InsightsReminderTeaserCanceled=165]="InsightsReminderTeaserCanceled",e[e.InsightsReminderTeaserSettingsLinkClicked=166]="InsightsReminderTeaserSettingsLinkClicked",e[e.InsightsReminderTeaserAbortedInSettings=167]="InsightsReminderTeaserAbortedInSettings",e[e.GeneratingInsightWithoutDisclaimer=168]="GeneratingInsightWithoutDisclaimer",e[e.AiAssistanceOpenedFromElementsPanelFloatingButton=169]="AiAssistanceOpenedFromElementsPanelFloatingButton",e[e.AiAssistanceOpenedFromNetworkPanel=170]="AiAssistanceOpenedFromNetworkPanel",e[e.AiAssistanceOpenedFromSourcesPanel=171]="AiAssistanceOpenedFromSourcesPanel",e[e.AiAssistanceOpenedFromSourcesPanelFloatingButton=172]="AiAssistanceOpenedFromSourcesPanelFloatingButton",e[e.AiAssistanceOpenedFromPerformancePanel=173]="AiAssistanceOpenedFromPerformancePanel",e[e.AiAssistanceOpenedFromNetworkPanelFloatingButton=174]="AiAssistanceOpenedFromNetworkPanelFloatingButton",e[e.AiAssistancePanelOpened=175]="AiAssistancePanelOpened",e[e.AiAssistanceQuerySubmitted=176]="AiAssistanceQuerySubmitted",e[e.AiAssistanceAnswerReceived=177]="AiAssistanceAnswerReceived",e[e.AiAssistanceDynamicSuggestionClicked=178]="AiAssistanceDynamicSuggestionClicked",e[e.AiAssistanceSideEffectConfirmed=179]="AiAssistanceSideEffectConfirmed",e[e.AiAssistanceSideEffectRejected=180]="AiAssistanceSideEffectRejected",e[e.AiAssistanceError=181]="AiAssistanceError",e[e.AiAssistanceOpenedFromPerformanceInsight=182]="AiAssistanceOpenedFromPerformanceInsight",e[e.MAX_VALUE=183]="MAX_VALUE"}(J||(J={})),function(e){e[e.elements=1]="elements",e[e.resources=2]="resources",e[e.network=3]="network",e[e.sources=4]="sources",e[e.timeline=5]="timeline",e[e["heap-profiler"]=6]="heap-profiler",e[e.console=8]="console",e[e.layers=9]="layers",e[e["console-view"]=10]="console-view",e[e.animations=11]="animations",e[e["network.config"]=12]="network.config",e[e.rendering=13]="rendering",e[e.sensors=14]="sensors",e[e["sources.search"]=15]="sources.search",e[e.security=16]="security",e[e["js-profiler"]=17]="js-profiler",e[e.lighthouse=18]="lighthouse",e[e.coverage=19]="coverage",e[e["protocol-monitor"]=20]="protocol-monitor",e[e["remote-devices"]=21]="remote-devices",e[e["web-audio"]=22]="web-audio",e[e["changes.changes"]=23]="changes.changes",e[e["performance.monitor"]=24]="performance.monitor",e[e["release-note"]=25]="release-note",e[e["live-heap-profile"]=26]="live-heap-profile",e[e["sources.quick"]=27]="sources.quick",e[e["network.blocked-urls"]=28]="network.blocked-urls",e[e["settings-preferences"]=29]="settings-preferences",e[e["settings-workspace"]=30]="settings-workspace",e[e["settings-experiments"]=31]="settings-experiments",e[e["settings-blackbox"]=32]="settings-blackbox",e[e["settings-devices"]=33]="settings-devices",e[e["settings-throttling-conditions"]=34]="settings-throttling-conditions",e[e["settings-emulation-locations"]=35]="settings-emulation-locations",e[e["settings-shortcuts"]=36]="settings-shortcuts",e[e["issues-pane"]=37]="issues-pane",e[e["settings-keybinds"]=38]="settings-keybinds",e[e.cssoverview=39]="cssoverview",e[e["chrome-recorder"]=40]="chrome-recorder",e[e["trust-tokens"]=41]="trust-tokens",e[e["reporting-api"]=42]="reporting-api",e[e["interest-groups"]=43]="interest-groups",e[e["back-forward-cache"]=44]="back-forward-cache",e[e["service-worker-cache"]=45]="service-worker-cache",e[e["background-service-background-fetch"]=46]="background-service-background-fetch",e[e["background-service-background-sync"]=47]="background-service-background-sync",e[e["background-service-push-messaging"]=48]="background-service-push-messaging",e[e["background-service-notifications"]=49]="background-service-notifications",e[e["background-service-payment-handler"]=50]="background-service-payment-handler",e[e["background-service-periodic-background-sync"]=51]="background-service-periodic-background-sync",e[e["service-workers"]=52]="service-workers",e[e["app-manifest"]=53]="app-manifest",e[e.storage=54]="storage",e[e.cookies=55]="cookies",e[e["frame-details"]=56]="frame-details",e[e["frame-resource"]=57]="frame-resource",e[e["frame-window"]=58]="frame-window",e[e["frame-worker"]=59]="frame-worker",e[e["dom-storage"]=60]="dom-storage",e[e["indexed-db"]=61]="indexed-db",e[e["web-sql"]=62]="web-sql",e[e["performance-insights"]=63]="performance-insights",e[e.preloading=64]="preloading",e[e["bounce-tracking-mitigations"]=65]="bounce-tracking-mitigations",e[e["developer-resources"]=66]="developer-resources",e[e["autofill-view"]=67]="autofill-view",e[e.MAX_VALUE=68]="MAX_VALUE"}(Z||(Z={})),function(e){e[e["elements-main"]=1]="elements-main",e[e["elements-drawer"]=2]="elements-drawer",e[e["resources-main"]=3]="resources-main",e[e["resources-drawer"]=4]="resources-drawer",e[e["network-main"]=5]="network-main",e[e["network-drawer"]=6]="network-drawer",e[e["sources-main"]=7]="sources-main",e[e["sources-drawer"]=8]="sources-drawer",e[e["timeline-main"]=9]="timeline-main",e[e["timeline-drawer"]=10]="timeline-drawer",e[e["heap_profiler-main"]=11]="heap_profiler-main",e[e["heap_profiler-drawer"]=12]="heap_profiler-drawer",e[e["console-main"]=13]="console-main",e[e["console-drawer"]=14]="console-drawer",e[e["layers-main"]=15]="layers-main",e[e["layers-drawer"]=16]="layers-drawer",e[e["console-view-main"]=17]="console-view-main",e[e["console-view-drawer"]=18]="console-view-drawer",e[e["animations-main"]=19]="animations-main",e[e["animations-drawer"]=20]="animations-drawer",e[e["network.config-main"]=21]="network.config-main",e[e["network.config-drawer"]=22]="network.config-drawer",e[e["rendering-main"]=23]="rendering-main",e[e["rendering-drawer"]=24]="rendering-drawer",e[e["sensors-main"]=25]="sensors-main",e[e["sensors-drawer"]=26]="sensors-drawer",e[e["sources.search-main"]=27]="sources.search-main",e[e["sources.search-drawer"]=28]="sources.search-drawer",e[e["security-main"]=29]="security-main",e[e["security-drawer"]=30]="security-drawer",e[e["lighthouse-main"]=33]="lighthouse-main",e[e["lighthouse-drawer"]=34]="lighthouse-drawer",e[e["coverage-main"]=35]="coverage-main",e[e["coverage-drawer"]=36]="coverage-drawer",e[e["protocol-monitor-main"]=37]="protocol-monitor-main",e[e["protocol-monitor-drawer"]=38]="protocol-monitor-drawer",e[e["remote-devices-main"]=39]="remote-devices-main",e[e["remote-devices-drawer"]=40]="remote-devices-drawer",e[e["web-audio-main"]=41]="web-audio-main",e[e["web-audio-drawer"]=42]="web-audio-drawer",e[e["changes.changes-main"]=43]="changes.changes-main",e[e["changes.changes-drawer"]=44]="changes.changes-drawer",e[e["performance.monitor-main"]=45]="performance.monitor-main",e[e["performance.monitor-drawer"]=46]="performance.monitor-drawer",e[e["release-note-main"]=47]="release-note-main",e[e["release-note-drawer"]=48]="release-note-drawer",e[e["live_heap_profile-main"]=49]="live_heap_profile-main",e[e["live_heap_profile-drawer"]=50]="live_heap_profile-drawer",e[e["sources.quick-main"]=51]="sources.quick-main",e[e["sources.quick-drawer"]=52]="sources.quick-drawer",e[e["network.blocked-urls-main"]=53]="network.blocked-urls-main",e[e["network.blocked-urls-drawer"]=54]="network.blocked-urls-drawer",e[e["settings-preferences-main"]=55]="settings-preferences-main",e[e["settings-preferences-drawer"]=56]="settings-preferences-drawer",e[e["settings-workspace-main"]=57]="settings-workspace-main",e[e["settings-workspace-drawer"]=58]="settings-workspace-drawer",e[e["settings-experiments-main"]=59]="settings-experiments-main",e[e["settings-experiments-drawer"]=60]="settings-experiments-drawer",e[e["settings-blackbox-main"]=61]="settings-blackbox-main",e[e["settings-blackbox-drawer"]=62]="settings-blackbox-drawer",e[e["settings-devices-main"]=63]="settings-devices-main",e[e["settings-devices-drawer"]=64]="settings-devices-drawer",e[e["settings-throttling-conditions-main"]=65]="settings-throttling-conditions-main",e[e["settings-throttling-conditions-drawer"]=66]="settings-throttling-conditions-drawer",e[e["settings-emulation-locations-main"]=67]="settings-emulation-locations-main",e[e["settings-emulation-locations-drawer"]=68]="settings-emulation-locations-drawer",e[e["settings-shortcuts-main"]=69]="settings-shortcuts-main",e[e["settings-shortcuts-drawer"]=70]="settings-shortcuts-drawer",e[e["issues-pane-main"]=71]="issues-pane-main",e[e["issues-pane-drawer"]=72]="issues-pane-drawer",e[e["settings-keybinds-main"]=73]="settings-keybinds-main",e[e["settings-keybinds-drawer"]=74]="settings-keybinds-drawer",e[e["cssoverview-main"]=75]="cssoverview-main",e[e["cssoverview-drawer"]=76]="cssoverview-drawer",e[e["chrome_recorder-main"]=77]="chrome_recorder-main",e[e["chrome_recorder-drawer"]=78]="chrome_recorder-drawer",e[e["trust_tokens-main"]=79]="trust_tokens-main",e[e["trust_tokens-drawer"]=80]="trust_tokens-drawer",e[e["reporting_api-main"]=81]="reporting_api-main",e[e["reporting_api-drawer"]=82]="reporting_api-drawer",e[e["interest_groups-main"]=83]="interest_groups-main",e[e["interest_groups-drawer"]=84]="interest_groups-drawer",e[e["back_forward_cache-main"]=85]="back_forward_cache-main",e[e["back_forward_cache-drawer"]=86]="back_forward_cache-drawer",e[e["service_worker_cache-main"]=87]="service_worker_cache-main",e[e["service_worker_cache-drawer"]=88]="service_worker_cache-drawer",e[e["background_service_backgroundFetch-main"]=89]="background_service_backgroundFetch-main",e[e["background_service_backgroundFetch-drawer"]=90]="background_service_backgroundFetch-drawer",e[e["background_service_backgroundSync-main"]=91]="background_service_backgroundSync-main",e[e["background_service_backgroundSync-drawer"]=92]="background_service_backgroundSync-drawer",e[e["background_service_pushMessaging-main"]=93]="background_service_pushMessaging-main",e[e["background_service_pushMessaging-drawer"]=94]="background_service_pushMessaging-drawer",e[e["background_service_notifications-main"]=95]="background_service_notifications-main",e[e["background_service_notifications-drawer"]=96]="background_service_notifications-drawer",e[e["background_service_paymentHandler-main"]=97]="background_service_paymentHandler-main",e[e["background_service_paymentHandler-drawer"]=98]="background_service_paymentHandler-drawer",e[e["background_service_periodicBackgroundSync-main"]=99]="background_service_periodicBackgroundSync-main",e[e["background_service_periodicBackgroundSync-drawer"]=100]="background_service_periodicBackgroundSync-drawer",e[e["service_workers-main"]=101]="service_workers-main",e[e["service_workers-drawer"]=102]="service_workers-drawer",e[e["app_manifest-main"]=103]="app_manifest-main",e[e["app_manifest-drawer"]=104]="app_manifest-drawer",e[e["storage-main"]=105]="storage-main",e[e["storage-drawer"]=106]="storage-drawer",e[e["cookies-main"]=107]="cookies-main",e[e["cookies-drawer"]=108]="cookies-drawer",e[e["frame_details-main"]=109]="frame_details-main",e[e["frame_details-drawer"]=110]="frame_details-drawer",e[e["frame_resource-main"]=111]="frame_resource-main",e[e["frame_resource-drawer"]=112]="frame_resource-drawer",e[e["frame_window-main"]=113]="frame_window-main",e[e["frame_window-drawer"]=114]="frame_window-drawer",e[e["frame_worker-main"]=115]="frame_worker-main",e[e["frame_worker-drawer"]=116]="frame_worker-drawer",e[e["dom_storage-main"]=117]="dom_storage-main",e[e["dom_storage-drawer"]=118]="dom_storage-drawer",e[e["indexed_db-main"]=119]="indexed_db-main",e[e["indexed_db-drawer"]=120]="indexed_db-drawer",e[e["web_sql-main"]=121]="web_sql-main",e[e["web_sql-drawer"]=122]="web_sql-drawer",e[e["performance_insights-main"]=123]="performance_insights-main",e[e["performance_insights-drawer"]=124]="performance_insights-drawer",e[e["preloading-main"]=125]="preloading-main",e[e["preloading-drawer"]=126]="preloading-drawer",e[e["bounce_tracking_mitigations-main"]=127]="bounce_tracking_mitigations-main",e[e["bounce_tracking_mitigations-drawer"]=128]="bounce_tracking_mitigations-drawer",e[e["developer-resources-main"]=129]="developer-resources-main",e[e["developer-resources-drawer"]=130]="developer-resources-drawer",e[e["autofill-view-main"]=131]="autofill-view-main",e[e["autofill-view-drawer"]=132]="autofill-view-drawer",e[e.MAX_VALUE=133]="MAX_VALUE"}(ee||(ee={})),function(e){e[e.OtherSidebarPane=0]="OtherSidebarPane",e[e.styles=1]="styles",e[e.computed=2]="computed",e[e["elements.layout"]=3]="elements.layout",e[e["elements.event-listeners"]=4]="elements.event-listeners",e[e["elements.dom-breakpoints"]=5]="elements.dom-breakpoints",e[e["elements.dom-properties"]=6]="elements.dom-properties",e[e["accessibility.view"]=7]="accessibility.view",e[e.MAX_VALUE=8]="MAX_VALUE"}(re||(re={})),function(e){e[e.Unknown=0]="Unknown",e[e["text/css"]=2]="text/css",e[e["text/html"]=3]="text/html",e[e["application/xml"]=4]="application/xml",e[e["application/wasm"]=5]="application/wasm",e[e["application/manifest+json"]=6]="application/manifest+json",e[e["application/x-aspx"]=7]="application/x-aspx",e[e["application/jsp"]=8]="application/jsp",e[e["text/x-c++src"]=9]="text/x-c++src",e[e["text/x-coffeescript"]=10]="text/x-coffeescript",e[e["application/vnd.dart"]=11]="application/vnd.dart",e[e["text/typescript"]=12]="text/typescript",e[e["text/typescript-jsx"]=13]="text/typescript-jsx",e[e["application/json"]=14]="application/json",e[e["text/x-csharp"]=15]="text/x-csharp",e[e["text/x-java"]=16]="text/x-java",e[e["text/x-less"]=17]="text/x-less",e[e["application/x-httpd-php"]=18]="application/x-httpd-php",e[e["text/x-python"]=19]="text/x-python",e[e["text/x-sh"]=20]="text/x-sh",e[e["text/x-gss"]=21]="text/x-gss",e[e["text/x-sass"]=22]="text/x-sass",e[e["text/x-scss"]=23]="text/x-scss",e[e["text/markdown"]=24]="text/markdown",e[e["text/x-clojure"]=25]="text/x-clojure",e[e["text/jsx"]=26]="text/jsx",e[e["text/x-go"]=27]="text/x-go",e[e["text/x-kotlin"]=28]="text/x-kotlin",e[e["text/x-scala"]=29]="text/x-scala",e[e["text/x.svelte"]=30]="text/x.svelte",e[e["text/javascript+plain"]=31]="text/javascript+plain",e[e["text/javascript+minified"]=32]="text/javascript+minified",e[e["text/javascript+sourcemapped"]=33]="text/javascript+sourcemapped",e[e["text/x.angular"]=34]="text/x.angular",e[e["text/x.vue"]=35]="text/x.vue",e[e["text/javascript+snippet"]=36]="text/javascript+snippet",e[e["text/javascript+eval"]=37]="text/javascript+eval",e[e.MAX_VALUE=38]="MAX_VALUE"}(te||(te={})),function(e){e[e.devToolsDefault=0]="devToolsDefault",e[e.vsCode=1]="vsCode",e[e.MAX_VALUE=2]="MAX_VALUE"}(ne||(ne={})),function(e){e[e.OtherShortcut=0]="OtherShortcut",e[e["quick-open.show-command-menu"]=1]="quick-open.show-command-menu",e[e["console.clear"]=2]="console.clear",e[e["console.toggle"]=3]="console.toggle",e[e["debugger.step"]=4]="debugger.step",e[e["debugger.step-into"]=5]="debugger.step-into",e[e["debugger.step-out"]=6]="debugger.step-out",e[e["debugger.step-over"]=7]="debugger.step-over",e[e["debugger.toggle-breakpoint"]=8]="debugger.toggle-breakpoint",e[e["debugger.toggle-breakpoint-enabled"]=9]="debugger.toggle-breakpoint-enabled",e[e["debugger.toggle-pause"]=10]="debugger.toggle-pause",e[e["elements.edit-as-html"]=11]="elements.edit-as-html",e[e["elements.hide-element"]=12]="elements.hide-element",e[e["elements.redo"]=13]="elements.redo",e[e["elements.toggle-element-search"]=14]="elements.toggle-element-search",e[e["elements.undo"]=15]="elements.undo",e[e["main.search-in-panel.find"]=16]="main.search-in-panel.find",e[e["main.toggle-drawer"]=17]="main.toggle-drawer",e[e["network.hide-request-details"]=18]="network.hide-request-details",e[e["network.search"]=19]="network.search",e[e["network.toggle-recording"]=20]="network.toggle-recording",e[e["quick-open.show"]=21]="quick-open.show",e[e["settings.show"]=22]="settings.show",e[e["sources.search"]=23]="sources.search",e[e["background-service.toggle-recording"]=24]="background-service.toggle-recording",e[e["components.collect-garbage"]=25]="components.collect-garbage",e[e["console.clear.history"]=26]="console.clear.history",e[e["console.create-pin"]=27]="console.create-pin",e[e["coverage.start-with-reload"]=28]="coverage.start-with-reload",e[e["coverage.toggle-recording"]=29]="coverage.toggle-recording",e[e["debugger.breakpoint-input-window"]=30]="debugger.breakpoint-input-window",e[e["debugger.evaluate-selection"]=31]="debugger.evaluate-selection",e[e["debugger.next-call-frame"]=32]="debugger.next-call-frame",e[e["debugger.previous-call-frame"]=33]="debugger.previous-call-frame",e[e["debugger.run-snippet"]=34]="debugger.run-snippet",e[e["debugger.toggle-breakpoints-active"]=35]="debugger.toggle-breakpoints-active",e[e["elements.capture-area-screenshot"]=36]="elements.capture-area-screenshot",e[e["emulation.capture-full-height-screenshot"]=37]="emulation.capture-full-height-screenshot",e[e["emulation.capture-node-screenshot"]=38]="emulation.capture-node-screenshot",e[e["emulation.capture-screenshot"]=39]="emulation.capture-screenshot",e[e["emulation.show-sensors"]=40]="emulation.show-sensors",e[e["emulation.toggle-device-mode"]=41]="emulation.toggle-device-mode",e[e["help.release-notes"]=42]="help.release-notes",e[e["help.report-issue"]=43]="help.report-issue",e[e["input.start-replaying"]=44]="input.start-replaying",e[e["input.toggle-pause"]=45]="input.toggle-pause",e[e["input.toggle-recording"]=46]="input.toggle-recording",e[e["inspector-main.focus-debuggee"]=47]="inspector-main.focus-debuggee",e[e["inspector-main.hard-reload"]=48]="inspector-main.hard-reload",e[e["inspector-main.reload"]=49]="inspector-main.reload",e[e["live-heap-profile.start-with-reload"]=50]="live-heap-profile.start-with-reload",e[e["live-heap-profile.toggle-recording"]=51]="live-heap-profile.toggle-recording",e[e["main.debug-reload"]=52]="main.debug-reload",e[e["main.next-tab"]=53]="main.next-tab",e[e["main.previous-tab"]=54]="main.previous-tab",e[e["main.search-in-panel.cancel"]=55]="main.search-in-panel.cancel",e[e["main.search-in-panel.find-next"]=56]="main.search-in-panel.find-next",e[e["main.search-in-panel.find-previous"]=57]="main.search-in-panel.find-previous",e[e["main.toggle-dock"]=58]="main.toggle-dock",e[e["main.zoom-in"]=59]="main.zoom-in",e[e["main.zoom-out"]=60]="main.zoom-out",e[e["main.zoom-reset"]=61]="main.zoom-reset",e[e["network-conditions.network-low-end-mobile"]=62]="network-conditions.network-low-end-mobile",e[e["network-conditions.network-mid-tier-mobile"]=63]="network-conditions.network-mid-tier-mobile",e[e["network-conditions.network-offline"]=64]="network-conditions.network-offline",e[e["network-conditions.network-online"]=65]="network-conditions.network-online",e[e["profiler.heap-toggle-recording"]=66]="profiler.heap-toggle-recording",e[e["profiler.js-toggle-recording"]=67]="profiler.js-toggle-recording",e[e["resources.clear"]=68]="resources.clear",e[e["settings.documentation"]=69]="settings.documentation",e[e["settings.shortcuts"]=70]="settings.shortcuts",e[e["sources.add-folder-to-workspace"]=71]="sources.add-folder-to-workspace",e[e["sources.add-to-watch"]=72]="sources.add-to-watch",e[e["sources.close-all"]=73]="sources.close-all",e[e["sources.close-editor-tab"]=74]="sources.close-editor-tab",e[e["sources.create-snippet"]=75]="sources.create-snippet",e[e["sources.go-to-line"]=76]="sources.go-to-line",e[e["sources.go-to-member"]=77]="sources.go-to-member",e[e["sources.jump-to-next-location"]=78]="sources.jump-to-next-location",e[e["sources.jump-to-previous-location"]=79]="sources.jump-to-previous-location",e[e["sources.rename"]=80]="sources.rename",e[e["sources.save"]=81]="sources.save",e[e["sources.save-all"]=82]="sources.save-all",e[e["sources.switch-file"]=83]="sources.switch-file",e[e["timeline.jump-to-next-frame"]=84]="timeline.jump-to-next-frame",e[e["timeline.jump-to-previous-frame"]=85]="timeline.jump-to-previous-frame",e[e["timeline.load-from-file"]=86]="timeline.load-from-file",e[e["timeline.next-recording"]=87]="timeline.next-recording",e[e["timeline.previous-recording"]=88]="timeline.previous-recording",e[e["timeline.record-reload"]=89]="timeline.record-reload",e[e["timeline.save-to-file"]=90]="timeline.save-to-file",e[e["timeline.show-history"]=91]="timeline.show-history",e[e["timeline.toggle-recording"]=92]="timeline.toggle-recording",e[e["sources.increment-css"]=93]="sources.increment-css",e[e["sources.increment-css-by-ten"]=94]="sources.increment-css-by-ten",e[e["sources.decrement-css"]=95]="sources.decrement-css",e[e["sources.decrement-css-by-ten"]=96]="sources.decrement-css-by-ten",e[e["layers.reset-view"]=97]="layers.reset-view",e[e["layers.pan-mode"]=98]="layers.pan-mode",e[e["layers.rotate-mode"]=99]="layers.rotate-mode",e[e["layers.zoom-in"]=100]="layers.zoom-in",e[e["layers.zoom-out"]=101]="layers.zoom-out",e[e["layers.up"]=102]="layers.up",e[e["layers.down"]=103]="layers.down",e[e["layers.left"]=104]="layers.left",e[e["layers.right"]=105]="layers.right",e[e["help.report-translation-issue"]=106]="help.report-translation-issue",e[e["rendering.toggle-prefers-color-scheme"]=107]="rendering.toggle-prefers-color-scheme",e[e["chrome-recorder.start-recording"]=108]="chrome-recorder.start-recording",e[e["chrome-recorder.replay-recording"]=109]="chrome-recorder.replay-recording",e[e["chrome-recorder.toggle-code-view"]=110]="chrome-recorder.toggle-code-view",e[e["chrome-recorder.copy-recording-or-step"]=111]="chrome-recorder.copy-recording-or-step",e[e["changes.revert"]=112]="changes.revert",e[e["changes.copy"]=113]="changes.copy",e[e["elements.new-style-rule"]=114]="elements.new-style-rule",e[e["elements.refresh-event-listeners"]=115]="elements.refresh-event-listeners",e[e["coverage.clear"]=116]="coverage.clear",e[e["coverage.export"]=117]="coverage.export",e[e["timeline.dim-third-parties"]=118]="timeline.dim-third-parties",e[e.MAX_VALUE=119]="MAX_VALUE"}(oe||(oe={})),function(e){e[e["capture-node-creation-stacks"]=1]="capture-node-creation-stacks",e[e["live-heap-profile"]=11]="live-heap-profile",e[e["protocol-monitor"]=13]="protocol-monitor",e[e["sampling-heap-profiler-timeline"]=17]="sampling-heap-profiler-timeline",e[e["show-option-tp-expose-internals-in-heap-snapshot"]=18]="show-option-tp-expose-internals-in-heap-snapshot",e[e["timeline-invalidation-tracking"]=26]="timeline-invalidation-tracking",e[e["timeline-show-all-events"]=27]="timeline-show-all-events",e[e["timeline-v8-runtime-call-stats"]=28]="timeline-v8-runtime-call-stats",e[e.apca=39]="apca",e[e["font-editor"]=41]="font-editor",e[e["full-accessibility-tree"]=42]="full-accessibility-tree",e[e["contrast-issues"]=44]="contrast-issues",e[e["experimental-cookie-features"]=45]="experimental-cookie-features",e[e["instrumentation-breakpoints"]=61]="instrumentation-breakpoints",e[e["authored-deployed-grouping"]=63]="authored-deployed-grouping",e[e["just-my-code"]=65]="just-my-code",e[e["highlight-errors-elements-panel"]=73]="highlight-errors-elements-panel",e[e["use-source-map-scopes"]=76]="use-source-map-scopes",e[e["network-panel-filter-bar-redesign"]=79]="network-panel-filter-bar-redesign",e[e["timeline-show-postmessage-events"]=86]="timeline-show-postmessage-events",e[e["timeline-enhanced-traces"]=90]="timeline-enhanced-traces",e[e["timeline-compiled-sources"]=91]="timeline-compiled-sources",e[e["timeline-debug-mode"]=93]="timeline-debug-mode",e[e["timeline-experimental-insights"]=102]="timeline-experimental-insights",e[e["timeline-dim-unrelated-events"]=103]="timeline-dim-unrelated-events",e[e["timeline-alternative-navigation"]=104]="timeline-alternative-navigation",e[e.MAX_VALUE=106]="MAX_VALUE"}(se||(se={})),function(e){e[e.CrossOriginEmbedderPolicy=0]="CrossOriginEmbedderPolicy",e[e.MixedContent=1]="MixedContent",e[e.SameSiteCookie=2]="SameSiteCookie",e[e.HeavyAd=3]="HeavyAd",e[e.ContentSecurityPolicy=4]="ContentSecurityPolicy",e[e.Other=5]="Other",e[e.Generic=6]="Generic",e[e.ThirdPartyPhaseoutCookie=7]="ThirdPartyPhaseoutCookie",e[e.GenericCookie=8]="GenericCookie",e[e.MAX_VALUE=9]="MAX_VALUE"}(ie||(ie={})),function(e){e[e.CrossOriginEmbedderPolicyRequest=0]="CrossOriginEmbedderPolicyRequest",e[e.CrossOriginEmbedderPolicyElement=1]="CrossOriginEmbedderPolicyElement",e[e.MixedContentRequest=2]="MixedContentRequest",e[e.SameSiteCookieCookie=3]="SameSiteCookieCookie",e[e.SameSiteCookieRequest=4]="SameSiteCookieRequest",e[e.HeavyAdElement=5]="HeavyAdElement",e[e.ContentSecurityPolicyDirective=6]="ContentSecurityPolicyDirective",e[e.ContentSecurityPolicyElement=7]="ContentSecurityPolicyElement",e[e.MAX_VALUE=13]="MAX_VALUE"}(ae||(ae={})),function(e){e[e.MixedContentIssue=0]="MixedContentIssue",e[e["ContentSecurityPolicyIssue::kInlineViolation"]=1]="ContentSecurityPolicyIssue::kInlineViolation",e[e["ContentSecurityPolicyIssue::kEvalViolation"]=2]="ContentSecurityPolicyIssue::kEvalViolation",e[e["ContentSecurityPolicyIssue::kURLViolation"]=3]="ContentSecurityPolicyIssue::kURLViolation",e[e["ContentSecurityPolicyIssue::kTrustedTypesSinkViolation"]=4]="ContentSecurityPolicyIssue::kTrustedTypesSinkViolation",e[e["ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation"]=5]="ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation",e[e["HeavyAdIssue::NetworkTotalLimit"]=6]="HeavyAdIssue::NetworkTotalLimit",e[e["HeavyAdIssue::CpuTotalLimit"]=7]="HeavyAdIssue::CpuTotalLimit",e[e["HeavyAdIssue::CpuPeakLimit"]=8]="HeavyAdIssue::CpuPeakLimit",e[e["CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader"]=9]="CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader",e[e["CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage"]=10]="CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin"]=11]="CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep"]=12]="CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameSite"]=13]="CrossOriginEmbedderPolicyIssue::CorpNotSameSite",e[e["CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie"]=14]="CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie",e[e["CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie"]=15]="CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie",e[e["CookieIssue::WarnSameSiteNoneInsecure::ReadCookie"]=16]="CookieIssue::WarnSameSiteNoneInsecure::ReadCookie",e[e["CookieIssue::WarnSameSiteNoneInsecure::SetCookie"]=17]="CookieIssue::WarnSameSiteNoneInsecure::SetCookie",e[e["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure"]=18]="CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure",e[e["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure"]=19]="CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure",e[e["CookieIssue::WarnCrossDowngrade::ReadCookie::Secure"]=20]="CookieIssue::WarnCrossDowngrade::ReadCookie::Secure",e[e["CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure"]=21]="CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure",e[e["CookieIssue::WarnCrossDowngrade::SetCookie::Secure"]=22]="CookieIssue::WarnCrossDowngrade::SetCookie::Secure",e[e["CookieIssue::WarnCrossDowngrade::SetCookie::Insecure"]=23]="CookieIssue::WarnCrossDowngrade::SetCookie::Insecure",e[e["CookieIssue::ExcludeNavigationContextDowngrade::Secure"]=24]="CookieIssue::ExcludeNavigationContextDowngrade::Secure",e[e["CookieIssue::ExcludeNavigationContextDowngrade::Insecure"]=25]="CookieIssue::ExcludeNavigationContextDowngrade::Insecure",e[e["CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure"]=26]="CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure",e[e["CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure"]=27]="CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure",e[e["CookieIssue::ExcludeContextDowngrade::SetCookie::Secure"]=28]="CookieIssue::ExcludeContextDowngrade::SetCookie::Secure",e[e["CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure"]=29]="CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure",e[e["CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie"]=30]="CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie",e[e["CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie"]=31]="CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie"]=32]="CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie"]=33]="CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie"]=34]="CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie"]=35]="CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie",e[e["SharedArrayBufferIssue::TransferIssue"]=36]="SharedArrayBufferIssue::TransferIssue",e[e["SharedArrayBufferIssue::CreationIssue"]=37]="SharedArrayBufferIssue::CreationIssue",e[e.LowTextContrastIssue=41]="LowTextContrastIssue",e[e["CorsIssue::InsecurePrivateNetwork"]=42]="CorsIssue::InsecurePrivateNetwork",e[e["CorsIssue::InvalidHeaders"]=44]="CorsIssue::InvalidHeaders",e[e["CorsIssue::WildcardOriginWithCredentials"]=45]="CorsIssue::WildcardOriginWithCredentials",e[e["CorsIssue::PreflightResponseInvalid"]=46]="CorsIssue::PreflightResponseInvalid",e[e["CorsIssue::OriginMismatch"]=47]="CorsIssue::OriginMismatch",e[e["CorsIssue::AllowCredentialsRequired"]=48]="CorsIssue::AllowCredentialsRequired",e[e["CorsIssue::MethodDisallowedByPreflightResponse"]=49]="CorsIssue::MethodDisallowedByPreflightResponse",e[e["CorsIssue::HeaderDisallowedByPreflightResponse"]=50]="CorsIssue::HeaderDisallowedByPreflightResponse",e[e["CorsIssue::RedirectContainsCredentials"]=51]="CorsIssue::RedirectContainsCredentials",e[e["CorsIssue::DisallowedByMode"]=52]="CorsIssue::DisallowedByMode",e[e["CorsIssue::CorsDisabledScheme"]=53]="CorsIssue::CorsDisabledScheme",e[e["CorsIssue::PreflightMissingAllowExternal"]=54]="CorsIssue::PreflightMissingAllowExternal",e[e["CorsIssue::PreflightInvalidAllowExternal"]=55]="CorsIssue::PreflightInvalidAllowExternal",e[e["CorsIssue::NoCorsRedirectModeNotFollow"]=57]="CorsIssue::NoCorsRedirectModeNotFollow",e[e["QuirksModeIssue::QuirksMode"]=58]="QuirksModeIssue::QuirksMode",e[e["QuirksModeIssue::LimitedQuirksMode"]=59]="QuirksModeIssue::LimitedQuirksMode",e[e.DeprecationIssue=60]="DeprecationIssue",e[e["ClientHintIssue::MetaTagAllowListInvalidOrigin"]=61]="ClientHintIssue::MetaTagAllowListInvalidOrigin",e[e["ClientHintIssue::MetaTagModifiedHTML"]=62]="ClientHintIssue::MetaTagModifiedHTML",e[e["CorsIssue::PreflightAllowPrivateNetworkError"]=63]="CorsIssue::PreflightAllowPrivateNetworkError",e[e["GenericIssue::CrossOriginPortalPostMessageError"]=64]="GenericIssue::CrossOriginPortalPostMessageError",e[e["GenericIssue::FormLabelForNameError"]=65]="GenericIssue::FormLabelForNameError",e[e["GenericIssue::FormDuplicateIdForInputError"]=66]="GenericIssue::FormDuplicateIdForInputError",e[e["GenericIssue::FormInputWithNoLabelError"]=67]="GenericIssue::FormInputWithNoLabelError",e[e["GenericIssue::FormAutocompleteAttributeEmptyError"]=68]="GenericIssue::FormAutocompleteAttributeEmptyError",e[e["GenericIssue::FormEmptyIdAndNameAttributesForInputError"]=69]="GenericIssue::FormEmptyIdAndNameAttributesForInputError",e[e["GenericIssue::FormAriaLabelledByToNonExistingId"]=70]="GenericIssue::FormAriaLabelledByToNonExistingId",e[e["GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError"]=71]="GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError",e[e["GenericIssue::FormLabelHasNeitherForNorNestedInput"]=72]="GenericIssue::FormLabelHasNeitherForNorNestedInput",e[e["GenericIssue::FormLabelForMatchesNonExistingIdError"]=73]="GenericIssue::FormLabelForMatchesNonExistingIdError",e[e["GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError"]=74]="GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError",e[e["GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError"]=75]="GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError",e[e["StylesheetLoadingIssue::LateImportRule"]=76]="StylesheetLoadingIssue::LateImportRule",e[e["StylesheetLoadingIssue::RequestFailed"]=77]="StylesheetLoadingIssue::RequestFailed",e[e["CorsIssue::PreflightMissingPrivateNetworkAccessId"]=78]="CorsIssue::PreflightMissingPrivateNetworkAccessId",e[e["CorsIssue::PreflightMissingPrivateNetworkAccessName"]=79]="CorsIssue::PreflightMissingPrivateNetworkAccessName",e[e["CorsIssue::PrivateNetworkAccessPermissionUnavailable"]=80]="CorsIssue::PrivateNetworkAccessPermissionUnavailable",e[e["CorsIssue::PrivateNetworkAccessPermissionDenied"]=81]="CorsIssue::PrivateNetworkAccessPermissionDenied",e[e["CookieIssue::WarnThirdPartyPhaseout::ReadCookie"]=82]="CookieIssue::WarnThirdPartyPhaseout::ReadCookie",e[e["CookieIssue::WarnThirdPartyPhaseout::SetCookie"]=83]="CookieIssue::WarnThirdPartyPhaseout::SetCookie",e[e["CookieIssue::ExcludeThirdPartyPhaseout::ReadCookie"]=84]="CookieIssue::ExcludeThirdPartyPhaseout::ReadCookie",e[e["CookieIssue::ExcludeThirdPartyPhaseout::SetCookie"]=85]="CookieIssue::ExcludeThirdPartyPhaseout::SetCookie",e[e["SelectElementAccessibilityIssue::DisallowedSelectChild"]=86]="SelectElementAccessibilityIssue::DisallowedSelectChild",e[e["SelectElementAccessibilityIssue::DisallowedOptGroupChild"]=87]="SelectElementAccessibilityIssue::DisallowedOptGroupChild",e[e["SelectElementAccessibilityIssue::NonPhrasingContentOptionChild"]=88]="SelectElementAccessibilityIssue::NonPhrasingContentOptionChild",e[e["SelectElementAccessibilityIssue::InteractiveContentOptionChild"]=89]="SelectElementAccessibilityIssue::InteractiveContentOptionChild",e[e["SelectElementAccessibilityIssue::InteractiveContentLegendChild"]=90]="SelectElementAccessibilityIssue::InteractiveContentLegendChild",e[e["SRIMessageSignatureIssue::MissingSignatureHeader"]=91]="SRIMessageSignatureIssue::MissingSignatureHeader",e[e["SRIMessageSignatureIssue::MissingSignatureInputHeader"]=92]="SRIMessageSignatureIssue::MissingSignatureInputHeader",e[e["SRIMessageSignatureIssue::InvalidSignatureHeader"]=93]="SRIMessageSignatureIssue::InvalidSignatureHeader",e[e["SRIMessageSignatureIssue::InvalidSignatureInputHeader"]=94]="SRIMessageSignatureIssue::InvalidSignatureInputHeader",e[e["SRIMessageSignatureIssue::SignatureHeaderValueIsNotByteSequence"]=95]="SRIMessageSignatureIssue::SignatureHeaderValueIsNotByteSequence",e[e["SRIMessageSignatureIssue::SignatureHeaderValueIsParameterized"]=96]="SRIMessageSignatureIssue::SignatureHeaderValueIsParameterized",e[e["SRIMessageSignatureIssue::SignatureHeaderValueIsIncorrectLength"]=97]="SRIMessageSignatureIssue::SignatureHeaderValueIsIncorrectLength",e[e["SRIMessageSignatureIssue::SignatureInputHeaderMissingLabel"]=98]="SRIMessageSignatureIssue::SignatureInputHeaderMissingLabel",e[e["SRIMessageSignatureIssue::SignatureInputHeaderValueNotInnerList"]=99]="SRIMessageSignatureIssue::SignatureInputHeaderValueNotInnerList",e[e["SRIMessageSignatureIssue::SignatureInputHeaderValueMissingComponents"]=100]="SRIMessageSignatureIssue::SignatureInputHeaderValueMissingComponents",e[e["SRIMessageSignatureIssue::SignatureInputHeaderInvalidComponentType"]=101]="SRIMessageSignatureIssue::SignatureInputHeaderInvalidComponentType",e[e["SRIMessageSignatureIssue::SignatureInputHeaderInvalidComponentName"]=102]="SRIMessageSignatureIssue::SignatureInputHeaderInvalidComponentName",e[e["SRIMessageSignatureIssue::SignatureInputHeaderInvalidHeaderComponentParameter"]=103]="SRIMessageSignatureIssue::SignatureInputHeaderInvalidHeaderComponentParameter",e[e["SRIMessageSignatureIssue::SignatureInputHeaderInvalidDerivedComponentParameter"]=104]="SRIMessageSignatureIssue::SignatureInputHeaderInvalidDerivedComponentParameter",e[e["SRIMessageSignatureIssue::SignatureInputHeaderKeyIdLength"]=105]="SRIMessageSignatureIssue::SignatureInputHeaderKeyIdLength",e[e["SRIMessageSignatureIssue::SignatureInputHeaderInvalidParameter"]=106]="SRIMessageSignatureIssue::SignatureInputHeaderInvalidParameter",e[e["SRIMessageSignatureIssue::SignatureInputHeaderMissingRequiredParameters"]=107]="SRIMessageSignatureIssue::SignatureInputHeaderMissingRequiredParameters",e[e["SRIMessageSignatureIssue::ValidationFailedSignatureExpired"]=108]="SRIMessageSignatureIssue::ValidationFailedSignatureExpired",e[e["SRIMessageSignatureIssue::ValidationFailedInvalidLength"]=109]="SRIMessageSignatureIssue::ValidationFailedInvalidLength",e[e["SRIMessageSignatureIssue::ValidationFailedSignatureMismatch"]=110]="SRIMessageSignatureIssue::ValidationFailedSignatureMismatch",e[e["CorsIssue::LocalNetworkAccessPermissionDenied"]=111]="CorsIssue::LocalNetworkAccessPermissionDenied",e[e["SRIMessageSignatureIssue::ValidationFailedIntegrityMismatch"]=112]="SRIMessageSignatureIssue::ValidationFailedIntegrityMismatch",e[e.MAX_VALUE=113]="MAX_VALUE"}(de||(de={})),function(e){e[e.af=1]="af",e[e.am=2]="am",e[e.ar=3]="ar",e[e.as=4]="as",e[e.az=5]="az",e[e.be=6]="be",e[e.bg=7]="bg",e[e.bn=8]="bn",e[e.bs=9]="bs",e[e.ca=10]="ca",e[e.cs=11]="cs",e[e.cy=12]="cy",e[e.da=13]="da",e[e.de=14]="de",e[e.el=15]="el",e[e["en-GB"]=16]="en-GB",e[e["en-US"]=17]="en-US",e[e["es-419"]=18]="es-419",e[e.es=19]="es",e[e.et=20]="et",e[e.eu=21]="eu",e[e.fa=22]="fa",e[e.fi=23]="fi",e[e.fil=24]="fil",e[e["fr-CA"]=25]="fr-CA",e[e.fr=26]="fr",e[e.gl=27]="gl",e[e.gu=28]="gu",e[e.he=29]="he",e[e.hi=30]="hi",e[e.hr=31]="hr",e[e.hu=32]="hu",e[e.hy=33]="hy",e[e.id=34]="id",e[e.is=35]="is",e[e.it=36]="it",e[e.ja=37]="ja",e[e.ka=38]="ka",e[e.kk=39]="kk",e[e.km=40]="km",e[e.kn=41]="kn",e[e.ko=42]="ko",e[e.ky=43]="ky",e[e.lo=44]="lo",e[e.lt=45]="lt",e[e.lv=46]="lv",e[e.mk=47]="mk",e[e.ml=48]="ml",e[e.mn=49]="mn",e[e.mr=50]="mr",e[e.ms=51]="ms",e[e.my=52]="my",e[e.ne=53]="ne",e[e.nl=54]="nl",e[e.no=55]="no",e[e.or=56]="or",e[e.pa=57]="pa",e[e.pl=58]="pl",e[e["pt-PT"]=59]="pt-PT",e[e.pt=60]="pt",e[e.ro=61]="ro",e[e.ru=62]="ru",e[e.si=63]="si",e[e.sk=64]="sk",e[e.sl=65]="sl",e[e.sq=66]="sq",e[e["sr-Latn"]=67]="sr-Latn",e[e.sr=68]="sr",e[e.sv=69]="sv",e[e.sw=70]="sw",e[e.ta=71]="ta",e[e.te=72]="te",e[e.th=73]="th",e[e.tr=74]="tr",e[e.uk=75]="uk",e[e.ur=76]="ur",e[e.uz=77]="uz",e[e.vi=78]="vi",e[e.zh=79]="zh",e[e["zh-HK"]=80]="zh-HK",e[e["zh-TW"]=81]="zh-TW",e[e.zu=82]="zu",e[e.MAX_VALUE=83]="MAX_VALUE"}(ce||(ce={})),function(e){e[e.OtherSection=0]="OtherSection",e[e.Identity=1]="Identity",e[e.Presentation=2]="Presentation",e[e["Protocol Handlers"]=3]="Protocol Handlers",e[e.Icons=4]="Icons",e[e["Window Controls Overlay"]=5]="Window Controls Overlay",e[e.MAX_VALUE=6]="MAX_VALUE"}(le||(le={}));var ge=Object.freeze({__proto__:null,get Action(){return J},get DevtoolsExperiments(){return se},get ElementsSidebarTabCodes(){return re},get IssueCreated(){return de},get IssueExpanded(){return ie},get IssueResourceOpened(){return ae},get KeybindSetSettings(){return ne},get KeyboardShortcutAction(){return oe},get Language(){return ce},get ManifestSectionCodes(){return le},get MediaTypes(){return te},get PanelCodes(){return Z},get PanelWithLocation(){return ee},UserMetrics:me});const pe=new me,he=K();export{U as AidaClient,F as InspectorFrontendHost,i as InspectorFrontendHostAPI,X as Platform,ue as RNPerfMetrics,v as ResourceLoader,ge as UserMetrics,he as rnPerfMetrics,pe as userMetrics}; +import*as e from"../common/common.js";import*as r from"../root/root.js";import*as t from"../i18n/i18n.js";import*as n from"../platform/platform.js";var o;!function(e){e.AppendedToURL="appendedToURL",e.CanceledSaveURL="canceledSaveURL",e.ColorThemeChanged="colorThemeChanged",e.ContextMenuCleared="contextMenuCleared",e.ContextMenuItemSelected="contextMenuItemSelected",e.DeviceCountUpdated="deviceCountUpdated",e.DevicesDiscoveryConfigChanged="devicesDiscoveryConfigChanged",e.DevicesPortForwardingStatusChanged="devicesPortForwardingStatusChanged",e.DevicesUpdated="devicesUpdated",e.DispatchMessage="dispatchMessage",e.DispatchMessageChunk="dispatchMessageChunk",e.EnterInspectElementMode="enterInspectElementMode",e.EyeDropperPickedColor="eyeDropperPickedColor",e.FileSystemsLoaded="fileSystemsLoaded",e.FileSystemRemoved="fileSystemRemoved",e.FileSystemAdded="fileSystemAdded",e.FileSystemFilesChangedAddedRemoved="FileSystemFilesChangedAddedRemoved",e.IndexingTotalWorkCalculated="indexingTotalWorkCalculated",e.IndexingWorked="indexingWorked",e.IndexingDone="indexingDone",e.KeyEventUnhandled="keyEventUnhandled",e.ReloadInspectedPage="reloadInspectedPage",e.RevealSourceLine="revealSourceLine",e.SavedURL="savedURL",e.SearchCompleted="searchCompleted",e.SetInspectedTabId="setInspectedTabId",e.SetUseSoftMenu="setUseSoftMenu",e.ShowPanel="showPanel"}(o||(o={}));const s=[[o.AppendedToURL,"appendedToURL",["url"]],[o.CanceledSaveURL,"canceledSaveURL",["url"]],[o.ColorThemeChanged,"colorThemeChanged",[]],[o.ContextMenuCleared,"contextMenuCleared",[]],[o.ContextMenuItemSelected,"contextMenuItemSelected",["id"]],[o.DeviceCountUpdated,"deviceCountUpdated",["count"]],[o.DevicesDiscoveryConfigChanged,"devicesDiscoveryConfigChanged",["config"]],[o.DevicesPortForwardingStatusChanged,"devicesPortForwardingStatusChanged",["status"]],[o.DevicesUpdated,"devicesUpdated",["devices"]],[o.DispatchMessage,"dispatchMessage",["messageObject"]],[o.DispatchMessageChunk,"dispatchMessageChunk",["messageChunk","messageSize"]],[o.EnterInspectElementMode,"enterInspectElementMode",[]],[o.EyeDropperPickedColor,"eyeDropperPickedColor",["color"]],[o.FileSystemsLoaded,"fileSystemsLoaded",["fileSystems"]],[o.FileSystemRemoved,"fileSystemRemoved",["fileSystemPath"]],[o.FileSystemAdded,"fileSystemAdded",["errorMessage","fileSystem"]],[o.FileSystemFilesChangedAddedRemoved,"fileSystemFilesChangedAddedRemoved",["changed","added","removed"]],[o.IndexingTotalWorkCalculated,"indexingTotalWorkCalculated",["requestId","fileSystemPath","totalWork"]],[o.IndexingWorked,"indexingWorked",["requestId","fileSystemPath","worked"]],[o.IndexingDone,"indexingDone",["requestId","fileSystemPath"]],[o.KeyEventUnhandled,"keyEventUnhandled",["event"]],[o.ReloadInspectedPage,"reloadInspectedPage",["hard"]],[o.RevealSourceLine,"revealSourceLine",["url","lineNumber","columnNumber"]],[o.SavedURL,"savedURL",["url","fileSystemPath"]],[o.SearchCompleted,"searchCompleted",["requestId","fileSystemPath","files"]],[o.SetInspectedTabId,"setInspectedTabId",["tabId"]],[o.SetUseSoftMenu,"setUseSoftMenu",["useSoftMenu"]],[o.ShowPanel,"showPanel",["panelName"]]];var i=Object.freeze({__proto__:null,EventDescriptors:s,get Events(){return o}});const a={systemError:"System error",connectionError:"Connection error",certificateError:"Certificate error",httpError:"HTTP error",cacheError:"Cache error",signedExchangeError:"Signed Exchange error",ftpError:"FTP error",certificateManagerError:"Certificate manager error",dnsResolverError:"DNS resolver error",unknownError:"Unknown error",httpErrorStatusCodeSS:"HTTP error: status code {PH1}, {PH2}",invalidUrl:"Invalid URL",decodingDataUrlFailed:"Decoding Data URL failed"},d=t.i18n.registerUIStrings("core/host/ResourceLoader.ts",a),c=t.i18n.getLocalizedString.bind(void 0,d);let l=0;const u={},m=function(e){return u[++l]=e,l},g=function(e){u[e].close(),delete u[e]},p=function(e,r){u[e].write(r)};function h(e,r,t){if(void 0===e||void 0===t)return null;if(0!==e){if(function(e){return e<=-300&&e>-400}(e))return c(a.httpErrorStatusCodeSS,{PH1:String(r),PH2:t});const n=function(e){return c(e>-100?a.systemError:e>-200?a.connectionError:e>-300?a.certificateError:e>-400?a.httpError:e>-500?a.cacheError:e>-600?a.signedExchangeError:e>-700?a.ftpError:e>-800?a.certificateManagerError:e>-900?a.dnsResolverError:a.unknownError)}(e);return`${n}: ${t}`}return null}const S=function(r,t,n,o,s){const i=m(n);if(new e.ParsedURL.ParsedURL(r).isDataURL())return void(e=>new Promise(((r,t)=>{const n=new XMLHttpRequest;n.withCredentials=!1,n.open("GET",e,!0),n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE){if(200!==n.status)return n.onreadystatechange=null,void t(new Error(String(n.status)));n.onreadystatechange=null,r(n.responseText)}},n.send(null)})))(r).then((function(e){p(i,e),l({statusCode:200})})).catch((function(e){l({statusCode:404,messageOverride:c(a.decodingDataUrlFailed)})}));if(!s&&function(e){try{const r=new URL(e);return"file:"===r.protocol&&""!==r.host}catch{return!1}}(r))return void(o&&o(!1,{},{statusCode:400,netError:-20,netErrorName:"net::BLOCKED_BY_CLIENT",message:"Loading from a remote file path is prohibited for security reasons."}));const d=[];if(t)for(const e in t)d.push(e+": "+t[e]);function l(e){if(o){const{success:r,description:t}=function(e){const{statusCode:r,netError:t,netErrorName:n,urlValid:o,messageOverride:s}=e;let i="";const d=r>=200&&r<300;if("string"==typeof s)i=s;else if(!d)if(void 0===t)i=c(!1===o?a.invalidUrl:a.unknownError);else{const e=h(t,r,n);e&&(i=e)}return console.assert(d===(0===i.length)),{success:d,description:{statusCode:r,netError:t,netErrorName:n,urlValid:o,message:i}}}(e);o(r,e.headers||{},t)}g(i)}f.loadNetworkResource(r,d.join("\r\n"),i,l)};var v=Object.freeze({__proto__:null,ResourceLoader:{},bindOutputStream:m,discardOutputStream:g,load:function(r,t,n,o){const s=new e.StringOutputStream.StringOutputStream;S(r,t,s,(function(e,r,t){n(e,r,s.data(),t)}),o)},loadAsStream:S,netErrorToMessage:h,streamWrite:p});const C={devtoolsS:"DevTools - {PH1}"},I=t.i18n.registerUIStrings("core/host/InspectorFrontendHost.ts",C),w=t.i18n.getLocalizedString.bind(void 0,I),k="/overrides";class E{#e=new Map;events;#r=null;recordedCountHistograms=[];recordedEnumeratedHistograms=[];recordedPerformanceHistograms=[];constructor(){function e(e){!("mac"===this.platform()?e.metaKey:e.ctrlKey)||"+"!==e.key&&"-"!==e.key||e.stopPropagation()}"undefined"!=typeof document&&document.addEventListener("keydown",(r=>{e.call(this,r)}),!0)}platform(){const e=navigator.userAgent;return e.includes("Windows NT")?"windows":e.includes("Mac OS X")?"mac":"linux"}loadCompleted(){}bringToFront(){}closeWindow(){}setIsDocked(e,r){window.setTimeout(r,0)}showSurvey(e,r){window.setTimeout((()=>r({surveyShown:!1})),0)}canShowSurvey(e,r){window.setTimeout((()=>r({canShowSurvey:!1})),0)}setInspectedPageBounds(e){}inspectElementCompleted(){}setInjectedScriptForOrigin(e,r){}inspectedURLChanged(e){document.title=w(C.devtoolsS,{PH1:e.replace(/^https?:\/\//,"")})}copyText(e){null!=e&&navigator.clipboard.writeText(e)}openInNewTab(r){e.ParsedURL.schemeIs(r,"javascript:")||window.open(r,"_blank")}openSearchResultsInNewTab(r){e.Console.Console.instance().error("Search is not enabled in hosted mode. Please inspect using chrome://inspect")}showItemInFolder(r){e.Console.Console.instance().error("Show item in folder is not enabled in hosted mode. Please inspect using chrome://inspect")}save(e,r,t,n){let s=this.#e.get(e);s||(s=[],this.#e.set(e,s)),s.push(r),this.events.dispatchEventToListeners(o.SavedURL,{url:e,fileSystemPath:e})}append(e,r){const t=this.#e.get(e);t&&(t.push(r),this.events.dispatchEventToListeners(o.AppendedToURL,e))}close(e){const r=this.#e.get(e)||[];this.#e.delete(e);let t="";if(e)try{const r=n.StringUtilities.trimURL(e);t=n.StringUtilities.removeURLFragment(r)}catch(r){t=e}const o=document.createElement("a");o.download=t;const s=new Blob([r.join("")],{type:"text/plain"}),i=URL.createObjectURL(s);o.href=i,o.click(),URL.revokeObjectURL(i)}sendMessageToBackend(e){}recordCountHistogram(e,r,t,n,o){this.recordedCountHistograms.length>=100&&this.recordedCountHistograms.shift(),this.recordedCountHistograms.push({histogramName:e,sample:r,min:t,exclusiveMax:n,bucketSize:o})}recordEnumeratedHistogram(e,r,t){this.recordedEnumeratedHistograms.length>=100&&this.recordedEnumeratedHistograms.shift(),this.recordedEnumeratedHistograms.push({actionName:e,actionCode:r})}recordPerformanceHistogram(e,r){this.recordedPerformanceHistograms.length>=100&&this.recordedPerformanceHistograms.shift(),this.recordedPerformanceHistograms.push({histogramName:e,duration:r})}recordUserMetricsAction(e){}connectAutomaticFileSystem(e,r,t,n){queueMicrotask((()=>n({success:!1})))}disconnectAutomaticFileSystem(e){}requestFileSystems(){this.events.dispatchEventToListeners(o.FileSystemsLoaded,[])}addFileSystem(e){window.webkitRequestFileSystem(window.TEMPORARY,1048576,(e=>{this.#r=e;const r={fileSystemName:"sandboxedRequestedFileSystem",fileSystemPath:k,rootURL:"filesystem:devtools://devtools/isolated/",type:"overrides"};this.events.dispatchEventToListeners(o.FileSystemAdded,{fileSystem:r})}))}removeFileSystem(e){const r=e=>{e.forEach((e=>{e.isDirectory?e.removeRecursively((()=>{})):e.isFile&&e.remove((()=>{}))}))};this.#r&&this.#r.root.createReader().readEntries(r),this.#r=null,this.events.dispatchEventToListeners(o.FileSystemRemoved,k)}isolatedFileSystem(e,r){return this.#r}loadNetworkResource(e,r,t,n){fetch(e).then((async e=>{const r=await e.arrayBuffer();let t=r;if(function(e){const r=new Uint8Array(e);return!(!r||r.length<3)&&31===r[0]&&139===r[1]&&8===r[2]}(r)){const e=new DecompressionStream("gzip"),n=e.writable.getWriter();n.write(r),n.close(),t=e.readable}return await new Response(t).text()})).then((function(e){p(t,e),n({statusCode:200,headers:void 0,messageOverride:void 0,netError:void 0,netErrorName:void 0,urlValid:void 0})})).catch((function(){n({statusCode:404,headers:void 0,messageOverride:void 0,netError:void 0,netErrorName:void 0,urlValid:void 0})}))}registerPreference(e,r){}getPreferences(e){const r={};for(const e in window.localStorage)r[e]=window.localStorage[e];e(r)}getPreference(e,r){r(window.localStorage[e])}setPreference(e,r){window.localStorage[e]=r}removePreference(e){delete window.localStorage[e]}clearPreferences(){window.localStorage.clear()}getSyncInformation(e){if("getSyncInformationForTesting"in globalThis)return e(globalThis.getSyncInformationForTesting());e({isSyncActive:!1,arePreferencesSynced:!1})}getHostConfig(e){const r={devToolsVeLogging:{enabled:!0},thirdPartyCookieControls:{thirdPartyCookieMetadataEnabled:!0,thirdPartyCookieHeuristicsEnabled:!0,managedBlockThirdPartyCookies:"Unset"}};if("hostConfigForTesting"in globalThis){const{hostConfigForTesting:e}=globalThis;for(const t of Object.keys(e)){const n=t=>{"object"==typeof r[t]&&"object"==typeof e[t]?r[t]={...r[t],...e[t]}:r[t]=e[t]??r[t]};n(t)}}e(r)}upgradeDraggedFileSystemPermissions(e){}indexPath(e,r,t){}stopIndexing(e){}searchInPath(e,r,t){}zoomFactor(){return 1}zoomIn(){}zoomOut(){}resetZoom(){}setWhitelistedShortcuts(e){}setEyeDropperActive(e){}showCertificateViewer(e){}reattach(e){e()}readyForTest(){}connectionReady(){}setOpenNewWindowForPopups(e){}setDevicesDiscoveryConfig(e){}setDevicesUpdatesEnabled(e){}openRemotePage(e,r){}openNodeFrontend(){}showContextMenuAtPoint(e,r,t,n){throw new Error("Soft context menu should be used")}isHostedMode(){return!0}setAddExtensionCallback(e){}async initialTargetId(){return null}doAidaConversation(e,r,t){t({error:"Not implemented"})}registerAidaClientEvent(e,r){r({error:"Not implemented"})}recordImpression(e){}recordResize(e){}recordClick(e){}recordHover(e){}recordDrag(e){}recordChange(e){}recordKeyDown(e){}recordSettingAccess(e){}}let f=globalThis.InspectorFrontendHost;class y{constructor(){for(const e of s)this[e[1]]=this.dispatch.bind(this,e[0],e[2],e[3])}dispatch(e,r,t,...n){if(r.length<2){try{f.events.dispatchEventToListeners(e,n[0])}catch(e){console.error(e+" "+e.stack)}return}const o={};for(let e=0;e=0&&(o.options??={},o.options.temperature=i),s&&(o.options??={},o.options.model_id=s),o}static async checkAccessPreconditions(){if(!navigator.onLine)return"no-internet";const e=await new Promise((e=>f.getSyncInformation((r=>e(r)))));return e.accountEmail?e.isSyncPaused?"sync-is-paused":"available":"no-account-email"}async*fetch(e,r){if(!f.doAidaConversation)throw new Error("doAidaConversation is not available");const t=(()=>{let{promise:e,resolve:t,reject:n}=Promise.withResolvers();return r?.signal?.addEventListener("abort",(()=>{n(new O)}),{once:!0}),{write:async r=>{t(r),({promise:e,resolve:t,reject:n}=Promise.withResolvers())},close:async()=>{t(null)},read:()=>e,fail:e=>n(e)}})(),n=m(t);let o;f.doAidaConversation(JSON.stringify(e),n,(e=>{403===e.statusCode?t.fail(new Error("Server responded: permission denied")):e.error?t.fail(new Error(`Cannot send request: ${e.error} ${e.detail||""}`)):"net::ERR_TIMED_OUT"===e.netErrorName?t.fail(new Error("doAidaConversation timed out")):200!==e.statusCode?t.fail(new Error(`Request failed: ${JSON.stringify(e)}`)):t.close()}));const s=[];let i=!1;const a=[];let d={rpcGlobalId:0};for(;o=await t.read();){let e,r=!1;if(o.length){o.startsWith(",")&&(o=o.slice(1)),o.startsWith("[")||(o="["+o),o.endsWith("]")||(o+="]");try{e=JSON.parse(o)}catch(e){throw new Error("Cannot parse chunk: "+o,{cause:e})}for(const t of e){if("metadata"in t&&(d=t.metadata,d?.attributionMetadata?.attributionAction===T.BLOCK))throw new N;if("textChunk"in t)i&&(s.push(_),i=!1),s.push(t.textChunk.text),r=!0;else if("codeChunk"in t)i||(s.push(_),i=!0),s.push(t.codeChunk.code),r=!0;else{if(!("functionCallChunk"in t))throw"error"in t?new Error(`Server responded: ${JSON.stringify(t)}`):new Error("Unknown chunk result");a.push({name:t.functionCallChunk.functionCall.name,args:t.functionCallChunk.functionCall.args})}}r&&(yield{explanation:s.join("")+(i?_:""),metadata:d,completed:!1})}}yield{explanation:s.join("")+(i?_:""),metadata:d,functionCalls:a.length?a:void 0,completed:!0}}registerClientEvent(e){const{promise:r,resolve:t}=Promise.withResolvers();return f.registerAidaClientEvent(JSON.stringify({client:M,event_time:(new Date).toISOString(),...e}),t),r}}let D;class H extends e.ObjectWrapper.ObjectWrapper{#t;#n;constructor(){super()}static instance(){return D||(D=new H),D}addEventListener(e,r){const t=!this.hasEventListeners(e),n=super.addEventListener(e,r);return t&&(window.clearTimeout(this.#t),this.pollAidaAvailability()),n}removeEventListener(e,r){super.removeEventListener(e,r),this.hasEventListeners(e)||window.clearTimeout(this.#t)}async pollAidaAvailability(){this.#t=window.setTimeout((()=>this.pollAidaAvailability()),2e3);const e=await L.checkAccessPreconditions();if(e!==this.#n){this.#n=e;const t=await new Promise((e=>f.getHostConfig(e)));Object.assign(r.Runtime.hostConfig,t),this.dispatchEventToListeners("aidaAvailabilityChanged")}}}var U=Object.freeze({__proto__:null,AidaAbortError:O,AidaBlockError:N,AidaClient:L,CLIENT_NAME:M,get CitationSourceType(){return x},get ClientFeature(){return P},get FunctionalityType(){return A},HostConfigTracker:H,get RecitationAction(){return T},get Role(){return b},get UserTier(){return R},convertToUserTierEnum:function(e){if(e)switch(e){case"TESTERS":return R.TESTERS;case"BETA":return R.BETA;case"PUBLIC":return R.PUBLIC}return R.BETA}});let W,B,V,G,j;function q(){return W||(W=f.platform()),W}var X=Object.freeze({__proto__:null,fontFamily:function(){if(j)return j;switch(q()){case"linux":j="Roboto, Ubuntu, Arial, sans-serif";break;case"mac":j="'Lucida Grande', sans-serif";break;case"windows":j="'Segoe UI', Tahoma, sans-serif"}return j},isCustomDevtoolsFrontend:function(){return void 0===G&&(G=window.location.toString().startsWith("devtools://devtools/custom/")),G},isMac:function(){return void 0===B&&(B="mac"===q()),B},isWin:function(){return void 0===V&&(V="windows"===q()),V},platform:q,setPlatformForTests:function(e){W=e,B=void 0,V=void 0}});let z=null;function K(){return null===z&&(z=new $),z}class ${#o="error";#s=new Set;#i=null;#a=null;#d="rn_inspector";#c={};#l=new Map;isEnabled(){return!0===globalThis.enableReactNativePerfMetrics}addEventListener(e){this.#s.add(e);return()=>{this.#s.delete(e)}}removeAllEventListeners(){this.#s.clear()}sendEvent(e){if(!0!==globalThis.enableReactNativePerfMetrics)return;const r=this.#u(e),t=[];for(const e of this.#s)try{e(r)}catch(e){t.push(e)}if(t.length>0){const e=new AggregateError(t);console.error("Error occurred when calling event listeners",e)}}registerPerfMetricsGlobalPostMessageHandler(){!0===globalThis.enableReactNativePerfMetrics&&!0===globalThis.enableReactNativePerfMetricsGlobalPostMessage&&this.addEventListener((e=>{window.postMessage({event:e,tag:"react-native-chrome-devtools-perf-metrics"},window.location.origin)}))}registerGlobalErrorReporting(){window.addEventListener("error",(e=>{const[r,t]=Y(`[RNPerfMetrics] uncaught error: ${e.message}`,e.error);this.sendEvent({eventName:"Browser.Error",params:{type:"error",message:r,error:t}})}),{passive:!0}),window.addEventListener("unhandledrejection",(e=>{const[r,t]=Y("[RNPerfMetrics] unhandled promise rejection",e.reason);this.sendEvent({eventName:"Browser.Error",params:{type:"rejectedPromise",message:r,error:t}})}),{passive:!0});const e=globalThis.console,r=e[this.#o];e[this.#o]=(...t)=>{try{const e=t[0],[r,n]=Y("[RNPerfMetrics] console.error",e);this.sendEvent({eventName:"Browser.Error",params:{message:r,error:n,type:"consoleError"}})}catch(e){const[r,t]=Y("[RNPerfMetrics] Error handling console.error",e);this.sendEvent({eventName:"Browser.Error",params:{message:r,error:t,type:"consoleError"}})}finally{r.apply(e,t)}}}setLaunchId(e){this.#i=e}setAppId(e){this.#a=e}setTelemetryInfo(e){this.#c=e}entryPointLoadingStarted(e){this.#d=e,this.sendEvent({eventName:"Entrypoint.LoadingStarted",entryPoint:e})}entryPointLoadingFinished(e){this.sendEvent({eventName:"Entrypoint.LoadingFinished",entryPoint:e})}browserVisibilityChanged(e){this.sendEvent({eventName:"Browser.VisibilityChange",params:{visibilityState:e}})}remoteDebuggingTerminated(e={}){this.sendEvent({eventName:"Connection.DebuggingTerminated",params:e})}developerResourceLoadingStarted(e,r){const t=Q(e);this.sendEvent({eventName:"DeveloperResource.LoadingStarted",params:{url:t,loadingMethod:r}})}developerResourceLoadingFinished(e,r,t){const n=Q(e);this.sendEvent({eventName:"DeveloperResource.LoadingFinished",params:{url:n,loadingMethod:r,success:t.success,errorMessage:t.errorDescription?.message}})}developerResourcesStartupLoadingFinishedEvent(e,r){this.sendEvent({eventName:"DeveloperResources.StartupLoadingFinished",params:{numResources:e,timeSinceLaunch:r}})}fuseboxSetClientMetadataStarted(){this.sendEvent({eventName:"FuseboxSetClientMetadataStarted"})}fuseboxSetClientMetadataFinished(e,r){if(e)this.sendEvent({eventName:"FuseboxSetClientMetadataFinished",params:{success:!0}});else{const[e,t]=Y("[RNPerfMetrics] Fusebox setClientMetadata failed",r);this.sendEvent({eventName:"FuseboxSetClientMetadataFinished",params:{success:!1,error:t,errorMessage:e}})}}heapSnapshotStarted(){this.sendEvent({eventName:"MemoryPanelActionStarted",params:{action:"snapshot"}})}heapSnapshotFinished(e){this.sendEvent({eventName:"MemoryPanelActionFinished",params:{action:"snapshot",success:e}})}heapProfilingStarted(){this.sendEvent({eventName:"MemoryPanelActionStarted",params:{action:"profiling"}})}heapProfilingFinished(e){this.sendEvent({eventName:"MemoryPanelActionFinished",params:{action:"profiling",success:e}})}heapSamplingStarted(){this.sendEvent({eventName:"MemoryPanelActionStarted",params:{action:"sampling"}})}heapSamplingFinished(e){this.sendEvent({eventName:"MemoryPanelActionFinished",params:{action:"sampling",success:e}})}stackTraceSymbolicationSucceeded(e){this.sendEvent({eventName:"StackTraceSymbolicationSucceeded",params:{specialHermesFrameTypes:e}})}stackTraceSymbolicationFailed(e,r,t){this.sendEvent({eventName:"StackTraceSymbolicationFailed",params:{stackTrace:e,line:r,reason:t}})}stackTraceFrameUrlResolutionSucceeded(){this.sendEvent({eventName:"StackTraceFrameUrlResolutionSucceeded"})}stackTraceFrameUrlResolutionFailed(e){this.sendEvent({eventName:"StackTraceFrameUrlResolutionFailed",params:{uniqueUrls:e}})}manualBreakpointSetSucceeded(e){this.sendEvent({eventName:"ManualBreakpointSetSucceeded",params:{bpSettingDuration:e}})}stackTraceFrameClicked(e){this.sendEvent({eventName:"StackTraceFrameClicked",params:{isLinkified:e}})}panelShown(e,r){}panelShownInLocation(e,r){this.sendEvent({eventName:"PanelShown",params:{location:r,newPanelName:e}}),this.#l.set(r,e)}#u(e){return{...e,...{timestamp:performance.timeOrigin+performance.now(),launchId:this.#i,appId:this.#a,entryPoint:this.#d,telemetryInfo:this.#c,currentPanels:this.#l}}}}function Q(e){const{url:r}=e;return"http"===e.scheme||"https"===e.scheme?r:`${r.slice(0,100)} …(omitted ${r.length-100} characters)`}function Y(e,r){if(r instanceof Error){return[`${e}: ${r.message}`,r]}const t=`${e}: ${String(r)}`;return[t,new Error(t,{cause:r})]}var J,Z,ee,re,te,ne,oe,se,ie,ae,de,ce,le,ue=Object.freeze({__proto__:null,getInstance:K});class me{#m;#g;#p;constructor(){this.#m=!1,this.#g=!1,this.#p=""}panelShown(e,r){const t=Z[e]||0;f.recordEnumeratedHistogram("DevTools.PanelShown",t,Z.MAX_VALUE),f.recordUserMetricsAction("DevTools_PanelShown_"+e),r||(this.#m=!0),K().panelShown(e,r)}panelShownInLocation(e,r){const t=ee[`${e}-${r}`]||0;f.recordEnumeratedHistogram("DevTools.PanelShownInLocation",t,ee.MAX_VALUE),K().panelShownInLocation(e,r)}settingsPanelShown(e){this.panelShown("settings-"+e)}sourcesPanelFileDebugged(e){const r=e&&te[e]||te.Unknown;f.recordEnumeratedHistogram("DevTools.SourcesPanelFileDebugged",r,te.MAX_VALUE)}sourcesPanelFileOpened(e){const r=e&&te[e]||te.Unknown;f.recordEnumeratedHistogram("DevTools.SourcesPanelFileOpened",r,te.MAX_VALUE)}networkPanelResponsePreviewOpened(e){const r=e&&te[e]||te.Unknown;f.recordEnumeratedHistogram("DevTools.NetworkPanelResponsePreviewOpened",r,te.MAX_VALUE)}actionTaken(e){f.recordEnumeratedHistogram("DevTools.ActionTaken",e,J.MAX_VALUE)}panelLoaded(e,r){this.#g||e!==this.#p||(this.#g=!0,requestAnimationFrame((()=>{window.setTimeout((()=>{performance.mark(r),this.#m||f.recordPerformanceHistogram(r,performance.now())}),0)})))}setLaunchPanel(e){this.#p=e}performanceTraceLoad(e){f.recordPerformanceHistogram("DevTools.TraceLoad",e.duration)}keybindSetSettingChanged(e){const r=ne[e]||0;f.recordEnumeratedHistogram("DevTools.KeybindSetSettingChanged",r,ne.MAX_VALUE)}keyboardShortcutFired(e){const r=oe[e]||oe.OtherShortcut;f.recordEnumeratedHistogram("DevTools.KeyboardShortcutFired",r,oe.MAX_VALUE)}issuesPanelOpenedFrom(e){f.recordEnumeratedHistogram("DevTools.IssuesPanelOpenedFrom",e,6)}issuesPanelIssueExpanded(e){if(void 0===e)return;const r=ie[e];void 0!==r&&f.recordEnumeratedHistogram("DevTools.IssuesPanelIssueExpanded",r,ie.MAX_VALUE)}issuesPanelResourceOpened(e,r){const t=ae[e+r];void 0!==t&&f.recordEnumeratedHistogram("DevTools.IssuesPanelResourceOpened",t,ae.MAX_VALUE)}issueCreated(e){const r=de[e];void 0!==r&&f.recordEnumeratedHistogram("DevTools.IssueCreated",r,de.MAX_VALUE)}experimentEnabledAtLaunch(e){const r=se[e];void 0!==r&&f.recordEnumeratedHistogram("DevTools.ExperimentEnabledAtLaunch",r,se.MAX_VALUE)}navigationSettingAtFirstTimelineLoad(e){f.recordEnumeratedHistogram("DevTools.TimelineNavigationSettingState",e,4)}experimentDisabledAtLaunch(e){const r=se[e];void 0!==r&&f.recordEnumeratedHistogram("DevTools.ExperimentDisabledAtLaunch",r,se.MAX_VALUE)}experimentChanged(e,r){const t=se[e];if(void 0===t)return;const n=r?"DevTools.ExperimentEnabled":"DevTools.ExperimentDisabled";f.recordEnumeratedHistogram(n,t,se.MAX_VALUE)}developerResourceLoaded(e){e>=8||f.recordEnumeratedHistogram("DevTools.DeveloperResourceLoaded",e,8)}developerResourceScheme(e){e>=9||f.recordEnumeratedHistogram("DevTools.DeveloperResourceScheme",e,9)}language(e){const r=ce[e];void 0!==r&&f.recordEnumeratedHistogram("DevTools.Language",r,ce.MAX_VALUE)}syncSetting(e){f.getSyncInformation((r=>{let t=1;r.isSyncActive&&!r.arePreferencesSynced?t=2:r.isSyncActive&&r.arePreferencesSynced&&(t=e?4:3),f.recordEnumeratedHistogram("DevTools.SyncSetting",t,5)}))}recordingAssertion(e){f.recordEnumeratedHistogram("DevTools.RecordingAssertion",e,4)}recordingToggled(e){f.recordEnumeratedHistogram("DevTools.RecordingToggled",e,3)}recordingReplayFinished(e){f.recordEnumeratedHistogram("DevTools.RecordingReplayFinished",e,5)}recordingReplaySpeed(e){f.recordEnumeratedHistogram("DevTools.RecordingReplaySpeed",e,5)}recordingReplayStarted(e){f.recordEnumeratedHistogram("DevTools.RecordingReplayStarted",e,4)}recordingEdited(e){f.recordEnumeratedHistogram("DevTools.RecordingEdited",e,11)}recordingExported(e){f.recordEnumeratedHistogram("DevTools.RecordingExported",e,6)}recordingCodeToggled(e){f.recordEnumeratedHistogram("DevTools.RecordingCodeToggled",e,3)}recordingCopiedToClipboard(e){f.recordEnumeratedHistogram("DevTools.RecordingCopiedToClipboard",e,9)}cssHintShown(e){f.recordEnumeratedHistogram("DevTools.CSSHintShown",e,14)}lighthouseModeRun(e){f.recordEnumeratedHistogram("DevTools.LighthouseModeRun",e,4)}lighthouseCategoryUsed(e){f.recordEnumeratedHistogram("DevTools.LighthouseCategoryUsed",e,6)}swatchActivated(e){f.recordEnumeratedHistogram("DevTools.SwatchActivated",e,11)}animationPlaybackRateChanged(e){f.recordEnumeratedHistogram("DevTools.AnimationPlaybackRateChanged",e,4)}animationPointDragged(e){f.recordEnumeratedHistogram("DevTools.AnimationPointDragged",e,5)}workspacesPopulated(e){f.recordPerformanceHistogram("DevTools.Workspaces.PopulateWallClocktime",e)}visualLoggingProcessingDone(e){f.recordPerformanceHistogram("DevTools.VisualLogging.ProcessingTime",e)}freestylerQueryLength(e){f.recordCountHistogram("DevTools.Freestyler.QueryLength",e,0,1e5,100)}freestylerEvalResponseSize(e){f.recordCountHistogram("DevTools.Freestyler.EvalResponseSize",e,0,1e5,100)}}!function(e){e[e.WindowDocked=1]="WindowDocked",e[e.WindowUndocked=2]="WindowUndocked",e[e.ScriptsBreakpointSet=3]="ScriptsBreakpointSet",e[e.TimelineStarted=4]="TimelineStarted",e[e.ProfilesCPUProfileTaken=5]="ProfilesCPUProfileTaken",e[e.ProfilesHeapProfileTaken=6]="ProfilesHeapProfileTaken",e[e.ConsoleEvaluated=8]="ConsoleEvaluated",e[e.FileSavedInWorkspace=9]="FileSavedInWorkspace",e[e.DeviceModeEnabled=10]="DeviceModeEnabled",e[e.AnimationsPlaybackRateChanged=11]="AnimationsPlaybackRateChanged",e[e.RevisionApplied=12]="RevisionApplied",e[e.FileSystemDirectoryContentReceived=13]="FileSystemDirectoryContentReceived",e[e.StyleRuleEdited=14]="StyleRuleEdited",e[e.CommandEvaluatedInConsolePanel=15]="CommandEvaluatedInConsolePanel",e[e.DOMPropertiesExpanded=16]="DOMPropertiesExpanded",e[e.ResizedViewInResponsiveMode=17]="ResizedViewInResponsiveMode",e[e.TimelinePageReloadStarted=18]="TimelinePageReloadStarted",e[e.ConnectToNodeJSFromFrontend=19]="ConnectToNodeJSFromFrontend",e[e.ConnectToNodeJSDirectly=20]="ConnectToNodeJSDirectly",e[e.CpuThrottlingEnabled=21]="CpuThrottlingEnabled",e[e.CpuProfileNodeFocused=22]="CpuProfileNodeFocused",e[e.CpuProfileNodeExcluded=23]="CpuProfileNodeExcluded",e[e.SelectFileFromFilePicker=24]="SelectFileFromFilePicker",e[e.SelectCommandFromCommandMenu=25]="SelectCommandFromCommandMenu",e[e.ChangeInspectedNodeInElementsPanel=26]="ChangeInspectedNodeInElementsPanel",e[e.StyleRuleCopied=27]="StyleRuleCopied",e[e.CoverageStarted=28]="CoverageStarted",e[e.LighthouseStarted=29]="LighthouseStarted",e[e.LighthouseFinished=30]="LighthouseFinished",e[e.ShowedThirdPartyBadges=31]="ShowedThirdPartyBadges",e[e.LighthouseViewTrace=32]="LighthouseViewTrace",e[e.FilmStripStartedRecording=33]="FilmStripStartedRecording",e[e.CoverageReportFiltered=34]="CoverageReportFiltered",e[e.CoverageStartedPerBlock=35]="CoverageStartedPerBlock",e[e["SettingsOpenedFromGear-deprecated"]=36]="SettingsOpenedFromGear-deprecated",e[e["SettingsOpenedFromMenu-deprecated"]=37]="SettingsOpenedFromMenu-deprecated",e[e["SettingsOpenedFromCommandMenu-deprecated"]=38]="SettingsOpenedFromCommandMenu-deprecated",e[e.TabMovedToDrawer=39]="TabMovedToDrawer",e[e.TabMovedToMainPanel=40]="TabMovedToMainPanel",e[e.CaptureCssOverviewClicked=41]="CaptureCssOverviewClicked",e[e.VirtualAuthenticatorEnvironmentEnabled=42]="VirtualAuthenticatorEnvironmentEnabled",e[e.SourceOrderViewActivated=43]="SourceOrderViewActivated",e[e.UserShortcutAdded=44]="UserShortcutAdded",e[e.ShortcutRemoved=45]="ShortcutRemoved",e[e.ShortcutModified=46]="ShortcutModified",e[e.CustomPropertyLinkClicked=47]="CustomPropertyLinkClicked",e[e.CustomPropertyEdited=48]="CustomPropertyEdited",e[e.ServiceWorkerNetworkRequestClicked=49]="ServiceWorkerNetworkRequestClicked",e[e.ServiceWorkerNetworkRequestClosedQuickly=50]="ServiceWorkerNetworkRequestClosedQuickly",e[e.NetworkPanelServiceWorkerRespondWith=51]="NetworkPanelServiceWorkerRespondWith",e[e.NetworkPanelCopyValue=52]="NetworkPanelCopyValue",e[e.ConsoleSidebarOpened=53]="ConsoleSidebarOpened",e[e.PerfPanelTraceImported=54]="PerfPanelTraceImported",e[e.PerfPanelTraceExported=55]="PerfPanelTraceExported",e[e.StackFrameRestarted=56]="StackFrameRestarted",e[e.CaptureTestProtocolClicked=57]="CaptureTestProtocolClicked",e[e.BreakpointRemovedFromRemoveButton=58]="BreakpointRemovedFromRemoveButton",e[e.BreakpointGroupExpandedStateChanged=59]="BreakpointGroupExpandedStateChanged",e[e.HeaderOverrideFileCreated=60]="HeaderOverrideFileCreated",e[e.HeaderOverrideEnableEditingClicked=61]="HeaderOverrideEnableEditingClicked",e[e.HeaderOverrideHeaderAdded=62]="HeaderOverrideHeaderAdded",e[e.HeaderOverrideHeaderEdited=63]="HeaderOverrideHeaderEdited",e[e.HeaderOverrideHeaderRemoved=64]="HeaderOverrideHeaderRemoved",e[e.HeaderOverrideHeadersFileEdited=65]="HeaderOverrideHeadersFileEdited",e[e.PersistenceNetworkOverridesEnabled=66]="PersistenceNetworkOverridesEnabled",e[e.PersistenceNetworkOverridesDisabled=67]="PersistenceNetworkOverridesDisabled",e[e.BreakpointRemovedFromContextMenu=68]="BreakpointRemovedFromContextMenu",e[e.BreakpointsInFileRemovedFromRemoveButton=69]="BreakpointsInFileRemovedFromRemoveButton",e[e.BreakpointsInFileRemovedFromContextMenu=70]="BreakpointsInFileRemovedFromContextMenu",e[e.BreakpointsInFileCheckboxToggled=71]="BreakpointsInFileCheckboxToggled",e[e.BreakpointsInFileEnabledDisabledFromContextMenu=72]="BreakpointsInFileEnabledDisabledFromContextMenu",e[e.BreakpointConditionEditedFromSidebar=73]="BreakpointConditionEditedFromSidebar",e[e.WorkspaceTabAddFolder=74]="WorkspaceTabAddFolder",e[e.WorkspaceTabRemoveFolder=75]="WorkspaceTabRemoveFolder",e[e.OverrideTabAddFolder=76]="OverrideTabAddFolder",e[e.OverrideTabRemoveFolder=77]="OverrideTabRemoveFolder",e[e.WorkspaceSourceSelected=78]="WorkspaceSourceSelected",e[e.OverridesSourceSelected=79]="OverridesSourceSelected",e[e.StyleSheetInitiatorLinkClicked=80]="StyleSheetInitiatorLinkClicked",e[e.BreakpointRemovedFromGutterContextMenu=81]="BreakpointRemovedFromGutterContextMenu",e[e.BreakpointRemovedFromGutterToggle=82]="BreakpointRemovedFromGutterToggle",e[e.StylePropertyInsideKeyframeEdited=83]="StylePropertyInsideKeyframeEdited",e[e.OverrideContentFromSourcesContextMenu=84]="OverrideContentFromSourcesContextMenu",e[e.OverrideContentFromNetworkContextMenu=85]="OverrideContentFromNetworkContextMenu",e[e.OverrideScript=86]="OverrideScript",e[e.OverrideStyleSheet=87]="OverrideStyleSheet",e[e.OverrideDocument=88]="OverrideDocument",e[e.OverrideFetchXHR=89]="OverrideFetchXHR",e[e.OverrideImage=90]="OverrideImage",e[e.OverrideFont=91]="OverrideFont",e[e.OverrideContentContextMenuSetup=92]="OverrideContentContextMenuSetup",e[e.OverrideContentContextMenuAbandonSetup=93]="OverrideContentContextMenuAbandonSetup",e[e.OverrideContentContextMenuActivateDisabled=94]="OverrideContentContextMenuActivateDisabled",e[e.OverrideContentContextMenuOpenExistingFile=95]="OverrideContentContextMenuOpenExistingFile",e[e.OverrideContentContextMenuSaveNewFile=96]="OverrideContentContextMenuSaveNewFile",e[e.ShowAllOverridesFromSourcesContextMenu=97]="ShowAllOverridesFromSourcesContextMenu",e[e.ShowAllOverridesFromNetworkContextMenu=98]="ShowAllOverridesFromNetworkContextMenu",e[e.AnimationGroupsCleared=99]="AnimationGroupsCleared",e[e.AnimationsPaused=100]="AnimationsPaused",e[e.AnimationsResumed=101]="AnimationsResumed",e[e.AnimatedNodeDescriptionClicked=102]="AnimatedNodeDescriptionClicked",e[e.AnimationGroupScrubbed=103]="AnimationGroupScrubbed",e[e.AnimationGroupReplayed=104]="AnimationGroupReplayed",e[e.OverrideTabDeleteFolderContextMenu=105]="OverrideTabDeleteFolderContextMenu",e[e.WorkspaceDropFolder=107]="WorkspaceDropFolder",e[e.WorkspaceSelectFolder=108]="WorkspaceSelectFolder",e[e.OverrideContentContextMenuSourceMappedWarning=109]="OverrideContentContextMenuSourceMappedWarning",e[e.OverrideContentContextMenuRedirectToDeployed=110]="OverrideContentContextMenuRedirectToDeployed",e[e.NewStyleRuleAdded=111]="NewStyleRuleAdded",e[e.TraceExpanded=112]="TraceExpanded",e[e.InsightConsoleMessageShown=113]="InsightConsoleMessageShown",e[e.InsightRequestedViaContextMenu=114]="InsightRequestedViaContextMenu",e[e.InsightRequestedViaHoverButton=115]="InsightRequestedViaHoverButton",e[e.InsightRatedPositive=117]="InsightRatedPositive",e[e.InsightRatedNegative=118]="InsightRatedNegative",e[e.InsightClosed=119]="InsightClosed",e[e.InsightErrored=120]="InsightErrored",e[e.InsightHoverButtonShown=121]="InsightHoverButtonShown",e[e.SelfXssWarningConsoleMessageShown=122]="SelfXssWarningConsoleMessageShown",e[e.SelfXssWarningDialogShown=123]="SelfXssWarningDialogShown",e[e.SelfXssAllowPastingInConsole=124]="SelfXssAllowPastingInConsole",e[e.SelfXssAllowPastingInDialog=125]="SelfXssAllowPastingInDialog",e[e.ToggleEmulateFocusedPageFromStylesPaneOn=126]="ToggleEmulateFocusedPageFromStylesPaneOn",e[e.ToggleEmulateFocusedPageFromStylesPaneOff=127]="ToggleEmulateFocusedPageFromStylesPaneOff",e[e.ToggleEmulateFocusedPageFromRenderingTab=128]="ToggleEmulateFocusedPageFromRenderingTab",e[e.ToggleEmulateFocusedPageFromCommandMenu=129]="ToggleEmulateFocusedPageFromCommandMenu",e[e.InsightGenerated=130]="InsightGenerated",e[e.InsightErroredApi=131]="InsightErroredApi",e[e.InsightErroredMarkdown=132]="InsightErroredMarkdown",e[e.ToggleShowWebVitals=133]="ToggleShowWebVitals",e[e.InsightErroredPermissionDenied=134]="InsightErroredPermissionDenied",e[e.InsightErroredCannotSend=135]="InsightErroredCannotSend",e[e.InsightErroredRequestFailed=136]="InsightErroredRequestFailed",e[e.InsightErroredCannotParseChunk=137]="InsightErroredCannotParseChunk",e[e.InsightErroredUnknownChunk=138]="InsightErroredUnknownChunk",e[e.InsightErroredOther=139]="InsightErroredOther",e[e.AutofillReceived=140]="AutofillReceived",e[e.AutofillReceivedAndTabAutoOpened=141]="AutofillReceivedAndTabAutoOpened",e[e.AnimationGroupSelected=142]="AnimationGroupSelected",e[e.ScrollDrivenAnimationGroupSelected=143]="ScrollDrivenAnimationGroupSelected",e[e.ScrollDrivenAnimationGroupScrubbed=144]="ScrollDrivenAnimationGroupScrubbed",e[e.AiAssistanceOpenedFromElementsPanel=145]="AiAssistanceOpenedFromElementsPanel",e[e.AiAssistanceOpenedFromStylesTab=146]="AiAssistanceOpenedFromStylesTab",e[e.ConsoleFilterByContext=147]="ConsoleFilterByContext",e[e.ConsoleFilterBySource=148]="ConsoleFilterBySource",e[e.ConsoleFilterByUrl=149]="ConsoleFilterByUrl",e[e.InsightConsentReminderShown=150]="InsightConsentReminderShown",e[e.InsightConsentReminderCanceled=151]="InsightConsentReminderCanceled",e[e.InsightConsentReminderConfirmed=152]="InsightConsentReminderConfirmed",e[e.InsightsOnboardingShown=153]="InsightsOnboardingShown",e[e.InsightsOnboardingCanceledOnPage1=154]="InsightsOnboardingCanceledOnPage1",e[e.InsightsOnboardingCanceledOnPage2=155]="InsightsOnboardingCanceledOnPage2",e[e.InsightsOnboardingConfirmed=156]="InsightsOnboardingConfirmed",e[e.InsightsOnboardingNextPage=157]="InsightsOnboardingNextPage",e[e.InsightsOnboardingPrevPage=158]="InsightsOnboardingPrevPage",e[e.InsightsOnboardingFeatureDisabled=159]="InsightsOnboardingFeatureDisabled",e[e.InsightsOptInTeaserShown=160]="InsightsOptInTeaserShown",e[e.InsightsOptInTeaserSettingsLinkClicked=161]="InsightsOptInTeaserSettingsLinkClicked",e[e.InsightsOptInTeaserConfirmedInSettings=162]="InsightsOptInTeaserConfirmedInSettings",e[e.InsightsReminderTeaserShown=163]="InsightsReminderTeaserShown",e[e.InsightsReminderTeaserConfirmed=164]="InsightsReminderTeaserConfirmed",e[e.InsightsReminderTeaserCanceled=165]="InsightsReminderTeaserCanceled",e[e.InsightsReminderTeaserSettingsLinkClicked=166]="InsightsReminderTeaserSettingsLinkClicked",e[e.InsightsReminderTeaserAbortedInSettings=167]="InsightsReminderTeaserAbortedInSettings",e[e.GeneratingInsightWithoutDisclaimer=168]="GeneratingInsightWithoutDisclaimer",e[e.AiAssistanceOpenedFromElementsPanelFloatingButton=169]="AiAssistanceOpenedFromElementsPanelFloatingButton",e[e.AiAssistanceOpenedFromNetworkPanel=170]="AiAssistanceOpenedFromNetworkPanel",e[e.AiAssistanceOpenedFromSourcesPanel=171]="AiAssistanceOpenedFromSourcesPanel",e[e.AiAssistanceOpenedFromSourcesPanelFloatingButton=172]="AiAssistanceOpenedFromSourcesPanelFloatingButton",e[e.AiAssistanceOpenedFromPerformancePanel=173]="AiAssistanceOpenedFromPerformancePanel",e[e.AiAssistanceOpenedFromNetworkPanelFloatingButton=174]="AiAssistanceOpenedFromNetworkPanelFloatingButton",e[e.AiAssistancePanelOpened=175]="AiAssistancePanelOpened",e[e.AiAssistanceQuerySubmitted=176]="AiAssistanceQuerySubmitted",e[e.AiAssistanceAnswerReceived=177]="AiAssistanceAnswerReceived",e[e.AiAssistanceDynamicSuggestionClicked=178]="AiAssistanceDynamicSuggestionClicked",e[e.AiAssistanceSideEffectConfirmed=179]="AiAssistanceSideEffectConfirmed",e[e.AiAssistanceSideEffectRejected=180]="AiAssistanceSideEffectRejected",e[e.AiAssistanceError=181]="AiAssistanceError",e[e.AiAssistanceOpenedFromPerformanceInsight=182]="AiAssistanceOpenedFromPerformanceInsight",e[e.MAX_VALUE=183]="MAX_VALUE"}(J||(J={})),function(e){e[e.elements=1]="elements",e[e.resources=2]="resources",e[e.network=3]="network",e[e.sources=4]="sources",e[e.timeline=5]="timeline",e[e["heap-profiler"]=6]="heap-profiler",e[e.console=8]="console",e[e.layers=9]="layers",e[e["console-view"]=10]="console-view",e[e.animations=11]="animations",e[e["network.config"]=12]="network.config",e[e.rendering=13]="rendering",e[e.sensors=14]="sensors",e[e["sources.search"]=15]="sources.search",e[e.security=16]="security",e[e["js-profiler"]=17]="js-profiler",e[e.lighthouse=18]="lighthouse",e[e.coverage=19]="coverage",e[e["protocol-monitor"]=20]="protocol-monitor",e[e["remote-devices"]=21]="remote-devices",e[e["web-audio"]=22]="web-audio",e[e["changes.changes"]=23]="changes.changes",e[e["performance.monitor"]=24]="performance.monitor",e[e["release-note"]=25]="release-note",e[e["live-heap-profile"]=26]="live-heap-profile",e[e["sources.quick"]=27]="sources.quick",e[e["network.blocked-urls"]=28]="network.blocked-urls",e[e["settings-preferences"]=29]="settings-preferences",e[e["settings-workspace"]=30]="settings-workspace",e[e["settings-experiments"]=31]="settings-experiments",e[e["settings-blackbox"]=32]="settings-blackbox",e[e["settings-devices"]=33]="settings-devices",e[e["settings-throttling-conditions"]=34]="settings-throttling-conditions",e[e["settings-emulation-locations"]=35]="settings-emulation-locations",e[e["settings-shortcuts"]=36]="settings-shortcuts",e[e["issues-pane"]=37]="issues-pane",e[e["settings-keybinds"]=38]="settings-keybinds",e[e.cssoverview=39]="cssoverview",e[e["chrome-recorder"]=40]="chrome-recorder",e[e["trust-tokens"]=41]="trust-tokens",e[e["reporting-api"]=42]="reporting-api",e[e["interest-groups"]=43]="interest-groups",e[e["back-forward-cache"]=44]="back-forward-cache",e[e["service-worker-cache"]=45]="service-worker-cache",e[e["background-service-background-fetch"]=46]="background-service-background-fetch",e[e["background-service-background-sync"]=47]="background-service-background-sync",e[e["background-service-push-messaging"]=48]="background-service-push-messaging",e[e["background-service-notifications"]=49]="background-service-notifications",e[e["background-service-payment-handler"]=50]="background-service-payment-handler",e[e["background-service-periodic-background-sync"]=51]="background-service-periodic-background-sync",e[e["service-workers"]=52]="service-workers",e[e["app-manifest"]=53]="app-manifest",e[e.storage=54]="storage",e[e.cookies=55]="cookies",e[e["frame-details"]=56]="frame-details",e[e["frame-resource"]=57]="frame-resource",e[e["frame-window"]=58]="frame-window",e[e["frame-worker"]=59]="frame-worker",e[e["dom-storage"]=60]="dom-storage",e[e["indexed-db"]=61]="indexed-db",e[e["web-sql"]=62]="web-sql",e[e["performance-insights"]=63]="performance-insights",e[e.preloading=64]="preloading",e[e["bounce-tracking-mitigations"]=65]="bounce-tracking-mitigations",e[e["developer-resources"]=66]="developer-resources",e[e["autofill-view"]=67]="autofill-view",e[e.MAX_VALUE=68]="MAX_VALUE"}(Z||(Z={})),function(e){e[e["elements-main"]=1]="elements-main",e[e["elements-drawer"]=2]="elements-drawer",e[e["resources-main"]=3]="resources-main",e[e["resources-drawer"]=4]="resources-drawer",e[e["network-main"]=5]="network-main",e[e["network-drawer"]=6]="network-drawer",e[e["sources-main"]=7]="sources-main",e[e["sources-drawer"]=8]="sources-drawer",e[e["timeline-main"]=9]="timeline-main",e[e["timeline-drawer"]=10]="timeline-drawer",e[e["heap_profiler-main"]=11]="heap_profiler-main",e[e["heap_profiler-drawer"]=12]="heap_profiler-drawer",e[e["console-main"]=13]="console-main",e[e["console-drawer"]=14]="console-drawer",e[e["layers-main"]=15]="layers-main",e[e["layers-drawer"]=16]="layers-drawer",e[e["console-view-main"]=17]="console-view-main",e[e["console-view-drawer"]=18]="console-view-drawer",e[e["animations-main"]=19]="animations-main",e[e["animations-drawer"]=20]="animations-drawer",e[e["network.config-main"]=21]="network.config-main",e[e["network.config-drawer"]=22]="network.config-drawer",e[e["rendering-main"]=23]="rendering-main",e[e["rendering-drawer"]=24]="rendering-drawer",e[e["sensors-main"]=25]="sensors-main",e[e["sensors-drawer"]=26]="sensors-drawer",e[e["sources.search-main"]=27]="sources.search-main",e[e["sources.search-drawer"]=28]="sources.search-drawer",e[e["security-main"]=29]="security-main",e[e["security-drawer"]=30]="security-drawer",e[e["lighthouse-main"]=33]="lighthouse-main",e[e["lighthouse-drawer"]=34]="lighthouse-drawer",e[e["coverage-main"]=35]="coverage-main",e[e["coverage-drawer"]=36]="coverage-drawer",e[e["protocol-monitor-main"]=37]="protocol-monitor-main",e[e["protocol-monitor-drawer"]=38]="protocol-monitor-drawer",e[e["remote-devices-main"]=39]="remote-devices-main",e[e["remote-devices-drawer"]=40]="remote-devices-drawer",e[e["web-audio-main"]=41]="web-audio-main",e[e["web-audio-drawer"]=42]="web-audio-drawer",e[e["changes.changes-main"]=43]="changes.changes-main",e[e["changes.changes-drawer"]=44]="changes.changes-drawer",e[e["performance.monitor-main"]=45]="performance.monitor-main",e[e["performance.monitor-drawer"]=46]="performance.monitor-drawer",e[e["release-note-main"]=47]="release-note-main",e[e["release-note-drawer"]=48]="release-note-drawer",e[e["live_heap_profile-main"]=49]="live_heap_profile-main",e[e["live_heap_profile-drawer"]=50]="live_heap_profile-drawer",e[e["sources.quick-main"]=51]="sources.quick-main",e[e["sources.quick-drawer"]=52]="sources.quick-drawer",e[e["network.blocked-urls-main"]=53]="network.blocked-urls-main",e[e["network.blocked-urls-drawer"]=54]="network.blocked-urls-drawer",e[e["settings-preferences-main"]=55]="settings-preferences-main",e[e["settings-preferences-drawer"]=56]="settings-preferences-drawer",e[e["settings-workspace-main"]=57]="settings-workspace-main",e[e["settings-workspace-drawer"]=58]="settings-workspace-drawer",e[e["settings-experiments-main"]=59]="settings-experiments-main",e[e["settings-experiments-drawer"]=60]="settings-experiments-drawer",e[e["settings-blackbox-main"]=61]="settings-blackbox-main",e[e["settings-blackbox-drawer"]=62]="settings-blackbox-drawer",e[e["settings-devices-main"]=63]="settings-devices-main",e[e["settings-devices-drawer"]=64]="settings-devices-drawer",e[e["settings-throttling-conditions-main"]=65]="settings-throttling-conditions-main",e[e["settings-throttling-conditions-drawer"]=66]="settings-throttling-conditions-drawer",e[e["settings-emulation-locations-main"]=67]="settings-emulation-locations-main",e[e["settings-emulation-locations-drawer"]=68]="settings-emulation-locations-drawer",e[e["settings-shortcuts-main"]=69]="settings-shortcuts-main",e[e["settings-shortcuts-drawer"]=70]="settings-shortcuts-drawer",e[e["issues-pane-main"]=71]="issues-pane-main",e[e["issues-pane-drawer"]=72]="issues-pane-drawer",e[e["settings-keybinds-main"]=73]="settings-keybinds-main",e[e["settings-keybinds-drawer"]=74]="settings-keybinds-drawer",e[e["cssoverview-main"]=75]="cssoverview-main",e[e["cssoverview-drawer"]=76]="cssoverview-drawer",e[e["chrome_recorder-main"]=77]="chrome_recorder-main",e[e["chrome_recorder-drawer"]=78]="chrome_recorder-drawer",e[e["trust_tokens-main"]=79]="trust_tokens-main",e[e["trust_tokens-drawer"]=80]="trust_tokens-drawer",e[e["reporting_api-main"]=81]="reporting_api-main",e[e["reporting_api-drawer"]=82]="reporting_api-drawer",e[e["interest_groups-main"]=83]="interest_groups-main",e[e["interest_groups-drawer"]=84]="interest_groups-drawer",e[e["back_forward_cache-main"]=85]="back_forward_cache-main",e[e["back_forward_cache-drawer"]=86]="back_forward_cache-drawer",e[e["service_worker_cache-main"]=87]="service_worker_cache-main",e[e["service_worker_cache-drawer"]=88]="service_worker_cache-drawer",e[e["background_service_backgroundFetch-main"]=89]="background_service_backgroundFetch-main",e[e["background_service_backgroundFetch-drawer"]=90]="background_service_backgroundFetch-drawer",e[e["background_service_backgroundSync-main"]=91]="background_service_backgroundSync-main",e[e["background_service_backgroundSync-drawer"]=92]="background_service_backgroundSync-drawer",e[e["background_service_pushMessaging-main"]=93]="background_service_pushMessaging-main",e[e["background_service_pushMessaging-drawer"]=94]="background_service_pushMessaging-drawer",e[e["background_service_notifications-main"]=95]="background_service_notifications-main",e[e["background_service_notifications-drawer"]=96]="background_service_notifications-drawer",e[e["background_service_paymentHandler-main"]=97]="background_service_paymentHandler-main",e[e["background_service_paymentHandler-drawer"]=98]="background_service_paymentHandler-drawer",e[e["background_service_periodicBackgroundSync-main"]=99]="background_service_periodicBackgroundSync-main",e[e["background_service_periodicBackgroundSync-drawer"]=100]="background_service_periodicBackgroundSync-drawer",e[e["service_workers-main"]=101]="service_workers-main",e[e["service_workers-drawer"]=102]="service_workers-drawer",e[e["app_manifest-main"]=103]="app_manifest-main",e[e["app_manifest-drawer"]=104]="app_manifest-drawer",e[e["storage-main"]=105]="storage-main",e[e["storage-drawer"]=106]="storage-drawer",e[e["cookies-main"]=107]="cookies-main",e[e["cookies-drawer"]=108]="cookies-drawer",e[e["frame_details-main"]=109]="frame_details-main",e[e["frame_details-drawer"]=110]="frame_details-drawer",e[e["frame_resource-main"]=111]="frame_resource-main",e[e["frame_resource-drawer"]=112]="frame_resource-drawer",e[e["frame_window-main"]=113]="frame_window-main",e[e["frame_window-drawer"]=114]="frame_window-drawer",e[e["frame_worker-main"]=115]="frame_worker-main",e[e["frame_worker-drawer"]=116]="frame_worker-drawer",e[e["dom_storage-main"]=117]="dom_storage-main",e[e["dom_storage-drawer"]=118]="dom_storage-drawer",e[e["indexed_db-main"]=119]="indexed_db-main",e[e["indexed_db-drawer"]=120]="indexed_db-drawer",e[e["web_sql-main"]=121]="web_sql-main",e[e["web_sql-drawer"]=122]="web_sql-drawer",e[e["performance_insights-main"]=123]="performance_insights-main",e[e["performance_insights-drawer"]=124]="performance_insights-drawer",e[e["preloading-main"]=125]="preloading-main",e[e["preloading-drawer"]=126]="preloading-drawer",e[e["bounce_tracking_mitigations-main"]=127]="bounce_tracking_mitigations-main",e[e["bounce_tracking_mitigations-drawer"]=128]="bounce_tracking_mitigations-drawer",e[e["developer-resources-main"]=129]="developer-resources-main",e[e["developer-resources-drawer"]=130]="developer-resources-drawer",e[e["autofill-view-main"]=131]="autofill-view-main",e[e["autofill-view-drawer"]=132]="autofill-view-drawer",e[e.MAX_VALUE=133]="MAX_VALUE"}(ee||(ee={})),function(e){e[e.OtherSidebarPane=0]="OtherSidebarPane",e[e.styles=1]="styles",e[e.computed=2]="computed",e[e["elements.layout"]=3]="elements.layout",e[e["elements.event-listeners"]=4]="elements.event-listeners",e[e["elements.dom-breakpoints"]=5]="elements.dom-breakpoints",e[e["elements.dom-properties"]=6]="elements.dom-properties",e[e["accessibility.view"]=7]="accessibility.view",e[e.MAX_VALUE=8]="MAX_VALUE"}(re||(re={})),function(e){e[e.Unknown=0]="Unknown",e[e["text/css"]=2]="text/css",e[e["text/html"]=3]="text/html",e[e["application/xml"]=4]="application/xml",e[e["application/wasm"]=5]="application/wasm",e[e["application/manifest+json"]=6]="application/manifest+json",e[e["application/x-aspx"]=7]="application/x-aspx",e[e["application/jsp"]=8]="application/jsp",e[e["text/x-c++src"]=9]="text/x-c++src",e[e["text/x-coffeescript"]=10]="text/x-coffeescript",e[e["application/vnd.dart"]=11]="application/vnd.dart",e[e["text/typescript"]=12]="text/typescript",e[e["text/typescript-jsx"]=13]="text/typescript-jsx",e[e["application/json"]=14]="application/json",e[e["text/x-csharp"]=15]="text/x-csharp",e[e["text/x-java"]=16]="text/x-java",e[e["text/x-less"]=17]="text/x-less",e[e["application/x-httpd-php"]=18]="application/x-httpd-php",e[e["text/x-python"]=19]="text/x-python",e[e["text/x-sh"]=20]="text/x-sh",e[e["text/x-gss"]=21]="text/x-gss",e[e["text/x-sass"]=22]="text/x-sass",e[e["text/x-scss"]=23]="text/x-scss",e[e["text/markdown"]=24]="text/markdown",e[e["text/x-clojure"]=25]="text/x-clojure",e[e["text/jsx"]=26]="text/jsx",e[e["text/x-go"]=27]="text/x-go",e[e["text/x-kotlin"]=28]="text/x-kotlin",e[e["text/x-scala"]=29]="text/x-scala",e[e["text/x.svelte"]=30]="text/x.svelte",e[e["text/javascript+plain"]=31]="text/javascript+plain",e[e["text/javascript+minified"]=32]="text/javascript+minified",e[e["text/javascript+sourcemapped"]=33]="text/javascript+sourcemapped",e[e["text/x.angular"]=34]="text/x.angular",e[e["text/x.vue"]=35]="text/x.vue",e[e["text/javascript+snippet"]=36]="text/javascript+snippet",e[e["text/javascript+eval"]=37]="text/javascript+eval",e[e.MAX_VALUE=38]="MAX_VALUE"}(te||(te={})),function(e){e[e.devToolsDefault=0]="devToolsDefault",e[e.vsCode=1]="vsCode",e[e.MAX_VALUE=2]="MAX_VALUE"}(ne||(ne={})),function(e){e[e.OtherShortcut=0]="OtherShortcut",e[e["quick-open.show-command-menu"]=1]="quick-open.show-command-menu",e[e["console.clear"]=2]="console.clear",e[e["console.toggle"]=3]="console.toggle",e[e["debugger.step"]=4]="debugger.step",e[e["debugger.step-into"]=5]="debugger.step-into",e[e["debugger.step-out"]=6]="debugger.step-out",e[e["debugger.step-over"]=7]="debugger.step-over",e[e["debugger.toggle-breakpoint"]=8]="debugger.toggle-breakpoint",e[e["debugger.toggle-breakpoint-enabled"]=9]="debugger.toggle-breakpoint-enabled",e[e["debugger.toggle-pause"]=10]="debugger.toggle-pause",e[e["elements.edit-as-html"]=11]="elements.edit-as-html",e[e["elements.hide-element"]=12]="elements.hide-element",e[e["elements.redo"]=13]="elements.redo",e[e["elements.toggle-element-search"]=14]="elements.toggle-element-search",e[e["elements.undo"]=15]="elements.undo",e[e["main.search-in-panel.find"]=16]="main.search-in-panel.find",e[e["main.toggle-drawer"]=17]="main.toggle-drawer",e[e["network.hide-request-details"]=18]="network.hide-request-details",e[e["network.search"]=19]="network.search",e[e["network.toggle-recording"]=20]="network.toggle-recording",e[e["quick-open.show"]=21]="quick-open.show",e[e["settings.show"]=22]="settings.show",e[e["sources.search"]=23]="sources.search",e[e["background-service.toggle-recording"]=24]="background-service.toggle-recording",e[e["components.collect-garbage"]=25]="components.collect-garbage",e[e["console.clear.history"]=26]="console.clear.history",e[e["console.create-pin"]=27]="console.create-pin",e[e["coverage.start-with-reload"]=28]="coverage.start-with-reload",e[e["coverage.toggle-recording"]=29]="coverage.toggle-recording",e[e["debugger.breakpoint-input-window"]=30]="debugger.breakpoint-input-window",e[e["debugger.evaluate-selection"]=31]="debugger.evaluate-selection",e[e["debugger.next-call-frame"]=32]="debugger.next-call-frame",e[e["debugger.previous-call-frame"]=33]="debugger.previous-call-frame",e[e["debugger.run-snippet"]=34]="debugger.run-snippet",e[e["debugger.toggle-breakpoints-active"]=35]="debugger.toggle-breakpoints-active",e[e["elements.capture-area-screenshot"]=36]="elements.capture-area-screenshot",e[e["emulation.capture-full-height-screenshot"]=37]="emulation.capture-full-height-screenshot",e[e["emulation.capture-node-screenshot"]=38]="emulation.capture-node-screenshot",e[e["emulation.capture-screenshot"]=39]="emulation.capture-screenshot",e[e["emulation.show-sensors"]=40]="emulation.show-sensors",e[e["emulation.toggle-device-mode"]=41]="emulation.toggle-device-mode",e[e["help.release-notes"]=42]="help.release-notes",e[e["help.report-issue"]=43]="help.report-issue",e[e["input.start-replaying"]=44]="input.start-replaying",e[e["input.toggle-pause"]=45]="input.toggle-pause",e[e["input.toggle-recording"]=46]="input.toggle-recording",e[e["inspector-main.focus-debuggee"]=47]="inspector-main.focus-debuggee",e[e["inspector-main.hard-reload"]=48]="inspector-main.hard-reload",e[e["inspector-main.reload"]=49]="inspector-main.reload",e[e["live-heap-profile.start-with-reload"]=50]="live-heap-profile.start-with-reload",e[e["live-heap-profile.toggle-recording"]=51]="live-heap-profile.toggle-recording",e[e["main.debug-reload"]=52]="main.debug-reload",e[e["main.next-tab"]=53]="main.next-tab",e[e["main.previous-tab"]=54]="main.previous-tab",e[e["main.search-in-panel.cancel"]=55]="main.search-in-panel.cancel",e[e["main.search-in-panel.find-next"]=56]="main.search-in-panel.find-next",e[e["main.search-in-panel.find-previous"]=57]="main.search-in-panel.find-previous",e[e["main.toggle-dock"]=58]="main.toggle-dock",e[e["main.zoom-in"]=59]="main.zoom-in",e[e["main.zoom-out"]=60]="main.zoom-out",e[e["main.zoom-reset"]=61]="main.zoom-reset",e[e["network-conditions.network-low-end-mobile"]=62]="network-conditions.network-low-end-mobile",e[e["network-conditions.network-mid-tier-mobile"]=63]="network-conditions.network-mid-tier-mobile",e[e["network-conditions.network-offline"]=64]="network-conditions.network-offline",e[e["network-conditions.network-online"]=65]="network-conditions.network-online",e[e["profiler.heap-toggle-recording"]=66]="profiler.heap-toggle-recording",e[e["profiler.js-toggle-recording"]=67]="profiler.js-toggle-recording",e[e["resources.clear"]=68]="resources.clear",e[e["settings.documentation"]=69]="settings.documentation",e[e["settings.shortcuts"]=70]="settings.shortcuts",e[e["sources.add-folder-to-workspace"]=71]="sources.add-folder-to-workspace",e[e["sources.add-to-watch"]=72]="sources.add-to-watch",e[e["sources.close-all"]=73]="sources.close-all",e[e["sources.close-editor-tab"]=74]="sources.close-editor-tab",e[e["sources.create-snippet"]=75]="sources.create-snippet",e[e["sources.go-to-line"]=76]="sources.go-to-line",e[e["sources.go-to-member"]=77]="sources.go-to-member",e[e["sources.jump-to-next-location"]=78]="sources.jump-to-next-location",e[e["sources.jump-to-previous-location"]=79]="sources.jump-to-previous-location",e[e["sources.rename"]=80]="sources.rename",e[e["sources.save"]=81]="sources.save",e[e["sources.save-all"]=82]="sources.save-all",e[e["sources.switch-file"]=83]="sources.switch-file",e[e["timeline.jump-to-next-frame"]=84]="timeline.jump-to-next-frame",e[e["timeline.jump-to-previous-frame"]=85]="timeline.jump-to-previous-frame",e[e["timeline.load-from-file"]=86]="timeline.load-from-file",e[e["timeline.next-recording"]=87]="timeline.next-recording",e[e["timeline.previous-recording"]=88]="timeline.previous-recording",e[e["timeline.record-reload"]=89]="timeline.record-reload",e[e["timeline.save-to-file"]=90]="timeline.save-to-file",e[e["timeline.show-history"]=91]="timeline.show-history",e[e["timeline.toggle-recording"]=92]="timeline.toggle-recording",e[e["sources.increment-css"]=93]="sources.increment-css",e[e["sources.increment-css-by-ten"]=94]="sources.increment-css-by-ten",e[e["sources.decrement-css"]=95]="sources.decrement-css",e[e["sources.decrement-css-by-ten"]=96]="sources.decrement-css-by-ten",e[e["layers.reset-view"]=97]="layers.reset-view",e[e["layers.pan-mode"]=98]="layers.pan-mode",e[e["layers.rotate-mode"]=99]="layers.rotate-mode",e[e["layers.zoom-in"]=100]="layers.zoom-in",e[e["layers.zoom-out"]=101]="layers.zoom-out",e[e["layers.up"]=102]="layers.up",e[e["layers.down"]=103]="layers.down",e[e["layers.left"]=104]="layers.left",e[e["layers.right"]=105]="layers.right",e[e["help.report-translation-issue"]=106]="help.report-translation-issue",e[e["rendering.toggle-prefers-color-scheme"]=107]="rendering.toggle-prefers-color-scheme",e[e["chrome-recorder.start-recording"]=108]="chrome-recorder.start-recording",e[e["chrome-recorder.replay-recording"]=109]="chrome-recorder.replay-recording",e[e["chrome-recorder.toggle-code-view"]=110]="chrome-recorder.toggle-code-view",e[e["chrome-recorder.copy-recording-or-step"]=111]="chrome-recorder.copy-recording-or-step",e[e["changes.revert"]=112]="changes.revert",e[e["changes.copy"]=113]="changes.copy",e[e["elements.new-style-rule"]=114]="elements.new-style-rule",e[e["elements.refresh-event-listeners"]=115]="elements.refresh-event-listeners",e[e["coverage.clear"]=116]="coverage.clear",e[e["coverage.export"]=117]="coverage.export",e[e["timeline.dim-third-parties"]=118]="timeline.dim-third-parties",e[e.MAX_VALUE=119]="MAX_VALUE"}(oe||(oe={})),function(e){e[e["capture-node-creation-stacks"]=1]="capture-node-creation-stacks",e[e["live-heap-profile"]=11]="live-heap-profile",e[e["protocol-monitor"]=13]="protocol-monitor",e[e["sampling-heap-profiler-timeline"]=17]="sampling-heap-profiler-timeline",e[e["show-option-tp-expose-internals-in-heap-snapshot"]=18]="show-option-tp-expose-internals-in-heap-snapshot",e[e["timeline-invalidation-tracking"]=26]="timeline-invalidation-tracking",e[e["timeline-show-all-events"]=27]="timeline-show-all-events",e[e["timeline-v8-runtime-call-stats"]=28]="timeline-v8-runtime-call-stats",e[e.apca=39]="apca",e[e["font-editor"]=41]="font-editor",e[e["full-accessibility-tree"]=42]="full-accessibility-tree",e[e["contrast-issues"]=44]="contrast-issues",e[e["experimental-cookie-features"]=45]="experimental-cookie-features",e[e["instrumentation-breakpoints"]=61]="instrumentation-breakpoints",e[e["authored-deployed-grouping"]=63]="authored-deployed-grouping",e[e["just-my-code"]=65]="just-my-code",e[e["highlight-errors-elements-panel"]=73]="highlight-errors-elements-panel",e[e["use-source-map-scopes"]=76]="use-source-map-scopes",e[e["network-panel-filter-bar-redesign"]=79]="network-panel-filter-bar-redesign",e[e["timeline-show-postmessage-events"]=86]="timeline-show-postmessage-events",e[e["timeline-enhanced-traces"]=90]="timeline-enhanced-traces",e[e["timeline-compiled-sources"]=91]="timeline-compiled-sources",e[e["timeline-debug-mode"]=93]="timeline-debug-mode",e[e["timeline-experimental-insights"]=102]="timeline-experimental-insights",e[e["timeline-dim-unrelated-events"]=103]="timeline-dim-unrelated-events",e[e["timeline-alternative-navigation"]=104]="timeline-alternative-navigation",e[e.MAX_VALUE=106]="MAX_VALUE"}(se||(se={})),function(e){e[e.CrossOriginEmbedderPolicy=0]="CrossOriginEmbedderPolicy",e[e.MixedContent=1]="MixedContent",e[e.SameSiteCookie=2]="SameSiteCookie",e[e.HeavyAd=3]="HeavyAd",e[e.ContentSecurityPolicy=4]="ContentSecurityPolicy",e[e.Other=5]="Other",e[e.Generic=6]="Generic",e[e.ThirdPartyPhaseoutCookie=7]="ThirdPartyPhaseoutCookie",e[e.GenericCookie=8]="GenericCookie",e[e.MAX_VALUE=9]="MAX_VALUE"}(ie||(ie={})),function(e){e[e.CrossOriginEmbedderPolicyRequest=0]="CrossOriginEmbedderPolicyRequest",e[e.CrossOriginEmbedderPolicyElement=1]="CrossOriginEmbedderPolicyElement",e[e.MixedContentRequest=2]="MixedContentRequest",e[e.SameSiteCookieCookie=3]="SameSiteCookieCookie",e[e.SameSiteCookieRequest=4]="SameSiteCookieRequest",e[e.HeavyAdElement=5]="HeavyAdElement",e[e.ContentSecurityPolicyDirective=6]="ContentSecurityPolicyDirective",e[e.ContentSecurityPolicyElement=7]="ContentSecurityPolicyElement",e[e.MAX_VALUE=13]="MAX_VALUE"}(ae||(ae={})),function(e){e[e.MixedContentIssue=0]="MixedContentIssue",e[e["ContentSecurityPolicyIssue::kInlineViolation"]=1]="ContentSecurityPolicyIssue::kInlineViolation",e[e["ContentSecurityPolicyIssue::kEvalViolation"]=2]="ContentSecurityPolicyIssue::kEvalViolation",e[e["ContentSecurityPolicyIssue::kURLViolation"]=3]="ContentSecurityPolicyIssue::kURLViolation",e[e["ContentSecurityPolicyIssue::kTrustedTypesSinkViolation"]=4]="ContentSecurityPolicyIssue::kTrustedTypesSinkViolation",e[e["ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation"]=5]="ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation",e[e["HeavyAdIssue::NetworkTotalLimit"]=6]="HeavyAdIssue::NetworkTotalLimit",e[e["HeavyAdIssue::CpuTotalLimit"]=7]="HeavyAdIssue::CpuTotalLimit",e[e["HeavyAdIssue::CpuPeakLimit"]=8]="HeavyAdIssue::CpuPeakLimit",e[e["CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader"]=9]="CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader",e[e["CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage"]=10]="CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin"]=11]="CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep"]=12]="CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep",e[e["CrossOriginEmbedderPolicyIssue::CorpNotSameSite"]=13]="CrossOriginEmbedderPolicyIssue::CorpNotSameSite",e[e["CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie"]=14]="CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie",e[e["CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie"]=15]="CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie",e[e["CookieIssue::WarnSameSiteNoneInsecure::ReadCookie"]=16]="CookieIssue::WarnSameSiteNoneInsecure::ReadCookie",e[e["CookieIssue::WarnSameSiteNoneInsecure::SetCookie"]=17]="CookieIssue::WarnSameSiteNoneInsecure::SetCookie",e[e["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure"]=18]="CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure",e[e["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure"]=19]="CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure",e[e["CookieIssue::WarnCrossDowngrade::ReadCookie::Secure"]=20]="CookieIssue::WarnCrossDowngrade::ReadCookie::Secure",e[e["CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure"]=21]="CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure",e[e["CookieIssue::WarnCrossDowngrade::SetCookie::Secure"]=22]="CookieIssue::WarnCrossDowngrade::SetCookie::Secure",e[e["CookieIssue::WarnCrossDowngrade::SetCookie::Insecure"]=23]="CookieIssue::WarnCrossDowngrade::SetCookie::Insecure",e[e["CookieIssue::ExcludeNavigationContextDowngrade::Secure"]=24]="CookieIssue::ExcludeNavigationContextDowngrade::Secure",e[e["CookieIssue::ExcludeNavigationContextDowngrade::Insecure"]=25]="CookieIssue::ExcludeNavigationContextDowngrade::Insecure",e[e["CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure"]=26]="CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure",e[e["CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure"]=27]="CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure",e[e["CookieIssue::ExcludeContextDowngrade::SetCookie::Secure"]=28]="CookieIssue::ExcludeContextDowngrade::SetCookie::Secure",e[e["CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure"]=29]="CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure",e[e["CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie"]=30]="CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie",e[e["CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie"]=31]="CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie"]=32]="CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie"]=33]="CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie"]=34]="CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie",e[e["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie"]=35]="CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie",e[e["SharedArrayBufferIssue::TransferIssue"]=36]="SharedArrayBufferIssue::TransferIssue",e[e["SharedArrayBufferIssue::CreationIssue"]=37]="SharedArrayBufferIssue::CreationIssue",e[e.LowTextContrastIssue=41]="LowTextContrastIssue",e[e["CorsIssue::InsecurePrivateNetwork"]=42]="CorsIssue::InsecurePrivateNetwork",e[e["CorsIssue::InvalidHeaders"]=44]="CorsIssue::InvalidHeaders",e[e["CorsIssue::WildcardOriginWithCredentials"]=45]="CorsIssue::WildcardOriginWithCredentials",e[e["CorsIssue::PreflightResponseInvalid"]=46]="CorsIssue::PreflightResponseInvalid",e[e["CorsIssue::OriginMismatch"]=47]="CorsIssue::OriginMismatch",e[e["CorsIssue::AllowCredentialsRequired"]=48]="CorsIssue::AllowCredentialsRequired",e[e["CorsIssue::MethodDisallowedByPreflightResponse"]=49]="CorsIssue::MethodDisallowedByPreflightResponse",e[e["CorsIssue::HeaderDisallowedByPreflightResponse"]=50]="CorsIssue::HeaderDisallowedByPreflightResponse",e[e["CorsIssue::RedirectContainsCredentials"]=51]="CorsIssue::RedirectContainsCredentials",e[e["CorsIssue::DisallowedByMode"]=52]="CorsIssue::DisallowedByMode",e[e["CorsIssue::CorsDisabledScheme"]=53]="CorsIssue::CorsDisabledScheme",e[e["CorsIssue::PreflightMissingAllowExternal"]=54]="CorsIssue::PreflightMissingAllowExternal",e[e["CorsIssue::PreflightInvalidAllowExternal"]=55]="CorsIssue::PreflightInvalidAllowExternal",e[e["CorsIssue::NoCorsRedirectModeNotFollow"]=57]="CorsIssue::NoCorsRedirectModeNotFollow",e[e["QuirksModeIssue::QuirksMode"]=58]="QuirksModeIssue::QuirksMode",e[e["QuirksModeIssue::LimitedQuirksMode"]=59]="QuirksModeIssue::LimitedQuirksMode",e[e.DeprecationIssue=60]="DeprecationIssue",e[e["ClientHintIssue::MetaTagAllowListInvalidOrigin"]=61]="ClientHintIssue::MetaTagAllowListInvalidOrigin",e[e["ClientHintIssue::MetaTagModifiedHTML"]=62]="ClientHintIssue::MetaTagModifiedHTML",e[e["CorsIssue::PreflightAllowPrivateNetworkError"]=63]="CorsIssue::PreflightAllowPrivateNetworkError",e[e["GenericIssue::CrossOriginPortalPostMessageError"]=64]="GenericIssue::CrossOriginPortalPostMessageError",e[e["GenericIssue::FormLabelForNameError"]=65]="GenericIssue::FormLabelForNameError",e[e["GenericIssue::FormDuplicateIdForInputError"]=66]="GenericIssue::FormDuplicateIdForInputError",e[e["GenericIssue::FormInputWithNoLabelError"]=67]="GenericIssue::FormInputWithNoLabelError",e[e["GenericIssue::FormAutocompleteAttributeEmptyError"]=68]="GenericIssue::FormAutocompleteAttributeEmptyError",e[e["GenericIssue::FormEmptyIdAndNameAttributesForInputError"]=69]="GenericIssue::FormEmptyIdAndNameAttributesForInputError",e[e["GenericIssue::FormAriaLabelledByToNonExistingId"]=70]="GenericIssue::FormAriaLabelledByToNonExistingId",e[e["GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError"]=71]="GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError",e[e["GenericIssue::FormLabelHasNeitherForNorNestedInput"]=72]="GenericIssue::FormLabelHasNeitherForNorNestedInput",e[e["GenericIssue::FormLabelForMatchesNonExistingIdError"]=73]="GenericIssue::FormLabelForMatchesNonExistingIdError",e[e["GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError"]=74]="GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError",e[e["GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError"]=75]="GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError",e[e["StylesheetLoadingIssue::LateImportRule"]=76]="StylesheetLoadingIssue::LateImportRule",e[e["StylesheetLoadingIssue::RequestFailed"]=77]="StylesheetLoadingIssue::RequestFailed",e[e["CorsIssue::PreflightMissingPrivateNetworkAccessId"]=78]="CorsIssue::PreflightMissingPrivateNetworkAccessId",e[e["CorsIssue::PreflightMissingPrivateNetworkAccessName"]=79]="CorsIssue::PreflightMissingPrivateNetworkAccessName",e[e["CorsIssue::PrivateNetworkAccessPermissionUnavailable"]=80]="CorsIssue::PrivateNetworkAccessPermissionUnavailable",e[e["CorsIssue::PrivateNetworkAccessPermissionDenied"]=81]="CorsIssue::PrivateNetworkAccessPermissionDenied",e[e["CookieIssue::WarnThirdPartyPhaseout::ReadCookie"]=82]="CookieIssue::WarnThirdPartyPhaseout::ReadCookie",e[e["CookieIssue::WarnThirdPartyPhaseout::SetCookie"]=83]="CookieIssue::WarnThirdPartyPhaseout::SetCookie",e[e["CookieIssue::ExcludeThirdPartyPhaseout::ReadCookie"]=84]="CookieIssue::ExcludeThirdPartyPhaseout::ReadCookie",e[e["CookieIssue::ExcludeThirdPartyPhaseout::SetCookie"]=85]="CookieIssue::ExcludeThirdPartyPhaseout::SetCookie",e[e["SelectElementAccessibilityIssue::DisallowedSelectChild"]=86]="SelectElementAccessibilityIssue::DisallowedSelectChild",e[e["SelectElementAccessibilityIssue::DisallowedOptGroupChild"]=87]="SelectElementAccessibilityIssue::DisallowedOptGroupChild",e[e["SelectElementAccessibilityIssue::NonPhrasingContentOptionChild"]=88]="SelectElementAccessibilityIssue::NonPhrasingContentOptionChild",e[e["SelectElementAccessibilityIssue::InteractiveContentOptionChild"]=89]="SelectElementAccessibilityIssue::InteractiveContentOptionChild",e[e["SelectElementAccessibilityIssue::InteractiveContentLegendChild"]=90]="SelectElementAccessibilityIssue::InteractiveContentLegendChild",e[e["SRIMessageSignatureIssue::MissingSignatureHeader"]=91]="SRIMessageSignatureIssue::MissingSignatureHeader",e[e["SRIMessageSignatureIssue::MissingSignatureInputHeader"]=92]="SRIMessageSignatureIssue::MissingSignatureInputHeader",e[e["SRIMessageSignatureIssue::InvalidSignatureHeader"]=93]="SRIMessageSignatureIssue::InvalidSignatureHeader",e[e["SRIMessageSignatureIssue::InvalidSignatureInputHeader"]=94]="SRIMessageSignatureIssue::InvalidSignatureInputHeader",e[e["SRIMessageSignatureIssue::SignatureHeaderValueIsNotByteSequence"]=95]="SRIMessageSignatureIssue::SignatureHeaderValueIsNotByteSequence",e[e["SRIMessageSignatureIssue::SignatureHeaderValueIsParameterized"]=96]="SRIMessageSignatureIssue::SignatureHeaderValueIsParameterized",e[e["SRIMessageSignatureIssue::SignatureHeaderValueIsIncorrectLength"]=97]="SRIMessageSignatureIssue::SignatureHeaderValueIsIncorrectLength",e[e["SRIMessageSignatureIssue::SignatureInputHeaderMissingLabel"]=98]="SRIMessageSignatureIssue::SignatureInputHeaderMissingLabel",e[e["SRIMessageSignatureIssue::SignatureInputHeaderValueNotInnerList"]=99]="SRIMessageSignatureIssue::SignatureInputHeaderValueNotInnerList",e[e["SRIMessageSignatureIssue::SignatureInputHeaderValueMissingComponents"]=100]="SRIMessageSignatureIssue::SignatureInputHeaderValueMissingComponents",e[e["SRIMessageSignatureIssue::SignatureInputHeaderInvalidComponentType"]=101]="SRIMessageSignatureIssue::SignatureInputHeaderInvalidComponentType",e[e["SRIMessageSignatureIssue::SignatureInputHeaderInvalidComponentName"]=102]="SRIMessageSignatureIssue::SignatureInputHeaderInvalidComponentName",e[e["SRIMessageSignatureIssue::SignatureInputHeaderInvalidHeaderComponentParameter"]=103]="SRIMessageSignatureIssue::SignatureInputHeaderInvalidHeaderComponentParameter",e[e["SRIMessageSignatureIssue::SignatureInputHeaderInvalidDerivedComponentParameter"]=104]="SRIMessageSignatureIssue::SignatureInputHeaderInvalidDerivedComponentParameter",e[e["SRIMessageSignatureIssue::SignatureInputHeaderKeyIdLength"]=105]="SRIMessageSignatureIssue::SignatureInputHeaderKeyIdLength",e[e["SRIMessageSignatureIssue::SignatureInputHeaderInvalidParameter"]=106]="SRIMessageSignatureIssue::SignatureInputHeaderInvalidParameter",e[e["SRIMessageSignatureIssue::SignatureInputHeaderMissingRequiredParameters"]=107]="SRIMessageSignatureIssue::SignatureInputHeaderMissingRequiredParameters",e[e["SRIMessageSignatureIssue::ValidationFailedSignatureExpired"]=108]="SRIMessageSignatureIssue::ValidationFailedSignatureExpired",e[e["SRIMessageSignatureIssue::ValidationFailedInvalidLength"]=109]="SRIMessageSignatureIssue::ValidationFailedInvalidLength",e[e["SRIMessageSignatureIssue::ValidationFailedSignatureMismatch"]=110]="SRIMessageSignatureIssue::ValidationFailedSignatureMismatch",e[e["CorsIssue::LocalNetworkAccessPermissionDenied"]=111]="CorsIssue::LocalNetworkAccessPermissionDenied",e[e["SRIMessageSignatureIssue::ValidationFailedIntegrityMismatch"]=112]="SRIMessageSignatureIssue::ValidationFailedIntegrityMismatch",e[e.MAX_VALUE=113]="MAX_VALUE"}(de||(de={})),function(e){e[e.af=1]="af",e[e.am=2]="am",e[e.ar=3]="ar",e[e.as=4]="as",e[e.az=5]="az",e[e.be=6]="be",e[e.bg=7]="bg",e[e.bn=8]="bn",e[e.bs=9]="bs",e[e.ca=10]="ca",e[e.cs=11]="cs",e[e.cy=12]="cy",e[e.da=13]="da",e[e.de=14]="de",e[e.el=15]="el",e[e["en-GB"]=16]="en-GB",e[e["en-US"]=17]="en-US",e[e["es-419"]=18]="es-419",e[e.es=19]="es",e[e.et=20]="et",e[e.eu=21]="eu",e[e.fa=22]="fa",e[e.fi=23]="fi",e[e.fil=24]="fil",e[e["fr-CA"]=25]="fr-CA",e[e.fr=26]="fr",e[e.gl=27]="gl",e[e.gu=28]="gu",e[e.he=29]="he",e[e.hi=30]="hi",e[e.hr=31]="hr",e[e.hu=32]="hu",e[e.hy=33]="hy",e[e.id=34]="id",e[e.is=35]="is",e[e.it=36]="it",e[e.ja=37]="ja",e[e.ka=38]="ka",e[e.kk=39]="kk",e[e.km=40]="km",e[e.kn=41]="kn",e[e.ko=42]="ko",e[e.ky=43]="ky",e[e.lo=44]="lo",e[e.lt=45]="lt",e[e.lv=46]="lv",e[e.mk=47]="mk",e[e.ml=48]="ml",e[e.mn=49]="mn",e[e.mr=50]="mr",e[e.ms=51]="ms",e[e.my=52]="my",e[e.ne=53]="ne",e[e.nl=54]="nl",e[e.no=55]="no",e[e.or=56]="or",e[e.pa=57]="pa",e[e.pl=58]="pl",e[e["pt-PT"]=59]="pt-PT",e[e.pt=60]="pt",e[e.ro=61]="ro",e[e.ru=62]="ru",e[e.si=63]="si",e[e.sk=64]="sk",e[e.sl=65]="sl",e[e.sq=66]="sq",e[e["sr-Latn"]=67]="sr-Latn",e[e.sr=68]="sr",e[e.sv=69]="sv",e[e.sw=70]="sw",e[e.ta=71]="ta",e[e.te=72]="te",e[e.th=73]="th",e[e.tr=74]="tr",e[e.uk=75]="uk",e[e.ur=76]="ur",e[e.uz=77]="uz",e[e.vi=78]="vi",e[e.zh=79]="zh",e[e["zh-HK"]=80]="zh-HK",e[e["zh-TW"]=81]="zh-TW",e[e.zu=82]="zu",e[e.MAX_VALUE=83]="MAX_VALUE"}(ce||(ce={})),function(e){e[e.OtherSection=0]="OtherSection",e[e.Identity=1]="Identity",e[e.Presentation=2]="Presentation",e[e["Protocol Handlers"]=3]="Protocol Handlers",e[e.Icons=4]="Icons",e[e["Window Controls Overlay"]=5]="Window Controls Overlay",e[e.MAX_VALUE=6]="MAX_VALUE"}(le||(le={}));var ge=Object.freeze({__proto__:null,get Action(){return J},get DevtoolsExperiments(){return se},get ElementsSidebarTabCodes(){return re},get IssueCreated(){return de},get IssueExpanded(){return ie},get IssueResourceOpened(){return ae},get KeybindSetSettings(){return ne},get KeyboardShortcutAction(){return oe},get Language(){return ce},get ManifestSectionCodes(){return le},get MediaTypes(){return te},get PanelCodes(){return Z},get PanelWithLocation(){return ee},UserMetrics:me});const pe=new me,he=K();export{U as AidaClient,F as InspectorFrontendHost,i as InspectorFrontendHostAPI,X as Platform,ue as RNPerfMetrics,v as ResourceLoader,ge as UserMetrics,he as rnPerfMetrics,pe as userMetrics}; diff --git a/packages/debugger-frontend/dist/third-party/front_end/core/sdk/sdk.js b/packages/debugger-frontend/dist/third-party/front_end/core/sdk/sdk.js index ad3de62f492d68..3ffed164c35e37 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/core/sdk/sdk.js +++ b/packages/debugger-frontend/dist/third-party/front_end/core/sdk/sdk.js @@ -1 +1 @@ -import*as e from"../common/common.js";import*as t from"../../models/text_utils/text_utils.js";import*as n from"../i18n/i18n.js";import*as r from"../platform/platform.js";import{assertNotNullOrUndefined as s,UserVisibleError as i}from"../platform/platform.js";import*as o from"../root/root.js";import*as a from"../host/host.js";import*as l from"../protocol_client/protocol_client.js";import*as d from"../../third_party/codemirror.next/codemirror.next.js";const c=new Map;class h extends e.ObjectWrapper.ObjectWrapper{#e;constructor(e){super(),this.#e=e}target(){return this.#e}async preSuspendModel(e){}async suspendModel(e){}async resumeModel(){}async postResumeModel(){}dispose(){}static register(e,t){if(t.early&&!t.autostart)throw new Error(`Error registering model ${e.name}: early models must be autostarted.`);c.set(e,t)}static get registeredModels(){return c}}var u=Object.freeze({__proto__:null,SDKModel:h});const g=[{inherited:!0,name:"-webkit-border-horizontal-spacing"},{name:"-webkit-border-image"},{inherited:!0,name:"-webkit-border-vertical-spacing"},{keywords:["stretch","start","center","end","baseline"],name:"-webkit-box-align"},{keywords:["slice","clone"],name:"-webkit-box-decoration-break"},{keywords:["normal","reverse"],name:"-webkit-box-direction"},{name:"-webkit-box-flex"},{name:"-webkit-box-ordinal-group"},{keywords:["horizontal","vertical"],name:"-webkit-box-orient"},{keywords:["start","center","end","justify"],name:"-webkit-box-pack"},{name:"-webkit-box-reflect"},{longhands:["break-after"],name:"-webkit-column-break-after"},{longhands:["break-before"],name:"-webkit-column-break-before"},{longhands:["break-inside"],name:"-webkit-column-break-inside"},{inherited:!0,name:"-webkit-font-smoothing"},{inherited:!0,keywords:["auto","loose","normal","strict","after-white-space","anywhere"],name:"-webkit-line-break"},{keywords:["none"],name:"-webkit-line-clamp"},{inherited:!0,name:"-webkit-locale"},{longhands:["-webkit-mask-box-image-source","-webkit-mask-box-image-slice","-webkit-mask-box-image-width","-webkit-mask-box-image-outset","-webkit-mask-box-image-repeat"],name:"-webkit-mask-box-image"},{name:"-webkit-mask-box-image-outset"},{name:"-webkit-mask-box-image-repeat"},{name:"-webkit-mask-box-image-slice"},{name:"-webkit-mask-box-image-source"},{name:"-webkit-mask-box-image-width"},{name:"-webkit-mask-position-x"},{name:"-webkit-mask-position-y"},{name:"-webkit-perspective-origin-x"},{name:"-webkit-perspective-origin-y"},{inherited:!0,keywords:["logical","visual"],name:"-webkit-rtl-ordering"},{inherited:!0,name:"-webkit-ruby-position"},{inherited:!0,name:"-webkit-tap-highlight-color"},{inherited:!0,name:"-webkit-text-combine"},{inherited:!0,name:"-webkit-text-decorations-in-effect"},{inherited:!0,name:"-webkit-text-fill-color"},{inherited:!0,name:"-webkit-text-orientation"},{inherited:!0,keywords:["none","disc","circle","square"],name:"-webkit-text-security"},{inherited:!0,longhands:["-webkit-text-stroke-width","-webkit-text-stroke-color"],name:"-webkit-text-stroke"},{inherited:!0,name:"-webkit-text-stroke-color"},{inherited:!0,name:"-webkit-text-stroke-width"},{name:"-webkit-transform-origin-x"},{name:"-webkit-transform-origin-y"},{name:"-webkit-transform-origin-z"},{keywords:["auto","none","element"],name:"-webkit-user-drag"},{inherited:!0,keywords:["read-only","read-write","read-write-plaintext-only"],name:"-webkit-user-modify"},{inherited:!0,name:"-webkit-writing-mode"},{inherited:!0,keywords:["auto","currentcolor"],name:"accent-color"},{name:"additive-symbols"},{name:"align-content"},{name:"align-items"},{name:"align-self"},{keywords:["auto","baseline","alphabetic","ideographic","middle","central","mathematical","before-edge","text-before-edge","after-edge","text-after-edge","hanging"],name:"alignment-baseline"},{longhands:["-webkit-border-horizontal-spacing","-webkit-border-vertical-spacing","-webkit-box-align","-webkit-box-decoration-break","-webkit-box-direction","-webkit-box-flex","-webkit-box-ordinal-group","-webkit-box-orient","-webkit-box-pack","-webkit-box-reflect","-webkit-font-smoothing","-webkit-line-break","-webkit-line-clamp","-webkit-locale","-webkit-mask-box-image-outset","-webkit-mask-box-image-repeat","-webkit-mask-box-image-slice","-webkit-mask-box-image-source","-webkit-mask-box-image-width","-webkit-mask-position-x","-webkit-mask-position-y","-webkit-rtl-ordering","-webkit-ruby-position","-webkit-tap-highlight-color","-webkit-text-combine","-webkit-text-decorations-in-effect","-webkit-text-fill-color","-webkit-text-orientation","-webkit-text-security","-webkit-text-stroke-color","-webkit-text-stroke-width","-webkit-user-drag","-webkit-writing-mode","accent-color","additive-symbols","align-content","align-items","align-self","alignment-baseline","anchor-name","anchor-scope","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","animation-trigger-exit-range-end","animation-trigger-exit-range-start","animation-trigger-range-end","animation-trigger-range-start","animation-trigger-timeline","animation-trigger-type","app-region","appearance","ascent-override","aspect-ratio","backdrop-filter","backface-visibility","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position-x","background-position-y","background-repeat","background-size","base-palette","baseline-shift","baseline-source","block-size","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start-color","border-block-start-style","border-block-start-width","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-end-end-radius","border-end-start-radius","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-start-end-radius","border-start-start-radius","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","buffered-rendering","caption-side","caret-animation","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","color-scheme","column-count","column-fill","column-gap","column-height","column-rule-break","column-rule-color","column-rule-outset","column-rule-style","column-rule-width","column-span","column-width","column-wrap","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-width","container-name","container-type","content","content-visibility","corner-bottom-left-shape","corner-bottom-right-shape","corner-end-end-shape","corner-end-start-shape","corner-start-end-shape","corner-start-start-shape","corner-top-left-shape","corner-top-right-shape","counter-increment","counter-reset","counter-set","cursor","cx","cy","d","descent-override","display","dominant-baseline","dynamic-range-limit","empty-cells","fallback","field-sizing","fill","fill-opacity","fill-rule","filter","flex-basis","flex-direction","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","font-display","font-family","font-feature-settings","font-kerning","font-optical-sizing","font-palette","font-size","font-size-adjust","font-stretch","font-style","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap-rule-paint-order","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column-end","grid-column-start","grid-row-end","grid-row-start","grid-template-areas","grid-template-columns","grid-template-rows","height","hyphenate-character","hyphenate-limit-chars","hyphens","image-orientation","image-rendering","inherits","initial-letter","initial-value","inline-size","inset-block-end","inset-block-start","inset-inline-end","inset-inline-start","interactivity","interest-target-hide-delay","interest-target-show-delay","interpolate-size","isolation","justify-content","justify-items","justify-self","left","letter-spacing","lighting-color","line-break","line-clamp","line-gap-override","line-height","list-style-image","list-style-position","list-style-type","margin-block-end","margin-block-start","margin-bottom","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marker-end","marker-mid","marker-start","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-repeat","mask-size","mask-type","masonry-auto-tracks","masonry-direction","masonry-fill","masonry-slack","masonry-template-tracks","masonry-track-end","masonry-track-start","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","navigation","negative","object-fit","object-position","object-view-box","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","origin-trial-test-property","orphans","outline-color","outline-offset","outline-style","outline-width","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","override-colors","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","pad","padding-block-end","padding-block-start","padding-bottom","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-orientation","paint-order","perspective","perspective-origin","pointer-events","position","position-anchor","position-area","position-try-fallbacks","position-try-order","position-visibility","prefix","print-color-adjust","quotes","r","range","reading-flow","reading-order","resize","result","right","rotate","row-gap","row-rule-break","row-rule-color","row-rule-outset","row-rule-style","row-rule-width","ruby-align","ruby-position","rx","ry","scale","scroll-behavior","scroll-initial-target","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-marker-contain","scroll-marker-group","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-start-block","scroll-start-inline","scroll-start-x","scroll-start-y","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","size","size-adjust","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","suffix","symbols","syntax","system","tab-size","table-layout","text-align","text-align-last","text-anchor","text-autospace","text-box-edge","text-box-trim","text-combine-upright","text-decoration-color","text-decoration-line","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-spacing-trim","text-transform","text-underline-offset","text-underline-position","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","types","unicode-range","user-select","vector-effect","vertical-align","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-class","view-transition-group","view-transition-name","visibility","white-space-collapse","widows","width","will-change","word-break","word-spacing","writing-mode","x","y","z-index","zoom"],name:"all"},{keywords:["none"],name:"anchor-name"},{keywords:["none","all"],name:"anchor-scope"},{longhands:["animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","animation-name","animation-timeline","animation-range-start","animation-range-end"],name:"animation"},{keywords:["replace","add","accumulate"],name:"animation-composition"},{name:"animation-delay"},{keywords:["normal","reverse","alternate","alternate-reverse"],name:"animation-direction"},{name:"animation-duration"},{keywords:["none","forwards","backwards","both"],name:"animation-fill-mode"},{keywords:["infinite"],name:"animation-iteration-count"},{keywords:["none"],name:"animation-name"},{keywords:["running","paused"],name:"animation-play-state"},{longhands:["animation-range-start","animation-range-end"],name:"animation-range"},{name:"animation-range-end"},{name:"animation-range-start"},{keywords:["none","auto"],name:"animation-timeline"},{keywords:["linear","ease","ease-in","ease-out","ease-in-out","jump-both","jump-end","jump-none","jump-start","step-start","step-end"],name:"animation-timing-function"},{longhands:["animation-trigger-timeline","animation-trigger-type","animation-trigger-range-start","animation-trigger-range-end","animation-trigger-exit-range-start","animation-trigger-exit-range-end"],name:"animation-trigger"},{longhands:["animation-trigger-exit-range-start","animation-trigger-exit-range-end"],name:"animation-trigger-exit-range"},{name:"animation-trigger-exit-range-end"},{name:"animation-trigger-exit-range-start"},{longhands:["animation-trigger-range-start","animation-trigger-range-end"],name:"animation-trigger-range"},{name:"animation-trigger-range-end"},{name:"animation-trigger-range-start"},{keywords:["none","auto"],name:"animation-trigger-timeline"},{keywords:["once","repeat","alternate","state"],name:"animation-trigger-type"},{keywords:["none","drag","no-drag"],name:"app-region"},{name:"appearance"},{name:"ascent-override"},{keywords:["auto"],name:"aspect-ratio"},{keywords:["none"],name:"backdrop-filter"},{keywords:["visible","hidden"],name:"backface-visibility"},{longhands:["background-image","background-position-x","background-position-y","background-size","background-repeat","background-attachment","background-origin","background-clip","background-color"],name:"background"},{keywords:["scroll","fixed","local"],name:"background-attachment"},{keywords:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],name:"background-blend-mode"},{keywords:["border-box","padding-box","content-box","text"],name:"background-clip"},{keywords:["currentcolor"],name:"background-color"},{keywords:["auto","none"],name:"background-image"},{keywords:["border-box","padding-box","content-box"],name:"background-origin"},{longhands:["background-position-x","background-position-y"],name:"background-position"},{name:"background-position-x"},{name:"background-position-y"},{name:"background-repeat"},{keywords:["auto","cover","contain"],name:"background-size"},{name:"base-palette"},{keywords:["baseline","sub","super"],name:"baseline-shift"},{keywords:["auto","first","last"],name:"baseline-source"},{keywords:["auto"],name:"block-size"},{longhands:["border-top-color","border-top-style","border-top-width","border-right-color","border-right-style","border-right-width","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat"],name:"border"},{longhands:["border-block-start-color","border-block-start-style","border-block-start-width","border-block-end-color","border-block-end-style","border-block-end-width"],name:"border-block"},{longhands:["border-block-start-color","border-block-end-color"],name:"border-block-color"},{longhands:["border-block-end-width","border-block-end-style","border-block-end-color"],name:"border-block-end"},{name:"border-block-end-color"},{name:"border-block-end-style"},{name:"border-block-end-width"},{longhands:["border-block-start-width","border-block-start-style","border-block-start-color"],name:"border-block-start"},{name:"border-block-start-color"},{name:"border-block-start-style"},{name:"border-block-start-width"},{longhands:["border-block-start-style","border-block-end-style"],name:"border-block-style"},{longhands:["border-block-start-width","border-block-end-width"],name:"border-block-width"},{longhands:["border-bottom-width","border-bottom-style","border-bottom-color"],name:"border-bottom"},{keywords:["currentcolor"],name:"border-bottom-color"},{name:"border-bottom-left-radius"},{name:"border-bottom-right-radius"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"border-bottom-style"},{keywords:["thin","medium","thick"],name:"border-bottom-width"},{inherited:!0,keywords:["separate","collapse"],name:"border-collapse"},{longhands:["border-top-color","border-right-color","border-bottom-color","border-left-color"],name:"border-color"},{name:"border-end-end-radius"},{name:"border-end-start-radius"},{longhands:["border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat"],name:"border-image"},{name:"border-image-outset"},{keywords:["stretch","repeat","round","space"],name:"border-image-repeat"},{name:"border-image-slice"},{keywords:["none"],name:"border-image-source"},{keywords:["auto"],name:"border-image-width"},{longhands:["border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-end-color","border-inline-end-style","border-inline-end-width"],name:"border-inline"},{longhands:["border-inline-start-color","border-inline-end-color"],name:"border-inline-color"},{longhands:["border-inline-end-width","border-inline-end-style","border-inline-end-color"],name:"border-inline-end"},{name:"border-inline-end-color"},{name:"border-inline-end-style"},{name:"border-inline-end-width"},{longhands:["border-inline-start-width","border-inline-start-style","border-inline-start-color"],name:"border-inline-start"},{name:"border-inline-start-color"},{name:"border-inline-start-style"},{name:"border-inline-start-width"},{longhands:["border-inline-start-style","border-inline-end-style"],name:"border-inline-style"},{longhands:["border-inline-start-width","border-inline-end-width"],name:"border-inline-width"},{longhands:["border-left-width","border-left-style","border-left-color"],name:"border-left"},{keywords:["currentcolor"],name:"border-left-color"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"border-left-style"},{keywords:["thin","medium","thick"],name:"border-left-width"},{longhands:["border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"],name:"border-radius"},{longhands:["border-right-width","border-right-style","border-right-color"],name:"border-right"},{keywords:["currentcolor"],name:"border-right-color"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"border-right-style"},{keywords:["thin","medium","thick"],name:"border-right-width"},{inherited:!0,longhands:["-webkit-border-horizontal-spacing","-webkit-border-vertical-spacing"],name:"border-spacing"},{name:"border-start-end-radius"},{name:"border-start-start-radius"},{keywords:["none"],longhands:["border-top-style","border-right-style","border-bottom-style","border-left-style"],name:"border-style"},{longhands:["border-top-width","border-top-style","border-top-color"],name:"border-top"},{keywords:["currentcolor"],name:"border-top-color"},{name:"border-top-left-radius"},{name:"border-top-right-radius"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"border-top-style"},{keywords:["thin","medium","thick"],name:"border-top-width"},{longhands:["border-top-width","border-right-width","border-bottom-width","border-left-width"],name:"border-width"},{keywords:["auto"],name:"bottom"},{keywords:["slice","clone"],name:"box-decoration-break"},{keywords:["none"],name:"box-shadow"},{keywords:["content-box","border-box"],name:"box-sizing"},{keywords:["auto","avoid","avoid-column","avoid-page","column","left","page","recto","right","verso"],name:"break-after"},{keywords:["auto","avoid","avoid-column","avoid-page","column","left","page","recto","right","verso"],name:"break-before"},{keywords:["auto","avoid","avoid-column","avoid-page"],name:"break-inside"},{keywords:["auto","dynamic","static"],name:"buffered-rendering"},{inherited:!0,keywords:["top","bottom"],name:"caption-side"},{inherited:!0,keywords:["auto","manual"],name:"caret-animation"},{inherited:!0,keywords:["auto","currentcolor"],name:"caret-color"},{keywords:["none","left","right","both","inline-start","inline-end"],name:"clear"},{keywords:["auto"],name:"clip"},{keywords:["border-box","padding-box","content-box","margin-box","fill-box","stroke-box","view-box","none"],name:"clip-path"},{inherited:!0,keywords:["nonzero","evenodd"],name:"clip-rule"},{inherited:!0,keywords:["currentcolor"],name:"color"},{inherited:!0,keywords:["auto","srgb","linearrgb"],name:"color-interpolation"},{inherited:!0,keywords:["auto","srgb","linearrgb"],name:"color-interpolation-filters"},{inherited:!0,keywords:["auto","optimizespeed","optimizequality"],name:"color-rendering"},{inherited:!0,name:"color-scheme"},{keywords:["auto"],name:"column-count"},{keywords:["balance","auto"],name:"column-fill"},{keywords:["normal"],name:"column-gap"},{keywords:["auto"],name:"column-height"},{longhands:["column-rule-width","column-rule-style","column-rule-color"],name:"column-rule"},{inherited:!1,keywords:["none","spanning-item","intersection"],name:"column-rule-break"},{keywords:["currentcolor"],name:"column-rule-color"},{inherited:!1,name:"column-rule-outset"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"column-rule-style"},{keywords:["thin","medium","thick"],name:"column-rule-width"},{keywords:["none","all"],name:"column-span"},{keywords:["auto"],name:"column-width"},{keywords:["nowrap","wrap"],name:"column-wrap"},{longhands:["column-width","column-count"],name:"columns"},{keywords:["none","strict","content","size","layout","style","paint","inline-size","block-size"],name:"contain"},{name:"contain-intrinsic-block-size"},{keywords:["none"],name:"contain-intrinsic-height"},{name:"contain-intrinsic-inline-size"},{longhands:["contain-intrinsic-width","contain-intrinsic-height"],name:"contain-intrinsic-size"},{keywords:["none"],name:"contain-intrinsic-width"},{longhands:["container-name","container-type"],name:"container"},{keywords:["none"],name:"container-name"},{keywords:["normal","inline-size","size","scroll-state"],name:"container-type"},{name:"content"},{keywords:["visible","auto","hidden"],name:"content-visibility"},{name:"corner-bottom-left-shape"},{name:"corner-bottom-right-shape"},{name:"corner-end-end-shape"},{name:"corner-end-start-shape"},{longhands:["corner-top-left-shape","corner-top-right-shape","corner-bottom-right-shape","corner-bottom-left-shape"],name:"corner-shape"},{name:"corner-start-end-shape"},{name:"corner-start-start-shape"},{name:"corner-top-left-shape"},{name:"corner-top-right-shape"},{keywords:["none"],name:"counter-increment"},{keywords:["none"],name:"counter-reset"},{keywords:["none"],name:"counter-set"},{inherited:!0,keywords:["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","e-resize","n-resize","ne-resize","nw-resize","s-resize","se-resize","sw-resize","w-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","col-resize","row-resize","all-scroll","zoom-in","zoom-out","grab","grabbing"],name:"cursor"},{name:"cx"},{name:"cy"},{keywords:["none"],name:"d"},{name:"descent-override"},{inherited:!0,keywords:["ltr","rtl"],name:"direction"},{keywords:["inline","block","list-item","inline-block","table","inline-table","table-row-group","table-header-group","table-footer-group","table-row","table-column-group","table-column","table-cell","table-caption","-webkit-box","-webkit-inline-box","flex","inline-flex","grid","inline-grid","contents","flow-root","none","flow","math","ruby","ruby-text","masonry","inline-masonry"],name:"display"},{inherited:!0,keywords:["auto","alphabetic","ideographic","middle","central","mathematical","hanging","use-script","no-change","reset-size","text-after-edge","text-before-edge"],name:"dominant-baseline"},{inherited:!0,keywords:["standard","no-limit","constrained"],name:"dynamic-range-limit"},{inherited:!0,keywords:["show","hide"],name:"empty-cells"},{name:"fallback"},{keywords:["fixed","content"],name:"field-sizing"},{inherited:!0,name:"fill"},{inherited:!0,name:"fill-opacity"},{inherited:!0,keywords:["nonzero","evenodd"],name:"fill-rule"},{keywords:["none"],name:"filter"},{longhands:["flex-grow","flex-shrink","flex-basis"],name:"flex"},{keywords:["auto","fit-content","min-content","max-content","content"],name:"flex-basis"},{keywords:["row","row-reverse","column","column-reverse"],name:"flex-direction"},{longhands:["flex-direction","flex-wrap"],name:"flex-flow"},{name:"flex-grow"},{name:"flex-shrink"},{keywords:["nowrap","wrap","wrap-reverse"],name:"flex-wrap"},{keywords:["none","left","right","inline-start","inline-end"],name:"float"},{keywords:["currentcolor"],name:"flood-color"},{name:"flood-opacity"},{inherited:!0,longhands:["font-style","font-variant-ligatures","font-variant-caps","font-variant-numeric","font-variant-east-asian","font-variant-alternates","font-variant-position","font-variant-emoji","font-weight","font-stretch","font-size","line-height","font-family","font-optical-sizing","font-size-adjust","font-kerning","font-feature-settings","font-variation-settings"],name:"font"},{name:"font-display"},{inherited:!0,name:"font-family"},{inherited:!0,keywords:["normal"],name:"font-feature-settings"},{inherited:!0,keywords:["auto","normal","none"],name:"font-kerning"},{inherited:!0,keywords:["auto","none"],name:"font-optical-sizing"},{inherited:!0,keywords:["normal","light","dark"],name:"font-palette"},{inherited:!0,keywords:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller","-webkit-xxx-large"],name:"font-size"},{inherited:!0,keywords:["none","ex-height","cap-height","ch-width","ic-width","ic-height","from-font"],name:"font-size-adjust"},{inherited:!0,keywords:["normal","ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded"],name:"font-stretch"},{inherited:!0,keywords:["normal","italic","oblique"],name:"font-style"},{inherited:!0,longhands:["font-synthesis-weight","font-synthesis-style","font-synthesis-small-caps"],name:"font-synthesis"},{inherited:!0,keywords:["auto","none"],name:"font-synthesis-small-caps"},{inherited:!0,keywords:["auto","none"],name:"font-synthesis-style"},{inherited:!0,keywords:["auto","none"],name:"font-synthesis-weight"},{inherited:!0,longhands:["font-variant-ligatures","font-variant-caps","font-variant-alternates","font-variant-numeric","font-variant-east-asian","font-variant-position","font-variant-emoji"],name:"font-variant"},{inherited:!0,keywords:["normal"],name:"font-variant-alternates"},{inherited:!0,keywords:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"],name:"font-variant-caps"},{inherited:!0,keywords:["normal","jis78","jis83","jis90","jis04","simplified","traditional","full-width","proportional-width","ruby"],name:"font-variant-east-asian"},{inherited:!0,keywords:["normal","text","emoji","unicode"],name:"font-variant-emoji"},{inherited:!0,keywords:["normal","none","common-ligatures","no-common-ligatures","discretionary-ligatures","no-discretionary-ligatures","historical-ligatures","no-historical-ligatures","contextual","no-contextual"],name:"font-variant-ligatures"},{inherited:!0,keywords:["normal","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions","ordinal","slashed-zero"],name:"font-variant-numeric"},{inherited:!0,keywords:["normal","sub","super"],name:"font-variant-position"},{inherited:!0,keywords:["normal"],name:"font-variation-settings"},{inherited:!0,keywords:["normal","bold","bolder","lighter"],name:"font-weight"},{inherited:!0,keywords:["auto","none","preserve-parent-color"],name:"forced-color-adjust"},{longhands:["row-gap","column-gap"],name:"gap"},{inherited:!1,keywords:["row-over-column","column-over-row"],name:"gap-rule-paint-order"},{longhands:["grid-template-rows","grid-template-columns","grid-template-areas","grid-auto-flow","grid-auto-rows","grid-auto-columns"],name:"grid"},{longhands:["grid-row-start","grid-column-start","grid-row-end","grid-column-end"],name:"grid-area"},{keywords:["auto","min-content","max-content"],name:"grid-auto-columns"},{keywords:["row","column"],name:"grid-auto-flow"},{keywords:["auto","min-content","max-content"],name:"grid-auto-rows"},{longhands:["grid-column-start","grid-column-end"],name:"grid-column"},{keywords:["auto"],name:"grid-column-end"},{keywords:["auto"],name:"grid-column-start"},{longhands:["grid-row-start","grid-row-end"],name:"grid-row"},{keywords:["auto"],name:"grid-row-end"},{keywords:["auto"],name:"grid-row-start"},{longhands:["grid-template-rows","grid-template-columns","grid-template-areas"],name:"grid-template"},{keywords:["none"],name:"grid-template-areas"},{keywords:["none"],name:"grid-template-columns"},{keywords:["none"],name:"grid-template-rows"},{keywords:["auto","fit-content","min-content","max-content"],name:"height"},{inherited:!0,name:"hyphenate-character"},{inherited:!0,keywords:["auto"],name:"hyphenate-limit-chars"},{inherited:!0,keywords:["none","manual","auto"],name:"hyphens"},{inherited:!0,name:"image-orientation"},{inherited:!0,keywords:["auto","optimizespeed","optimizequality","-webkit-optimize-contrast","pixelated"],name:"image-rendering"},{name:"inherits"},{inherited:!1,keywords:["drop","normal","raise"],name:"initial-letter"},{name:"initial-value"},{keywords:["auto"],name:"inline-size"},{longhands:["top","right","bottom","left"],name:"inset"},{longhands:["inset-block-start","inset-block-end"],name:"inset-block"},{name:"inset-block-end"},{name:"inset-block-start"},{longhands:["inset-inline-start","inset-inline-end"],name:"inset-inline"},{name:"inset-inline-end"},{name:"inset-inline-start"},{inherited:!0,keywords:["auto","inert"],name:"interactivity"},{longhands:["interest-target-show-delay","interest-target-hide-delay"],name:"interest-target-delay"},{name:"interest-target-hide-delay"},{name:"interest-target-show-delay"},{inherited:!0,keywords:["numeric-only","allow-keywords"],name:"interpolate-size"},{keywords:["auto","isolate"],name:"isolation"},{name:"justify-content"},{name:"justify-items"},{name:"justify-self"},{keywords:["auto"],name:"left"},{inherited:!0,keywords:["normal"],name:"letter-spacing"},{keywords:["currentcolor"],name:"lighting-color"},{inherited:!0,keywords:["auto","loose","normal","strict","anywhere"],name:"line-break"},{keywords:["none","auto"],name:"line-clamp"},{name:"line-gap-override"},{inherited:!0,keywords:["normal"],name:"line-height"},{inherited:!0,longhands:["list-style-position","list-style-image","list-style-type"],name:"list-style"},{inherited:!0,keywords:["none"],name:"list-style-image"},{inherited:!0,keywords:["outside","inside"],name:"list-style-position"},{inherited:!0,keywords:["disc","circle","square","disclosure-open","disclosure-closed","decimal","none"],name:"list-style-type"},{longhands:["margin-top","margin-right","margin-bottom","margin-left"],name:"margin"},{longhands:["margin-block-start","margin-block-end"],name:"margin-block"},{keywords:["auto"],name:"margin-block-end"},{keywords:["auto"],name:"margin-block-start"},{keywords:["auto"],name:"margin-bottom"},{longhands:["margin-inline-start","margin-inline-end"],name:"margin-inline"},{keywords:["auto"],name:"margin-inline-end"},{keywords:["auto"],name:"margin-inline-start"},{keywords:["auto"],name:"margin-left"},{keywords:["auto"],name:"margin-right"},{keywords:["auto"],name:"margin-top"},{inherited:!0,longhands:["marker-start","marker-mid","marker-end"],name:"marker"},{inherited:!0,keywords:["none"],name:"marker-end"},{inherited:!0,keywords:["none"],name:"marker-mid"},{inherited:!0,keywords:["none"],name:"marker-start"},{longhands:["mask-image","-webkit-mask-position-x","-webkit-mask-position-y","mask-size","mask-repeat","mask-origin","mask-clip","mask-composite","mask-mode"],name:"mask"},{name:"mask-clip"},{name:"mask-composite"},{name:"mask-image"},{name:"mask-mode"},{name:"mask-origin"},{longhands:["-webkit-mask-position-x","-webkit-mask-position-y"],name:"mask-position"},{name:"mask-repeat"},{name:"mask-size"},{keywords:["luminance","alpha"],name:"mask-type"},{keywords:["auto","min-content","max-content"],name:"masonry-auto-tracks"},{keywords:["row","row-reverse","column","column-reverse"],name:"masonry-direction"},{keywords:["normal","reverse"],name:"masonry-fill"},{longhands:["masonry-direction","masonry-fill"],name:"masonry-flow"},{keywords:["normal"],name:"masonry-slack"},{name:"masonry-template-tracks"},{longhands:["masonry-track-start","masonry-track-end"],name:"masonry-track"},{keywords:["auto"],name:"masonry-track-end"},{keywords:["auto"],name:"masonry-track-start"},{inherited:!0,name:"math-depth"},{inherited:!0,keywords:["normal","compact"],name:"math-shift"},{inherited:!0,keywords:["normal","compact"],name:"math-style"},{keywords:["none"],name:"max-block-size"},{keywords:["none"],name:"max-height"},{keywords:["none"],name:"max-inline-size"},{keywords:["none"],name:"max-width"},{name:"min-block-size"},{name:"min-height"},{name:"min-inline-size"},{name:"min-width"},{keywords:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],name:"mix-blend-mode"},{name:"navigation"},{name:"negative"},{keywords:["fill","contain","cover","none","scale-down"],name:"object-fit"},{name:"object-position"},{keywords:["none"],name:"object-view-box"},{longhands:["offset-position","offset-path","offset-distance","offset-rotate","offset-anchor"],name:"offset"},{keywords:["auto"],name:"offset-anchor"},{name:"offset-distance"},{keywords:["none"],name:"offset-path"},{keywords:["auto","normal"],name:"offset-position"},{keywords:["auto","reverse"],name:"offset-rotate"},{name:"opacity"},{name:"order"},{keywords:["normal","none"],name:"origin-trial-test-property"},{inherited:!0,name:"orphans"},{longhands:["outline-color","outline-style","outline-width"],name:"outline"},{keywords:["currentcolor"],name:"outline-color"},{name:"outline-offset"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"outline-style"},{keywords:["thin","medium","thick"],name:"outline-width"},{longhands:["overflow-x","overflow-y"],name:"overflow"},{inherited:!1,keywords:["visible","none","auto"],name:"overflow-anchor"},{name:"overflow-block"},{keywords:["border-box","content-box","padding-box"],name:"overflow-clip-margin"},{name:"overflow-inline"},{inherited:!0,keywords:["normal","break-word","anywhere"],name:"overflow-wrap"},{keywords:["visible","hidden","scroll","auto","overlay","clip"],name:"overflow-x"},{keywords:["visible","hidden","scroll","auto","overlay","clip"],name:"overflow-y"},{keywords:["none","auto"],name:"overlay"},{name:"override-colors"},{longhands:["overscroll-behavior-x","overscroll-behavior-y"],name:"overscroll-behavior"},{name:"overscroll-behavior-block"},{name:"overscroll-behavior-inline"},{keywords:["auto","contain","none"],name:"overscroll-behavior-x"},{keywords:["auto","contain","none"],name:"overscroll-behavior-y"},{name:"pad"},{longhands:["padding-top","padding-right","padding-bottom","padding-left"],name:"padding"},{longhands:["padding-block-start","padding-block-end"],name:"padding-block"},{name:"padding-block-end"},{name:"padding-block-start"},{name:"padding-bottom"},{longhands:["padding-inline-start","padding-inline-end"],name:"padding-inline"},{name:"padding-inline-end"},{name:"padding-inline-start"},{name:"padding-left"},{name:"padding-right"},{name:"padding-top"},{keywords:["auto"],name:"page"},{longhands:["break-after"],name:"page-break-after"},{longhands:["break-before"],name:"page-break-before"},{longhands:["break-inside"],name:"page-break-inside"},{name:"page-orientation"},{inherited:!0,keywords:["normal","fill","stroke","markers"],name:"paint-order"},{keywords:["none"],name:"perspective"},{name:"perspective-origin"},{longhands:["align-content","justify-content"],name:"place-content"},{longhands:["align-items","justify-items"],name:"place-items"},{longhands:["align-self","justify-self"],name:"place-self"},{inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"],name:"pointer-events"},{keywords:["static","relative","absolute","fixed","sticky"],name:"position"},{keywords:["auto"],name:"position-anchor"},{keywords:["none","top","bottom","center","left","right","x-start","x-end","y-start","y-end","start","end","self-start","self-end","all"],name:"position-area"},{longhands:["position-try-order","position-try-fallbacks"],name:"position-try"},{keywords:["none","flip-block","flip-inline","flip-start"],name:"position-try-fallbacks"},{keywords:["normal","most-width","most-height","most-block-size","most-inline-size"],name:"position-try-order"},{keywords:["always","anchors-visible","no-overflow"],name:"position-visibility"},{name:"prefix"},{inherited:!0,keywords:["economy","exact"],name:"print-color-adjust"},{inherited:!0,keywords:["auto","none"],name:"quotes"},{name:"r"},{name:"range"},{keywords:["normal","flex-visual","flex-flow","grid-rows","grid-columns","grid-order","source-order"],name:"reading-flow"},{name:"reading-order"},{keywords:["none","both","horizontal","vertical","block","inline"],name:"resize"},{name:"result"},{keywords:["auto"],name:"right"},{name:"rotate"},{keywords:["normal"],name:"row-gap"},{inherited:!1,keywords:["none","spanning-item","intersection"],name:"row-rule-break"},{keywords:["currentcolor"],name:"row-rule-color"},{inherited:!1,name:"row-rule-outset"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"row-rule-style"},{keywords:["thin","medium","thick"],name:"row-rule-width"},{inherited:!0,keywords:["space-around","start","center","space-between"],name:"ruby-align"},{inherited:!0,keywords:["over","under"],name:"ruby-position"},{keywords:["auto"],name:"rx"},{keywords:["auto"],name:"ry"},{name:"scale"},{keywords:["auto","smooth"],name:"scroll-behavior"},{keywords:["none","nearest"],name:"scroll-initial-target"},{longhands:["scroll-margin-top","scroll-margin-right","scroll-margin-bottom","scroll-margin-left"],name:"scroll-margin"},{longhands:["scroll-margin-block-start","scroll-margin-block-end"],name:"scroll-margin-block"},{name:"scroll-margin-block-end"},{name:"scroll-margin-block-start"},{name:"scroll-margin-bottom"},{longhands:["scroll-margin-inline-start","scroll-margin-inline-end"],name:"scroll-margin-inline"},{name:"scroll-margin-inline-end"},{name:"scroll-margin-inline-start"},{name:"scroll-margin-left"},{name:"scroll-margin-right"},{name:"scroll-margin-top"},{keywords:["none","auto"],name:"scroll-marker-contain"},{keywords:["none","after","before"],name:"scroll-marker-group"},{longhands:["scroll-padding-top","scroll-padding-right","scroll-padding-bottom","scroll-padding-left"],name:"scroll-padding"},{longhands:["scroll-padding-block-start","scroll-padding-block-end"],name:"scroll-padding-block"},{keywords:["auto"],name:"scroll-padding-block-end"},{keywords:["auto"],name:"scroll-padding-block-start"},{keywords:["auto"],name:"scroll-padding-bottom"},{longhands:["scroll-padding-inline-start","scroll-padding-inline-end"],name:"scroll-padding-inline"},{keywords:["auto"],name:"scroll-padding-inline-end"},{keywords:["auto"],name:"scroll-padding-inline-start"},{keywords:["auto"],name:"scroll-padding-left"},{keywords:["auto"],name:"scroll-padding-right"},{keywords:["auto"],name:"scroll-padding-top"},{keywords:["none","start","end","center"],name:"scroll-snap-align"},{keywords:["normal","always"],name:"scroll-snap-stop"},{keywords:["none","x","y","block","inline","both","mandatory","proximity"],name:"scroll-snap-type"},{longhands:["scroll-start-block","scroll-start-inline"],name:"scroll-start"},{name:"scroll-start-block"},{name:"scroll-start-inline"},{name:"scroll-start-x"},{name:"scroll-start-y"},{longhands:["scroll-timeline-name","scroll-timeline-axis"],name:"scroll-timeline"},{name:"scroll-timeline-axis"},{name:"scroll-timeline-name"},{inherited:!0,keywords:["auto"],name:"scrollbar-color"},{inherited:!1,keywords:["auto","stable","both-edges"],name:"scrollbar-gutter"},{inherited:!1,keywords:["auto","thin","none"],name:"scrollbar-width"},{name:"shape-image-threshold"},{keywords:["none"],name:"shape-margin"},{keywords:["none"],name:"shape-outside"},{inherited:!0,keywords:["auto","optimizespeed","crispedges","geometricprecision"],name:"shape-rendering"},{name:"size"},{name:"size-adjust"},{inherited:!0,keywords:["none","normal","spell-out","digits","literal-punctuation","no-punctuation"],name:"speak"},{name:"speak-as"},{name:"src"},{keywords:["currentcolor"],name:"stop-color"},{name:"stop-opacity"},{inherited:!0,name:"stroke"},{inherited:!0,keywords:["none"],name:"stroke-dasharray"},{inherited:!0,name:"stroke-dashoffset"},{inherited:!0,keywords:["butt","round","square"],name:"stroke-linecap"},{inherited:!0,keywords:["miter","bevel","round"],name:"stroke-linejoin"},{inherited:!0,name:"stroke-miterlimit"},{inherited:!0,name:"stroke-opacity"},{inherited:!0,name:"stroke-width"},{name:"suffix"},{name:"symbols"},{name:"syntax"},{name:"system"},{inherited:!0,name:"tab-size"},{keywords:["auto","fixed"],name:"table-layout"},{inherited:!0,keywords:["left","right","center","justify","-webkit-left","-webkit-right","-webkit-center","start","end"],name:"text-align"},{inherited:!0,keywords:["auto","start","end","left","right","center","justify"],name:"text-align-last"},{inherited:!0,keywords:["start","middle","end"],name:"text-anchor"},{inherited:!0,keywords:["normal","no-autospace"],name:"text-autospace"},{longhands:["text-box-trim","text-box-edge"],name:"text-box"},{inherited:!0,name:"text-box-edge"},{keywords:["none","trim-start","trim-end","trim-both"],name:"text-box-trim"},{inherited:!0,keywords:["none","all"],name:"text-combine-upright"},{longhands:["text-decoration-line","text-decoration-thickness","text-decoration-style","text-decoration-color"],name:"text-decoration"},{keywords:["currentcolor"],name:"text-decoration-color"},{keywords:["none","underline","overline","line-through","blink","spelling-error","grammar-error"],name:"text-decoration-line"},{inherited:!0,keywords:["none","auto"],name:"text-decoration-skip-ink"},{keywords:["solid","double","dotted","dashed","wavy"],name:"text-decoration-style"},{inherited:!1,keywords:["auto","from-font"],name:"text-decoration-thickness"},{inherited:!0,longhands:["text-emphasis-style","text-emphasis-color"],name:"text-emphasis"},{inherited:!0,keywords:["currentcolor"],name:"text-emphasis-color"},{inherited:!0,name:"text-emphasis-position"},{inherited:!0,name:"text-emphasis-style"},{inherited:!0,name:"text-indent"},{inherited:!0,keywords:["sideways","mixed","upright"],name:"text-orientation"},{keywords:["clip","ellipsis"],name:"text-overflow"},{inherited:!0,keywords:["auto","optimizespeed","optimizelegibility","geometricprecision"],name:"text-rendering"},{inherited:!0,keywords:["none"],name:"text-shadow"},{inherited:!0,keywords:["none","auto"],name:"text-size-adjust"},{inherited:!0,longhands:["text-autospace","text-spacing-trim"],name:"text-spacing"},{inherited:!0,keywords:["normal","space-all","space-first","trim-start"],name:"text-spacing-trim"},{inherited:!0,keywords:["capitalize","uppercase","lowercase","none","math-auto"],name:"text-transform"},{inherited:!0,keywords:["auto"],name:"text-underline-offset"},{inherited:!0,keywords:["auto","from-font","under","left","right"],name:"text-underline-position"},{inherited:!0,longhands:["text-wrap-mode","text-wrap-style"],name:"text-wrap"},{inherited:!0,keywords:["wrap","nowrap"],name:"text-wrap-mode"},{inherited:!0,keywords:["auto","balance","pretty","stable"],name:"text-wrap-style"},{name:"timeline-scope"},{keywords:["auto"],name:"top"},{keywords:["auto","none","pan-x","pan-left","pan-right","pan-y","pan-up","pan-down","pinch-zoom","manipulation"],name:"touch-action"},{keywords:["none"],name:"transform"},{keywords:["content-box","border-box","fill-box","stroke-box","view-box"],name:"transform-box"},{name:"transform-origin"},{keywords:["flat","preserve-3d"],name:"transform-style"},{longhands:["transition-property","transition-duration","transition-timing-function","transition-delay","transition-behavior"],name:"transition"},{keywords:["normal","allow-discrete"],name:"transition-behavior"},{name:"transition-delay"},{name:"transition-duration"},{keywords:["none"],name:"transition-property"},{keywords:["linear","ease","ease-in","ease-out","ease-in-out","jump-both","jump-end","jump-none","jump-start","step-start","step-end"],name:"transition-timing-function"},{name:"translate"},{name:"types"},{keywords:["normal","embed","bidi-override","isolate","plaintext","isolate-override"],name:"unicode-bidi"},{name:"unicode-range"},{inherited:!0,keywords:["auto","none","text","all","contain"],name:"user-select"},{keywords:["none","non-scaling-stroke"],name:"vector-effect"},{keywords:["baseline","sub","super","text-top","text-bottom","middle"],name:"vertical-align"},{longhands:["view-timeline-name","view-timeline-axis","view-timeline-inset"],name:"view-timeline"},{name:"view-timeline-axis"},{name:"view-timeline-inset"},{name:"view-timeline-name"},{keywords:["none"],name:"view-transition-class"},{keywords:["normal","contain","nearest"],name:"view-transition-group"},{keywords:["none","auto"],name:"view-transition-name"},{inherited:!0,keywords:["visible","hidden","collapse"],name:"visibility"},{inherited:!0,longhands:["white-space-collapse","text-wrap-mode"],name:"white-space"},{inherited:!0,keywords:["collapse","preserve","preserve-breaks","break-spaces"],name:"white-space-collapse"},{inherited:!0,name:"widows"},{keywords:["auto","fit-content","min-content","max-content"],name:"width"},{keywords:["auto"],name:"will-change"},{inherited:!0,keywords:["normal","break-all","keep-all","break-word","auto-phrase"],name:"word-break"},{inherited:!0,keywords:["normal"],name:"word-spacing"},{inherited:!0,keywords:["horizontal-tb","vertical-rl","vertical-lr","sideways-rl","sideways-lr"],name:"writing-mode"},{name:"x"},{name:"y"},{keywords:["auto"],name:"z-index"},{name:"zoom"}],p={"-webkit-box-align":{values:["stretch","start","center","end","baseline"]},"-webkit-box-decoration-break":{values:["slice","clone"]},"-webkit-box-direction":{values:["normal","reverse"]},"-webkit-box-orient":{values:["horizontal","vertical"]},"-webkit-box-pack":{values:["start","center","end","justify"]},"-webkit-line-break":{values:["auto","loose","normal","strict","after-white-space","anywhere"]},"-webkit-line-clamp":{values:["none"]},"-webkit-rtl-ordering":{values:["logical","visual"]},"-webkit-text-security":{values:["none","disc","circle","square"]},"-webkit-user-drag":{values:["auto","none","element"]},"-webkit-user-modify":{values:["read-only","read-write","read-write-plaintext-only"]},"accent-color":{values:["auto","currentcolor"]},"alignment-baseline":{values:["auto","baseline","alphabetic","ideographic","middle","central","mathematical","before-edge","text-before-edge","after-edge","text-after-edge","hanging"]},"anchor-name":{values:["none"]},"anchor-scope":{values:["none","all"]},"animation-composition":{values:["replace","add","accumulate"]},"animation-direction":{values:["normal","reverse","alternate","alternate-reverse"]},"animation-fill-mode":{values:["none","forwards","backwards","both"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["running","paused"]},"animation-timeline":{values:["none","auto"]},"animation-timing-function":{values:["linear","ease","ease-in","ease-out","ease-in-out","jump-both","jump-end","jump-none","jump-start","step-start","step-end"]},"animation-trigger-timeline":{values:["none","auto"]},"animation-trigger-type":{values:["once","repeat","alternate","state"]},"app-region":{values:["none","drag","no-drag"]},"aspect-ratio":{values:["auto"]},"backdrop-filter":{values:["none"]},"backface-visibility":{values:["visible","hidden"]},"background-attachment":{values:["scroll","fixed","local"]},"background-blend-mode":{values:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},"background-clip":{values:["border-box","padding-box","content-box","text"]},"background-color":{values:["currentcolor"]},"background-image":{values:["auto","none"]},"background-origin":{values:["border-box","padding-box","content-box"]},"background-size":{values:["auto","cover","contain"]},"baseline-shift":{values:["baseline","sub","super"]},"baseline-source":{values:["auto","first","last"]},"block-size":{values:["auto"]},"border-bottom-color":{values:["currentcolor"]},"border-bottom-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"border-bottom-width":{values:["thin","medium","thick"]},"border-collapse":{values:["separate","collapse"]},"border-image-repeat":{values:["stretch","repeat","round","space"]},"border-image-source":{values:["none"]},"border-image-width":{values:["auto"]},"border-left-color":{values:["currentcolor"]},"border-left-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"border-left-width":{values:["thin","medium","thick"]},"border-right-color":{values:["currentcolor"]},"border-right-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"border-right-width":{values:["thin","medium","thick"]},"border-style":{values:["none"]},"border-top-color":{values:["currentcolor"]},"border-top-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"border-top-width":{values:["thin","medium","thick"]},bottom:{values:["auto"]},"box-decoration-break":{values:["slice","clone"]},"box-shadow":{values:["none"]},"box-sizing":{values:["content-box","border-box"]},"break-after":{values:["auto","avoid","avoid-column","avoid-page","column","left","page","recto","right","verso"]},"break-before":{values:["auto","avoid","avoid-column","avoid-page","column","left","page","recto","right","verso"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page"]},"buffered-rendering":{values:["auto","dynamic","static"]},"caption-side":{values:["top","bottom"]},"caret-animation":{values:["auto","manual"]},"caret-color":{values:["auto","currentcolor"]},clear:{values:["none","left","right","both","inline-start","inline-end"]},clip:{values:["auto"]},"clip-path":{values:["border-box","padding-box","content-box","margin-box","fill-box","stroke-box","view-box","none"]},"clip-rule":{values:["nonzero","evenodd"]},color:{values:["currentcolor"]},"color-interpolation":{values:["auto","srgb","linearrgb"]},"color-interpolation-filters":{values:["auto","srgb","linearrgb"]},"color-rendering":{values:["auto","optimizespeed","optimizequality"]},"column-count":{values:["auto"]},"column-fill":{values:["balance","auto"]},"column-gap":{values:["normal"]},"column-height":{values:["auto"]},"column-rule-break":{values:["none","spanning-item","intersection"]},"column-rule-color":{values:["currentcolor"]},"column-rule-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"column-rule-width":{values:["thin","medium","thick"]},"column-span":{values:["none","all"]},"column-width":{values:["auto"]},"column-wrap":{values:["nowrap","wrap"]},contain:{values:["none","strict","content","size","layout","style","paint","inline-size","block-size"]},"contain-intrinsic-height":{values:["none"]},"contain-intrinsic-width":{values:["none"]},"container-name":{values:["none"]},"container-type":{values:["normal","inline-size","size","scroll-state"]},"content-visibility":{values:["visible","auto","hidden"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},"counter-set":{values:["none"]},cursor:{values:["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","e-resize","n-resize","ne-resize","nw-resize","s-resize","se-resize","sw-resize","w-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","col-resize","row-resize","all-scroll","zoom-in","zoom-out","grab","grabbing"]},d:{values:["none"]},direction:{values:["ltr","rtl"]},display:{values:["inline","block","list-item","inline-block","table","inline-table","table-row-group","table-header-group","table-footer-group","table-row","table-column-group","table-column","table-cell","table-caption","-webkit-box","-webkit-inline-box","flex","inline-flex","grid","inline-grid","contents","flow-root","none","flow","math","ruby","ruby-text","masonry","inline-masonry"]},"dominant-baseline":{values:["auto","alphabetic","ideographic","middle","central","mathematical","hanging","use-script","no-change","reset-size","text-after-edge","text-before-edge"]},"dynamic-range-limit":{values:["standard","no-limit","constrained"]},"empty-cells":{values:["show","hide"]},"field-sizing":{values:["fixed","content"]},"fill-rule":{values:["nonzero","evenodd"]},filter:{values:["none"]},"flex-basis":{values:["auto","fit-content","min-content","max-content","content"]},"flex-direction":{values:["row","row-reverse","column","column-reverse"]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["none","left","right","inline-start","inline-end"]},"flood-color":{values:["currentcolor"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","normal","none"]},"font-optical-sizing":{values:["auto","none"]},"font-palette":{values:["normal","light","dark"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller","-webkit-xxx-large"]},"font-size-adjust":{values:["none","ex-height","cap-height","ch-width","ic-width","ic-height","from-font"]},"font-stretch":{values:["normal","ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded"]},"font-style":{values:["normal","italic","oblique"]},"font-synthesis-small-caps":{values:["auto","none"]},"font-synthesis-style":{values:["auto","none"]},"font-synthesis-weight":{values:["auto","none"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal","jis78","jis83","jis90","jis04","simplified","traditional","full-width","proportional-width","ruby"]},"font-variant-emoji":{values:["normal","text","emoji","unicode"]},"font-variant-ligatures":{values:["normal","none","common-ligatures","no-common-ligatures","discretionary-ligatures","no-discretionary-ligatures","historical-ligatures","no-historical-ligatures","contextual","no-contextual"]},"font-variant-numeric":{values:["normal","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions","ordinal","slashed-zero"]},"font-variant-position":{values:["normal","sub","super"]},"font-variation-settings":{values:["normal"]},"font-weight":{values:["normal","bold","bolder","lighter"]},"forced-color-adjust":{values:["auto","none","preserve-parent-color"]},"gap-rule-paint-order":{values:["row-over-column","column-over-row"]},"grid-auto-columns":{values:["auto","min-content","max-content"]},"grid-auto-flow":{values:["row","column"]},"grid-auto-rows":{values:["auto","min-content","max-content"]},"grid-column-end":{values:["auto"]},"grid-column-start":{values:["auto"]},"grid-row-end":{values:["auto"]},"grid-row-start":{values:["auto"]},"grid-template-areas":{values:["none"]},"grid-template-columns":{values:["none"]},"grid-template-rows":{values:["none"]},height:{values:["auto","fit-content","min-content","max-content"]},"hyphenate-limit-chars":{values:["auto"]},hyphens:{values:["none","manual","auto"]},"image-rendering":{values:["auto","optimizespeed","optimizequality","-webkit-optimize-contrast","pixelated"]},"initial-letter":{values:["drop","normal","raise"]},"inline-size":{values:["auto"]},interactivity:{values:["auto","inert"]},"interpolate-size":{values:["numeric-only","allow-keywords"]},isolation:{values:["auto","isolate"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"lighting-color":{values:["currentcolor"]},"line-break":{values:["auto","loose","normal","strict","anywhere"]},"line-clamp":{values:["none","auto"]},"line-height":{values:["normal"]},"list-style-image":{values:["none"]},"list-style-position":{values:["outside","inside"]},"list-style-type":{values:["disc","circle","square","disclosure-open","disclosure-closed","decimal","none"]},"margin-block-end":{values:["auto"]},"margin-block-start":{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-inline-end":{values:["auto"]},"margin-inline-start":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"marker-end":{values:["none"]},"marker-mid":{values:["none"]},"marker-start":{values:["none"]},"mask-type":{values:["luminance","alpha"]},"masonry-auto-tracks":{values:["auto","min-content","max-content"]},"masonry-direction":{values:["row","row-reverse","column","column-reverse"]},"masonry-fill":{values:["normal","reverse"]},"masonry-slack":{values:["normal"]},"masonry-track-end":{values:["auto"]},"masonry-track-start":{values:["auto"]},"math-shift":{values:["normal","compact"]},"math-style":{values:["normal","compact"]},"max-block-size":{values:["none"]},"max-height":{values:["none"]},"max-inline-size":{values:["none"]},"max-width":{values:["none"]},"mix-blend-mode":{values:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},"object-fit":{values:["fill","contain","cover","none","scale-down"]},"object-view-box":{values:["none"]},"offset-anchor":{values:["auto"]},"offset-path":{values:["none"]},"offset-position":{values:["auto","normal"]},"offset-rotate":{values:["auto","reverse"]},"origin-trial-test-property":{values:["normal","none"]},"outline-color":{values:["currentcolor"]},"outline-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"outline-width":{values:["thin","medium","thick"]},"overflow-anchor":{values:["visible","none","auto"]},"overflow-clip-margin":{values:["border-box","content-box","padding-box"]},"overflow-wrap":{values:["normal","break-word","anywhere"]},"overflow-x":{values:["visible","hidden","scroll","auto","overlay","clip"]},"overflow-y":{values:["visible","hidden","scroll","auto","overlay","clip"]},overlay:{values:["none","auto"]},"overscroll-behavior-x":{values:["auto","contain","none"]},"overscroll-behavior-y":{values:["auto","contain","none"]},page:{values:["auto"]},"paint-order":{values:["normal","fill","stroke","markers"]},perspective:{values:["none"]},"pointer-events":{values:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"]},position:{values:["static","relative","absolute","fixed","sticky"]},"position-anchor":{values:["auto"]},"position-area":{values:["none","top","bottom","center","left","right","x-start","x-end","y-start","y-end","start","end","self-start","self-end","all"]},"position-try-fallbacks":{values:["none","flip-block","flip-inline","flip-start"]},"position-try-order":{values:["normal","most-width","most-height","most-block-size","most-inline-size"]},"position-visibility":{values:["always","anchors-visible","no-overflow"]},"print-color-adjust":{values:["economy","exact"]},quotes:{values:["auto","none"]},"reading-flow":{values:["normal","flex-visual","flex-flow","grid-rows","grid-columns","grid-order","source-order"]},resize:{values:["none","both","horizontal","vertical","block","inline"]},right:{values:["auto"]},"row-gap":{values:["normal"]},"row-rule-break":{values:["none","spanning-item","intersection"]},"row-rule-color":{values:["currentcolor"]},"row-rule-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"row-rule-width":{values:["thin","medium","thick"]},"ruby-align":{values:["space-around","start","center","space-between"]},"ruby-position":{values:["over","under"]},rx:{values:["auto"]},ry:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-initial-target":{values:["none","nearest"]},"scroll-marker-contain":{values:["none","auto"]},"scroll-marker-group":{values:["none","after","before"]},"scroll-padding-block-end":{values:["auto"]},"scroll-padding-block-start":{values:["auto"]},"scroll-padding-bottom":{values:["auto"]},"scroll-padding-inline-end":{values:["auto"]},"scroll-padding-inline-start":{values:["auto"]},"scroll-padding-left":{values:["auto"]},"scroll-padding-right":{values:["auto"]},"scroll-padding-top":{values:["auto"]},"scroll-snap-align":{values:["none","start","end","center"]},"scroll-snap-stop":{values:["normal","always"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},"scrollbar-color":{values:["auto"]},"scrollbar-gutter":{values:["auto","stable","both-edges"]},"scrollbar-width":{values:["auto","thin","none"]},"shape-margin":{values:["none"]},"shape-outside":{values:["none"]},"shape-rendering":{values:["auto","optimizespeed","crispedges","geometricprecision"]},speak:{values:["none","normal","spell-out","digits","literal-punctuation","no-punctuation"]},"stop-color":{values:["currentcolor"]},"stroke-dasharray":{values:["none"]},"stroke-linecap":{values:["butt","round","square"]},"stroke-linejoin":{values:["miter","bevel","round"]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["left","right","center","justify","-webkit-left","-webkit-right","-webkit-center","start","end"]},"text-align-last":{values:["auto","start","end","left","right","center","justify"]},"text-anchor":{values:["start","middle","end"]},"text-autospace":{values:["normal","no-autospace"]},"text-box-trim":{values:["none","trim-start","trim-end","trim-both"]},"text-combine-upright":{values:["none","all"]},"text-decoration-color":{values:["currentcolor"]},"text-decoration-line":{values:["none","underline","overline","line-through","blink","spelling-error","grammar-error"]},"text-decoration-skip-ink":{values:["none","auto"]},"text-decoration-style":{values:["solid","double","dotted","dashed","wavy"]},"text-decoration-thickness":{values:["auto","from-font"]},"text-emphasis-color":{values:["currentcolor"]},"text-orientation":{values:["sideways","mixed","upright"]},"text-overflow":{values:["clip","ellipsis"]},"text-rendering":{values:["auto","optimizespeed","optimizelegibility","geometricprecision"]},"text-shadow":{values:["none"]},"text-size-adjust":{values:["none","auto"]},"text-spacing-trim":{values:["normal","space-all","space-first","trim-start"]},"text-transform":{values:["capitalize","uppercase","lowercase","none","math-auto"]},"text-underline-offset":{values:["auto"]},"text-underline-position":{values:["auto","from-font","under","left","right"]},"text-wrap-mode":{values:["wrap","nowrap"]},"text-wrap-style":{values:["auto","balance","pretty","stable"]},top:{values:["auto"]},"touch-action":{values:["auto","none","pan-x","pan-left","pan-right","pan-y","pan-up","pan-down","pinch-zoom","manipulation"]},transform:{values:["none"]},"transform-box":{values:["content-box","border-box","fill-box","stroke-box","view-box"]},"transform-style":{values:["flat","preserve-3d"]},"transition-behavior":{values:["normal","allow-discrete"]},"transition-property":{values:["none"]},"transition-timing-function":{values:["linear","ease","ease-in","ease-out","ease-in-out","jump-both","jump-end","jump-none","jump-start","step-start","step-end"]},"unicode-bidi":{values:["normal","embed","bidi-override","isolate","plaintext","isolate-override"]},"user-select":{values:["auto","none","text","all","contain"]},"vector-effect":{values:["none","non-scaling-stroke"]},"vertical-align":{values:["baseline","sub","super","text-top","text-bottom","middle"]},"view-transition-class":{values:["none"]},"view-transition-group":{values:["normal","contain","nearest"]},"view-transition-name":{values:["none","auto"]},visibility:{values:["visible","hidden","collapse"]},"white-space-collapse":{values:["collapse","preserve","preserve-breaks","break-spaces"]},width:{values:["auto","fit-content","min-content","max-content"]},"will-change":{values:["auto"]},"word-break":{values:["normal","break-all","keep-all","break-word","auto-phrase"]},"word-spacing":{values:["normal"]},"writing-mode":{values:["horizontal-tb","vertical-rl","vertical-lr","sideways-rl","sideways-lr"]},"z-index":{values:["auto"]}},m=new Map([["-epub-caption-side","caption-side"],["-epub-text-combine","-webkit-text-combine"],["-epub-text-emphasis","text-emphasis"],["-epub-text-emphasis-color","text-emphasis-color"],["-epub-text-emphasis-style","text-emphasis-style"],["-epub-text-orientation","-webkit-text-orientation"],["-epub-text-transform","text-transform"],["-epub-word-break","word-break"],["-epub-writing-mode","-webkit-writing-mode"],["-webkit-align-content","align-content"],["-webkit-align-items","align-items"],["-webkit-align-self","align-self"],["-webkit-animation","animation"],["-webkit-animation-delay","animation-delay"],["-webkit-animation-direction","animation-direction"],["-webkit-animation-duration","animation-duration"],["-webkit-animation-fill-mode","animation-fill-mode"],["-webkit-animation-iteration-count","animation-iteration-count"],["-webkit-animation-name","animation-name"],["-webkit-animation-play-state","animation-play-state"],["-webkit-animation-timing-function","animation-timing-function"],["-webkit-app-region","app-region"],["-webkit-appearance","appearance"],["-webkit-backface-visibility","backface-visibility"],["-webkit-background-clip","background-clip"],["-webkit-background-origin","background-origin"],["-webkit-background-size","background-size"],["-webkit-border-after","border-block-end"],["-webkit-border-after-color","border-block-end-color"],["-webkit-border-after-style","border-block-end-style"],["-webkit-border-after-width","border-block-end-width"],["-webkit-border-before","border-block-start"],["-webkit-border-before-color","border-block-start-color"],["-webkit-border-before-style","border-block-start-style"],["-webkit-border-before-width","border-block-start-width"],["-webkit-border-bottom-left-radius","border-bottom-left-radius"],["-webkit-border-bottom-right-radius","border-bottom-right-radius"],["-webkit-border-end","border-inline-end"],["-webkit-border-end-color","border-inline-end-color"],["-webkit-border-end-style","border-inline-end-style"],["-webkit-border-end-width","border-inline-end-width"],["-webkit-border-radius","border-radius"],["-webkit-border-start","border-inline-start"],["-webkit-border-start-color","border-inline-start-color"],["-webkit-border-start-style","border-inline-start-style"],["-webkit-border-start-width","border-inline-start-width"],["-webkit-border-top-left-radius","border-top-left-radius"],["-webkit-border-top-right-radius","border-top-right-radius"],["-webkit-box-shadow","box-shadow"],["-webkit-box-sizing","box-sizing"],["-webkit-clip-path","clip-path"],["-webkit-column-count","column-count"],["-webkit-column-gap","column-gap"],["-webkit-column-rule","column-rule"],["-webkit-column-rule-color","column-rule-color"],["-webkit-column-rule-style","column-rule-style"],["-webkit-column-rule-width","column-rule-width"],["-webkit-column-span","column-span"],["-webkit-column-width","column-width"],["-webkit-columns","columns"],["-webkit-filter","filter"],["-webkit-flex","flex"],["-webkit-flex-basis","flex-basis"],["-webkit-flex-direction","flex-direction"],["-webkit-flex-flow","flex-flow"],["-webkit-flex-grow","flex-grow"],["-webkit-flex-shrink","flex-shrink"],["-webkit-flex-wrap","flex-wrap"],["-webkit-font-feature-settings","font-feature-settings"],["-webkit-hyphenate-character","hyphenate-character"],["-webkit-justify-content","justify-content"],["-webkit-logical-height","block-size"],["-webkit-logical-width","inline-size"],["-webkit-margin-after","margin-block-end"],["-webkit-margin-before","margin-block-start"],["-webkit-margin-end","margin-inline-end"],["-webkit-margin-start","margin-inline-start"],["-webkit-mask","mask"],["-webkit-mask-clip","mask-clip"],["-webkit-mask-composite","mask-composite"],["-webkit-mask-image","mask-image"],["-webkit-mask-origin","mask-origin"],["-webkit-mask-position","mask-position"],["-webkit-mask-repeat","mask-repeat"],["-webkit-mask-size","mask-size"],["-webkit-max-logical-height","max-block-size"],["-webkit-max-logical-width","max-inline-size"],["-webkit-min-logical-height","min-block-size"],["-webkit-min-logical-width","min-inline-size"],["-webkit-opacity","opacity"],["-webkit-order","order"],["-webkit-padding-after","padding-block-end"],["-webkit-padding-before","padding-block-start"],["-webkit-padding-end","padding-inline-end"],["-webkit-padding-start","padding-inline-start"],["-webkit-perspective","perspective"],["-webkit-perspective-origin","perspective-origin"],["-webkit-print-color-adjust","print-color-adjust"],["-webkit-shape-image-threshold","shape-image-threshold"],["-webkit-shape-margin","shape-margin"],["-webkit-shape-outside","shape-outside"],["-webkit-text-emphasis","text-emphasis"],["-webkit-text-emphasis-color","text-emphasis-color"],["-webkit-text-emphasis-position","text-emphasis-position"],["-webkit-text-emphasis-style","text-emphasis-style"],["-webkit-text-size-adjust","text-size-adjust"],["-webkit-transform","transform"],["-webkit-transform-origin","transform-origin"],["-webkit-transform-style","transform-style"],["-webkit-transition","transition"],["-webkit-transition-delay","transition-delay"],["-webkit-transition-duration","transition-duration"],["-webkit-transition-property","transition-property"],["-webkit-transition-timing-function","transition-timing-function"],["-webkit-user-select","user-select"],["grid-column-gap","column-gap"],["grid-gap","gap"],["grid-row-gap","row-gap"],["word-wrap","overflow-wrap"]]);class f{#t=[];#n=new Map;#r=new Map;#s=new Set;#i=new Set;#o=new Map;#a=new Map;#l=[];#d=[];#c;constructor(e,t){this.#a=t;for(let t=0;tCSS.supports(e,t))).sort(f.sortPrefixesAndCSSWideKeywordsToEnd).map((t=>`${e}: ${t}`));this.isSVGProperty(e)||this.#l.push(...t),this.#d.push(...t)}}static isCSSWideKeyword(e){return y.includes(e)}static isPositionTryOrderKeyword(e){return v.includes(e)}static sortPrefixesAndCSSWideKeywordsToEnd(e,t){const n=f.isCSSWideKeyword(e),r=f.isCSSWideKeyword(t);if(n&&!r)return 1;if(!n&&r)return-1;const s=e.startsWith("-webkit-"),i=t.startsWith("-webkit-");return s&&!i?1:!s&&i||et?1:0}allProperties(){return this.#t}aliasesFor(){return this.#a}nameValuePresets(e){return e?this.#d:this.#l}isSVGProperty(e){return e=e.toLowerCase(),this.#i.has(e)}getLonghands(e){return this.#n.get(e)||null}getShorthands(e){return this.#r.get(e)||null}isColorAwareProperty(e){return E.has(e.toLowerCase())||this.isCustomProperty(e.toLowerCase())}isFontFamilyProperty(e){return"font-family"===e.toLowerCase()}isAngleAwareProperty(e){const t=e.toLowerCase();return E.has(t)||L.has(t)}isGridAreaDefiningProperty(e){return"grid"===(e=e.toLowerCase())||"grid-template"===e||"grid-template-areas"===e}isGridColumnNameAwareProperty(e){return e=e.toLowerCase(),["grid-column","grid-column-start","grid-column-end"].includes(e)}isGridRowNameAwareProperty(e){return e=e.toLowerCase(),["grid-row","grid-row-start","grid-row-end"].includes(e)}isGridAreaNameAwareProperty(e){return"grid-area"===(e=e.toLowerCase())}isGridNameAwareProperty(e){return this.isGridAreaNameAwareProperty(e)||this.isGridColumnNameAwareProperty(e)||this.isGridRowNameAwareProperty(e)}isLengthProperty(e){return"line-height"!==(e=e.toLowerCase())&&(T.has(e)||e.startsWith("margin")||e.startsWith("padding")||-1!==e.indexOf("width")||-1!==e.indexOf("height"))}isBezierAwareProperty(e){return e=e.toLowerCase(),M.has(e)||this.isCustomProperty(e)}isFontAwareProperty(e){return e=e.toLowerCase(),P.has(e)||this.isCustomProperty(e)}isCustomProperty(e){return e.startsWith("--")}isShadowProperty(e){return"box-shadow"===(e=e.toLowerCase())||"text-shadow"===e||"-webkit-box-shadow"===e}isStringProperty(e){return"content"===(e=e.toLowerCase())}canonicalPropertyName(e){if(this.isCustomProperty(e))return e;e=e.toLowerCase();const t=this.#a.get(e);if(t)return t;if(!e||e.length<9||"-"!==e.charAt(0))return e;const n=e.match(/(?:-webkit-)(.+)/);return n&&this.#c.has(n[1])?n[1]:e}isCSSPropertyName(e){return!!((e=e.toLowerCase()).startsWith("--")&&e.length>2||e.startsWith("-moz-")||e.startsWith("-ms-")||e.startsWith("-o-")||e.startsWith("-webkit-"))||this.#c.has(e)}isPropertyInherited(e){return(e=e.toLowerCase()).startsWith("--")||this.#s.has(this.canonicalPropertyName(e))||this.#s.has(e)}specificPropertyValues(e){const t=e.replace(/^-webkit-/,""),n=this.#o;let r=n.get(e)||n.get(t);if(!r){r=[];for(const t of F)CSS.supports(e,t)&&r.push(t);n.set(e,r)}return r}getPropertyValues(t){t=t.toLowerCase();const n=[...this.specificPropertyValues(t),...y];if(this.isColorAwareProperty(t)){n.push("currentColor");for(const t of e.Color.Nicknames.keys())n.push(t)}return n.sort(f.sortPrefixesAndCSSWideKeywordsToEnd)}propertyUsageWeight(e){return N.get(e)||N.get(this.canonicalPropertyName(e))||0}getValuePreset(e,t){const n=R.get(e);let r=n?n.get(t):null;if(!r)return null;let s=r.length,i=r.length;return r&&(s=r.indexOf("|"),i=r.lastIndexOf("|"),i=s===i?i:i-1,r=r.replace(/\|/g,"")),{text:r,startColumn:s,endColumn:i}}isHighlightPseudoType(e){return"highlight"===e||"selection"===e||"target-text"===e||"grammar-error"===e||"spelling-error"===e}}const b=new Map([["linear","cubic-bezier(0, 0, 1, 1)"],["ease","cubic-bezier(0.25, 0.1, 0.25, 1)"],["ease-in","cubic-bezier(0.42, 0, 1, 1)"],["ease-in-out","cubic-bezier(0.42, 0, 0.58, 1)"],["ease-out","cubic-bezier(0, 0, 0.58, 1)"]]),y=["inherit","initial","revert","revert-layer","unset"],v=["normal","most-height","most-width","most-block-size","most-inline-size"],I=/((?:\[[\w\- ]+\]\s*)*(?:"[^"]+"|'[^']+'))[^'"\[]*\[?[^'"\[]*/;let w=null;function S(){if(!w){w=new f(g,m)}return w}const k=new Map([["linear-gradient","linear-gradient(|45deg, black, transparent|)"],["radial-gradient","radial-gradient(|black, transparent|)"],["repeating-linear-gradient","repeating-linear-gradient(|45deg, black, transparent 100px|)"],["repeating-radial-gradient","repeating-radial-gradient(|black, transparent 100px|)"],["url","url(||)"]]),C=new Map([["blur","blur(|1px|)"],["brightness","brightness(|0.5|)"],["contrast","contrast(|0.5|)"],["drop-shadow","drop-shadow(|2px 4px 6px black|)"],["grayscale","grayscale(|1|)"],["hue-rotate","hue-rotate(|45deg|)"],["invert","invert(|1|)"],["opacity","opacity(|0.5|)"],["saturate","saturate(|0.5|)"],["sepia","sepia(|1|)"],["url","url(||)"]]),x=new Map([["superellipse(0.5)","superellipse(|0.5|)"],["superellipse(infinity)","superellipse(|infinity|)"]]),R=new Map([["filter",C],["backdrop-filter",C],["background",k],["background-image",k],["-webkit-mask-image",k],["transform",new Map([["scale","scale(|1.5|)"],["scaleX","scaleX(|1.5|)"],["scaleY","scaleY(|1.5|)"],["scale3d","scale3d(|1.5, 1.5, 1.5|)"],["rotate","rotate(|45deg|)"],["rotateX","rotateX(|45deg|)"],["rotateY","rotateY(|45deg|)"],["rotateZ","rotateZ(|45deg|)"],["rotate3d","rotate3d(|1, 1, 1, 45deg|)"],["skew","skew(|10deg, 10deg|)"],["skewX","skewX(|10deg|)"],["skewY","skewY(|10deg|)"],["translate","translate(|10px, 10px|)"],["translateX","translateX(|10px|)"],["translateY","translateY(|10px|)"],["translateZ","translateZ(|10px|)"],["translate3d","translate3d(|10px, 10px, 10px|)"],["matrix","matrix(|1, 0, 0, 1, 0, 0|)"],["matrix3d","matrix3d(|1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1|)"],["perspective","perspective(|10px|)"]])],["corner-shape",x]]),T=new Set(["background-position","border-spacing","bottom","font-size","height","left","letter-spacing","max-height","max-width","min-height","min-width","right","text-indent","top","width","word-spacing","grid-row-gap","grid-column-gap","row-gap"]),M=new Set(["animation","animation-timing-function","transition","transition-timing-function","-webkit-animation","-webkit-animation-timing-function","-webkit-transition","-webkit-transition-timing-function"]),P=new Set(["font-size","line-height","font-weight","font-family","letter-spacing"]),E=new Set(["accent-color","background","background-color","background-image","border","border-color","border-image","border-image-source","border-bottom","border-bottom-color","border-left","border-left-color","border-right","border-right-color","border-top","border-top-color","border-block","border-block-color","border-block-end","border-block-end-color","border-block-start","border-block-start-color","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-start","border-inline-start-color","box-shadow","caret-color","color","column-rule","column-rule-color","content","fill","list-style-image","mask","mask-image","mask-border","mask-border-source","outline","outline-color","scrollbar-color","stop-color","stroke","text-decoration-color","text-shadow","text-emphasis","text-emphasis-color","-webkit-border-after","-webkit-border-after-color","-webkit-border-before","-webkit-border-before-color","-webkit-border-end","-webkit-border-end-color","-webkit-border-start","-webkit-border-start-color","-webkit-box-reflect","-webkit-box-shadow","-webkit-column-rule-color","-webkit-mask","-webkit-mask-box-image","-webkit-mask-box-image-source","-webkit-mask-image","-webkit-tap-highlight-color","-webkit-text-emphasis","-webkit-text-emphasis-color","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color","flood-color","lighting-color","stop-color"]),L=new Set(["-webkit-border-image","transform","-webkit-transform","rotate","filter","-webkit-filter","backdrop-filter","offset","offset-rotate","font-style"]),A=new Set(["over","under","over right","over left","under right","under left"]),O=new Set(["none","dot","circle","double-circle","triangle","sesame","filled","open","dot open","circle open","double-circle open","triangle open","sesame open",'"❤️"']),D=new Map([["background-repeat",new Set(["repeat","repeat-x","repeat-y","no-repeat","space","round"])],["content",new Set(["normal","close-quote","no-close-quote","no-open-quote","open-quote"])],["baseline-shift",new Set(["baseline"])],["max-height",new Set(["min-content","max-content","-webkit-fill-available","fit-content"])],["color",new Set(["black"])],["background-color",new Set(["white"])],["box-shadow",new Set(["inset"])],["text-shadow",new Set(["0 0 black"])],["-webkit-writing-mode",new Set(["horizontal-tb","vertical-rl","vertical-lr"])],["writing-mode",new Set(["lr","rl","tb","lr-tb","rl-tb","tb-rl"])],["page-break-inside",new Set(["avoid"])],["cursor",new Set(["-webkit-zoom-in","-webkit-zoom-out","-webkit-grab","-webkit-grabbing"])],["border-width",new Set(["medium","thick","thin"])],["border-style",new Set(["hidden","inset","groove","ridge","outset","dotted","dashed","solid","double"])],["size",new Set(["a3","a4","a5","b4","b5","landscape","ledger","legal","letter","portrait"])],["overflow",new Set(["hidden","visible","overlay","scroll"])],["overscroll-behavior",new Set(["contain"])],["text-rendering",new Set(["optimizeSpeed","optimizeLegibility","geometricPrecision"])],["text-align",new Set(["-webkit-auto","-webkit-match-parent"])],["clip-path",new Set(["circle","ellipse","inset","polygon","url"])],["color-interpolation",new Set(["sRGB","linearRGB"])],["word-wrap",new Set(["normal","break-word"])],["font-weight",new Set(["100","200","300","400","500","600","700","800","900"])],["text-emphasis",O],["-webkit-text-emphasis",O],["color-rendering",new Set(["optimizeSpeed","optimizeQuality"])],["-webkit-text-combine",new Set(["horizontal"])],["text-orientation",new Set(["sideways-right"])],["outline",new Set(["inset","groove","ridge","outset","dotted","dashed","solid","double","medium","thick","thin"])],["font",new Set(["caption","icon","menu","message-box","small-caption","-webkit-mini-control","-webkit-small-control","-webkit-control","status-bar"])],["dominant-baseline",new Set(["text-before-edge","text-after-edge","use-script","no-change","reset-size"])],["text-emphasis-position",A],["-webkit-text-emphasis-position",A],["alignment-baseline",new Set(["before-edge","after-edge","text-before-edge","text-after-edge","hanging"])],["page-break-before",new Set(["left","right","always","avoid"])],["border-image",new Set(["repeat","stretch","space","round"])],["text-decoration",new Set(["blink","line-through","overline","underline","wavy","double","solid","dashed","dotted"])],["font-family",new Set(["serif","sans-serif","cursive","fantasy","monospace","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","-webkit-body"])],["zoom",new Set(["normal"])],["max-width",new Set(["min-content","max-content","-webkit-fill-available","fit-content"])],["-webkit-font-smoothing",new Set(["antialiased","subpixel-antialiased"])],["border",new Set(["hidden","inset","groove","ridge","outset","dotted","dashed","solid","double","medium","thick","thin"])],["font-variant",new Set(["small-caps","normal","common-ligatures","no-common-ligatures","discretionary-ligatures","no-discretionary-ligatures","historical-ligatures","no-historical-ligatures","contextual","no-contextual","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions","ordinal","slashed-zero","jis78","jis83","jis90","jis04","simplified","traditional","full-width","proportional-width","ruby"])],["vertical-align",new Set(["top","bottom","-webkit-baseline-middle"])],["page-break-after",new Set(["left","right","always","avoid"])],["text-emphasis-style",O],["-webkit-text-emphasis-style",O],["transform",new Set(["scale","scaleX","scaleY","scale3d","rotate","rotateX","rotateY","rotateZ","rotate3d","skew","skewX","skewY","translate","translateX","translateY","translateZ","translate3d","matrix","matrix3d","perspective"])],["align-content",new Set(["normal","baseline","space-between","space-around","space-evenly","stretch","center","start","end","flex-start","flex-end"])],["justify-content",new Set(["normal","space-between","space-around","space-evenly","stretch","center","start","end","flex-start","flex-end","left","right"])],["place-content",new Set(["normal","space-between","space-around","space-evenly","stretch","center","start","end","flex-start","flex-end","baseline"])],["align-items",new Set(["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","anchor-center"])],["justify-items",new Set(["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","left","right","legacy","anchor-center"])],["place-items",new Set(["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","anchor-center"])],["align-self",new Set(["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","anchor-center"])],["justify-self",new Set(["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","left","right","anchor-center"])],["place-self",new Set(["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","anchor-center"])],["perspective-origin",new Set(["left","center","right","top","bottom"])],["transform-origin",new Set(["left","center","right","top","bottom"])],["transition-timing-function",new Set(["cubic-bezier","steps"])],["animation-timing-function",new Set(["cubic-bezier","steps"])],["-webkit-backface-visibility",new Set(["visible","hidden"])],["-webkit-column-break-after",new Set(["always","avoid"])],["-webkit-column-break-before",new Set(["always","avoid"])],["-webkit-column-break-inside",new Set(["avoid"])],["-webkit-column-span",new Set(["all"])],["-webkit-column-gap",new Set(["normal"])],["filter",new Set(["url","blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","opacity","saturate","sepia"])],["backdrop-filter",new Set(["url","blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","opacity","saturate","sepia"])],["grid-template-columns",new Set(["min-content","max-content"])],["grid-template-rows",new Set(["min-content","max-content"])],["grid-auto-flow",new Set(["dense"])],["background",new Set(["repeat","repeat-x","repeat-y","no-repeat","top","bottom","left","right","center","fixed","local","scroll","space","round","border-box","content-box","padding-box","linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","url"])],["background-image",new Set(["linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","url"])],["background-position",new Set(["top","bottom","left","right","center"])],["background-position-x",new Set(["left","right","center"])],["background-position-y",new Set(["top","bottom","center"])],["background-repeat-x",new Set(["repeat","no-repeat"])],["background-repeat-y",new Set(["repeat","no-repeat"])],["border-bottom",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["border-left",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["border-right",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["border-top",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["buffered-rendering",new Set(["static","dynamic"])],["color-interpolation-filters",new Set(["srgb","linearrgb"])],["column-rule",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["flex-flow",new Set(["nowrap","row","row-reverse","column","column-reverse","wrap","wrap-reverse"])],["height",new Set(["-webkit-fill-available"])],["inline-size",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["list-style",new Set(["outside","inside","disc","circle","square","decimal","decimal-leading-zero","arabic-indic","bengali","cambodian","khmer","devanagari","gujarati","gurmukhi","kannada","lao","malayalam","mongolian","myanmar","oriya","persian","urdu","telugu","tibetan","thai","lower-roman","upper-roman","lower-greek","lower-alpha","lower-latin","upper-alpha","upper-latin","cjk-earthly-branch","cjk-heavenly-stem","ethiopic-halehame","ethiopic-halehame-am","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","hangul","hangul-consonant","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","hebrew","armenian","lower-armenian","upper-armenian","georgian","cjk-ideographic","simp-chinese-formal","simp-chinese-informal","trad-chinese-formal","trad-chinese-informal","hiragana","katakana","hiragana-iroha","katakana-iroha"])],["max-block-size",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["max-inline-size",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["min-block-size",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["min-height",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["min-inline-size",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["min-width",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["object-position",new Set(["top","bottom","left","right","center"])],["shape-outside",new Set(["border-box","content-box","padding-box","margin-box"])],["-webkit-appearance",new Set(["checkbox","radio","push-button","square-button","button","inner-spin-button","listbox","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","menulist","menulist-button","meter","progress-bar","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","searchfield","searchfield-cancel-button","textfield","textarea"])],["-webkit-border-after",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["-webkit-border-after-style",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"])],["-webkit-border-after-width",new Set(["medium","thick","thin"])],["-webkit-border-before",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["-webkit-border-before-style",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"])],["-webkit-border-before-width",new Set(["medium","thick","thin"])],["-webkit-border-end",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["-webkit-border-end-style",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"])],["-webkit-border-end-width",new Set(["medium","thick","thin"])],["-webkit-border-start",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["-webkit-border-start-style",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"])],["-webkit-border-start-width",new Set(["medium","thick","thin"])],["-webkit-logical-height",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["-webkit-logical-width",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["-webkit-mask-box-image",new Set(["repeat","stretch","space","round"])],["-webkit-mask-box-image-repeat",new Set(["repeat","stretch","space","round"])],["-webkit-mask-clip",new Set(["text","border","border-box","content","content-box","padding","padding-box"])],["-webkit-mask-composite",new Set(["clear","copy","source-over","source-in","source-out","source-atop","destination-over","destination-in","destination-out","destination-atop","xor","plus-lighter"])],["-webkit-mask-image",new Set(["linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","url"])],["-webkit-mask-origin",new Set(["border","border-box","content","content-box","padding","padding-box"])],["-webkit-mask-position",new Set(["top","bottom","left","right","center"])],["-webkit-mask-position-x",new Set(["left","right","center"])],["-webkit-mask-position-y",new Set(["top","bottom","center"])],["-webkit-mask-repeat",new Set(["repeat","repeat-x","repeat-y","no-repeat","space","round"])],["-webkit-mask-size",new Set(["contain","cover"])],["-webkit-max-logical-height",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["-webkit-max-logical-width",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["-webkit-min-logical-height",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["-webkit-min-logical-width",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["-webkit-perspective-origin-x",new Set(["left","right","center"])],["-webkit-perspective-origin-y",new Set(["top","bottom","center"])],["-webkit-text-decorations-in-effect",new Set(["blink","line-through","overline","underline"])],["-webkit-text-stroke",new Set(["medium","thick","thin"])],["-webkit-text-stroke-width",new Set(["medium","thick","thin"])],["-webkit-transform-origin-x",new Set(["left","right","center"])],["-webkit-transform-origin-y",new Set(["top","bottom","center"])],["width",new Set(["-webkit-fill-available"])],["contain-intrinsic-width",new Set(["auto none","auto 100px"])],["contain-intrinsic-height",new Set(["auto none","auto 100px"])],["contain-intrinsic-size",new Set(["auto none","auto 100px"])],["contain-intrinsic-inline-size",new Set(["auto none","auto 100px"])],["contain-intrinsic-block-size",new Set(["auto none","auto 100px"])],["white-space",new Set(["normal","pre","pre-wrap","pre-line","nowrap","break-spaces"])],["text-box-edge",new Set(["auto","text","cap","ex","text alphabetic","cap alphabetic","ex alphabetic"])],["corner-shape",new Set(["round","scoop","bevel","notch","straight","squircle","superellipse(0.5)","superellipse(infinity)"])]]),N=new Map([["align-content",57],["align-items",129],["align-self",55],["animation",175],["animation-delay",114],["animation-direction",113],["animation-duration",137],["animation-fill-mode",132],["animation-iteration-count",124],["animation-name",139],["animation-play-state",104],["animation-timing-function",141],["backface-visibility",123],["background",260],["background-attachment",119],["background-clip",165],["background-color",259],["background-image",246],["background-origin",107],["background-position",237],["background-position-x",108],["background-position-y",93],["background-repeat",234],["background-size",203],["border",263],["border-bottom",233],["border-bottom-color",190],["border-bottom-left-radius",186],["border-bottom-right-radius",185],["border-bottom-style",150],["border-bottom-width",179],["border-collapse",209],["border-color",226],["border-image",89],["border-image-outset",50],["border-image-repeat",49],["border-image-slice",58],["border-image-source",32],["border-image-width",52],["border-left",221],["border-left-color",174],["border-left-style",142],["border-left-width",172],["border-radius",224],["border-right",223],["border-right-color",182],["border-right-style",130],["border-right-width",178],["border-spacing",198],["border-style",206],["border-top",231],["border-top-color",192],["border-top-left-radius",187],["border-top-right-radius",189],["border-top-style",152],["border-top-width",180],["border-width",214],["bottom",227],["box-shadow",213],["box-sizing",216],["caption-side",96],["clear",229],["clip",173],["clip-rule",5],["color",256],["content",219],["counter-increment",111],["counter-reset",110],["cursor",250],["direction",176],["display",262],["empty-cells",99],["fill",140],["fill-opacity",82],["fill-rule",22],["filter",160],["flex",133],["flex-basis",66],["flex-direction",85],["flex-flow",94],["flex-grow",112],["flex-shrink",61],["flex-wrap",68],["float",252],["font",211],["font-family",254],["font-kerning",18],["font-size",264],["font-stretch",77],["font-style",220],["font-variant",161],["font-weight",257],["height",266],["image-rendering",90],["justify-content",127],["left",248],["letter-spacing",188],["line-height",244],["list-style",215],["list-style-image",145],["list-style-position",149],["list-style-type",199],["margin",267],["margin-bottom",241],["margin-left",243],["margin-right",238],["margin-top",253],["mask",20],["max-height",205],["max-width",225],["min-height",217],["min-width",218],["object-fit",33],["opacity",251],["order",117],["orphans",146],["outline",222],["outline-color",153],["outline-offset",147],["outline-style",151],["outline-width",148],["overflow",255],["overflow-wrap",105],["overflow-x",184],["overflow-y",196],["padding",265],["padding-bottom",230],["padding-left",235],["padding-right",232],["padding-top",240],["page",8],["page-break-after",120],["page-break-before",69],["page-break-inside",121],["perspective",92],["perspective-origin",103],["pointer-events",183],["position",261],["quotes",158],["resize",168],["right",245],["shape-rendering",38],["size",64],["speak",118],["src",170],["stop-color",42],["stop-opacity",31],["stroke",98],["stroke-dasharray",36],["stroke-dashoffset",3],["stroke-linecap",30],["stroke-linejoin",21],["stroke-miterlimit",12],["stroke-opacity",34],["stroke-width",87],["table-layout",171],["tab-size",46],["text-align",260],["text-anchor",35],["text-decoration",247],["text-indent",207],["text-overflow",204],["text-rendering",155],["text-shadow",208],["text-transform",202],["top",258],["touch-action",80],["transform",181],["transform-origin",162],["transform-style",86],["transition",193],["transition-delay",134],["transition-duration",135],["transition-property",131],["transition-timing-function",122],["unicode-bidi",156],["unicode-range",136],["vertical-align",236],["visibility",242],["-webkit-appearance",191],["-webkit-backface-visibility",154],["-webkit-background-clip",164],["-webkit-background-origin",40],["-webkit-background-size",163],["-webkit-border-end",9],["-webkit-border-horizontal-spacing",81],["-webkit-border-image",75],["-webkit-border-radius",212],["-webkit-border-start",10],["-webkit-border-start-color",16],["-webkit-border-start-width",13],["-webkit-border-vertical-spacing",43],["-webkit-box-align",101],["-webkit-box-direction",51],["-webkit-box-flex",128],["-webkit-box-ordinal-group",91],["-webkit-box-orient",144],["-webkit-box-pack",106],["-webkit-box-reflect",39],["-webkit-box-shadow",210],["-webkit-column-break-inside",60],["-webkit-column-count",84],["-webkit-column-gap",76],["-webkit-column-rule",25],["-webkit-column-rule-color",23],["-webkit-columns",44],["-webkit-column-span",29],["-webkit-column-width",47],["-webkit-filter",159],["-webkit-font-feature-settings",59],["-webkit-font-smoothing",177],["-webkit-line-break",45],["-webkit-line-clamp",126],["-webkit-margin-after",67],["-webkit-margin-before",70],["-webkit-margin-collapse",14],["-webkit-margin-end",65],["-webkit-margin-start",100],["-webkit-mask",19],["-webkit-mask-box-image",72],["-webkit-mask-image",88],["-webkit-mask-position",54],["-webkit-mask-repeat",63],["-webkit-mask-size",79],["-webkit-padding-after",15],["-webkit-padding-before",28],["-webkit-padding-end",48],["-webkit-padding-start",73],["-webkit-print-color-adjust",83],["-webkit-rtl-ordering",7],["-webkit-tap-highlight-color",169],["-webkit-text-emphasis-color",11],["-webkit-text-fill-color",71],["-webkit-text-security",17],["-webkit-text-stroke",56],["-webkit-text-stroke-color",37],["-webkit-text-stroke-width",53],["-webkit-user-drag",95],["-webkit-user-modify",62],["-webkit-user-select",194],["-webkit-writing-mode",4],["white-space",228],["widows",115],["width",268],["will-change",74],["word-break",166],["word-spacing",157],["word-wrap",197],["writing-mode",41],["z-index",239],["zoom",200]]),F=["auto","none"];var B=Object.freeze({__proto__:null,CSSMetadata:f,CSSWideKeywords:y,CubicBezierKeywordValues:b,CustomVariableRegex:/(var\(*--[\w\d]+-([\w]+-[\w]+)\))/g,GridAreaRowRegex:I,PositionTryOrderKeywords:v,URLRegex:/url\(\s*('.+?'|".+?"|[^)]+)\s*\)/g,VariableNameRegex:/(\s*--.*?)/gs,VariableRegex:/(var\(\s*--.*?\))/gs,cssMetadata:S});const _="";class H{#h;#u;#g;#p=new Map;#m=0;#f;#b=null;#y;constructor(e,t,n,r,s){this.#h=e,this.#u=t,this.#g=n,this.#f=r||"Medium",this.#y=s}static fromProtocolCookie(e){const t=new H(e.name,e.value,null,e.priority);return t.addAttribute("domain",e.domain),t.addAttribute("path",e.path),e.expires&&t.addAttribute("expires",1e3*e.expires),e.httpOnly&&t.addAttribute("http-only"),e.secure&&t.addAttribute("secure"),e.sameSite&&t.addAttribute("same-site",e.sameSite),"sourcePort"in e&&t.addAttribute("source-port",e.sourcePort),"sourceScheme"in e&&t.addAttribute("source-scheme",e.sourceScheme),"partitionKey"in e&&e.partitionKey&&t.setPartitionKey(e.partitionKey.topLevelSite,e.partitionKey.hasCrossSiteAncestor),"partitionKeyOpaque"in e&&e.partitionKeyOpaque&&t.addAttribute("partition-key",_),t.setSize(e.size),t}key(){return(this.domain()||"-")+" "+this.name()+" "+(this.path()||"-")+" "+(this.partitionKey()?this.topLevelSite()+" "+(this.hasCrossSiteAncestor()?"cross_site":"same_site"):"-")}name(){return this.#h}value(){return this.#u}type(){return this.#g}httpOnly(){return this.#p.has("http-only")}secure(){return this.#p.has("secure")}partitioned(){return this.#p.has("partitioned")||Boolean(this.partitionKey())||this.partitionKeyOpaque()}sameSite(){return this.#p.get("same-site")}partitionKey(){return this.#y}setPartitionKey(e,t){this.#y={topLevelSite:e,hasCrossSiteAncestor:t},this.#p.has("partitioned")||this.addAttribute("partitioned")}topLevelSite(){return this.#y?this.#y?.topLevelSite:""}setTopLevelSite(e,t){this.setPartitionKey(e,t)}hasCrossSiteAncestor(){return!!this.#y&&this.#y?.hasCrossSiteAncestor}setHasCrossSiteAncestor(e){this.partitionKey()&&Boolean(this.topLevelSite())&&this.setPartitionKey(this.topLevelSite(),e)}partitionKeyOpaque(){return!!this.#y&&this.topLevelSite()===_}setPartitionKeyOpaque(){this.addAttribute("partition-key",_),this.setPartitionKey(_,!1)}priority(){return this.#f}session(){return!(this.#p.has("expires")||this.#p.has("max-age"))}path(){return this.#p.get("path")}domain(){return this.#p.get("domain")}expires(){return this.#p.get("expires")}maxAge(){return this.#p.get("max-age")}sourcePort(){return this.#p.get("source-port")}sourceScheme(){return this.#p.get("source-scheme")}size(){return this.#m}url(){if(!this.domain()||!this.path())return null;let e="";const t=this.sourcePort();return t&&80!==t&&443!==t&&(e=`:${this.sourcePort()}`),(this.secure()?"https://":"http://")+this.domain()+e+this.path()}setSize(e){this.#m=e}expiresDate(e){return this.maxAge()?new Date(e.getTime()+1e3*this.maxAge()):this.expires()?new Date(this.expires()):null}addAttribute(e,t){if(e)if("priority"===e)this.#f=t;else this.#p.set(e,t)}hasAttribute(e){return this.#p.has(e)}getAttribute(e){return this.#p.get(e)}setCookieLine(e){this.#b=e}getCookieLine(){return this.#b}matchesSecurityOrigin(e){const t=new URL(e).hostname;return H.isDomainMatch(this.domain(),t)}static isDomainMatch(e,t){return t===e||!(!e||"."!==e[0])&&(e.substr(1)===t||t.length>e.length&&t.endsWith(e))}}var U,q=Object.freeze({__proto__:null,Cookie:H});class z extends l.InspectorBackend.TargetBase{#v;#h;#I=r.DevToolsPath.EmptyUrlString;#w="";#S;#g;#k;#C;#x=new Map;#R;#T=!1;#M;#P;constructor(t,n,r,s,i,o,a,l,d){switch(super(s===U.NODE,i,o,l),this.#v=t,this.#h=r,this.#S=0,s){case U.FRAME:this.#S=1027519,i?.type()!==U.FRAME&&(this.#S|=21056,e.ParsedURL.schemeIs(d?.url,"chrome-extension:")&&(this.#S&=-513));break;case U.ServiceWorker:this.#S=657468,i?.type()!==U.FRAME&&(this.#S|=1);break;case U.SHARED_WORKER:this.#S=919612;break;case U.SHARED_STORAGE_WORKLET:this.#S=526348;break;case U.Worker:this.#S=917820;break;case U.WORKLET:this.#S=524316;break;case U.NODE:this.#S=20;break;case U.AUCTION_WORKLET:this.#S=524292;break;case U.BROWSER:this.#S=131104;break;case U.TAB:this.#S=160}this.#g=s,this.#k=i,this.#C=n,this.#R=a,this.#M=d}createModels(e){this.#P=!0;const t=Array.from(h.registeredModels.entries());for(const[e,n]of t)n.early&&this.model(e);for(const[n,r]of t)(r.autostart||e.has(n))&&this.model(n);this.#P=!1}id(){return this.#C}name(){return this.#h||this.#w}setName(e){this.#h!==e&&(this.#h=e,this.#v.onNameChange(this))}type(){return this.#g}markAsNodeJSForTest(){super.markAsNodeJSForTest(),this.#g=U.NODE}targetManager(){return this.#v}hasAllCapabilities(e){return(this.#S&e)===e}decorateLabel(e){return this.#g===U.Worker||this.#g===U.ServiceWorker?"⚙ "+e:e}parentTarget(){return this.#k}outermostTarget(){let e=null,t=this;do{t.type()!==U.TAB&&t.type()!==U.BROWSER&&(e=t),t=t.parentTarget()}while(t);return e}dispose(e){super.dispose(e),this.#v.removeTarget(this);for(const e of this.#x.values())e.dispose()}model(e){if(!this.#x.get(e)){const t=h.registeredModels.get(e);if(void 0===t)throw new Error("Model class is not registered");if((this.#S&t.capabilities)===t.capabilities){const t=new e(this);this.#x.set(e,t),this.#P||this.#v.modelAdded(this,e,t,this.#v.isInScope(this))}}return this.#x.get(e)||null}models(){return this.#x}inspectedURL(){return this.#I}setInspectedURL(t){this.#I=t;const n=e.ParsedURL.ParsedURL.fromString(t);this.#w=n?n.lastPathComponentWithFragment():"#"+this.#C,this.#v.onInspectedURLChange(this),this.#h||this.#v.onNameChange(this)}hasCrashed(){return this.#T}setHasCrashed(e){const t=this.#T;this.#T=e,t&&!e&&this.resume()}async suspend(e){this.#R||(this.#R=!0,this.#T||(await Promise.all(Array.from(this.models().values(),(t=>t.preSuspendModel(e)))),await Promise.all(Array.from(this.models().values(),(t=>t.suspendModel(e))))))}async resume(){this.#R&&(this.#R=!1,this.#T||(await Promise.all(Array.from(this.models().values(),(e=>e.resumeModel()))),await Promise.all(Array.from(this.models().values(),(e=>e.postResumeModel())))))}suspended(){return this.#R}updateTargetInfo(e){this.#M=e}targetInfo(){return this.#M}}!function(e){e.FRAME="frame",e.ServiceWorker="service-worker",e.Worker="worker",e.SHARED_WORKER="shared-worker",e.SHARED_STORAGE_WORKLET="shared-storage-worklet",e.NODE="node",e.BROWSER="browser",e.AUCTION_WORKLET="auction-worklet",e.WORKLET="worklet",e.TAB="tab"}(U||(U={}));var j=Object.freeze({__proto__:null,Target:z,get Type(){return U}});let V;class W extends e.ObjectWrapper.ObjectWrapper{#E;#L;#A;#O;#D;#R;#N;#F;#B;#_;constructor(){super(),this.#E=new Set,this.#L=new Set,this.#A=new r.MapUtilities.Multimap,this.#O=new r.MapUtilities.Multimap,this.#R=!1,this.#N=null,this.#F=null,this.#D=new WeakSet,this.#B=!1,this.#_=new Set}static instance({forceNew:e}={forceNew:!1}){return V&&!e||(V=new W),V}static removeInstance(){V=void 0}onInspectedURLChange(e){e===this.#F&&(a.InspectorFrontendHost.InspectorFrontendHostInstance.inspectedURLChanged(e.inspectedURL()||r.DevToolsPath.EmptyUrlString),this.dispatchEventToListeners("InspectedURLChanged",e))}onNameChange(e){this.dispatchEventToListeners("NameChanged",e)}async suspendAllTargets(e){if(this.#R)return;this.#R=!0,this.dispatchEventToListeners("SuspendStateChanged");const t=Array.from(this.#E.values(),(t=>t.suspend(e)));await Promise.all(t)}async resumeAllTargets(){if(!this.#R)return;this.#R=!1,this.dispatchEventToListeners("SuspendStateChanged");const e=Array.from(this.#E.values(),(e=>e.resume()));await Promise.all(e)}allTargetsSuspended(){return this.#R}models(e,t){const n=[];for(const r of this.#E){if(t?.scoped&&!this.isInScope(r))continue;const s=r.model(e);s&&n.push(s)}return n}inspectedURL(){const e=this.primaryPageTarget();return e?e.inspectedURL():""}observeModels(e,t,n){const r=this.models(e,n);this.#O.set(e,t),n?.scoped&&this.#D.add(t);for(const e of r)t.modelAdded(e)}unobserveModels(e,t){this.#O.delete(e,t),this.#D.delete(t)}modelAdded(e,t,n,r){for(const e of this.#O.get(t).values())this.#D.has(e)&&!r||e.modelAdded(n)}modelRemoved(e,t,n,r){for(const e of this.#O.get(t).values())this.#D.has(e)&&!r||e.modelRemoved(n)}addModelListener(e,t,n,r,s){const i=e=>{s?.scoped&&!this.isInScope(e)||n.call(r,e)};for(const n of this.models(e))n.addEventListener(t,i);this.#A.set(t,{modelClass:e,thisObject:r,listener:n,wrappedListener:i})}removeModelListener(e,t,n,r){if(!this.#A.has(t))return;let s=null;for(const i of this.#A.get(t))i.modelClass===e&&i.listener===n&&i.thisObject===r&&(s=i.wrappedListener,this.#A.delete(t,i));if(s)for(const n of this.models(e))n.removeEventListener(t,s)}observeTargets(e,t){if(this.#L.has(e))throw new Error("Observer can only be registered once");t?.scoped&&this.#D.add(e);for(const n of this.#E)t?.scoped&&!this.isInScope(n)||e.targetAdded(n);this.#L.add(e)}unobserveTargets(e){this.#L.delete(e),this.#D.delete(e)}createTarget(e,t,n,r,s,i,o,a){const l=new z(this,e,t,n,r,s||"",this.#R,o||null,a);i&&l.pageAgent().invoke_waitForDebugger(),l.createModels(new Set(this.#O.keysArray())),this.#E.add(l);const d=this.isInScope(l);for(const e of[...this.#L])this.#D.has(e)&&!d||e.targetAdded(l);for(const[e,t]of l.models().entries())this.modelAdded(l,e,t,d);for(const e of this.#A.keysArray())for(const t of this.#A.get(e)){const n=l.model(t.modelClass);n&&n.addEventListener(e,t.wrappedListener)}return l!==l.outermostTarget()||l.type()===U.FRAME&&l!==this.primaryPageTarget()||this.#B||this.setScopeTarget(l),l}removeTarget(e){if(!this.#E.has(e))return;const t=this.isInScope(e);this.#E.delete(e);for(const n of e.models().keys()){const r=e.models().get(n);s(r),this.modelRemoved(e,n,r,t)}for(const n of[...this.#L])this.#D.has(n)&&!t||n.targetRemoved(e);for(const t of this.#A.keysArray())for(const n of this.#A.get(t)){const r=e.model(n.modelClass);r&&r.removeEventListener(t,n.wrappedListener)}}targets(){return[...this.#E]}targetById(e){return this.targets().find((t=>t.id()===e))||null}rootTarget(){return 0===this.#E.size?null:this.#E.values().next().value??null}primaryPageTarget(){let e=this.rootTarget();return e?.type()===U.TAB&&(e=this.targets().find((t=>t.parentTarget()===e&&t.type()===U.FRAME&&!t.targetInfo()?.subtype?.length))||null),e}browserTarget(){return this.#N}async maybeAttachInitialTarget(){if(!Boolean(o.Runtime.Runtime.queryParam("browserConnection")))return!1;this.#N||(this.#N=new z(this,"main","browser",U.BROWSER,null,"",!1,null,void 0),this.#N.createModels(new Set(this.#O.keysArray())));const e=await a.InspectorFrontendHost.InspectorFrontendHostInstance.initialTargetId();return this.#N.targetAgent().invoke_autoAttachRelated({targetId:e,waitForDebuggerOnStart:!0}),!0}clearAllTargetsForTest(){this.#E.clear()}isInScope(e){if(!e)return!1;for(function(e){return"source"in e&&e.source instanceof h}(e)&&(e=e.source),e instanceof h&&(e=e.target());e&&e!==this.#F;)e=e.parentTarget();return Boolean(e)&&e===this.#F}setScopeTarget(e){if(e!==this.#F){for(const e of this.targets())if(this.isInScope(e)){for(const t of this.#O.keysArray()){const n=e.models().get(t);if(n)for(const e of[...this.#O.get(t)].filter((e=>this.#D.has(e))))e.modelRemoved(n)}for(const t of[...this.#L].filter((e=>this.#D.has(e))))t.targetRemoved(e)}this.#F=e;for(const e of this.targets())if(this.isInScope(e)){for(const t of[...this.#L].filter((e=>this.#D.has(e))))t.targetAdded(e);for(const[t,n]of e.models().entries())for(const e of[...this.#O.get(t)].filter((e=>this.#D.has(e))))e.modelAdded(n)}for(const e of this.#_)e();e&&e.inspectedURL()&&this.onInspectedURLChange(e)}}addScopeChangeListener(e){this.#_.add(e)}scopeTarget(){return this.#F}}var G=Object.freeze({__proto__:null,Observer:class{targetAdded(e){}targetRemoved(e){}},SDKModelObserver:class{modelAdded(e){}modelRemoved(e){}},TargetManager:W});const K={noContentForWebSocket:"Content for WebSockets is currently not supported",noContentForRedirect:"No content available because this request was redirected",noContentForPreflight:"No content available for preflight request",noThrottling:"No throttling",offline:"Offline",slowG:"3G",fastG:"Slow 4G",fast4G:"Fast 4G",requestWasBlockedByDevtoolsS:'Request was blocked by DevTools: "{PH1}"',sFailedLoadingSS:'{PH1} failed loading: {PH2} "{PH3}".',sFinishedLoadingSS:'{PH1} finished loading: {PH2} "{PH3}".',directSocketStatusOpening:"Opening",directSocketStatusOpen:"Open",directSocketStatusClosed:"Closed",directSocketStatusAborted:"Aborted"},Q=n.i18n.registerUIStrings("core/sdk/NetworkManager.ts",K),$=n.i18n.getLocalizedString.bind(void 0,Q),X=n.i18n.getLazilyComputedLocalizedString.bind(void 0,Q),J=new WeakMap,Y=new Map([["2g","cellular2g"],["3g","cellular3g"],["4g","cellular4g"],["bluetooth","bluetooth"],["wifi","wifi"],["wimax","wimax"]]);class Z extends h{dispatcher;fetchDispatcher;#H;#U;constructor(t){super(t),this.dispatcher=new le(this),this.fetchDispatcher=new ae(t.fetchAgent(),this),this.#H=t.networkAgent(),t.registerNetworkDispatcher(this.dispatcher),t.registerFetchDispatcher(this.fetchDispatcher),e.Settings.Settings.instance().moduleSetting("cache-disabled").get()&&this.#H.invoke_setCacheDisabled({cacheDisabled:!0}),o.Runtime.hostConfig.devToolsPrivacyUI?.enabled&&!0!==o.Runtime.hostConfig.thirdPartyCookieControls?.managedBlockThirdPartyCookies&&(e.Settings.Settings.instance().createSetting("cookie-control-override-enabled",void 0).get()||e.Settings.Settings.instance().createSetting("grace-period-mitigation-disabled",void 0).get()||e.Settings.Settings.instance().createSetting("heuristic-mitigation-disabled",void 0).get())&&this.cookieControlFlagsSettingChanged(),this.#H.invoke_enable({maxPostDataSize:oe}),this.#H.invoke_setAttachDebugStack({enabled:!0}),this.#U=e.Settings.Settings.instance().createSetting("bypass-service-worker",!1),this.#U.get()&&this.bypassServiceWorkerChanged(),this.#U.addChangeListener(this.bypassServiceWorkerChanged,this),e.Settings.Settings.instance().moduleSetting("cache-disabled").addChangeListener(this.cacheDisabledSettingChanged,this),e.Settings.Settings.instance().createSetting("cookie-control-override-enabled",void 0).addChangeListener(this.cookieControlFlagsSettingChanged,this),e.Settings.Settings.instance().createSetting("grace-period-mitigation-disabled",void 0).addChangeListener(this.cookieControlFlagsSettingChanged,this),e.Settings.Settings.instance().createSetting("heuristic-mitigation-disabled",void 0).addChangeListener(this.cookieControlFlagsSettingChanged,this)}static forRequest(e){return J.get(e)||null}static canReplayRequest(t){return Boolean(J.get(t))&&Boolean(t.backendRequestId())&&!t.isRedirect()&&t.resourceType()===e.ResourceType.resourceTypes.XHR}static replayRequest(e){const t=J.get(e),n=e.backendRequestId();t&&n&&!e.isRedirect()&&t.#H.invoke_replayXHR({requestId:n})}static async searchInRequest(e,n,r,s){const i=Z.forRequest(e),o=e.backendRequestId();if(!i||!o||e.isRedirect())return[];const a=await i.#H.invoke_searchInResponseBody({requestId:o,query:n,caseSensitive:r,isRegex:s});return t.TextUtils.performSearchInSearchMatches(a.result||[],n,r,s)}static async requestContentData(n){if(n.resourceType()===e.ResourceType.resourceTypes.WebSocket)return{error:$(K.noContentForWebSocket)};if(n.finished||await n.once(Ti.FINISHED_LOADING),n.isRedirect())return{error:$(K.noContentForRedirect)};if(n.isPreflightRequest())return{error:$(K.noContentForPreflight)};const r=Z.forRequest(n);if(!r)return{error:"No network manager for request"};const s=n.backendRequestId();if(!s)return{error:"No backend request id for request"};const i=await r.#H.invoke_getResponseBody({requestId:s}),o=i.getError();return o?{error:o}:new t.ContentData.ContentData(i.body,i.base64Encoded,n.mimeType,n.charset()??void 0)}static async streamResponseBody(e){if(e.finished)return{error:"Streaming the response body is only available for in-flight requests."};const n=Z.forRequest(e);if(!n)return{error:"No network manager for request"};const r=e.backendRequestId();if(!r)return{error:"No backend request id for request"};const s=await n.#H.invoke_streamResourceContent({requestId:r}),i=s.getError();return i?{error:i}:(await e.waitForResponseReceived(),new t.ContentData.ContentData(s.bufferedData,!0,e.mimeType,e.charset()??void 0))}static async requestPostData(e){const t=Z.forRequest(e);if(!t)return console.error("No network manager for request"),null;const n=e.backendRequestId();if(!n)return console.error("No backend request id for request"),null;try{const{postData:e}=await t.#H.invoke_getRequestPostData({requestId:n});return e}catch(e){return e.message}}static connectionType(e){if(!e.download&&!e.upload)return"none";try{const t="function"==typeof e.title?e.title().toLowerCase():e.title.toLowerCase();for(const[e,n]of Y)if(t.includes(e))return n}catch{return"none"}return"other"}static lowercaseHeaders(e){const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}requestForURL(e){return this.dispatcher.requestForURL(e)}requestForId(e){return this.dispatcher.requestForId(e)}requestForLoaderId(e){return this.dispatcher.requestForLoaderId(e)}cacheDisabledSettingChanged({data:e}){this.#H.invoke_setCacheDisabled({cacheDisabled:e})}cookieControlFlagsSettingChanged(){const t=Boolean(e.Settings.Settings.instance().createSetting("cookie-control-override-enabled",void 0).get()),n=!!t&&Boolean(e.Settings.Settings.instance().createSetting("grace-period-mitigation-disabled",void 0).get()),r=!!t&&Boolean(e.Settings.Settings.instance().createSetting("heuristic-mitigation-disabled",void 0).get());this.#H.invoke_setCookieControls({enableThirdPartyCookieRestriction:t,disableThirdPartyCookieMetadata:n,disableThirdPartyCookieHeuristics:r})}dispose(){e.Settings.Settings.instance().moduleSetting("cache-disabled").removeChangeListener(this.cacheDisabledSettingChanged,this)}bypassServiceWorkerChanged(){this.#H.invoke_setBypassServiceWorker({bypass:this.#U.get()})}async getSecurityIsolationStatus(e){const t=await this.#H.invoke_getSecurityIsolationStatus({frameId:e??void 0});return t.getError()?null:t.status}async enableReportingApi(e=!0){return await this.#H.invoke_enableReportingApi({enable:e})}async loadNetworkResource(e,t,n){const r=await this.#H.invoke_loadNetworkResource({frameId:e??void 0,url:t,options:n});if(r.getError())throw new Error(r.getError());return r.resource}clearRequests(){this.dispatcher.clearRequests()}}var ee;!function(e){e.RequestStarted="RequestStarted",e.RequestUpdated="RequestUpdated",e.RequestFinished="RequestFinished",e.RequestUpdateDropped="RequestUpdateDropped",e.ResponseReceived="ResponseReceived",e.MessageGenerated="MessageGenerated",e.RequestRedirected="RequestRedirected",e.LoadingFinished="LoadingFinished",e.ReportingApiReportAdded="ReportingApiReportAdded",e.ReportingApiReportUpdated="ReportingApiReportUpdated",e.ReportingApiEndpointsChangedForOrigin="ReportingApiEndpointsChangedForOrigin"}(ee||(ee={}));const te={title:X(K.noThrottling),i18nTitleKey:K.noThrottling,download:-1,upload:-1,latency:0},ne={title:X(K.offline),i18nTitleKey:K.offline,download:0,upload:0,latency:0},re={title:X(K.slowG),i18nTitleKey:K.slowG,download:5e4,upload:5e4,latency:2e3,targetLatency:400},se={title:X(K.fastG),i18nTitleKey:K.fastG,download:18e4,upload:84375,latency:562.5,targetLatency:150},ie={title:X(K.fast4G),i18nTitleKey:K.fast4G,download:1012500,upload:168750,latency:165,targetLatency:60},oe=65536;class ae{#q;#z;constructor(e,t){this.#q=e,this.#z=t}requestPaused({requestId:e,request:t,resourceType:n,responseStatusCode:r,responseHeaders:s,networkId:i}){const o=i?this.#z.requestForId(i):null;0===o?.originalResponseHeaders.length&&s&&(o.originalResponseHeaders=s),ce.instance().requestIntercepted(new he(this.#q,t,n,e,o,r,s))}authRequired({}){}}class le{#z;#j=new Map;#V=new Map;#W=new Map;#G=new Map;#K=new Map;constructor(e){this.#z=e,ce.instance().addEventListener("RequestIntercepted",this.#Q.bind(this))}#Q(e){const t=this.requestForId(e.data);t&&t.setWasIntercepted(!0)}headersMapToHeadersArray(e){const t=[];for(const n in e){const r=e[n].split("\n");for(let e=0;e=0&&t.setTransferSize(n.encodedDataLength),n.requestHeaders&&!t.hasExtraRequestInfo()&&(t.setRequestHeaders(this.headersMapToHeadersArray(n.requestHeaders)),t.setRequestHeadersText(n.requestHeadersText||"")),t.connectionReused=n.connectionReused,t.connectionId=String(n.connectionId),n.remoteIPAddress&&t.setRemoteAddress(n.remoteIPAddress,n.remotePort||-1),n.fromServiceWorker&&(t.fetchedViaServiceWorker=!0),n.fromDiskCache&&t.setFromDiskCache(),n.fromPrefetchCache&&t.setFromPrefetchCache(),n.fromEarlyHints&&t.setFromEarlyHints(),n.cacheStorageCacheName&&t.setResponseCacheStorageCacheName(n.cacheStorageCacheName),n.serviceWorkerRouterInfo&&(t.serviceWorkerRouterInfo=n.serviceWorkerRouterInfo),n.responseTime&&t.setResponseRetrievalTime(new Date(n.responseTime)),t.timing=n.timing,t.protocol=n.protocol||"",t.alternateProtocolUsage=n.alternateProtocolUsage,n.serviceWorkerResponseSource&&t.setServiceWorkerResponseSource(n.serviceWorkerResponseSource),t.setSecurityState(n.securityState),n.securityDetails&&t.setSecurityDetails(n.securityDetails);const r=e.ResourceType.ResourceType.fromMimeTypeOverride(t.mimeType);r&&t.setResourceType(r),t.responseReceivedPromiseResolve?t.responseReceivedPromiseResolve():t.responseReceivedPromise=Promise.resolve()}requestForId(e){return this.#j.get(e)||null}requestForURL(e){return this.#V.get(e)||null}requestForLoaderId(e){return this.#W.get(e)||null}resourceChangedPriority({requestId:e,newPriority:t}){const n=this.#j.get(e);n&&n.setPriority(t)}signedExchangeReceived({requestId:t,info:n}){let r=this.#j.get(t);(r||(r=this.#V.get(n.outerResponse.url),r))&&(r.setSignedExchangeInfo(n),r.setResourceType(e.ResourceType.resourceTypes.SignedExchange),this.updateNetworkRequestWithResponse(r,n.outerResponse),this.updateNetworkRequest(r),this.#z.dispatchEventToListeners(ee.ResponseReceived,{request:r,response:n.outerResponse}))}requestWillBeSent({requestId:t,loaderId:n,documentURL:r,request:s,timestamp:i,wallTime:o,initiator:a,redirectResponse:l,type:d,frameId:c,hasUserGesture:h}){let u=this.#j.get(t);if(u){if(!l)return;u.signedExchangeInfo()||this.responseReceived({requestId:t,loaderId:n,timestamp:i,type:d||"Other",response:l,hasExtraInfo:!1,frameId:c}),u=this.appendRedirect(t,i,s.url),this.#z.dispatchEventToListeners(ee.RequestRedirected,u)}else u=Ri.create(t,s.url,r,c??null,n,a,h),J.set(u,this.#z);u.hasNetworkData=!0,this.updateNetworkRequestWithRequest(u,s),u.setIssueTime(i,o),u.setResourceType(d?e.ResourceType.resourceTypes[d]:e.ResourceType.resourceTypes.Other),s.trustTokenParams&&u.setTrustTokenParams(s.trustTokenParams);const g=this.#K.get(t);g&&(u.setTrustTokenOperationDoneEvent(g),this.#K.delete(t)),this.getExtraInfoBuilder(t).addRequest(u),this.startNetworkRequest(u,s)}requestServedFromCache({requestId:e}){const t=this.#j.get(e);t&&t.setFromMemoryCache()}responseReceived({requestId:t,loaderId:n,timestamp:r,type:s,response:i,frameId:o}){const a=this.#j.get(t),l=Z.lowercaseHeaders(i.headers);if(a)a.responseReceivedTime=r,a.setResourceType(e.ResourceType.resourceTypes[s]),this.updateNetworkRequestWithResponse(a,i),this.updateNetworkRequest(a),this.#z.dispatchEventToListeners(ee.ResponseReceived,{request:a,response:i});else{const e=l["last-modified"],t={url:i.url,frameId:o??null,loaderId:n,resourceType:s,mimeType:i.mimeType,lastModified:e?new Date(e):null};this.#z.dispatchEventToListeners(ee.RequestUpdateDropped,t)}}dataReceived(e){let t=this.#j.get(e.requestId);t||(t=this.maybeAdoptMainResourceRequest(e.requestId)),t&&(t.addDataReceivedEvent(e),this.updateNetworkRequest(t))}loadingFinished({requestId:e,timestamp:t,encodedDataLength:n}){let r=this.#j.get(e);r||(r=this.maybeAdoptMainResourceRequest(e)),r&&(this.getExtraInfoBuilder(e).finished(),this.finishNetworkRequest(r,t,n),this.#z.dispatchEventToListeners(ee.LoadingFinished,r))}loadingFailed({requestId:t,timestamp:n,type:r,errorText:s,canceled:i,blockedReason:o,corsErrorStatus:a}){const l=this.#j.get(t);if(l){if(l.failed=!0,l.setResourceType(e.ResourceType.resourceTypes[r]),l.canceled=Boolean(i),o&&(l.setBlockedReason(o),"inspector"===o)){const e=$(K.requestWasBlockedByDevtoolsS,{PH1:l.url()});this.#z.dispatchEventToListeners(ee.MessageGenerated,{message:e,requestId:t,warning:!0})}a&&l.setCorsErrorStatus(a),l.localizedFailDescription=s,this.getExtraInfoBuilder(t).finished(),this.finishNetworkRequest(l,n,-1)}}webSocketCreated({requestId:t,url:n,initiator:r}){const s=Ri.createForWebSocket(t,n,r);J.set(s,this.#z),s.setResourceType(e.ResourceType.resourceTypes.WebSocket),this.startNetworkRequest(s,null)}webSocketWillSendHandshakeRequest({requestId:e,timestamp:t,wallTime:n,request:r}){const s=this.#j.get(e);s&&(s.requestMethod="GET",s.setRequestHeaders(this.headersMapToHeadersArray(r.headers)),s.setIssueTime(t,n),this.updateNetworkRequest(s))}webSocketHandshakeResponseReceived({requestId:e,timestamp:t,response:n}){const r=this.#j.get(e);r&&(r.statusCode=n.status,r.statusText=n.statusText,r.responseHeaders=this.headersMapToHeadersArray(n.headers),r.responseHeadersText=n.headersText||"",n.requestHeaders&&r.setRequestHeaders(this.headersMapToHeadersArray(n.requestHeaders)),n.requestHeadersText&&r.setRequestHeadersText(n.requestHeadersText),r.responseReceivedTime=t,r.protocol="websocket",this.updateNetworkRequest(r))}webSocketFrameReceived({requestId:e,timestamp:t,response:n}){const r=this.#j.get(e);r&&(r.addProtocolFrame(n,t,!1),r.responseReceivedTime=t,this.updateNetworkRequest(r))}webSocketFrameSent({requestId:e,timestamp:t,response:n}){const r=this.#j.get(e);r&&(r.addProtocolFrame(n,t,!0),r.responseReceivedTime=t,this.updateNetworkRequest(r))}webSocketFrameError({requestId:e,timestamp:t,errorMessage:n}){const r=this.#j.get(e);r&&(r.addProtocolFrameError(n,t),r.responseReceivedTime=t,this.updateNetworkRequest(r))}webSocketClosed({requestId:e,timestamp:t}){const n=this.#j.get(e);n&&this.finishNetworkRequest(n,t,-1)}eventSourceMessageReceived({requestId:e,timestamp:t,eventName:n,eventId:r,data:s}){const i=this.#j.get(e);i&&i.addEventSourceMessage(t,n,r,s)}requestIntercepted({}){}requestWillBeSentExtraInfo({requestId:e,associatedCookies:t,headers:n,clientSecurityState:r,connectTiming:s,siteHasCookieInOtherPartition:i}){const o=[],a=[];for(const{blockedReasons:e,exemptionReason:n,cookie:r}of t)0===e.length?a.push({exemptionReason:n,cookie:H.fromProtocolCookie(r)}):o.push({blockedReasons:e,cookie:H.fromProtocolCookie(r)});const l={blockedRequestCookies:o,includedRequestCookies:a,requestHeaders:this.headersMapToHeadersArray(n),clientSecurityState:r,connectTiming:s,siteHasCookieInOtherPartition:i};this.getExtraInfoBuilder(e).addRequestExtraInfo(l)}responseReceivedEarlyHints({requestId:e,headers:t}){this.getExtraInfoBuilder(e).setEarlyHintsHeaders(this.headersMapToHeadersArray(t))}responseReceivedExtraInfo({requestId:e,blockedCookies:t,headers:n,headersText:r,resourceIPAddressSpace:s,statusCode:i,cookiePartitionKey:o,cookiePartitionKeyOpaque:a,exemptedCookies:l}){const d={blockedResponseCookies:t.map((e=>({blockedReasons:e.blockedReasons,cookieLine:e.cookieLine,cookie:e.cookie?H.fromProtocolCookie(e.cookie):null}))),responseHeaders:this.headersMapToHeadersArray(n),responseHeadersText:r,resourceIPAddressSpace:s,statusCode:i,cookiePartitionKey:o,cookiePartitionKeyOpaque:a,exemptedResponseCookies:l?.map((e=>({cookie:H.fromProtocolCookie(e.cookie),cookieLine:e.cookieLine,exemptionReason:e.exemptionReason})))};this.getExtraInfoBuilder(e).addResponseExtraInfo(d)}getExtraInfoBuilder(e){let t;return this.#G.has(e)?t=this.#G.get(e):(t=new ue,this.#G.set(e,t)),t}appendRedirect(e,t,n){const r=this.#j.get(e);if(!r)throw new Error(`Could not find original network request for ${e}`);let s=0;for(let e=r.redirectSource();e;e=e.redirectSource())s++;r.markAsRedirect(s),this.finishNetworkRequest(r,t,-1);const i=Ri.create(e,n,r.documentURL,r.frameId,r.loaderId,r.initiator(),r.hasUserGesture()??void 0);return J.set(i,this.#z),i.setRedirectSource(r),r.setRedirectDestination(i),i}maybeAdoptMainResourceRequest(e){const t=ce.instance().inflightMainResourceRequests.get(e);if(!t)return null;const n=Z.forRequest(t).dispatcher;n.#j.delete(e),n.#V.delete(t.url());const r=t.loaderId;r&&n.#W.delete(r);const s=n.#G.get(e);return n.#G.delete(e),this.#j.set(e,t),this.#V.set(t.url(),t),r&&this.#W.set(r,t),s&&this.#G.set(e,s),J.set(t,this.#z),t}startNetworkRequest(e,t){this.#j.set(e.requestId(),e),this.#V.set(e.url(),e);const n=e.loaderId;n&&this.#W.set(n,e),e.loaderId!==e.requestId()&&""!==e.loaderId||ce.instance().inflightMainResourceRequests.set(e.requestId(),e),this.#z.dispatchEventToListeners(ee.RequestStarted,{request:e,originalRequest:t})}updateNetworkRequest(e){this.#z.dispatchEventToListeners(ee.RequestUpdated,e)}finishNetworkRequest(t,n,r){if(t.endTime=n,t.finished=!0,r>=0){const e=t.redirectSource();e?.signedExchangeInfo()?(t.setTransferSize(0),e.setTransferSize(r),this.updateNetworkRequest(e)):t.setTransferSize(r)}if(this.#z.dispatchEventToListeners(ee.RequestFinished,t),ce.instance().inflightMainResourceRequests.delete(t.requestId()),e.Settings.Settings.instance().moduleSetting("monitoring-xhr-enabled").get()&&t.resourceType().category()===e.ResourceType.resourceCategories.XHR){let e;const n=t.failed||t.hasErrorStatusCode();e=$(n?K.sFailedLoadingSS:K.sFinishedLoadingSS,{PH1:t.resourceType().title(),PH2:t.requestMethod,PH3:t.url()}),this.#z.dispatchEventToListeners(ee.MessageGenerated,{message:e,requestId:t.requestId(),warning:!1})}}clearRequests(){for(const[e,t]of this.#j)t.finished&&this.#j.delete(e);for(const[e,t]of this.#V)t.finished&&this.#V.delete(e);for(const[e,t]of this.#W)t.finished&&this.#W.delete(e);for(const[e,t]of this.#G)t.isFinished()&&this.#G.delete(e)}webTransportCreated({transportId:t,url:n,timestamp:r,initiator:s}){const i=Ri.createForWebSocket(t,n,s);i.hasNetworkData=!0,J.set(i,this.#z),i.setResourceType(e.ResourceType.resourceTypes.WebTransport),i.setIssueTime(r,0),this.startNetworkRequest(i,null)}webTransportConnectionEstablished({transportId:e,timestamp:t}){const n=this.#j.get(e);n&&(n.responseReceivedTime=t,n.endTime=t+.001,this.updateNetworkRequest(n))}webTransportClosed({transportId:e,timestamp:t}){const n=this.#j.get(e);n&&(n.endTime=t,this.finishNetworkRequest(n,t,0))}directTCPSocketCreated(t){const r=0===t.remotePort?t.remoteAddr:`${t.remoteAddr}:${t.remotePort}`,s=Ri.createForWebSocket(t.identifier,r,t.initiator);s.hasNetworkData=!0,s.setRemoteAddress(t.remoteAddr,t.remotePort),s.protocol=n.i18n.lockedString("tcp"),s.statusText=$(K.directSocketStatusOpening),s.directSocketInfo={type:Li.TCP,status:Ai.OPENING,createOptions:{remoteAddr:t.remoteAddr,remotePort:t.remotePort,noDelay:t.options.noDelay,keepAliveDelay:t.options.keepAliveDelay,sendBufferSize:t.options.sendBufferSize,receiveBufferSize:t.options.receiveBufferSize,dnsQueryType:t.options.dnsQueryType}},s.setResourceType(e.ResourceType.resourceTypes.DirectSocket),s.setIssueTime(t.timestamp,t.timestamp),J.set(s,this.#z),this.startNetworkRequest(s,null)}directTCPSocketOpened(e){const t=this.#j.get(e.identifier);if(!t?.directSocketInfo)return;t.responseReceivedTime=e.timestamp,t.directSocketInfo.status=Ai.OPEN,t.statusText=$(K.directSocketStatusOpen),t.directSocketInfo.openInfo={remoteAddr:e.remoteAddr,remotePort:e.remotePort,localAddr:e.localAddr,localPort:e.localPort},t.setRemoteAddress(e.remoteAddr,e.remotePort);const n=0===e.remotePort?e.remoteAddr:`${e.remoteAddr}:${e.remotePort}`;t.setUrl(n),this.updateNetworkRequest(t)}directTCPSocketAborted(e){const t=this.#j.get(e.identifier);t?.directSocketInfo&&(t.failed=!0,t.directSocketInfo.status=Ai.ABORTED,t.statusText=$(K.directSocketStatusAborted),t.directSocketInfo.errorMessage=e.errorMessage,this.finishNetworkRequest(t,e.timestamp,0))}directTCPSocketClosed(e){const t=this.#j.get(e.identifier);t?.directSocketInfo&&(t.statusText=$(K.directSocketStatusClosed),t.directSocketInfo.status=Ai.CLOSED,this.finishNetworkRequest(t,e.timestamp,0))}trustTokenOperationDone(e){const t=this.#j.get(e.requestId);t?t.setTrustTokenOperationDoneEvent(e):this.#K.set(e.requestId,e)}subresourceWebBundleMetadataReceived({requestId:e,urls:t}){const n=this.getExtraInfoBuilder(e);n.setWebBundleInfo({resourceUrls:t});const r=n.finalRequest();r&&this.updateNetworkRequest(r)}subresourceWebBundleMetadataError({requestId:e,errorMessage:t}){const n=this.getExtraInfoBuilder(e);n.setWebBundleInfo({errorMessage:t});const r=n.finalRequest();r&&this.updateNetworkRequest(r)}subresourceWebBundleInnerResponseParsed({innerRequestId:e,bundleRequestId:t}){const n=this.getExtraInfoBuilder(e);n.setWebBundleInnerRequestInfo({bundleRequestId:t});const r=n.finalRequest();r&&this.updateNetworkRequest(r)}subresourceWebBundleInnerResponseError({innerRequestId:e,errorMessage:t}){const n=this.getExtraInfoBuilder(e);n.setWebBundleInnerRequestInfo({errorMessage:t});const r=n.finalRequest();r&&this.updateNetworkRequest(r)}reportingApiReportAdded(e){this.#z.dispatchEventToListeners(ee.ReportingApiReportAdded,e.report)}reportingApiReportUpdated(e){this.#z.dispatchEventToListeners(ee.ReportingApiReportUpdated,e.report)}reportingApiEndpointsChangedForOrigin(e){this.#z.dispatchEventToListeners(ee.ReportingApiEndpointsChangedForOrigin,e)}policyUpdated(){}createNetworkRequest(e,t,n,r,s,i){const o=Ri.create(e,r,s,t,n,i);return J.set(o,this.#z),o}}let de;class ce extends e.ObjectWrapper.ObjectWrapper{#$="";#X=null;#J=null;#Y=new Set;#Z=new Set;inflightMainResourceRequests=new Map;#ee=te;#te=null;#ne=e.Settings.Settings.instance().moduleSetting("request-blocking-enabled");#re=e.Settings.Settings.instance().createSetting("network-blocked-patterns",[]);#se=[];#ie=new r.MapUtilities.Multimap;#oe;#ae;constructor(){super();const e=()=>{this.updateBlockedPatterns(),this.dispatchEventToListeners("BlockedPatternsChanged")};this.#ne.addChangeListener(e),this.#re.addChangeListener(e),this.updateBlockedPatterns(),W.instance().observeModels(Z,this)}static instance(e={forceNew:null}){const{forceNew:t}=e;return de&&!t||(de=new ce),de}static dispose(){de=null}static patchUserAgentWithChromeVersion(e){const t=o.Runtime.getChromeVersion();if(t.length>0){const n=t.split(".",1)[0]+".0.100.0";return r.StringUtilities.sprintf(e,t,n)}return e}static patchUserAgentMetadataWithChromeVersion(e){if(!e.brands)return;const t=o.Runtime.getChromeVersion();if(0===t.length)return;const n=t.split(".",1)[0];for(const t of e.brands)t.version.includes("%s")&&(t.version=r.StringUtilities.sprintf(t.version,n));e.fullVersion&&e.fullVersion.includes("%s")&&(e.fullVersion=r.StringUtilities.sprintf(e.fullVersion,t))}modelAdded(e){const t=e.target().networkAgent(),n=e.target().fetchAgent();this.#oe&&t.invoke_setExtraHTTPHeaders({headers:this.#oe}),this.currentUserAgent()&&t.invoke_setUserAgentOverride({userAgent:this.currentUserAgent(),userAgentMetadata:this.#X||void 0}),this.#se.length&&t.invoke_setBlockedURLs({urls:this.#se}),this.isIntercepting()&&n.invoke_enable({patterns:this.#ie.valuesArray()}),null===this.#J?t.invoke_clearAcceptedEncodingsOverride():t.invoke_setAcceptedEncodings({encodings:this.#J}),this.#Y.add(t),this.#Z.add(n),this.isThrottling()&&this.updateNetworkConditions(t)}modelRemoved(e){for(const t of this.inflightMainResourceRequests){Z.forRequest(t[1])===e&&this.inflightMainResourceRequests.delete(t[0])}this.#Y.delete(e.target().networkAgent()),this.#Z.delete(e.target().fetchAgent())}isThrottling(){return this.#ee.download>=0||this.#ee.upload>=0||this.#ee.latency>0}isOffline(){return!this.#ee.download&&!this.#ee.upload}setNetworkConditions(e){this.#ee=e;for(const e of this.#Y)this.updateNetworkConditions(e);this.dispatchEventToListeners("ConditionsChanged")}networkConditions(){return this.#ee}updateNetworkConditions(e){const t=this.#ee;this.isThrottling()?e.invoke_emulateNetworkConditions({offline:this.isOffline(),latency:t.latency,downloadThroughput:t.download<0?0:t.download,uploadThroughput:t.upload<0?0:t.upload,packetLoss:(t.packetLoss??0)<0?0:t.packetLoss,packetQueueLength:t.packetQueueLength,packetReordering:t.packetReordering,connectionType:Z.connectionType(t)}):e.invoke_emulateNetworkConditions({offline:!1,latency:0,downloadThroughput:0,uploadThroughput:0})}setExtraHTTPHeaders(e){this.#oe=e;for(const e of this.#Y)e.invoke_setExtraHTTPHeaders({headers:this.#oe})}currentUserAgent(){return this.#ae?this.#ae:this.#$}updateUserAgentOverride(){const e=this.currentUserAgent();for(const t of this.#Y)t.invoke_setUserAgentOverride({userAgent:e,userAgentMetadata:this.#X||void 0})}setUserAgentOverride(e,t){const n=this.#$!==e;this.#$=e,this.#ae?this.#X=null:(this.#X=t,this.updateUserAgentOverride()),n&&this.dispatchEventToListeners("UserAgentChanged")}userAgentOverride(){return this.#$}setCustomUserAgentOverride(e,t=null){this.#ae=e,this.#X=t,this.updateUserAgentOverride()}setCustomAcceptedEncodingsOverride(e){this.#J=e,this.updateAcceptedEncodingsOverride(),this.dispatchEventToListeners("AcceptedEncodingsChanged")}clearCustomAcceptedEncodingsOverride(){this.#J=null,this.updateAcceptedEncodingsOverride(),this.dispatchEventToListeners("AcceptedEncodingsChanged")}isAcceptedEncodingOverrideSet(){return null!==this.#J}updateAcceptedEncodingsOverride(){const e=this.#J;for(const t of this.#Y)null===e?t.invoke_clearAcceptedEncodingsOverride():t.invoke_setAcceptedEncodings({encodings:e})}blockedPatterns(){return this.#re.get().slice()}blockingEnabled(){return this.#ne.get()}isBlocking(){return Boolean(this.#se.length)}setBlockedPatterns(e){this.#re.set(e)}setBlockingEnabled(e){this.#ne.get()!==e&&this.#ne.set(e)}updateBlockedPatterns(){const e=[];if(this.#ne.get())for(const t of this.#re.get())t.enabled&&e.push(t.url);if(e.length||this.#se.length){this.#se=e;for(const e of this.#Y)e.invoke_setBlockedURLs({urls:this.#se})}}isIntercepting(){return Boolean(this.#ie.size)}setInterceptionHandlerForPatterns(e,t){this.#ie.deleteAll(t);for(const n of e)this.#ie.set(t,n);return this.updateInterceptionPatternsOnNextTick()}updateInterceptionPatternsOnNextTick(){return this.#te||(this.#te=Promise.resolve().then(this.updateInterceptionPatterns.bind(this))),this.#te}async updateInterceptionPatterns(){e.Settings.Settings.instance().moduleSetting("cache-disabled").get()||e.Settings.Settings.instance().moduleSetting("cache-disabled").set(!0),this.#te=null;const t=[];for(const e of this.#Z)t.push(e.invoke_enable({patterns:this.#ie.valuesArray()}));this.dispatchEventToListeners("InterceptorsChanged"),await Promise.all(t)}async requestIntercepted(e){for(const t of this.#ie.keysArray())if(await t(e),e.hasResponded()&&e.networkRequest)return void this.dispatchEventToListeners("RequestIntercepted",e.networkRequest.requestId());e.hasResponded()||e.continueRequestWithoutChange()}clearBrowserCache(){for(const e of this.#Y)e.invoke_clearBrowserCache()}clearBrowserCookies(){for(const e of this.#Y)e.invoke_clearBrowserCookies()}async getCertificate(e){const t=W.instance().primaryPageTarget();if(!t)return[];const n=await t.networkAgent().invoke_getCertificate({origin:e});return n?n.tableNames:[]}async loadResource(t){const n={},r=this.currentUserAgent();r&&(n["User-Agent"]=r),e.Settings.Settings.instance().moduleSetting("cache-disabled").get()&&(n["Cache-Control"]="no-cache");const s=e.Settings.Settings.instance().moduleSetting("network.enable-remote-file-loading").get();return await new Promise((e=>a.ResourceLoader.load(t,n,((t,n,r,s)=>{e({success:t,content:r,errorDescription:s})}),s)))}}class he{#q;#le;request;resourceType;responseStatusCode;responseHeaders;requestId;networkRequest;constructor(e,t,n,r,s,i,o){this.#q=e,this.#le=!1,this.request=t,this.resourceType=n,this.responseStatusCode=i,this.responseHeaders=o,this.requestId=r,this.networkRequest=s}hasResponded(){return this.#le}static mergeSetCookieHeaders(e,t){const n=e=>{const t=new Map;for(const n of e){const e=n.value.match(/^([a-zA-Z0-9!#$%&'*+.^_`|~-]+=)(.*)$/);e?t.has(e[1])?t.get(e[1])?.push(n.value):t.set(e[1],[n.value]):t.has(n.value)?t.get(n.value)?.push(n.value):t.set(n.value,[n.value])}return t},r=n(e),s=n(t),i=[];for(const[e,t]of r)if(s.has(e))for(const t of s.get(e)||[])i.push({name:"set-cookie",value:t});else for(const e of t)i.push({name:"set-cookie",value:e});for(const[e,t]of s)if(!r.has(e))for(const e of t)i.push({name:"set-cookie",value:e});return i}async continueRequestWithContent(t,n,r,s){this.#le=!0;const i=n?await t.text():await e.Base64.encode(t).catch((e=>(console.error(e),""))),o=s?200:this.responseStatusCode||200;if(this.networkRequest){const e=this.networkRequest?.originalResponseHeaders.filter((e=>"set-cookie"===e.name))||[],t=r.filter((e=>"set-cookie"===e.name));this.networkRequest.setCookieHeaders=he.mergeSetCookieHeaders(e,t),this.networkRequest.hasOverriddenContent=s}this.#q.invoke_fulfillRequest({requestId:this.requestId,responseCode:o,body:i,responseHeaders:r}),ce.instance().dispatchEventToListeners("RequestFulfilled",this.request.url)}continueRequestWithoutChange(){console.assert(!this.#le),this.#le=!0,this.#q.invoke_continueRequest({requestId:this.requestId})}continueRequestWithError(e){console.assert(!this.#le),this.#le=!0,this.#q.invoke_failRequest({requestId:this.requestId,errorReason:e})}async responseBody(){const e=await this.#q.invoke_getResponseBody({requestId:this.requestId}),n=e.getError();if(n)return{error:n};const{mimeType:r,charset:s}=this.getMimeTypeAndCharset();return new t.ContentData.ContentData(e.body,e.base64Encoded,r??"application/octet-stream",s??void 0)}isRedirect(){return void 0!==this.responseStatusCode&&this.responseStatusCode>=300&&this.responseStatusCode<400}getMimeTypeAndCharset(){for(const e of this.responseHeaders??[])if("content-type"===e.name.toLowerCase())return r.MimeType.parseContentType(e.value);return{mimeType:this.networkRequest?.mimeType??null,charset:this.networkRequest?.charset()??null}}}class ue{#de;#ce;#he;#ue;#ge;#pe;#me;constructor(){this.#de=[],this.#ce=[],this.#ue=[],this.#he=[],this.#ge=!1,this.#pe=null,this.#me=null}addRequest(e){this.#de.push(e),this.sync(this.#de.length-1)}addRequestExtraInfo(e){this.#ce.push(e),this.sync(this.#ce.length-1)}addResponseExtraInfo(e){this.#he.push(e),this.sync(this.#he.length-1)}setEarlyHintsHeaders(e){this.#ue=e,this.updateFinalRequest()}setWebBundleInfo(e){this.#pe=e,this.updateFinalRequest()}setWebBundleInnerRequestInfo(e){this.#me=e,this.updateFinalRequest()}finished(){this.#ge=!0,this.updateFinalRequest()}isFinished(){return this.#ge}sync(e){const t=this.#de[e];if(!t)return;const n=this.#ce[e];n&&(t.addExtraRequestInfo(n),this.#ce[e]=null);const r=this.#he[e];r&&(t.addExtraResponseInfo(r),this.#he[e]=null)}finalRequest(){return this.#ge&&this.#de[this.#de.length-1]||null}updateFinalRequest(){if(!this.#ge)return;const e=this.finalRequest();e?.setWebBundleInfo(this.#pe),e?.setWebBundleInnerRequestInfo(this.#me),e?.setEarlyHintsHeaders(this.#ue)}}h.register(Z,{capabilities:16,autostart:!0});var ge=Object.freeze({__proto__:null,ConditionsSerializer:class{stringify(e){const t=e;return JSON.stringify({...t,title:"function"==typeof t.title?t.title():t.title})}parse(e){const t=JSON.parse(e);return{...t,title:t.i18nTitleKey?X(t.i18nTitleKey):t.title}}},get Events(){return ee},Fast4GConditions:ie,FetchDispatcher:ae,InterceptedRequest:he,MultitargetNetworkManager:ce,NetworkDispatcher:le,NetworkManager:Z,NoThrottlingConditions:te,OfflineConditions:ne,Slow3GConditions:re,Slow4GConditions:se,networkConditionsEqual:function(e,t){const n=e.i18nTitleKey||("function"==typeof e.title?e.title():e.title),r=t.i18nTitleKey||("function"==typeof t.title?t.title():t.title);return t.download===e.download&&t.upload===e.upload&&t.latency===e.latency&&e.packetLoss===t.packetLoss&&e.packetQueueLength===t.packetQueueLength&&e.packetReordering===t.packetReordering&&r===n}});class pe{#fe;#be;#ye=new Map;#ve;#Ie;constructor(e){this.#fe=e.fontFamily,this.#be=e.fontVariationAxes||[],this.#ve=e.src,this.#Ie=e.fontDisplay;for(const e of this.#be)this.#ye.set(e.tag,e)}getFontFamily(){return this.#fe}getSrc(){return this.#ve}getFontDisplay(){return this.#Ie}getVariationAxisByTag(e){return this.#ye.get(e)}}var me=Object.freeze({__proto__:null,CSSFontFace:pe});class fe{text;node;name;fallback;matching;computedTextCallback;constructor(e,t,n,r,s,i){this.text=e,this.node=t,this.name=n,this.fallback=r,this.matching=s,this.computedTextCallback=i}computedText(){return this.computedTextCallback(this,this.matching)}}class be extends(kt(fe)){#we;constructor(e){super(),this.#we=e}matches(e,t){const n=e.getChild("Callee"),r=e.getChild("ArgList");if("CallExpression"!==e.name||!n||"var"!==t.ast.text(n)||!r)return null;const[s,i,...o]=Pt.children(r);if("("!==s?.name||"VariableName"!==i?.name)return null;if(o.length<=1&&")"!==o[0]?.name)return null;let a=[];if(o.length>1){if(","!==o.shift()?.name)return null;if(")"!==o.pop()?.name)return null;if(a=o,0===a.length)return null;if(a.some((e=>","===e.name)))return null}const l=t.ast.text(i);return l.startsWith("--")?new fe(t.ast.text(e),e,l,a,t,this.#we):null}}class ye extends fe{matchedStyles;style;constructor(e,t,n,r,s,i,o){super(e,t,n,r,s,(()=>this.resolveVariable()?.value??this.fallbackValue())),this.matchedStyles=i,this.style=o}resolveVariable(){return this.matchedStyles.computeCSSVariable(this.style,this.name)}fallbackValue(){return 0===this.fallback.length||this.matching.hasUnresolvedVarsRange(this.fallback[0],this.fallback[this.fallback.length-1])?null:this.matching.getComputedTextRange(this.fallback[0],this.fallback[this.fallback.length-1])}}class ve extends(kt(ye)){matchedStyles;style;constructor(e,t){super(),this.matchedStyles=e,this.style=t}matches(e,t){const n=new be((()=>null)).matches(e,t);return n?new ye(n.text,n.node,n.name,n.fallback,n.matching,this.matchedStyles,this.style):null}}class Ie{text;node;constructor(e,t){this.text=e,this.node=t}}class we extends(kt(Ie)){accepts(){return!0}matches(e,t){return"BinaryExpression"===e.name?new Ie(t.ast.text(e),e):null}}class Se{text;node;computedText;constructor(e,t){this.text=e,this.node=t,"Comment"===t.name&&(this.computedText=()=>"")}render(){const e=document.createElement("span");return e.appendChild(document.createTextNode(this.text)),[e]}}class ke extends(kt(Se)){accepts(){return!0}matches(e,t){if(!e.firstChild||"NumberLiteral"===e.name){const n=t.ast.text(e);if(n.length)return new Se(n,e)}return null}}class Ce{text;node;constructor(e,t){this.text=e,this.node=t}computedText(){return this.text}}class xe extends(kt(Ce)){accepts(e){return S().isAngleAwareProperty(e)}matches(e,t){if("NumberLiteral"!==e.name)return null;const n=e.getChild("Unit");return n&&["deg","grad","rad","turn"].includes(t.ast.text(n))?new Ce(t.ast.text(e),e):null}}function Re(e,t){if("NumberLiteral"!==e.type.name)return null;const n=t.text(e);return Number(n.substring(0,n.length-t.text(e.getChild("Unit")).length))}class Te{text;node;space;color1;color2;constructor(e,t,n,r,s){this.text=e,this.node=t,this.space=n,this.color1=r,this.color2=s}}class Me extends(kt(Te)){accepts(e){return S().isColorAwareProperty(e)}matches(e,t){if("CallExpression"!==e.name||"color-mix"!==t.ast.text(e.getChild("Callee")))return null;const n=Lt("--property",t.getComputedText(e));if(!n)return null;const r=Pt.declValue(n.tree);if(!r)return null;const s=Pt.callArgs(r);if(3!==s.length)return null;const[i,o,a]=s;if(i.length<2||"in"!==n.text(Pt.stripComments(i).next().value)||o.length<1||a.length<1)return null;const l=o.filter((e=>"NumberLiteral"===e.type.name&&"%"===n.text(e.getChild("Unit")))),d=a.filter((e=>"NumberLiteral"===e.type.name&&"%"===n.text(e.getChild("Unit"))));if(l.length>1||d.length>1)return null;if(l[0]&&d[0]&&0===(Re(l[0],n)??0)&&0===(Re(d[0],n)??0))return null;const c=Pt.callArgs(e);return 3!==c.length?null:new Te(t.ast.text(e),e,c[0],c[1],c[2])}}class Pe{url;text;node;constructor(e,t,n){this.url=e,this.text=t,this.node=n}}class Ee extends(kt(Pe)){matches(e,t){if("CallLiteral"!==e.name)return null;const n=e.getChild("CallTag");if(!n||"url"!==t.ast.text(n))return null;const[,r,s,i]=Pt.siblings(n);if("("!==t.ast.text(r)||"ParenthesizedContent"!==s.name&&"StringLiteral"!==s.name||")"!==t.ast.text(i))return null;const o=t.ast.text(s),a="StringLiteral"===s.name?o.substr(1,o.length-2):o.trim();return new Pe(a,t.ast.text(e),e)}}class Le{text;node;constructor(e,t){this.text=e,this.node=t}}class Ae extends(kt(Le)){matches(e,t){const n=t.ast.text(e);return"CallExpression"===e.name&&"linear-gradient"===t.ast.text(e.getChild("Callee"))?new Le(n,e):null}accepts(e){return["background","background-image","-webkit-mask-image"].includes(e)}}class Oe{text;node;currentColorCallback;computedText;constructor(e,t,n){this.text=e,this.node=t,this.currentColorCallback=n,this.computedText=n}}class De extends(kt(Oe)){currentColorCallback;constructor(e){super(),this.currentColorCallback=e}accepts(e){return S().isColorAwareProperty(e)}matches(t,n){const r=n.ast.text(t);if("ColorLiteral"===t.name)return new Oe(r,t);if("ValueName"===t.name){if(e.Color.Nicknames.has(r))return new Oe(r,t);if("currentcolor"===r.toLowerCase()&&this.currentColorCallback){const e=this.currentColorCallback;return new Oe(r,t,(()=>e()??r))}}if("CallExpression"===t.name){const e=t.getChild("Callee");if(e&&n.ast.text(e).match(/^(rgba?|hsla?|hwba?|lab|lch|oklab|oklch|color)$/))return new Oe(r,t)}return null}}class Ne{text;node;light;dark;style;constructor(e,t,n,r,s){this.text=e,this.node=t,this.light=n,this.dark=r,this.style=s}}class Fe extends(kt(Ne)){style;constructor(e){super(),this.style=e}accepts(e){return S().isColorAwareProperty(e)}matches(e,t){if("CallExpression"!==e.name||"light-dark"!==t.ast.text(e.getChild("Callee")))return null;const n=Pt.callArgs(e);return 2!==n.length||0===n[0].length||0===n[1].length?null:new Ne(t.ast.text(e),e,n[0],n[1],this.style)}}class Be{text;node;auto;base;constructor(e,t,n,r){this.text=e,this.node=t,this.auto=n,this.base=r}}class _e extends(kt(Be)){matches(e,t){if("CallExpression"!==e.name||"-internal-auto-base"!==t.ast.text(e.getChild("Callee")))return null;const n=Pt.callArgs(e);return 2!==n.length||0===n[0].length||0===n[1].length?null:new Be(t.ast.text(e),e,n[0],n[1])}}class He{text;node;propertyName;constructor(e,t,n){this.text=e,this.node=t,this.propertyName=n}}class Ue extends(kt(He)){static isLinkableNameProperty(e){return["animation","animation-name","font-palette","position-try-fallbacks","position-try"].includes(e)}static identifierAnimationLonghandMap=new Map(Object.entries({normal:"direction",alternate:"direction",reverse:"direction","alternate-reverse":"direction",none:"fill-mode",forwards:"fill-mode",backwards:"fill-mode",both:"fill-mode",running:"play-state",paused:"play-state",infinite:"iteration-count",linear:"easing-function",ease:"easing-function","ease-in":"easing-function","ease-out":"easing-function","ease-in-out":"easing-function",steps:"easing-function","step-start":"easing-function","step-end":"easing-function"}));matchAnimationNameInShorthand(e,t){const n=t.ast.text(e);if(!Ue.identifierAnimationLonghandMap.has(n))return new He(n,e,"animation");const r=Pt.split(Pt.siblings(Pt.declValue(t.ast.tree))).find((t=>t[0].from<=e.from&&t[t.length-1].to>=e.to));if(!r)return null;const s=Lt("--p",t.getComputedTextRange(r[0],e));if(!s)return null;const i=Ue.identifierAnimationLonghandMap.get(n);for(let t=Pt.declValue(s.tree);t?.nextSibling;t=t.nextSibling)if("ValueName"===t.name){const r=Ue.identifierAnimationLonghandMap.get(s.text(t));if(r&&r===i)return new He(n,e,"animation")}return null}accepts(e){return Ue.isLinkableNameProperty(e)}matches(e,t){const{propertyName:n}=t.ast,r=t.ast.text(e),s=e.parent;if(!s)return null;const i="Declaration"===s.name,o="ArgList"===s.name&&"Callee"===s.prevSibling?.name&&"var"===t.ast.text(s.prevSibling),a=i||o,l="position-try"===n||"position-try-fallbacks"===n;return!n||"ValueName"!==e.name&&"VariableName"!==e.name||!a||"ValueName"===e.name&&l?null:"animation"===n?this.matchAnimationNameInShorthand(e,t):new He(r,e,n)}}class qe{text;node;constructor(e,t){this.text=e,this.node=t}}class ze extends(kt(qe)){accepts(e){return S().isBezierAwareProperty(e)}matches(e,t){const n=t.ast.text(e),r="ValueName"===e.name&&b.has(n),s="CallExpression"===e.name&&["cubic-bezier","linear"].includes(t.ast.text(e.getChild("Callee")));return r||s?new qe(n,e):null}}class je{text;node;constructor(e,t){this.text=e,this.node=t}}class Ve extends(kt(je)){matches(e,t){return"StringLiteral"===e.name?new je(t.ast.text(e),e):null}}class We{text;node;shadowType;constructor(e,t,n){this.text=e,this.node=t,this.shadowType=n}}class Ge extends(kt(We)){accepts(e){return S().isShadowProperty(e)}matches(e,t){if("Declaration"!==e.name)return null;const n=Pt.siblings(Pt.declValue(e));if(0===n.length)return null;const r=t.ast.textRange(n[0],n[n.length-1]);return new We(r,e,"text-shadow"===t.ast.propertyName?"textShadow":"boxShadow")}}class Ke{text;node;constructor(e,t){this.text=e,this.node=t}}class Qe extends(kt(Ke)){accepts(e){return S().isFontAwareProperty(e)}matches(e,t){if("Declaration"!==e.name)return null;const n=Pt.siblings(Pt.declValue(e));if(0===n.length)return null;const r="font-family"===t.ast.propertyName?["ValueName","StringLiteral","Comment",","]:["Comment","ValueName","NumberLiteral"];if(n.some((e=>!r.includes(e.name))))return null;const s=t.ast.textRange(n[0],n[n.length-1]);return new Ke(s,e)}}class $e{text;node;unit;constructor(e,t,n){this.text=e,this.node=t,this.unit=n}}class Xe extends(kt($e)){static LENGTH_UNITS=new Set(["em","ex","ch","cap","ic","lh","rem","rex","rch","rlh","ric","rcap","pt","pc","in","cm","mm","Q","vw","vh","vi","vb","vmin","vmax","dvw","dvh","dvi","dvb","dvmin","dvmax","svw","svh","svi","svb","svmin","svmax","lvw","lvh","lvi","lvb","lvmin","lvmax","cqw","cqh","cqi","cqb","cqmin","cqmax","cqem","cqlh","cqex","cqch"]);matches(e,t){if("NumberLiteral"!==e.name)return null;const n=t.ast.text(e.getChild("Unit"));if(!Xe.LENGTH_UNITS.has(n))return null;const r=t.ast.text(e);return new $e(r,e,n)}}class Je{text;node;func;args;constructor(e,t,n,r){this.text=e,this.node=t,this.func=n,this.args=r}}class Ye extends(kt(Je)){matches(e,t){if("CallExpression"!==e.name)return null;const n=t.ast.text(e.getChild("Callee"));if(!["min","max","clamp","calc"].includes(n))return null;const r=Pt.callArgs(e);if(r.some((e=>0===e.length||t.hasUnresolvedVarsRange(e[0],e[e.length-1]))))return null;const s=t.ast.text(e);return new Je(s,e,n,r)}}class Ze{text;node;isFlex;constructor(e,t,n){this.text=e,this.node=t,this.isFlex=n}}class et extends(kt(Ze)){static FLEX=["flex","inline-flex","block flex","inline flex"];static GRID=["grid","inline-grid","block grid","inline grid"];accepts(e){return"display"===e}matches(e,t){if("Declaration"!==e.name)return null;const n=Pt.siblings(Pt.declValue(e));if(n.length<1)return null;const r=n.filter((e=>"Important"!==e.name)).map((e=>t.getComputedText(e).trim())).filter((e=>e)),s=r.join(" ");return et.FLEX.includes(s)?new Ze(t.ast.text(e),e,!0):et.GRID.includes(s)?new Ze(t.ast.text(e),e,!1):null}}class tt{text;node;lines;constructor(e,t,n){this.text=e,this.node=t,this.lines=n}}class nt extends(kt(tt)){accepts(e){return S().isGridAreaDefiningProperty(e)}matches(e,t){if("Declaration"!==e.name||t.hasUnresolvedVars(e))return null;const n=[];let r=[],s=!1,i=!1;const o=Pt.siblings(Pt.declValue(e));!function e(o,a=!1){for(const l of o)if(t.getMatch(l)instanceof fe){const o=Lt("--property",t.getComputedText(l));if(!o)continue;const a=Pt.siblings(Pt.declValue(o.tree));if(0===a.length)continue;"StringLiteral"===a[0].name&&!s||"LineNames"===a[0].name&&!i?(n.push(r),r=[l]):r.push(l),e(a,!0)}else"BinaryExpression"===l.name?e(Pt.siblings(l.firstChild)):"StringLiteral"===l.name?(a||(s?r.push(l):(n.push(r),r=[l])),i=!0,s=!1):"LineNames"===l.name?(a||(i?r.push(l):(n.push(r),r=[l])),s=!i,i=!i):a||r.push(l)}(o),n.push(r);const a=t.ast.textRange(o[0],o[o.length-1]);return new tt(a,e,n.filter((e=>e.length>0)))}}class rt{text;node;functionName;constructor(e,t,n){this.text=e,this.node=t,this.functionName=n}}class st extends(kt(rt)){anchorFunction(e,t){if("CallExpression"!==e.name)return null;const n=t.ast.text(e.getChild("Callee"));return"anchor"===n||"anchor-size"===n?n:null}matches(e,t){if("VariableName"===e.name){let n=e.parent;return n&&"ArgList"===n.name?(n=n.parent,n&&this.anchorFunction(n,t)?new rt(t.ast.text(e),e,null):null):null}const n=this.anchorFunction(e,t);if(!n)return null;const r=Pt.children(e.getChild("ArgList"));return"anchor"===n&&r.length<=2||r.find((e=>"VariableName"===e.name))?null:new rt(t.ast.text(e),e,n)}}class it{text;matching;node;constructor(e,t,n){this.text=e,this.matching=t,this.node=n}}class ot extends(kt(it)){accepts(e){return"position-anchor"===e}matches(e,t){if("VariableName"!==e.name)return null;const n=t.ast.text(e);return new it(n,t,e)}}class at{text;node;property;matchedStyles;constructor(e,t,n,r){this.text=e,this.node=t,this.property=n,this.matchedStyles=r}resolveProperty(){return this.matchedStyles.resolveGlobalKeyword(this.property,this.text)}computedText(){return this.resolveProperty()?.value??null}}class lt extends(kt(at)){property;matchedStyles;constructor(e,t){super(),this.property=e,this.matchedStyles=t}matches(e,t){const n=e.parent;if("ValueName"!==e.name||"Declaration"!==n?.name)return null;if(Array.from(Pt.stripComments(Pt.siblings(Pt.declValue(n)))).some((t=>!Pt.equals(t,e))))return null;const r=t.ast.text(e);return f.isCSSWideKeyword(r)?new at(r,e,this.property,this.matchedStyles):null}}class dt{text;node;preamble;fallbacks;constructor(e,t,n,r){this.text=e,this.node=t,this.preamble=n,this.fallbacks=r}}class ct extends(kt(dt)){accepts(e){return"position-try"===e||"position-try-fallbacks"===e}matches(e,t){if("Declaration"!==e.name)return null;let n=[];const r=Pt.siblings(Pt.declValue(e)),s=Pt.split(r);if("position-try"===t.ast.propertyName)for(const[e,r]of s[0].entries()){const i=t.getComputedText(r);if(f.isCSSWideKeyword(i))return null;if(f.isPositionTryOrderKeyword(i)){n=s[0].splice(0,e+1);break}}const i=t.ast.textRange(r[0],r[r.length-1]);return new dt(i,e,n,s)}}var ht=Object.freeze({__proto__:null,AnchorFunctionMatch:rt,AnchorFunctionMatcher:st,AngleMatch:Ce,AngleMatcher:xe,AutoBaseMatch:Be,AutoBaseMatcher:_e,BaseVariableMatch:fe,BaseVariableMatcher:be,BezierMatch:qe,BezierMatcher:ze,BinOpMatch:Ie,BinOpMatcher:we,CSSWideKeywordMatch:at,CSSWideKeywordMatcher:lt,ColorMatch:Oe,ColorMatcher:De,ColorMixMatch:Te,ColorMixMatcher:Me,FlexGridMatch:Ze,FlexGridMatcher:et,FontMatch:Ke,FontMatcher:Qe,GridTemplateMatch:tt,GridTemplateMatcher:nt,LengthMatch:$e,LengthMatcher:Xe,LightDarkColorMatch:Ne,LightDarkColorMatcher:Fe,LinearGradientMatch:Le,LinearGradientMatcher:Ae,LinkableNameMatch:He,LinkableNameMatcher:Ue,MathFunctionMatch:Je,MathFunctionMatcher:Ye,PositionAnchorMatch:it,PositionAnchorMatcher:ot,PositionTryMatch:dt,PositionTryMatcher:ct,ShadowMatch:We,ShadowMatcher:Ge,StringMatch:je,StringMatcher:Ve,TextMatch:Se,TextMatcher:ke,URLMatch:Pe,URLMatcher:Ee,VariableMatch:ye,VariableMatcher:ve});const ut=new Set(["inherit","initial","unset"]),gt=/[\x20-\x7E]{4}/,pt=new RegExp(`(?:'(${gt.source})')|(?:"(${gt.source})")\\s+(${/[+-]?(?:\d*\.)?\d+(?:[eE]\d+)?/.source})`);const mt=/^"(.+)"|'(.+)'$/;function ft(e){return e.split(",").map((e=>e.trim()))}function bt(e){return e.replaceAll(/(\/\*(?:.|\s)*?\*\/)/g,"")}const yt=d.css.cssLanguage.parser;function vt(e,t){return It(e,e,t)}function It(e,t,n){return n.substring(e.from,t.to)}class wt{propertyValue;rule;tree;trailingNodes;propertyName;constructor(e,t,n,r,s=[]){this.propertyName=r,this.propertyValue=e,this.rule=t,this.tree=n,this.trailingNodes=s}text(e){return null===e?"":vt(e??this.tree,this.rule)}textRange(e,t){return It(e,t,this.rule)}subtree(e){return new wt(this.propertyValue,this.rule,e)}}class St{ast;constructor(e){this.ast=e}static walkExcludingSuccessors(e,...t){const n=new this(e,...t);return"Declaration"===e.tree.name?n.iterateDeclaration(e.tree):n.iterateExcludingSuccessors(e.tree),n}static walk(e,...t){const n=new this(e,...t);return"Declaration"===e.tree.name?n.iterateDeclaration(e.tree):n.iterate(e.tree),n}iterateDeclaration(e){if("Declaration"===e.name){if(this.enter(e))for(const t of Pt.siblings(Pt.declValue(e)))t.cursor().iterate(this.enter.bind(this),this.leave.bind(this));this.leave(e)}}iterate(e){for(const t of Pt.siblings(e))t.cursor().iterate(this.enter.bind(this),this.leave.bind(this))}iterateExcludingSuccessors(e){e.cursor().iterate(this.enter.bind(this),this.leave.bind(this))}enter(e){return!0}leave(e){}}function kt(e){return class{matchType=e;accepts(e){return!0}matches(e,t){return null}}}class Ct extends St{#Se=[];#ke=new Map;computedText;#Ce(e){return`${e.from}:${e.to}`}constructor(e,t){super(e),this.computedText=new Rt(e.rule.substring(e.tree.from)),this.#Se.push(...t.filter((t=>!e.propertyName||t.accepts(e.propertyName)))),this.#Se.push(new ke)}leave({node:e}){for(const t of this.#Se){const n=t.matches(e,this);if(n){this.computedText.push(n,e.from-this.ast.tree.from),this.#ke.set(this.#Ce(e),n);break}}}matchText(e){const t=this.#Se.splice(0);this.#Se.push(new ke),this.iterateExcludingSuccessors(e),this.#Se.push(...t)}hasMatches(...e){return Boolean(this.#ke.values().find((t=>e.some((e=>t instanceof e)))))}getMatch(e){return this.#ke.get(this.#Ce(e))}hasUnresolvedVars(e){return this.hasUnresolvedVarsRange(e,e)}hasUnresolvedVarsRange(e,t){return this.computedText.hasUnresolvedVars(e.from-this.ast.tree.from,t.to-this.ast.tree.from)}getComputedText(e,t){return this.getComputedTextRange(e,e,t)}getComputedPropertyValueText(){const[e,t]=Pt.range(Pt.siblings(Pt.declValue(this.ast.tree)));return this.getComputedTextRange(e??this.ast.tree,t??this.ast.tree)}getComputedTextRange(e,t,n){return this.computedText.get(e.from-this.ast.tree.from,t.to-this.ast.tree.from,n)}}class xt{match;offset;#xe=null;constructor(e,t){this.match=e,this.offset=t}get end(){return this.offset+this.length}get length(){return this.match.text.length}get computedText(){return null===this.#xe&&(this.#xe=this.match.computedText()),this.#xe}}class Rt{#Re=[];text;#Te=!0;constructor(e){this.text=e}clear(){this.#Re.splice(0)}get chunkCount(){return this.#Re.length}#Me(){this.#Te||(this.#Re.sort(((e,t)=>e.offsett.end?-1:e.end=this.text.length)return;const n=new xt(e,t);n.end>this.text.length||(this.#Te=!1,this.#Re.push(n))}*#Pe(e,t){this.#Me();let n=this.#Re.findIndex((t=>t.offset>=e));for(;n>=0&&ne&&et)n++;else for(yield this.#Re[n],e=this.#Re[n].end;e=n.end&&(yield n),e=n.end}if(e{if("string"==typeof e)return e;const t=n?.get(e.match);return t?s(t):e.computedText??e.match.text};for(const n of this.#Ee(e,t)){const e=s(n);0!==e.length&&(r.length>0&&Tt(r[r.length-1],e)&&r.push(" "),r.push(e))}return r.join("")}}function Tt(e,t){const n=Array.isArray(e)?e.findLast((e=>e.textContent))?.textContent:e,r=Array.isArray(t)?t.find((e=>e.textContent))?.textContent:t,s=n?n[n.length-1]:"",i=r?r[0]:"";return!(/\s/.test(s)||/\s/.test(i)||["","(","{","}",";","["].includes(s)||["","(",")",",",":","*","{",";","]"].includes(i))}const Mt=Map;var Pt;function Et(e){return yt.parse(e).topNode.getChild("RuleSet")?.getChild("Block")?.getChild("Declaration")??null}function Lt(e,t){const n=At(e);if(!n)return null;const r=`*{${n}: ${t};}`,s=Et(r);if(!s||s.type.isError)return null;const i=Pt.children(s);if(i.length<2)return null;const[o,a,l]=i;if(!o||o.type.isError||!a||a.type.isError||l?.type.isError)return null;const d=Pt.siblings(s).slice(1),[c,h]=d.splice(d.length-2,2);if(";"!==c?.name&&"}"!==h?.name)return null;const u=new wt(t,r,s,n,d);return u.text(o)!==n||":"!==a.name?null:u}function At(e){const t=`*{${e}: inherit;}`,n=Et(t);if(!n||n.type.isError)return null;const r=n.getChild("PropertyName")??n.getChild("VariableName");return r?vt(r,t):null}function Ot(e,t,n){const r=Lt(e,t),s=r&&Ct.walk(r,n);return r?.trailingNodes.forEach((e=>s?.matchText(e))),s}!function(e){function t(e){const t=[];for(;e;)t.push(e),e=e.nextSibling;return t}function n(e){return t(e?.firstChild??null)}function r(e){const t=[];let n=[];for(const r of e)","===r.name?(t.push(n),n=[]):n.push(r);return t.push(n),t}e.siblings=t,e.children=n,e.range=function(e){return[e[0],e[e.length-1]]},e.declValue=function(e){return"Declaration"!==e.name?null:n(e).find((e=>":"===e.name))?.nextSibling??null},e.stripComments=function*(e){for(const t of e)"Comment"!==t.type.name&&(yield t)},e.split=r,e.callArgs=function(e){const t=n(e.getChild("ArgList")),s=t.splice(0,1)[0],i=t.pop();return"("!==s?.name||")"!==i?.name?[]:r(t)},e.equals=function(e,t){return e.name===t.name&&e.from===t.from&&e.to===t.to}}(Pt||(Pt={}));class Dt extends St{#Le=null;#Ae;constructor(e,t){super(e),this.#Ae=t}enter({node:e}){return!this.#Le&&(!this.#Ae(e)||(this.#Le=this.#Le??e,!1))}static find(e,t){return Dt.walk(e,t).#Le}static findAll(e,t){const n=[];return Dt.walk(e,(e=>(t(e)&&n.push(e),!1))),n}}var Nt=Object.freeze({__proto__:null,get ASTUtils(){return Pt},BottomUpTreeMatching:Ct,CSSControlMap:Mt,ComputedText:Rt,SyntaxTree:wt,TreeSearch:Dt,TreeWalker:St,matchDeclaration:Ot,matcherBase:kt,parseFontFamily:function(e){if(ut.has(e.trim()))return[];const t=[];for(const n of ft(bt(e))){const e=n.match(mt);e?t.push(e[1]||e[2]):t.push(n)}return t},parseFontVariationSettings:function(e){if(ut.has(e.trim())||"normal"===e.trim())return[];const t=[];for(const n of ft(bt(e))){const e=n.match(pt);e&&t.push({tag:e[1]||e[2],value:parseFloat(e[3])})}return t},requiresSpace:Tt,splitByComma:ft,stripComments:bt,tokenizeDeclaration:Lt,tokenizePropertyName:At});class Ft extends e.ObjectWrapper.ObjectWrapper{ownerStyle;index;name;value;important;disabled;parsedOk;implicit;text;range;#Oe;#De;#Ne;#Fe;#Be=[];constructor(e,n,r,s,i,o,a,l,d,c,h){if(super(),this.ownerStyle=e,this.index=n,this.name=r,this.value=s,this.important=i,this.disabled=o,this.parsedOk=a,this.implicit=l,this.text=d,this.range=c?t.TextRange.TextRange.fromObject(c):null,this.#Oe=!0,this.#De=null,this.#Ne=null,h&&h.length>0)for(const t of h)this.#Be.push(new Ft(e,++n,t.name,t.value,i,o,a,!0));else{const t=S().getLonghands(r);for(const r of t||[])this.#Be.push(new Ft(e,++n,r,"",i,o,a,!0))}}static parsePayload(e,t,n){return new Ft(e,t,n.name,n.value,n.important||!1,n.disabled||!1,!("parsedOk"in n)||Boolean(n.parsedOk),Boolean(n.implicit),n.text,n.range,n.longhandProperties)}parseExpression(e,t,n){return this.parsedOk?Ot(this.name,e,this.#Se(t,n)):null}parseValue(e,t){return this.parsedOk?Ot(this.name,this.value,this.#Se(e,t)):null}#Se(e,t){const n=e.propertyMatchers(this.ownerStyle,t);return n.push(new lt(this,e)),o.Runtime.experiments.isEnabled("font-editor")&&n.push(new Qe),n}ensureRanges(){if(this.#De&&this.#Ne)return;const e=this.range,n=this.text?new t.Text.Text(this.text):null;if(!e||!n)return;const r=n.value().indexOf(this.name),s=n.value().lastIndexOf(this.value);if(-1===r||-1===s||r>s)return;const i=new t.TextRange.SourceRange(r,this.name.length),o=new t.TextRange.SourceRange(s,this.value.length);function a(e,t,n){return 0===e.startLine&&(e.startColumn+=n,e.endColumn+=n),e.startLine+=t,e.endLine+=t,e}this.#De=a(n.toTextRange(i),e.startLine,e.startColumn),this.#Ne=a(n.toTextRange(o),e.startLine,e.startColumn)}nameRange(){return this.ensureRanges(),this.#De}valueRange(){return this.ensureRanges(),this.#Ne}rebase(e){this.ownerStyle.styleSheetId===e.styleSheetId&&this.range&&(this.range=this.range.rebaseAfterTextEdit(e.oldRange,e.newRange))}setActive(e){this.#Oe=e}get propertyText(){return void 0!==this.text?this.text:""===this.name?"":this.name+": "+this.value+(this.important?" !important":"")+";"}activeInStyle(){return this.#Oe}async setText(n,s,i){if(!this.ownerStyle)throw new Error("No ownerStyle for property");if(!this.ownerStyle.styleSheetId)throw new Error("No owner style id");if(!this.range||!this.ownerStyle.range)throw new Error("Style not editable");if(s&&(a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited),this.ownerStyle.parentRule?.isKeyframeRule()&&a.userMetrics.actionTaken(a.UserMetrics.Action.StylePropertyInsideKeyframeEdited),this.name.startsWith("--")&&a.userMetrics.actionTaken(a.UserMetrics.Action.CustomPropertyEdited)),i&&n===this.propertyText)return this.ownerStyle.cssModel().domModel().markUndoableState(!s),!0;const o=this.range.relativeTo(this.ownerStyle.range.startLine,this.ownerStyle.range.startColumn),l=this.ownerStyle.cssText?this.detectIndentation(this.ownerStyle.cssText):e.Settings.Settings.instance().moduleSetting("text-editor-indent").get(),d=this.ownerStyle.cssText?l.substring(0,this.ownerStyle.range.endColumn):"",c=new t.Text.Text(this.ownerStyle.cssText||"").replaceRange(o,r.StringUtilities.sprintf(";%s;",n)),h=await Ft.formatStyle(c,l,d);return await this.ownerStyle.setText(h,s)}static async formatStyle(e,n,r){const s=n.substring(r.length)+n;n&&(n="\n"+n);let i="",o="",a="",l=!1,d=!1;const c=t.CodeMirrorUtils.createCssTokenizer();return await c("*{"+e+"}",(function(e,t){if(!l){const r=t?.includes("comment")&&function(e){const t=e.indexOf(":");if(-1===t)return!1;const n=e.substring(2,t).trim();return S().isCSSPropertyName(n)}(e),s=t?.includes("def")||t?.includes("string")||t?.includes("meta")||t?.includes("property")||t?.includes("variableName")&&"variableName.function"!==t;return r?i=i.trimEnd()+n+e:s?(l=!0,a=e):(";"!==e||d)&&(i+=e,e.trim()&&!t?.includes("comment")&&(d=";"!==e)),void("{"!==e||t||(d=!1))}if("}"===e||";"===e){const t=a.trim();return i=i.trimEnd()+n+t+(t.endsWith(":")?" ":"")+e,d=!1,l=!1,void(o="")}if(S().isGridAreaDefiningProperty(o)){const t=I.exec(e);t&&0===t.index&&!a.trimEnd().endsWith("]")&&(a=a.trimEnd()+"\n"+s)}o||":"!==e||(o=a);a+=e})),l&&(i+=a),i=i.substring(2,i.length-1).trimEnd(),i+(n?"\n"+r:"")}detectIndentation(e){const n=e.split("\n");return n.length<2?"":t.TextUtils.Utils.lineIndent(n[1])}setValue(e,t,n,r){const s=this.name+": "+e+(this.important?" !important":"")+";";this.setText(s,t,n).then(r)}setLocalValue(e){this.value=e,this.dispatchEventToListeners("localValueUpdated")}async setDisabled(e){if(!this.ownerStyle)return!1;if(e===this.disabled)return!0;if(!this.text)return!0;const t=this.text.trim(),n=e=>e+(e.endsWith(";")?"":";");let r;return r=e?"/* "+n(bt(t))+" */":n(this.text.substring(2,t.length-2).trim()),await this.setText(r,!0,!0)}setDisplayedStringForInvalidProperty(e){this.#Fe=e}getInvalidStringForInvalidProperty(){return this.#Fe}getLonghandProperties(){return this.#Be}}var Bt=Object.freeze({__proto__:null,CSSProperty:Ft});class _t{text="";range;styleSheetId;cssModel;constructor(e){this.cssModel=e}rebase(e){this.styleSheetId===e.styleSheetId&&this.range&&(e.oldRange.equal(this.range)?this.reinitialize(e.payload):this.range=this.range.rebaseAfterTextEdit(e.oldRange,e.newRange))}equal(e){return!!(this.styleSheetId&&this.range&&e.range)&&(this.styleSheetId===e.styleSheetId&&this.range.equal(e.range))}lineNumberInSource(){if(this.range)return this.header()?.lineNumberInSource(this.range.startLine)}columnNumberInSource(){if(this.range)return this.header()?.columnNumberInSource(this.range.startLine,this.range.startColumn)}header(){return this.styleSheetId?this.cssModel.styleSheetHeaderForId(this.styleSheetId):null}rawLocation(){const e=this.header();if(!e||void 0===this.lineNumberInSource())return null;const t=Number(this.lineNumberInSource());return new Ur(e,t,this.columnNumberInSource())}}var Ht=Object.freeze({__proto__:null,CSSQuery:_t});class Ut extends _t{name;physicalAxes;logicalAxes;queriesScrollState;static parseContainerQueriesPayload(e,t){return t.map((t=>new Ut(e,t)))}constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){this.text=e.text,this.range=e.range?t.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId,this.name=e.name,this.physicalAxes=e.physicalAxes,this.logicalAxes=e.logicalAxes,this.queriesScrollState=e.queriesScrollState}active(){return!0}async getContainerForNode(e){const t=await this.cssModel.domModel().getContainerForNode(e,this.name,this.physicalAxes,this.logicalAxes,this.queriesScrollState);if(t)return new qt(t)}}class qt{containerNode;constructor(e){this.containerNode=e}async getContainerSizeDetails(){const e=await this.containerNode.domModel().cssModel().getComputedStyle(this.containerNode.id);if(!e)return;const t=e.get("container-type"),n=e.get("writing-mode");if(!t||!n)return;const r=zt(`${t}`),s=jt(r,n);let i,o;return"Both"!==s&&"Horizontal"!==s||(i=e.get("width")),"Both"!==s&&"Vertical"!==s||(o=e.get("height")),{queryAxis:r,physicalAxis:s,width:i,height:o}}}const zt=e=>{const t=e.split(" ");let n=!1;for(const e of t){if("size"===e)return"size";n=n||"inline-size"===e}return n?"inline-size":""},jt=(e,t)=>{const n=t.startsWith("vertical");switch(e){case"":return"";case"size":return"Both";case"inline-size":return n?"Vertical":"Horizontal";case"block-size":return n?"Horizontal":"Vertical"}};var Vt=Object.freeze({__proto__:null,CSSContainerQuery:Ut,CSSContainerQueryContainer:qt,getPhysicalAxisFromQueryAxis:jt,getQueryAxisFromContainerType:zt});class Wt extends _t{static parseLayerPayload(e,t){return t.map((t=>new Wt(e,t)))}constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){this.text=e.text,this.range=e.range?t.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId}active(){return!0}}var Gt=Object.freeze({__proto__:null,CSSLayer:Wt});class Kt{#_e;#He;constructor(e){this.#_e=e.active,this.#He=[];for(let t=0;tnew $t(e,t)))}constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){if(this.text=e.text,this.source=e.source,this.sourceURL=e.sourceURL||"",this.range=e.range?t.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId,this.mediaList=null,e.mediaList){this.mediaList=[];for(let t=0;tnew Jt(e,t)))}constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){this.text=e.text,this.range=e.range?t.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId}active(){return!0}}var Yt,Zt=Object.freeze({__proto__:null,CSSScope:Jt});class en{#je;parentRule;#Ve;styleSheetId;range;cssText;#We=new Map;#Ge=new Set;#Ke=new Map;#Qe;type;#$e;constructor(e,t,n,r,s){this.#je=e,this.parentRule=t,this.#Xe(n),this.type=r,this.#$e=s}rebase(e){if(this.styleSheetId===e.styleSheetId&&this.range)if(e.oldRange.equal(this.range))this.#Xe(e.payload);else{this.range=this.range.rebaseAfterTextEdit(e.oldRange,e.newRange);for(let t=0;t=0;--e)if(this.allProperties()[e].range)return e+1;return 0}#et(e){const t=this.propertyAt(e);if(t?.range)return t.range.collapseToStart();if(!this.range)throw new Error("CSSStyleDeclaration.range is null");return this.range.collapseToEnd()}newBlankProperty(e){e=void 0===e?this.pastLastSourcePropertyIndex():e;return new Ft(this,e,"","",!1,!1,!0,!1,"",this.#et(e))}setText(e,t){return this.range&&this.styleSheetId?this.#je.setStyleText(this.styleSheetId,this.range,e,t):Promise.resolve(!1)}insertPropertyAt(e,t,n,r){this.newBlankProperty(e).setText(t+": "+n+";",!1,!0).then(r)}appendProperty(e,t,n){this.insertPropertyAt(this.allProperties().length,e,t,n)}}!function(e){e.Regular="Regular",e.Inline="Inline",e.Attributes="Attributes",e.Pseudo="Pseudo",e.Transition="Transition",e.Animation="Animation"}(Yt||(Yt={}));var tn=Object.freeze({__proto__:null,CSSStyleDeclaration:en,get Type(){return Yt}});class nn extends _t{static parseSupportsPayload(e,t){return t.map((t=>new nn(e,t)))}#Oe=!0;constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){this.text=e.text,this.range=e.range?t.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId,this.#Oe=e.active}active(){return this.#Oe}}var rn=Object.freeze({__proto__:null,CSSSupports:nn});class sn{cssModelInternal;styleSheetId;sourceURL;origin;style;constructor(e,t){if(this.cssModelInternal=e,this.styleSheetId=t.styleSheetId,this.styleSheetId){const e=this.getStyleSheetHeader(this.styleSheetId);this.sourceURL=e.sourceURL}this.origin=t.origin,this.style=new en(this.cssModelInternal,this,t.style,Yt.Regular)}rebase(e){this.styleSheetId===e.styleSheetId&&this.style.rebase(e)}resourceURL(){if(!this.styleSheetId)return r.DevToolsPath.EmptyUrlString;return this.getStyleSheetHeader(this.styleSheetId).resourceURL()}isUserAgent(){return"user-agent"===this.origin}isInjected(){return"injected"===this.origin}isViaInspector(){return"inspector"===this.origin}isRegular(){return"regular"===this.origin}isKeyframeRule(){return!1}cssModel(){return this.cssModelInternal}getStyleSheetHeader(e){const t=this.cssModelInternal.styleSheetHeaderForId(e);return console.assert(null!==t),t}}class on{text;range;specificity;constructor(e){this.text=e.text,e.range&&(this.range=t.TextRange.TextRange.fromObject(e.range)),e.specificity&&(this.specificity=e.specificity)}rebase(e){this.range&&(this.range=this.range.rebaseAfterTextEdit(e.oldRange,e.newRange))}}class an extends sn{selectors;nestingSelectors;media;containerQueries;supports;scopes;layers;ruleTypes;wasUsed;constructor(e,t,n){super(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId}),this.reinitializeSelectors(t.selectorList),this.nestingSelectors=t.nestingSelectors,this.media=t.media?$t.parseMediaArrayPayload(e,t.media):[],this.containerQueries=t.containerQueries?Ut.parseContainerQueriesPayload(e,t.containerQueries):[],this.scopes=t.scopes?Jt.parseScopesPayload(e,t.scopes):[],this.supports=t.supports?nn.parseSupportsPayload(e,t.supports):[],this.layers=t.layers?Wt.parseLayerPayload(e,t.layers):[],this.ruleTypes=t.ruleTypes||[],this.wasUsed=n||!1}static createDummyRule(e,n){const r={selectorList:{text:"",selectors:[{text:n,value:void 0}]},style:{styleSheetId:"0",range:new t.TextRange.TextRange(0,0,0,0),shorthandEntries:[],cssProperties:[]},origin:"inspector"};return new an(e,r)}reinitializeSelectors(e){this.selectors=[];for(let t=0;te.text)).join(", ")}selectorRange(){if(0===this.selectors.length)return null;const e=this.selectors[0].range,n=this.selectors[this.selectors.length-1].range;return e&&n?new t.TextRange.TextRange(e.startLine,e.startColumn,n.endLine,n.endColumn):null}lineNumberInSource(e){const t=this.selectors[e];if(!t?.range||!this.styleSheetId)return 0;return this.getStyleSheetHeader(this.styleSheetId).lineNumberInSource(t.range.startLine)}columnNumberInSource(e){const t=this.selectors[e];if(!t?.range||!this.styleSheetId)return;return this.getStyleSheetHeader(this.styleSheetId).columnNumberInSource(t.range.startLine,t.range.startColumn)}rebase(e){if(this.styleSheetId!==e.styleSheetId)return;const t=this.selectorRange();if(t?.equal(e.oldRange))this.reinitializeSelectors(e.payload);else for(let t=0;tt.rebase(e))),this.containerQueries.forEach((t=>t.rebase(e))),this.scopes.forEach((t=>t.rebase(e))),this.supports.forEach((t=>t.rebase(e))),super.rebase(e)}}class ln extends sn{#tt;constructor(e,t){super(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId}),this.#tt=new on(t.propertyName)}propertyName(){return this.#tt}initialValue(){return this.style.hasActiveProperty("initial-value")?this.style.getPropertyValue("initial-value"):null}syntax(){return this.style.getPropertyValue("syntax")}inherits(){return"true"===this.style.getPropertyValue("inherits")}setPropertyName(e){const t=this.styleSheetId;if(!t)throw new Error("No rule stylesheet id");const n=this.#tt.range;if(!n)throw new Error("Property name is not editable");return this.cssModelInternal.setPropertyRulePropertyName(t,n,e)}}class dn extends sn{#nt;constructor(e,t){super(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId}),this.#nt=new on(t.fontPaletteName)}name(){return this.#nt}}class cn{#$e;#rt;constructor(e,t){this.#$e=new on(t.animationName),this.#rt=t.keyframes.map((t=>new hn(e,t)))}name(){return this.#$e}keyframes(){return this.#rt}}class hn extends sn{#st;constructor(e,t){super(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId}),this.reinitializeKey(t.keyText)}key(){return this.#st}reinitializeKey(e){this.#st=new on(e)}rebase(e){this.styleSheetId===e.styleSheetId&&this.#st.range&&(e.oldRange.equal(this.#st.range)?this.reinitializeKey(e.payload):this.#st.rebase(e),super.rebase(e))}isKeyframeRule(){return!0}setKeyText(e){const t=this.styleSheetId;if(!t)throw new Error("No rule stylesheet id");const n=this.#st.range;if(!n)throw new Error("Keyframe key is not editable");return this.cssModelInternal.setKeyframeKey(t,n,e)}}class un extends sn{#tt;#Oe;constructor(e,t){super(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId}),this.#tt=new on(t.name),this.#Oe=t.active}name(){return this.#tt}active(){return this.#Oe}}class gn extends sn{#tt;#it;#ot;constructor(e,t){super(e,{origin:t.origin,style:{cssProperties:[],shorthandEntries:[]},styleSheetId:t.styleSheetId}),this.#tt=new on(t.name),this.#it=t.parameters.map((({name:e})=>e)),this.#ot=this.protocolNodesToNestedStyles(t.children)}functionName(){return this.#tt}parameters(){return this.#it}children(){return this.#ot}protocolNodesToNestedStyles(e){const t=[];for(const n of e){const e=this.protocolNodeToNestedStyle(n);e&&t.push(e)}return t}protocolNodeToNestedStyle(e){if(e.style)return{style:new en(this.cssModelInternal,this,e.style,Yt.Regular)};if(e.condition){const t=this.protocolNodesToNestedStyles(e.condition.children);return e.condition.media?{children:t,media:new $t(this.cssModelInternal,e.condition.media)}:e.condition.containerQueries?{children:t,container:new Ut(this.cssModelInternal,e.condition.containerQueries)}:e.condition.supports?{children:t,supports:new nn(this.cssModelInternal,e.condition.supports)}:void console.error("A function rule condition must have a media, container, or supports")}console.error("A function rule node must have a style or condition")}}var pn=Object.freeze({__proto__:null,CSSFontPaletteValuesRule:dn,CSSFunctionRule:gn,CSSKeyframeRule:hn,CSSKeyframesRule:cn,CSSPositionTryRule:un,CSSPropertyRule:ln,CSSRule:sn,CSSStyleRule:an});function mn(e,t){if(!t.styleSheetId||!t.range)return!1;for(const n of e)if(t.styleSheetId===n.styleSheetId&&n.range&&t.range.equal(n.range))return!0;return!1}function fn(e){const t=e.allProperties();for(let e=0;e({name:e,value:t}))),t.rule.style.cssProperties=[...r.entries()].map((([e,t])=>({name:e,value:t})))}function r(e){return e.rule.media?e.rule.media.map((e=>e.text)).join(", "):null}function s(e){const{matchingSelectors:t,rule:n}=e;"user-agent"===n.origin&&t.length&&(n.selectorList.selectors=n.selectorList.selectors.filter(((e,n)=>t.includes(n))),n.selectorList.text=n.selectorList.selectors.map((e=>e.text)).join(", "),e.matchingSelectors=t.map(((e,t)=>t)))}}function yn(e){const t=new Map;for(let n=0;nnew ln(e,t))),...o].map((t=>new vn(e,t))),n&&(this.#rt=n.map((t=>new cn(e,t)))),this.#It=s.map((t=>new un(e,t))),this.#vt=r,this.#Rt=a?new dn(e,a):void 0,this.#wt=l,this.#xt=d.map((t=>new gn(e,t)))}async init({matchedPayload:e,inheritedPayload:t,inlinePayload:n,attributesPayload:r,pseudoPayload:s,inheritedPseudoPayload:i,animationStylesPayload:o,transitionsStylePayload:a,inheritedAnimatedPayload:l}){e=bn(e);for(const e of t)e.matchedCSSRules=bn(e.matchedCSSRules);this.#St=await this.buildMainCascade(n,r,e,t,o,a,l),[this.#kt,this.#Ct]=this.buildPseudoCascades(s,i);for(const e of Array.from(this.#Ct.values()).concat(Array.from(this.#kt.values())).concat(this.#St))for(const t of e.styles())this.#yt.set(t,e);for(const e of this.#pt)this.#mt.set(e.propertyName(),e)}async buildMainCascade(e,t,n,r,s,i,o){const a=[],l=[];function d(){if(!t)return;const e=new en(this.#je,null,t,Yt.Attributes);this.#ft.set(e,this.#ht),l.push(e)}if(i){const e=new en(this.#je,null,i,Yt.Transition);this.#ft.set(e,this.#ht),l.push(e)}for(const e of s){const t=new en(this.#je,null,e.style,Yt.Animation,e.name);this.#ft.set(t,this.#ht),l.push(t)}if(e&&this.#ht.nodeType()===Node.ELEMENT_NODE){const t=new en(this.#je,null,e,Yt.Inline);this.#ft.set(t,this.#ht),l.push(t)}let c;for(let e=n.length-1;e>=0;--e){const t=new an(this.#je,n[e].rule);!t.isInjected()&&!t.isUserAgent()||c||(c=!0,d.call(this)),this.#ft.set(t.style,this.#ht),l.push(t.style),this.addMatchingSelectors(this.#ht,t,n[e].matchingSelectors)}c||d.call(this),a.push(new wn(this,l,!1));let h=this.#ht.parentNode;const u=async e=>e.hasAssignedSlot()?await(e.assignedSlot?.deferredNode.resolvePromise())??null:e.parentNode;for(let e=0;h&&r&&enew en(this.#je,null,e.style,Yt.Animation,e.name)))??[];d&&fn(d)&&(this.#ft.set(d,h),t.push(d),this.#bt.add(d));for(const e of c)fn(e)&&(this.#ft.set(e,h),t.push(e),this.#bt.add(e));i&&fn(i)&&(this.#ft.set(i,h),t.push(i),this.#bt.add(i));const g=n.matchedCSSRules||[];for(let e=g.length-1;e>=0;--e){const n=new an(this.#je,g[e].rule);this.addMatchingSelectors(h,n,g[e].matchingSelectors),fn(n.style)&&((n.style.allProperties().some((e=>S().isCustomProperty(e.name)))||!mn(l,n.style)&&!mn(this.#bt,n.style))&&(this.#ft.set(n.style,h),t.push(n.style),this.#bt.add(n.style)))}h=await u(h),a.push(new wn(this,t,!0))}return new Tn(a,this.#pt)}buildSplitCustomHighlightCascades(e,t,n,r){const s=new Map;for(let r=e.length-1;r>=0;--r){const i=yn(e[r]);for(const[o,a]of i){const i=new an(this.#je,e[r].rule);this.#ft.set(i.style,t),n&&this.#bt.add(i.style),this.addMatchingSelectors(t,i,a);const l=s.get(o);l?l.push(i.style):s.set(o,[i.style])}}for(const[e,t]of s){const s=new wn(this,t,n,!0),i=r.get(e);i?i.push(s):r.set(e,[s])}}buildPseudoCascades(e,t){const n=new Map,r=new Map;if(!e)return[n,r];const s=new Map,i=new Map;for(let t=0;t=0;--e){const t=new an(this.#je,a[e].rule);o.push(t.style);const s=S().isHighlightPseudoType(n.pseudoType)?this.#ht:r;this.#ft.set(t.style,s),s&&this.addMatchingSelectors(s,t,a[e].matchingSelectors)}const e=S().isHighlightPseudoType(n.pseudoType),t=new wn(this,o,!1,e);s.set(n.pseudoType,[t])}}if(t){let e=this.#ht.parentNode;for(let n=0;e&&n=0;--n){const r=new an(this.#je,o[n].rule);t.push(r.style),this.#ft.set(r.style,e),this.#bt.add(r.style),this.addMatchingSelectors(e,r,o[n].matchingSelectors)}const r=S().isHighlightPseudoType(n.pseudoType),i=new wn(this,t,!0,r),a=s.get(n.pseudoType);a?a.push(i):s.set(n.pseudoType,[i])}}e=e.parentNode}}for(const[e,t]of s.entries())n.set(e,new Tn(t,this.#pt));for(const[e,t]of i.entries())r.set(e,new Tn(t,this.#pt));return[n,r]}addMatchingSelectors(e,t,n){for(const r of n){const n=t.selectors[r];n&&this.setSelectorMatches(e,n.text,!0)}}node(){return this.#ht}cssModel(){return this.#je}hasMatchingSelectors(e){return(0===e.selectors.length||this.getMatchingSelectors(e).length>0)&&function(e){if(!e.parentRule)return!0;const t=e.parentRule,n=[...t.media,...t.containerQueries,...t.supports,...t.scopes];for(const e of n)if(!e.active())return!1;return!0}(e.style)}getParentLayoutNodeId(){return this.#vt}getMatchingSelectors(e){const t=this.nodeForStyle(e.style);if(!t||"number"!=typeof t.id)return[];const n=this.#gt.get(t.id);if(!n)return[];const r=[];for(let t=0;tthis.isInherited(e)))??[]}animationStyles(){return this.#St?.styles().filter((e=>!this.isInherited(e)&&e.type===Yt.Animation))??[]}transitionsStyle(){return this.#St?.styles().find((e=>!this.isInherited(e)&&e.type===Yt.Transition))??null}registeredProperties(){return this.#pt}getRegisteredProperty(e){return this.#mt.get(e)}functionRules(){return this.#xt}fontPaletteValuesRule(){return this.#Rt}keyframes(){return this.#rt}positionTryRules(){return this.#It}activePositionFallbackIndex(){return this.#wt}pseudoStyles(e){r.assertNotNullOrUndefined(this.#kt);const t=this.#kt.get(e);return t?t.styles():[]}pseudoTypes(){return r.assertNotNullOrUndefined(this.#kt),new Set(this.#kt.keys())}customHighlightPseudoStyles(e){r.assertNotNullOrUndefined(this.#Ct);const t=this.#Ct.get(e);return t?t.styles():[]}customHighlightPseudoNames(){return r.assertNotNullOrUndefined(this.#Ct),new Set(this.#Ct.keys())}nodeForStyle(e){return this.#ut.get(e)||this.#ft.get(e)||null}availableCSSVariables(e){const t=this.#yt.get(e);return t?t.findAvailableCSSVariables(e):[]}computeCSSVariable(e,t){const n=this.#yt.get(e);return n?n.computeCSSVariable(e,t):null}resolveProperty(e,t){return this.#yt.get(t)?.resolveProperty(e,t)??null}resolveGlobalKeyword(e,t){const n=this.#yt.get(e.ownerStyle)?.resolveGlobalKeyword(e,t);return n?new kn(n):null}isInherited(e){return this.#bt.has(e)}propertyState(e){const t=this.#yt.get(e.ownerStyle);return t?t.propertyState(e):null}resetActiveProperties(){r.assertNotNullOrUndefined(this.#St),r.assertNotNullOrUndefined(this.#kt),r.assertNotNullOrUndefined(this.#Ct),this.#St.reset();for(const e of this.#kt.values())e.reset();for(const e of this.#Ct.values())e.reset()}propertyMatchers(e,t){return[new ve(this,e),new De((()=>t?.get("color")??null)),new Me,new Ee,new xe,new Ue,new ze,new Ve,new Ge,new Fe(e),new nt,new Ae,new st,new ot,new et,new ct,new Xe,new Ye,new _e,new we]}}class wn{#Tt;styles;#Mt;#Pt;propertiesState=new Map;activeProperties=new Map;constructor(e,t,n,r=!1){this.#Tt=e,this.styles=t,this.#Mt=n,this.#Pt=r}computeActiveProperties(){this.propertiesState.clear(),this.activeProperties.clear();for(let e=this.styles.length-1;e>=0;e--){const t=this.styles[e],n=t.parentRule;if((!n||n instanceof an)&&(!n||this.#Tt.hasMatchingSelectors(n)))for(const e of t.allProperties()){const n=S();if(this.#Mt&&!this.#Pt&&!n.isPropertyInherited(e.name))continue;if(t.range&&!e.range)continue;if(!e.activeInStyle()){this.propertiesState.set(e,"Overloaded");continue}if(this.#Mt){const t=this.#Tt.getRegisteredProperty(e.name);if(t&&!t.inherits()){this.propertiesState.set(e,"Overloaded");continue}}const r=n.canonicalPropertyName(e.name);this.updatePropertyState(e,r);for(const t of e.getLonghandProperties())n.isCSSPropertyName(t.name)&&this.updatePropertyState(t,t.name)}}}updatePropertyState(e,t){const n=this.activeProperties.get(t);!n?.important||e.important?(n&&this.propertiesState.set(n,"Overloaded"),this.propertiesState.set(e,"Active"),this.activeProperties.set(t,e)):this.propertiesState.set(e,"Overloaded")}}function Sn(e){return"ownerStyle"in e}class kn{declaration;constructor(e){this.declaration=e}get value(){return Sn(this.declaration)?this.declaration.value:this.declaration.initialValue()}get style(){return Sn(this.declaration)?this.declaration.ownerStyle:this.declaration.style()}get name(){return Sn(this.declaration)?this.declaration.name:this.declaration.propertyName()}}class Cn{nodeCascade;name;discoveryTime;rootDiscoveryTime;get isRootEntry(){return this.rootDiscoveryTime===this.discoveryTime}updateRoot(e){this.rootDiscoveryTime=Math.min(this.rootDiscoveryTime,e.rootDiscoveryTime)}constructor(e,t,n){this.nodeCascade=e,this.name=t,this.discoveryTime=n,this.rootDiscoveryTime=n}}class xn{#Et=0;#Lt=[];#At=new Map;get(e,t){return this.#At.get(e)?.get(t)}add(e,t){const n=this.get(e,t);if(n)return n;const r=new Cn(e,t,this.#Et++);this.#Lt.push(r);let s=this.#At.get(e);return s||(s=new Map,this.#At.set(e,s)),s.set(t,r),r}isInInProgressSCC(e){return this.#Lt.includes(e)}finishSCC(e){const t=this.#Lt.lastIndexOf(e);return console.assert(t>=0,"Root is not an in-progress scc"),this.#Lt.splice(t)}}function*Rn(e,t){for(let n=void 0!==t?e.indexOf(t)+1:0;nn.name===e.name&&t(n)));if(n)return n}return null}resolveProperty(e,t){const n=this.#Ft.get(t);if(!n)return null;for(const r of function*(e,t){(void 0===t||e.includes(t))&&(void 0!==t&&(yield t),yield*Rn(e,t))}(n.styles,t)){const t=r.allProperties().findLast((t=>t.name===e));if(t)return t}return this.#Ut({name:e,ownerStyle:t})}#qt(e){const t=this.#Ft.get(e.ownerStyle);if(!t)return null;for(const n of Rn(this.#_t,t))for(const t of n.styles){const n=t.allProperties().findLast((t=>t.name===e.name));if(n)return n}return null}#Ut(e){return S().isPropertyInherited(e.name)&&(this.#zt(e.name)?.inherits()??1)?this.#qt(e):null}#zt(e){const t=this.#pt.find((t=>t.propertyName()===e));return t||null}resolveGlobalKeyword(e,t){const n=t=>t.ownerStyle.parentRule instanceof an&&(e.ownerStyle.type===Yt.Inline||e.ownerStyle.parentRule instanceof an&&"regular"===t.ownerStyle.parentRule?.origin&&JSON.stringify(t.ownerStyle.parentRule.layers)!==JSON.stringify(e.ownerStyle.parentRule.layers));switch(t){case"initial":return this.#zt(e.name);case"inherit":return this.#qt(e)??this.#zt(e.name);case"revert":return this.#Ht(e,(t=>null!==t.ownerStyle.parentRule&&t.ownerStyle.parentRule.origin!==(e.ownerStyle.parentRule?.origin??"regular")))??this.resolveGlobalKeyword(e,"unset");case"revert-layer":return this.#Ht(e,n)??this.resolveGlobalKeyword(e,"revert");case"unset":return this.#Ut(e)??this.#zt(e.name)}}computeCSSVariable(e,t){const n=this.#Ft.get(e);return n?(this.ensureInitialized(),this.innerComputeCSSVariable(n,t)):null}innerComputeCSSVariable(e,t,n=new xn){const r=this.#Dt.get(e),s=this.#Nt.get(e);if(!s||!r?.has(t))return null;if(s?.has(t))return s.get(t)||null;let i=r.get(t);if(null==i)return null;if(i.declaration.declaration instanceof Ft&&i.declaration.value&&f.isCSSWideKeyword(i.declaration.value)){const e=this.resolveGlobalKeyword(i.declaration.declaration,i.declaration.value);if(!e)return i;const t=new kn(e),{value:n}=t;if(!n)return i;i={declaration:t,value:n}}const o=Lt(`--${t}`,i.value);if(!o)return null;const a=n.add(e,t),l=Ct.walk(o,[new be((e=>{const t=i.declaration.style,r=this.#Ft.get(t);if(!r)return null;const s=n.get(r,e.name);if(s)return n.isInInProgressSCC(s)?(a.updateRoot(s),null):this.#Nt.get(r)?.get(e.name)?.value??null;const o=this.innerComputeCSSVariable(r,e.name,n),l=n.get(r,e.name);return l&&a.updateRoot(l),void 0!==o?.value?o.value:0===e.fallback.length||e.matching.hasUnresolvedVarsRange(e.fallback[0],e.fallback[e.fallback.length-1])?null:e.matching.getComputedTextRange(e.fallback[0],e.fallback[e.fallback.length-1])}))]),d=Pt.siblings(Pt.declValue(l.ast.tree)),c=d.length>0?l.getComputedTextRange(d[0],d[d.length-1]):"";if(a.isRootEntry){const t=n.finishSCC(a);if(t.length>1){for(const n of t)console.assert(n.nodeCascade===e,"Circles should be within the cascade"),s.set(n.name,null);return null}}if(d.length>0&&l.hasUnresolvedVarsRange(d[0],d[d.length-1]))return s.set(t,null),null;const h={value:c,declaration:i.declaration};return s.set(t,h),h}styles(){return Array.from(this.#Ft.keys())}propertyState(e){return this.ensureInitialized(),this.#Ot.get(e)||null}reset(){this.#Bt=!1,this.#Ot.clear(),this.#Dt.clear(),this.#Nt.clear()}ensureInitialized(){if(this.#Bt)return;this.#Bt=!0;const e=new Map;for(const t of this.#_t){t.computeActiveProperties();for(const[n,r]of t.propertiesState){if("Overloaded"===r){this.#Ot.set(n,"Overloaded");continue}const t=S().canonicalPropertyName(n.name);e.has(t)?this.#Ot.set(n,"Overloaded"):(e.set(t,n),this.#Ot.set(n,"Active"))}}for(const[t,n]of e){const r=n.ownerStyle,s=n.getLonghandProperties();if(!s.length)continue;let i=!1;for(const t of s){const n=S().canonicalPropertyName(t.name),s=e.get(n);if(s&&s.ownerStyle===r){i=!0;break}}i||(e.delete(t),this.#Ot.set(n,"Overloaded"))}const t=new Map;for(const e of this.#pt){const n=e.initialValue();t.set(e.propertyName(),null!==n?{value:n,declaration:new kn(e)}:null)}for(let e=this.#_t.length-1;e>=0;--e){const n=this.#_t[e],r=[];for(const e of n.activeProperties.entries()){const n=e[0],s=e[1];n.startsWith("--")&&(t.set(n,{value:s.value,declaration:new kn(s)}),r.push(n))}const s=new Map(t),i=new Map;this.#Dt.set(n,s),this.#Nt.set(n,i);for(const e of r){const r=t.get(e);t.delete(e);const s=this.innerComputeCSSVariable(n,e);r&&s?.value===r.value&&(s.declaration=r.declaration),t.set(e,s)}}}}var Mn=Object.freeze({__proto__:null,CSSMatchedStyles:In,CSSRegisteredProperty:vn,CSSValueSource:kn});const Pn={couldNotFindTheOriginalStyle:"Could not find the original style sheet.",thereWasAnErrorRetrievingThe:"There was an error retrieving the source styles."},En=n.i18n.registerUIStrings("core/sdk/CSSStyleSheetHeader.ts",Pn),Ln=n.i18n.getLocalizedString.bind(void 0,En);class An{#je;id;frameId;sourceURL;hasSourceURL;origin;title;disabled;isInline;isMutable;isConstructed;startLine;startColumn;endLine;endColumn;contentLength;ownerNode;sourceMapURL;loadingFailed;#jt;constructor(e,t){this.#je=e,this.id=t.styleSheetId,this.frameId=t.frameId,this.sourceURL=t.sourceURL,this.hasSourceURL=Boolean(t.hasSourceURL),this.origin=t.origin,this.title=t.title,this.disabled=t.disabled,this.isInline=t.isInline,this.isMutable=t.isMutable,this.isConstructed=t.isConstructed,this.startLine=t.startLine,this.startColumn=t.startColumn,this.endLine=t.endLine,this.endColumn=t.endColumn,this.contentLength=t.length,t.ownerNode&&(this.ownerNode=new js(e.target(),t.ownerNode)),this.sourceMapURL=t.sourceMapURL,this.loadingFailed=t.loadingFailed??!1,this.#jt=null}originalContentProvider(){if(!this.#jt){const e=async()=>{const e=await this.#je.originalStyleSheetText(this);return null===e?{error:Ln(Pn.couldNotFindTheOriginalStyle)}:new t.ContentData.ContentData(e,!1,"text/css")};this.#jt=new t.StaticContentProvider.StaticContentProvider(this.contentURL(),this.contentType(),e)}return this.#jt}setSourceMapURL(e){this.sourceMapURL=e}cssModel(){return this.#je}isAnonymousInlineStyleSheet(){return!this.resourceURL()&&!this.#je.sourceMapManager().sourceMapForClient(this)}isConstructedByNew(){return this.isConstructed&&0===this.sourceURL.length}resourceURL(){return this.isViaInspector()?this.viaInspectorResourceURL():this.sourceURL}getFrameURLPath(){const t=this.#je.target().model(ii);if(console.assert(Boolean(t)),!t)return"";const n=t.frameForId(this.frameId);if(!n)return"";console.assert(Boolean(n));const r=new e.ParsedURL.ParsedURL(n.url);let s=r.host+r.folderPathComponents;return s.endsWith("/")||(s+="/"),s}viaInspectorResourceURL(){return`inspector:///inspector-stylesheet#${this.id}`}lineNumberInSource(e){return this.startLine+e}columnNumberInSource(e,t){return(e?0:this.startColumn)+t}containsLocation(e,t){const n=e===this.startLine&&t>=this.startColumn||e>this.startLine,r=ee.isOutermostFrame()));this.#Kt=e.length>0?e[0]:null}getFrame(e){const t=this.#Wt.get(e);return t?t.frame:null}getAllFrames(){return Array.from(this.#Wt.values(),(e=>e.frame))}getOutermostFrame(){return this.#Kt}async getOrWaitForFrame(e,t){const n=this.getFrame(e);return!n||t&&t===n.resourceTreeModel().target()?await new Promise((n=>{const r=this.#$t.get(e);r?r.push({notInTarget:t,resolve:n}):this.#$t.set(e,[{notInTarget:t,resolve:n}])})):n}resolveAwaitedFrame(e){const t=this.#$t.get(e.id);if(!t)return;const n=t.filter((({notInTarget:t,resolve:n})=>!(!t||t!==e.resourceTreeModel().target())||(n(e),!1)));n.length>0?this.#$t.set(e.id,n):this.#$t.delete(e.id)}}var Fn=Object.freeze({__proto__:null,FrameManager:Nn});class Bn{static fromLocalObject(e){return new zn(e)}static type(e){if(null===e)return"null";const t=typeof e;return"object"!==t&&"function"!==t?t:e.type}static isNullOrUndefined(e){if(void 0===e)return!0;switch(e.type){case"object":return"null"===e.subtype;case"undefined":return!0;default:return!1}}static arrayNameFromDescription(e){return e.replace(Gn,"").replace(Kn,"")}static arrayLength(e){if("array"!==e.subtype&&"typedarray"!==e.subtype)return 0;const t=e.description?.match(Gn),n=e.description?.match(Kn);return t?parseInt(t[1],10):n?parseInt(n[1],10):0}static arrayBufferByteLength(e){if("arraybuffer"!==e.subtype)return 0;const t=e.description?.match(Gn);return t?parseInt(t[1],10):0}static unserializableDescription(e){if("number"==typeof e){const t=String(e);if(0===e&&1/e<0)return"-0";if("NaN"===t||"Infinity"===t||"-Infinity"===t)return t}return"bigint"==typeof e?e+"n":null}static toCallArgument(e){const t=typeof e;if("undefined"===t)return{};const n=Bn.unserializableDescription(e);if("number"===t)return null!==n?{unserializableValue:n}:{value:e};if("bigint"===t)return{unserializableValue:n};if("string"===t||"boolean"===t)return{value:e};if(!e)return{value:null};const r=e;if(e instanceof Bn){const t=e.unserializableValue();if(void 0!==t)return{unserializableValue:t}}else if(void 0!==r.unserializableValue)return{unserializableValue:r.unserializableValue};return void 0!==r.objectId?{objectId:r.objectId}:{value:r.value}}static async loadFromObjectPerProto(e,t,n=!1){const r=await Promise.all([e.getAllProperties(!0,t,n),e.getOwnProperties(t,n)]),s=r[0].properties,i=r[1].properties,o=r[1].internalProperties;if(!i||!s)return{properties:null,internalProperties:null};const a=new Map,l=[];for(let e=0;e100){r+=",…";break}e&&(r+=", "),r+=t}return r+=t,r}get type(){return typeof this.valueInternal}get subtype(){return null===this.valueInternal?"null":Array.isArray(this.valueInternal)?"array":this.valueInternal instanceof Date?"date":void 0}get hasChildren(){return"object"==typeof this.valueInternal&&null!==this.valueInternal&&Boolean(Object.keys(this.valueInternal).length)}async getOwnProperties(e,t=!1){let n=this.children();return t&&(n=n.filter((e=>!function(e){const t=Number(e)>>>0;return String(t)===e}(e.name)))),{properties:n,internalProperties:null}}async getAllProperties(e,t,n=!1){return e?{properties:[],internalProperties:null}:await this.getOwnProperties(t,n)}children(){return this.hasChildren?(this.#an||(this.#an=Object.entries(this.valueInternal).map((([e,t])=>new qn(e,t instanceof Bn?t:Bn.fromLocalObject(t))))),this.#an):[]}arrayLength(){return Array.isArray(this.valueInternal)?this.valueInternal.length:0}async callFunction(e,t){const n=this.valueInternal,r=t?t.map((e=>e.value)):[];let s,i=!1;try{s=e.apply(n,r)}catch{i=!0}return{object:Bn.fromLocalObject(s),wasThrown:i}}async callFunctionJSON(e,t){const n=this.valueInternal,r=t?t.map((e=>e.value)):[];let s;try{s=e.apply(n,r)}catch{s=null}return s}}class jn{#ln;constructor(e){this.#ln=e}static objectAsArray(e){if(!e||"object"!==e.type||"array"!==e.subtype&&"typedarray"!==e.subtype)throw new Error("Object is empty or not an array");return new jn(e)}static async createFromRemoteObjects(e){if(!e.length)throw new Error("Input array is empty");const t=await e[0].callFunction((function(...e){return e}),e.map(Bn.toCallArgument));if(t.wasThrown||!t.object)throw new Error("Call function throws exceptions or returns empty value");return jn.objectAsArray(t.object)}async at(e){if(e<0||e>this.#ln.arrayLength())throw new Error("Out of range");const t=await this.#ln.callFunction((function(e){return this[e]}),[Bn.toCallArgument(e)]);if(t.wasThrown||!t.object)throw new Error("Exception in callFunction or result value is empty");return t.object}length(){return this.#ln.arrayLength()}map(e){const t=[];for(let n=0;n"[[TargetFunction]]"===e));return t?.value??this.#dn}async targetFunctionDetails(){const e=await this.targetFunction(),t=await e.debuggerModel().functionDetailsPromise(e);return this.#dn!==e&&e.release(),t}}class Wn{#dn;#cn;#hn;constructor(e){this.#dn=e}static objectAsError(e){if("error"!==e.subtype)throw new Error(`Object of type ${e.subtype} is not an error`);return new Wn(e)}get errorStack(){return this.#dn.description??""}exceptionDetails(){return this.#cn||(this.#cn=this.#un()),this.#cn}#un(){return this.#dn.objectId?this.#dn.runtimeModel().getExceptionDetails(this.#dn.objectId):Promise.resolve(void 0)}cause(){return this.#hn||(this.#hn=this.#gn()),this.#hn}async#gn(){const e=await this.#dn.getAllProperties(!1,!1),t=e.properties?.find((e=>"cause"===e.name));return t?.value}}const Gn=/\(([0-9]+)\)/,Kn=/\[([0-9]+)\]/;var Qn=Object.freeze({__proto__:null,LinearMemoryInspectable:class{object;expression;constructor(e,t){if(!e.isLinearMemoryInspectable())throw new Error("object must be linear memory inspectable");this.object=e,this.expression=t}},LocalJSONObject:zn,RemoteArray:jn,RemoteArrayBuffer:class{#ln;constructor(e){if("object"!==e.type||"arraybuffer"!==e.subtype)throw new Error("Object is not an arraybuffer");this.#ln=e}byteLength(){return this.#ln.arrayBufferByteLength()}async bytes(e=0,t=this.byteLength()){if(e<0||e>=this.byteLength())throw new RangeError("start is out of range");if(tthis.byteLength())throw new RangeError("end is out of range");return await this.#ln.callFunctionJSON((function(e,t){return[...new Uint8Array(this,e,t)]}),[{value:e},{value:t-e}])}object(){return this.#ln}},RemoteError:Wn,RemoteFunction:Vn,RemoteObject:Bn,RemoteObjectImpl:_n,RemoteObjectProperty:qn,ScopeRef:Un,ScopeRemoteObject:Hn});class $n extends h{constructor(e){super(e)}async read(t,n,r){const s=await this.target().ioAgent().invoke_read({handle:t,offset:r,size:n});if(s.getError())throw new Error(s.getError());return s.eof?null:s.base64Encoded?e.Base64.decode(s.data):s.data}async close(e){(await this.target().ioAgent().invoke_close({handle:e})).getError()&&console.error("Could not close stream.")}async resolveBlob(e){const t=e instanceof Bn?e.objectId:e;if(!t)throw new Error("Remote object has undefined objectId");const n=await this.target().ioAgent().invoke_resolveBlob({objectId:t});if(n.getError())throw new Error(n.getError());return`blob:${n.uuid}`}async readToString(e){const t=[],n=new TextDecoder;for(;;){const r=await this.read(e,4194304);if(null===r){t.push(n.decode());break}r instanceof ArrayBuffer?t.push(n.decode(r,{stream:!0})):t.push(r)}return t.join("")}}h.register($n,{capabilities:131072,autostart:!0});var Xn=Object.freeze({__proto__:null,IOModel:$n});const Jn={loadCanceledDueToReloadOf:"Load canceled due to reload of inspected page"},Yn=n.i18n.registerUIStrings("core/sdk/PageResourceLoader.ts",Jn),Zn=n.i18n.getLocalizedString.bind(void 0,Yn);function er(e){return"extensionId"in e}let tr=null;class nr extends e.ObjectWrapper.ObjectWrapper{#pn=0;#mn=new Map;#fn;#bn=new Map;#yn=[];#vn;constructor(e,t){super(),this.#fn=t,W.instance().addModelListener(ii,ri.PrimaryPageChanged,this.onPrimaryPageChanged,this),this.#vn=e}static instance({forceNew:e,loadOverride:t,maxConcurrentLoads:n}={forceNew:!1,loadOverride:null,maxConcurrentLoads:500}){return tr&&!e||(tr=new nr(t,n)),tr}static removeInstance(){tr=null}onPrimaryPageChanged(e){const{frame:t,type:n}=e.data;if(!t.isOutermostFrame())return;for(const{reject:e}of this.#yn)e(new Error(Zn(Jn.loadCanceledDueToReloadOf)));this.#yn=[];const r=t.resourceTreeModel().target(),s=new Map;for(const[e,t]of this.#bn.entries())"Activation"===n&&r===t.initiator.target&&s.set(e,t);this.#bn=s,this.dispatchEventToListeners("Update")}getResourcesLoaded(){return this.#bn}getScopedResourcesLoaded(){return new Map([...this.#bn].filter((([e,t])=>W.instance().isInScope(t.initiator.target)||er(t.initiator))))}getNumberOfResources(){return{loading:this.#pn,queued:this.#yn.length,resources:this.#bn.size}}getScopedNumberOfResources(){const e=W.instance();let t=0;for(const[n,r]of this.#mn){const s=e.targetById(n);e.isInScope(s)&&(t+=r)}return{loading:t,resources:this.getScopedResourcesLoaded().size}}async acquireLoadSlot(e){if(this.#pn++,e){const t=this.#mn.get(e.id())||0;this.#mn.set(e.id(),t+1)}if(this.#pn>this.#fn){const{promise:e,resolve:t,reject:n}=Promise.withResolvers();this.#yn.push({resolve:t,reject:n}),await e}}releaseLoadSlot(e){if(this.#pn--,e){const t=this.#mn.get(e.id());t&&this.#mn.set(e.id(),t-1)}const t=this.#yn.shift();t&&t.resolve()}static makeExtensionKey(e,t){if(er(t)&&t.extensionId)return`${e}-${t.extensionId}`;throw new Error("Invalid initiator")}static makeKey(e,t){if(t.frameId)return`${e}-${t.frameId}`;if(t.target)return`${e}-${t.target.id()}`;throw new Error("Invalid initiator")}resourceLoadedThroughExtension(e){const t=nr.makeExtensionKey(e.url,e.initiator);this.#bn.set(t,e),this.dispatchEventToListeners("Update")}async loadResource(e,t){if(er(t))throw new Error("Invalid initiator");const n=nr.makeKey(e,t),r={success:null,size:null,duration:null,errorMessage:void 0,url:e,initiator:t};this.#bn.set(n,r),this.dispatchEventToListeners("Update");const s=performance.now();try{await this.acquireLoadSlot(t.target);const n=this.dispatchLoad(e,t),s=await n;if(r.errorMessage=s.errorDescription.message,r.success=s.success,s.success)return r.size=s.content.length,{content:s.content};throw new Error(s.errorDescription.message)}catch(e){throw void 0===r.errorMessage&&(r.errorMessage=e.message),null===r.success&&(r.success=!1),e}finally{r.duration=performance.now()-s,this.releaseLoadSlot(t.target),this.dispatchEventToListeners("Update")}}async dispatchLoad(t,n){if(er(n))throw new Error("Invalid initiator");let r=null;if(this.#vn)return await this.#vn(t);const s=new e.ParsedURL.ParsedURL(t),i=rr().get()&&s&&"file"!==s.scheme&&"data"!==s.scheme&&"devtools"!==s.scheme;if(a.userMetrics.developerResourceScheme(this.getDeveloperResourceScheme(s)),i){try{if(n.target){a.userMetrics.developerResourceLoaded(0),a.rnPerfMetrics.developerResourceLoadingStarted(s,0);const e=await this.loadFromTarget(n.target,n.frameId,t);return a.rnPerfMetrics.developerResourceLoadingFinished(s,0,e),e}const e=Nn.instance().getFrame(n.frameId);if(e){a.userMetrics.developerResourceLoaded(1),a.rnPerfMetrics.developerResourceLoadingStarted(s,1);const r=await this.loadFromTarget(e.resourceTreeModel().target(),n.frameId,t);return a.rnPerfMetrics.developerResourceLoadingFinished(s,0,r),r}}catch(e){e instanceof Error&&(a.userMetrics.developerResourceLoaded(2),r=e.message),a.rnPerfMetrics.developerResourceLoadingFinished(s,2,{success:!1,errorDescription:{message:r}})}a.userMetrics.developerResourceLoaded(3),a.rnPerfMetrics.developerResourceLoadingStarted(s,3)}else{const e=rr().get()?6:5;a.userMetrics.developerResourceLoaded(e),a.rnPerfMetrics.developerResourceLoadingStarted(s,e)}const o=await ce.instance().loadResource(t);return i&&!o.success&&a.userMetrics.developerResourceLoaded(7),r&&(o.errorDescription.message=`Fetch through target failed: ${r}; Fallback: ${o.errorDescription.message}`),a.rnPerfMetrics.developerResourceLoadingFinished(s,4,o),o}getDeveloperResourceScheme(e){if(!e||""===e.scheme)return 1;const t="localhost"===e.host||e.host.endsWith(".localhost");switch(e.scheme){case"file":return 7;case"data":return 6;case"blob":return 8;case"http":return t?4:2;case"https":return t?5:3}return 0}async loadFromTarget(t,n,r){const s=t.model(Z),i=t.model($n),o=e.Settings.Settings.instance().moduleSetting("cache-disabled").get(),l=await s.loadNetworkResource(n,r,{disableCache:o,includeCredentials:!0});try{const e=l.stream?await i.readToString(l.stream):"";return{success:l.success,content:e,errorDescription:{statusCode:l.httpStatusCode||0,netError:l.netError,netErrorName:l.netErrorName,message:a.ResourceLoader.netErrorToMessage(l.netError,l.httpStatusCode,l.netErrorName)||"",urlValid:void 0}}}finally{l.stream&&i.close(l.stream)}}}function rr(){return e.Settings.Settings.instance().createSetting("load-through-target",!0)}var sr=Object.freeze({__proto__:null,PageResourceLoader:nr,ResourceKey:class{key;constructor(e){this.key=e}},getLoadThroughTargetSetting:rr});function ir(e,t){return e.line-t.line||e.column-t.column}function or(e,t={line:0,column:0}){if(!e.originalScopes||void 0===e.generatedRanges)throw new Error('Cant decode scopes without "originalScopes" or "generatedRanges"');const n=ar(e.originalScopes,e.names??[]);return{originalScopes:n.map((e=>e.root)),generatedRanges:dr(e.generatedRanges,n,e.names??[],t)}}function ar(e,t){return e.map((e=>function(e,t){const n=new Map,r=[];let s=0,i=0;for(const[o,a]of function*(e){const t=new Er(e);let n=0,r=0;for(;t.hasNext();){","===t.peek()&&t.next();const[e,s]=[t.nextVLQ(),t.nextVLQ()];if(0===e&&st[e])),h={start:{line:s,column:e},end:{line:s,column:e},kind:l,name:d,isStackFrame:Boolean(4&a.flags),variables:c,children:[]};r.push(h),n.set(o,h)}else{const t=r.pop();if(!t)throw new Error('Scope items not nested properly: encountered "end" item without "start" item');if(t.end={line:s,column:e},0===r.length)return{root:t,scopeForItemIndex:n};t.parent=r[r.length-1],r[r.length-1].children.push(t)}}throw new Error("Malformed original scope encoding")}(e,t)))}function lr(e){return"flags"in e}function dr(e,t,n,r={line:0,column:0}){const s=[{start:{line:0,column:0},end:{line:0,column:0},isStackFrame:!1,isHidden:!1,children:[],values:[]}],i=new Map;for(const o of function*(e,t){const n=new Er(e);let r=t.line;const s={line:t.line,column:t.column,defSourceIdx:0,defScopeIdx:0,callsiteSourceIdx:0,callsiteLine:0,callsiteColumn:0};for(;n.hasNext();){if(";"===n.peek()){n.next(),++r;continue}if(","===n.peek()){n.next();continue}if(s.column=n.nextVLQ()+(r===s.line?s.column:0),s.line=r,null===n.peekVLQ()){yield{line:r,column:s.column};continue}const e={line:r,column:s.column,flags:n.nextVLQ(),bindings:[]};if(1&e.flags){const t=n.nextVLQ(),r=n.nextVLQ();s.defScopeIdx=r+(0===t?s.defScopeIdx:0),s.defSourceIdx+=t,e.definition={sourceIdx:s.defSourceIdx,scopeIdx:s.defScopeIdx}}if(2&e.flags){const t=n.nextVLQ(),r=n.nextVLQ(),i=n.nextVLQ();s.callsiteColumn=i+(0===r&&0===t?s.callsiteColumn:0),s.callsiteLine=r+(0===t?s.callsiteLine:0),s.callsiteSourceIdx+=t,e.callsite={sourceIdx:s.callsiteSourceIdx,line:s.callsiteLine,column:s.callsiteColumn}}for(;n.hasNext()&&";"!==n.peek()&&","!==n.peek();){const t=[];e.bindings.push(t);const r=n.nextVLQ();if(r>=-1){t.push({line:e.line,column:e.column,nameIdx:r});continue}t.push({line:e.line,column:e.column,nameIdx:n.nextVLQ()});const s=-r;for(let e=0;e{if(1===n.length)return ur(n[0].nameIdx,t);const r=n.map((e=>({from:{line:e.line,column:e.column},to:{line:e.line,column:e.column},value:ur(e.nameIdx,t)})));for(let e=1;e=0)throw new Error(`Invalid range. End before start: ${JSON.stringify(t)}`)}(e),e.sort(((e,t)=>ir(e.start,t.start)||ir(t.end,e.end)));const t={start:{line:0,column:0},end:{line:Number.POSITIVE_INFINITY,column:Number.POSITIVE_INFINITY},kind:"Global",isStackFrame:!1,children:[],variables:[]},n=[t];for(const t of e){let e=n.at(-1);for(;ir(e.end,t.start)<=0;)n.pop(),e=n.at(-1);if(ir(t.start,e.end)<0&&ir(e.end,t.end)<0)throw new Error(`Range ${JSON.stringify(t)} and ${JSON.stringify(e)} partially overlap.`);const r=mr(t);e.children.push(r),n.push(r)}const r=t.children.at(-1);return r&&(t.end=r.end),t}function mr(e){return{...e,kind:"Function",isStackFrame:!0,children:[],variables:[]}}function fr(e,t){const n=[];let r=0,s=0,i=0,o=0,a=0;const l=new Er(e);let d=!0;for(;l.hasNext();){if(d)d=!1;else{if(","!==l.peek())break;l.next()}r+=l.nextVLQ(),s=o+l.nextVLQ(),i+=l.nextVLQ(),o=s+l.nextVLQ(),a+=l.nextVLQ();const e=t[r];void 0!==e&&n.push({start:{line:s,column:i},end:{line:o,column:a},name:e})}return n}var br=Object.freeze({__proto__:null,buildOriginalScopes:pr,decodePastaRanges:fr});const yr={local:"Local",closure:"Closure",block:"Block",global:"Global",returnValue:"Return value"},vr=n.i18n.registerUIStrings("core/sdk/SourceMapScopeChainEntry.ts",yr),Ir=n.i18n.getLocalizedString.bind(void 0,vr);class wr{#In;#wn;#Pe;#Sn;#kn;constructor(e,t,n,r,s){this.#In=e,this.#wn=t,this.#Pe=n,this.#Sn=r,this.#kn=s}extraProperties(){return this.#kn?[new qn(Ir(yr.returnValue),this.#kn,void 0,void 0,void 0,void 0,void 0,!0)]:[]}callFrame(){return this.#In}type(){switch(this.#wn.kind){case"global":return"global";case"function":return this.#Sn?"local":"closure";case"block":return"block"}return this.#wn.kind??""}typeName(){switch(this.#wn.kind){case"global":return Ir(yr.global);case"function":return this.#Sn?Ir(yr.local):Ir(yr.closure);case"block":return Ir(yr.block)}return this.#wn.kind??""}name(){return this.#wn.name}range(){return null}object(){return new Sr(this.#In,this.#wn,this.#Pe)}description(){return""}icon(){}}class Sr extends _n{#In;#wn;#Pe;constructor(e,t,n){super(e.debuggerModel.runtimeModel(),void 0,"object",void 0,null),this.#In=e,this.#wn=t,this.#Pe=n}async doGetProperties(e,t,n){if(t)return{properties:[],internalProperties:[]};const r=[];for(const[e,t]of this.#wn.variables.entries()){const s=this.#Cn(e);if(null===s){r.push(Sr.#xn(t));continue}const i=await this.#In.evaluate({expression:s,generatePreview:n});"error"in i||i.exceptionDetails?r.push(Sr.#xn(t)):r.push(new qn(t,i.object,!1,!1,!0,!1))}return{properties:r,internalProperties:[]}}#Cn(e){if(!this.#Pe)return null;const t=this.#Pe.values[e];if("string"==typeof t)return t;if(void 0===t)return null;const n=this.#In.location();for(const e of t)if(xr({start:e.from,end:e.to},n.lineNumber,n.columnNumber))return e.value??null;return null}static#xn(e){return new qn(e,null,!1,!1,!0,!1)}}var kr=Object.freeze({__proto__:null,SourceMapScopeChainEntry:wr});class Cr{#Rn;#Tn;#Mn;#Pn=null;constructor(e,t,n){this.#Rn=e,this.#Tn=t,this.#Mn=n}addOriginalScopes(e){for(const t of e)this.#Tn.push(t)}addGeneratedRanges(e){for(const t of e)this.#Mn.push(t)}hasOriginalScopes(e){return Boolean(this.#Tn[e])}addOriginalScopesAtIndex(e,t){if(this.#Tn[e])throw new Error(`Trying to re-augment existing scopes for source at index: ${e}`);this.#Tn[e]=t}findInlinedFunctions(e,t){const n=this.#En(e,t),r={inlinedFunctions:[],originalFunctionName:""};for(let e=n.length-1;e>=0;--e){const t=n[e];if(t.callsite&&r.inlinedFunctions.push({name:t.originalScope?.name??"",callsite:t.callsite}),t.isStackFrame){r.originalFunctionName=t.originalScope?.name??"";break}}return r}expandCallFrame(e){const{originalFunctionName:t,inlinedFunctions:n}=this.findInlinedFunctions(e.location().lineNumber,e.location().columnNumber),r=[];for(const[t,s]of n.entries())r.push(e.createVirtualCallFrame(t,s.name));return r.push(e.createVirtualCallFrame(r.length,t)),r}#En(e,t){const n=[];return function r(s){for(const i of s)xr(i,e,t)&&(n.push(i),r(i.children))}(this.#Mn),n}hasVariablesAndBindings(){return null===this.#Pn&&(this.#Pn=this.#Ln()),this.#Pn}#Ln(){function e(t){for(const n of t)if(n){if("variables"in n&&n.variables.length>0)return!0;if("values"in n&&n.values.some((e=>void 0!==e)))return!0;if(e(n.children))return!0}return!1}return e(this.#Tn)&&e(this.#Mn)}resolveMappedScopeChain(e){const t=this.#An(e),n=t.at(-1)?.originalScope;if(void 0===n)return null;let r=!1;const s=[];for(let n=t.at(-1)?.originalScope;n;n=n.parent){const i=t.findLast((e=>e.originalScope===n)),o="function"===n.kind,a=o&&!r,l=a?e.returnValue():null;s.push(new wr(e,n,i,a,l??void 0)),r||=o}if(null!==e.returnValue())for(;s.length&&"local"!==s[0].type();)s.shift();return s}#An(e){const t=this.#En(e.location().lineNumber,e.location().columnNumber);if(0===e.inlineFrameIndex)return t;for(let n=0;n0){const r=this.#En(e,t);n=r.at(-1)?.originalScope}else{const r=this.#Rn.findEntry(e,t);if(void 0===r?.sourceIndex)return null;n=this.#On({sourceIndex:r.sourceIndex,line:r.sourceLineNumber,column:r.sourceColumnNumber}).at(-1)}for(let e=n;e;e=e.parent)if(e.isStackFrame)return e.name??"";return null}#On({sourceIndex:e,line:t,column:n}){const r=this.#Tn[e];if(!r)return[];const s=[];return function e(r){for(const i of r)xr(i,t,n)&&(s.push(i),e(i.children))}([r]),s}}function xr(e,t,n){return!(e.start.line>t||e.start.line===t&&e.start.column>n)&&!(e.end.line"url"in e))&&e.Console.Console.instance().warn(`SourceMap "${n}" contains unsupported "URL" field in one of its sections.`),this.eachSection(this.parseSources.bind(this))}json(){return this.#Dn}augmentWithScopes(e,t){if(this.#zn(),this.#Dn&&this.#Dn.version>3)throw new Error("Only support augmenting source maps up to version 3.");const n=this.#jn(e);if(!(n>=0))throw new Error(`Could not find sourceURL ${e} in sourceMap`);if(this.#qn||(this.#qn=new Cr(this,[],[])),!this.#qn.hasOriginalScopes(n)){const e=pr(t);this.#qn.addOriginalScopesAtIndex(n,e)}}#jn(e){return this.#Hn.findIndex((t=>t.sourceURL===e))}compiledURL(){return this.#Nn}url(){return this.#Fn}sourceURLs(){return[...this.#Un.keys()]}embeddedContentByURL(e){const t=this.#Un.get(e);return t?t.content:null}hasScopeInfo(){return this.#zn(),null!==this.#qn}findEntry(e,t,n){if(this.#zn(),n&&null!==this.#qn){const{inlinedFunctions:r}=this.#qn.findInlinedFunctions(e,t),{callsite:s}=r[n-1];return s?{lineNumber:e,columnNumber:t,sourceIndex:s.sourceIndex,sourceURL:this.sourceURLs()[s.sourceIndex],sourceLineNumber:s.line,sourceColumnNumber:s.column,name:void 0}:(console.error("Malformed source map. Expected to have a callsite info for index",n),null)}const s=this.mappings(),i=r.ArrayUtilities.upperBound(s,void 0,((n,r)=>e-r.lineNumber||t-r.columnNumber));return i?s[i-1]:null}findEntryRanges(e,n){const s=this.mappings(),i=r.ArrayUtilities.upperBound(s,void 0,((t,r)=>e-r.lineNumber||n-r.columnNumber));if(!i)return null;const o=i-1,a=s[o].sourceURL;if(!a)return null;const l=iu-s[t].sourceLineNumber||g-s[t].sourceColumnNumber));if(!p)return null;const m=p=i.length||s[i[o]].sourceLineNumber!==t)return null;const l=i.slice(o,a);if(!l.length)return null;const d=r.ArrayUtilities.lowerBound(l,n,((e,t)=>e-s[t].sourceColumnNumber));return d>=l.length?s[l[l.length-1]]:s[l[d]];function c(e,t){return e-s[t].sourceLineNumber}}findReverseIndices(e,t,n){const s=this.mappings(),i=this.reversedMappings(e),o=r.ArrayUtilities.upperBound(i,void 0,((e,r)=>t-s[r].sourceLineNumber||n-s[r].sourceColumnNumber));let a=o;for(;a>0&&s[i[a-1]].sourceLineNumber===s[i[o-1]].sourceLineNumber&&s[i[a-1]].sourceColumnNumber===s[i[o-1]].sourceColumnNumber;)--a;return i.slice(a,o)}findReverseEntries(e,t,n){const r=this.mappings();return this.findReverseIndices(e,t,n).map((e=>r[e]))}findReverseRanges(e,n,r){const s=this.mappings(),i=this.findReverseIndices(e,n,r),o=[];for(let e=0;e{if(!e)return;return pr(fr(e,n))}))}isSeparator(e){return","===e||";"===e}reverseMapTextRanges(e,n){const s=this.reversedMappings(e),i=this.mappings();if(0===s.length)return[];let o=r.ArrayUtilities.lowerBound(s,n,(({startLine:e,startColumn:t},n)=>{const{sourceLineNumber:r,sourceColumnNumber:s}=i[n];return e-r||t-s}));for(;o===s.length||o>0&&(i[s[o]].sourceLineNumber>n.startLine||i[s[o]].sourceColumnNumber>n.startColumn);)o--;let a=o+1;for(;a0){const t=e[0];return 0===t?.lineNumber||0===t.columnNumber}return!1}hasIgnoreListHint(e){return this.#Un.get(e)?.ignoreListHint??!1}findRanges(e,n){const r=this.mappings(),s=[];if(!r.length)return[];let i=null;0===r[0].lineNumber&&0===r[0].columnNumber||!n?.isStartMatching||(i=t.TextRange.TextRange.createUnboundedFromLocation(0,0),s.push(i));for(const{sourceURL:n,lineNumber:o,columnNumber:a}of r){const r=n&&e(n);i||!r?i&&!r&&(i.endLine=o,i.endColumn=a,i=null):(i=t.TextRange.TextRange.createUnboundedFromLocation(o,a),s.push(i))}return s}compatibleForURL(e,t){return this.embeddedContentByURL(e)===t.embeddedContentByURL(e)&&this.hasIgnoreListHint(e)===t.hasIgnoreListHint(e)}expandCallFrame(e){return this.#zn(),null===this.#qn?[e]:this.#qn.expandCallFrame(e)}resolveScopeChain(e){return this.#zn(),null===this.#qn?null:this.#qn.resolveMappedScopeChain(e)}findOriginalFunctionName(e){return this.#zn(),this.#qn?.findOriginalFunctionName(e)??null}}class Er{#Wn;#Gn;constructor(e){this.#Wn=e,this.#Gn=0}next(){return this.#Wn.charAt(this.#Gn++)}nextCharCode(){return this.#Wn.charCodeAt(this.#Gn++)}peek(){return this.#Wn.charAt(this.#Gn)}hasNext(){return this.#Gn>=1,s?-t:t}peekVLQ(){const e=this.#Gn;try{return this.nextVLQ()}catch{return null}finally{this.#Gn=e}}}var Lr,Ar=Object.freeze({__proto__:null,SourceMap:Pr,SourceMapEntry:Mr,TokenIterator:Er,parseSourceMap:Tr});class Or extends e.ObjectWrapper.ObjectWrapper{#Kn;#Qn=!0;#$n=new Map;#Xn=new Map;#Jn=null;constructor(e){super(),this.#Kn=e}setEnabled(e){if(e===this.#Qn)return;const t=[...this.#$n.entries()];for(const[e]of t)this.detachSourceMap(e);this.#Qn=e;for(const[e,{relativeSourceURL:n,relativeSourceMapURL:r}]of t)this.attachSourceMap(e,n,r)}static getBaseUrl(e){for(;e&&e.type()!==U.FRAME;)e=e.parentTarget();return e?.inspectedURL()??r.DevToolsPath.EmptyUrlString}static resolveRelativeSourceURL(t,n){return n=e.ParsedURL.ParsedURL.completeURL(Or.getBaseUrl(t),n)??n}sourceMapForClient(e){return this.#$n.get(e)?.sourceMap}sourceMapForClientPromise(e){const t=this.#$n.get(e);return t?t.sourceMapPromise:Promise.resolve(void 0)}clientForSourceMap(e){return this.#Xn.get(e)}attachSourceMap(t,n,r){if(this.#$n.has(t))throw new Error("SourceMap is already attached or being attached to client");if(!r)return;let s={relativeSourceURL:n,relativeSourceMapURL:r,sourceMap:void 0,sourceMapPromise:Promise.resolve(void 0)};if(this.#Qn){const i=Or.resolveRelativeSourceURL(this.#Kn,n),o=e.ParsedURL.ParsedURL.completeURL(i,r);if(o)if(this.#Jn&&console.error("Attaching source map may cancel previously attaching source map"),this.#Jn=t,this.dispatchEventToListeners(Lr.SourceMapWillAttach,{client:t}),this.#Jn===t){this.#Jn=null;const e=t.createPageResourceLoadInitiator();s.sourceMapPromise=Dr(o,e).then((e=>{const n=new Pr(i,o,e);return this.#$n.get(t)===s&&(s.sourceMap=n,this.#Xn.set(n,t),this.dispatchEventToListeners(Lr.SourceMapAttached,{client:t,sourceMap:n})),n}),(()=>{this.#$n.get(t)===s&&this.dispatchEventToListeners(Lr.SourceMapFailedToAttach,{client:t})}))}else this.#Jn&&console.error("Cancelling source map attach because another source map is attaching"),s=null,this.dispatchEventToListeners(Lr.SourceMapFailedToAttach,{client:t})}s&&this.#$n.set(t,s)}cancelAttachSourceMap(e){e===this.#Jn?this.#Jn=null:this.#Jn?console.error("cancel attach source map requested but a different source map was being attached"):console.error("cancel attach source map requested but no source map was being attached")}detachSourceMap(e){const t=this.#$n.get(e);if(!t)return;if(this.#$n.delete(e),!this.#Qn)return;const{sourceMap:n}=t;n?(this.#Xn.delete(n),this.dispatchEventToListeners(Lr.SourceMapDetached,{client:e,sourceMap:n})):this.dispatchEventToListeners(Lr.SourceMapFailedToAttach,{client:e})}}async function Dr(e,t){try{const{content:n}=await nr.instance().loadResource(e,t);return Tr(n)}catch(t){throw new Error(`Could not load content for ${e}: ${t.message}`,{cause:t})}}!function(e){e.SourceMapWillAttach="SourceMapWillAttach",e.SourceMapFailedToAttach="SourceMapFailedToAttach",e.SourceMapAttached="SourceMapAttached",e.SourceMapDetached="SourceMapDetached"}(Lr||(Lr={}));var Nr,Fr=Object.freeze({__proto__:null,get Events(){return Lr},SourceMapManager:Or,loadSourceMap:Dr,tryLoadSourceMap:async function(e,t){try{const{content:n}=await nr.instance().loadResource(e,t);return Tr(n)}catch(t){return console.error(`Could not load content for ${e}: ${t.message}`,{cause:t}),null}}});class Br extends h{agent;#Yn;#Zn=new Map;#er=new Map;#tr;#nr;#rr;#sr=new e.Throttler.Throttler(Wr);#ir=new Map;#or=new Map;#ar=null;#lr=null;#dr=null;#cr=!1;#Qn=!1;#hr=!1;#ur=!1;#gr;constructor(t){super(t),this.#Yn=t.model(Gs),this.#nr=new Or(t),this.agent=t.cssAgent(),this.#rr=new zr(this),this.#tr=t.model(ii),this.#tr&&this.#tr.addEventListener(ri.PrimaryPageChanged,this.onPrimaryPageChanged,this),t.registerCSSDispatcher(new qr(this)),t.suspended()||this.enable(),this.#nr.setEnabled(e.Settings.Settings.instance().moduleSetting("css-source-maps-enabled").get()),e.Settings.Settings.instance().moduleSetting("css-source-maps-enabled").addChangeListener((e=>this.#nr.setEnabled(e.data)))}async colorScheme(){if(!this.#gr){const e=await(this.domModel()?.target().runtimeAgent().invoke_evaluate({expression:'window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches'}));!e||e.exceptionDetails||e.getError()||(this.#gr=e.result.value?"dark":"light")}return this.#gr}async resolveValues(e,...t){const n=await this.agent.invoke_resolveValues({values:t,nodeId:e});return n.getError()?null:n.results}headersForSourceURL(e){const t=[];for(const n of this.getStyleSheetIdsForURL(e)){const e=this.styleSheetHeaderForId(n);e&&t.push(e)}return t}createRawLocationsByURL(e,t,n=0){const s=this.headersForSourceURL(e);s.sort((function(e,t){return e.startLine-t.startLine||e.startColumn-t.startColumn||e.id.localeCompare(t.id)}));const i=r.ArrayUtilities.upperBound(s,void 0,((e,r)=>t-r.startLine||n-r.startColumn));if(!i)return[];const o=[],a=s[i-1];for(let e=i-1;e>=0&&s[e].startLine===a.startLine&&s[e].startColumn===a.startColumn;--e)s[e].containsLocation(t,n)&&o.push(new Ur(s[e],t,n));return o}sourceMapManager(){return this.#nr}static readableLayerName(e){return e||""}static trimSourceURL(e){let t=e.lastIndexOf("/*# sourceURL=");if(-1===t&&(t=e.lastIndexOf("/*@ sourceURL="),-1===t))return e;const n=e.lastIndexOf("\n",t);if(-1===n)return e;const r=e.substr(n+1).split("\n",1)[0];return-1===r.search(/[\x20\t]*\/\*[#@] sourceURL=[\x20\t]*([^\s]*)[\x20\t]*\*\/[\x20\t]*$/)?e:e.substr(0,n)+e.substr(n+r.length+1)}domModel(){return this.#Yn}async trackComputedStyleUpdatesForNode(e){await this.agent.invoke_trackComputedStyleUpdatesForNode({nodeId:e})}async setStyleText(e,t,n,r){try{await this.ensureOriginalStyleSheetText(e);const{styles:s}=await this.agent.invoke_setStyleTexts({edits:[{styleSheetId:e,range:t.serializeToObject(),text:n}]});if(!s||1!==s.length)return!1;this.#Yn.markUndoableState(!r);const i=new Hr(e,t,n,s[0]);return this.fireStyleSheetChanged(e,i),!0}catch(e){return console.error(e),!1}}async setSelectorText(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{selectorList:r}=await this.agent.invoke_setRuleSelector({styleSheetId:e,range:t,selector:n});if(!r)return!1;this.#Yn.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async setPropertyRulePropertyName(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{propertyName:r}=await this.agent.invoke_setPropertyRulePropertyName({styleSheetId:e,range:t,propertyName:n});if(!r)return!1;this.#Yn.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async setKeyframeKey(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{keyText:r}=await this.agent.invoke_setKeyframeKey({styleSheetId:e,range:t,keyText:n});if(!r)return!1;this.#Yn.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}startCoverage(){return this.#hr=!0,this.agent.invoke_startRuleUsageTracking()}async takeCoverageDelta(){const e=await this.agent.invoke_takeCoverageDelta();return{timestamp:e?.timestamp||0,coverage:e?.coverage||[]}}setLocalFontsEnabled(e){return this.agent.invoke_setLocalFontsEnabled({enabled:e})}async stopCoverage(){this.#hr=!1,await this.agent.invoke_stopRuleUsageTracking()}async getMediaQueries(){const{medias:e}=await this.agent.invoke_getMediaQueries();return e?$t.parseMediaArrayPayload(this,e):[]}async getRootLayer(e){const{rootLayer:t}=await this.agent.invoke_getLayersForNode({nodeId:e});return t}isEnabled(){return this.#Qn}async enable(){await this.agent.invoke_enable(),this.#Qn=!0,this.#hr&&await this.startCoverage(),this.dispatchEventToListeners(Nr.ModelWasEnabled)}async getAnimatedStylesForNode(e){const t=await this.agent.invoke_getAnimatedStylesForNode({nodeId:e});return t.getError()?null:t}async getMatchedStyles(e){const t=this.#Yn.nodeForId(e);if(!t)return null;const n=o.Runtime.hostConfig.devToolsAnimationStylesInStylesTab?.enabled,[r,s]=await Promise.all([this.agent.invoke_getMatchedStylesForNode({nodeId:e}),n?this.agent.invoke_getAnimatedStylesForNode({nodeId:e}):void 0]);if(r.getError())return null;const i={cssModel:this,node:t,inlinePayload:r.inlineStyle||null,attributesPayload:r.attributesStyle||null,matchedPayload:r.matchedCSSRules||[],pseudoPayload:r.pseudoElements||[],inheritedPayload:r.inherited||[],inheritedPseudoPayload:r.inheritedPseudoElements||[],animationsPayload:r.cssKeyframesRules||[],parentLayoutNodeId:r.parentLayoutNodeId,positionTryRules:r.cssPositionTryRules||[],propertyRules:r.cssPropertyRules??[],functionRules:r.cssFunctionRules??[],cssPropertyRegistrations:r.cssPropertyRegistrations??[],fontPaletteValuesRule:r.cssFontPaletteValuesRule,activePositionFallbackIndex:r.activePositionFallbackIndex??-1,animationStylesPayload:s?.animationStyles||[],inheritedAnimatedPayload:s?.inherited||[],transitionsStylePayload:s?.transitionsStyle||null};return await In.create(i)}async getClassNames(e){const{classNames:t}=await this.agent.invoke_collectClassNames({styleSheetId:e});return t||[]}async getComputedStyle(e){return this.isEnabled()||await this.enable(),await this.#rr.computedStylePromise(e)}async getLayoutPropertiesFromComputedStyle(e){const t=await this.getComputedStyle(e);if(!t)return null;const n=t.get("display"),r="flex"===n||"inline-flex"===n,s="grid"===n||"inline-grid"===n,i=(s&&(t.get("grid-template-columns")?.startsWith("subgrid")||t.get("grid-template-rows")?.startsWith("subgrid")))??!1,o=t.get("container-type");return{isFlex:r,isGrid:s,isSubgrid:i,isContainer:Boolean(o)&&""!==o&&"normal"!==o,hasScroll:Boolean(t.get("scroll-snap-type"))&&"none"!==t.get("scroll-snap-type")}}async getBackgroundColors(e){const t=await this.agent.invoke_getBackgroundColors({nodeId:e});return t.getError()?null:{backgroundColors:t.backgroundColors||null,computedFontSize:t.computedFontSize||"",computedFontWeight:t.computedFontWeight||""}}async getPlatformFonts(e){const{fonts:t}=await this.agent.invoke_getPlatformFontsForNode({nodeId:e});return t}allStyleSheets(){const e=[...this.#or.values()];return e.sort((function(e,t){return e.sourceURLt.sourceURL?1:e.startLine-t.startLine||e.startColumn-t.startColumn})),e}async getInlineStyles(e){const t=await this.agent.invoke_getInlineStylesForNode({nodeId:e});if(t.getError()||!t.inlineStyle)return null;const n=new en(this,null,t.inlineStyle,Yt.Inline),r=t.attributesStyle?new en(this,null,t.attributesStyle,Yt.Attributes):null;return new jr(n,r)}forcePseudoState(e,t,n){const s=e.marker(_r)||[],i=s.includes(t);if(n){if(i)return!1;s.push(t),e.setMarker(_r,s)}else{if(!i)return!1;r.ArrayUtilities.removeElement(s,t),s.length?e.setMarker(_r,s):e.setMarker(_r,null)}return void 0!==e.id&&(this.agent.invoke_forcePseudoState({nodeId:e.id,forcedPseudoClasses:s}),this.dispatchEventToListeners(Nr.PseudoStateForced,{node:e,pseudoClass:t,enable:n}),!0)}pseudoState(e){return e.marker(_r)||[]}async setMediaText(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{media:r}=await this.agent.invoke_setMediaText({styleSheetId:e,range:t,text:n});if(!r)return!1;this.#Yn.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async setContainerQueryText(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{containerQuery:r}=await this.agent.invoke_setContainerQueryText({styleSheetId:e,range:t,text:n});if(!r)return!1;this.#Yn.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async setSupportsText(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{supports:r}=await this.agent.invoke_setSupportsText({styleSheetId:e,range:t,text:n});if(!r)return!1;this.#Yn.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async setScopeText(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{scope:r}=await this.agent.invoke_setScopeText({styleSheetId:e,range:t,text:n});if(!r)return!1;this.#Yn.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async addRule(e,t,n){try{await this.ensureOriginalStyleSheetText(e);const{rule:r}=await this.agent.invoke_addRule({styleSheetId:e,ruleText:t,location:n});if(!r)return null;this.#Yn.markUndoableState();const s=new Hr(e,n,t,r);return this.fireStyleSheetChanged(e,s),new an(this,r)}catch(e){return console.error(e),null}}async requestViaInspectorStylesheet(e){const t=e||(this.#tr&&this.#tr.mainFrame?this.#tr.mainFrame.id:null),n=[...this.#or.values()].find((e=>e.frameId===t&&e.isViaInspector()));if(n)return n;if(!t)return null;try{return await this.createInspectorStylesheet(t)}catch(e){return console.error(e),null}}async createInspectorStylesheet(e,t=!1){const n=await this.agent.invoke_createStyleSheet({frameId:e,force:t});if(n.getError())throw new Error(n.getError());return this.#or.get(n.styleSheetId)||null}mediaQueryResultChanged(){this.#gr=void 0,this.dispatchEventToListeners(Nr.MediaQueryResultChanged)}fontsUpdated(e){e&&this.#Zn.set(e.src,new pe(e)),this.dispatchEventToListeners(Nr.FontsUpdated)}fontFaces(){return[...this.#Zn.values()]}fontFaceForSource(e){return this.#Zn.get(e)}styleSheetHeaderForId(e){return this.#or.get(e)||null}styleSheetHeaders(){return[...this.#or.values()]}fireStyleSheetChanged(e,t){this.dispatchEventToListeners(Nr.StyleSheetChanged,{styleSheetId:e,edit:t})}ensureOriginalStyleSheetText(e){const t=this.styleSheetHeaderForId(e);if(!t)return Promise.resolve(null);let n=this.#er.get(t);return n||(n=this.getStyleSheetText(t.id),this.#er.set(t,n),this.originalContentRequestedForTest(t)),n}originalContentRequestedForTest(e){}originalStyleSheetText(e){return this.ensureOriginalStyleSheetText(e.id)}getAllStyleSheetHeaders(){return this.#or.values()}computedStyleUpdated(e){this.dispatchEventToListeners(Nr.ComputedStyleUpdated,{nodeId:e})}styleSheetAdded(e){console.assert(!this.#or.get(e.styleSheetId)),e.loadingFailed&&(e.hasSourceURL=!1,e.isConstructed=!0,e.isInline=!1,e.isMutable=!1,e.sourceURL="",e.sourceMapURL=void 0);const t=new An(this,e);this.#or.set(e.styleSheetId,t);const n=t.resourceURL();let r=this.#ir.get(n);if(r||(r=new Map,this.#ir.set(n,r)),r){let e=r.get(t.frameId);e||(e=new Set,r.set(t.frameId,e)),e.add(t.id)}this.#nr.attachSourceMap(t,t.sourceURL,t.sourceMapURL),this.dispatchEventToListeners(Nr.StyleSheetAdded,t)}styleSheetRemoved(e){const t=this.#or.get(e);if(console.assert(Boolean(t)),!t)return;this.#or.delete(e);const n=t.resourceURL(),r=this.#ir.get(n);if(console.assert(Boolean(r),"No frameId to styleSheetId map is available for given style sheet URL."),r){const s=r.get(t.frameId);s&&(s.delete(e),s.size||(r.delete(t.frameId),r.size||this.#ir.delete(n)))}this.#er.delete(t),this.#nr.detachSourceMap(t),this.dispatchEventToListeners(Nr.StyleSheetRemoved,t)}getStyleSheetIdsForURL(e){const t=this.#ir.get(e);if(!t)return[];const n=[];for(const e of t.values())n.push(...e);return n}async setStyleSheetText(e,t,n){const r=this.#or.get(e);if(!r)return"Unknown stylesheet in CSS.setStyleSheetText";t=Br.trimSourceURL(t),r.hasSourceURL&&(t+="\n/*# sourceURL="+r.sourceURL+" */"),await this.ensureOriginalStyleSheetText(e);const s=(await this.agent.invoke_setStyleSheetText({styleSheetId:r.id,text:t})).sourceMapURL;return this.#nr.detachSourceMap(r),r.setSourceMapURL(s),this.#nr.attachSourceMap(r,r.sourceURL,r.sourceMapURL),null===s?"Error in CSS.setStyleSheetText":(this.#Yn.markUndoableState(!n),this.fireStyleSheetChanged(e),null)}async getStyleSheetText(e){const t=await this.agent.invoke_getStyleSheetText({styleSheetId:e});if(t.getError())return null;const{text:n}=t;return n&&Br.trimSourceURL(n)}async onPrimaryPageChanged(e){e.data.frame.backForwardCacheDetails.restoredFromCache?(await this.suspendModel(),await this.resumeModel()):"Activation"!==e.data.type&&(this.resetStyleSheets(),this.resetFontFaces())}resetStyleSheets(){const e=[...this.#or.values()];this.#ir.clear(),this.#or.clear();for(const t of e)this.#nr.detachSourceMap(t),this.dispatchEventToListeners(Nr.StyleSheetRemoved,t)}resetFontFaces(){this.#Zn.clear()}async suspendModel(){this.#Qn=!1,await this.agent.invoke_disable(),this.resetStyleSheets(),this.resetFontFaces()}async resumeModel(){return await this.enable()}setEffectivePropertyValueForNode(e,t,n){this.agent.invoke_setEffectivePropertyValueForNode({nodeId:e,propertyName:t,value:n})}cachedMatchedCascadeForNode(e){if(this.#ar!==e&&this.discardCachedMatchedCascade(),this.#ar=e,!this.#lr){if(!e.id)return Promise.resolve(null);this.#lr=this.getMatchedStyles(e.id)}return this.#lr}discardCachedMatchedCascade(){this.#ar=null,this.#lr=null}createCSSPropertyTracker(e){return new Vr(this,e)}enableCSSPropertyTracker(e){const t=e.getTrackedProperties();0!==t.length&&(this.agent.invoke_trackComputedStyleUpdates({propertiesToTrack:t}),this.#cr=!0,this.#dr=e,this.pollComputedStyleUpdates())}disableCSSPropertyTracker(){this.#cr=!1,this.#dr=null,this.agent.invoke_trackComputedStyleUpdates({propertiesToTrack:[]})}async pollComputedStyleUpdates(){if(!this.#ur){if(this.#cr){this.#ur=!0;const e=await this.agent.invoke_takeComputedStyleUpdates();if(this.#ur=!1,e.getError()||!e.nodeIds||!this.#cr)return;this.#dr&&this.#dr.dispatchEventToListeners("TrackedCSSPropertiesUpdated",e.nodeIds.map((e=>this.#Yn.nodeForId(e))))}this.#cr&&this.#sr.schedule(this.pollComputedStyleUpdates.bind(this))}}dispose(){this.disableCSSPropertyTracker(),super.dispose(),this.dispatchEventToListeners(Nr.ModelDisposed,this)}getAgent(){return this.agent}}!function(e){e.FontsUpdated="FontsUpdated",e.MediaQueryResultChanged="MediaQueryResultChanged",e.ModelWasEnabled="ModelWasEnabled",e.ModelDisposed="ModelDisposed",e.PseudoStateForced="PseudoStateForced",e.StyleSheetAdded="StyleSheetAdded",e.StyleSheetChanged="StyleSheetChanged",e.StyleSheetRemoved="StyleSheetRemoved",e.ComputedStyleUpdated="ComputedStyleUpdated"}(Nr||(Nr={}));const _r="pseudo-state-marker";class Hr{styleSheetId;oldRange;newRange;newText;payload;constructor(e,n,r,s){this.styleSheetId=e,this.oldRange=n,this.newRange=t.TextRange.TextRange.fromEdit(n,r),this.newText=r,this.payload=s}}class Ur{#je;styleSheetId;url;lineNumber;columnNumber;constructor(e,t,n){this.#je=e.cssModel(),this.styleSheetId=e.id,this.url=e.resourceURL(),this.lineNumber=t,this.columnNumber=n||0}cssModel(){return this.#je}header(){return this.#je.styleSheetHeaderForId(this.styleSheetId)}}class qr{#lt;constructor(e){this.#lt=e}mediaQueryResultChanged(){this.#lt.mediaQueryResultChanged()}fontsUpdated({font:e}){this.#lt.fontsUpdated(e)}styleSheetChanged({styleSheetId:e}){this.#lt.fireStyleSheetChanged(e)}styleSheetAdded({header:e}){this.#lt.styleSheetAdded(e)}styleSheetRemoved({styleSheetId:e}){this.#lt.styleSheetRemoved(e)}computedStyleUpdated({nodeId:e}){this.#lt.computedStyleUpdated(e)}}class zr{#lt;#pr=new Map;constructor(e){this.#lt=e}computedStylePromise(e){let t=this.#pr.get(e);return t||(t=this.#lt.getAgent().invoke_getComputedStyleForNode({nodeId:e}).then((({computedStyle:t})=>{if(this.#pr.delete(e),!t?.length)return null;const n=new Map;for(const e of t)n.set(e.name,e.value);return n})),this.#pr.set(e,t),t)}}class jr{inlineStyle;attributesStyle;constructor(e,t){this.inlineStyle=e,this.attributesStyle=t}}class Vr extends e.ObjectWrapper.ObjectWrapper{#lt;#mr;constructor(e,t){super(),this.#lt=e,this.#mr=t}start(){this.#lt.enableCSSPropertyTracker(this)}stop(){this.#lt.disableCSSPropertyTracker()}getTrackedProperties(){return this.#mr}}const Wr=1e3;h.register(Br,{capabilities:2,autostart:!0});var Gr=Object.freeze({__proto__:null,CSSLocation:Ur,CSSModel:Br,CSSPropertyTracker:Vr,Edit:Hr,get Events(){return Nr},InlineStyleResult:jr});class Kr extends h{#fr;#br;#yr;#vr;constructor(e){super(e),e.registerHeapProfilerDispatcher(new Qr(this)),this.#fr=!1,this.#br=e.heapProfilerAgent(),this.#yr=e.model(Jr),this.#vr=0}debuggerModel(){return this.#yr.debuggerModel()}runtimeModel(){return this.#yr}async enable(){this.#fr||(this.#fr=!0,await this.#br.invoke_enable())}async startSampling(e){if(this.#vr++)return!1;const t=await this.#br.invoke_startSampling({samplingInterval:e||16384});return Boolean(t.getError())}async stopSampling(){if(!this.#vr)throw new Error("Sampling profiler is not running.");if(--this.#vr)return await this.getSamplingProfile();const e=await this.#br.invoke_stopSampling();return e.getError()?null:e.profile}async getSamplingProfile(){const e=await this.#br.invoke_getSamplingProfile();return e.getError()?null:e.profile}async collectGarbage(){const e=await this.#br.invoke_collectGarbage();return Boolean(e.getError())}async snapshotObjectIdForObjectId(e){const t=await this.#br.invoke_getHeapObjectId({objectId:e});return t.getError()?null:t.heapSnapshotObjectId}async objectForSnapshotObjectId(e,t){const n=await this.#br.invoke_getObjectByHeapObjectId({objectId:e,objectGroup:t});return n.getError()?null:this.#yr.createRemoteObject(n.result)}async addInspectedHeapObject(e){const t=await this.#br.invoke_addInspectedHeapObject({heapObjectId:e});return Boolean(t.getError())}async takeHeapSnapshot(e){const t=await this.#br.invoke_takeHeapSnapshot(e);return Boolean(t.getError())}async startTrackingHeapObjects(e){const t=await this.#br.invoke_startTrackingHeapObjects({trackAllocations:e});return Boolean(t.getError())}async stopTrackingHeapObjects(e){const t=await this.#br.invoke_stopTrackingHeapObjects({reportProgress:e});return Boolean(t.getError())}heapStatsUpdate(e){this.dispatchEventToListeners("HeapStatsUpdate",e)}lastSeenObjectId(e,t){this.dispatchEventToListeners("LastSeenObjectId",{lastSeenObjectId:e,timestamp:t})}addHeapSnapshotChunk(e){this.dispatchEventToListeners("AddHeapSnapshotChunk",e)}reportHeapSnapshotProgress(e,t,n){this.dispatchEventToListeners("ReportHeapSnapshotProgress",{done:e,total:t,finished:n})}resetProfiles(){this.dispatchEventToListeners("ResetProfiles",this)}}class Qr{#Ir;constructor(e){this.#Ir=e}heapStatsUpdate({statsUpdate:e}){this.#Ir.heapStatsUpdate(e)}lastSeenObjectId({lastSeenObjectId:e,timestamp:t}){this.#Ir.lastSeenObjectId(e,t)}addHeapSnapshotChunk({chunk:e}){this.#Ir.addHeapSnapshotChunk(e)}reportHeapSnapshotProgress({done:e,total:t,finished:n}){this.#Ir.reportHeapSnapshotProgress(e,t,n)}resetProfiles(){this.#Ir.resetProfiles()}}h.register(Kr,{capabilities:4,autostart:!1});var $r,Xr=Object.freeze({__proto__:null,HeapProfilerModel:Kr});class Jr extends h{agent;#wr=new Map;#Sr=Zr.comparator;constructor(t){super(t),this.agent=t.runtimeAgent(),this.target().registerRuntimeDispatcher(new Yr(this)),this.agent.invoke_enable(),e.Settings.Settings.instance().moduleSetting("custom-formatters").get()&&this.agent.invoke_setCustomObjectFormatterEnabled({enabled:!0}),e.Settings.Settings.instance().moduleSetting("custom-formatters").addChangeListener(this.customFormattersStateChanged.bind(this))}static isSideEffectFailure(e){const t="exceptionDetails"in e&&e.exceptionDetails;return Boolean(t&&t.exception?.description?.startsWith("EvalError: Possible side-effect in debug-evaluate"))}debuggerModel(){return this.target().model(ms)}heapProfilerModel(){return this.target().model(Kr)}executionContexts(){return[...this.#wr.values()].sort(this.executionContextComparator())}setExecutionContextComparator(e){this.#Sr=e}executionContextComparator(){return this.#Sr}defaultExecutionContext(){for(const e of this.executionContexts())if(e.isDefault)return e;return null}executionContext(e){return this.#wr.get(e)||null}executionContextCreated(e){const t=e.auxData||{isDefault:!0},n=new Zr(this,e.id,e.uniqueId,e.name,e.origin,t.isDefault,t.frameId);this.#wr.set(n.id,n),this.dispatchEventToListeners($r.ExecutionContextCreated,n)}executionContextDestroyed(e){const t=this.#wr.get(e);t&&(this.debuggerModel().executionContextDestroyed(t),this.#wr.delete(e),this.dispatchEventToListeners($r.ExecutionContextDestroyed,t))}fireExecutionContextOrderChanged(){this.dispatchEventToListeners($r.ExecutionContextOrderChanged,this)}executionContextsCleared(){this.debuggerModel().globalObjectCleared();const e=this.executionContexts();this.#wr.clear();for(let t=0;te+t.length+1),0);const d="";if(n)for(;;){const e=await this.debuggerModel.target().debuggerAgent().invoke_nextWasmDisassemblyChunk({streamId:n});if(e.getError())throw new Error(e.getError());const{chunk:{lines:t,bytecodeOffsets:r}}=e;if(l+=t.reduce(((e,t)=>e+t.length+1),0),0===t.length)break;if(l>=999999989){o.push([d]),a.push([0]);break}o.push(t),a.push(r)}const c=[];for(let e=0;ee){ss||(ss={cache:new Map,registry:new FinalizationRegistry((e=>ss?.cache.delete(e)))});const e=[this.#Mr,this.contentLength,this.lineOffset,this.columnOffset,this.endLine,this.endColumn,this.#Tr,this.hash].join(":"),t=ss.cache.get(e)?.deref();t?this.#Pr=t:(this.#Pr=this.requestContentInternal(),ss.cache.set(e,new WeakRef(this.#Pr)),ss.registry.register(this.#Pr,e))}else this.#Pr=this.requestContentInternal()}return this.#Pr}async requestContent(){const e=await this.requestContentData();return t.ContentData.ContentData.asDeferredContent(e)}async requestContentInternal(){if(!this.scriptId)return{error:rs(ts.scriptRemovedOrDeleted)};try{return this.isWasm()?await this.loadWasmContent():await this.loadTextContent()}catch{return{error:rs(ts.unableToFetchScriptSource)}}}async getWasmBytecode(){const e=await this.debuggerModel.target().debuggerAgent().invoke_getWasmBytecode({scriptId:this.scriptId}),t=await fetch(`data:application/wasm;base64,${e.bytecode}`);return await t.arrayBuffer()}originalContentProvider(){return new t.StaticContentProvider.StaticContentProvider(this.contentURL(),this.contentType(),(()=>this.requestContentData()))}async searchInContent(e,n,r){if(!this.scriptId)return[];const s=await this.debuggerModel.target().debuggerAgent().invoke_searchInContent({scriptId:this.scriptId,query:e,caseSensitive:n,isRegex:r});return t.TextUtils.performSearchInSearchMatches(s.result||[],e,n,r)}appendSourceURLCommentIfNeeded(e){return this.hasSourceURL?e+"\n //# sourceURL="+this.sourceURL:e}async editSource(e){e=is.trimSourceURLComment(e),e=this.appendSourceURLCommentIfNeeded(e);if(t.ContentData.ContentData.textOr(await this.requestContentData(),null)===e)return{changed:!1,status:"Ok"};const n=await this.debuggerModel.target().debuggerAgent().invoke_setScriptSource({scriptId:this.scriptId,scriptSource:e,allowTopFrameEditing:!0});if(n.getError())throw new Error(`Script#editSource failed for script with id ${this.scriptId}: ${n.getError()}`);return n.getError()||"Ok"!==n.status||(this.#Pr=Promise.resolve(new t.ContentData.ContentData(e,!1,"text/javascript"))),this.debuggerModel.dispatchEventToListeners(ys.ScriptSourceWasEdited,{script:this,status:n.status}),{changed:!0,status:n.status,exceptionDetails:n.exceptionDetails}}rawLocation(e,t){return this.containsLocation(e,t)?new Is(this.debuggerModel,this.scriptId,e,t):null}isInlineScript(){const e=!this.lineOffset&&!this.columnOffset;return!this.isWasm()&&Boolean(this.sourceURL)&&!e}isAnonymousScript(){return!this.sourceURL}async setBlackboxedRanges(e){return!(await this.debuggerModel.target().debuggerAgent().invoke_setBlackboxedRanges({scriptId:this.scriptId,positions:e})).getError()}containsLocation(e,t){const n=e===this.lineOffset&&t>=this.columnOffset||e>this.lineOffset,r=e{r.onmessage=({data:r})=>{if("method"in r&&"disassemble"===r.method)if("error"in r)n(r.error);else if("result"in r){const{lines:n,offsets:s,functionBodyOffsets:i}=r.result;e(new t.WasmDisassembly.WasmDisassembly(n,s,i))}},r.onerror=n}));r.postMessage({method:"disassemble",params:{content:n}});try{return await s}finally{r.terminate()}}var ds=Object.freeze({__proto__:null,Script:is,disassembleWasm:ls,sourceURLRegex:as});const cs={local:"Local",closure:"Closure",block:"Block",script:"Script",withBlock:"`With` block",catchBlock:"`Catch` block",global:"Global",module:"Module",expression:"Expression",exception:"Exception",returnValue:"Return value"},hs=n.i18n.registerUIStrings("core/sdk/DebuggerModel.ts",cs),us=n.i18n.getLocalizedString.bind(void 0,hs);function gs(e){function t(e,t){return e.lineNumber-t.lineNumber||e.columnNumber-t.columnNumber}function n(e,n){if(e.scriptId!==n.scriptId)return!1;const r=t(e.start,n.start);return r<0?t(e.end,n.start)>=0:!(r>0)||t(e.start,n.end)<=0}if(0===e.length)return[];e.sort(((e,n)=>e.scriptIdn.scriptId?1:t(e.start,n.start)||t(e.end,n.end)));let r=e[0];const s=[];for(let i=1;ithis.#Lr.setEnabled(e.data)));const n=t.model(ii);n&&n.addEventListener(ri.FrameNavigated,this.onFrameNavigated,this)}static selectSymbolSource(t){if(!t||0===t.length)return null;if("type"in t)return"None"===t.type?null:t;let n=null;const r=new Map(t.map((e=>[e.type,e])));for(const e of ps)if(r.has(e)){n=r.get(e)||null;break}return console.assert(null!==n,"Unknown symbol types. Front-end and back-end should be kept in sync regarding Protocol.Debugger.DebugSymbolTypes"),n&&t.length>1&&e.Console.Console.instance().warn(`Multiple debug symbols for script were found. Using ${n.type}`),n}sourceMapManager(){return this.#Lr}runtimeModel(){return this.runtimeModelInternal}debuggerEnabled(){return Boolean(this.#Br)}debuggerId(){return this.#_r}async enableDebugger(){if(this.#Br)return;this.#Br=!0;const t=o.Runtime.Runtime.queryParam("remoteFrontend")||o.Runtime.Runtime.queryParam("ws")?1e7:1e8,n=this.agent.invoke_enable({maxScriptsCacheSize:t});let r;o.Runtime.experiments.isEnabled("instrumentation-breakpoints")&&(r=this.agent.invoke_setInstrumentationBreakpoint({instrumentation:"beforeScriptExecution"})),this.pauseOnExceptionStateChanged(),this.asyncStackTracesStateChanged(),e.Settings.Settings.instance().moduleSetting("breakpoints-active").get()||this.breakpointsActiveChanged(),this.dispatchEventToListeners(ys.DebuggerWasEnabled,this);const[s]=await Promise.all([n,r]);this.registerDebugger(s)}async syncDebuggerId(){const e=o.Runtime.Runtime.queryParam("remoteFrontend")||o.Runtime.Runtime.queryParam("ws")?1e7:1e8,t=this.agent.invoke_enable({maxScriptsCacheSize:e});return t.then(this.registerDebugger.bind(this)),await t}onFrameNavigated(){ms.shouldResyncDebuggerId||(ms.shouldResyncDebuggerId=!0)}registerDebugger(e){if(e.getError())return void(this.#Br=!1);const{debuggerId:t}=e;fs.set(t,this),this.#_r=t,this.dispatchEventToListeners(ys.DebuggerIsReadyToPause,this)}isReadyToPause(){return Boolean(this.#_r)}static async modelForDebuggerId(e){return ms.shouldResyncDebuggerId&&(await ms.resyncDebuggerIdForModels(),ms.shouldResyncDebuggerId=!1),fs.get(e)||null}static async resyncDebuggerIdForModels(){const e=fs.values();for(const t of e)t.debuggerEnabled()&&await t.syncDebuggerId()}async disableDebugger(){this.#Br&&(this.#Br=!1,await this.asyncStackTracesStateChanged(),await this.agent.invoke_disable(),this.#Gr=!1,this.globalObjectCleared(),this.dispatchEventToListeners(ys.DebuggerWasDisabled,this),"string"==typeof this.#_r&&fs.delete(this.#_r),this.#_r=null)}skipAllPauses(e){this.#Hr&&(clearTimeout(this.#Hr),this.#Hr=0),this.agent.invoke_setSkipAllPauses({skip:e})}skipAllPausesUntilReloadOrTimeout(e){this.#Hr&&clearTimeout(this.#Hr),this.agent.invoke_setSkipAllPauses({skip:!0}),this.#Hr=window.setTimeout(this.skipAllPauses.bind(this,!1),e)}pauseOnExceptionStateChanged(){const t=e.Settings.Settings.instance().moduleSetting("pause-on-caught-exception").get();let n;const r=e.Settings.Settings.instance().moduleSetting("pause-on-uncaught-exception").get();n=t&&r?"all":t?"caught":r?"uncaught":"none",this.agent.invoke_setPauseOnExceptions({state:n})}asyncStackTracesStateChanged(){const t=!e.Settings.Settings.instance().moduleSetting("disable-async-stack-traces").get()&&this.#Br?32:0;return this.agent.invoke_setAsyncCallStackDepth({maxDepth:t})}breakpointsActiveChanged(){this.agent.invoke_setBreakpointsActive({active:e.Settings.Settings.instance().moduleSetting("breakpoints-active").get()})}setComputeAutoStepRangesCallback(e){this.#qr=e}async computeAutoStepSkipList(e){let t=[];if(this.#qr&&this.#Ar&&this.#Ar.callFrames.length>0){const[n]=this.#Ar.callFrames;t=await this.#qr.call(null,e,n)}return gs(t.map((({start:e,end:t})=>({scriptId:e.scriptId,start:{lineNumber:e.lineNumber,columnNumber:e.columnNumber},end:{lineNumber:t.lineNumber,columnNumber:t.columnNumber}}))))}async stepInto(){const e=await this.computeAutoStepSkipList("StepInto");this.agent.invoke_stepInto({breakOnAsyncCall:!1,skipList:e})}async stepOver(){this.#Wr=this.#Ar?.callFrames[0]?.functionLocation()??null;const e=await this.computeAutoStepSkipList("StepOver");this.agent.invoke_stepOver({skipList:e})}async stepOut(){const e=await this.computeAutoStepSkipList("StepOut");0!==e.length?this.agent.invoke_stepOver({skipList:e}):this.agent.invoke_stepOut()}scheduleStepIntoAsync(){this.computeAutoStepSkipList("StepInto").then((e=>{this.agent.invoke_stepInto({breakOnAsyncCall:!0,skipList:e})}))}resume(){this.agent.invoke_resume({terminateOnResume:!1}),this.#Gr=!1}pause(){this.#Gr=!0,this.skipAllPauses(!1),this.agent.invoke_pause()}async setBreakpointByURL(t,n,s,i){let o;if(this.target().type()===U.NODE&&e.ParsedURL.schemeIs(t,"file:")){const n=e.ParsedURL.ParsedURL.urlToRawPathString(t,a.Platform.isWin());o=`${r.StringUtilities.escapeForRegExp(n)}|${r.StringUtilities.escapeForRegExp(t)}`,a.Platform.isWin()&&n.match(/^.:\\/)&&(o=`[${n[0].toUpperCase()}${n[0].toLowerCase()}]`+o.substr(1))}let l=0;const d=this.#Dr.get(t)||[];for(let e=0,t=d.length;eIs.fromPayload(this,e)))),{locations:h,breakpointId:c.breakpointId}}async setBreakpointInAnonymousScript(e,t,n,r){const s=await this.agent.invoke_setBreakpointByUrl({lineNumber:t,scriptHash:e,columnNumber:n,condition:r});if(s.getError())return{locations:[],breakpointId:null};let i=[];return s.locations&&(i=s.locations.map((e=>Is.fromPayload(this,e)))),{locations:i,breakpointId:s.breakpointId}}async removeBreakpoint(e){await this.agent.invoke_removeBreakpoint({breakpointId:e})}async getPossibleBreakpoints(e,t,n){const r=await this.agent.invoke_getPossibleBreakpoints({start:e.payload(),end:t?t.payload():void 0,restrictToFunction:n});return r.getError()||!r.locations?[]:r.locations.map((e=>ws.fromPayload(this,e)))}async fetchAsyncStackTrace(e){const t=await this.agent.invoke_getStackTrace({stackTraceId:e});return t.getError()?null:t.stackTrace}breakpointResolved(e,t){this.#Vr.dispatchEventToListeners(e,Is.fromPayload(this,t))}globalObjectCleared(){this.resetDebuggerPausedDetails(),this.reset(),this.dispatchEventToListeners(ys.GlobalObjectCleared,this)}reset(){for(const e of this.#Or.values())this.#Lr.detachSourceMap(e);this.#Or.clear(),this.#Dr.clear(),this.#Nr=[],this.#Wr=null}scripts(){return Array.from(this.#Or.values())}scriptForId(e){return this.#Or.get(e)||null}scriptsForSourceURL(e){return this.#Dr.get(e)||[]}scriptsForExecutionContext(e){const t=[];for(const n of this.#Or.values())n.executionContextId===e.id&&t.push(n);return t}get callFrames(){return this.#Ar?this.#Ar.callFrames:null}debuggerPausedDetails(){return this.#Ar}async setDebuggerPausedDetails(e){return this.#Gr=!1,this.#Ar=e,!(this.#Ur&&!await this.#Ur.call(null,e,this.#Wr))&&(this.#Wr=null,this.dispatchEventToListeners(ys.DebuggerPaused,this),this.setSelectedCallFrame(e.callFrames[0]),!0)}resetDebuggerPausedDetails(){this.#Gr=!1,this.#Ar=null,this.setSelectedCallFrame(null)}setBeforePausedCallback(e){this.#Ur=e}setExpandCallFramesCallback(e){this.#zr=e}setEvaluateOnCallFrameCallback(e){this.evaluateOnCallFrameCallback=e}setSynchronizeBreakpointsCallback(e){this.#jr=e}async pausedScript(t,n,r,s,i,o){if("instrumentation"===n){const e=this.scriptForId(r.scriptId);return this.#jr&&e&&await this.#jr(e),void this.resume()}const a=new Cs(this,t,n,r,s,i,o);if(await this.#Kr(a),this.continueToLocationCallback){const e=this.continueToLocationCallback;if(this.continueToLocationCallback=null,e(a))return}await this.setDebuggerPausedDetails(a)?e.EventTarget.fireEvent("DevTools.DebuggerPaused"):this.#Wr?this.stepOver():this.stepInto()}async#Kr(e){if(this.#zr&&(e.callFrames=await this.#zr.call(null,e.callFrames)),!o.Runtime.experiments.isEnabled("use-source-map-scopes"))return;const t=[];for(const n of e.callFrames){const e=await this.sourceMapManager().sourceMapForClientPromise(n.script);e?.hasScopeInfo()?t.push(...e.expandCallFrame(n)):t.push(n)}e.callFrames=t}resumedScript(){this.resetDebuggerPausedDetails(),this.dispatchEventToListeners(ys.DebuggerResumed,this)}parsedScriptSource(e,t,n,r,s,i,o,a,l,d,c,h,u,g,p,m,f,b,y,v){const I=this.#Or.get(e);if(I)return I;let w=!1;l&&"isDefault"in l&&(w=!l.isDefault);const S=ms.selectSymbolSource(y),k=new is(this,e,t,n,r,s,i,o,a,w,d,c,h,g,p,m,f,b,S,v);this.registerScript(k),this.dispatchEventToListeners(ys.ParsedScriptSource,k),k.sourceMapURL&&!u&&this.#Lr.attachSourceMap(k,k.sourceURL,k.sourceMapURL);return u&&k.isAnonymousScript()&&(this.#Nr.push(k),this.collectDiscardedScripts()),k}setSourceMapURL(e,t){this.#Lr.detachSourceMap(e),e.sourceMapURL=t,this.#Lr.attachSourceMap(e,e.sourceURL,e.sourceMapURL)}async setDebugInfoURL(e,t){this.#zr&&this.#Ar&&(this.#Ar.callFrames=await this.#zr.call(null,this.#Ar.callFrames)),this.dispatchEventToListeners(ys.DebugInfoAttached,e)}executionContextDestroyed(e){for(const t of this.#Or.values())t.executionContextId===e.id&&this.#Lr.detachSourceMap(t)}registerScript(e){if(this.#Or.set(e.scriptId,e),e.isAnonymousScript())return;let t=this.#Dr.get(e.sourceURL);t||(t=[],this.#Dr.set(e.sourceURL,t)),t.unshift(e)}unregisterScript(e){console.assert(e.isAnonymousScript()),this.#Or.delete(e.scriptId)}collectDiscardedScripts(){if(this.#Nr.length<1e3)return;const e=this.#Nr.splice(0,100);for(const t of e)this.unregisterScript(t),this.dispatchEventToListeners(ys.DiscardedAnonymousScriptSource,t)}createRawLocation(e,t,n,r){return this.createRawLocationByScriptId(e.scriptId,t,n,r)}createRawLocationByURL(e,t,n,r,s){for(const i of this.#Dr.get(e)||[]){if(!s){if(i.lineOffset>t||i.lineOffset===t&&void 0!==n&&i.columnOffset>n)continue;if(i.endLine=this.#ss.length&&(this.#is=0),e}}var Ps=Object.freeze({__proto__:null,OverlayColorGenerator:Ms});class Es{#os;#ss=new Map;#as=e.Settings.Settings.instance().createLocalSetting("persistent-highlight-setting",[]);#ls=new Map;#ds=new Map;#cs=new Map;#hs=new Map;#us=new Map;#gs=new Ms;#ps=new Ms;#ms=e.Settings.Settings.instance().moduleSetting("show-grid-line-labels");#fs=e.Settings.Settings.instance().moduleSetting("extend-grid-lines");#bs=e.Settings.Settings.instance().moduleSetting("show-grid-areas");#ys=e.Settings.Settings.instance().moduleSetting("show-grid-track-sizes");#vs;constructor(e,t){this.#os=e,this.#vs=t,this.#ms.addChangeListener(this.onSettingChange,this),this.#fs.addChangeListener(this.onSettingChange,this),this.#bs.addChangeListener(this.onSettingChange,this),this.#ys.addChangeListener(this.onSettingChange,this)}onSettingChange(){this.resetOverlay()}buildGridHighlightConfig(e){const t=this.colorOfGrid(e).asLegacyColor(),n=t.setAlpha(.1).asLegacyColor(),r=t.setAlpha(.3).asLegacyColor(),s=t.setAlpha(.8).asLegacyColor(),i=this.#fs.get(),o="lineNumbers"===this.#ms.get(),a=o,l="lineNames"===this.#ms.get();return{rowGapColor:r.toProtocolRGBA(),rowHatchColor:s.toProtocolRGBA(),columnGapColor:r.toProtocolRGBA(),columnHatchColor:s.toProtocolRGBA(),gridBorderColor:t.toProtocolRGBA(),gridBorderDash:!1,rowLineColor:t.toProtocolRGBA(),columnLineColor:t.toProtocolRGBA(),rowLineDash:!0,columnLineDash:!0,showGridExtensionLines:i,showPositiveLineNumbers:o,showNegativeLineNumbers:a,showLineNames:l,showAreaNames:this.#bs.get(),showTrackSizes:this.#ys.get(),areaBorderColor:t.toProtocolRGBA(),gridBackgroundColor:n.toProtocolRGBA()}}buildFlexContainerHighlightConfig(e){const t=this.colorOfFlex(e).asLegacyColor();return{containerBorder:{color:t.toProtocolRGBA(),pattern:"dashed"},itemSeparator:{color:t.toProtocolRGBA(),pattern:"dotted"},lineSeparator:{color:t.toProtocolRGBA(),pattern:"dashed"},mainDistributedSpace:{hatchColor:t.toProtocolRGBA()},crossDistributedSpace:{hatchColor:t.toProtocolRGBA()}}}buildScrollSnapContainerHighlightConfig(t){return{snapAreaBorder:{color:e.Color.PageHighlight.GridBorder.toProtocolRGBA(),pattern:"dashed"},snapportBorder:{color:e.Color.PageHighlight.GridBorder.toProtocolRGBA()},scrollMarginColor:e.Color.PageHighlight.Margin.toProtocolRGBA(),scrollPaddingColor:e.Color.PageHighlight.Padding.toProtocolRGBA()}}highlightGridInOverlay(e){this.#ls.set(e,this.buildGridHighlightConfig(e)),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting(),this.#vs.onGridOverlayStateChanged({nodeId:e,enabled:!0})}isGridHighlighted(e){return this.#ls.has(e)}colorOfGrid(e){let t=this.#ss.get(e);return t||(t=this.#gs.next(),this.#ss.set(e,t)),t}setColorOfGrid(e,t){this.#ss.set(e,t)}hideGridInOverlay(e){this.#ls.has(e)&&(this.#ls.delete(e),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting(),this.#vs.onGridOverlayStateChanged({nodeId:e,enabled:!1}))}highlightScrollSnapInOverlay(e){this.#ds.set(e,this.buildScrollSnapContainerHighlightConfig(e)),this.updateHighlightsInOverlay(),this.#vs.onScrollSnapOverlayStateChanged({nodeId:e,enabled:!0}),this.savePersistentHighlightSetting()}isScrollSnapHighlighted(e){return this.#ds.has(e)}hideScrollSnapInOverlay(e){this.#ds.has(e)&&(this.#ds.delete(e),this.updateHighlightsInOverlay(),this.#vs.onScrollSnapOverlayStateChanged({nodeId:e,enabled:!1}),this.savePersistentHighlightSetting())}highlightFlexInOverlay(e){this.#cs.set(e,this.buildFlexContainerHighlightConfig(e)),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting(),this.#vs.onFlexOverlayStateChanged({nodeId:e,enabled:!0})}isFlexHighlighted(e){return this.#cs.has(e)}colorOfFlex(e){let t=this.#ss.get(e);return t||(t=this.#ps.next(),this.#ss.set(e,t)),t}setColorOfFlex(e,t){this.#ss.set(e,t)}hideFlexInOverlay(e){this.#cs.has(e)&&(this.#cs.delete(e),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting(),this.#vs.onFlexOverlayStateChanged({nodeId:e,enabled:!1}))}highlightContainerQueryInOverlay(e){this.#hs.set(e,this.buildContainerQueryContainerHighlightConfig()),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting(),this.#vs.onContainerQueryOverlayStateChanged({nodeId:e,enabled:!0})}hideContainerQueryInOverlay(e){this.#hs.has(e)&&(this.#hs.delete(e),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting(),this.#vs.onContainerQueryOverlayStateChanged({nodeId:e,enabled:!1}))}isContainerQueryHighlighted(e){return this.#hs.has(e)}buildContainerQueryContainerHighlightConfig(){return{containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},descendantBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"}}}highlightIsolatedElementInOverlay(e){this.#us.set(e,this.buildIsolationModeHighlightConfig()),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting()}hideIsolatedElementInOverlay(e){this.#us.has(e)&&(this.#us.delete(e),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting())}isIsolatedElementHighlighted(e){return this.#us.has(e)}buildIsolationModeHighlightConfig(){return{resizerColor:e.Color.IsolationModeHighlight.Resizer.toProtocolRGBA(),resizerHandleColor:e.Color.IsolationModeHighlight.ResizerHandle.toProtocolRGBA(),maskColor:e.Color.IsolationModeHighlight.Mask.toProtocolRGBA()}}hideAllInOverlayWithoutSave(){this.#cs.clear(),this.#ls.clear(),this.#ds.clear(),this.#hs.clear(),this.#us.clear(),this.updateHighlightsInOverlay()}refreshHighlights(){const e=this.updateHighlightsForDeletedNodes(this.#ls),t=this.updateHighlightsForDeletedNodes(this.#cs),n=this.updateHighlightsForDeletedNodes(this.#ds),r=this.updateHighlightsForDeletedNodes(this.#hs),s=this.updateHighlightsForDeletedNodes(this.#us);(t||e||n||r||s)&&(this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting())}updateHighlightsForDeletedNodes(e){let t=!1;for(const n of e.keys())null===this.#os.getDOMModel().nodeForId(n)&&(e.delete(n),t=!0);return t}resetOverlay(){for(const e of this.#ls.keys())this.#ls.set(e,this.buildGridHighlightConfig(e));for(const e of this.#cs.keys())this.#cs.set(e,this.buildFlexContainerHighlightConfig(e));for(const e of this.#ds.keys())this.#ds.set(e,this.buildScrollSnapContainerHighlightConfig(e));for(const e of this.#hs.keys())this.#hs.set(e,this.buildContainerQueryContainerHighlightConfig());for(const e of this.#us.keys())this.#us.set(e,this.buildIsolationModeHighlightConfig());this.updateHighlightsInOverlay()}updateHighlightsInOverlay(){const e=this.#ls.size>0||this.#cs.size>0||this.#hs.size>0||this.#us.size>0;this.#os.setShowViewportSizeOnResize(!e),this.updateGridHighlightsInOverlay(),this.updateFlexHighlightsInOverlay(),this.updateScrollSnapHighlightsInOverlay(),this.updateContainerQueryHighlightsInOverlay(),this.updateIsolatedElementHighlightsInOverlay()}updateGridHighlightsInOverlay(){const e=this.#os,t=[];for(const[e,n]of this.#ls.entries())t.push({nodeId:e,gridHighlightConfig:n});e.target().overlayAgent().invoke_setShowGridOverlays({gridNodeHighlightConfigs:t})}updateFlexHighlightsInOverlay(){const e=this.#os,t=[];for(const[e,n]of this.#cs.entries())t.push({nodeId:e,flexContainerHighlightConfig:n});e.target().overlayAgent().invoke_setShowFlexOverlays({flexNodeHighlightConfigs:t})}updateScrollSnapHighlightsInOverlay(){const e=this.#os,t=[];for(const[e,n]of this.#ds.entries())t.push({nodeId:e,scrollSnapContainerHighlightConfig:n});e.target().overlayAgent().invoke_setShowScrollSnapOverlays({scrollSnapHighlightConfigs:t})}updateContainerQueryHighlightsInOverlay(){const e=this.#os,t=[];for(const[e,n]of this.#hs.entries())t.push({nodeId:e,containerQueryContainerHighlightConfig:n});e.target().overlayAgent().invoke_setShowContainerQueryOverlays({containerQueryHighlightConfigs:t})}updateIsolatedElementHighlightsInOverlay(){const e=this.#os,t=[];for(const[e,n]of this.#us.entries())t.push({nodeId:e,isolationModeHighlightConfig:n});e.target().overlayAgent().invoke_setShowIsolatedElements({isolatedElementHighlightConfigs:t})}async restoreHighlightsForDocument(){this.#cs=new Map,this.#ls=new Map,this.#ds=new Map,this.#hs=new Map,this.#us=new Map;const e=await this.#os.getDOMModel().requestDocument(),t=e?e.documentURL:r.DevToolsPath.EmptyUrlString;await Promise.all(this.#as.get().map((async e=>{if(e.url===t)return await this.#os.getDOMModel().pushNodeByPathToFrontend(e.path).then((t=>{const n=this.#os.getDOMModel().nodeForId(t);if(n)switch(e.type){case"GRID":this.#ls.set(n.id,this.buildGridHighlightConfig(n.id)),this.#vs.onGridOverlayStateChanged({nodeId:n.id,enabled:!0});break;case"FLEX":this.#cs.set(n.id,this.buildFlexContainerHighlightConfig(n.id)),this.#vs.onFlexOverlayStateChanged({nodeId:n.id,enabled:!0});break;case"CONTAINER_QUERY":this.#hs.set(n.id,this.buildContainerQueryContainerHighlightConfig()),this.#vs.onContainerQueryOverlayStateChanged({nodeId:n.id,enabled:!0});break;case"SCROLL_SNAP":this.#ds.set(n.id,this.buildScrollSnapContainerHighlightConfig(n.id)),this.#vs.onScrollSnapOverlayStateChanged({nodeId:n.id,enabled:!0});break;case"ISOLATED_ELEMENT":this.#us.set(n.id,this.buildIsolationModeHighlightConfig())}}))}))),this.updateHighlightsInOverlay()}currentUrl(){const e=this.#os.getDOMModel().existingDocument();return e?e.documentURL:r.DevToolsPath.EmptyUrlString}getPersistentHighlightSettingForOneType(e,t){const n=[];for(const r of e.keys()){const e=this.#os.getDOMModel().nodeForId(r);e&&n.push({url:this.currentUrl(),path:e.path(),type:t})}return n}savePersistentHighlightSetting(){const e=this.currentUrl(),t=[...this.#as.get().filter((t=>t.url!==e)),...this.getPersistentHighlightSettingForOneType(this.#ls,"GRID"),...this.getPersistentHighlightSettingForOneType(this.#cs,"FLEX"),...this.getPersistentHighlightSettingForOneType(this.#hs,"CONTAINER_QUERY"),...this.getPersistentHighlightSettingForOneType(this.#ds,"SCROLL_SNAP"),...this.getPersistentHighlightSettingForOneType(this.#us,"ISOLATED_ELEMENT")];this.#as.set(t)}}var Ls=Object.freeze({__proto__:null,OverlayPersistentHighlighter:Es});const As={pausedInDebugger:"Paused in debugger"},Os=n.i18n.registerUIStrings("core/sdk/OverlayModel.ts",As),Ds=n.i18n.getLocalizedString.bind(void 0,Os),Ns={mac:{x:85,y:0,width:185,height:40},linux:{x:0,y:0,width:196,height:34},windows:{x:0,y:0,width:238,height:33}};class Fs extends h{#Yn;overlayAgent;#Qr;#Is=!1;#ws=null;#Ss;#ks;#Cs;#xs;#Rs;#Ts;#Ms;#Ps;#Es=[];#Ls=!0;#As;#Os;#Ds=!1;#Ns;constructor(t){super(t),this.#Yn=t.model(Gs),t.registerOverlayDispatcher(this),this.overlayAgent=t.overlayAgent(),this.#Qr=t.model(ms),this.#Qr&&(e.Settings.Settings.instance().moduleSetting("disable-paused-state-overlay").addChangeListener(this.updatePausedInDebuggerMessage,this),this.#Qr.addEventListener(ys.DebuggerPaused,this.updatePausedInDebuggerMessage,this),this.#Qr.addEventListener(ys.DebuggerResumed,this.updatePausedInDebuggerMessage,this),this.#Qr.addEventListener(ys.GlobalObjectCleared,this.updatePausedInDebuggerMessage,this)),this.#Ss=new _s(this),this.#ks=this.#Ss,this.#Cs=e.Settings.Settings.instance().moduleSetting("show-paint-rects"),this.#xs=e.Settings.Settings.instance().moduleSetting("show-layout-shift-regions"),this.#Rs=e.Settings.Settings.instance().moduleSetting("show-ad-highlights"),this.#Ts=e.Settings.Settings.instance().moduleSetting("show-debug-borders"),this.#Ms=e.Settings.Settings.instance().moduleSetting("show-fps-counter"),this.#Ps=e.Settings.Settings.instance().moduleSetting("show-scroll-bottleneck-rects"),t.suspended()||(this.overlayAgent.invoke_enable(),this.wireAgentToSettings()),this.#As=new Es(this,{onGridOverlayStateChanged:({nodeId:e,enabled:t})=>this.dispatchEventToListeners("PersistentGridOverlayStateChanged",{nodeId:e,enabled:t}),onFlexOverlayStateChanged:({nodeId:e,enabled:t})=>this.dispatchEventToListeners("PersistentFlexContainerOverlayStateChanged",{nodeId:e,enabled:t}),onContainerQueryOverlayStateChanged:({nodeId:e,enabled:t})=>this.dispatchEventToListeners("PersistentContainerQueryOverlayStateChanged",{nodeId:e,enabled:t}),onScrollSnapOverlayStateChanged:({nodeId:e,enabled:t})=>this.dispatchEventToListeners("PersistentScrollSnapOverlayStateChanged",{nodeId:e,enabled:t})}),this.#Yn.addEventListener(Us.NodeRemoved,(()=>{this.#As&&this.#As.refreshHighlights()})),this.#Yn.addEventListener(Us.DocumentUpdated,(()=>{this.#As&&(this.#As.hideAllInOverlayWithoutSave(),t.suspended()||this.#As.restoreHighlightsForDocument())})),this.#Os=new Hs(this),this.#Ns=new Bs(this.#Yn.cssModel())}static highlightObjectAsDOMNode(e){const t=e.runtimeModel().target().model(Gs);t&&t.overlayModel().highlightInOverlay({object:e,selectorList:void 0})}static hideDOMNodeHighlight(){for(const e of W.instance().models(Fs))e.delayedHideHighlight(0)}static async muteHighlight(){return await Promise.all(W.instance().models(Fs).map((e=>e.suspendModel())))}static async unmuteHighlight(){return await Promise.all(W.instance().models(Fs).map((e=>e.resumeModel())))}static highlightRect(e){for(const t of W.instance().models(Fs))t.highlightRect(e)}static clearHighlight(){for(const e of W.instance().models(Fs))e.clearHighlight()}getDOMModel(){return this.#Yn}highlightRect({x:e,y:t,width:n,height:r,color:s,outlineColor:i}){const o=s||{r:255,g:0,b:255,a:.3},a=i||{r:255,g:0,b:255,a:.5};return this.overlayAgent.invoke_highlightRect({x:e,y:t,width:n,height:r,color:o,outlineColor:a})}clearHighlight(){return this.overlayAgent.invoke_hideHighlight()}async wireAgentToSettings(){this.#Es=[this.#Cs.addChangeListener((()=>this.overlayAgent.invoke_setShowPaintRects({result:this.#Cs.get()}))),this.#xs.addChangeListener((()=>this.overlayAgent.invoke_setShowLayoutShiftRegions({result:this.#xs.get()}))),this.#Rs.addChangeListener((()=>this.overlayAgent.invoke_setShowAdHighlights({show:this.#Rs.get()}))),this.#Ts.addChangeListener((()=>this.overlayAgent.invoke_setShowDebugBorders({show:this.#Ts.get()}))),this.#Ms.addChangeListener((()=>this.overlayAgent.invoke_setShowFPSCounter({show:this.#Ms.get()}))),this.#Ps.addChangeListener((()=>this.overlayAgent.invoke_setShowScrollBottleneckRects({show:this.#Ps.get()})))],this.#Cs.get()&&this.overlayAgent.invoke_setShowPaintRects({result:!0}),this.#xs.get()&&this.overlayAgent.invoke_setShowLayoutShiftRegions({result:!0}),this.#Rs.get()&&this.overlayAgent.invoke_setShowAdHighlights({show:!0}),this.#Ts.get()&&this.overlayAgent.invoke_setShowDebugBorders({show:!0}),this.#Ms.get()&&this.overlayAgent.invoke_setShowFPSCounter({show:!0}),this.#Ps.get()&&this.overlayAgent.invoke_setShowScrollBottleneckRects({show:!0}),this.#Qr&&this.#Qr.isPaused()&&this.updatePausedInDebuggerMessage(),await this.overlayAgent.invoke_setShowViewportSizeOnResize({show:this.#Ls}),this.#As?.resetOverlay()}async suspendModel(){e.EventTarget.removeEventListeners(this.#Es),await this.overlayAgent.invoke_disable()}async resumeModel(){await Promise.all([this.overlayAgent.invoke_enable(),this.wireAgentToSettings()])}setShowViewportSizeOnResize(e){this.#Ls!==e&&(this.#Ls=e,this.target().suspended()||this.overlayAgent.invoke_setShowViewportSizeOnResize({show:e}))}updatePausedInDebuggerMessage(){if(this.target().suspended())return;const t=this.#Qr&&this.#Qr.isPaused()&&!e.Settings.Settings.instance().moduleSetting("disable-paused-state-overlay").get()?Ds(As.pausedInDebugger):void 0;this.overlayAgent.invoke_setPausedInDebuggerMessage({message:t})}setHighlighter(e){this.#ks=e||this.#Ss}async setInspectMode(e,t=!0){await this.#Yn.requestDocument(),this.#Is="none"!==e,this.dispatchEventToListeners("InspectModeWillBeToggled",this),this.#ks.setInspectMode(e,this.buildHighlightConfig("all",t))}inspectModeEnabled(){return this.#Is}highlightInOverlay(e,t,n){if(this.#Ds)return;this.#ws&&(clearTimeout(this.#ws),this.#ws=null);const r=this.buildHighlightConfig(t);void 0!==n&&(r.showInfo=n),this.#ks.highlightInOverlay(e,r)}highlightInOverlayForTwoSeconds(e){this.highlightInOverlay(e),this.delayedHideHighlight(2e3)}highlightGridInPersistentOverlay(e){this.#As&&this.#As.highlightGridInOverlay(e)}isHighlightedGridInPersistentOverlay(e){return!!this.#As&&this.#As.isGridHighlighted(e)}hideGridInPersistentOverlay(e){this.#As&&this.#As.hideGridInOverlay(e)}highlightScrollSnapInPersistentOverlay(e){this.#As&&this.#As.highlightScrollSnapInOverlay(e)}isHighlightedScrollSnapInPersistentOverlay(e){return!!this.#As&&this.#As.isScrollSnapHighlighted(e)}hideScrollSnapInPersistentOverlay(e){this.#As&&this.#As.hideScrollSnapInOverlay(e)}highlightFlexContainerInPersistentOverlay(e){this.#As&&this.#As.highlightFlexInOverlay(e)}isHighlightedFlexContainerInPersistentOverlay(e){return!!this.#As&&this.#As.isFlexHighlighted(e)}hideFlexContainerInPersistentOverlay(e){this.#As&&this.#As.hideFlexInOverlay(e)}highlightContainerQueryInPersistentOverlay(e){this.#As&&this.#As.highlightContainerQueryInOverlay(e)}isHighlightedContainerQueryInPersistentOverlay(e){return!!this.#As&&this.#As.isContainerQueryHighlighted(e)}hideContainerQueryInPersistentOverlay(e){this.#As&&this.#As.hideContainerQueryInOverlay(e)}highlightSourceOrderInOverlay(t){const n={parentOutlineColor:e.Color.SourceOrderHighlight.ParentOutline.toProtocolRGBA(),childOutlineColor:e.Color.SourceOrderHighlight.ChildOutline.toProtocolRGBA()};this.#Os.highlightSourceOrderInOverlay(t,n)}colorOfGridInPersistentOverlay(e){return this.#As?this.#As.colorOfGrid(e).asString("hex"):null}setColorOfGridInPersistentOverlay(t,n){if(!this.#As)return;const r=e.Color.parse(n);r&&(this.#As.setColorOfGrid(t,r),this.#As.resetOverlay())}colorOfFlexInPersistentOverlay(e){return this.#As?this.#As.colorOfFlex(e).asString("hex"):null}setColorOfFlexInPersistentOverlay(t,n){if(!this.#As)return;const r=e.Color.parse(n);r&&(this.#As.setColorOfFlex(t,r),this.#As.resetOverlay())}hideSourceOrderInOverlay(){this.#Os.hideSourceOrderHighlight()}setSourceOrderActive(e){this.#Ds=e}sourceOrderModeActive(){return this.#Ds}delayedHideHighlight(e){null===this.#ws&&(this.#ws=window.setTimeout((()=>this.highlightInOverlay({clear:!0})),e))}highlightFrame(e){this.#ws&&(clearTimeout(this.#ws),this.#ws=null),this.#ks.highlightFrame(e)}showHingeForDualScreen(e){if(e){const{x:t,y:n,width:r,height:s,contentColor:i,outlineColor:o}=e;this.overlayAgent.invoke_setShowHinge({hingeConfig:{rect:{x:t,y:n,width:r,height:s},contentColor:i,outlineColor:o}})}else this.overlayAgent.invoke_setShowHinge({})}setWindowControlsPlatform(e){this.#Ns.selectedPlatform=e}setWindowControlsThemeColor(e){this.#Ns.themeColor=e}getWindowControlsConfig(){return this.#Ns.config}async toggleWindowControlsToolbar(e){const t=e?{windowControlsOverlayConfig:this.#Ns.config}:{},n=this.overlayAgent.invoke_setShowWindowControlsOverlay(t),r=this.#Ns.toggleEmulatedOverlay(e);await Promise.all([n,r]),this.setShowViewportSizeOnResize(!e)}buildHighlightConfig(t="all",n=!1){const r=e.Settings.Settings.instance().moduleSetting("show-metrics-rulers").get(),s={showInfo:"all"===t||"container-outline"===t,showRulers:r,showStyles:n,showAccessibilityInfo:n,showExtensionLines:r,gridHighlightConfig:{},flexContainerHighlightConfig:{},flexItemHighlightConfig:{},contrastAlgorithm:o.Runtime.experiments.isEnabled("apca")?"apca":"aa"};return"all"!==t&&"content"!==t||(s.contentColor=e.Color.PageHighlight.Content.toProtocolRGBA()),"all"!==t&&"padding"!==t||(s.paddingColor=e.Color.PageHighlight.Padding.toProtocolRGBA()),"all"!==t&&"border"!==t||(s.borderColor=e.Color.PageHighlight.Border.toProtocolRGBA()),"all"!==t&&"margin"!==t||(s.marginColor=e.Color.PageHighlight.Margin.toProtocolRGBA()),"all"===t&&(s.eventTargetColor=e.Color.PageHighlight.EventTarget.toProtocolRGBA(),s.shapeColor=e.Color.PageHighlight.Shape.toProtocolRGBA(),s.shapeMarginColor=e.Color.PageHighlight.ShapeMargin.toProtocolRGBA(),s.gridHighlightConfig={rowGapColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA(),rowHatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),columnGapColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA(),columnHatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),rowLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),columnLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),rowLineDash:!0,columnLineDash:!0},s.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},itemSeparator:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dotted"},lineSeparator:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},mainDistributedSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()},crossDistributedSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()},rowGapSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()},columnGapSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()}},s.flexItemHighlightConfig={baseSizeBox:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA()},baseSizeBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dotted"},flexibilityArrow:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA()}}),t.endsWith("gap")&&(s.gridHighlightConfig={gridBorderColor:e.Color.PageHighlight.GridBorder.toProtocolRGBA(),gridBorderDash:!0},"gap"!==t&&"row-gap"!==t||(s.gridHighlightConfig.rowGapColor=e.Color.PageHighlight.GapBackground.toProtocolRGBA(),s.gridHighlightConfig.rowHatchColor=e.Color.PageHighlight.GapHatch.toProtocolRGBA()),"gap"!==t&&"column-gap"!==t||(s.gridHighlightConfig.columnGapColor=e.Color.PageHighlight.GapBackground.toProtocolRGBA(),s.gridHighlightConfig.columnHatchColor=e.Color.PageHighlight.GapHatch.toProtocolRGBA())),t.endsWith("gap")&&(s.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"}},"gap"!==t&&"row-gap"!==t||(s.flexContainerHighlightConfig.rowGapSpace={hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()}),"gap"!==t&&"column-gap"!==t||(s.flexContainerHighlightConfig.columnGapSpace={hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()})),"grid-areas"===t&&(s.gridHighlightConfig={rowLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),columnLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),rowLineDash:!0,columnLineDash:!0,showAreaNames:!0,areaBorderColor:e.Color.PageHighlight.GridAreaBorder.toProtocolRGBA()}),"grid-template-columns"===t&&(s.contentColor=e.Color.PageHighlight.Content.toProtocolRGBA(),s.gridHighlightConfig={columnLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),columnLineDash:!0}),"grid-template-rows"===t&&(s.contentColor=e.Color.PageHighlight.Content.toProtocolRGBA(),s.gridHighlightConfig={rowLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),rowLineDash:!0}),"justify-content"===t&&(s.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},mainDistributedSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()}}),"align-content"===t&&(s.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},crossDistributedSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()}}),"align-items"===t&&(s.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},lineSeparator:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},crossAlignment:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA()}}),"flexibility"===t&&(s.flexItemHighlightConfig={baseSizeBox:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA()},baseSizeBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dotted"},flexibilityArrow:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA()}}),"container-outline"===t&&(s.containerQueryContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"}}),s}nodeHighlightRequested({nodeId:e}){const t=this.#Yn.nodeForId(e);t&&this.dispatchEventToListeners("HighlightNodeRequested",t)}static setInspectNodeHandler(e){Fs.inspectNodeHandler=e}inspectNodeRequested({backendNodeId:t}){const n=new js(this.target(),t);Fs.inspectNodeHandler?n.resolvePromise().then((e=>{e&&Fs.inspectNodeHandler&&Fs.inspectNodeHandler(e)})):e.Revealer.reveal(n),this.dispatchEventToListeners("InspectModeExited")}screenshotRequested({viewport:e}){this.dispatchEventToListeners("ScreenshotRequested",e),this.dispatchEventToListeners("InspectModeExited")}inspectModeCanceled(){this.dispatchEventToListeners("InspectModeExited")}static inspectNodeHandler=null;getOverlayAgent(){return this.overlayAgent}async hasStyleSheetText(e){return await this.#Ns.initializeStyleSheetText(e)}}class Bs{#lt;#Fs;#Bs;#_s;#Hs={showCSS:!1,selectedPlatform:"Windows",themeColor:"#ffffff"};constructor(e){this.#lt=e}get selectedPlatform(){return this.#Hs.selectedPlatform}set selectedPlatform(e){this.#Hs.selectedPlatform=e}get themeColor(){return this.#Hs.themeColor}set themeColor(e){this.#Hs.themeColor=e}get config(){return this.#Hs}async initializeStyleSheetText(e){if(this.#Fs&&e===this.#_s)return!0;const t=this.#Us(e);if(!t)return!1;if(this.#Bs=this.#qs(t),!this.#Bs)return!1;const n=await this.#lt.getStyleSheetText(this.#Bs);return!!n&&(this.#Fs=n,this.#_s=e,!0)}async toggleEmulatedOverlay(e){if(this.#Bs&&this.#Fs)if(e){const e=Bs.#zs(this.#Hs.selectedPlatform.toLowerCase(),this.#Fs);e&&await this.#lt.setStyleSheetText(this.#Bs,e,!1)}else await this.#lt.setStyleSheetText(this.#Bs,this.#Fs,!1)}static#zs(e,t){const n=Ns[e];return Bs.#js(n.x,n.y,n.width,n.height,t)}#Us(t){const n=e.ParsedURL.ParsedURL.extractOrigin(t),r=this.#lt.styleSheetHeaders().find((e=>e.sourceURL&&e.sourceURL.includes(n)));return r?.sourceURL}#qs(e){const t=this.#lt.getStyleSheetIdsForURL(e);return t.length>0?t[0]:void 0}static#js(e,t,n,r,s){if(!s)return;return s.replace(/: env\(titlebar-area-x(?:,[^)]*)?\);/g,`: env(titlebar-area-x, ${e}px);`).replace(/: env\(titlebar-area-y(?:,[^)]*)?\);/g,`: env(titlebar-area-y, ${t}px);`).replace(/: env\(titlebar-area-width(?:,[^)]*)?\);/g,`: env(titlebar-area-width, calc(100% - ${n}px));`).replace(/: env\(titlebar-area-height(?:,[^)]*)?\);/g,`: env(titlebar-area-height, ${r}px);`)}transformStyleSheetforTesting(e,t,n,r,s){return Bs.#js(e,t,n,r,s)}}class _s{#os;constructor(e){this.#os=e}highlightInOverlay(e,t){const{node:n,deferredNode:r,object:s,selectorList:i}={node:void 0,deferredNode:void 0,object:void 0,selectorList:void 0,...e},o=n?n.id:void 0,a=r?r.backendNodeId():void 0,l=s?s.objectId:void 0;o||a||l?this.#os.target().overlayAgent().invoke_highlightNode({highlightConfig:t,nodeId:o,backendNodeId:a,objectId:l,selector:i}):this.#os.target().overlayAgent().invoke_hideHighlight()}async setInspectMode(e,t){await this.#os.target().overlayAgent().invoke_setInspectMode({mode:e,highlightConfig:t})}highlightFrame(t){this.#os.target().overlayAgent().invoke_highlightFrame({frameId:t,contentColor:e.Color.PageHighlight.Content.toProtocolRGBA(),contentOutlineColor:e.Color.PageHighlight.ContentOutline.toProtocolRGBA()})}}class Hs{#os;constructor(e){this.#os=e}highlightSourceOrderInOverlay(e,t){this.#os.setSourceOrderActive(!0),this.#os.setShowViewportSizeOnResize(!1),this.#os.getOverlayAgent().invoke_highlightSourceOrder({sourceOrderConfig:t,nodeId:e.id})}hideSourceOrderHighlight(){this.#os.setSourceOrderActive(!1),this.#os.setShowViewportSizeOnResize(!0),this.#os.clearHighlight()}}h.register(Fs,{capabilities:2,autostart:!0});var Us,qs=Object.freeze({__proto__:null,OverlayModel:Fs,SourceOrderHighlighter:Hs,WindowControls:Bs});class zs{#Vs;#Ws;ownerDocument;#Gs;id;index=void 0;#Ks;#Qs;#$s;#Xs;nodeValueInternal;#Js;#Ys;#Zs;#ei;#ti;#ni;#ri;#si=null;#ii=new Map;#oi=[];assignedSlot=null;shadowRootsInternal=[];#ai=new Map;#li=new Map;#di=0;childNodeCountInternal;childrenInternal=null;nextSibling=null;previousSibling=null;firstChild=null;lastChild=null;parentNode=null;templateContentInternal;contentDocumentInternal;childDocumentPromiseForTesting;#ci;publicId;systemId;internalSubset;name;value;constructor(e){this.#Vs=e,this.#Ws=this.#Vs.getAgent()}static create(e,t,n,r){const s=new zs(e);return s.init(t,n,r),s}init(e,t,n){if(this.#Ws=this.#Vs.getAgent(),this.ownerDocument=e,this.#Gs=t,this.id=n.nodeId,this.#Ks=n.backendNodeId,this.#Vs.registerNode(this),this.#Qs=n.nodeType,this.#$s=n.nodeName,this.#Xs=n.localName,this.nodeValueInternal=n.nodeValue,this.#Js=n.pseudoType,this.#Ys=n.pseudoIdentifier,this.#Zs=n.shadowRootType,this.#ei=n.frameId||null,this.#ti=n.xmlVersion,this.#ni=Boolean(n.isSVG),this.#ri=Boolean(n.isScrollable),n.attributes&&this.setAttributesPayload(n.attributes),this.childNodeCountInternal=n.childNodeCount||0,n.shadowRoots)for(let e=0;ee.creation||null)),this.#si}get subtreeMarkerCount(){return this.#di}domModel(){return this.#Vs}backendNodeId(){return this.#Ks}children(){return this.childrenInternal?this.childrenInternal.slice():null}setChildren(e){this.childrenInternal=e}setIsScrollable(e){this.#ri=e}hasAttributes(){return this.#ai.size>0}childNodeCount(){return this.childNodeCountInternal}setChildNodeCount(e){this.childNodeCountInternal=e}shadowRoots(){return this.shadowRootsInternal.slice()}templateContent(){return this.templateContentInternal||null}contentDocument(){return this.contentDocumentInternal||null}setContentDocument(e){this.contentDocumentInternal=e}isIframe(){return"IFRAME"===this.#$s}importedDocument(){return this.#ci||null}nodeType(){return this.#Qs}nodeName(){return this.#$s}pseudoType(){return this.#Js}pseudoIdentifier(){return this.#Ys}hasPseudoElements(){return this.#ii.size>0}pseudoElements(){return this.#ii}checkmarkPseudoElement(){return this.#ii.get("checkmark")?.at(-1)}beforePseudoElement(){return this.#ii.get("before")?.at(-1)}afterPseudoElement(){return this.#ii.get("after")?.at(-1)}pickerIconPseudoElement(){return this.#ii.get("picker-icon")?.at(-1)}markerPseudoElement(){return this.#ii.get("marker")?.at(-1)}backdropPseudoElement(){return this.#ii.get("backdrop")?.at(-1)}viewTransitionPseudoElements(){return[...this.#ii.get("view-transition")||[],...this.#ii.get("view-transition-group")||[],...this.#ii.get("view-transition-image-pair")||[],...this.#ii.get("view-transition-old")||[],...this.#ii.get("view-transition-new")||[]]}carouselPseudoElements(){return[...this.#ii.get("scroll-button")||[],...this.#ii.get("column")||[],...this.#ii.get("scroll-marker")||[],...this.#ii.get("scroll-marker-group")||[]]}hasAssignedSlot(){return null!==this.assignedSlot}isInsertionPoint(){return!this.isXMLNode()&&("SHADOW"===this.#$s||"CONTENT"===this.#$s||"SLOT"===this.#$s)}distributedNodes(){return this.#oi}isInShadowTree(){return this.#Gs}ancestorShadowHost(){const e=this.ancestorShadowRoot();return e?e.parentNode:null}ancestorShadowRoot(){if(!this.#Gs)return null;let e=this;for(;e&&!e.isShadowRoot();)e=e.parentNode;return e}ancestorUserAgentShadowRoot(){const e=this.ancestorShadowRoot();return e&&e.shadowRootType()===zs.ShadowRootTypes.UserAgent?e:null}isShadowRoot(){return Boolean(this.#Zs)}shadowRootType(){return this.#Zs||null}nodeNameInCorrectCase(){const e=this.shadowRootType();return e?"#shadow-root ("+e+")":this.localName()?this.localName().length!==this.nodeName().length?this.nodeName():this.localName():this.nodeName()}setNodeName(e,t){this.#Ws.invoke_setNodeName({nodeId:this.id,name:e}).then((e=>{e.getError()||this.#Vs.markUndoableState(),t&&t(e.getError()||null,this.#Vs.nodeForId(e.nodeId))}))}localName(){return this.#Xs}nodeValue(){return this.nodeValueInternal}setNodeValueInternal(e){this.nodeValueInternal=e}setNodeValue(e,t){this.#Ws.invoke_setNodeValue({nodeId:this.id,value:e}).then((e=>{e.getError()||this.#Vs.markUndoableState(),t&&t(e.getError()||null)}))}getAttribute(e){const t=this.#ai.get(e);return t?t.value:void 0}setAttribute(e,t,n){this.#Ws.invoke_setAttributesAsText({nodeId:this.id,text:t,name:e}).then((e=>{e.getError()||this.#Vs.markUndoableState(),n&&n(e.getError()||null)}))}setAttributeValue(e,t,n){this.#Ws.invoke_setAttributeValue({nodeId:this.id,name:e,value:t}).then((e=>{e.getError()||this.#Vs.markUndoableState(),n&&n(e.getError()||null)}))}setAttributeValuePromise(e,t){return new Promise((n=>this.setAttributeValue(e,t,n)))}attributes(){return[...this.#ai.values()]}async removeAttribute(e){(await this.#Ws.invoke_removeAttribute({nodeId:this.id,name:e})).getError()||(this.#ai.delete(e),this.#Vs.markUndoableState())}getChildNodesPromise(){return new Promise((e=>this.getChildNodes((t=>e(t)))))}getChildNodes(e){this.childrenInternal?e(this.children()):this.#Ws.invoke_requestChildNodes({nodeId:this.id}).then((t=>{e(t.getError()?null:this.children())}))}async getSubtree(e,t){return(await this.#Ws.invoke_requestChildNodes({nodeId:this.id,depth:e,pierce:t})).getError()?null:this.childrenInternal}async getOuterHTML(){const{outerHTML:e}=await this.#Ws.invoke_getOuterHTML({nodeId:this.id});return e}setOuterHTML(e,t){this.#Ws.invoke_setOuterHTML({nodeId:this.id,outerHTML:e}).then((e=>{e.getError()||this.#Vs.markUndoableState(),t&&t(e.getError()||null)}))}removeNode(e){return this.#Ws.invoke_removeNode({nodeId:this.id}).then((t=>{t.getError()||this.#Vs.markUndoableState(),e&&e(t.getError()||null)}))}async copyNode(){const{outerHTML:e}=await this.#Ws.invoke_getOuterHTML({nodeId:this.id});return null!==e&&a.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(e),e}path(){function e(e){return e.#$s.length?void 0!==e.index?e.index:e.parentNode?e.isShadowRoot()?e.shadowRootType()===zs.ShadowRootTypes.UserAgent?"u":"a":e.nodeType()===Node.DOCUMENT_NODE?"d":null:null:null}const t=[];let n=this;for(;n;){const r=e(n);if(null===r)break;t.push([r,n.#$s]),n=n.parentNode}return t.reverse(),t.join(",")}isAncestor(e){if(!e)return!1;let t=e.parentNode;for(;t;){if(this===t)return!0;t=t.parentNode}return!1}isDescendant(e){return e.isAncestor(this)}frameOwnerFrameId(){return this.#ei}frameId(){let e=this.parentNode||this;for(;!e.#ei&&e.parentNode;)e=e.parentNode;return e.#ei}setAttributesPayload(e){let t=!this.#ai||e.length!==2*this.#ai.size;const n=this.#ai||new Map;this.#ai=new Map;for(let r=0;rt!==e));n&&n.length>0?this.#ii.set(t,n):this.#ii.delete(t)}else{const t=this.shadowRootsInternal.indexOf(e);if(-1!==t)this.shadowRootsInternal.splice(t,1);else{if(!this.childrenInternal)throw new Error("DOMNode._children is expected to not be null.");if(-1===this.childrenInternal.indexOf(e))throw new Error("DOMNode._children is expected to contain the node to be removed.");this.childrenInternal.splice(this.childrenInternal.indexOf(e),1)}}e.parentNode=null,this.#di-=e.#di,e.#di&&this.#Vs.dispatchEventToListeners(Us.MarkersChanged,this),this.renumber()}setChildrenPayload(e){this.childrenInternal=[];for(let t=0;t=0?this.childrenInternal[e-1]:null,t.parentNode=this}}addAttribute(e,t){const n={name:e,value:t,_node:this};this.#ai.set(e,n)}setAttributeInternal(e,t){const n=this.#ai.get(e);n?n.value=t:this.addAttribute(e,t)}removeAttributeInternal(e){this.#ai.delete(e)}copyTo(e,t,n){this.#Ws.invoke_copyTo({nodeId:this.id,targetNodeId:e.id,insertBeforeNodeId:t?t.id:void 0}).then((e=>{e.getError()||this.#Vs.markUndoableState(),n&&n(e.getError()||null,this.#Vs.nodeForId(e.nodeId))}))}moveTo(e,t,n){this.#Ws.invoke_moveTo({nodeId:this.id,targetNodeId:e.id,insertBeforeNodeId:t?t.id:void 0}).then((e=>{e.getError()||this.#Vs.markUndoableState(),n&&n(e.getError()||null,this.#Vs.nodeForId(e.nodeId))}))}isXMLNode(){return Boolean(this.#ti)}setMarker(e,t){if(null!==t){if(this.parentNode&&!this.#li.has(e))for(let e=this;e;e=e.parentNode)++e.#di;this.#li.set(e,t);for(let e=this;e;e=e.parentNode)this.#Vs.dispatchEventToListeners(Us.MarkersChanged,e)}else{if(!this.#li.has(e))return;this.#li.delete(e);for(let e=this;e;e=e.parentNode)--e.#di;for(let e=this;e;e=e.parentNode)this.#Vs.dispatchEventToListeners(Us.MarkersChanged,e)}}marker(e){return this.#li.get(e)||null}getMarkerKeysForTest(){return[...this.#li.keys()]}traverseMarkers(e){!function t(n){if(n.#di){for(const t of n.#li.keys())e(n,t);if(n.childrenInternal)for(const e of n.childrenInternal)t(e)}}(this)}resolveURL(t){if(!t)return t;for(let n=this;n;n=n.parentNode)if(n instanceof Ws&&n.baseURL)return e.ParsedURL.ParsedURL.completeURL(n.baseURL,t);return null}highlight(e){this.#Vs.overlayModel().highlightInOverlay({node:this,selectorList:void 0},e)}highlightForTwoSeconds(){this.#Vs.overlayModel().highlightInOverlayForTwoSeconds({node:this,selectorList:void 0})}async resolveToObject(e,t){const{object:n}=await this.#Ws.invoke_resolveNode({nodeId:this.id,backendNodeId:void 0,executionContextId:t,objectGroup:e});return n&&this.#Vs.runtimeModelInternal.createRemoteObject(n)||null}async boxModel(){const{model:e}=await this.#Ws.invoke_getBoxModel({nodeId:this.id});return e}async setAsInspectedNode(){let e=this;for(e?.pseudoType()&&(e=e.parentNode);e;){let t=e.ancestorUserAgentShadowRoot();if(!t)break;if(t=e.ancestorShadowHost(),!t)break;e=t}if(!e)throw new Error("In DOMNode.setAsInspectedNode: node is expected to not be null.");await this.#Ws.invoke_setInspectedNode({nodeId:e.id})}enclosingElementOrSelf(){let e=this;return e&&e.nodeType()===Node.TEXT_NODE&&e.parentNode&&(e=e.parentNode),e&&e.nodeType()!==Node.ELEMENT_NODE&&(e=null),e}async callFunction(e,t=[]){const n=await this.resolveToObject();if(!n)return null;const r=await n.callFunction(e,t.map((e=>Bn.toCallArgument(e))));return n.release(),r.wasThrown||!r.object?null:{value:r.object.value}}async scrollIntoView(){const e=this.enclosingElementOrSelf();if(!e)return;await e.callFunction((function(){this.scrollIntoViewIfNeeded(!0)}))&&e.highlightForTwoSeconds()}async focus(){const e=this.enclosingElementOrSelf();if(!e)throw new Error("DOMNode.focus expects node to not be null.");await e.callFunction((function(){this.focus()}))&&(e.highlightForTwoSeconds(),await this.#Vs.target().pageAgent().invoke_bringToFront())}simpleSelector(){const e=this.localName()||this.nodeName().toLowerCase();if(this.nodeType()!==Node.ELEMENT_NODE)return e;const t=this.getAttribute("type"),n=this.getAttribute("id"),r=this.getAttribute("class");if("input"===e&&t&&!n&&!r)return e+'[type="'+CSS.escape(t)+'"]';if(n)return e+"#"+CSS.escape(n);if(r){return("div"===e?"":e)+"."+r.trim().split(/\s+/g).map((e=>CSS.escape(e))).join(".")}return this.pseudoIdentifier()?`${e}(${this.pseudoIdentifier()})`:e}async getAnchorBySpecifier(e){const t=await this.#Ws.invoke_getAnchorElement({nodeId:this.id,anchorSpecifier:e});return t.getError()?null:this.domModel().nodeForId(t.nodeId)}classNames(){const e=this.getAttribute("class");return e?e.split(/\s+/):[]}}!function(e){let t;!function(e){e.UserAgent="user-agent",e.Open="open",e.Closed="closed"}(t=e.ShadowRootTypes||(e.ShadowRootTypes={}))}(zs||(zs={}));class js{#Vs;#Ks;constructor(e,t){this.#Vs=e.model(Gs),this.#Ks=t}resolve(e){this.resolvePromise().then(e)}async resolvePromise(){const e=await this.#Vs.pushNodesByBackendIdsToFrontend(new Set([this.#Ks]));return e?.get(this.#Ks)||null}backendNodeId(){return this.#Ks}domModel(){return this.#Vs}highlight(){this.#Vs.overlayModel().highlightInOverlay({deferredNode:this,selectorList:void 0})}}class Vs{nodeType;nodeName;deferredNode;constructor(e,t,n,r){this.nodeType=n,this.nodeName=r,this.deferredNode=new js(e,t)}}class Ws extends zs{body;documentElement;documentURL;baseURL;constructor(e,t){super(e),this.body=null,this.documentElement=null,this.init(this,!1,t),this.documentURL=t.documentURL||"",this.baseURL=t.baseURL||""}}class Gs extends h{agent;idToDOMNode=new Map;#hi=null;#ui=new Set;runtimeModelInternal;#gi;#pi=null;#mi;#fi;#bi;constructor(e){super(e),this.agent=e.domAgent(),e.registerDOMDispatcher(new Ks(this)),this.runtimeModelInternal=e.model(Jr),e.suspended()||this.agent.invoke_enable({}),o.Runtime.experiments.isEnabled("capture-node-creation-stacks")&&this.agent.invoke_setNodeStackTracesEnabled({enable:!0})}runtimeModel(){return this.runtimeModelInternal}cssModel(){return this.target().model(Br)}overlayModel(){return this.target().model(Fs)}static cancelSearch(){for(const e of W.instance().models(Gs))e.cancelSearch()}scheduleMutationEvent(e){this.hasEventListeners(Us.DOMMutated)&&(this.#gi=(this.#gi||0)+1,Promise.resolve().then(function(e,t){if(!this.hasEventListeners(Us.DOMMutated)||this.#gi!==t)return;this.dispatchEventToListeners(Us.DOMMutated,e)}.bind(this,e,this.#gi)))}requestDocument(){return this.#hi?Promise.resolve(this.#hi):(this.#pi||(this.#pi=this.requestDocumentInternal()),this.#pi)}async getOwnerNodeForFrame(e){const t=await this.agent.invoke_getFrameOwner({frameId:e});return t.getError()?null:new js(this.target(),t.backendNodeId)}async requestDocumentInternal(){const e=await this.agent.invoke_getDocument({});if(e.getError())return null;const{root:t}=e;if(this.#pi=null,t&&this.setDocument(t),!this.#hi)return console.error("No document"),null;const n=this.parentModel();if(n&&!this.#mi){await n.requestDocument();const e=this.target().model(ii)?.mainFrame;if(e){const t=await n.agent.invoke_getFrameOwner({frameId:e.id});!t.getError()&&t.nodeId&&(this.#mi=n.nodeForId(t.nodeId))}}if(this.#mi){const e=this.#mi.contentDocument();this.#mi.setContentDocument(this.#hi),this.#mi.setChildren([]),this.#hi?(this.#hi.parentNode=this.#mi,this.dispatchEventToListeners(Us.NodeInserted,this.#hi)):e&&this.dispatchEventToListeners(Us.NodeRemoved,{node:e,parent:this.#mi})}return this.#hi}existingDocument(){return this.#hi}async pushNodeToFrontend(e){await this.requestDocument();const{nodeId:t}=await this.agent.invoke_requestNode({objectId:e});return this.nodeForId(t)}pushNodeByPathToFrontend(e){return this.requestDocument().then((()=>this.agent.invoke_pushNodeByPathToFrontend({path:e}))).then((({nodeId:e})=>e))}async pushNodesByBackendIdsToFrontend(e){await this.requestDocument();const t=[...e],{nodeIds:n}=await this.agent.invoke_pushNodesByBackendIdsToFrontend({backendNodeIds:t});if(!n)return null;const r=new Map;for(let e=0;ethis.#ui.add(e))),this.#fi||(this.#fi=window.setTimeout(this.loadNodeAttributes.bind(this),20))}loadNodeAttributes(){this.#fi=void 0;for(const e of this.#ui)this.agent.invoke_getAttributes({nodeId:e}).then((({attributes:t})=>{if(!t)return;const n=this.idToDOMNode.get(e);n&&n.setAttributesPayload(t)&&(this.dispatchEventToListeners(Us.AttrModified,{node:n,name:"style"}),this.scheduleMutationEvent(n))}));this.#ui.clear()}characterDataModified(e,t){const n=this.idToDOMNode.get(e);n?(n.setNodeValueInternal(t),this.dispatchEventToListeners(Us.CharacterDataModified,n),this.scheduleMutationEvent(n)):console.error("nodeId could not be resolved to a node")}nodeForId(e){return e&&this.idToDOMNode.get(e)||null}documentUpdated(){const e=Boolean(this.#hi);this.setDocument(null),this.parentModel()&&e&&!this.#pi&&this.requestDocument()}setDocument(e){this.idToDOMNode=new Map,this.#hi=e&&"nodeId"in e?new Ws(this,e):null,$s.instance().dispose(this),this.parentModel()||this.dispatchEventToListeners(Us.DocumentUpdated,this)}setDocumentForTest(e){this.setDocument(e)}setDetachedRoot(e){"#document"===e.nodeName?new Ws(this,e):zs.create(this,null,!1,e)}setChildNodes(e,t){if(!e&&t.length)return void this.setDetachedRoot(t[0]);const n=this.idToDOMNode.get(e);n?.setChildrenPayload(t)}childNodeCountUpdated(e,t){const n=this.idToDOMNode.get(e);n?(n.setChildNodeCount(t),this.dispatchEventToListeners(Us.ChildNodeCountUpdated,n),this.scheduleMutationEvent(n)):console.error("nodeId could not be resolved to a node")}childNodeInserted(e,t,n){const r=this.idToDOMNode.get(e),s=this.idToDOMNode.get(t);if(!r)return void console.error("parentId could not be resolved to a node");const i=r.insertChild(s,n);this.idToDOMNode.set(i.id,i),this.dispatchEventToListeners(Us.NodeInserted,i),this.scheduleMutationEvent(i)}childNodeRemoved(e,t){const n=this.idToDOMNode.get(e),r=this.idToDOMNode.get(t);n&&r?(n.removeChild(r),this.unbind(r),this.dispatchEventToListeners(Us.NodeRemoved,{node:r,parent:n}),this.scheduleMutationEvent(r)):console.error("parentId or nodeId could not be resolved to a node")}shadowRootPushed(e,t){const n=this.idToDOMNode.get(e);if(!n)return;const r=zs.create(this,n.ownerDocument,!0,t);r.parentNode=n,this.idToDOMNode.set(r.id,r),n.shadowRootsInternal.unshift(r),this.dispatchEventToListeners(Us.NodeInserted,r),this.scheduleMutationEvent(r)}shadowRootPopped(e,t){const n=this.idToDOMNode.get(e);if(!n)return;const r=this.idToDOMNode.get(t);r&&(n.removeChild(r),this.unbind(r),this.dispatchEventToListeners(Us.NodeRemoved,{node:r,parent:n}),this.scheduleMutationEvent(r))}pseudoElementAdded(e,t){const n=this.idToDOMNode.get(e);if(!n)return;const r=zs.create(this,n.ownerDocument,!1,t);r.parentNode=n,this.idToDOMNode.set(r.id,r);const s=r.pseudoType();if(!s)throw new Error("DOMModel._pseudoElementAdded expects pseudoType to be defined.");const i=n.pseudoElements().get(s);if(i&&i.length>0){if(!s.startsWith("view-transition")&&!s.startsWith("scroll-")&&"column"!==s)throw new Error(`DOMModel.pseudoElementAdded expects parent to not already have this pseudo type added; only view-transition* and scrolling pseudo elements can coexist under the same parent. ${i.length} elements of type ${s} already exist on parent.`);i.push(r)}else n.pseudoElements().set(s,[r]);this.dispatchEventToListeners(Us.NodeInserted,r),this.scheduleMutationEvent(r)}scrollableFlagUpdated(e,t){const n=this.nodeForId(e);n&&n.isScrollable()!==t&&(n.setIsScrollable(t),this.dispatchEventToListeners(Us.ScrollableFlagUpdated,{node:n}))}topLayerElementsUpdated(){this.dispatchEventToListeners(Us.TopLayerElementsChanged)}pseudoElementRemoved(e,t){const n=this.idToDOMNode.get(e);if(!n)return;const r=this.idToDOMNode.get(t);r&&(n.removeChild(r),this.unbind(r),this.dispatchEventToListeners(Us.NodeRemoved,{node:r,parent:n}),this.scheduleMutationEvent(r))}distributedNodesUpdated(e,t){const n=this.idToDOMNode.get(e);n&&(n.setDistributedNodePayloads(t),this.dispatchEventToListeners(Us.DistributedNodesChanged,n),this.scheduleMutationEvent(n))}unbind(e){this.idToDOMNode.delete(e.id);const t=e.children();for(let e=0;t&&ee||[]))}querySelector(e,t){return this.agent.invoke_querySelector({nodeId:e,selector:t}).then((({nodeId:e})=>e))}querySelectorAll(e,t){return this.agent.invoke_querySelectorAll({nodeId:e,selector:t}).then((({nodeIds:e})=>e))}getTopLayerElements(){return this.agent.invoke_getTopLayerElements().then((({nodeIds:e})=>e))}getDetachedDOMNodes(){return this.agent.invoke_getDetachedDomNodes().then((({detachedNodes:e})=>e))}getElementByRelation(e,t){return this.agent.invoke_getElementByRelation({nodeId:e,relation:t}).then((({nodeId:e})=>e))}markUndoableState(e){$s.instance().markUndoableState(this,e||!1)}async nodeForLocation(e,t,n){const r=await this.agent.invoke_getNodeForLocation({x:e,y:t,includeUserAgentShadowDOM:n});return r.getError()||!r.nodeId?null:this.nodeForId(r.nodeId)}async getContainerForNode(e,t,n,r,s){const{nodeId:i}=await this.agent.invoke_getContainerForNode({nodeId:e,containerName:t,physicalAxes:n,logicalAxes:r,queriesScrollState:s});return i?this.nodeForId(i):null}pushObjectAsNodeToFrontend(e){return e.isNode()&&e.objectId?this.pushNodeToFrontend(e.objectId):Promise.resolve(null)}suspendModel(){return this.agent.invoke_disable().then((()=>this.setDocument(null)))}async resumeModel(){await this.agent.invoke_enable({})}dispose(){$s.instance().dispose(this)}parentModel(){const e=this.target().parentTarget();return e?e.model(Gs):null}getAgent(){return this.agent}registerNode(e){this.idToDOMNode.set(e.id,e)}}!function(e){e.AttrModified="AttrModified",e.AttrRemoved="AttrRemoved",e.CharacterDataModified="CharacterDataModified",e.DOMMutated="DOMMutated",e.NodeInserted="NodeInserted",e.NodeRemoved="NodeRemoved",e.DocumentUpdated="DocumentUpdated",e.ChildNodeCountUpdated="ChildNodeCountUpdated",e.DistributedNodesChanged="DistributedNodesChanged",e.MarkersChanged="MarkersChanged",e.TopLayerElementsChanged="TopLayerElementsChanged",e.ScrollableFlagUpdated="ScrollableFlagUpdated"}(Us||(Us={}));class Ks{#Yn;constructor(e){this.#Yn=e}documentUpdated(){this.#Yn.documentUpdated()}attributeModified({nodeId:e,name:t,value:n}){this.#Yn.attributeModified(e,t,n)}attributeRemoved({nodeId:e,name:t}){this.#Yn.attributeRemoved(e,t)}inlineStyleInvalidated({nodeIds:e}){this.#Yn.inlineStyleInvalidated(e)}characterDataModified({nodeId:e,characterData:t}){this.#Yn.characterDataModified(e,t)}setChildNodes({parentId:e,nodes:t}){this.#Yn.setChildNodes(e,t)}childNodeCountUpdated({nodeId:e,childNodeCount:t}){this.#Yn.childNodeCountUpdated(e,t)}childNodeInserted({parentNodeId:e,previousNodeId:t,node:n}){this.#Yn.childNodeInserted(e,t,n)}childNodeRemoved({parentNodeId:e,nodeId:t}){this.#Yn.childNodeRemoved(e,t)}shadowRootPushed({hostId:e,root:t}){this.#Yn.shadowRootPushed(e,t)}shadowRootPopped({hostId:e,rootId:t}){this.#Yn.shadowRootPopped(e,t)}pseudoElementAdded({parentId:e,pseudoElement:t}){this.#Yn.pseudoElementAdded(e,t)}pseudoElementRemoved({parentId:e,pseudoElementId:t}){this.#Yn.pseudoElementRemoved(e,t)}distributedNodesUpdated({insertionPointId:e,distributedNodes:t}){this.#Yn.distributedNodesUpdated(e,t)}topLayerElementsUpdated(){this.#Yn.topLayerElementsUpdated()}scrollableFlagUpdated({nodeId:e,isScrollable:t}){this.#Yn.scrollableFlagUpdated(e,t)}}let Qs=null;class $s{#Lt;#is;#yi;constructor(){this.#Lt=[],this.#is=0,this.#yi=null}static instance(e={forceNew:null}){const{forceNew:t}=e;return Qs&&!t||(Qs=new $s),Qs}async markUndoableState(e,t){this.#yi&&e!==this.#yi&&(this.#yi.markUndoableState(),this.#yi=null),t&&this.#yi===e||(this.#Lt=this.#Lt.slice(0,this.#is),this.#Lt.push(e),this.#is=this.#Lt.length,t?this.#yi=e:(await e.getAgent().invoke_markUndoableState(),this.#yi=null))}async undo(){if(0===this.#is)return await Promise.resolve();--this.#is,this.#yi=null,await this.#Lt[this.#is].getAgent().invoke_undo()}async redo(){if(this.#is>=this.#Lt.length)return await Promise.resolve();++this.#is,this.#yi=null,await this.#Lt[this.#is-1].getAgent().invoke_redo()}dispose(e){let t=0;for(let n=0;n(t.ContentData.ContentData.isError(e)||(this.#Ei=e),this.#Li=null,e)))),await this.#Li)}canonicalMimeType(){return this.contentType().canonicalMimeType()||this.mimeType}async searchInContent(e,n,r){if(!this.frameId)return[];if(this.request)return await this.request.searchInContent(e,n,r);const s=await this.#tr.target().pageAgent().invoke_searchInResource({frameId:this.frameId,url:this.url,query:e,caseSensitive:n,isRegex:r});return t.TextUtils.performSearchInSearchMatches(s.result||[],e,n,r)}async populateImageSource(e){const n=await this.requestContentData();t.ContentData.ContentData.isError(n)||(e.src=n.asDataUrl()??this.#Ii)}async innerRequestContent(){if(this.request)return await this.request.requestContentData();const e=await this.#tr.target().pageAgent().invoke_getResourceContent({frameId:this.frameId,url:this.url}),n=e.getError();return n?{error:n}:new t.ContentData.ContentData(e.content,e.base64Encoded,this.mimeType)}frame(){return this.#Si?this.#tr.frameForId(this.#Si):null}statusCode(){return this.#vi?this.#vi.statusCode:0}}var Ys,Zs=Object.freeze({__proto__:null,Resource:Js});class ei extends h{#Ai="";#Oi="";#Di=new Set;constructor(e){super(e)}updateSecurityOrigins(e){const t=this.#Di;this.#Di=e;for(const e of t)this.#Di.has(e)||this.dispatchEventToListeners(Ys.SecurityOriginRemoved,e);for(const e of this.#Di)t.has(e)||this.dispatchEventToListeners(Ys.SecurityOriginAdded,e)}securityOrigins(){return[...this.#Di]}mainSecurityOrigin(){return this.#Ai}unreachableMainSecurityOrigin(){return this.#Oi}setMainSecurityOrigin(e,t){this.#Ai=e,this.#Oi=t||null,this.dispatchEventToListeners(Ys.MainSecurityOriginChanged,{mainSecurityOrigin:this.#Ai,unreachableMainSecurityOrigin:this.#Oi})}}!function(e){e.SecurityOriginAdded="SecurityOriginAdded",e.SecurityOriginRemoved="SecurityOriginRemoved",e.MainSecurityOriginChanged="MainSecurityOriginChanged"}(Ys||(Ys={})),h.register(ei,{capabilities:0,autostart:!1});var ti=Object.freeze({__proto__:null,get Events(){return Ys},SecurityOriginManager:ei});class ni extends h{#Ni;#Fi;constructor(e){super(e),this.#Ni="",this.#Fi=new Set}updateStorageKeys(e){const t=this.#Fi;this.#Fi=e;for(const e of t)this.#Fi.has(e)||this.dispatchEventToListeners("StorageKeyRemoved",e);for(const e of this.#Fi)t.has(e)||this.dispatchEventToListeners("StorageKeyAdded",e)}storageKeys(){return[...this.#Fi]}mainStorageKey(){return this.#Ni}setMainStorageKey(e){this.#Ni=e,this.dispatchEventToListeners("MainStorageKeyChanged",{mainStorageKey:this.#Ni})}}h.register(ni,{capabilities:0,autostart:!1});var ri,si=Object.freeze({__proto__:null,StorageKeyManager:ni,parseStorageKey:function(t){const n=t.split("^"),r={origin:e.ParsedURL.ParsedURL.extractOrigin(n[0]),components:new Map};for(let e=1;e{this.processCachedResources(e.getError()?null:e.frameTree),this.mainFrame&&this.processPendingEvents(this.mainFrame)}))}static frameForRequest(e){const t=Z.forRequest(e),n=t?t.target().model(ii):null;return n&&e.frameId?n.frameForId(e.frameId):null}static frames(){const e=[];for(const t of W.instance().models(ii))e.push(...t.frames());return e}static resourceForURL(e){for(const t of W.instance().models(ii)){const n=t.mainFrame,r=n?n.resourceForURL(e):null;if(r)return r}return null}static reloadAllPages(e,t){for(const n of W.instance().models(ii))n.target().parentTarget()?.type()!==U.FRAME&&n.reloadPage(e,t)}async storageKeyForFrame(e){if(!this.framesInternal.has(e))return null;const t=await this.storageAgent.invoke_getStorageKeyForFrame({frameId:e});return"Frame tree node for given frame not found"===t.getError()?null:t.storageKey}domModel(){return this.target().model(Gs)}processCachedResources(e){e&&":"!==e.frame.url&&(this.dispatchEventToListeners(ri.WillLoadCachedResources),this.addFramesRecursively(null,e),this.target().setInspectedURL(e.frame.url)),this.#Hi=!0;const t=this.target().model(Jr);t&&(t.setExecutionContextComparator(this.executionContextComparator.bind(this)),t.fireExecutionContextOrderChanged()),this.dispatchEventToListeners(ri.CachedResourcesLoaded,this)}cachedResourcesLoaded(){return this.#Hi}addFrame(e,t){this.framesInternal.set(e.id,e),e.isMainFrame()&&(this.mainFrame=e),this.dispatchEventToListeners(ri.FrameAdded,e),this.updateSecurityOrigins(),this.updateStorageKeys()}frameAttached(e,t,n){const r=t&&this.framesInternal.get(t)||null;if(!this.#Hi&&r)return null;if(this.framesInternal.has(e))return null;const s=new oi(this,r,e,null,n||null);return t&&!r&&(s.crossTargetParentFrameId=t),s.isMainFrame()&&this.mainFrame&&this.frameDetached(this.mainFrame.id,!1),this.addFrame(s,!0),s}frameNavigated(e,t){const n=e.parentId&&this.framesInternal.get(e.parentId)||null;if(!this.#Hi&&n)return;let r=this.framesInternal.get(e.id)||null;if(!r&&(r=this.frameAttached(e.id,e.parentId||null),console.assert(Boolean(r)),!r))return;this.dispatchEventToListeners(ri.FrameWillNavigate,r),r.navigate(e),t&&(r.backForwardCacheDetails.restoredFromCache="BackForwardCacheRestore"===t),r.isMainFrame()&&this.target().setInspectedURL(r.url),this.dispatchEventToListeners(ri.FrameNavigated,r),r.isPrimaryFrame()&&this.primaryPageChanged(r,"Navigation");const s=r.resources();for(let e=0;e=0,"Unbalanced call to ResourceTreeModel.resumeReload()"),!this.#qi&&this.#Ui){const{ignoreCache:e,scriptToEvaluateOnLoad:t}=this.#Ui;this.reloadPage(e,t)}}reloadPage(e,t){const n=this.mainFrame?.loaderId;if(!n)return;if(this.#Ui||this.dispatchEventToListeners(ri.PageReloadRequested,this),this.#qi)return void(this.#Ui={ignoreCache:e,scriptToEvaluateOnLoad:t});this.#Ui=null;const r=this.target().model(Z);r&&r.clearRequests(),this.dispatchEventToListeners(ri.WillReloadPage),this.agent.invoke_reload({ignoreCache:e,scriptToEvaluateOnLoad:t,loaderId:n})}navigate(e){return this.agent.invoke_navigate({url:e})}async navigationHistory(){const e=await this.agent.invoke_getNavigationHistory();return e.getError()?null:{currentIndex:e.currentIndex,entries:e.entries}}navigateToHistoryEntry(e){this.agent.invoke_navigateToHistoryEntry({entryId:e.id})}setLifecycleEventsEnabled(e){return this.agent.invoke_setLifecycleEventsEnabled({enabled:e})}async fetchAppManifest(){const e=await this.agent.invoke_getAppManifest({});return e.getError()?{url:e.url,data:null,errors:[]}:{url:e.url,data:e.data||null,errors:e.errors}}async getInstallabilityErrors(){return(await this.agent.invoke_getInstallabilityErrors()).installabilityErrors||[]}async getAppId(){return await this.agent.invoke_getAppId()}executionContextComparator(e,t){function n(e){let t=e;const n=[];for(;t;)n.push(t),t=t.sameTargetParentFrame();return n.reverse()}if(e.target()!==t.target())return Zr.comparator(e,t);const r=e.frameId?n(this.frameForId(e.frameId)):[],s=t.frameId?n(this.frameForId(t.frameId)):[];let i,o;for(let e=0;;e++)if(!r[e]||!s[e]||r[e]!==s[e]){i=r[e],o=s[e];break}return!i&&o?-1:!o&&i?1:i&&o?i.id.localeCompare(o.id):Zr.comparator(e,t)}getSecurityOriginData(){const t=new Set;let n=null,r=null;for(const s of this.framesInternal.values()){const i=s.securityOrigin;if(i&&(t.add(i),s.isMainFrame()&&(n=i,s.unreachableUrl()))){r=new e.ParsedURL.ParsedURL(s.unreachableUrl()).securityOrigin()}}return{securityOrigins:t,mainSecurityOrigin:n,unreachableMainSecurityOrigin:r}}async getStorageKeyData(){const e=new Set;let t=null;for(const{isMainFrame:n,storageKey:r}of await Promise.all([...this.framesInternal.values()].map((e=>e.getStorageKey(!1).then((t=>({isMainFrame:e.isMainFrame(),storageKey:t})))))))n&&(t=r),r&&e.add(r);return{storageKeys:e,mainStorageKey:t}}updateSecurityOrigins(){const e=this.getSecurityOriginData();this.#Bi.setMainSecurityOrigin(e.mainSecurityOrigin||"",e.unreachableMainSecurityOrigin||""),this.#Bi.updateSecurityOrigins(e.securityOrigins)}async updateStorageKeys(){const e=await this.getStorageKeyData();this.#_i.setMainStorageKey(e.mainStorageKey||""),this.#_i.updateStorageKeys(e.storageKeys)}async getMainStorageKey(){return this.mainFrame?await this.mainFrame.getStorageKey(!1):null}getMainSecurityOrigin(){const e=this.getSecurityOriginData();return e.mainSecurityOrigin||e.unreachableMainSecurityOrigin}onBackForwardCacheNotUsed(e){this.mainFrame&&this.mainFrame.id===e.frameId&&this.mainFrame.loaderId===e.loaderId?(this.mainFrame.setBackForwardCacheDetails(e),this.dispatchEventToListeners(ri.BackForwardCacheDetailsUpdated,this.mainFrame)):this.#zi.add(e)}processPendingEvents(e){if(e.isMainFrame())for(const t of this.#zi)if(e.id===t.frameId&&e.loaderId===t.loaderId){e.setBackForwardCacheDetails(t),this.#zi.delete(t);break}}}!function(e){e.FrameAdded="FrameAdded",e.FrameNavigated="FrameNavigated",e.FrameDetached="FrameDetached",e.FrameResized="FrameResized",e.FrameWillNavigate="FrameWillNavigate",e.PrimaryPageChanged="PrimaryPageChanged",e.ResourceAdded="ResourceAdded",e.WillLoadCachedResources="WillLoadCachedResources",e.CachedResourcesLoaded="CachedResourcesLoaded",e.DOMContentLoaded="DOMContentLoaded",e.LifecycleEvent="LifecycleEvent",e.Load="Load",e.PageReloadRequested="PageReloadRequested",e.WillReloadPage="WillReloadPage",e.InterstitialShown="InterstitialShown",e.InterstitialHidden="InterstitialHidden",e.BackForwardCacheDetailsUpdated="BackForwardCacheDetailsUpdated",e.JavaScriptDialogOpening="JavaScriptDialogOpening"}(ri||(ri={}));class oi{#os;#Vi;#C;crossTargetParentFrameId=null;#ki;#h;#Ii;#Wi;#Gi;#Ki;#Qi;#$i;#Xi;#Ji;#Yi;#Zi;#eo;#to=null;#no=new Set;resourcesMap=new Map;backForwardCacheDetails={restoredFromCache:void 0,explanations:[],explanationsTree:void 0};constructor(e,t,n,s,i){this.#os=e,this.#Vi=t,this.#C=n,this.#ki=s?.loaderId??"",this.#h=s?.name,this.#Ii=s&&s.url||r.DevToolsPath.EmptyUrlString,this.#Wi=s?.domainAndRegistry||"",this.#Gi=s?.securityOrigin??null,this.#Ki=s?.securityOriginDetails,this.#$i=s&&s.unreachableUrl||r.DevToolsPath.EmptyUrlString,this.#Xi=s?.adFrameStatus,this.#Ji=s?.secureContextType??null,this.#Yi=s?.crossOriginIsolatedContextType??null,this.#Zi=s?.gatedAPIFeatures??null,this.#eo=i,this.#Vi&&this.#Vi.#no.add(this)}isSecureContext(){return null!==this.#Ji&&this.#Ji.startsWith("Secure")}getSecureContextType(){return this.#Ji}isCrossOriginIsolated(){return null!==this.#Yi&&this.#Yi.startsWith("Isolated")}getCrossOriginIsolatedContextType(){return this.#Yi}getGatedAPIFeatures(){return this.#Zi}getCreationStackTraceData(){return{creationStackTrace:this.#eo,creationStackTraceTarget:this.#to||this.resourceTreeModel().target()}}navigate(e){this.#ki=e.loaderId,this.#h=e.name,this.#Ii=e.url,this.#Wi=e.domainAndRegistry,this.#Gi=e.securityOrigin,this.#Ki=e.securityOriginDetails,this.getStorageKey(!0),this.#$i=e.unreachableUrl||r.DevToolsPath.EmptyUrlString,this.#Xi=e?.adFrameStatus,this.#Ji=e.secureContextType,this.#Yi=e.crossOriginIsolatedContextType,this.#Zi=e.gatedAPIFeatures,this.backForwardCacheDetails={restoredFromCache:void 0,explanations:[],explanationsTree:void 0};const t=this.resourcesMap.get(this.#Ii);this.resourcesMap.clear(),this.removeChildFrames(),t&&t.loaderId===this.#ki&&this.addResource(t)}resourceTreeModel(){return this.#os}get id(){return this.#C}get name(){return this.#h||""}get url(){return this.#Ii}domainAndRegistry(){return this.#Wi}async getAdScriptId(e){return(await this.#os.agent.invoke_getAdScriptId({frameId:e})).adScriptId||null}get securityOrigin(){return this.#Gi}get securityOriginDetails(){return this.#Ki??null}getStorageKey(e){return this.#Qi&&!e||(this.#Qi=this.#os.storageKeyForFrame(this.#C)),this.#Qi}unreachableUrl(){return this.#$i}get loaderId(){return this.#ki}adFrameType(){return this.#Xi?.adFrameType||"none"}adFrameStatus(){return this.#Xi}get childFrames(){return[...this.#no]}sameTargetParentFrame(){return this.#Vi}crossTargetParentFrame(){if(!this.crossTargetParentFrameId)return null;const e=this.#os.target().parentTarget();if(e?.type()!==U.FRAME)return null;const t=e.model(ii);return t&&t.framesInternal.get(this.crossTargetParentFrameId)||null}parentFrame(){return this.sameTargetParentFrame()||this.crossTargetParentFrame()}isMainFrame(){return!this.#Vi}isOutermostFrame(){return this.#os.target().parentTarget()?.type()!==U.FRAME&&!this.#Vi&&!this.crossTargetParentFrameId}isPrimaryFrame(){return!this.#Vi&&this.#os.target()===W.instance().primaryPageTarget()}removeChildFrame(e,t){this.#no.delete(e),e.remove(t)}removeChildFrames(){const e=this.#no;this.#no=new Set;for(const t of e)t.remove(!1)}remove(e){this.removeChildFrames(),this.#os.framesInternal.delete(this.id),this.#os.dispatchEventToListeners(ri.FrameDetached,{frame:this,isSwap:e})}addResource(e){this.resourcesMap.get(e.url)!==e&&(this.resourcesMap.set(e.url,e),this.#os.dispatchEventToListeners(ri.ResourceAdded,e))}addRequest(e){let t=this.resourcesMap.get(e.url());t&&t.request===e||(t=new Js(this.#os,e,e.url(),e.documentURL,e.frameId,e.loaderId,e.resourceType(),e.mimeType,null,null),this.resourcesMap.set(t.url,t),this.#os.dispatchEventToListeners(ri.ResourceAdded,t))}resources(){return Array.from(this.resourcesMap.values())}resourceForURL(e){const t=this.resourcesMap.get(e);if(t)return t;for(const t of this.#no){const n=t.resourceForURL(e);if(n)return n}return null}callForFrameResources(e){for(const t of this.resourcesMap.values())if(e(t))return!0;for(const t of this.#no)if(t.callForFrameResources(e))return!0;return!1}displayName(){if(this.isOutermostFrame())return n.i18n.lockedString("top");const t=new e.ParsedURL.ParsedURL(this.#Ii).displayName;return t?this.#h?this.#h+" ("+t+")":t:n.i18n.lockedString("iframe")}async getOwnerDeferredDOMNode(){const e=this.parentFrame();return e?await e.resourceTreeModel().domModel().getOwnerNodeForFrame(this.#C):null}async getOwnerDOMNodeOrDocument(){const e=await this.getOwnerDeferredDOMNode();return e?await e.resolvePromise():this.isOutermostFrame()?await this.resourceTreeModel().domModel().requestDocument():null}async highlight(){const e=this.parentFrame(),t=this.resourceTreeModel().target().parentTarget(),n=async e=>{const t=await e.getOwnerNodeForFrame(this.#C);t&&e.overlayModel().highlightInOverlay({deferredNode:t,selectorList:""},"all",!0)};if(e)return await n(e.resourceTreeModel().domModel());if(t?.type()===U.FRAME){const e=t.model(Gs);if(e)return await n(e)}const r=await this.resourceTreeModel().domModel().requestDocument();r&&this.resourceTreeModel().domModel().overlayModel().highlightInOverlay({node:r,selectorList:""},"all",!0)}async getPermissionsPolicyState(){const e=await this.resourceTreeModel().target().pageAgent().invoke_getPermissionsPolicyState({frameId:this.#C});return e.getError()?null:e.states}async getOriginTrials(){const e=await this.resourceTreeModel().target().pageAgent().invoke_getOriginTrials({frameId:this.#C});return e.getError()?[]:e.originTrials}setCreationStackTrace(e){this.#eo=e.creationStackTrace,this.#to=e.creationStackTraceTarget}setBackForwardCacheDetails(e){this.backForwardCacheDetails.restoredFromCache=!1,this.backForwardCacheDetails.explanations=e.notRestoredExplanations,this.backForwardCacheDetails.explanationsTree=e.notRestoredExplanationsTree}getResourcesMap(){return this.resourcesMap}}class ai{#tr;constructor(e){this.#tr=e}backForwardCacheNotUsed(e){this.#tr.onBackForwardCacheNotUsed(e)}domContentEventFired({timestamp:e}){this.#tr.dispatchEventToListeners(ri.DOMContentLoaded,e)}loadEventFired({timestamp:e}){this.#tr.dispatchEventToListeners(ri.Load,{resourceTreeModel:this.#tr,loadTime:e})}lifecycleEvent({frameId:e,name:t}){this.#tr.dispatchEventToListeners(ri.LifecycleEvent,{frameId:e,name:t})}frameAttached({frameId:e,parentFrameId:t,stack:n}){this.#tr.frameAttached(e,t,n)}frameNavigated({frame:e,type:t}){this.#tr.frameNavigated(e,t)}documentOpened({frame:e}){this.#tr.documentOpened(e)}frameDetached({frameId:e,reason:t}){this.#tr.frameDetached(e,"swap"===t)}frameSubtreeWillBeDetached(e){}frameStartedLoading({}){}frameStoppedLoading({}){}frameRequestedNavigation({}){}frameScheduledNavigation({}){}frameClearedScheduledNavigation({}){}frameStartedNavigating({}){}navigatedWithinDocument({}){}frameResized(){this.#tr.dispatchEventToListeners(ri.FrameResized)}javascriptDialogOpening(e){this.#tr.dispatchEventToListeners(ri.JavaScriptDialogOpening,e),e.hasBrowserHandler||this.#tr.agent.invoke_handleJavaScriptDialog({accept:!1})}javascriptDialogClosed({}){}screencastFrame({}){}screencastVisibilityChanged({}){}interstitialShown(){this.#tr.isInterstitialShowing=!0,this.#tr.dispatchEventToListeners(ri.InterstitialShown)}interstitialHidden(){this.#tr.isInterstitialShowing=!1,this.#tr.dispatchEventToListeners(ri.InterstitialHidden)}windowOpen({}){}compilationCacheProduced({}){}fileChooserOpened({}){}downloadWillBegin({}){}downloadProgress(){}}h.register(ii,{capabilities:2,autostart:!0,early:!0});var li=Object.freeze({__proto__:null,get Events(){return ri},PageDispatcher:ai,ResourceTreeFrame:oi,ResourceTreeModel:ii});class di extends h{#ro=new Map;#so=new Map;#io=new e.Throttler.Throttler(300);#oo=new Map;constructor(e){super(e),e.model(ii)?.addEventListener(ri.PrimaryPageChanged,this.#ao,this),e.model(Z)?.addEventListener(ee.ResponseReceived,this.#lo,this),e.model(Z)?.addEventListener(ee.LoadingFinished,this.#do,this)}addBlockedCookie(e,t){const n=e.key(),r=this.#ro.get(n);this.#ro.set(n,e),t?this.#so.set(e,t):this.#so.delete(e),r&&this.#so.delete(r)}removeBlockedCookie(e){this.#ro.delete(e.key())}async#ao(){this.#ro.clear(),this.#so.clear(),await this.#co()}getCookieToBlockedReasonsMap(){return this.#so}async#ho(e){const t=this.target().networkAgent(),n=new Map(await Promise.all(e.keysArray().map((n=>t.invoke_getCookies({urls:[...e.get(n).values()]}).then((({cookies:e})=>[n,e.map(H.fromProtocolCookie)])))))),r=this.#uo(n);this.#oo=n,r&&this.dispatchEventToListeners("CookieListUpdated")}async deleteCookie(e){await this.deleteCookies([e])}async clear(e,t){this.#go()||await this.#po();const n=e?this.#oo.get(e)||[]:[...this.#oo.values()].flat();if(n.push(...this.#ro.values()),t){const e=n.filter((e=>e.matchesSecurityOrigin(t)));await this.deleteCookies(e)}else await this.deleteCookies(n)}async saveCookie(e){let t,n=e.domain();n.startsWith(".")||(n=""),e.expires()&&(t=Math.floor(Date.parse(`${e.expires()}`)/1e3));const r=o.Runtime.experiments.isEnabled("experimental-cookie-features"),s={name:e.name(),value:e.value(),url:e.url()||void 0,domain:n,path:e.path(),secure:e.secure(),httpOnly:e.httpOnly(),sameSite:e.sameSite(),expires:t,priority:e.priority(),partitionKey:e.partitionKey(),sourceScheme:r?e.sourceScheme():(i=e.sourceScheme(),"Unset"===i?i:void 0),sourcePort:r?e.sourcePort():void 0};var i;const a=await this.target().networkAgent().invoke_setCookie(s);return!(a.getError()||!a.success)&&(await this.#po(),a.success)}async getCookiesForDomain(e,t){this.#go()&&!t||await this.#po();return(this.#oo.get(e)||[]).concat(Array.from(this.#ro.values()))}async deleteCookies(e){const t=this.target().networkAgent();this.#ro.clear(),this.#so.clear(),await Promise.all(e.map((e=>t.invoke_deleteCookies({name:e.name(),url:void 0,domain:e.domain(),path:e.path(),partitionKey:e.partitionKey()})))),await this.#po()}#go(){return Boolean(this.listeners?.size)}#uo(e){if(e.size!==this.#oo.size)return!0;for(const[t,n]of e){if(!this.#oo.has(t))return!0;const e=this.#oo.get(t)||[];if(n.length!==e.length)return!0;const r=e=>e.key()+" "+e.value(),s=new Set(e.map(r));for(const e of n)if(!s.has(r(e)))return!0}return!1}#po(){return this.#io.schedule((()=>this.#co()))}#co(){const t=new r.MapUtilities.Multimap;const n=this.target().model(ii);if(n){const r=n.mainFrame?.unreachableUrl();if(r){const n=e.ParsedURL.ParsedURL.fromString(r);n&&t.set(n.securityOrigin(),r)}n.forAllResources((function(n){const r=e.ParsedURL.ParsedURL.fromString(n.documentURL);return r&&t.set(r.securityOrigin(),n.url),!1}))}return this.#ho(t)}#lo(){this.#go()&&this.#po()}#do(){this.#go()&&this.#po()}}h.register(di,{capabilities:16,autostart:!1});var ci=Object.freeze({__proto__:null,CookieModel:di});class hi{#mo;#fo;#bo;#yo;#vo;#Io;#wo;constructor(e){e&&(this.#mo=e.toLowerCase().replace(/^\./,"")),this.#fo=[],this.#yo=0}static parseSetCookie(e,t){return new hi(t).parseSetCookie(e)}getCookieAttribute(e){if(!e)return null;switch(e.toLowerCase()){case"domain":return"domain";case"expires":return"expires";case"max-age":return"max-age";case"httponly":return"http-only";case"name":return"name";case"path":return"path";case"samesite":return"same-site";case"secure":return"secure";case"value":return"value";case"priority":return"priority";case"sourceport":return"source-port";case"sourcescheme":return"source-scheme";case"partitioned":return"partitioned";default:return console.error("Failed getting cookie attribute: "+e),null}}cookies(){return this.#fo}parseSetCookie(e){if(!this.initialize(e))return null;for(let e=this.extractKeyValue();e;e=this.extractKeyValue())this.#vo?this.#vo.addAttribute(this.getCookieAttribute(e.key),e.value):this.addCookie(e,1),this.advanceAndCheckCookieDelimiter()&&this.flushCookie();return this.flushCookie(),this.#fo}initialize(e){return this.#bo=e,"string"==typeof e&&(this.#fo=[],this.#vo=null,this.#Io="",this.#yo=this.#bo.length,!0)}flushCookie(){this.#vo&&(this.#vo.setSize(this.#yo-this.#bo.length-this.#wo),this.#vo.setCookieLine(this.#Io.replace("\n",""))),this.#vo=null,this.#Io=""}extractKeyValue(){if(!this.#bo||!this.#bo.length)return null;const e=/^[ \t]*([^=;\n]+)[ \t]*(?:=[ \t]*([^;\n]*))?/.exec(this.#bo);if(!e)return console.error("Failed parsing cookie header before: "+this.#bo),null;const t=new ui(e[1]?.trim(),e[2]?.trim(),this.#yo-this.#bo.length);return this.#Io+=e[0],this.#bo=this.#bo.slice(e[0].length),t}advanceAndCheckCookieDelimiter(){if(!this.#bo)return!1;const e=/^\s*[\n;]\s*/.exec(this.#bo);return!!e&&(this.#Io+=e[0],this.#bo=this.#bo.slice(e[0].length),null!==e[0].match("\n"))}addCookie(e,t){this.#vo&&this.#vo.setSize(e.position-this.#wo),this.#vo="string"==typeof e.value?new H(e.key,e.value,t):new H("",e.key,t),this.#mo&&this.#vo.addAttribute("domain",this.#mo),this.#wo=e.position,this.#fo.push(this.#vo)}}class ui{key;value;position;constructor(e,t,n){this.key=e,this.value=t,this.position=n}}var gi=Object.freeze({__proto__:null,CookieParser:hi});class pi{#So;#ko;#Co=!1;#xo="";#Ro="";#To="";#Mo="";constructor(e,t){this.#So=e,this.#ko=new mi(this.#Po.bind(this),t)}async addBase64Chunk(e){await this.#ko.addBase64Chunk(e)}#Po(e){let t=0;for(let n=0;n0){const e=this.#To.slice(0,-1);this.#So(this.#Mo||"message",e,this.#Ro),this.#To=""}return void(this.#Mo="")}let e,t=this.#xo.indexOf(":");t<0?(t=this.#xo.length,e=t):(e=t+1,ee.codePointAt(0)));await this.#Lo.ready,await this.#Lo.write(n)}}var fi=Object.freeze({__proto__:null,ServerSentEventsParser:pi});class bi{#Ao;#Oo;#Do=0;#No=[];constructor(e,n){this.#Ao=e,n&&(this.#Do=e.pseudoWallTime(e.startTime),this.#Oo=new pi(this.#Fo.bind(this),e.charset()??void 0),this.#Ao.requestStreamingContent().then((n=>{t.StreamingContentData.isError(n)||(this.#Oo?.addBase64Chunk(n.content().base64),n.addEventListener("ChunkAdded",(({data:{chunk:t}})=>{this.#Do=e.pseudoWallTime(e.endTime),this.#Oo?.addBase64Chunk(t)})))})))}get eventSourceMessages(){return this.#No}onProtocolEventSourceMessageReceived(e,t,n,r){this.#Bo({eventName:e,eventId:n,data:t,time:r})}#Fo(e,t,n){this.#Bo({eventName:e,eventId:n,data:t,time:this.#Do})}#Bo(e){this.#No.push(e),this.#Ao.dispatchEventToListeners(Ti.EVENT_SOURCE_MESSAGE_ADDED,e)}}const yi={deprecatedSyntaxFoundPleaseUse:"Deprecated syntax found. Please use: ;dur=;desc=",duplicateParameterSIgnored:'Duplicate parameter "{PH1}" ignored.',noValueFoundForParameterS:'No value found for parameter "{PH1}".',unrecognizedParameterS:'Unrecognized parameter "{PH1}".',extraneousTrailingCharacters:"Extraneous trailing characters.",unableToParseSValueS:'Unable to parse "{PH1}" value "{PH2}".'},vi=n.i18n.registerUIStrings("core/sdk/ServerTiming.ts",yi),Ii=n.i18n.getLocalizedString.bind(void 0,vi);class wi{metric;value;description;constructor(e,t,n){this.metric=e,this.value=t,this.description=n}static parseHeaders(e){const t=e.filter((e=>"server-timing"===e.name.toLowerCase()));if(!t.length)return null;const n=t.reduce(((e,t)=>{const n=this.createFromHeaderValue(t.value);return e.push(...n.map((function(e){return new wi(e.name,e.hasOwnProperty("dur")?e.dur:null,e.hasOwnProperty("desc")?e.desc:"")}))),e}),[]);return n.sort(((e,t)=>r.StringUtilities.compare(e.metric.toLowerCase(),t.metric.toLowerCase()))),n}static createFromHeaderValue(e){function t(){e=e.replace(/^\s*/,"")}function n(n){return console.assert(1===n.length),t(),e.charAt(0)===n&&(e=e.substring(1),!0)}function r(){const t=/^(?:\s*)([\w!#$%&'*+\-.^`|~]+)(?:\s*)(.*)/.exec(e);return t?(e=t[2],t[1]):null}function s(){return t(),'"'===e.charAt(0)?function(){console.assert('"'===e.charAt(0)),e=e.substring(1);let t="";for(;e.length;){const n=/^([^"\\]*)(.*)/.exec(e);if(!n)return null;if(t+=n[1],'"'===n[2].charAt(0))return e=n[2].substring(1),t;console.assert("\\"===n[2].charAt(0)),t+=n[2].charAt(1),e=n[2].substring(2)}return null}():r()}function i(){const t=/([,;].*)/.exec(e);t&&(e=t[1])}const o=[];let a;for(;null!==(a=r());){const t={name:a};for("="===e.charAt(0)&&this.showWarning(Ii(yi.deprecatedSyntaxFoundPleaseUse));n(";");){let e;if(null===(e=r()))continue;e=e.toLowerCase();const o=this.getParserForParameter(e);let a=null;if(n("=")&&(a=s(),i()),o){if(t.hasOwnProperty(e)){this.showWarning(Ii(yi.duplicateParameterSIgnored,{PH1:e}));continue}null===a&&this.showWarning(Ii(yi.noValueFoundForParameterS,{PH1:e})),o.call(this,t,a)}else this.showWarning(Ii(yi.unrecognizedParameterS,{PH1:e}))}if(o.push(t),!n(","))break}return e.length&&this.showWarning(Ii(yi.extraneousTrailingCharacters)),o}static getParserForParameter(e){switch(e){case"dur":{function t(t,n){if(t.dur=0,null!==n){const r=parseFloat(n);if(isNaN(r))return void wi.showWarning(Ii(yi.unableToParseSValueS,{PH1:e,PH2:n}));t.dur=r}}return t}case"desc":{function n(e,t){e.desc=t||""}return n}default:return null}}static showWarning(t){e.Console.Console.instance().warn(`ServerTiming: ${t}`)}}var Si=Object.freeze({__proto__:null,ServerTiming:wi});const ki={binary:"(binary)",secureOnly:'This cookie was blocked because it had the "`Secure`" attribute and the connection was not secure.',notOnPath:"This cookie was blocked because its path was not an exact match for or a superdirectory of the request url's path.",domainMismatch:"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.",sameSiteStrict:'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.',sameSiteLax:'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.',sameSiteUnspecifiedTreatedAsLax:'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.',sameSiteNoneInsecure:'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.',userPreferences:"This cookie was blocked due to user preferences.",thirdPartyPhaseout:"This cookie was blocked either because of Chrome flags or browser configuration. Learn more in the Issues panel.",unknownError:"An unknown error was encountered when trying to send this cookie.",schemefulSameSiteStrict:'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.',schemefulSameSiteLax:'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.',schemefulSameSiteUnspecifiedTreatedAsLax:'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.',samePartyFromCrossPartyContext:"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.",nameValuePairExceedsMaxSize:"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.",thisSetcookieWasBlockedDueToUser:"This attempt to set a cookie via a `Set-Cookie` header was blocked due to user preferences.",thisSetcookieWasBlockedDueThirdPartyPhaseout:"Setting this cookie was blocked either because of Chrome flags or browser configuration. Learn more in the Issues panel.",thisSetcookieHadInvalidSyntax:"This `Set-Cookie` header had invalid syntax.",thisSetcookieHadADisallowedCharacter:"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).",theSchemeOfThisConnectionIsNot:"The scheme of this connection is not allowed to store cookies.",anUnknownErrorWasEncounteredWhenTrying:"An unknown error was encountered when trying to store this cookie.",thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax:'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.',thisSetcookieDidntSpecifyASamesite:'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.',thisSetcookieWasBlockedBecauseItHadTheSameparty:"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.",thisSetcookieWasBlockedBecauseItHadTheSamepartyAttribute:'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`".',blockedReasonSecureOnly:'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.',blockedReasonSameSiteStrictLax:'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.',blockedReasonSameSiteUnspecifiedTreatedAsLax:'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.',blockedReasonSameSiteNoneInsecure:'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`".',blockedReasonOverwriteSecure:"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.",blockedReasonInvalidDomain:"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.",blockedReasonInvalidPrefix:'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`.',thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize:"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.",setcookieHeaderIsIgnoredIn:"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.",exemptionReasonUserSetting:"This cookie is allowed by user preference.",exemptionReasonTPCDMetadata:"This cookie is allowed by a third-party cookie deprecation trial grace period. Learn more: goo.gle/dt-grace.",exemptionReasonTPCDDeprecationTrial:"This cookie is allowed by third-party cookie deprecation trial. Learn more: goo.gle/ps-dt.",exemptionReasonTopLevelTPCDDeprecationTrial:"This cookie is allowed by top-level third-party cookie deprecation trial. Learn more: goo.gle/ps-dt.",exemptionReasonTPCDHeuristics:"This cookie is allowed by third-party cookie heuristics. Learn more: goo.gle/hbe",exemptionReasonEnterprisePolicy:"This cookie is allowed by Chrome Enterprise policy. Learn more: goo.gle/ce-3pc",exemptionReasonStorageAccessAPI:"This cookie is allowed by the Storage Access API. Learn more: goo.gle/saa",exemptionReasonTopLevelStorageAccessAPI:"This cookie is allowed by the top-level Storage Access API. Learn more: goo.gle/saa-top",exemptionReasonScheme:"This cookie is allowed by the top-level url scheme"},Ci=n.i18n.registerUIStrings("core/sdk/NetworkRequest.ts",ki),xi=n.i18n.getLocalizedString.bind(void 0,Ci);class Ri extends e.ObjectWrapper.ObjectWrapper{#_o;#Ho;#wi;#Si;#ki;#Uo;#qo;#zo;#jo;#Vo;#Wo;#Go;#Ko;#Qo;#$o;#Xo;#Jo;statusCode;statusText;requestMethod;requestTime;protocol;alternateProtocolUsage;mixedContentType;#Yo;#Zo;#ea;#ta;#na;#ra;#sa;#ia;#oa;#aa;#la;#da;#ca;#ha;#ua;#ga;#pa;#ma;#fa;#ba;#ya;connectionId;connectionReused;hasNetworkData;#va;#Ia;#wa;#Sa;#ka;#Ca;#xa;#Ra;#Ta;#Ma;#Pa;localizedFailDescription;#Ii;#Ea;#La;#ge;#Aa;#Oa;#Da;#xi;#Na;#Pi;#h;#Fa;#Ba;#_a;#Ha;#Ua;#qa;#za;#ja;#Va;#Wa;#Ga;#Ka;#Qa;#$a;#Xa;#Ja;#Ya;#Za;#el;#tl;#nl;#rl;#sl;#il;#ol;#al;#ll;#dl=new Map;#cl;#hl;#ul;responseReceivedPromise;responseReceivedPromiseResolve;directSocketInfo;constructor(t,n,r,s,i,o,a,l){super(),this.#_o=t,this.#Ho=n,this.setUrl(r),this.#wi=s,this.#Si=i,this.#ki=o,this.#qo=a,this.#Uo=l,this.#zo=null,this.#jo=null,this.#Vo=null,this.#Wo=!1,this.#Go=null,this.#Ko=-1,this.#Qo=-1,this.#$o=-1,this.#Xo=void 0,this.#Jo=void 0,this.statusCode=0,this.statusText="",this.requestMethod="",this.requestTime=0,this.protocol="",this.alternateProtocolUsage=void 0,this.mixedContentType="none",this.#Yo=null,this.#Zo=null,this.#ea=null,this.#ta=null,this.#na=null,this.#ra=e.ResourceType.resourceTypes.Other,this.#sa=null,this.#ia=null,this.#oa=[],this.#aa={},this.#la="",this.#da=[],this.#ha=[],this.#ua=[],this.#ga={},this.#pa="",this.#ma="Unknown",this.#fa=null,this.#ba="unknown",this.#ya=null,this.connectionId="0",this.connectionReused=!1,this.hasNetworkData=!1,this.#va=null,this.#Ia=Promise.resolve(null),this.#wa=!1,this.#Sa=!1,this.#ka=[],this.#Ca=[],this.#xa=[],this.#Ra=[],this.#Pa=!1,this.#Ta=null,this.#Ma=null,this.localizedFailDescription=null,this.#al=null,this.#ll=!1,this.#cl=!1,this.#hl=!1}static create(e,t,n,r,s,i,o){return new Ri(e,e,t,n,r,s,i,o)}static createForWebSocket(e,t,n){return new Ri(e,e,t,r.DevToolsPath.EmptyUrlString,null,null,n||null)}static createWithoutBackendRequest(e,t,n,r){return new Ri(e,void 0,t,n,null,null,r)}identityCompare(e){const t=this.requestId(),n=e.requestId();return t>n?1:te&&(this.#Ea=e)),this.dispatchEventToListeners(Ti.TIMING_CHANGED,this)}get duration(){return-1===this.#$o||-1===this.#Qo?-1:this.#$o-this.#Qo}get latency(){return-1===this.#Ea||-1===this.#Qo?-1:this.#Ea-this.#Qo}get resourceSize(){return this.#Va||0}set resourceSize(e){this.#Va=e}get transferSize(){return this.#La||0}increaseTransferSize(e){this.#La=(this.#La||0)+e}setTransferSize(e){this.#La=e}get finished(){return this.#ge}set finished(e){this.#ge!==e&&(this.#ge=e,e&&this.dispatchEventToListeners(Ti.FINISHED_LOADING,this))}get failed(){return this.#Aa}set failed(e){this.#Aa=e}get canceled(){return this.#Oa}set canceled(e){this.#Oa=e}get preserved(){return this.#Da}set preserved(e){this.#Da=e}blockedReason(){return this.#Xo}setBlockedReason(e){this.#Xo=e}corsErrorStatus(){return this.#Jo}setCorsErrorStatus(e){this.#Jo=e}wasBlocked(){return Boolean(this.#Xo)}cached(){return(Boolean(this.#Wa)||Boolean(this.#Ga))&&!this.#La}cachedInMemory(){return Boolean(this.#Wa)&&!this.#La}fromPrefetchCache(){return Boolean(this.#Ka)}setFromMemoryCache(){this.#Wa=!0,this.#Ja=void 0}get fromDiskCache(){return this.#Ga}setFromDiskCache(){this.#Ga=!0}setFromPrefetchCache(){this.#Ka=!0}fromEarlyHints(){return Boolean(this.#Qa)}setFromEarlyHints(){this.#Qa=!0}get fetchedViaServiceWorker(){return Boolean(this.#$a)}set fetchedViaServiceWorker(e){this.#$a=e}get serviceWorkerRouterInfo(){return this.#Xa}set serviceWorkerRouterInfo(e){this.#Xa=e}initiatedByServiceWorker(){const e=Z.forRequest(this);return!!e&&e.target().type()===U.ServiceWorker}get timing(){return this.#Ja}set timing(e){if(!e||this.#Wa)return;this.#Qo=e.requestTime;const t=e.requestTime+e.receiveHeadersEnd/1e3;((this.#Ea||-1)<0||this.#Ea>t)&&(this.#Ea=t),this.#Qo>this.#Ea&&(this.#Ea=this.#Qo),this.#Ja=e,this.dispatchEventToListeners(Ti.TIMING_CHANGED,this)}setConnectTimingFromExtraInfo(e){this.#Qo=e.requestTime,this.dispatchEventToListeners(Ti.TIMING_CHANGED,this)}get mimeType(){return this.#xi}set mimeType(t){if(this.#xi=t,"text/event-stream"===t&&!this.#ul){const t=this.resourceType()!==e.ResourceType.resourceTypes.EventSource;this.#ul=new bi(this,t)}}get displayName(){return this.#Pi.displayName}name(){return this.#h||this.parseNameAndPathFromURL(),this.#h}path(){return this.#Fa||this.parseNameAndPathFromURL(),this.#Fa}parseNameAndPathFromURL(){if(this.#Pi.isDataURL())this.#h=this.#Pi.dataURLDisplayName(),this.#Fa="";else if(this.#Pi.isBlobURL())this.#h=this.#Pi.url,this.#Fa="";else if(this.#Pi.isAboutBlank())this.#h=this.#Pi.url,this.#Fa="";else{this.#Fa=this.#Pi.host+this.#Pi.folderPathComponents;const t=Z.forRequest(this),n=t?e.ParsedURL.ParsedURL.fromString(t.target().inspectedURL()):null;this.#Fa=r.StringUtilities.trimURL(this.#Fa,n?n.host:""),this.#Pi.lastPathComponent||this.#Pi.queryParams?this.#h=this.#Pi.lastPathComponent+(this.#Pi.queryParams?"?"+this.#Pi.queryParams:""):this.#Pi.folderPathComponents?(this.#h=this.#Pi.folderPathComponents.substring(this.#Pi.folderPathComponents.lastIndexOf("/")+1)+"/",this.#Fa=this.#Fa.substring(0,this.#Fa.lastIndexOf("/"))):(this.#h=this.#Pi.host,this.#Fa="")}}get folder(){let e=this.#Pi.path;const t=e.indexOf("?");-1!==t&&(e=e.substring(0,t));const n=e.lastIndexOf("/");return-1!==n?e.substring(0,n):""}get pathname(){return this.#Pi.path}resourceType(){return this.#ra}setResourceType(e){this.#ra=e}get domain(){return this.#Pi.host}get scheme(){return this.#Pi.scheme}getInferredStatusText(){return this.statusText||(e=this.statusCode,n.i18n.lockedString({100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Content Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"}[e]??""));var e}redirectSource(){return this.#zo}setRedirectSource(e){this.#zo=e}preflightRequest(){return this.#jo}setPreflightRequest(e){this.#jo=e}preflightInitiatorRequest(){return this.#Vo}setPreflightInitiatorRequest(e){this.#Vo=e}isPreflightRequest(){return null!==this.#qo&&void 0!==this.#qo&&"preflight"===this.#qo.type}redirectDestination(){return this.#Go}setRedirectDestination(e){this.#Go=e}requestHeaders(){return this.#ua}setRequestHeaders(e){this.#ua=e,this.dispatchEventToListeners(Ti.REQUEST_HEADERS_CHANGED)}requestHeadersText(){return this.#Ya}setRequestHeadersText(e){this.#Ya=e,this.dispatchEventToListeners(Ti.REQUEST_HEADERS_CHANGED)}requestHeaderValue(e){return this.#ga[e]||(this.#ga[e]=this.computeHeaderValue(this.requestHeaders(),e)),this.#ga[e]}requestFormData(){return this.#Ia||(this.#Ia=Z.requestPostData(this)),this.#Ia}setRequestFormData(e,t){this.#Ia=e&&null===t?null:Promise.resolve(t),this.#va=null}filteredProtocolName(){const e=this.protocol.toLowerCase();return"h2"===e?"http/2.0":e.replace(/^http\/2(\.0)?\+/,"http/2.0+")}requestHttpVersion(){const e=this.requestHeadersText();if(!e){const e=this.requestHeaderValue("version")||this.requestHeaderValue(":version");return e||this.filteredProtocolName()}const t=e.split(/\r\n/)[0].match(/(HTTP\/\d+\.\d+)$/);return t?t[1]:"HTTP/0.9"}get responseHeaders(){return this.#Za||[]}set responseHeaders(e){this.#Za=e,this.#tl=void 0,this.#rl=void 0,this.#nl=void 0,this.#aa={},this.dispatchEventToListeners(Ti.RESPONSE_HEADERS_CHANGED)}get earlyHintsHeaders(){return this.#el||[]}set earlyHintsHeaders(e){this.#el=e}get originalResponseHeaders(){return this.#da}set originalResponseHeaders(e){this.#da=e,this.#ca=void 0}get setCookieHeaders(){return this.#ha}set setCookieHeaders(e){this.#ha=e}get responseHeadersText(){return this.#la}set responseHeadersText(e){this.#la=e,this.dispatchEventToListeners(Ti.RESPONSE_HEADERS_CHANGED)}get sortedResponseHeaders(){return void 0!==this.#tl?this.#tl:(this.#tl=this.responseHeaders.slice(),this.#tl.sort((function(e,t){return r.StringUtilities.compare(e.name.toLowerCase(),t.name.toLowerCase())})))}get sortedOriginalResponseHeaders(){return void 0!==this.#ca?this.#ca:(this.#ca=this.originalResponseHeaders.slice(),this.#ca.sort((function(e,t){return r.StringUtilities.compare(e.name.toLowerCase(),t.name.toLowerCase())})))}get overrideTypes(){const e=[];return this.hasOverriddenContent&&e.push("content"),this.hasOverriddenHeaders()&&e.push("headers"),e}get hasOverriddenContent(){return this.#cl}set hasOverriddenContent(e){this.#cl=e}#gl(e){const t=[];for(const n of e)t.length&&t[t.length-1].name===n.name?t[t.length-1].value+=`, ${n.value}`:t.push({name:n.name,value:n.value});return t}hasOverriddenHeaders(){if(!this.#da.length)return!1;const e=this.#gl(this.sortedResponseHeaders),t=this.#gl(this.sortedOriginalResponseHeaders);if(e.length!==t.length)return!0;for(let n=0;ne.cookie)),...this.responseCookies,...this.blockedRequestCookies().map((e=>e.cookie)),...this.blockedResponseCookies().map((e=>e.cookie))].filter((e=>!!e))}get serverTimings(){return void 0===this.#rl&&(this.#rl=wi.parseHeaders(this.responseHeaders)),this.#rl}queryString(){if(void 0!==this.#sl)return this.#sl;let e=null;const t=this.url(),n=t.indexOf("?");if(-1!==n){e=t.substring(n+1);const r=e.indexOf("#");-1!==r&&(e=e.substring(0,r))}return this.#sl=e,this.#sl}get queryParameters(){if(this.#il)return this.#il;const e=this.queryString();return e?(this.#il=this.parseParameters(e),this.#il):null}async parseFormParameters(){const e=this.requestContentType();if(!e)return null;if(e.match(/^application\/x-www-form-urlencoded\s*(;.*)?$/i)){const e=await this.requestFormData();return e?this.parseParameters(e):null}const t=e.match(/^multipart\/form-data\s*;\s*boundary\s*=\s*(\S+)\s*$/);if(!t)return null;const n=t[1];if(!n)return null;const r=await this.requestFormData();return r?this.parseMultipartFormDataParameters(r,n):null}formParameters(){return this.#va||(this.#va=this.parseFormParameters()),this.#va}responseHttpVersion(){const e=this.#la;if(!e){const e=this.responseHeaderValue("version")||this.responseHeaderValue(":version");return e||this.filteredProtocolName()}const t=e.split(/\r\n/)[0].match(/^(HTTP\/\d+\.\d+)/);return t?t[1]:"HTTP/0.9"}parseParameters(e){return e.split("&").map((function(e){const t=e.indexOf("=");return-1===t?{name:e,value:""}:{name:e.substring(0,t),value:e.substring(t+1)}}))}parseMultipartFormDataParameters(e,t){const n=r.StringUtilities.escapeForRegExp(t),s=new RegExp('^\\r\\ncontent-disposition\\s*:\\s*form-data\\s*;\\s*name="([^"]*)"(?:\\s*;\\s*filename="([^"]*)")?(?:\\r\\ncontent-type\\s*:\\s*([^\\r\\n]*))?\\r\\n\\r\\n(.*)\\r\\n$',"is");return e.split(new RegExp(`--${n}(?:--s*$)?`,"g")).reduce((function(e,t){const[n,r,i,o,a]=t.match(s)||[];if(!n)return e;const l=i||o?xi(ki.binary):a;return e.push({name:r,value:l}),e}),[])}computeHeaderValue(e,t){t=t.toLowerCase();const n=[];for(let r=0;rt.ContentData.ContentData.isError(e)?e:t.StreamingContentData.StreamingContentData.from(e))),this.#ia}contentURL(){return this.#Ii}contentType(){return this.#ra}async requestContent(){return t.ContentData.ContentData.asDeferredContent(await this.requestContentData())}async searchInContent(e,n,r){if(!this.#ol)return await Z.searchInRequest(this,e,n,r);const s=await this.requestContentData();return t.ContentData.ContentData.isError(s)||!s.isTextContent?[]:t.TextUtils.performSearchInContentData(s,e,n,r)}requestContentType(){return this.requestHeaderValue("Content-Type")}hasErrorStatusCode(){return this.statusCode>=400}setInitialPriority(e){this.#Yo=e}initialPriority(){return this.#Yo}setPriority(e){this.#Zo=e}priority(){return this.#Zo||this.#Yo||null}setSignedExchangeInfo(e){this.#ea=e}signedExchangeInfo(){return this.#ea}setWebBundleInfo(e){this.#ta=e}webBundleInfo(){return this.#ta}setWebBundleInnerRequestInfo(e){this.#na=e}webBundleInnerRequestInfo(){return this.#na}async populateImageSource(e){const n=await this.requestContentData();if(t.ContentData.ContentData.isError(n))return;let r=n.asDataUrl();if(null===r&&!this.#Aa){(this.responseHeaderValue("cache-control")||"").includes("no-cache")||(r=this.#Ii)}null!==r&&(e.src=r)}initiator(){return this.#qo||null}hasUserGesture(){return this.#Uo??null}frames(){return this.#oa}addProtocolFrameError(e,t){this.addFrame({type:Mi.Error,text:e,time:this.pseudoWallTime(t),opCode:-1,mask:!1})}addProtocolFrame(e,t,n){const r=n?Mi.Send:Mi.Receive;this.addFrame({type:r,text:e.payloadData,time:this.pseudoWallTime(t),opCode:e.opcode,mask:e.mask})}addFrame(e){this.#oa.push(e),this.dispatchEventToListeners(Ti.WEBSOCKET_FRAME_ADDED,e)}eventSourceMessages(){return this.#ul?.eventSourceMessages??[]}addEventSourceMessage(e,t,n,r){this.#ul?.onProtocolEventSourceMessageReceived(t,r,n,this.pseudoWallTime(e))}markAsRedirect(e){this.#Wo=!0,this.#_o=`${this.#Ho}:redirected.${e}`}isRedirect(){return this.#Wo}setRequestIdForTest(e){this.#Ho=e,this.#_o=e}charset(){return this.#Na??null}setCharset(e){this.#Na=e}addExtraRequestInfo(e){this.#ka=e.blockedRequestCookies,this.#Ca=e.includedRequestCookies,this.setRequestHeaders(e.requestHeaders),this.#wa=!0,this.setRequestHeadersText(""),this.#Ba=e.clientSecurityState,this.setConnectTimingFromExtraInfo(e.connectTiming),this.#Pa=e.siteHasCookieInOtherPartition??!1,this.#hl=this.#ka.some((e=>e.blockedReasons.includes("ThirdPartyPhaseout")))}hasExtraRequestInfo(){return this.#wa}blockedRequestCookies(){return this.#ka}includedRequestCookies(){return this.#Ca}hasRequestCookies(){return this.#Ca.length>0||this.#ka.length>0}siteHasCookieInOtherPartition(){return this.#Pa}static parseStatusTextFromResponseHeadersText(e){return e.split("\r")[0].split(" ").slice(2).join(" ")}addExtraResponseInfo(e){if(this.#xa=e.blockedResponseCookies,e.exemptedResponseCookies&&(this.#Ra=e.exemptedResponseCookies),this.#Ta=e.cookiePartitionKey?e.cookiePartitionKey:null,this.#Ma=e.cookiePartitionKeyOpaque||null,this.responseHeaders=e.responseHeaders,this.originalResponseHeaders=e.responseHeaders.map((e=>({...e}))),e.responseHeadersText){if(this.responseHeadersText=e.responseHeadersText,!this.requestHeadersText()){let e=`${this.requestMethod} ${this.parsedURL.path}`;this.parsedURL.queryParams&&(e+=`?${this.parsedURL.queryParams}`),e+=" HTTP/1.1\r\n";for(const{name:t,value:n}of this.requestHeaders())e+=`${t}: ${n}\r\n`;this.setRequestHeadersText(e)}this.statusText=Ri.parseStatusTextFromResponseHeadersText(e.responseHeadersText)}this.#ma=e.resourceIPAddressSpace,e.statusCode&&(this.statusCode=e.statusCode),this.#Sa=!0;const t=Z.forRequest(this);if(!t)return;for(const e of this.#xa)if(e.blockedReasons.includes("NameValuePairExceedsMaxSize")){const e=xi(ki.setcookieHeaderIsIgnoredIn,{PH1:this.url()});t.dispatchEventToListeners(ee.MessageGenerated,{message:e,requestId:this.#_o,warning:!0})}const n=t.target().model(di);if(n){for(const e of this.#Ra)n.removeBlockedCookie(e.cookie);for(const e of this.#xa){const t=e.cookie;t&&(e.blockedReasons.includes("ThirdPartyPhaseout")&&(this.#hl=!0),n.addBlockedCookie(t,e.blockedReasons.map((e=>({attribute:Ei(e),uiString:Pi(e)})))))}}}hasExtraResponseInfo(){return this.#Sa}blockedResponseCookies(){return this.#xa}exemptedResponseCookies(){return this.#Ra}nonBlockedResponseCookies(){const e=this.blockedResponseCookies().map((e=>e.cookieLine));return this.responseCookies.filter((t=>{const n=e.indexOf(t.getCookieLine());return-1===n||(e[n]=null,!1)}))}responseCookiesPartitionKey(){return this.#Ta}responseCookiesPartitionKeyOpaque(){return this.#Ma}redirectSourceSignedExchangeInfoHasNoErrors(){return null!==this.#zo&&null!==this.#zo.#ea&&!this.#zo.#ea.errors}clientSecurityState(){return this.#Ba}setTrustTokenParams(e){this.#_a=e}trustTokenParams(){return this.#_a}setTrustTokenOperationDoneEvent(e){this.#Ha=e,this.dispatchEventToListeners(Ti.TRUST_TOKEN_RESULT_ADDED)}trustTokenOperationDoneEvent(){return this.#Ha}setIsSameSite(e){this.#al=e}isSameSite(){return this.#al}getAssociatedData(e){return this.#dl.get(e)||null}setAssociatedData(e,t){this.#dl.set(e,t)}deleteAssociatedData(e){this.#dl.delete(e)}hasThirdPartyCookiePhaseoutIssue(){return this.#hl}addDataReceivedEvent({timestamp:e,dataLength:n,encodedDataLength:r,data:s}){this.resourceSize+=n,-1!==r&&this.increaseTransferSize(r),this.endTime=e,s&&this.#ia?.then((e=>{t.StreamingContentData.isError(e)||e.addChunk(s)}))}waitForResponseReceived(){if(this.responseReceivedPromise)return this.responseReceivedPromise;const{promise:e,resolve:t}=Promise.withResolvers();return this.responseReceivedPromise=e,this.responseReceivedPromiseResolve=t,this.responseReceivedPromise}}var Ti,Mi;!function(e){e.FINISHED_LOADING="FinishedLoading",e.TIMING_CHANGED="TimingChanged",e.REMOTE_ADDRESS_CHANGED="RemoteAddressChanged",e.REQUEST_HEADERS_CHANGED="RequestHeadersChanged",e.RESPONSE_HEADERS_CHANGED="ResponseHeadersChanged",e.WEBSOCKET_FRAME_ADDED="WebsocketFrameAdded",e.EVENT_SOURCE_MESSAGE_ADDED="EventSourceMessageAdded",e.TRUST_TOKEN_RESULT_ADDED="TrustTokenResultAdded"}(Ti||(Ti={})),function(e){e.Send="send",e.Receive="receive",e.Error="error"}(Mi||(Mi={}));const Pi=function(e){switch(e){case"SecureOnly":return xi(ki.blockedReasonSecureOnly);case"SameSiteStrict":return xi(ki.blockedReasonSameSiteStrictLax,{PH1:"SameSite=Strict"});case"SameSiteLax":return xi(ki.blockedReasonSameSiteStrictLax,{PH1:"SameSite=Lax"});case"SameSiteUnspecifiedTreatedAsLax":return xi(ki.blockedReasonSameSiteUnspecifiedTreatedAsLax);case"SameSiteNoneInsecure":return xi(ki.blockedReasonSameSiteNoneInsecure);case"UserPreferences":return xi(ki.thisSetcookieWasBlockedDueToUser);case"SyntaxError":return xi(ki.thisSetcookieHadInvalidSyntax);case"SchemeNotSupported":return xi(ki.theSchemeOfThisConnectionIsNot);case"OverwriteSecure":return xi(ki.blockedReasonOverwriteSecure);case"InvalidDomain":return xi(ki.blockedReasonInvalidDomain);case"InvalidPrefix":return xi(ki.blockedReasonInvalidPrefix);case"UnknownError":return xi(ki.anUnknownErrorWasEncounteredWhenTrying);case"SchemefulSameSiteStrict":return xi(ki.thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax,{PH1:"SameSite=Strict"});case"SchemefulSameSiteLax":return xi(ki.thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax,{PH1:"SameSite=Lax"});case"SchemefulSameSiteUnspecifiedTreatedAsLax":return xi(ki.thisSetcookieDidntSpecifyASamesite);case"SamePartyFromCrossPartyContext":return xi(ki.thisSetcookieWasBlockedBecauseItHadTheSameparty);case"SamePartyConflictsWithOtherAttributes":return xi(ki.thisSetcookieWasBlockedBecauseItHadTheSamepartyAttribute);case"NameValuePairExceedsMaxSize":return xi(ki.thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize);case"DisallowedCharacter":return xi(ki.thisSetcookieHadADisallowedCharacter);case"ThirdPartyPhaseout":return xi(ki.thisSetcookieWasBlockedDueThirdPartyPhaseout)}return""},Ei=function(e){switch(e){case"SecureOnly":case"OverwriteSecure":return"secure";case"SameSiteStrict":case"SameSiteLax":case"SameSiteUnspecifiedTreatedAsLax":case"SameSiteNoneInsecure":case"SchemefulSameSiteStrict":case"SchemefulSameSiteLax":case"SchemefulSameSiteUnspecifiedTreatedAsLax":return"same-site";case"InvalidDomain":return"domain";case"InvalidPrefix":return"name";case"SamePartyConflictsWithOtherAttributes":case"SamePartyFromCrossPartyContext":case"NameValuePairExceedsMaxSize":case"UserPreferences":case"ThirdPartyPhaseout":case"SyntaxError":case"SchemeNotSupported":case"UnknownError":case"DisallowedCharacter":return null}return null};var Li,Ai;!function(e){e[e.TCP=1]="TCP",e[e.UDP_BOUND=2]="UDP_BOUND",e[e.UDP_CONNECTED=3]="UDP_CONNECTED"}(Li||(Li={})),function(e){e[e.OPENING=1]="OPENING",e[e.OPEN=2]="OPEN",e[e.CLOSED=3]="CLOSED",e[e.ABORTED=4]="ABORTED"}(Ai||(Ai={}));var Oi=Object.freeze({__proto__:null,get DirectSocketStatus(){return Ai},get DirectSocketType(){return Li},get Events(){return Ti},NetworkRequest:Ri,get WebSocketFrameType(){return Mi},cookieBlockedReasonToAttribute:function(e){switch(e){case"SecureOnly":return"secure";case"NotOnPath":return"path";case"DomainMismatch":return"domain";case"SameSiteStrict":case"SameSiteLax":case"SameSiteUnspecifiedTreatedAsLax":case"SameSiteNoneInsecure":case"SchemefulSameSiteStrict":case"SchemefulSameSiteLax":case"SchemefulSameSiteUnspecifiedTreatedAsLax":return"same-site";case"SamePartyFromCrossPartyContext":case"NameValuePairExceedsMaxSize":case"UserPreferences":case"ThirdPartyPhaseout":case"UnknownError":return null}return null},cookieBlockedReasonToUiString:function(e){switch(e){case"SecureOnly":return xi(ki.secureOnly);case"NotOnPath":return xi(ki.notOnPath);case"DomainMismatch":return xi(ki.domainMismatch);case"SameSiteStrict":return xi(ki.sameSiteStrict);case"SameSiteLax":return xi(ki.sameSiteLax);case"SameSiteUnspecifiedTreatedAsLax":return xi(ki.sameSiteUnspecifiedTreatedAsLax);case"SameSiteNoneInsecure":return xi(ki.sameSiteNoneInsecure);case"UserPreferences":return xi(ki.userPreferences);case"UnknownError":return xi(ki.unknownError);case"SchemefulSameSiteStrict":return xi(ki.schemefulSameSiteStrict);case"SchemefulSameSiteLax":return xi(ki.schemefulSameSiteLax);case"SchemefulSameSiteUnspecifiedTreatedAsLax":return xi(ki.schemefulSameSiteUnspecifiedTreatedAsLax);case"SamePartyFromCrossPartyContext":return xi(ki.samePartyFromCrossPartyContext);case"NameValuePairExceedsMaxSize":return xi(ki.nameValuePairExceedsMaxSize);case"ThirdPartyPhaseout":return xi(ki.thirdPartyPhaseout)}return""},cookieExemptionReasonToUiString:function(e){switch(e){case"UserSetting":return xi(ki.exemptionReasonUserSetting);case"TPCDMetadata":return xi(ki.exemptionReasonTPCDMetadata);case"TopLevelTPCDDeprecationTrial":return xi(ki.exemptionReasonTopLevelTPCDDeprecationTrial);case"TPCDDeprecationTrial":return xi(ki.exemptionReasonTPCDDeprecationTrial);case"TPCDHeuristics":return xi(ki.exemptionReasonTPCDHeuristics);case"EnterprisePolicy":return xi(ki.exemptionReasonEnterprisePolicy);case"StorageAccess":return xi(ki.exemptionReasonStorageAccessAPI);case"TopLevelStorageAccess":return xi(ki.exemptionReasonTopLevelStorageAccessAPI);case"Scheme":return xi(ki.exemptionReasonScheme)}return""},setCookieBlockedReasonToAttribute:Ei,setCookieBlockedReasonToUiString:Pi});class Di{#pl;#C;#ml;#fl;#bl;#yl;#vl;#h;#Zt;#u;#Il;#wl;#Sl;#kl;constructor(e,t){this.#pl=e,this.#C=t.nodeId,e.setAXNodeForAXId(this.#C,this),t.backendDOMNodeId?(e.setAXNodeForBackendDOMNodeId(t.backendDOMNodeId,this),this.#ml=t.backendDOMNodeId,this.#fl=new js(e.target(),t.backendDOMNodeId)):(this.#ml=null,this.#fl=null),this.#bl=t.ignored,this.#bl&&"ignoredReasons"in t&&(this.#yl=t.ignoredReasons),this.#vl=t.role||null,this.#h=t.name||null,this.#Zt=t.description||null,this.#u=t.value||null,this.#Il=t.properties||null,this.#kl=[...new Set(t.childIds)],this.#wl=t.parentId||null,t.frameId&&!t.parentId?(this.#Sl=t.frameId,e.setRootAXNodeForFrameId(t.frameId,this)):this.#Sl=null}id(){return this.#C}accessibilityModel(){return this.#pl}ignored(){return this.#bl}ignoredReasons(){return this.#yl||null}role(){return this.#vl||null}coreProperties(){const e=[];return this.#h&&e.push({name:"name",value:this.#h}),this.#Zt&&e.push({name:"description",value:this.#Zt}),this.#u&&e.push({name:"value",value:this.#u}),e}name(){return this.#h||null}description(){return this.#Zt||null}value(){return this.#u||null}properties(){return this.#Il||null}parentNode(){return this.#wl?this.#pl.axNodeForId(this.#wl):null}isDOMNode(){return Boolean(this.#ml)}backendDOMNodeId(){return this.#ml}deferredDOMNode(){return this.#fl}highlightDOMNode(){const e=this.deferredDOMNode();e&&e.highlight()}children(){if(!this.#kl)return[];const e=[];for(const t of this.#kl){const n=this.#pl.axNodeForId(t);n&&e.push(n)}return e}numChildren(){return this.#kl?this.#kl.length:0}hasOnlyUnloadedChildren(){return!(!this.#kl||!this.#kl.length)&&this.#kl.every((e=>null===this.#pl.axNodeForId(e)))}hasUnloadedChildren(){return!(!this.#kl||!this.#kl.length)&&this.#kl.some((e=>null===this.#pl.axNodeForId(e)))}getFrameId(){return this.#Sl||this.parentNode()?.getFrameId()||null}}class Ni extends h{agent;#Cl=new Map;#xl=new Map;#Rl=new Map;#Tl=new Map;#Ml=null;constructor(e){super(e),e.registerAccessibilityDispatcher(this),this.agent=e.accessibilityAgent(),this.resumeModel()}clear(){this.#Ml=null,this.#Cl.clear(),this.#xl.clear(),this.#Rl.clear()}async resumeModel(){await this.agent.invoke_enable()}async suspendModel(){await this.agent.invoke_disable()}async requestPartialAXTree(e){const{nodes:t}=await this.agent.invoke_getPartialAXTree({nodeId:e.id,fetchRelatives:!0});if(!t)return;const n=[];for(const e of t)n.push(new Di(this,e))}loadComplete({root:e}){this.clear(),this.#Ml=new Di(this,e),this.dispatchEventToListeners("TreeUpdated",{root:this.#Ml})}nodesUpdated({nodes:e}){this.createNodesFromPayload(e),this.dispatchEventToListeners("TreeUpdated",{})}createNodesFromPayload(e){return e.map((e=>new Di(this,e)))}async requestRootNode(e){if(e&&this.#Rl.has(e))return this.#Rl.get(e);if(!e&&this.#Ml)return this.#Ml;const{node:t}=await this.agent.invoke_getRootAXNode({frameId:e});return t?this.createNodesFromPayload([t])[0]:void 0}async requestAXChildren(e,t){const n=this.#Cl.get(e);if(!n)throw new Error("Cannot request children before parent");if(!n.hasUnloadedChildren())return n.children();const r=this.#Tl.get(e);if(r)await r;else{const n=this.agent.invoke_getChildAXNodes({id:e,frameId:t});this.#Tl.set(e,n);const r=await n;r.getError()||(this.createNodesFromPayload(r.nodes),this.#Tl.delete(e))}return n.children()}async requestAndLoadSubTreeToNode(e){const t=[];let n=this.axNodeForDOMNode(e);for(;n;){t.push(n);const e=n.parentNode();if(!e)return t;n=e}const{nodes:r}=await this.agent.invoke_getAXNodeAndAncestors({backendNodeId:e.backendNodeId()});if(!r)return null;return this.createNodesFromPayload(r)}axNodeForId(e){return this.#Cl.get(e)||null}setRootAXNodeForFrameId(e,t){this.#Rl.set(e,t)}setAXNodeForAXId(e,t){this.#Cl.set(e,t)}axNodeForDOMNode(e){return e?this.#xl.get(e.backendNodeId())??null:null}setAXNodeForBackendDOMNodeId(e,t){this.#xl.set(e,t)}getAgent(){return this.agent}}h.register(Ni,{capabilities:2,autostart:!1});var Fi=Object.freeze({__proto__:null,AccessibilityModel:Ni,AccessibilityNode:Di});class Bi extends h{#Ws;#Pl=1;#El=[];constructor(e){super(e),this.#Ws=e.pageAgent(),e.registerPageDispatcher(this)}async startScreencast(e,t,n,r,s,i,o){this.#El.at(-1)&&await this.#Ws.invoke_stopScreencast();const a={id:this.#Pl++,request:{format:e,quality:t,maxWidth:n,maxHeight:r,everyNthFrame:s},callbacks:{onScreencastFrame:i,onScreencastVisibilityChanged:o}};return this.#El.push(a),this.#Ws.invoke_startScreencast({format:e,quality:t,maxWidth:n,maxHeight:r,everyNthFrame:s}),a.id}stopScreencast(e){const t=this.#El.pop();if(!t)throw new Error("There is no screencast operation to stop.");if(t.id!==e)throw new Error("Trying to stop a screencast operation that is not being served right now.");this.#Ws.invoke_stopScreencast();const n=this.#El.at(-1);n&&this.#Ws.invoke_startScreencast({format:n.request.format,quality:n.request.quality,maxWidth:n.request.maxWidth,maxHeight:n.request.maxHeight,everyNthFrame:n.request.everyNthFrame})}async captureScreenshot(e,t,n,r){const s={format:e,quality:t,fromSurface:!0};switch(n){case"fromClip":s.captureBeyondViewport=!0,s.clip=r;break;case"fullpage":s.captureBeyondViewport=!0;break;case"fromViewport":s.captureBeyondViewport=!1;break;default:throw new Error("Unexpected or unspecified screnshotMode")}await Fs.muteHighlight();const i=await this.#Ws.invoke_captureScreenshot(s);return await Fs.unmuteHighlight(),i.data}screencastFrame({data:e,metadata:t,sessionId:n}){this.#Ws.invoke_screencastFrameAck({sessionId:n});const r=this.#El.at(-1);r&&r.callbacks.onScreencastFrame.call(null,e,t)}screencastVisibilityChanged({visible:e}){const t=this.#El.at(-1);t&&t.callbacks.onScreencastVisibilityChanged.call(null,e)}backForwardCacheNotUsed(e){}domContentEventFired(e){}loadEventFired(e){}lifecycleEvent(e){}navigatedWithinDocument(e){}frameAttached(e){}frameNavigated(e){}documentOpened(e){}frameDetached(e){}frameStartedLoading(e){}frameStoppedLoading(e){}frameRequestedNavigation(e){}frameStartedNavigating(e){}frameSubtreeWillBeDetached(e){}frameScheduledNavigation(e){}frameClearedScheduledNavigation(e){}frameResized(){}javascriptDialogOpening(e){}javascriptDialogClosed(e){}interstitialShown(){}interstitialHidden(){}windowOpen(e){}fileChooserOpened(e){}compilationCacheProduced(e){}downloadWillBegin(e){}downloadProgress(){}prefetchStatusUpdated(e){}prerenderStatusUpdated(e){}}h.register(Bi,{capabilities:64,autostart:!1});var _i=Object.freeze({__proto__:null,ScreenCaptureModel:Bi});const Hi="devtools_animations",Ui="__devtools_report_scroll_position__",qi=e=>`__devtools_scroll_listener_${e}__`;async function zi(e,t){const n=e.domModel().target().model(ii),r=e.domModel().target().pageAgent();for(const s of n.frames()){const{executionContextId:n}=await r.invoke_createIsolatedWorld({frameId:s.id,worldName:t}),i=await e.resolveToObject(void 0,n);if(i)return i}return null}class ji{#Ll;#Al=new Map;#Ol;static lastAddedListenerId=0;constructor(e){this.#Ll=e}async#Dl(){if(this.#Ol)return;this.#Ol=e=>{const{name:t,payload:n}=e.data;if(t!==Ui)return;const{scrollTop:r,scrollLeft:s,id:i}=JSON.parse(n),o=this.#Al.get(i);o&&o({scrollTop:r,scrollLeft:s})};const e=this.#Ll.domModel().target().model(Jr);await e.addBinding({name:Ui,executionContextName:Hi}),e.addEventListener($r.BindingCalled,this.#Ol)}async#Nl(){if(!this.#Ol)return;const e=this.#Ll.domModel().target().model(Jr);await e.removeBinding({name:Ui}),e.removeEventListener($r.BindingCalled,this.#Ol),this.#Ol=void 0}async addScrollEventListener(e){ji.lastAddedListenerId++;const t=ji.lastAddedListenerId;this.#Al.set(t,e),this.#Ol||await this.#Dl();const n=await zi(this.#Ll,Hi);return n?(await n.callFunction((function(e,t,n){if("scrollingElement"in this&&!this.scrollingElement)return;const r="scrollingElement"in this?this.scrollingElement:this;this[n]=()=>{globalThis[t](JSON.stringify({scrollTop:r.scrollTop,scrollLeft:r.scrollLeft,id:e}))},this.addEventListener("scroll",this[n],!0)}),[t,Ui,qi(t)].map((e=>Bn.toCallArgument(e)))),n.release(),t):null}async removeScrollEventListener(e){const t=await zi(this.#Ll,Hi);t&&(await t.callFunction((function(e){this.removeEventListener("scroll",this[e]),delete this[e]}),[qi(e)].map((e=>Bn.toCallArgument(e)))),t.release(),this.#Al.delete(e),0===this.#Al.size&&await this.#Nl())}async scrollTop(){return await this.#Ll.callFunction((function(){if("scrollingElement"in this)return this.scrollingElement?this.scrollingElement.scrollTop:0;return this.scrollTop})).then((e=>e?.value??null))}async scrollLeft(){return await this.#Ll.callFunction((function(){if("scrollingElement"in this)return this.scrollingElement?this.scrollingElement.scrollLeft:0;return this.scrollLeft})).then((e=>e?.value??null))}async setScrollTop(e){await this.#Ll.callFunction((function(e){if("scrollingElement"in this){if(!this.scrollingElement)return;this.scrollingElement.scrollTop=e}else this.scrollTop=e}),[e])}async setScrollLeft(e){await this.#Ll.callFunction((function(e){if("scrollingElement"in this){if(!this.scrollingElement)return;this.scrollingElement.scrollLeft=e}else this.scrollLeft=e}),[e])}async verticalScrollRange(){return await this.#Ll.callFunction((function(){if("scrollingElement"in this)return this.scrollingElement?this.scrollingElement.scrollHeight-this.scrollingElement.clientHeight:0;return this.scrollHeight-this.clientHeight})).then((e=>e?.value??null))}async horizontalScrollRange(){return await this.#Ll.callFunction((function(){if("scrollingElement"in this)return this.scrollingElement?this.scrollingElement.scrollWidth-this.scrollingElement.clientWidth:0;return this.scrollWidth-this.clientWidth})).then((e=>e?.value??null))}}function Vi(e,t){const n=e.viewOrScrollTimeline(),r=t.viewOrScrollTimeline();return n?Boolean(r&&n.sourceNodeId===r.sourceNodeId&&n.axis===r.axis):!r&&e.startTime()===t.startTime()}class Wi extends h{runtimeModel;agent;#Fl=new Map;animationGroups=new Map;#Bl=new Set;playbackRate=1;#_l;#Hl;constructor(t){super(t),this.runtimeModel=t.model(Jr),this.agent=t.animationAgent(),t.registerAnimationDispatcher(new Yi(this)),t.suspended()||this.agent.invoke_enable();t.model(ii).addEventListener(ri.PrimaryPageChanged,this.reset,this);const n=t.model(Bi);n&&(this.#_l=new Zi(this,n)),this.#Hl=e.Debouncer.debounce((()=>{for(;this.#Bl.size;)this.matchExistingGroups(this.createGroupFromPendingAnimations())}),100)}reset(){this.#Fl.clear(),this.animationGroups.clear(),this.#Bl.clear(),this.dispatchEventToListeners(Gi.ModelReset)}async devicePixelRatio(){const e=await this.target().runtimeAgent().invoke_evaluate({expression:"window.devicePixelRatio"});return"number"===e?.result.type?e?.result.value??1:1}async getAnimationGroupForAnimation(e,t){for(const n of this.animationGroups.values())for(const r of n.animations())if(r.name()===e){const e=await r.source().node();if(e?.id===t)return n}return null}animationCanceled(e){this.#Bl.delete(e)}async animationUpdated(e){let t,n;for(const r of this.animationGroups.values())if(n=r.animations().find((t=>t.id()===e.id)),n){t=r;break}n&&t&&(await n.setPayload(e),this.dispatchEventToListeners(Gi.AnimationGroupUpdated,t))}async animationStarted(e){if(!e.source||!e.source.backendNodeId)return;const t=await Ki.parsePayload(this,e),n=t.source().keyframesRule();"WebAnimation"===t.type()&&n&&0===n.keyframes().length?this.#Bl.delete(t.id()):(this.#Fl.set(t.id(),t),this.#Bl.add(t.id())),this.#Hl()}matchExistingGroups(e){let t=null;for(const n of this.animationGroups.values()){if(n.matches(e)){t=n,n.rebaseTo(e);break}if(n.shouldInclude(e)){t=n,n.appendAnimations(e.animations());break}}return t?this.dispatchEventToListeners(Gi.AnimationGroupUpdated,t):(this.animationGroups.set(e.id(),e),this.#_l&&this.#_l.captureScreenshots(e.finiteDuration(),e.screenshotsInternal),this.dispatchEventToListeners(Gi.AnimationGroupStarted,e)),Boolean(t)}createGroupFromPendingAnimations(){console.assert(this.#Bl.size>0);const e=this.#Bl.values().next().value;this.#Bl.delete(e);const t=this.#Fl.get(e);if(!t)throw new Error("Unable to locate first animation");const n=[t],r=new Set;for(const e of this.#Bl){const s=this.#Fl.get(e);Vi(t,s)?n.push(s):r.add(e)}return this.#Bl=r,n.sort(((e,t)=>e.startTime()-t.startTime())),new Ji(this,e,n)}setPlaybackRate(e){this.playbackRate=e,this.agent.invoke_setPlaybackRate({playbackRate:e})}async releaseAllAnimations(){const e=[...this.animationGroups.values()].flatMap((e=>e.animations().map((e=>e.id()))));await this.agent.invoke_releaseAnimations({animations:e})}releaseAnimations(e){this.agent.invoke_releaseAnimations({animations:e})}async suspendModel(){await this.agent.invoke_disable().then((()=>this.reset()))}async resumeModel(){await this.agent.invoke_enable()}}var Gi;!function(e){e.AnimationGroupStarted="AnimationGroupStarted",e.AnimationGroupUpdated="AnimationGroupUpdated",e.ModelReset="ModelReset"}(Gi||(Gi={}));class Ki{#Ul;#ql;#zl;#jl;constructor(e){this.#Ul=e}static async parsePayload(e,t){const n=new Ki(e);return await n.setPayload(t),n}async setPayload(e){if(e.viewOrScrollTimeline){const t=await this.#Ul.devicePixelRatio();e.viewOrScrollTimeline.startOffset&&(e.viewOrScrollTimeline.startOffset/=t),e.viewOrScrollTimeline.endOffset&&(e.viewOrScrollTimeline.endOffset/=t)}this.#ql=e,this.#zl&&e.source?this.#zl.setPayload(e.source):!this.#zl&&e.source&&(this.#zl=new Qi(this.#Ul,e.source))}percentageToPixels(e,t){const{startOffset:n,endOffset:r}=t;if(void 0===n||void 0===r)throw new Error("startOffset or endOffset does not exist in viewOrScrollTimeline");return e/100*(r-n)}viewOrScrollTimeline(){return this.#ql.viewOrScrollTimeline}id(){return this.#ql.id}name(){return this.#ql.name}paused(){return this.#ql.pausedState}playState(){return this.#jl||this.#ql.playState}playbackRate(){return this.#ql.playbackRate}startTime(){const e=this.viewOrScrollTimeline();return e?this.percentageToPixels(this.playbackRate()>0?this.#ql.startTime:100-this.#ql.startTime,e)+(this.viewOrScrollTimeline()?.startOffset??0):this.#ql.startTime}iterationDuration(){const e=this.viewOrScrollTimeline();return e?this.percentageToPixels(this.source().duration(),e):this.source().duration()}endTime(){return this.source().iterations?this.viewOrScrollTimeline()?this.startTime()+this.iterationDuration()*this.source().iterations():this.startTime()+this.source().delay()+this.source().duration()*this.source().iterations()+this.source().endDelay():1/0}finiteDuration(){const e=Math.min(this.source().iterations(),3);return this.viewOrScrollTimeline()?this.iterationDuration()*e:this.source().delay()+this.source().duration()*e}currentTime(){const e=this.viewOrScrollTimeline();return e?this.percentageToPixels(this.#ql.currentTime,e):this.#ql.currentTime}source(){return this.#zl}type(){return this.#ql.type}overlaps(e){if(!this.source().iterations()||!e.source().iterations())return!0;const t=this.startTime()=n.startTime()}delayOrStartTime(){return this.viewOrScrollTimeline()?this.startTime():this.source().delay()}setTiming(e,t){this.#zl.node().then((n=>{if(!n)throw new Error("Unable to find node");this.updateNodeStyle(e,t,n)})),this.#zl.durationInternal=e,this.#zl.delayInternal=t,this.#Ul.agent.invoke_setTiming({animationId:this.id(),duration:e,delay:t})}updateNodeStyle(e,t,n){let r;if("CSSTransition"===this.type())r="transition-";else{if("CSSAnimation"!==this.type())return;r="animation-"}if(!n.id)throw new Error("Node has no id");const s=n.domModel().cssModel();s.setEffectivePropertyValueForNode(n.id,r+"duration",e+"ms"),s.setEffectivePropertyValueForNode(n.id,r+"delay",t+"ms")}async remoteObjectPromise(){const e=await this.#Ul.agent.invoke_resolveAnimation({animationId:this.id()});return e?this.#Ul.runtimeModel.createRemoteObject(e.remoteObject):null}cssId(){return this.#ql.cssId||""}}class Qi{#Ul;#ts;delayInternal;durationInternal;#Vl;#Wl;constructor(e,t){this.#Ul=e,this.setPayload(t)}setPayload(e){this.#ts=e,!this.#Vl&&e.keyframesRule?this.#Vl=new $i(e.keyframesRule):this.#Vl&&e.keyframesRule&&this.#Vl.setPayload(e.keyframesRule),this.delayInternal=e.delay,this.durationInternal=e.duration}delay(){return this.delayInternal}endDelay(){return this.#ts.endDelay}iterations(){return this.delay()||this.endDelay()||this.duration()?this.#ts.iterations||1/0:0}duration(){return this.durationInternal}direction(){return this.#ts.direction}fill(){return this.#ts.fill}node(){return this.#Wl||(this.#Wl=new js(this.#Ul.target(),this.backendNodeId())),this.#Wl.resolvePromise()}deferredNode(){return new js(this.#Ul.target(),this.backendNodeId())}backendNodeId(){return this.#ts.backendNodeId}keyframesRule(){return this.#Vl||null}easing(){return this.#ts.easing}}class $i{#ts;#rt;constructor(e){this.setPayload(e)}setPayload(e){this.#ts=e,this.#rt?this.#ts.keyframes.forEach(((e,t)=>{this.#rt[t]?.setPayload(e)})):this.#rt=this.#ts.keyframes.map((e=>new Xi(e)))}name(){return this.#ts.name}keyframes(){return this.#rt}}class Xi{#ts;#Gl;constructor(e){this.setPayload(e)}setPayload(e){this.#ts=e,this.#Gl=e.offset}offset(){return this.#Gl}setOffset(e){this.#Gl=100*e+"%"}offsetAsNumber(){return parseFloat(this.#Gl)/100}easing(){return this.#ts.easing}}class Ji{#Ul;#C;#Kl;#Ql;#$l;screenshotsInternal;#Xl;constructor(e,t,n){this.#Ul=e,this.#C=t,this.#Ql=n,this.#$l=!1,this.screenshotsInternal=[],this.#Xl=[]}isScrollDriven(){return Boolean(this.#Ql[0]?.viewOrScrollTimeline())}id(){return this.#C}animations(){return this.#Ql}release(){this.#Ul.animationGroups.delete(this.id()),this.#Ul.releaseAnimations(this.animationIds())}animationIds(){return this.#Ql.map((function(e){return e.id()}))}startTime(){return this.#Ql[0].startTime()}groupDuration(){let e=0;for(const t of this.#Ql)e=Math.max(e,t.delayOrStartTime()+t.iterationDuration());return e}finiteDuration(){let e=0;for(let t=0;te.endTime())&&(e=t);if(!e)throw new Error("No longest animation found");return this.#Ul.agent.invoke_getCurrentTime({id:e.id()}).then((({currentTime:e})=>e||0))}matches(e){function t(e){const t=(e.viewOrScrollTimeline()?.sourceNodeId??"")+(e.viewOrScrollTimeline()?.axis??"");return("WebAnimation"===e.type()?e.type()+e.id():e.cssId())+t}if(this.#Ql.length!==e.#Ql.length)return!1;const n=this.#Ql.map(t).sort(),r=e.#Ql.map(t).sort();for(let e=0;ethis.#td)&&(clearTimeout(this.#ed),this.#ed=window.setTimeout(this.stopScreencast.bind(this),n),this.#td=r),this.#Yl||(this.#Yl=!0,this.#Zl=await this.#Jl.startScreencast("jpeg",80,void 0,300,2,this.screencastFrame.bind(this),(e=>{})))}screencastFrame(e,t){if(!this.#Yl)return;const n=window.performance.now();this.#de=this.#de.filter((function(e){return e.endTime>=n}));for(const t of this.#de)t.screenshots.push(e)}stopScreencast(){this.#Zl&&(this.#Jl.stopScreencast(this.#Zl),this.#ed=void 0,this.#td=void 0,this.#de=[],this.#Yl=!1,this.#Zl=void 0)}}h.register(Wi,{capabilities:2,autostart:!0});var eo=Object.freeze({__proto__:null,AnimationDOMNode:ji,AnimationDispatcher:Yi,AnimationEffect:Qi,AnimationGroup:Ji,AnimationImpl:Ki,AnimationModel:Wi,get Events(){return Gi},KeyframeStyle:Xi,KeyframesRule:$i,ScreenshotCapture:Zi});class to extends h{agent;#fr;#nd;constructor(t){super(t),this.agent=t.autofillAgent(),this.#nd=e.Settings.Settings.instance().createSetting("show-test-addresses-in-autofill-menu-on-event",!1),t.registerAutofillDispatcher(this),this.enable()}setTestAddresses(){this.agent.invoke_setAddresses({addresses:this.#nd.get()?[{fields:[{name:"ADDRESS_HOME_COUNTRY",value:"US"},{name:"NAME_FULL",value:"Jon Stewart Doe"},{name:"NAME_FIRST",value:"Jon"},{name:"NAME_MIDDLE",value:"Stewart"},{name:"NAME_LAST",value:"Doe"},{name:"COMPANY_NAME",value:"Fake Company"},{name:"ADDRESS_HOME_LINE1",value:"1600 Fake Street"},{name:"ADDRESS_HOME_LINE2",value:"Apartment 1"},{name:"ADDRESS_HOME_ZIP",value:"94043"},{name:"ADDRESS_HOME_CITY",value:"Mountain View"},{name:"ADDRESS_HOME_STATE",value:"CA"},{name:"EMAIL_ADDRESS",value:"test@example.us"},{name:"PHONE_HOME_WHOLE_NUMBER",value:"+16019521325"}]},{fields:[{name:"ADDRESS_HOME_COUNTRY",value:"BR"},{name:"NAME_FULL",value:"João Souza Silva"},{name:"NAME_FIRST",value:"João"},{name:"NAME_LAST",value:"Souza Silva"},{name:"NAME_LAST_FIRST",value:"Souza"},{name:"NAME_LAST_SECOND",value:"Silva"},{name:"COMPANY_NAME",value:"Empresa Falsa"},{name:"ADDRESS_HOME_STREET_ADDRESS",value:"Rua Inexistente, 2000\nAndar 2, Apartamento 1"},{name:"ADDRESS_HOME_STREET_LOCATION",value:"Rua Inexistente, 2000"},{name:"ADDRESS_HOME_STREET_NAME",value:"Rua Inexistente"},{name:"ADDRESS_HOME_HOUSE_NUMBER",value:"2000"},{name:"ADDRESS_HOME_SUBPREMISE",value:"Andar 2, Apartamento 1"},{name:"ADDRESS_HOME_APT_NUM",value:"1"},{name:"ADDRESS_HOME_FLOOR",value:"2"},{name:"ADDRESS_HOME_APT",value:"Apartamento 1"},{name:"ADDRESS_HOME_APT_TYPE",value:"Apartamento"},{name:"ADDRESS_HOME_APT_NUM",value:"1"},{name:"ADDRESS_HOME_DEPENDENT_LOCALITY",value:"Santa Efigênia"},{name:"ADDRESS_HOME_LANDMARK",value:"Próximo à estação Santa Efigênia"},{name:"ADDRESS_HOME_OVERFLOW",value:"Andar 2, Apartamento 1"},{name:"ADDRESS_HOME_ZIP",value:"30260-080"},{name:"ADDRESS_HOME_CITY",value:"Belo Horizonte"},{name:"ADDRESS_HOME_STATE",value:"MG"},{name:"EMAIL_ADDRESS",value:"teste@exemplo.us"},{name:"PHONE_HOME_WHOLE_NUMBER",value:"+553121286800"}]},{fields:[{name:"ADDRESS_HOME_COUNTRY",value:"MX"},{name:"NAME_FULL",value:"Juan Francisco García Flores"},{name:"NAME_FIRST",value:"Juan Francisco"},{name:"NAME_LAST",value:"García Flores"},{name:"NAME_LAST_FIRST",value:"García"},{name:"NAME_LAST_SECOND",value:"Flores"},{name:"COMPANY_NAME",value:"Empresa Falsa"},{name:"ADDRESS_HOME_STREET_ADDRESS",value:"C. Falsa 445\nPiso 2, Apartamento 1\nEntre calle Volcán y calle Montes Blancos, cerca de la estación de metro"},{name:"ADDRESS_HOME_STREET_LOCATION",value:"C. Falsa 445"},{name:"ADDRESS_HOME_STREET_NAME",value:"C. Falsa"},{name:"ADDRESS_HOME_HOUSE_NUMBER",value:"445"},{name:"ADDRESS_HOME_SUBPREMISE",value:"Piso 2, Apartamento 1"},{name:"ADDRESS_HOME_FLOOR",value:"2"},{name:"ADDRESS_HOME_APT",value:"Apartamento 1"},{name:"ADDRESS_HOME_APT_TYPE",value:"Apartamento"},{name:"ADDRESS_HOME_APT_NUM",value:"1"},{name:"ADDRESS_HOME_DEPENDENT_LOCALITY",value:"Lomas de Chapultepec"},{name:"ADDRESS_HOME_OVERFLOW",value:"Entre calle Volcán y calle Montes Celestes, cerca de la estación de metro"},{name:"ADDRESS_HOME_BETWEEN_STREETS_OR_LANDMARK",value:"Entre calle Volcán y calle Montes Blancos, cerca de la estación de metro"},{name:"ADDRESS_HOME_LANDMARK",value:"Cerca de la estación de metro"},{name:"ADDRESS_HOME_BETWEEN_STREETS",value:"Entre calle Volcán y calle Montes Blancos"},{name:"ADDRESS_HOME_BETWEEN_STREETS_1",value:"calle Volcán"},{name:"ADDRESS_HOME_BETWEEN_STREETS_2",value:"calle Montes Blancos"},{name:"ADDRESS_HOME_ADMIN_LEVEL2",value:"Miguel Hidalgo"},{name:"ADDRESS_HOME_ZIP",value:"11001"},{name:"ADDRESS_HOME_CITY",value:"Ciudad de México"},{name:"ADDRESS_HOME_STATE",value:"Distrito Federal"},{name:"EMAIL_ADDRESS",value:"ejemplo@ejemplo.mx"},{name:"PHONE_HOME_WHOLE_NUMBER",value:"+525553428400"}]},{fields:[{name:"ADDRESS_HOME_COUNTRY",value:"DE"},{name:"NAME_FULL",value:"Gottfried Wilhelm Leibniz"},{name:"NAME_FIRST",value:"Gottfried"},{name:"NAME_MIDDLE",value:"Wilhelm"},{name:"NAME_LAST",value:"Leibniz"},{name:"COMPANY_NAME",value:"Erfundenes Unternehmen"},{name:"ADDRESS_HOME_LINE1",value:"Erfundene Straße 33"},{name:"ADDRESS_HOME_LINE2",value:"Wohnung 1"},{name:"ADDRESS_HOME_ZIP",value:"80732"},{name:"ADDRESS_HOME_CITY",value:"München"},{name:"EMAIL_ADDRESS",value:"test@beispiel.de"},{name:"PHONE_HOME_WHOLE_NUMBER",value:"+4930303986300"}]}]:[]})}enable(){this.#fr||a.InspectorFrontendHost.isUnderTest()||(this.agent.invoke_enable(),this.setTestAddresses(),this.#fr=!0)}disable(){this.#fr&&!a.InspectorFrontendHost.isUnderTest()&&(this.#fr=!1,this.agent.invoke_disable())}addressFormFilled(e){this.dispatchEventToListeners("AddressFormFilled",{autofillModel:this,event:e})}}h.register(to,{capabilities:2,autostart:!0});var no=Object.freeze({__proto__:null,AutofillModel:to});class ro{name;#rd;enabledInternal;constructor(e,t){this.#rd=e,this.name=t,this.enabledInternal=!1}category(){return this.#rd}enabled(){return this.enabledInternal}setEnabled(e){this.enabledInternal=e}}var so=Object.freeze({__proto__:null,CategorizedBreakpoint:ro});class io{#sd;#id=[];#od=new Map;#ad=new Map;#ld=new Map;#dd=new Map;#cd=new Map;#hd=[];#ud=[];#gd=[];static enhancedTraceVersion=1;constructor(e){this.#sd=e;try{this.parseEnhancedTrace()}catch(e){throw new i.UserVisibleError(e)}}parseEnhancedTrace(){for(const e of this.#sd.traceEvents)if(this.isTargetRundownEvent(e)){const t=e.args?.data;this.#od.set(this.getScriptIsolateId(t.isolate,t.scriptId),t.v8context),this.#ad.set(this.getScriptIsolateId(t.isolate,t.scriptId),t.frame),this.#hd.find((e=>e.targetId===t.frame))||this.#hd.push({targetId:t.frame,type:t.frameType,isolate:t.isolate,pid:e.pid,url:t.url}),this.#ud.find((e=>e.v8Context===t.v8context))||this.#ud.push({id:-1,origin:t.origin,v8Context:t.v8context,auxData:{frameId:t.frame,isDefault:t.isDefault,type:t.contextType},isolate:t.isolate})}else if(this.isScriptRundownEvent(e)){this.#id.push(e);const t=e.args.data;this.#gd.find((e=>e.scriptId===t.scriptId&&e.isolate===t.isolate))||this.#gd.push({scriptId:t.scriptId,isolate:t.isolate,executionContextId:t.executionContextId,startLine:t.startLine,startColumn:t.startColumn,endLine:t.endLine,endColumn:t.endColumn,hash:t.hash,isModule:t.isModule,url:t.url,hasSourceURL:t.hasSourceUrl,sourceURL:t.sourceUrl,sourceMapURL:t.sourceMapUrl})}else if(this.isScriptRundownSourceEvent(e)){const t=e.args.data,n=this.getScriptIsolateId(t.isolate,t.scriptId);if("splitIndex"in t&&"splitCount"in t){this.#dd.has(n)||this.#dd.set(n,new Array(t.splitCount).fill(""));const e=this.#dd.get(n);e&&t.sourceText&&(e[t.splitIndex]=t.sourceText)}else t.sourceText&&this.#ld.set(n,t.sourceText),t.length&&this.#cd.set(n,t.length)}}data(){const e=new Map;this.#id.forEach((t=>{const n=t.args.data,r=this.#od.get(this.getScriptIsolateId(n.isolate,n.scriptId));r&&e.set(r,n.executionContextId)})),this.#ud.forEach((t=>{if(t.v8Context){const n=e.get(t.v8Context);n&&(t.id=n)}})),this.#gd.forEach((e=>{const t=this.getScriptIsolateId(e.isolate,e.scriptId);if(this.#ld.has(t))e.sourceText=this.#ld.get(t),e.length=this.#cd.get(t);else if(this.#dd.has(t)){const n=this.#dd.get(t);n&&(e.sourceText=n.join(""),e.length=e.sourceText.length)}e.auxData=this.#ud.find((t=>t.id===e.executionContextId&&t.isolate===e.isolate))?.auxData}));for(const e of this.#gd)e.sourceMapURL=this.getEncodedSourceMapUrl(e);const t=new Map;for(const e of this.#hd)t.set(e,this.groupContextsAndScriptsUnderTarget(e,this.#ud,this.#gd));return t}getEncodedSourceMapUrl(e){if(e.sourceMapURL?.startsWith("data:"))return e.sourceMapURL;const t=this.getSourceMapFromMetadata(e);if(t)try{return`data:text/plain;base64,${btoa(JSON.stringify(t))}`}catch{return}}getSourceMapFromMetadata(t){const{hasSourceURL:n,sourceURL:r,url:s,sourceMapURL:i,isolate:o,scriptId:a}=t;if(!i||!this.#sd.metadata.sourceMaps)return;const l=this.#ad.get(this.getScriptIsolateId(o,a));if(!l)return;const d=this.#hd.find((e=>e.targetId===l));if(!d)return;let c=s;if(n&&r){const t=d.url;c=e.ParsedURL.ParsedURL.completeURL(t,r)??r}const h=e.ParsedURL.ParsedURL.completeURL(c,i);if(!h)return;const{sourceMap:u}=this.#sd.metadata.sourceMaps.find((e=>e.sourceMapUrl===h))??{};return u}getScriptIsolateId(e,t){return t+"@"+e}isTraceEvent(e){return"cat"in e&&"pid"in e&&"args"in e&&"data"in e.args}isTargetRundownEvent(e){return this.isTraceEvent(e)&&"disabled-by-default-devtools.target-rundown"===e.cat}isScriptRundownEvent(e){return this.isTraceEvent(e)&&"disabled-by-default-devtools.v8-source-rundown"===e.cat}isScriptRundownSourceEvent(e){return this.isTraceEvent(e)&&"disabled-by-default-devtools.v8-source-rundown-sources"===e.cat}groupContextsAndScriptsUnderTarget(e,t,n){const r=[],s=[];for(const n of t)n.auxData?.frameId===e.targetId&&r.push(n);for(const t of n)null===t.auxData&&console.error(t+" missing aux data"),t.auxData?.frameId===e.targetId&&s.push(t);return[r,s]}}var oo=Object.freeze({__proto__:null,EnhancedTracesParser:io});class ao{traceEvents;metadata;constructor(e,t={}){this.traceEvents=e,this.metadata=t}}class lo{networkRequest;constructor(e){this.networkRequest=e}static create(t){const n=t.args.data.url,r=e.ParsedURL.ParsedURL.urlWithoutHash(n),s=ii.resourceForURL(n)??ii.resourceForURL(r),i=s?.request;return i?new lo(i):null}}var co=Object.freeze({__proto__:null,RevealableEvent:class{event;constructor(e){this.event=e}},RevealableNetworkRequest:lo,TraceObject:ao});const ho={noSourceText:"No source text available",noHostWindow:"Can not find host window",errorLoadingLog:"Error loading log"},uo=n.i18n.registerUIStrings("core/sdk/RehydratingConnection.ts",ho),go=n.i18n.getLocalizedString.bind(void 0,uo);class po{rehydratingConnectionState=1;onDisconnect=null;onMessage=null;trace=null;sessions=new Map;#pd;#md;#fd=this.#bd.bind(this);constructor(e){this.#pd=e,this.#md=window,this.#yd()}#yd(){this.#md.addEventListener("message",this.#fd),this.#md.opener||this.#pd({reason:go(ho.noHostWindow)}),this.#md.opener.postMessage({type:"REHYDRATING_WINDOW_READY"})}#bd(e){if("REHYDRATING_TRACE_FILE"===e.data.type){const{traceFile:t}=e.data,n=new FileReader;n.onload=async()=>{await this.startHydration(n.result)},n.onerror=()=>{this.#pd({reason:go(ho.errorLoadingLog)})},n.readAsText(t)}this.#md.removeEventListener("message",this.#fd)}async startHydration(e){if(!this.onMessage||2!==this.rehydratingConnectionState)return!1;const t=JSON.parse(e);if(!("traceEvents"in t))return console.error("RehydratingConnection failed to initialize due to missing trace events in payload"),!1;this.trace=t;const n=new io(t).data();let r=0;this.sessions.set(r,new mo(this));for(const[e,[t,s]]of n.entries())this.postToFrontend({method:"Target.targetCreated",params:{targetInfo:{targetId:e.targetId,type:e.type,title:e.url,url:e.url,attached:!1,canAccessOpener:!1}}}),r+=1,this.sessions.set(r,new fo(r,e,t,s,this));return await this.#vd(),!0}async#vd(){if(!this.trace)return;this.rehydratingConnectionState=3;const t=new ao(this.trace.traceEvents,this.trace.metadata);await e.Revealer.reveal(t)}setOnMessage(e){this.onMessage=e,this.rehydratingConnectionState=2}setOnDisconnect(e){this.onDisconnect=e}sendRawMessage(e){"string"==typeof e&&(e=JSON.parse(e));const t=e;if(void 0!==t.sessionId){const e=this.sessions.get(t.sessionId);e?e.handleFrontendMessageAsFakeCDPAgent(t):console.error("Invalid SessionId: "+t.sessionId)}else this.sessions.get(0)?.handleFrontendMessageAsFakeCDPAgent(t)}postToFrontend(e){this.onMessage?this.onMessage(e):console.error("onMessage was not initialized")}disconnect(){return Promise.reject()}}class mo{connection=null;constructor(e){this.connection=e}sendMessageToFrontend(e){requestAnimationFrame((()=>{this.connection&&this.connection.postToFrontend(e)}))}handleFrontendMessageAsFakeCDPAgent(e){this.sendMessageToFrontend({id:e.id,result:{}})}}class fo extends mo{sessionId;target;executionContexts=[];scripts=[];constructor(e,t,n,r,s){super(s),this.sessionId=e,this.target=t,this.executionContexts=n,this.scripts=r,this.sessionAttachToTarget()}sendMessageToFrontend(e,t=!0){0!==this.sessionId&&t&&(e.sessionId=this.sessionId),super.sendMessageToFrontend(e)}handleFrontendMessageAsFakeCDPAgent(e){switch(e.method){case"Runtime.enable":this.handleRuntimeEnabled(e.id);break;case"Debugger.enable":this.handleDebuggerEnable(e.id);break;case"Debugger.getScriptSource":if(e.params){const t=e.params;this.handleDebuggerGetScriptSource(e.id,t.scriptId)}break;default:this.sendMessageToFrontend({id:e.id,result:{}})}}sessionAttachToTarget(){this.sendMessageToFrontend({method:"Target.attachedToTarget",params:{sessionId:this.sessionId,waitingForDebugger:!1,targetInfo:{targetId:this.target.targetId,type:this.target.type,title:this.target.url,url:this.target.url,attached:!0,canAccessOpener:!1}}},!1)}handleRuntimeEnabled(e){for(const e of this.executionContexts)e.name=e.origin,this.sendMessageToFrontend({method:"Runtime.executionContextCreated",params:{context:e}});this.sendMessageToFrontend({id:e,result:{}})}handleDebuggerGetScriptSource(e,t){const n=this.scripts.find((e=>e.scriptId===t));n?this.sendMessageToFrontend({id:e,result:{scriptSource:void 0===n.sourceText?go(ho.noSourceText):n.sourceText}}):console.error("No script for id: "+t)}handleDebuggerEnable(e){for(const e of this.scripts)this.sendMessageToFrontend({method:"Debugger.scriptParsed",params:e});this.sendMessageToFrontend({id:e,result:{debuggerId:"7777777777777777777.8888888888888888888"}})}}const bo={websocketDisconnected:"WebSocket disconnected"},yo=n.i18n.registerUIStrings("core/sdk/Connections.ts",bo),vo=n.i18n.getLocalizedString.bind(void 0,yo);class Io{onMessage;#Id;#wd;#Sd;#Vt;constructor(){this.onMessage=null,this.#Id=null,this.#wd="",this.#Sd=0,this.#Vt=[a.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(a.InspectorFrontendHostAPI.Events.DispatchMessage,this.dispatchMessage,this),a.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(a.InspectorFrontendHostAPI.Events.DispatchMessageChunk,this.dispatchMessageChunk,this)]}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#Id=e}sendRawMessage(e){this.onMessage&&a.InspectorFrontendHost.InspectorFrontendHostInstance.sendMessageToBackend(e)}dispatchMessage(e){this.onMessage&&this.onMessage.call(null,e.data)}dispatchMessageChunk(e){const{messageChunk:t,messageSize:n}=e.data;n&&(this.#wd="",this.#Sd=n),this.#wd+=t,this.#wd.length===this.#Sd&&this.onMessage&&(this.onMessage.call(null,this.#wd),this.#wd="",this.#Sd=0)}async disconnect(){const t=this.#Id;e.EventTarget.removeEventListeners(this.#Vt),this.#Id=null,this.onMessage=null,t&&t.call(null,"force disconnect")}}class wo{#kd;onMessage;#Id;#Cd;#xd;#Rd;constructor(e,t){this.#kd=new WebSocket(e),this.#kd.onerror=this.onError.bind(this),this.#kd.onopen=this.onOpen.bind(this),this.#kd.onmessage=e=>{this.onMessage&&this.onMessage.call(null,e.data)},this.#kd.onclose=this.onClose.bind(this),this.onMessage=null,this.#Id=null,this.#Cd=t,this.#xd=!1,this.#Rd=[]}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#Id=e}onError(e){this.#Cd&&this.#Cd.call(null,{reason:vo(bo.websocketDisconnected),errorType:e.type}),this.#Id&&this.#Id.call(null,"connection failed"),this.close()}onOpen(){if(this.#xd=!0,this.#kd){this.#kd.onerror=console.error;for(const e of this.#Rd)this.#kd.send(e)}this.#Rd=[]}onClose(e){this.#Cd&&this.#Cd.call(null,{reason:e.reason,code:String(e.code||0)}),this.#Id&&this.#Id.call(null,"websocket closed"),this.close()}close(e){this.#kd&&(this.#kd.onerror=null,this.#kd.onopen=null,this.#kd.onclose=e||null,this.#kd.onmessage=null,this.#kd.close(),this.#kd=null),this.#Cd=null}sendRawMessage(e){this.#xd&&this.#kd?this.#kd.send(e):this.#Rd.push(e)}disconnect(){return new Promise((e=>{this.close((()=>{this.#Id&&this.#Id.call(null,"force disconnect"),e()}))}))}}class So{onMessage;#Id;constructor(){this.onMessage=null,this.#Id=null}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#Id=e}sendRawMessage(e){window.setTimeout(this.respondWithError.bind(this,e),0)}respondWithError(e){const t=JSON.parse(e),n={message:"This is a stub connection, can't dispatch message.",code:l.InspectorBackend.DevToolsStubErrorCode,data:t};this.onMessage&&this.onMessage.call(null,{id:t.id,error:n})}async disconnect(){this.#Id&&this.#Id.call(null,"force disconnect"),this.#Id=null,this.onMessage=null}}class ko{#Td;#Md;onMessage;#Id;constructor(e,t){this.#Td=e,this.#Md=t,this.onMessage=null,this.#Id=null}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#Id=e}getOnDisconnect(){return this.#Id}sendRawMessage(e){const t=JSON.parse(e);t.sessionId||(t.sessionId=this.#Md),this.#Td.sendRawMessage(JSON.stringify(t))}getSessionId(){return this.#Md}async disconnect(){this.#Id&&this.#Id.call(null,"force disconnect"),this.#Id=null,this.onMessage=null}}function Co(e){if(o.Runtime.getPathName().includes("rehydrated_devtools_app"))return new po(e);const t=o.Runtime.Runtime.queryParam("ws"),n=o.Runtime.Runtime.queryParam("wss");if(t||n){const r=t?"ws":"wss";let s=t||n;a.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode()&&s.startsWith("/")&&(s=`${window.location.host}${s}`);return new wo(`${r}://${s}`,e)}return a.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode()?new So:new Io}var xo=Object.freeze({__proto__:null,MainConnection:Io,ParallelConnection:ko,StubConnection:So,WebSocketConnection:wo,initMainConnection:async function(e,t){l.InspectorBackend.Connection.setFactory(Co.bind(null,t)),await e(),a.InspectorFrontendHost.InspectorFrontendHostInstance.connectionReady()}});const Ro={main:"Main"},To=n.i18n.registerUIStrings("core/sdk/ChildTargetManager.ts",Ro),Mo=n.i18n.getLocalizedString.bind(void 0,To);class Po extends h{#Pd;#Ed;#Ld;#Ad=new Map;#Od=new Map;#Dd=new Map;#Nd=new Map;#Fd=null;constructor(e){super(e),this.#Pd=e.targetManager(),this.#Ed=e,this.#Ld=e.targetAgent(),e.registerTargetDispatcher(this);const t=this.#Pd.browserTarget();t?t!==e&&t.targetAgent().invoke_autoAttachRelated({targetId:e.id(),waitForDebuggerOnStart:!0}):this.#Ld.invoke_setAutoAttach({autoAttach:!0,waitForDebuggerOnStart:!0,flatten:!0}),e.parentTarget()?.type()===U.FRAME||a.InspectorFrontendHost.isUnderTest()||(this.#Ld.invoke_setDiscoverTargets({discover:!0}),this.#Ld.invoke_setRemoteLocations({locations:[{host:"localhost",port:9229}]}))}static install(e){Po.attachCallback=e,h.register(Po,{capabilities:32,autostart:!0})}childTargets(){return Array.from(this.#Od.values())}async suspendModel(){await this.#Ld.invoke_setAutoAttach({autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0})}async resumeModel(){await this.#Ld.invoke_setAutoAttach({autoAttach:!0,waitForDebuggerOnStart:!0,flatten:!0})}dispose(){for(const e of this.#Od.keys())this.detachedFromTarget({sessionId:e,targetId:void 0})}targetCreated({targetInfo:e}){this.#Ad.set(e.targetId,e),this.fireAvailableTargetsChanged(),this.dispatchEventToListeners("TargetCreated",e)}targetInfoChanged({targetInfo:e}){this.#Ad.set(e.targetId,e);const t=this.#Dd.get(e.targetId);if(t)if(t.setHasCrashed(!1),"prerender"!==t.targetInfo()?.subtype||e.subtype)t.updateTargetInfo(e);else{const n=t.model(ii);t.updateTargetInfo(e),n?.mainFrame&&n.primaryPageChanged(n.mainFrame,"Activation"),t.setName(Mo(Ro.main))}this.fireAvailableTargetsChanged(),this.dispatchEventToListeners("TargetInfoChanged",e)}targetDestroyed({targetId:e}){this.#Ad.delete(e),this.fireAvailableTargetsChanged(),this.dispatchEventToListeners("TargetDestroyed",e)}targetCrashed({targetId:e}){const t=this.#Dd.get(e);t&&t.setHasCrashed(!0)}fireAvailableTargetsChanged(){W.instance().dispatchEventToListeners("AvailableTargetsChanged",[...this.#Ad.values()])}async getParentTargetId(){return this.#Fd||(this.#Fd=(await this.#Ed.targetAgent().invoke_getTargetInfo({})).targetInfo.targetId),this.#Fd}async getTargetInfo(){return(await this.#Ed.targetAgent().invoke_getTargetInfo({})).targetInfo}async attachedToTarget({sessionId:t,targetInfo:n,waitingForDebugger:r}){if(this.#Fd===n.targetId)return;let s=U.BROWSER,i="";if("worker"===n.type&&n.title&&n.title!==n.url)i=n.title;else if(!["page","iframe","webview"].includes(n.type)){if(["^chrome://print/$","^chrome://file-manager/","^chrome://feedback/","^chrome://.*\\.top-chrome/$","^chrome://view-cert/$","^devtools://"].some((e=>n.url.match(e))))s=U.FRAME;else{const t=e.ParsedURL.ParsedURL.fromString(n.url);i=t?t.lastPathComponentWithFragment():"#"+ ++Po.lastAnonymousTargetId}}"iframe"===n.type||"webview"===n.type||"background_page"===n.type||"app"===n.type||"popup_page"===n.type||"page"===n.type?s=U.FRAME:"worker"===n.type?s=U.Worker:"worklet"===n.type?s=U.WORKLET:"shared_worker"===n.type?s=U.SHARED_WORKER:"shared_storage_worklet"===n.type?s=U.SHARED_STORAGE_WORKLET:"service_worker"===n.type?s=U.ServiceWorker:"auction_worklet"===n.type&&(s=U.AUCTION_WORKLET);const o=this.#Pd.createTarget(n.targetId,i,s,this.#Ed,t,void 0,void 0,n);this.#Od.set(t,o),this.#Dd.set(o.id(),o),Po.attachCallback&&await Po.attachCallback({target:o,waitingForDebugger:r}),r&&o.runtimeAgent().invoke_runIfWaitingForDebugger()}detachedFromTarget({sessionId:e}){if(this.#Nd.has(e))this.#Nd.delete(e);else{const t=this.#Od.get(e);t&&(t.dispose("target terminated"),this.#Od.delete(e),this.#Dd.delete(t.id()))}}receivedMessageFromTarget({}){}async createParallelConnection(e){const t=await this.getParentTargetId(),{connection:n,sessionId:r}=await this.createParallelConnectionAndSessionForTarget(this.#Ed,t);return n.setOnMessage(e),this.#Nd.set(r,n),{connection:n,sessionId:r}}async createParallelConnectionAndSessionForTarget(e,t){const n=e.targetAgent(),r=e.router(),s=(await n.invoke_attachToTarget({targetId:t,flatten:!0})).sessionId,i=new ko(r.connection(),s);return r.registerSession(e,s,i),i.setOnDisconnect((()=>{r.unregisterSession(s),n.invoke_detachFromTarget({sessionId:s})})),{connection:i,sessionId:s}}targetInfos(){return Array.from(this.#Ad.values())}static lastAnonymousTargetId=0;static attachCallback}var Eo=Object.freeze({__proto__:null,ChildTargetManager:Po});const Lo={couldNotLoadContentForSS:"Could not load content for {PH1} ({PH2})"},Ao=n.i18n.registerUIStrings("core/sdk/CompilerSourceMappingContentProvider.ts",Lo),Oo=n.i18n.getLocalizedString.bind(void 0,Ao);var Do,No=Object.freeze({__proto__:null,CompilerSourceMappingContentProvider:class{#Bd;#_d;#Hd;constructor(e,t,n){this.#Bd=e,this.#_d=t,this.#Hd=n}contentURL(){return this.#Bd}contentType(){return this.#_d}async requestContent(){const e=await this.requestContentData();return t.ContentData.ContentData.asDeferredContent(e)}async requestContentData(){try{const{content:e}=await nr.instance().loadResource(this.#Bd,this.#Hd);return new t.ContentData.ContentData(e,!1,this.#_d.canonicalMimeType())}catch(e){const t=Oo(Lo.couldNotLoadContentForSS,{PH1:this.#Bd,PH2:e.message});return console.error(t),{error:t}}}async searchInContent(e,n,r){const s=await this.requestContentData();return t.TextUtils.performSearchInContentData(s,e,n,r)}}});!function(e){e.Result="result",e.Command="command",e.System="system",e.QueryObjectResult="queryObjectResult"}(Do||(Do={}));const Fo={profileD:"Profile {PH1}"},Bo=n.i18n.registerUIStrings("core/sdk/CPUProfilerModel.ts",Fo),_o=n.i18n.getLocalizedString.bind(void 0,Bo);class Ho extends h{#Ud;#qd;#zd;#jd;#Vd;registeredConsoleProfileMessages=[];constructor(e){super(e),this.#Ud=1,this.#qd=new Map,this.#zd=e.profilerAgent(),this.#jd=null,e.registerProfilerDispatcher(this),this.#zd.invoke_enable(),this.#Vd=e.model(ms)}runtimeModel(){return this.#Vd.runtimeModel()}debuggerModel(){return this.#Vd}consoleProfileStarted({id:e,location:t,title:n}){n||(n=_o(Fo.profileD,{PH1:this.#Ud++}),this.#qd.set(e,n));const r=this.createEventDataFrom(e,t,n);this.dispatchEventToListeners("ConsoleProfileStarted",r)}consoleProfileFinished({id:e,location:t,profile:n,title:r}){r||(r=this.#qd.get(e),this.#qd.delete(e));const s={...this.createEventDataFrom(e,t,r),cpuProfile:n};this.registeredConsoleProfileMessages.push(s),this.dispatchEventToListeners("ConsoleProfileFinished",s)}createEventDataFrom(e,t,n){const r=Is.fromPayload(this.#Vd,t);return{id:this.target().id()+"."+e,scriptLocation:r,title:n||"",cpuProfilerModel:this}}startRecording(){return this.#zd.invoke_setSamplingInterval({interval:100}),this.#zd.invoke_start()}stopRecording(){return this.#zd.invoke_stop().then((e=>e.profile||null))}startPreciseCoverage(e,t){this.#jd=t;return this.#zd.invoke_startPreciseCoverage({callCount:!1,detailed:e,allowTriggeredUpdates:!0})}async takePreciseCoverage(){const e=await this.#zd.invoke_takePreciseCoverage();return{timestamp:e?.timestamp||0,coverage:e?.result||[]}}stopPreciseCoverage(){return this.#jd=null,this.#zd.invoke_stopPreciseCoverage()}preciseCoverageDeltaUpdate({timestamp:e,occasion:t,result:n}){this.#jd&&this.#jd(e,t,n)}}h.register(Ho,{capabilities:4,autostart:!0});var Uo=Object.freeze({__proto__:null,CPUProfilerModel:Ho});class qo extends h{#Wd;constructor(e){super(e),e.registerLogDispatcher(this),this.#Wd=e.logAgent(),this.#Wd.invoke_enable(),a.InspectorFrontendHost.isUnderTest()||this.#Wd.invoke_startViolationsReport({config:[{name:"longTask",threshold:200},{name:"longLayout",threshold:30},{name:"blockedEvent",threshold:100},{name:"blockedParser",threshold:-1},{name:"handler",threshold:150},{name:"recurringHandler",threshold:50},{name:"discouragedAPIUse",threshold:-1}]})}entryAdded({entry:e}){this.dispatchEventToListeners("EntryAdded",{logModel:this,entry:e})}requestClear(){this.#Wd.invoke_clear()}}h.register(qo,{capabilities:8,autostart:!0});var zo=Object.freeze({__proto__:null,LogModel:qo});const jo={navigatedToS:"Navigated to {PH1}",bfcacheNavigation:"Navigation to {PH1} was restored from back/forward cache (see https://web.dev/bfcache/)",profileSStarted:"Profile ''{PH1}'' started.",profileSFinished:"Profile ''{PH1}'' finished.",failedToSaveToTempVariable:"Failed to save to temp variable."},Vo=n.i18n.registerUIStrings("core/sdk/ConsoleModel.ts",jo),Wo=n.i18n.getLocalizedString.bind(void 0,Vo);class Go extends h{#Gd=[];#Kd=new r.MapUtilities.Multimap;#Qd=new Map;#$d=0;#Xd=0;#Jd=0;#Yd=0;#Zd=new WeakMap;constructor(t){super(t);const n=t.model(ii);if(!n||n.cachedResourcesLoaded())return void this.initTarget(t);const r=n.addEventListener(ri.CachedResourcesLoaded,(()=>{e.EventTarget.removeEventListeners([r]),this.initTarget(t)}))}initTarget(e){const t=[],n=e.model(Ho);n&&(t.push(n.addEventListener("ConsoleProfileStarted",this.consoleProfileStarted.bind(this,n))),t.push(n.addEventListener("ConsoleProfileFinished",this.consoleProfileFinished.bind(this,n))));const r=e.model(ii);r&&e.parentTarget()?.type()!==U.FRAME&&t.push(r.addEventListener(ri.PrimaryPageChanged,this.primaryPageChanged,this));const s=e.model(Jr);s&&(t.push(s.addEventListener($r.ExceptionThrown,this.exceptionThrown.bind(this,s))),t.push(s.addEventListener($r.ExceptionRevoked,this.exceptionRevoked.bind(this,s))),t.push(s.addEventListener($r.ConsoleAPICalled,this.consoleAPICalled.bind(this,s))),e.parentTarget()?.type()!==U.FRAME&&t.push(s.debuggerModel().addEventListener(ys.GlobalObjectCleared,this.clearIfNecessary,this)),t.push(s.addEventListener($r.QueryObjectRequested,this.queryObjectRequested.bind(this,s)))),this.#Zd.set(e,t)}targetRemoved(t){const n=t.model(Jr);n&&this.#Qd.delete(n),e.EventTarget.removeEventListeners(this.#Zd.get(t)||[])}async evaluateCommandInConsole(t,n,r,s){const i=await t.evaluate({expression:r,objectGroup:"console",includeCommandLineAPI:s,silent:!1,returnByValue:!1,generatePreview:!0,replMode:!0,allowUnsafeEvalBlockedByCSP:!1},e.Settings.Settings.instance().moduleSetting("console-user-activation-eval").get(),!1);a.userMetrics.actionTaken(a.UserMetrics.Action.ConsoleEvaluated),"error"in i||(await e.Console.Console.instance().showPromise(),this.dispatchEventToListeners(Ko.CommandEvaluated,{result:i.object,commandMessage:n,exceptionDetails:i.exceptionDetails}))}addCommandMessage(e,t){const n=new $o(e.runtimeModel,"javascript",null,t,{type:Do.Command});return n.setExecutionContextId(e.id),this.addMessage(n),n}addMessage(t){t.setPageLoadSequenceNumber(this.#Yd),t.source===e.Console.FrontendMessageSource.ConsoleAPI&&"clear"===t.type&&this.clearIfNecessary(),this.#Gd.push(t),this.#Kd.set(t.timestamp,t);const n=t.runtimeModel(),r=t.getExceptionId();if(r&&n){let e=this.#Qd.get(n);e||(e=new Map,this.#Qd.set(n,e)),e.set(r,t)}this.incrementErrorWarningCount(t),this.dispatchEventToListeners(Ko.MessageAdded,t)}exceptionThrown(e,t){const n=t.data,r=function(e){if(!e)return;return{requestId:e.requestId||void 0,issueId:e.issueId||void 0}}(n.details.exceptionMetaData),s=$o.fromException(e,n.details,void 0,n.timestamp,void 0,r);s.setExceptionId(n.details.exceptionId),this.addMessage(s)}exceptionRevoked(e,t){const n=t.data,r=this.#Qd.get(e),s=r?r.get(n):null;s&&(this.#Xd--,s.level="verbose",this.dispatchEventToListeners(Ko.MessageUpdated,s))}consoleAPICalled(t,n){const r=n.data;let s="info";"debug"===r.type?s="verbose":"error"===r.type||"assert"===r.type?s="error":"warning"===r.type?s="warning":"info"!==r.type&&"log"!==r.type||(s="info");let i="";r.args.length&&r.args[0].unserializableValue?i=r.args[0].unserializableValue:r.args.length&&("object"!=typeof r.args[0].value&&void 0!==r.args[0].value||null===r.args[0].value)?i=String(r.args[0].value):r.args.length&&r.args[0].description&&(i=r.args[0].description);const o=r.stackTrace?.callFrames.length?r.stackTrace.callFrames[0]:null,a={type:r.type,url:o?.url,line:o?.lineNumber,column:o?.columnNumber,parameters:r.args,stackTrace:r.stackTrace,timestamp:r.timestamp,executionContextId:r.executionContextId,context:r.context},l=new $o(t,e.Console.FrontendMessageSource.ConsoleAPI,s,i,a);for(const e of this.#Kd.get(l.timestamp).values())if(l.isEqual(e))return;this.addMessage(l)}queryObjectRequested(t,n){const{objects:r,executionContextId:s}=n.data,i={type:Do.QueryObjectResult,parameters:[r],executionContextId:s},o=new $o(t,e.Console.FrontendMessageSource.ConsoleAPI,"info","",i);this.addMessage(o)}clearIfNecessary(){e.Settings.Settings.instance().moduleSetting("preserve-console-log").get()||this.clear(),++this.#Yd}primaryPageChanged(t){if(e.Settings.Settings.instance().moduleSetting("preserve-console-log").get()){const{frame:n}=t.data;n.backForwardCacheDetails.restoredFromCache?e.Console.Console.instance().log(Wo(jo.bfcacheNavigation,{PH1:n.url})):e.Console.Console.instance().log(Wo(jo.navigatedToS,{PH1:n.url}))}}consoleProfileStarted(e,t){const{data:n}=t;this.addConsoleProfileMessage(e,"profile",n.scriptLocation,Wo(jo.profileSStarted,{PH1:n.title}))}consoleProfileFinished(e,t){const{data:n}=t;this.addConsoleProfileMessage(e,"profileEnd",n.scriptLocation,Wo(jo.profileSFinished,{PH1:n.title}))}addConsoleProfileMessage(t,n,r,s){const i=r.script(),o=[{functionName:"",scriptId:r.scriptId,url:i?i.contentURL():"",lineNumber:r.lineNumber,columnNumber:r.columnNumber||0}];this.addMessage(new $o(t.runtimeModel(),e.Console.FrontendMessageSource.ConsoleAPI,"info",s,{type:n,stackTrace:{callFrames:o}}))}incrementErrorWarningCount(e){if("violation"!==e.source)switch(e.level){case"warning":this.#$d++;break;case"error":this.#Xd++}else this.#Jd++}messages(){return this.#Gd}static allMessagesUnordered(){const e=[];for(const t of W.instance().targets()){const n=t.model(Go)?.messages()||[];e.push(...n)}return e}static requestClearMessages(){for(const e of W.instance().models(qo))e.requestClear();for(const e of W.instance().models(Jr))e.discardConsoleEntries(),e.releaseObjectGroup("live-expression");for(const e of W.instance().targets())e.model(Go)?.clear()}clear(){this.#Gd=[],this.#Kd.clear(),this.#Qd.clear(),this.#Xd=0,this.#$d=0,this.#Jd=0,this.dispatchEventToListeners(Ko.ConsoleCleared)}errors(){return this.#Xd}static allErrors(){let e=0;for(const t of W.instance().targets())e+=t.model(Go)?.errors()||0;return e}warnings(){return this.#$d}static allWarnings(){let e=0;for(const t of W.instance().targets())e+=t.model(Go)?.warnings()||0;return e}violations(){return this.#Jd}async saveToTempVariable(t,n){if(!n||!t)return void a(null);const r=t,s=await r.globalObject("",!1);if("error"in s||Boolean(s.exceptionDetails)||!s.object)return void a("object"in s&&s.object||null);const i=s.object,o=await i.callFunction((function(e){const t="temp";let n=1;for(;t+n in this;)++n;const r=t+n;return this[r]=e,r}),[Bn.toCallArgument(n)]);if(i.release(),o.wasThrown||!o.object||"string"!==o.object.type)a(o.object||null);else{const e=o.object.value,t=this.addCommandMessage(r,e);this.evaluateCommandInConsole(r,t,e,!1)}function a(t){let n=Wo(jo.failedToSaveToTempVariable);t&&(n=n+" "+t.description),e.Console.Console.instance().error(n)}o.object&&o.object.release()}}var Ko;function Qo(e,t){if(!e!=!t)return!1;if(!e||!t)return!0;const n=e.callFrames,r=t.callFrames;if(n.length!==r.length)return!1;for(let e=0,t=n.length;et.includes(e)));if(-1===n||n===e.length-1)return{callFrame:null,type:null};const r=e[n].url===xs?"LOGPOINT":"CONDITIONAL_BREAKPOINT";return{callFrame:e[n+1],type:r}}}h.register(Go,{capabilities:4,autostart:!0});const Xo=new Map([["xml","xml"],["javascript","javascript"],["network","network"],[e.Console.FrontendMessageSource.ConsoleAPI,"console-api"],["storage","storage"],["appcache","appcache"],["rendering","rendering"],[e.Console.FrontendMessageSource.CSS,"css"],["security","security"],["deprecation","deprecation"],["worker","worker"],["violation","violation"],["intervention","intervention"],["recommendation","recommendation"],["other","other"],[e.Console.FrontendMessageSource.ISSUE_PANEL,"issue-panel"]]);var Jo=Object.freeze({__proto__:null,ConsoleMessage:$o,ConsoleModel:Go,get Events(){return Ko},get FrontendMessageType(){return Do},MessageSourceDisplayName:Xo});class Yo extends h{#oc;#ac;#lt;#lc;#dc;#cc;#hc;#uc;#gc;#pc;#mc;constructor(t){super(t),this.#oc=t.emulationAgent(),this.#ac=t.deviceOrientationAgent(),this.#lt=t.model(Br),this.#lc=t.model(Fs),this.#lc&&this.#lc.addEventListener("InspectModeWillBeToggled",(()=>{this.updateTouch()}),this);const n=e.Settings.Settings.instance().moduleSetting("java-script-disabled");n.addChangeListener((async()=>await this.#oc.invoke_setScriptExecutionDisabled({value:n.get()}))),n.get()&&this.#oc.invoke_setScriptExecutionDisabled({value:!0});const r=e.Settings.Settings.instance().moduleSetting("emulation.touch");r.addChangeListener((()=>{const e=r.get();this.overrideEmulateTouch("force"===e)}));const s=e.Settings.Settings.instance().moduleSetting("emulation.idle-detection");s.addChangeListener((async()=>{const e=s.get();if("none"===e)return void await this.clearIdleOverride();const t=JSON.parse(e);await this.setIdleOverride(t)}));const i=e.Settings.Settings.instance().moduleSetting("emulation.cpu-pressure");i.addChangeListener((async()=>{const e=i.get();if("none"===e)return await this.setPressureSourceOverrideEnabled(!1),void(this.#cc=!1);this.#cc||(this.#cc=!0,await this.setPressureSourceOverrideEnabled(!0)),await this.setPressureStateOverride(e)}));const o=e.Settings.Settings.instance().moduleSetting("emulated-css-media"),a=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-color-gamut"),l=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-prefers-color-scheme"),d=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-forced-colors"),c=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-prefers-contrast"),h=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-prefers-reduced-data"),u=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-prefers-reduced-transparency"),g=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-prefers-reduced-motion");this.#dc=new Map([["type",o.get()],["color-gamut",a.get()],["prefers-color-scheme",l.get()],["forced-colors",d.get()],["prefers-contrast",c.get()],["prefers-reduced-data",h.get()],["prefers-reduced-motion",g.get()],["prefers-reduced-transparency",u.get()]]),o.addChangeListener((()=>{this.#dc.set("type",o.get()),this.updateCssMedia()})),a.addChangeListener((()=>{this.#dc.set("color-gamut",a.get()),this.updateCssMedia()})),l.addChangeListener((()=>{this.#dc.set("prefers-color-scheme",l.get()),this.updateCssMedia()})),d.addChangeListener((()=>{this.#dc.set("forced-colors",d.get()),this.updateCssMedia()})),c.addChangeListener((()=>{this.#dc.set("prefers-contrast",c.get()),this.updateCssMedia()})),h.addChangeListener((()=>{this.#dc.set("prefers-reduced-data",h.get()),this.updateCssMedia()})),g.addChangeListener((()=>{this.#dc.set("prefers-reduced-motion",g.get()),this.updateCssMedia()})),u.addChangeListener((()=>{this.#dc.set("prefers-reduced-transparency",u.get()),this.updateCssMedia()})),this.updateCssMedia();const p=e.Settings.Settings.instance().moduleSetting("emulate-auto-dark-mode");p.addChangeListener((()=>{const e=p.get();l.setDisabled(e),l.set(e?"dark":""),this.emulateAutoDarkMode(e)})),p.get()&&(l.setDisabled(!0),l.set("dark"),this.emulateAutoDarkMode(!0));const m=e.Settings.Settings.instance().moduleSetting("emulated-vision-deficiency");m.addChangeListener((()=>this.emulateVisionDeficiency(m.get()))),m.get()&&this.emulateVisionDeficiency(m.get());const f=e.Settings.Settings.instance().moduleSetting("local-fonts-disabled");f.addChangeListener((()=>this.setLocalFontsDisabled(f.get()))),f.get()&&this.setLocalFontsDisabled(f.get());const b=e.Settings.Settings.instance().moduleSetting("avif-format-disabled"),y=e.Settings.Settings.instance().moduleSetting("webp-format-disabled"),v=()=>{const e=[];b.get()&&e.push("avif"),y.get()&&e.push("webp"),this.setDisabledImageTypes(e)};b.addChangeListener(v),y.addChangeListener(v),(b.get()||y.get())&&v(),this.#cc=!1,this.#gc=!0,this.#hc=!1,this.#uc=!1,this.#pc=!1,this.#mc={enabled:!1,configuration:"mobile"}}setTouchEmulationAllowed(e){this.#gc=e}supportsDeviceEmulation(){return this.target().hasAllCapabilities(4096)}async resetPageScaleFactor(){await this.#oc.invoke_resetPageScaleFactor()}async emulateDevice(e){e?await this.#oc.invoke_setDeviceMetricsOverride(e):await this.#oc.invoke_clearDeviceMetricsOverride()}overlayModel(){return this.#lc}async setPressureSourceOverrideEnabled(e){await this.#oc.invoke_setPressureSourceOverrideEnabled({source:"cpu",enabled:e})}async setPressureStateOverride(e){await this.#oc.invoke_setPressureStateOverride({source:"cpu",state:e})}async emulateLocation(e){if(e)if(e.unavailable)await Promise.all([this.#oc.invoke_setGeolocationOverride({}),this.#oc.invoke_setTimezoneOverride({timezoneId:""}),this.#oc.invoke_setLocaleOverride({locale:""}),this.#oc.invoke_setUserAgentOverride({userAgent:ce.instance().currentUserAgent()})]);else{function t(e,t){const n=t.getError();return n?Promise.reject({type:e,message:n}):Promise.resolve()}await Promise.all([this.#oc.invoke_setGeolocationOverride({latitude:e.latitude,longitude:e.longitude,accuracy:Zo.defaultGeoMockAccuracy}).then((e=>t("emulation-set-location",e))),this.#oc.invoke_setTimezoneOverride({timezoneId:e.timezoneId}).then((e=>t("emulation-set-timezone",e))),this.#oc.invoke_setLocaleOverride({locale:e.locale}).then((e=>t("emulation-set-locale",e))),this.#oc.invoke_setUserAgentOverride({userAgent:ce.instance().currentUserAgent(),acceptLanguage:e.locale}).then((e=>t("emulation-set-user-agent",e)))])}else await Promise.all([this.#oc.invoke_clearGeolocationOverride(),this.#oc.invoke_setTimezoneOverride({timezoneId:""}),this.#oc.invoke_setLocaleOverride({locale:""}),this.#oc.invoke_setUserAgentOverride({userAgent:ce.instance().currentUserAgent()})])}async emulateDeviceOrientation(e){e?await this.#ac.invoke_setDeviceOrientationOverride({alpha:e.alpha,beta:e.beta,gamma:e.gamma}):await this.#ac.invoke_clearDeviceOrientationOverride()}async setIdleOverride(e){await this.#oc.invoke_setIdleOverride(e)}async clearIdleOverride(){await this.#oc.invoke_clearIdleOverride()}async emulateCSSMedia(e,t){await this.#oc.invoke_setEmulatedMedia({media:e,features:t}),this.#lt&&this.#lt.mediaQueryResultChanged()}async emulateAutoDarkMode(e){e&&(this.#dc.set("prefers-color-scheme","dark"),await this.updateCssMedia()),await this.#oc.invoke_setAutoDarkModeOverride({enabled:e||void 0})}async emulateVisionDeficiency(e){await this.#oc.invoke_setEmulatedVisionDeficiency({type:e})}setLocalFontsDisabled(e){this.#lt&&this.#lt.setLocalFontsEnabled(!e)}setDisabledImageTypes(e){this.#oc.invoke_setDisabledImageTypes({imageTypes:e})}async setCPUThrottlingRate(e){await this.#oc.invoke_setCPUThrottlingRate({rate:e})}async setHardwareConcurrency(e){if(e<1)throw new Error("hardwareConcurrency must be a positive value");await this.#oc.invoke_setHardwareConcurrencyOverride({hardwareConcurrency:e})}async emulateTouch(e,t){this.#hc=e&&this.#gc,this.#uc=t&&this.#gc,await this.updateTouch()}async overrideEmulateTouch(e){this.#pc=e&&this.#gc,await this.updateTouch()}async updateTouch(){let e={enabled:this.#hc,configuration:this.#uc?"mobile":"desktop"};this.#pc&&(e={enabled:!0,configuration:"mobile"}),this.#lc&&this.#lc.inspectModeEnabled()&&(e={enabled:!1,configuration:"mobile"}),(this.#mc.enabled||e.enabled)&&(this.#mc.enabled&&e.enabled&&this.#mc.configuration===e.configuration||(this.#mc=e,await this.#oc.invoke_setTouchEmulationEnabled({enabled:e.enabled,maxTouchPoints:1}),await this.#oc.invoke_setEmitTouchEventsForMouse({enabled:e.enabled,configuration:e.configuration})))}async updateCssMedia(){const e=this.#dc.get("type")??"",t=[{name:"color-gamut",value:this.#dc.get("color-gamut")??""},{name:"prefers-color-scheme",value:this.#dc.get("prefers-color-scheme")??""},{name:"forced-colors",value:this.#dc.get("forced-colors")??""},{name:"prefers-contrast",value:this.#dc.get("prefers-contrast")??""},{name:"prefers-reduced-data",value:this.#dc.get("prefers-reduced-data")??""},{name:"prefers-reduced-motion",value:this.#dc.get("prefers-reduced-motion")??""},{name:"prefers-reduced-transparency",value:this.#dc.get("prefers-reduced-transparency")??""}];return await this.emulateCSSMedia(e,t)}}class Zo{latitude;longitude;timezoneId;locale;unavailable;constructor(e,t,n,r,s){this.latitude=e,this.longitude=t,this.timezoneId=n,this.locale=r,this.unavailable=s}static parseSetting(e){if(e){const[t,n,r,s]=e.split(":"),[i,o]=t.split("@");return new Zo(parseFloat(i),parseFloat(o),n,r,Boolean(s))}return new Zo(0,0,"","",!1)}static parseUserInput(e,t,n,r){if(!e&&!t)return null;const{valid:s}=Zo.latitudeValidator(e),{valid:i}=Zo.longitudeValidator(t);if(!s&&!i)return null;const o=s?parseFloat(e):-1,a=i?parseFloat(t):-1;return new Zo(o,a,n,r,!1)}static latitudeValidator(e){const t=parseFloat(e);return{valid:/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(e)&&t>=-90&&t<=90,errorMessage:void 0}}static longitudeValidator(e){const t=parseFloat(e);return{valid:/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(e)&&t>=-180&&t<=180,errorMessage:void 0}}static timezoneIdValidator(e){return{valid:""===e||/[a-zA-Z]/.test(e),errorMessage:void 0}}static localeValidator(e){return{valid:""===e||/[a-zA-Z]{2}/.test(e),errorMessage:void 0}}toSetting(){return`${this.latitude}@${this.longitude}:${this.timezoneId}:${this.locale}:${this.unavailable||""}`}static defaultGeoMockAccuracy=150}class ea{alpha;beta;gamma;constructor(e,t,n){this.alpha=e,this.beta=t,this.gamma=n}static parseSetting(e){if(e){const t=JSON.parse(e);return new ea(t.alpha,t.beta,t.gamma)}return new ea(0,0,0)}static parseUserInput(e,t,n){if(!e&&!t&&!n)return null;const{valid:r}=ea.alphaAngleValidator(e),{valid:s}=ea.betaAngleValidator(t),{valid:i}=ea.gammaAngleValidator(n);if(!r&&!s&&!i)return null;const o=r?parseFloat(e):-1,a=s?parseFloat(t):-1,l=i?parseFloat(n):-1;return new ea(o,a,l)}static angleRangeValidator(e,t){const n=parseFloat(e);return{valid:/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(e)&&n>=t.minimum&&n{this.#vc=n=>{e(n),t(n)}})):await new Promise((e=>{this.#vc=e}));const n=await e.runtimeAgent().invoke_evaluate({expression:"navigator.hardwareConcurrency",returnByValue:!0,silent:!0,throwOnSideEffect:!0}),r=n.getError();if(r)throw new Error(r);const{result:s,exceptionDetails:i}=n;if(i)throw new Error(i.text);return s.value}modelAdded(e){if(this.#fc!==ca&&e.setCPUThrottlingRate(this.#fc.rate()),void 0!==this.#yc&&e.setHardwareConcurrency(this.#yc),this.#vc){const e=this.#vc;this.#vc=void 0,this.getHardwareConcurrency().then(e)}}modelRemoved(e){}}var la;function da(e){return{title:1===e?ia(na.noThrottling):ia(na.dSlowdown,{PH1:e}),rate:()=>e,jslogContext:1===e?"cpu-no-throttling":`cpu-throttled-${e}`}}!function(e){e[e.NO_THROTTLING=1]="NO_THROTTLING",e[e.MID_TIER_MOBILE=4]="MID_TIER_MOBILE",e[e.LOW_TIER_MOBILE=6]="LOW_TIER_MOBILE",e[e.EXTRA_SLOW=20]="EXTRA_SLOW",e[e.MidTierMobile=4]="MidTierMobile",e[e.LowEndMobile=6]="LowEndMobile"}(la||(la={}));const ca=da(la.NO_THROTTLING),ha=da(la.MID_TIER_MOBILE),ua=da(la.LOW_TIER_MOBILE),ga=da(la.EXTRA_SLOW);function pa(t){const n=()=>{const n=e.Settings.Settings.instance().createSetting("calibrated-cpu-throttling",{},"Global").get();return"low-tier-mobile"===t?n.low??null:"mid-tier-mobile"===t?n.mid??null:null};return{title(){const e=sa("low-tier-mobile"===t?na.calibratedLowTierMobile:na.calibratedMidTierMobile),r=n();return"number"==typeof r?`${e} – ${r.toFixed(1)}×`:e},rate(){const e=n();return"number"==typeof e?e:0},calibratedDeviceType:t,jslogContext:`cpu-throttled-calibrated-${t}`}}const ma=pa("low-tier-mobile"),fa=pa("mid-tier-mobile");var ba;!function(e){e.DEVICE_TOO_WEAK="DEVICE_TOO_WEAK"}(ba||(ba={}));var ya=Object.freeze({__proto__:null,CPUThrottlingManager:aa,get CPUThrottlingRates(){return la},CalibratedLowTierMobileThrottlingOption:ma,CalibratedMidTierMobileThrottlingOption:fa,get CalibrationError(){return ba},ExtraSlowThrottlingOption:ga,LowTierThrottlingOption:ua,MidTierThrottlingOption:ha,NoThrottlingOption:ca,calibrationErrorToString:function(e){return e===ba.DEVICE_TOO_WEAK?sa(na.calibrationErrorDeviceTooWeak):e},throttlingManager:function(){return aa.instance()}});class va extends h{agent;#yr;#Yn;#wc;#Sc;suspended=!1;constructor(t){super(t),this.agent=t.domdebuggerAgent(),this.#yr=t.model(Jr),this.#Yn=t.model(Gs),this.#Yn.addEventListener(Us.DocumentUpdated,this.documentUpdated,this),this.#Yn.addEventListener(Us.NodeRemoved,this.nodeRemoved,this),this.#wc=[],this.#Sc=e.Settings.Settings.instance().createLocalSetting("dom-breakpoints",[]),this.#Yn.existingDocument()&&this.documentUpdated()}runtimeModel(){return this.#yr}async suspendModel(){this.suspended=!0}async resumeModel(){this.suspended=!1}async eventListeners(e){if(console.assert(e.runtimeModel()===this.#yr),!e.objectId)return[];const t=await this.agent.invoke_getEventListeners({objectId:e.objectId}),n=[];for(const r of t.listeners||[]){const t=this.#yr.debuggerModel().createRawLocationByScriptId(r.scriptId,r.lineNumber,r.columnNumber);t&&n.push(new Sa(this,e,r.type,r.useCapture,r.passive,r.once,r.handler?this.#yr.createRemoteObject(r.handler):null,r.originalHandler?this.#yr.createRemoteObject(r.originalHandler):null,t,null))}return n}retrieveDOMBreakpoints(){this.#Yn.requestDocument()}domBreakpoints(){return this.#wc.slice()}hasDOMBreakpoint(e,t){return this.#wc.some((n=>n.node===e&&n.type===t))}setDOMBreakpoint(e,t){for(const n of this.#wc)if(n.node===e&&n.type===t)return this.toggleDOMBreakpoint(n,!0),n;const n=new wa(this,e,t,!0);return this.#wc.push(n),this.saveDOMBreakpoints(),this.enableDOMBreakpoint(n),this.dispatchEventToListeners("DOMBreakpointAdded",n),n}removeDOMBreakpoint(e,t){this.removeDOMBreakpoints((n=>n.node===e&&n.type===t))}removeAllDOMBreakpoints(){this.removeDOMBreakpoints((e=>!0))}toggleDOMBreakpoint(e,t){t!==e.enabled&&(e.enabled=t,t?this.enableDOMBreakpoint(e):this.disableDOMBreakpoint(e),this.dispatchEventToListeners("DOMBreakpointToggled",e))}enableDOMBreakpoint(e){e.node.id&&(this.agent.invoke_setDOMBreakpoint({nodeId:e.node.id,type:e.type}),e.node.setMarker(Ia,!0))}disableDOMBreakpoint(e){e.node.id&&(this.agent.invoke_removeDOMBreakpoint({nodeId:e.node.id,type:e.type}),e.node.setMarker(Ia,!!this.nodeHasBreakpoints(e.node)||null))}nodeHasBreakpoints(e){for(const t of this.#wc)if(t.node===e&&t.enabled)return!0;return!1}resolveDOMBreakpointData(e){const t=e.type,n=this.#Yn.nodeForId(e.nodeId);if(!t||!n)return null;let r=null,s=!1;return"subtree-modified"===t&&(s=e.insertion||!1,r=this.#Yn.nodeForId(e.targetNodeId)),{type:t,node:n,targetNode:r,insertion:s}}currentURL(){const e=this.#Yn.existingDocument();return e?e.documentURL:r.DevToolsPath.EmptyUrlString}async documentUpdated(){if(this.suspended)return;const e=this.#wc;this.#wc=[],this.dispatchEventToListeners("DOMBreakpointsRemoved",e);const t=await this.#Yn.requestDocument(),n=t?t.documentURL:r.DevToolsPath.EmptyUrlString;for(const e of this.#Sc.get())e.url===n&&this.#Yn.pushNodeByPathToFrontend(e.path).then(s.bind(this,e));function s(e,t){const n=t?this.#Yn.nodeForId(t):null;if(!n)return;const r=new wa(this,n,e.type,e.enabled);this.#wc.push(r),e.enabled&&this.enableDOMBreakpoint(r),this.dispatchEventToListeners("DOMBreakpointAdded",r)}}removeDOMBreakpoints(e){const t=[],n=[];for(const r of this.#wc)e(r)?(t.push(r),r.enabled&&(r.enabled=!1,this.disableDOMBreakpoint(r))):n.push(r);t.length&&(this.#wc=n,this.saveDOMBreakpoints(),this.dispatchEventToListeners("DOMBreakpointsRemoved",t))}nodeRemoved(e){if(this.suspended)return;const{node:t}=e.data,n=t.children()||[];this.removeDOMBreakpoints((e=>e.node===t||-1!==n.indexOf(e.node)))}saveDOMBreakpoints(){const e=this.currentURL(),t=this.#Sc.get().filter((t=>t.url!==e));for(const n of this.#wc)t.push({url:e,path:n.node.path(),type:n.type,enabled:n.enabled});this.#Sc.set(t)}}const Ia="breakpoint-marker";class wa{domDebuggerModel;node;type;enabled;constructor(e,t,n,r){this.domDebuggerModel=e,this.node=t,this.type=n,this.enabled=r}}class Sa{#kc;#Cc;#g;#xc;#Rc;#Tc;#Mc;#Pc;#$r;#Ec;#Lc;#Ac;constructor(e,t,n,s,i,o,a,l,d,c,h){this.#kc=e,this.#Cc=t,this.#g=n,this.#xc=s,this.#Rc=i,this.#Tc=o,this.#Mc=a,this.#Pc=l||a,this.#$r=d;const u=d.script();this.#Ec=u?u.contentURL():r.DevToolsPath.EmptyUrlString,this.#Lc=c,this.#Ac=h||"Raw"}domDebuggerModel(){return this.#kc}type(){return this.#g}useCapture(){return this.#xc}passive(){return this.#Rc}once(){return this.#Tc}handler(){return this.#Mc}location(){return this.#$r}sourceURL(){return this.#Ec}originalHandler(){return this.#Pc}canRemove(){return Boolean(this.#Lc)||"FrameworkUser"!==this.#Ac}remove(){if(!this.canRemove())return Promise.resolve(void 0);if("FrameworkUser"!==this.#Ac){function e(e,t,n){this.removeEventListener(e,t,n),this["on"+e]&&(this["on"+e]=void 0)}return this.#Cc.callFunction(e,[Bn.toCallArgument(this.#g),Bn.toCallArgument(this.#Pc),Bn.toCallArgument(this.#xc)]).then((()=>{}))}if(this.#Lc){function t(e,t,n,r){this.call(null,e,t,n,r)}return this.#Lc.callFunction(t,[Bn.toCallArgument(this.#g),Bn.toCallArgument(this.#Pc),Bn.toCallArgument(this.#xc),Bn.toCallArgument(this.#Rc)]).then((()=>{}))}return Promise.resolve(void 0)}canTogglePassive(){return"FrameworkUser"!==this.#Ac}togglePassive(){return this.#Cc.callFunction((function(e,t,n,r){this.removeEventListener(e,t,{capture:n}),this.addEventListener(e,t,{capture:n,passive:!r})}),[Bn.toCallArgument(this.#g),Bn.toCallArgument(this.#Pc),Bn.toCallArgument(this.#xc),Bn.toCallArgument(this.#Rc)]).then((()=>{}))}origin(){return this.#Ac}markAsFramework(){this.#Ac="Framework"}isScrollBlockingType(){return"touchstart"===this.#g||"touchmove"===this.#g||"mousewheel"===this.#g||"wheel"===this.#g}}class ka extends ro{#g;constructor(e,t){super(e,t),this.#g=t}type(){return this.#g}}class Ca extends ro{eventTargetNames;constructor(e,t,n){super(n,e),this.eventTargetNames=t}setEnabled(e){if(this.enabled()!==e){super.setEnabled(e);for(const e of W.instance().models(va))this.updateOnModel(e)}}updateOnModel(e){for(const t of this.eventTargetNames)this.enabled()?e.agent.invoke_setEventListenerBreakpoint({eventName:this.name,targetName:t}):e.agent.invoke_removeEventListenerBreakpoint({eventName:this.name,targetName:t})}static listener="listener:"}let xa;class Ra{#Oc;#Dc=new Map;#Nc=[];#Fc=[];constructor(){this.#Oc=e.Settings.Settings.instance().createLocalSetting("xhr-breakpoints",[]);for(const e of this.#Oc.get())this.#Dc.set(e.url,e.enabled);this.#Nc.push(new ka("trusted-type-violation","trustedtype-sink-violation")),this.#Nc.push(new ka("trusted-type-violation","trustedtype-policy-violation")),this.createEventListenerBreakpoints("media",["play","pause","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange","loadstart","progress","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","waiting"],["audio","video"]),this.createEventListenerBreakpoints("picture-in-picture",["enterpictureinpicture","leavepictureinpicture"],["video"]),this.createEventListenerBreakpoints("picture-in-picture",["resize"],["PictureInPictureWindow"]),this.createEventListenerBreakpoints("picture-in-picture",["enter"],["documentPictureInPicture"]),this.createEventListenerBreakpoints("clipboard",["copy","cut","paste","beforecopy","beforecut","beforepaste"],["*"]),this.createEventListenerBreakpoints("control",["resize","scroll","scrollend","scrollsnapchange","scrollsnapchanging","zoom","focus","blur","select","change","submit","reset"],["*"]),this.createEventListenerBreakpoints("device",["deviceorientation","devicemotion"],["*"]),this.createEventListenerBreakpoints("dom-mutation",["DOMActivate","DOMFocusIn","DOMFocusOut","DOMAttrModified","DOMCharacterDataModified","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","DOMContentLoaded"],["*"]),this.createEventListenerBreakpoints("drag-drop",["drag","dragstart","dragend","dragenter","dragover","dragleave","drop"],["*"]),this.createEventListenerBreakpoints("keyboard",["keydown","keyup","keypress","input"],["*"]),this.createEventListenerBreakpoints("load",["load","beforeunload","unload","abort","error","hashchange","popstate","navigate","navigatesuccess","navigateerror","currentchange","navigateto","navigatefrom","finish","dispose"],["*"]),this.createEventListenerBreakpoints("mouse",["auxclick","click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout","mouseenter","mouseleave","mousewheel","wheel","contextmenu"],["*"]),this.createEventListenerBreakpoints("pointer",["pointerover","pointerout","pointerenter","pointerleave","pointerdown","pointerup","pointermove","pointercancel","gotpointercapture","lostpointercapture","pointerrawupdate"],["*"]),this.createEventListenerBreakpoints("touch",["touchstart","touchmove","touchend","touchcancel"],["*"]),this.createEventListenerBreakpoints("worker",["message","messageerror"],["*"]),this.createEventListenerBreakpoints("xhr",["readystatechange","load","loadstart","loadend","abort","error","progress","timeout"],["xmlhttprequest","xmlhttprequestupload"]),W.instance().observeModels(va,this)}static instance(e={forceNew:null}){const{forceNew:t}=e;return xa&&!t||(xa=new Ra),xa}cspViolationBreakpoints(){return this.#Nc.slice()}createEventListenerBreakpoints(e,t,n){for(const r of t)this.#Fc.push(new Ca(r,n,e))}resolveEventListenerBreakpoint({eventName:e,targetName:t}){const n="listener:";if(!e.startsWith(n))return null;e=e.substring(9),t=(t||"*").toLowerCase();let r=null;for(const n of this.#Fc)e&&n.name===e&&-1!==n.eventTargetNames.indexOf(t)&&(r=n),!r&&e&&n.name===e&&-1!==n.eventTargetNames.indexOf("*")&&(r=n);return r}eventListenerBreakpoints(){return this.#Fc.slice()}updateCSPViolationBreakpoints(){const e=this.#Nc.filter((e=>e.enabled())).map((e=>e.type()));for(const t of W.instance().models(va))this.updateCSPViolationBreakpointsForModel(t,e)}updateCSPViolationBreakpointsForModel(e,t){e.agent.invoke_setBreakOnCSPViolation({violationTypes:t})}xhrBreakpoints(){return this.#Dc}saveXHRBreakpoints(){const e=[];for(const t of this.#Dc.keys())e.push({url:t,enabled:this.#Dc.get(t)||!1});this.#Oc.set(e)}addXHRBreakpoint(e,t){if(this.#Dc.set(e,t),t)for(const t of W.instance().models(va))t.agent.invoke_setXHRBreakpoint({url:e});this.saveXHRBreakpoints()}removeXHRBreakpoint(e){const t=this.#Dc.get(e);if(this.#Dc.delete(e),t)for(const t of W.instance().models(va))t.agent.invoke_removeXHRBreakpoint({url:e});this.saveXHRBreakpoints()}toggleXHRBreakpoint(e,t){this.#Dc.set(e,t);for(const n of W.instance().models(va))t?n.agent.invoke_setXHRBreakpoint({url:e}):n.agent.invoke_removeXHRBreakpoint({url:e});this.saveXHRBreakpoints()}modelAdded(e){for(const t of this.#Dc.keys())this.#Dc.get(t)&&e.agent.invoke_setXHRBreakpoint({url:t});for(const t of this.#Fc)t.enabled()&&t.updateOnModel(e);const t=this.#Nc.filter((e=>e.enabled())).map((e=>e.type()));this.updateCSPViolationBreakpointsForModel(e,t)}modelRemoved(e){}}h.register(va,{capabilities:2,autostart:!1});var Ta=Object.freeze({__proto__:null,CSPViolationBreakpoint:ka,DOMBreakpoint:wa,DOMDebuggerManager:Ra,DOMDebuggerModel:va,DOMEventListenerBreakpoint:Ca,EventListener:Sa});class Ma extends h{agent;constructor(e){super(e),this.agent=e.eventBreakpointsAgent()}}class Pa extends ro{setEnabled(e){if(this.enabled()!==e){super.setEnabled(e);for(const e of W.instance().models(Ma))this.updateOnModel(e)}}updateOnModel(e){this.enabled()?e.agent.invoke_setInstrumentationBreakpoint({eventName:this.name}):e.agent.invoke_removeInstrumentationBreakpoint({eventName:this.name})}static instrumentationPrefix="instrumentation:"}let Ea;class La{#Fc=[];constructor(){this.createInstrumentationBreakpoints("auction-worklet",["beforeBidderWorkletBiddingStart","beforeBidderWorkletReportingStart","beforeSellerWorkletScoringStart","beforeSellerWorkletReportingStart"]),this.createInstrumentationBreakpoints("animation",["requestAnimationFrame","cancelAnimationFrame","requestAnimationFrame.callback"]),this.createInstrumentationBreakpoints("canvas",["canvasContextCreated","webglErrorFired","webglWarningFired"]),this.createInstrumentationBreakpoints("geolocation",["Geolocation.getCurrentPosition","Geolocation.watchPosition"]),this.createInstrumentationBreakpoints("notification",["Notification.requestPermission"]),this.createInstrumentationBreakpoints("parse",["Element.setInnerHTML","Document.write"]),this.createInstrumentationBreakpoints("script",["scriptFirstStatement","scriptBlockedByCSP"]),this.createInstrumentationBreakpoints("shared-storage-worklet",["sharedStorageWorkletScriptFirstStatement"]),this.createInstrumentationBreakpoints("timer",["setTimeout","clearTimeout","setTimeout.callback","setInterval","clearInterval","setInterval.callback"]),this.createInstrumentationBreakpoints("window",["DOMWindow.close"]),this.createInstrumentationBreakpoints("web-audio",["audioContextCreated","audioContextClosed","audioContextResumed","audioContextSuspended"]),W.instance().observeModels(Ma,this)}static instance(e={forceNew:null}){const{forceNew:t}=e;return Ea&&!t||(Ea=new La),Ea}createInstrumentationBreakpoints(e,t){for(const n of t)this.#Fc.push(new Pa(e,n))}eventListenerBreakpoints(){return this.#Fc.slice()}resolveEventListenerBreakpoint({eventName:e}){if(!e.startsWith(Pa.instrumentationPrefix))return null;const t=e.substring(Pa.instrumentationPrefix.length);return this.#Fc.find((e=>e.name===t))||null}modelAdded(e){for(const t of this.#Fc)t.enabled()&&t.updateOnModel(e)}modelRemoved(e){}}h.register(Ma,{capabilities:524288,autostart:!1});var Aa=Object.freeze({__proto__:null,EventBreakpointsManager:La,EventBreakpointsModel:Ma}),Oa=Object.freeze({__proto__:null});let Da;class Na extends e.ObjectWrapper.ObjectWrapper{#Bc=new Map;#_c=new Map;#L=new Set;#Hc=0;constructor(){super(),W.instance().observeModels(Jr,this)}static instance({forceNew:e}={forceNew:!1}){return Da&&!e||(Da=new Na),Da}observeIsolates(e){if(this.#L.has(e))throw new Error("Observer can only be registered once");this.#L.size||this.poll(),this.#L.add(e);for(const t of this.#Bc.values())e.isolateAdded(t)}modelAdded(e){this.modelAddedInternal(e)}async modelAddedInternal(e){this.#_c.set(e,null);const t=await e.isolateId();if(!this.#_c.has(e))return;if(!t)return void this.#_c.delete(e);this.#_c.set(e,t);let n=this.#Bc.get(t);if(n||(n=new _a(t),this.#Bc.set(t,n)),n.modelsInternal.add(e),1===n.modelsInternal.size)for(const e of this.#L)e.isolateAdded(n);else for(const e of this.#L)e.isolateChanged(n)}modelRemoved(e){const t=this.#_c.get(e);if(this.#_c.delete(e),!t)return;const n=this.#Bc.get(t);if(n)if(n.modelsInternal.delete(e),n.modelsInternal.size)for(const e of this.#L)e.isolateChanged(n);else{for(const e of this.#L)e.isolateRemoved(n);this.#Bc.delete(t)}}isolateByModel(e){return this.#Bc.get(this.#_c.get(e)||"")||null}isolates(){return this.#Bc.values()}async poll(){const e=this.#Hc;for(;e===this.#Hc;)await Promise.all(Array.from(this.isolates(),(e=>e.update()))),await new Promise((e=>window.setTimeout(e,Ba)))}}const Fa=12e4,Ba=2e3;class _a{#C;modelsInternal;#Uc;#qc;constructor(e){this.#C=e,this.modelsInternal=new Set,this.#Uc=0;const t=Fa/Ba;this.#qc=new Ha(t)}id(){return this.#C}models(){return this.modelsInternal}runtimeModel(){return this.modelsInternal.values().next().value||null}heapProfilerModel(){const e=this.runtimeModel();return e?.heapProfilerModel()??null}async update(){const e=this.runtimeModel(),t=e&&await e.heapUsage();t&&(this.#Uc=t.usedSize+(t.embedderHeapUsedSize??0)+(t.backingStorageSize??0),this.#qc.add(this.#Uc),Na.instance().dispatchEventToListeners("MemoryChanged",this))}samplesCount(){return this.#qc.count()}usedHeapSize(){return this.#Uc}usedHeapSizeGrowRate(){return this.#qc.fitSlope()}}class Ha{#zc;#jc;#is;#Vc;#Wc;#Gc;#Kc;#Qc;#$c;constructor(e){this.#zc=0|e,this.reset()}reset(){this.#jc=Date.now(),this.#is=0,this.#Vc=[],this.#Wc=[],this.#Gc=0,this.#Kc=0,this.#Qc=0,this.#$c=0}count(){return this.#Vc.length}add(e,t){const n="number"==typeof t?t:Date.now()-this.#jc,r=e;if(this.#Vc.length===this.#zc){const e=this.#Vc[this.#is],t=this.#Wc[this.#is];this.#Gc-=e,this.#Kc-=t,this.#Qc-=e*e,this.#$c-=e*t}this.#Gc+=n,this.#Kc+=r,this.#Qc+=n*n,this.#$c+=n*r,this.#Vc[this.#is]=n,this.#Wc[this.#is]=r,this.#is=(this.#is+1)%this.#zc}fitSlope(){const e=this.count();return e<2?0:(this.#$c-this.#Gc*this.#Kc/e)/(this.#Qc-this.#Gc*this.#Gc/e)}}var Ua=Object.freeze({__proto__:null,Isolate:_a,IsolateManager:Na,MemoryTrend:Ha,MemoryTrendWindowMs:Fa});class qa extends h{#Xc=!1;#fr=!1;constructor(e){super(e),this.ensureEnabled()}async ensureEnabled(){if(this.#fr)return;this.#fr=!0,this.target().registerAuditsDispatcher(this);const e=this.target().auditsAgent();await e.invoke_enable()}issueAdded(e){this.dispatchEventToListeners("IssueAdded",{issuesModel:this,inspectorIssue:e.issue})}dispose(){super.dispose(),this.#Xc=!0}getTargetIfNotDisposed(){return this.#Xc?null:this.target()}}h.register(qa,{capabilities:32768,autostart:!0});var za=Object.freeze({__proto__:null,IssuesModel:qa});var ja=Object.freeze({__proto__:null,LayerTreeBase:class{#e;#Yn;layersById=new Map;#Jc=null;#Yc=null;#Zc=new Map;#eh;constructor(e){this.#e=e,this.#Yn=e?e.model(Gs):null}target(){return this.#e}root(){return this.#Jc}setRoot(e){this.#Jc=e}contentRoot(){return this.#Yc}setContentRoot(e){this.#Yc=e}forEachLayer(e,t){return!(!t&&!(t=this.root()))&&(e(t)||t.children().some(this.forEachLayer.bind(this,e)))}layerById(e){return this.layersById.get(e)||null}async resolveBackendNodeIds(e){if(!e.size||!this.#Yn)return;const t=await this.#Yn.pushNodesByBackendIdsToFrontend(e);if(t)for(const e of t.keys())this.#Zc.set(e,t.get(e)||null)}backendNodeIdToNode(){return this.#Zc}setViewportSize(e){this.#eh=e}viewportSize(){return this.#eh}nodeForId(e){return this.#Yn?this.#Yn.nodeForId(e):null}},StickyPositionConstraint:class{#th;#nh;#rh;#sh;constructor(e,t){this.#th=t.stickyBoxRect,this.#nh=t.containingBlockRect,this.#rh=null,e&&t.nearestLayerShiftingStickyBox&&(this.#rh=e.layerById(t.nearestLayerShiftingStickyBox)),this.#sh=null,e&&t.nearestLayerShiftingContainingBlock&&(this.#sh=e.layerById(t.nearestLayerShiftingContainingBlock))}stickyBoxRect(){return this.#th}containingBlockRect(){return this.#nh}nearestLayerShiftingStickyBox(){return this.#rh}nearestLayerShiftingContainingBlock(){return this.#sh}}});class Va{id;url;startTime;loadTime;contentLoadTime;mainRequest;constructor(e){this.id=++Va.lastIdentifier,this.url=e.url(),this.startTime=e.startTime,this.mainRequest=e}static forRequest(e){return Wa.get(e)||null}bindRequest(e){Wa.set(e,this)}static lastIdentifier=0}const Wa=new WeakMap;var Ga=Object.freeze({__proto__:null,PageLoad:Va});class Ka extends h{layerTreeAgent;constructor(e){super(e),this.layerTreeAgent=e.layerTreeAgent()}async loadSnapshotFromFragments(e){const{snapshotId:t}=await this.layerTreeAgent.invoke_loadSnapshot({tiles:e});return t?new Qa(this,t):null}loadSnapshot(e){const t={x:0,y:0,picture:e};return this.loadSnapshotFromFragments([t])}async makeSnapshot(e){const{snapshotId:t}=await this.layerTreeAgent.invoke_makeSnapshot({layerId:e});return t?new Qa(this,t):null}}class Qa{#ih;#Ro;#oh;constructor(e,t){this.#ih=e,this.#Ro=t,this.#oh=1}release(){console.assert(this.#oh>0,"release is already called on the object"),--this.#oh||this.#ih.layerTreeAgent.invoke_releaseSnapshot({snapshotId:this.#Ro})}addReference(){++this.#oh,console.assert(this.#oh>0,"Referencing a dead object")}async replay(e,t,n){return(await this.#ih.layerTreeAgent.invoke_replaySnapshot({snapshotId:this.#Ro,fromStep:t,toStep:n,scale:e||1})).dataURL}async profile(e){return(await this.#ih.layerTreeAgent.invoke_profileSnapshot({snapshotId:this.#Ro,minRepeatCount:5,minDuration:1,clipRect:e||void 0})).timings}async commandLog(){const e=await this.#ih.layerTreeAgent.invoke_snapshotCommandLog({snapshotId:this.#Ro});return e.commandLog?e.commandLog.map(((e,t)=>new $a(e,t))):null}}class $a{method;params;commandIndex;constructor(e,t){this.method=e.method,this.params=e.params,this.commandIndex=t}}h.register(Ka,{capabilities:2,autostart:!1});var Xa=Object.freeze({__proto__:null,PaintProfilerLogItem:$a,PaintProfilerModel:Ka,PaintProfilerSnapshot:Qa});class Ja extends h{#Ws;#ah=new Map([["TaskDuration","CumulativeTime"],["ScriptDuration","CumulativeTime"],["LayoutDuration","CumulativeTime"],["RecalcStyleDuration","CumulativeTime"],["LayoutCount","CumulativeCount"],["RecalcStyleCount","CumulativeCount"]]);#lh=new Map;constructor(e){super(e),this.#Ws=e.performanceAgent()}enable(){return this.#Ws.invoke_enable({})}disable(){return this.#Ws.invoke_disable()}async requestMetrics(){const e=await this.#Ws.invoke_getMetrics()||[],t=new Map,n=performance.now();for(const s of e.metrics){let e,i=this.#lh.get(s.name);switch(i||(i={lastValue:void 0,lastTimestamp:void 0},this.#lh.set(s.name,i)),this.#ah.get(s.name)){case"CumulativeTime":e=i.lastTimestamp&&i.lastValue?r.NumberUtilities.clamp(1e3*(s.value-i.lastValue)/(n-i.lastTimestamp),0,1):0,i.lastValue=s.value,i.lastTimestamp=n;break;case"CumulativeCount":e=i.lastTimestamp&&i.lastValue?Math.max(0,1e3*(s.value-i.lastValue)/(n-i.lastTimestamp)):0,i.lastValue=s.value,i.lastTimestamp=n;break;default:e=s.value}t.set(s.name,e)}return{metrics:t,timestamp:n}}}h.register(Ja,{capabilities:2,autostart:!1});var Ya=Object.freeze({__proto__:null,PerformanceMetricsModel:Ja});class Za extends Map{getOrInsert(e,t){return this.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return this.has(e)||this.set(e,t(e)),this.get(e)}}class el extends h{agent;loaderIds=[];targetJustAttached=!0;lastPrimaryPageModel=null;documents=new Map;constructor(e){super(e),e.registerPreloadDispatcher(new tl(this)),this.agent=e.preloadAgent(),this.agent.invoke_enable();const t=e.targetInfo();void 0!==t&&"prerender"===t.subtype&&(this.lastPrimaryPageModel=W.instance().primaryPageTarget()?.model(el)||null),W.instance().addModelListener(ii,ri.PrimaryPageChanged,this.onPrimaryPageChanged,this)}dispose(){super.dispose(),W.instance().removeModelListener(ii,ri.PrimaryPageChanged,this.onPrimaryPageChanged,this),this.agent.invoke_disable()}ensureDocumentPreloadingData(e){void 0===this.documents.get(e)&&this.documents.set(e,new nl)}currentLoaderId(){if(this.targetJustAttached)return null;if(0===this.loaderIds.length)throw new Error("unreachable");return this.loaderIds[this.loaderIds.length-1]}currentDocument(){const e=this.currentLoaderId();return null===e?null:this.documents.get(e)||null}getRuleSetById(e){return this.currentDocument()?.ruleSets.getById(e)||null}getAllRuleSets(){return this.currentDocument()?.ruleSets.getAll()||[]}getPreloadCountsByRuleSetId(){const e=new Map;for(const{value:t}of this.getRepresentativePreloadingAttempts(null))for(const n of[null,...t.ruleSetIds]){void 0===e.get(n)&&e.set(n,new Map);const r=e.get(n);s(r);const i=r.get(t.status)||0;r.set(t.status,i+1)}return e}getPreloadingAttemptById(e){const t=this.currentDocument();return null===t?null:t.preloadingAttempts.getById(e,t.sources)||null}getRepresentativePreloadingAttempts(e){const t=this.currentDocument();return null===t?[]:t.preloadingAttempts.getAllRepresentative(e,t.sources)}getRepresentativePreloadingAttemptsOfPreviousPage(){if(this.loaderIds.length<=1)return[];const e=this.documents.get(this.loaderIds[this.loaderIds.length-2]);return void 0===e?[]:e.preloadingAttempts.getAllRepresentative(null,e.sources)}getPipelineById(e){const t=this.currentDocument();return null===t?null:t.preloadingAttempts.getPipeline(e,t.sources)}getPipeline(e){let t=null;if(null!==e.pipelineId&&(t=this.getPipelineById(e.pipelineId)),null===t){const t=new Map;return t.set(e.action,e),new ol(t)}return new ol(t)}onPrimaryPageChanged(e){const{frame:t,type:n}=e.data;if(null===this.lastPrimaryPageModel&&"Activation"===n)return;if(null!==this.lastPrimaryPageModel&&"Activation"!==n)return;if(null!==this.lastPrimaryPageModel&&"Activation"===n){this.loaderIds=this.lastPrimaryPageModel.loaderIds;for(const[e,t]of this.lastPrimaryPageModel.documents.entries())this.ensureDocumentPreloadingData(e),this.documents.get(e)?.mergePrevious(t)}this.lastPrimaryPageModel=null;const r=t.loaderId;this.loaderIds.push(r),this.loaderIds=this.loaderIds.slice(-2),this.ensureDocumentPreloadingData(r);for(const e of this.documents.keys())this.loaderIds.includes(e)||this.documents.delete(e);this.dispatchEventToListeners("ModelUpdated")}onRuleSetUpdated(e){const t=e.ruleSet,n=t.loaderId;null===this.currentLoaderId()&&(this.loaderIds=[n],this.targetJustAttached=!1),this.ensureDocumentPreloadingData(n),this.documents.get(n)?.ruleSets.upsert(t),this.dispatchEventToListeners("ModelUpdated")}onRuleSetRemoved(e){const t=e.id;for(const e of this.documents.values())e.ruleSets.delete(t);this.dispatchEventToListeners("ModelUpdated")}onPreloadingAttemptSourcesUpdated(e){const t=e.loaderId;this.ensureDocumentPreloadingData(t);const n=this.documents.get(t);void 0!==n&&(n.sources.update(e.preloadingAttemptSources),n.preloadingAttempts.maybeRegisterNotTriggered(n.sources),n.preloadingAttempts.cleanUpRemovedAttempts(n.sources),this.dispatchEventToListeners("ModelUpdated"))}onPrefetchStatusUpdated(e){if("PrefetchEvictedAfterCandidateRemoved"===e.prefetchStatus)return;const t=e.key.loaderId;this.ensureDocumentPreloadingData(t);const n={action:"Prefetch",key:e.key,pipelineId:e.pipelineId,status:sl(e.status),prefetchStatus:e.prefetchStatus||null,requestId:e.requestId};this.documents.get(t)?.preloadingAttempts.upsert(n),this.dispatchEventToListeners("ModelUpdated")}onPrerenderStatusUpdated(e){const t=e.key.loaderId;this.ensureDocumentPreloadingData(t);const n={action:"Prerender",key:e.key,pipelineId:e.pipelineId,status:sl(e.status),prerenderStatus:e.prerenderStatus||null,disallowedMojoInterface:e.disallowedMojoInterface||null,mismatchedHeaders:e.mismatchedHeaders||null};this.documents.get(t)?.preloadingAttempts.upsert(n),this.dispatchEventToListeners("ModelUpdated")}onPreloadEnabledStateUpdated(e){this.dispatchEventToListeners("WarningsUpdated",e)}}h.register(el,{capabilities:2,autostart:!1});class tl{model;constructor(e){this.model=e}ruleSetUpdated(e){this.model.onRuleSetUpdated(e)}ruleSetRemoved(e){this.model.onRuleSetRemoved(e)}preloadingAttemptSourcesUpdated(e){this.model.onPreloadingAttemptSourcesUpdated(e)}prefetchStatusUpdated(e){this.model.onPrefetchStatusUpdated(e)}prerenderStatusUpdated(e){this.model.onPrerenderStatusUpdated(e)}preloadEnabledStateUpdated(e){this.model.onPreloadEnabledStateUpdated(e)}}class nl{ruleSets=new rl;preloadingAttempts=new al;sources=new ll;mergePrevious(e){if(!this.ruleSets.isEmpty()||!this.sources.isEmpty())throw new Error("unreachable");this.ruleSets=e.ruleSets,this.preloadingAttempts.mergePrevious(e.preloadingAttempts),this.sources=e.sources}}class rl{map=new Map;isEmpty(){return 0===this.map.size}getById(e){return this.map.get(e)||null}getAll(){return Array.from(this.map.entries()).map((([e,t])=>({id:e,value:t})))}upsert(e){this.map.set(e.id,e)}delete(e){this.map.delete(e)}}function sl(e){switch(e){case"Pending":return"Pending";case"Running":return"Running";case"Ready":return"Ready";case"Success":return"Success";case"Failure":return"Failure";case"NotSupported":return"NotSupported"}throw new Error("unreachable")}function il(e){let t,n;switch(e.action){case"Prefetch":t="Prefetch";break;case"Prerender":t="Prerender"}switch(e.targetHint){case void 0:n="undefined";break;case"Blank":n="Blank";break;case"Self":n="Self"}return`${e.loaderId}:${t}:${e.url}:${n}`}class ol{inner;constructor(e){if(0===e.size)throw new Error("unreachable");this.inner=e}static newFromAttemptsForTesting(e){const t=new Map;for(const n of e)t.set(n.action,n);return new ol(t)}getOriginallyTriggered(){const e=this.getPrerender()||this.getPrefetch();return s(e),e}getPrefetch(){return this.inner.get("Prefetch")||null}getPrerender(){return this.inner.get("Prerender")||null}getAttempts(){const e=[],t=this.getPrefetch();null!==t&&e.push(t);const n=this.getPrerender();if(null!==n&&e.push(n),0===e.length)throw new Error("unreachable");return e}}class al{map=new Map;pipelines=new Za;enrich(e,t){let n=[],r=[];return null!==t&&(n=t.ruleSetIds,r=t.nodeIds),{...e,ruleSetIds:n,nodeIds:r}}isAttemptRepresentative(e){function t(e){switch(e){case"Prefetch":return 0;case"Prerender":return 1}}if(null===e.pipelineId)return!0;const n=this.pipelines.get(e.pipelineId);if(s(n),0===n.size)throw new Error("unreachable");return[...n.keys()].every((n=>t(n)<=t(e.action)))}getById(e,t){const n=this.map.get(e)||null;return null===n?null:this.enrich(n,t.getById(e))}getAllRepresentative(e,t){return[...this.map.entries()].map((([e,n])=>({id:e,value:this.enrich(n,t.getById(e))}))).filter((({value:t})=>!e||t.ruleSetIds.includes(e))).filter((({value:e})=>this.isAttemptRepresentative(e)))}getPipeline(e,t){const n=this.pipelines.get(e);if(void 0===n||0===n.size)return null;const r={};for(const[e,t]of this.map.entries())r[e]=t;return new Map(n.entries().map((([e,n])=>{const r=this.getById(n,t);return s(r),[e,r]})))}upsert(e){const t=il(e.key);this.map.set(t,e),null!==e.pipelineId&&this.pipelines.getOrInsertComputed(e.pipelineId,(()=>new Map)).set(e.action,t)}reconstructPipelines(){this.pipelines.clear();for(const[e,t]of this.map.entries()){if(null===t.pipelineId)continue;this.pipelines.getOrInsertComputed(t.pipelineId,(()=>new Map)).set(t.action,e)}}maybeRegisterNotTriggered(e){for(const[t,{key:n}]of e.entries()){if(void 0!==this.map.get(t))continue;let e;switch(n.action){case"Prefetch":e={action:"Prefetch",key:n,pipelineId:null,status:"NotTriggered",prefetchStatus:null,requestId:""};break;case"Prerender":e={action:"Prerender",key:n,pipelineId:null,status:"NotTriggered",prerenderStatus:null,disallowedMojoInterface:null,mismatchedHeaders:null}}this.map.set(t,e)}}cleanUpRemovedAttempts(e){const t=Array.from(this.map.keys()).filter((t=>!e.getById(t)));for(const e of t)this.map.delete(e);this.reconstructPipelines()}mergePrevious(e){for(const[t,n]of this.map.entries())e.map.set(t,n);this.map=e.map,this.reconstructPipelines()}}class ll{map=new Map;entries(){return this.map.entries()}isEmpty(){return 0===this.map.size}getById(e){return this.map.get(e)||null}update(e){this.map=new Map(e.map((e=>[il(e.key),e])))}}var dl=Object.freeze({__proto__:null,PreloadPipeline:ol,PreloadingModel:el});var cl=Object.freeze({__proto__:null,ReactNativeApplicationModel:class extends h{#fr;#Ws;metadataCached=null;constructor(e){super(e),a.rnPerfMetrics.fuseboxSetClientMetadataStarted(),this.#fr=!1,this.#Ws=e.reactNativeApplicationAgent(),e.registerReactNativeApplicationDispatcher(this),this.ensureEnabled()}ensureEnabled(){this.#fr||(this.#Ws.invoke_enable().then((e=>{const t=e.getError(),n=!t;a.rnPerfMetrics.fuseboxSetClientMetadataFinished(n,t)})).catch((e=>{a.rnPerfMetrics.fuseboxSetClientMetadataFinished(!1,e)})),this.#fr=!0)}metadataUpdated(e){this.metadataCached=e,this.dispatchEventToListeners("MetadataUpdated",e)}traceRequested(){this.dispatchEventToListeners("TraceRequested")}}});class hl extends h{enabled=!1;storageAgent;storageKeyManager;bucketsById=new Map;trackedStorageKeys=new Set;constructor(e){super(e),e.registerStorageDispatcher(this),this.storageAgent=e.storageAgent(),this.storageKeyManager=e.model(ni)}getBuckets(){return new Set(this.bucketsById.values())}getBucketsForStorageKey(e){const t=[...this.bucketsById.values()];return new Set(t.filter((({bucket:t})=>t.storageKey===e)))}getDefaultBucketForStorageKey(e){return[...this.bucketsById.values()].find((({bucket:t})=>t.storageKey===e&&void 0===t.name))??null}getBucketById(e){return this.bucketsById.get(e)??null}getBucketByName(e,t){if(!t)return this.getDefaultBucketForStorageKey(e);return[...this.bucketsById.values()].find((({bucket:n})=>n.storageKey===e&&n.name===t))??null}deleteBucket(e){this.storageAgent.invoke_deleteStorageBucket({bucket:e})}enable(){if(!this.enabled){if(this.storageKeyManager){this.storageKeyManager.addEventListener("StorageKeyAdded",this.storageKeyAdded,this),this.storageKeyManager.addEventListener("StorageKeyRemoved",this.storageKeyRemoved,this);for(const e of this.storageKeyManager.storageKeys())this.addStorageKey(e)}this.enabled=!0}}storageKeyAdded(e){this.addStorageKey(e.data)}storageKeyRemoved(e){this.removeStorageKey(e.data)}addStorageKey(e){if(this.trackedStorageKeys.has(e))throw new Error("Can't call addStorageKey for a storage key if it has already been added.");this.trackedStorageKeys.add(e),this.storageAgent.invoke_setStorageBucketTracking({storageKey:e,enable:!0})}removeStorageKey(e){if(!this.trackedStorageKeys.has(e))throw new Error("Can't call removeStorageKey for a storage key if it hasn't already been added.");const t=this.getBucketsForStorageKey(e);for(const e of t)this.bucketRemoved(e);this.trackedStorageKeys.delete(e),this.storageAgent.invoke_setStorageBucketTracking({storageKey:e,enable:!1})}bucketAdded(e){this.bucketsById.set(e.id,e),this.dispatchEventToListeners("BucketAdded",{model:this,bucketInfo:e})}bucketRemoved(e){this.bucketsById.delete(e.id),this.dispatchEventToListeners("BucketRemoved",{model:this,bucketInfo:e})}bucketChanged(e){this.dispatchEventToListeners("BucketChanged",{model:this,bucketInfo:e})}bucketInfosAreEqual(e,t){return e.bucket.storageKey===t.bucket.storageKey&&e.id===t.id&&e.bucket.name===t.bucket.name&&e.expiration===t.expiration&&e.quota===t.quota&&e.persistent===t.persistent&&e.durability===t.durability}storageBucketCreatedOrUpdated({bucketInfo:e}){const t=this.getBucketById(e.id);t?this.bucketInfosAreEqual(t,e)||this.bucketChanged(e):this.bucketAdded(e)}storageBucketDeleted({bucketId:e}){const t=this.getBucketById(e);if(!t)throw new Error(`Received an event that Storage Bucket '${e}' was deleted, but it wasn't in the StorageBucketsModel.`);this.bucketRemoved(t)}attributionReportingTriggerRegistered(e){}interestGroupAccessed(e){}interestGroupAuctionEventOccurred(e){}interestGroupAuctionNetworkRequestCreated(e){}indexedDBListUpdated(e){}indexedDBContentUpdated(e){}cacheStorageListUpdated(e){}cacheStorageContentUpdated(e){}sharedStorageAccessed(e){}attributionReportingSourceRegistered(e){}}h.register(hl,{capabilities:8192,autostart:!1});var ul=Object.freeze({__proto__:null,StorageBucketsModel:hl});const gl={serviceworkercacheagentError:"`ServiceWorkerCacheAgent` error deleting cache entry {PH1} in cache: {PH2}"},pl=n.i18n.registerUIStrings("core/sdk/ServiceWorkerCacheModel.ts",gl),ml=n.i18n.getLocalizedString.bind(void 0,pl);class fl extends h{cacheAgent;#dh;#ch;#hh=new Map;#uh=new Set;#gh=new Set;#ph=new e.Throttler.Throttler(2e3);#fr=!1;#mh=!1;constructor(e){super(e),e.registerStorageDispatcher(this),this.cacheAgent=e.cacheStorageAgent(),this.#dh=e.storageAgent(),this.#ch=e.model(hl)}enable(){if(!this.#fr){this.#ch.addEventListener("BucketAdded",this.storageBucketAdded,this),this.#ch.addEventListener("BucketRemoved",this.storageBucketRemoved,this);for(const e of this.#ch.getBuckets())this.addStorageBucket(e.bucket);this.#fr=!0}}clearForStorageKey(e){for(const[t,n]of this.#hh.entries())n.storageKey===e&&(this.#hh.delete(t),this.cacheRemoved(n));for(const t of this.#ch.getBucketsForStorageKey(e))this.loadCacheNames(t.bucket)}refreshCacheNames(){for(const e of this.#hh.values())this.cacheRemoved(e);this.#hh.clear();const e=this.#ch.getBuckets();for(const t of e)this.loadCacheNames(t.bucket)}async deleteCache(e){const t=await this.cacheAgent.invoke_deleteCache({cacheId:e.cacheId});t.getError()?console.error(`ServiceWorkerCacheAgent error deleting cache ${e.toString()}: ${t.getError()}`):(this.#hh.delete(e.cacheId),this.cacheRemoved(e))}async deleteCacheEntry(t,n){const r=await this.cacheAgent.invoke_deleteEntry({cacheId:t.cacheId,request:n});r.getError()&&e.Console.Console.instance().error(ml(gl.serviceworkercacheagentError,{PH1:t.toString(),PH2:String(r.getError())}))}loadCacheData(e,t,n,r,s){this.requestEntries(e,t,n,r,s)}loadAllCacheData(e,t,n){this.requestAllEntries(e,t,n)}caches(){return[...this.#hh.values()]}dispose(){for(const e of this.#hh.values())this.cacheRemoved(e);this.#hh.clear(),this.#fr&&(this.#ch.removeEventListener("BucketAdded",this.storageBucketAdded,this),this.#ch.removeEventListener("BucketRemoved",this.storageBucketRemoved,this))}addStorageBucket(e){this.loadCacheNames(e),this.#uh.has(e.storageKey)||(this.#uh.add(e.storageKey),this.#dh.invoke_trackCacheStorageForStorageKey({storageKey:e.storageKey}))}removeStorageBucket(e){let t=0;for(const[n,r]of this.#hh.entries())e.storageKey===r.storageKey&&t++,r.inBucket(e)&&(t--,this.#hh.delete(n),this.cacheRemoved(r));0===t&&(this.#uh.delete(e.storageKey),this.#dh.invoke_untrackCacheStorageForStorageKey({storageKey:e.storageKey}))}async loadCacheNames(e){const t=await this.cacheAgent.invoke_requestCacheNames({storageBucket:e});t.getError()||this.updateCacheNames(e,t.caches)}updateCacheNames(e,t){const n=new Set,r=new Map,s=new Map;for(const e of t){const t=e.storageBucket??this.#ch.getDefaultBucketForStorageKey(e.storageKey)?.bucket;if(!t)continue;const s=new bl(this,t,e.cacheName,e.cacheId);n.add(s.cacheId),this.#hh.has(s.cacheId)||(r.set(s.cacheId,s),this.#hh.set(s.cacheId,s))}this.#hh.forEach((function(t){t.inBucket(e)&&!n.has(t.cacheId)&&(s.set(t.cacheId,t),this.#hh.delete(t.cacheId))}),this),r.forEach(this.cacheAdded,this),s.forEach(this.cacheRemoved,this)}storageBucketAdded({data:{bucketInfo:{bucket:e}}}){this.addStorageBucket(e)}storageBucketRemoved({data:{bucketInfo:{bucket:e}}}){this.removeStorageBucket(e)}cacheAdded(e){this.dispatchEventToListeners("CacheAdded",{model:this,cache:e})}cacheRemoved(e){this.dispatchEventToListeners("CacheRemoved",{model:this,cache:e})}async requestEntries(e,t,n,r,s){const i=await this.cacheAgent.invoke_requestEntries({cacheId:e.cacheId,skipCount:t,pageSize:n,pathFilter:r});i.getError()?console.error("ServiceWorkerCacheAgent error while requesting entries: ",i.getError()):s(i.cacheDataEntries,i.returnCount)}async requestAllEntries(e,t,n){const r=await this.cacheAgent.invoke_requestEntries({cacheId:e.cacheId,pathFilter:t});r.getError()?console.error("ServiceWorkerCacheAgent error while requesting entries: ",r.getError()):n(r.cacheDataEntries,r.returnCount)}cacheStorageListUpdated({bucketId:e}){const t=this.#ch.getBucketById(e)?.bucket;t&&(this.#gh.add(t),this.#ph.schedule((()=>{const e=Array.from(this.#gh,(e=>this.loadCacheNames(e)));return this.#gh.clear(),Promise.all(e)}),this.#mh?"AsSoonAsPossible":"Default"))}cacheStorageContentUpdated({bucketId:e,cacheName:t}){const n=this.#ch.getBucketById(e)?.bucket;n&&this.dispatchEventToListeners("CacheStorageContentUpdated",{storageBucket:n,cacheName:t})}attributionReportingTriggerRegistered(e){}indexedDBListUpdated(e){}indexedDBContentUpdated(e){}interestGroupAuctionEventOccurred(e){}interestGroupAccessed(e){}interestGroupAuctionNetworkRequestCreated(e){}sharedStorageAccessed(e){}storageBucketCreatedOrUpdated(e){}storageBucketDeleted(e){}setThrottlerSchedulesAsSoonAsPossibleForTest(){this.#mh=!0}attributionReportingSourceRegistered(e){}}class bl{#os;storageKey;storageBucket;cacheName;cacheId;constructor(e,t,n,r){this.#os=e,this.storageBucket=t,this.storageKey=t.storageKey,this.cacheName=n,this.cacheId=r}inBucket(e){return this.storageKey===e.storageKey&&this.storageBucket.name===e.name}equals(e){return this.cacheId===e.cacheId}toString(){return this.storageKey+this.cacheName}async requestCachedResponse(e,t){const n=await this.#os.cacheAgent.invoke_requestCachedResponse({cacheId:this.cacheId,requestURL:e,requestHeaders:t});return n.getError()?null:n.response}}h.register(fl,{capabilities:8192,autostart:!1});var yl=Object.freeze({__proto__:null,Cache:bl,ServiceWorkerCacheModel:fl});const vl={running:"running",starting:"starting",stopped:"stopped",stopping:"stopping",activated:"activated",activating:"activating",installed:"installed",installing:"installing",new:"new",redundant:"redundant",sSS:"{PH1} #{PH2} ({PH3})"},Il=n.i18n.registerUIStrings("core/sdk/ServiceWorkerManager.ts",vl),wl=n.i18n.getLocalizedString.bind(void 0,Il),Sl=n.i18n.getLazilyComputedLocalizedString.bind(void 0,Il);class kl extends h{#Ws;#fh=new Map;#fr=!1;#bh;serviceWorkerNetworkRequestsPanelStatus={isOpen:!1,openedAt:0};constructor(t){super(t),t.registerServiceWorkerDispatcher(new Cl(this)),this.#Ws=t.serviceWorkerAgent(),this.enable(),this.#bh=e.Settings.Settings.instance().createSetting("service-worker-update-on-reload",!1),this.#bh.get()&&this.forceUpdateSettingChanged(),this.#bh.addChangeListener(this.forceUpdateSettingChanged,this),new Pl(t,this)}async enable(){this.#fr||(this.#fr=!0,await this.#Ws.invoke_enable())}async disable(){this.#fr&&(this.#fr=!1,this.#fh.clear(),await this.#Ws.invoke_enable())}registrations(){return this.#fh}findVersion(e){for(const t of this.registrations().values()){const n=t.versions.get(e);if(n)return n}return null}deleteRegistration(e){const t=this.#fh.get(e);if(t){if(t.isRedundant())return this.#fh.delete(e),void this.dispatchEventToListeners("RegistrationDeleted",t);t.deleting=!0;for(const e of t.versions.values())this.stopWorker(e.id);this.unregister(t.scopeURL)}}async updateRegistration(e){const t=this.#fh.get(e);t&&await this.#Ws.invoke_updateRegistration({scopeURL:t.scopeURL})}async deliverPushMessage(t,n){const r=this.#fh.get(t);if(!r)return;const s=e.ParsedURL.ParsedURL.extractOrigin(r.scopeURL);await this.#Ws.invoke_deliverPushMessage({origin:s,registrationId:t,data:n})}async dispatchSyncEvent(t,n,r){const s=this.#fh.get(t);if(!s)return;const i=e.ParsedURL.ParsedURL.extractOrigin(s.scopeURL);await this.#Ws.invoke_dispatchSyncEvent({origin:i,registrationId:t,tag:n,lastChance:r})}async dispatchPeriodicSyncEvent(t,n){const r=this.#fh.get(t);if(!r)return;const s=e.ParsedURL.ParsedURL.extractOrigin(r.scopeURL);await this.#Ws.invoke_dispatchPeriodicSyncEvent({origin:s,registrationId:t,tag:n})}async unregister(e){await this.#Ws.invoke_unregister({scopeURL:e})}async startWorker(e){await this.#Ws.invoke_startWorker({scopeURL:e})}async skipWaiting(e){await this.#Ws.invoke_skipWaiting({scopeURL:e})}async stopWorker(e){await this.#Ws.invoke_stopWorker({versionId:e})}async inspectWorker(e){await this.#Ws.invoke_inspectWorker({versionId:e})}workerRegistrationUpdated(e){for(const t of e){let e=this.#fh.get(t.registrationId);e?(e.update(t),e.shouldBeRemoved()?(this.#fh.delete(e.id),this.dispatchEventToListeners("RegistrationDeleted",e)):this.dispatchEventToListeners("RegistrationUpdated",e)):(e=new Ml(t),this.#fh.set(t.registrationId,e),this.dispatchEventToListeners("RegistrationUpdated",e))}}workerVersionUpdated(e){const t=new Set;for(const n of e){const e=this.#fh.get(n.registrationId);e&&(e.updateVersion(n),t.add(e))}for(const e of t)e.shouldBeRemoved()?(this.#fh.delete(e.id),this.dispatchEventToListeners("RegistrationDeleted",e)):this.dispatchEventToListeners("RegistrationUpdated",e)}workerErrorReported(e){const t=this.#fh.get(e.registrationId);t&&(t.errors.push(e),this.dispatchEventToListeners("RegistrationErrorAdded",{registration:t,error:e}))}forceUpdateSettingChanged(){const e=this.#bh.get();this.#Ws.invoke_setForceUpdateOnPageLoad({forceUpdateOnPageLoad:e})}}class Cl{#z;constructor(e){this.#z=e}workerRegistrationUpdated({registrations:e}){this.#z.workerRegistrationUpdated(e)}workerVersionUpdated({versions:e}){this.#z.workerVersionUpdated(e)}workerErrorReported({errorMessage:e}){this.#z.workerErrorReported(e)}}class xl{runningStatus;status;lastUpdatedTimestamp;previousState;constructor(e,t,n,r){this.runningStatus=e,this.status=t,this.lastUpdatedTimestamp=r,this.previousState=n}}class Rl{condition;source;id;constructor(e,t,n){this.condition=e,this.source=t,this.id=n}}class Tl{id;scriptURL;parsedURL;securityOrigin;scriptLastModified;scriptResponseTime;controlledClients;targetId;routerRules;currentState;registration;constructor(e,t){this.registration=e,this.update(t)}update(t){this.id=t.versionId,this.scriptURL=t.scriptURL;const n=new e.ParsedURL.ParsedURL(t.scriptURL);this.securityOrigin=n.securityOrigin(),this.currentState=new xl(t.runningStatus,t.status,this.currentState,Date.now()),this.scriptLastModified=t.scriptLastModified,this.scriptResponseTime=t.scriptResponseTime,t.controlledClients?this.controlledClients=t.controlledClients.slice():this.controlledClients=[],this.targetId=t.targetId||null,this.routerRules=null,t.routerRules&&(this.routerRules=this.parseJSONRules(t.routerRules))}isStartable(){return!this.registration.isDeleted&&this.isActivated()&&this.isStopped()}isStoppedAndRedundant(){return"stopped"===this.runningStatus&&"redundant"===this.status}isStopped(){return"stopped"===this.runningStatus}isStarting(){return"starting"===this.runningStatus}isRunning(){return"running"===this.runningStatus}isStopping(){return"stopping"===this.runningStatus}isNew(){return"new"===this.status}isInstalling(){return"installing"===this.status}isInstalled(){return"installed"===this.status}isActivating(){return"activating"===this.status}isActivated(){return"activated"===this.status}isRedundant(){return"redundant"===this.status}get status(){return this.currentState.status}get runningStatus(){return this.currentState.runningStatus}mode(){return this.isNew()||this.isInstalling()?"installing":this.isInstalled()?"waiting":this.isActivating()||this.isActivated()?"active":"redundant"}parseJSONRules(e){try{const t=JSON.parse(e);if(!Array.isArray(t))return console.error("Parse error: `routerRules` in ServiceWorkerVersion should be an array"),null;const n=[];for(const e of t){const{condition:t,source:r,id:s}=e;if(void 0===t||void 0===r||void 0===s)return console.error("Parse error: Missing some fields of `routerRules` in ServiceWorkerVersion"),null;n.push(new Rl(JSON.stringify(t),JSON.stringify(r),s))}return n}catch{return console.error("Parse error: Invalid `routerRules` in ServiceWorkerVersion"),null}}}!function(e){e.RunningStatus={running:Sl(vl.running),starting:Sl(vl.starting),stopped:Sl(vl.stopped),stopping:Sl(vl.stopping)},e.Status={activated:Sl(vl.activated),activating:Sl(vl.activating),installed:Sl(vl.installed),installing:Sl(vl.installing),new:Sl(vl.new),redundant:Sl(vl.redundant)}}(Tl||(Tl={}));class Ml{#yh;id;scopeURL;securityOrigin;isDeleted;versions=new Map;deleting=!1;errors=[];constructor(e){this.update(e)}update(t){this.#yh=Symbol("fingerprint"),this.id=t.registrationId,this.scopeURL=t.scopeURL;const n=new e.ParsedURL.ParsedURL(t.scopeURL);this.securityOrigin=n.securityOrigin(),this.isDeleted=t.isDeleted}fingerprint(){return this.#yh}versionsByMode(){const e=new Map;for(const t of this.versions.values())e.set(t.mode(),t);return e}updateVersion(e){this.#yh=Symbol("fingerprint");let t=this.versions.get(e.versionId);return t?(t.update(e),t):(t=new Tl(this,e),this.versions.set(e.versionId,t),t)}isRedundant(){for(const e of this.versions.values())if(!e.isStoppedAndRedundant())return!1;return!0}shouldBeRemoved(){return this.isRedundant()&&(!this.errors.length||this.deleting)}canBeRemoved(){return this.isDeleted||this.deleting}}class Pl{#Kn;#vh;#Ih=new Map;constructor(e,t){this.#Kn=e,this.#vh=t,t.addEventListener("RegistrationUpdated",this.registrationsUpdated,this),t.addEventListener("RegistrationDeleted",this.registrationsUpdated,this),W.instance().addModelListener(Jr,$r.ExecutionContextCreated,this.executionContextCreated,this)}registrationsUpdated(){this.#Ih.clear();const e=this.#vh.registrations().values();for(const t of e)for(const e of t.versions.values())e.targetId&&this.#Ih.set(e.targetId,e);this.updateAllContextLabels()}executionContextCreated(e){const t=e.data,n=this.serviceWorkerTargetId(t.target());n&&this.updateContextLabel(t,this.#Ih.get(n)||null)}serviceWorkerTargetId(e){return e.parentTarget()!==this.#Kn||e.type()!==U.ServiceWorker?null:e.id()}updateAllContextLabels(){for(const e of W.instance().targets()){const t=this.serviceWorkerTargetId(e);if(!t)continue;const n=this.#Ih.get(t)||null,r=e.model(Jr),s=r?r.executionContexts():[];for(const e of s)this.updateContextLabel(e,n)}}updateContextLabel(t,n){if(!n)return void t.setLabel("");const r=e.ParsedURL.ParsedURL.fromString(t.origin),s=r?r.lastPathComponentWithFragment():t.name,i=Tl.Status[n.status];t.setLabel(wl(vl.sSS,{PH1:s,PH2:n.id,PH3:i()}))}}h.register(kl,{capabilities:16384,autostart:!0});var El=Object.freeze({__proto__:null,ServiceWorkerManager:kl,ServiceWorkerRegistration:Ml,ServiceWorkerRouterRule:Rl,get ServiceWorkerVersion(){return Tl},ServiceWorkerVersionState:xl});class Ll extends h{#Ws;constructor(e){super(e),this.#Ws=e.webAuthnAgent(),e.registerWebAuthnDispatcher(new Al(this))}setVirtualAuthEnvEnabled(e){return e?this.#Ws.invoke_enable({enableUI:!0}):this.#Ws.invoke_disable()}async addAuthenticator(e){return(await this.#Ws.invoke_addVirtualAuthenticator({options:e})).authenticatorId}async removeAuthenticator(e){await this.#Ws.invoke_removeVirtualAuthenticator({authenticatorId:e})}async setAutomaticPresenceSimulation(e,t){await this.#Ws.invoke_setAutomaticPresenceSimulation({authenticatorId:e,enabled:t})}async getCredentials(e){return(await this.#Ws.invoke_getCredentials({authenticatorId:e})).credentials}async removeCredential(e,t){await this.#Ws.invoke_removeCredential({authenticatorId:e,credentialId:t})}credentialAdded(e){this.dispatchEventToListeners("CredentialAdded",e)}credentialAsserted(e){this.dispatchEventToListeners("CredentialAsserted",e)}credentialDeleted(e){this.dispatchEventToListeners("CredentialDeleted",e)}credentialUpdated(e){this.dispatchEventToListeners("CredentialUpdated",e)}}class Al{#os;constructor(e){this.#os=e}credentialAdded(e){this.#os.credentialAdded(e)}credentialAsserted(e){this.#os.credentialAsserted(e)}credentialDeleted(e){this.#os.credentialDeleted(e)}credentialUpdated(e){this.#os.credentialUpdated(e)}}h.register(Ll,{capabilities:65536,autostart:!1});var Ol=Object.freeze({__proto__:null,WebAuthnModel:Ll});export{Fi as AccessibilityModel,eo as AnimationModel,no as AutofillModel,Uo as CPUProfilerModel,ya as CPUThrottlingManager,Vt as CSSContainerQuery,me as CSSFontFace,Gt as CSSLayer,Mn as CSSMatchedStyles,Xt as CSSMedia,B as CSSMetadata,Gr as CSSModel,Bt as CSSProperty,Nt as CSSPropertyParser,ht as CSSPropertyParserMatchers,Ht as CSSQuery,pn as CSSRule,Zt as CSSScope,tn as CSSStyleDeclaration,On as CSSStyleSheetHeader,rn as CSSSupports,so as CategorizedBreakpoint,Eo as ChildTargetManager,No as CompilerSourceMappingContentProvider,xo as Connections,Jo as ConsoleModel,q as Cookie,ci as CookieModel,gi as CookieParser,Ta as DOMDebuggerModel,Xs as DOMModel,Ts as DebuggerModel,ta as EmulationModel,oo as EnhancedTracesParser,Aa as EventBreakpointsModel,Oa as FrameAssociated,Fn as FrameManager,Xr as HeapProfilerModel,Xn as IOModel,Ua as IsolateManager,za as IssuesModel,ja as LayerTreeBase,zo as LogModel,ge as NetworkManager,Oi as NetworkRequest,Ps as OverlayColorGenerator,qs as OverlayModel,Ls as OverlayPersistentHighlighter,Ga as PageLoad,sr as PageResourceLoader,Xa as PaintProfiler,Ya as PerformanceMetricsModel,dl as PreloadingModel,cl as ReactNativeApplicationModel,Qn as RemoteObject,Zs as Resource,li as ResourceTreeModel,es as RuntimeModel,u as SDKModel,_i as ScreenCaptureModel,ds as Script,ti as SecurityOriginManager,fi as ServerSentEventProtocol,Si as ServerTiming,yl as ServiceWorkerCacheModel,El as ServiceWorkerManager,Ar as SourceMap,br as SourceMapFunctionRanges,Fr as SourceMapManager,kr as SourceMapScopeChainEntry,gr as SourceMapScopes,Rr as SourceMapScopesInfo,ul as StorageBucketsModel,si as StorageKeyManager,j as Target,G as TargetManager,co as TraceObject,Ol as WebAuthnModel}; +import*as e from"../common/common.js";import*as t from"../../models/text_utils/text_utils.js";import*as n from"../i18n/i18n.js";import*as r from"../platform/platform.js";import{assertNotNullOrUndefined as s,UserVisibleError as i}from"../platform/platform.js";import*as o from"../root/root.js";import*as a from"../host/host.js";import*as l from"../protocol_client/protocol_client.js";import*as d from"../../third_party/codemirror.next/codemirror.next.js";const c=new Map;class h extends e.ObjectWrapper.ObjectWrapper{#e;constructor(e){super(),this.#e=e}target(){return this.#e}async preSuspendModel(e){}async suspendModel(e){}async resumeModel(){}async postResumeModel(){}dispose(){}static register(e,t){if(t.early&&!t.autostart)throw new Error(`Error registering model ${e.name}: early models must be autostarted.`);c.set(e,t)}static get registeredModels(){return c}}var u=Object.freeze({__proto__:null,SDKModel:h});const g=[{inherited:!0,name:"-webkit-border-horizontal-spacing"},{name:"-webkit-border-image"},{inherited:!0,name:"-webkit-border-vertical-spacing"},{keywords:["stretch","start","center","end","baseline"],name:"-webkit-box-align"},{keywords:["slice","clone"],name:"-webkit-box-decoration-break"},{keywords:["normal","reverse"],name:"-webkit-box-direction"},{name:"-webkit-box-flex"},{name:"-webkit-box-ordinal-group"},{keywords:["horizontal","vertical"],name:"-webkit-box-orient"},{keywords:["start","center","end","justify"],name:"-webkit-box-pack"},{name:"-webkit-box-reflect"},{longhands:["break-after"],name:"-webkit-column-break-after"},{longhands:["break-before"],name:"-webkit-column-break-before"},{longhands:["break-inside"],name:"-webkit-column-break-inside"},{inherited:!0,name:"-webkit-font-smoothing"},{inherited:!0,keywords:["auto","loose","normal","strict","after-white-space","anywhere"],name:"-webkit-line-break"},{keywords:["none"],name:"-webkit-line-clamp"},{inherited:!0,name:"-webkit-locale"},{longhands:["-webkit-mask-box-image-source","-webkit-mask-box-image-slice","-webkit-mask-box-image-width","-webkit-mask-box-image-outset","-webkit-mask-box-image-repeat"],name:"-webkit-mask-box-image"},{name:"-webkit-mask-box-image-outset"},{name:"-webkit-mask-box-image-repeat"},{name:"-webkit-mask-box-image-slice"},{name:"-webkit-mask-box-image-source"},{name:"-webkit-mask-box-image-width"},{name:"-webkit-mask-position-x"},{name:"-webkit-mask-position-y"},{name:"-webkit-perspective-origin-x"},{name:"-webkit-perspective-origin-y"},{inherited:!0,keywords:["logical","visual"],name:"-webkit-rtl-ordering"},{inherited:!0,name:"-webkit-ruby-position"},{inherited:!0,name:"-webkit-tap-highlight-color"},{inherited:!0,name:"-webkit-text-combine"},{inherited:!0,name:"-webkit-text-decorations-in-effect"},{inherited:!0,name:"-webkit-text-fill-color"},{inherited:!0,name:"-webkit-text-orientation"},{inherited:!0,keywords:["none","disc","circle","square"],name:"-webkit-text-security"},{inherited:!0,longhands:["-webkit-text-stroke-width","-webkit-text-stroke-color"],name:"-webkit-text-stroke"},{inherited:!0,name:"-webkit-text-stroke-color"},{inherited:!0,name:"-webkit-text-stroke-width"},{name:"-webkit-transform-origin-x"},{name:"-webkit-transform-origin-y"},{name:"-webkit-transform-origin-z"},{keywords:["auto","none","element"],name:"-webkit-user-drag"},{inherited:!0,keywords:["read-only","read-write","read-write-plaintext-only"],name:"-webkit-user-modify"},{inherited:!0,name:"-webkit-writing-mode"},{inherited:!0,keywords:["auto","currentcolor"],name:"accent-color"},{name:"additive-symbols"},{name:"align-content"},{name:"align-items"},{name:"align-self"},{keywords:["auto","baseline","alphabetic","ideographic","middle","central","mathematical","before-edge","text-before-edge","after-edge","text-after-edge","hanging"],name:"alignment-baseline"},{longhands:["-webkit-border-horizontal-spacing","-webkit-border-vertical-spacing","-webkit-box-align","-webkit-box-decoration-break","-webkit-box-direction","-webkit-box-flex","-webkit-box-ordinal-group","-webkit-box-orient","-webkit-box-pack","-webkit-box-reflect","-webkit-font-smoothing","-webkit-line-break","-webkit-line-clamp","-webkit-locale","-webkit-mask-box-image-outset","-webkit-mask-box-image-repeat","-webkit-mask-box-image-slice","-webkit-mask-box-image-source","-webkit-mask-box-image-width","-webkit-mask-position-x","-webkit-mask-position-y","-webkit-rtl-ordering","-webkit-ruby-position","-webkit-tap-highlight-color","-webkit-text-combine","-webkit-text-decorations-in-effect","-webkit-text-fill-color","-webkit-text-orientation","-webkit-text-security","-webkit-text-stroke-color","-webkit-text-stroke-width","-webkit-user-drag","-webkit-writing-mode","accent-color","additive-symbols","align-content","align-items","align-self","alignment-baseline","anchor-name","anchor-scope","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","animation-trigger-exit-range-end","animation-trigger-exit-range-start","animation-trigger-range-end","animation-trigger-range-start","animation-trigger-timeline","animation-trigger-type","app-region","appearance","ascent-override","aspect-ratio","backdrop-filter","backface-visibility","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position-x","background-position-y","background-repeat","background-size","base-palette","baseline-shift","baseline-source","block-size","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start-color","border-block-start-style","border-block-start-width","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-end-end-radius","border-end-start-radius","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-start-end-radius","border-start-start-radius","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","buffered-rendering","caption-side","caret-animation","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","color-scheme","column-count","column-fill","column-gap","column-height","column-rule-break","column-rule-color","column-rule-outset","column-rule-style","column-rule-width","column-span","column-width","column-wrap","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-width","container-name","container-type","content","content-visibility","corner-bottom-left-shape","corner-bottom-right-shape","corner-end-end-shape","corner-end-start-shape","corner-start-end-shape","corner-start-start-shape","corner-top-left-shape","corner-top-right-shape","counter-increment","counter-reset","counter-set","cursor","cx","cy","d","descent-override","display","dominant-baseline","dynamic-range-limit","empty-cells","fallback","field-sizing","fill","fill-opacity","fill-rule","filter","flex-basis","flex-direction","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","font-display","font-family","font-feature-settings","font-kerning","font-optical-sizing","font-palette","font-size","font-size-adjust","font-stretch","font-style","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap-rule-paint-order","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column-end","grid-column-start","grid-row-end","grid-row-start","grid-template-areas","grid-template-columns","grid-template-rows","height","hyphenate-character","hyphenate-limit-chars","hyphens","image-orientation","image-rendering","inherits","initial-letter","initial-value","inline-size","inset-block-end","inset-block-start","inset-inline-end","inset-inline-start","interactivity","interest-target-hide-delay","interest-target-show-delay","interpolate-size","isolation","justify-content","justify-items","justify-self","left","letter-spacing","lighting-color","line-break","line-clamp","line-gap-override","line-height","list-style-image","list-style-position","list-style-type","margin-block-end","margin-block-start","margin-bottom","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marker-end","marker-mid","marker-start","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-repeat","mask-size","mask-type","masonry-auto-tracks","masonry-direction","masonry-fill","masonry-slack","masonry-template-tracks","masonry-track-end","masonry-track-start","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","navigation","negative","object-fit","object-position","object-view-box","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","origin-trial-test-property","orphans","outline-color","outline-offset","outline-style","outline-width","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","override-colors","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","pad","padding-block-end","padding-block-start","padding-bottom","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-orientation","paint-order","perspective","perspective-origin","pointer-events","position","position-anchor","position-area","position-try-fallbacks","position-try-order","position-visibility","prefix","print-color-adjust","quotes","r","range","reading-flow","reading-order","resize","result","right","rotate","row-gap","row-rule-break","row-rule-color","row-rule-outset","row-rule-style","row-rule-width","ruby-align","ruby-position","rx","ry","scale","scroll-behavior","scroll-initial-target","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-marker-contain","scroll-marker-group","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-start-block","scroll-start-inline","scroll-start-x","scroll-start-y","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","size","size-adjust","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","suffix","symbols","syntax","system","tab-size","table-layout","text-align","text-align-last","text-anchor","text-autospace","text-box-edge","text-box-trim","text-combine-upright","text-decoration-color","text-decoration-line","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-spacing-trim","text-transform","text-underline-offset","text-underline-position","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","types","unicode-range","user-select","vector-effect","vertical-align","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-class","view-transition-group","view-transition-name","visibility","white-space-collapse","widows","width","will-change","word-break","word-spacing","writing-mode","x","y","z-index","zoom"],name:"all"},{keywords:["none"],name:"anchor-name"},{keywords:["none","all"],name:"anchor-scope"},{longhands:["animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","animation-name","animation-timeline","animation-range-start","animation-range-end"],name:"animation"},{keywords:["replace","add","accumulate"],name:"animation-composition"},{name:"animation-delay"},{keywords:["normal","reverse","alternate","alternate-reverse"],name:"animation-direction"},{name:"animation-duration"},{keywords:["none","forwards","backwards","both"],name:"animation-fill-mode"},{keywords:["infinite"],name:"animation-iteration-count"},{keywords:["none"],name:"animation-name"},{keywords:["running","paused"],name:"animation-play-state"},{longhands:["animation-range-start","animation-range-end"],name:"animation-range"},{name:"animation-range-end"},{name:"animation-range-start"},{keywords:["none","auto"],name:"animation-timeline"},{keywords:["linear","ease","ease-in","ease-out","ease-in-out","jump-both","jump-end","jump-none","jump-start","step-start","step-end"],name:"animation-timing-function"},{longhands:["animation-trigger-timeline","animation-trigger-type","animation-trigger-range-start","animation-trigger-range-end","animation-trigger-exit-range-start","animation-trigger-exit-range-end"],name:"animation-trigger"},{longhands:["animation-trigger-exit-range-start","animation-trigger-exit-range-end"],name:"animation-trigger-exit-range"},{name:"animation-trigger-exit-range-end"},{name:"animation-trigger-exit-range-start"},{longhands:["animation-trigger-range-start","animation-trigger-range-end"],name:"animation-trigger-range"},{name:"animation-trigger-range-end"},{name:"animation-trigger-range-start"},{keywords:["none","auto"],name:"animation-trigger-timeline"},{keywords:["once","repeat","alternate","state"],name:"animation-trigger-type"},{keywords:["none","drag","no-drag"],name:"app-region"},{name:"appearance"},{name:"ascent-override"},{keywords:["auto"],name:"aspect-ratio"},{keywords:["none"],name:"backdrop-filter"},{keywords:["visible","hidden"],name:"backface-visibility"},{longhands:["background-image","background-position-x","background-position-y","background-size","background-repeat","background-attachment","background-origin","background-clip","background-color"],name:"background"},{keywords:["scroll","fixed","local"],name:"background-attachment"},{keywords:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],name:"background-blend-mode"},{keywords:["border-box","padding-box","content-box","text"],name:"background-clip"},{keywords:["currentcolor"],name:"background-color"},{keywords:["auto","none"],name:"background-image"},{keywords:["border-box","padding-box","content-box"],name:"background-origin"},{longhands:["background-position-x","background-position-y"],name:"background-position"},{name:"background-position-x"},{name:"background-position-y"},{name:"background-repeat"},{keywords:["auto","cover","contain"],name:"background-size"},{name:"base-palette"},{keywords:["baseline","sub","super"],name:"baseline-shift"},{keywords:["auto","first","last"],name:"baseline-source"},{keywords:["auto"],name:"block-size"},{longhands:["border-top-color","border-top-style","border-top-width","border-right-color","border-right-style","border-right-width","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat"],name:"border"},{longhands:["border-block-start-color","border-block-start-style","border-block-start-width","border-block-end-color","border-block-end-style","border-block-end-width"],name:"border-block"},{longhands:["border-block-start-color","border-block-end-color"],name:"border-block-color"},{longhands:["border-block-end-width","border-block-end-style","border-block-end-color"],name:"border-block-end"},{name:"border-block-end-color"},{name:"border-block-end-style"},{name:"border-block-end-width"},{longhands:["border-block-start-width","border-block-start-style","border-block-start-color"],name:"border-block-start"},{name:"border-block-start-color"},{name:"border-block-start-style"},{name:"border-block-start-width"},{longhands:["border-block-start-style","border-block-end-style"],name:"border-block-style"},{longhands:["border-block-start-width","border-block-end-width"],name:"border-block-width"},{longhands:["border-bottom-width","border-bottom-style","border-bottom-color"],name:"border-bottom"},{keywords:["currentcolor"],name:"border-bottom-color"},{name:"border-bottom-left-radius"},{name:"border-bottom-right-radius"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"border-bottom-style"},{keywords:["thin","medium","thick"],name:"border-bottom-width"},{inherited:!0,keywords:["separate","collapse"],name:"border-collapse"},{longhands:["border-top-color","border-right-color","border-bottom-color","border-left-color"],name:"border-color"},{name:"border-end-end-radius"},{name:"border-end-start-radius"},{longhands:["border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat"],name:"border-image"},{name:"border-image-outset"},{keywords:["stretch","repeat","round","space"],name:"border-image-repeat"},{name:"border-image-slice"},{keywords:["none"],name:"border-image-source"},{keywords:["auto"],name:"border-image-width"},{longhands:["border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-end-color","border-inline-end-style","border-inline-end-width"],name:"border-inline"},{longhands:["border-inline-start-color","border-inline-end-color"],name:"border-inline-color"},{longhands:["border-inline-end-width","border-inline-end-style","border-inline-end-color"],name:"border-inline-end"},{name:"border-inline-end-color"},{name:"border-inline-end-style"},{name:"border-inline-end-width"},{longhands:["border-inline-start-width","border-inline-start-style","border-inline-start-color"],name:"border-inline-start"},{name:"border-inline-start-color"},{name:"border-inline-start-style"},{name:"border-inline-start-width"},{longhands:["border-inline-start-style","border-inline-end-style"],name:"border-inline-style"},{longhands:["border-inline-start-width","border-inline-end-width"],name:"border-inline-width"},{longhands:["border-left-width","border-left-style","border-left-color"],name:"border-left"},{keywords:["currentcolor"],name:"border-left-color"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"border-left-style"},{keywords:["thin","medium","thick"],name:"border-left-width"},{longhands:["border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"],name:"border-radius"},{longhands:["border-right-width","border-right-style","border-right-color"],name:"border-right"},{keywords:["currentcolor"],name:"border-right-color"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"border-right-style"},{keywords:["thin","medium","thick"],name:"border-right-width"},{inherited:!0,longhands:["-webkit-border-horizontal-spacing","-webkit-border-vertical-spacing"],name:"border-spacing"},{name:"border-start-end-radius"},{name:"border-start-start-radius"},{keywords:["none"],longhands:["border-top-style","border-right-style","border-bottom-style","border-left-style"],name:"border-style"},{longhands:["border-top-width","border-top-style","border-top-color"],name:"border-top"},{keywords:["currentcolor"],name:"border-top-color"},{name:"border-top-left-radius"},{name:"border-top-right-radius"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"border-top-style"},{keywords:["thin","medium","thick"],name:"border-top-width"},{longhands:["border-top-width","border-right-width","border-bottom-width","border-left-width"],name:"border-width"},{keywords:["auto"],name:"bottom"},{keywords:["slice","clone"],name:"box-decoration-break"},{keywords:["none"],name:"box-shadow"},{keywords:["content-box","border-box"],name:"box-sizing"},{keywords:["auto","avoid","avoid-column","avoid-page","column","left","page","recto","right","verso"],name:"break-after"},{keywords:["auto","avoid","avoid-column","avoid-page","column","left","page","recto","right","verso"],name:"break-before"},{keywords:["auto","avoid","avoid-column","avoid-page"],name:"break-inside"},{keywords:["auto","dynamic","static"],name:"buffered-rendering"},{inherited:!0,keywords:["top","bottom"],name:"caption-side"},{inherited:!0,keywords:["auto","manual"],name:"caret-animation"},{inherited:!0,keywords:["auto","currentcolor"],name:"caret-color"},{keywords:["none","left","right","both","inline-start","inline-end"],name:"clear"},{keywords:["auto"],name:"clip"},{keywords:["border-box","padding-box","content-box","margin-box","fill-box","stroke-box","view-box","none"],name:"clip-path"},{inherited:!0,keywords:["nonzero","evenodd"],name:"clip-rule"},{inherited:!0,keywords:["currentcolor"],name:"color"},{inherited:!0,keywords:["auto","srgb","linearrgb"],name:"color-interpolation"},{inherited:!0,keywords:["auto","srgb","linearrgb"],name:"color-interpolation-filters"},{inherited:!0,keywords:["auto","optimizespeed","optimizequality"],name:"color-rendering"},{inherited:!0,name:"color-scheme"},{keywords:["auto"],name:"column-count"},{keywords:["balance","auto"],name:"column-fill"},{keywords:["normal"],name:"column-gap"},{keywords:["auto"],name:"column-height"},{longhands:["column-rule-width","column-rule-style","column-rule-color"],name:"column-rule"},{inherited:!1,keywords:["none","spanning-item","intersection"],name:"column-rule-break"},{keywords:["currentcolor"],name:"column-rule-color"},{inherited:!1,name:"column-rule-outset"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"column-rule-style"},{keywords:["thin","medium","thick"],name:"column-rule-width"},{keywords:["none","all"],name:"column-span"},{keywords:["auto"],name:"column-width"},{keywords:["nowrap","wrap"],name:"column-wrap"},{longhands:["column-width","column-count"],name:"columns"},{keywords:["none","strict","content","size","layout","style","paint","inline-size","block-size"],name:"contain"},{name:"contain-intrinsic-block-size"},{keywords:["none"],name:"contain-intrinsic-height"},{name:"contain-intrinsic-inline-size"},{longhands:["contain-intrinsic-width","contain-intrinsic-height"],name:"contain-intrinsic-size"},{keywords:["none"],name:"contain-intrinsic-width"},{longhands:["container-name","container-type"],name:"container"},{keywords:["none"],name:"container-name"},{keywords:["normal","inline-size","size","scroll-state"],name:"container-type"},{name:"content"},{keywords:["visible","auto","hidden"],name:"content-visibility"},{name:"corner-bottom-left-shape"},{name:"corner-bottom-right-shape"},{name:"corner-end-end-shape"},{name:"corner-end-start-shape"},{longhands:["corner-top-left-shape","corner-top-right-shape","corner-bottom-right-shape","corner-bottom-left-shape"],name:"corner-shape"},{name:"corner-start-end-shape"},{name:"corner-start-start-shape"},{name:"corner-top-left-shape"},{name:"corner-top-right-shape"},{keywords:["none"],name:"counter-increment"},{keywords:["none"],name:"counter-reset"},{keywords:["none"],name:"counter-set"},{inherited:!0,keywords:["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","e-resize","n-resize","ne-resize","nw-resize","s-resize","se-resize","sw-resize","w-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","col-resize","row-resize","all-scroll","zoom-in","zoom-out","grab","grabbing"],name:"cursor"},{name:"cx"},{name:"cy"},{keywords:["none"],name:"d"},{name:"descent-override"},{inherited:!0,keywords:["ltr","rtl"],name:"direction"},{keywords:["inline","block","list-item","inline-block","table","inline-table","table-row-group","table-header-group","table-footer-group","table-row","table-column-group","table-column","table-cell","table-caption","-webkit-box","-webkit-inline-box","flex","inline-flex","grid","inline-grid","contents","flow-root","none","flow","math","ruby","ruby-text","masonry","inline-masonry"],name:"display"},{inherited:!0,keywords:["auto","alphabetic","ideographic","middle","central","mathematical","hanging","use-script","no-change","reset-size","text-after-edge","text-before-edge"],name:"dominant-baseline"},{inherited:!0,keywords:["standard","no-limit","constrained"],name:"dynamic-range-limit"},{inherited:!0,keywords:["show","hide"],name:"empty-cells"},{name:"fallback"},{keywords:["fixed","content"],name:"field-sizing"},{inherited:!0,name:"fill"},{inherited:!0,name:"fill-opacity"},{inherited:!0,keywords:["nonzero","evenodd"],name:"fill-rule"},{keywords:["none"],name:"filter"},{longhands:["flex-grow","flex-shrink","flex-basis"],name:"flex"},{keywords:["auto","fit-content","min-content","max-content","content"],name:"flex-basis"},{keywords:["row","row-reverse","column","column-reverse"],name:"flex-direction"},{longhands:["flex-direction","flex-wrap"],name:"flex-flow"},{name:"flex-grow"},{name:"flex-shrink"},{keywords:["nowrap","wrap","wrap-reverse"],name:"flex-wrap"},{keywords:["none","left","right","inline-start","inline-end"],name:"float"},{keywords:["currentcolor"],name:"flood-color"},{name:"flood-opacity"},{inherited:!0,longhands:["font-style","font-variant-ligatures","font-variant-caps","font-variant-numeric","font-variant-east-asian","font-variant-alternates","font-variant-position","font-variant-emoji","font-weight","font-stretch","font-size","line-height","font-family","font-optical-sizing","font-size-adjust","font-kerning","font-feature-settings","font-variation-settings"],name:"font"},{name:"font-display"},{inherited:!0,name:"font-family"},{inherited:!0,keywords:["normal"],name:"font-feature-settings"},{inherited:!0,keywords:["auto","normal","none"],name:"font-kerning"},{inherited:!0,keywords:["auto","none"],name:"font-optical-sizing"},{inherited:!0,keywords:["normal","light","dark"],name:"font-palette"},{inherited:!0,keywords:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller","-webkit-xxx-large"],name:"font-size"},{inherited:!0,keywords:["none","ex-height","cap-height","ch-width","ic-width","ic-height","from-font"],name:"font-size-adjust"},{inherited:!0,keywords:["normal","ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded"],name:"font-stretch"},{inherited:!0,keywords:["normal","italic","oblique"],name:"font-style"},{inherited:!0,longhands:["font-synthesis-weight","font-synthesis-style","font-synthesis-small-caps"],name:"font-synthesis"},{inherited:!0,keywords:["auto","none"],name:"font-synthesis-small-caps"},{inherited:!0,keywords:["auto","none"],name:"font-synthesis-style"},{inherited:!0,keywords:["auto","none"],name:"font-synthesis-weight"},{inherited:!0,longhands:["font-variant-ligatures","font-variant-caps","font-variant-alternates","font-variant-numeric","font-variant-east-asian","font-variant-position","font-variant-emoji"],name:"font-variant"},{inherited:!0,keywords:["normal"],name:"font-variant-alternates"},{inherited:!0,keywords:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"],name:"font-variant-caps"},{inherited:!0,keywords:["normal","jis78","jis83","jis90","jis04","simplified","traditional","full-width","proportional-width","ruby"],name:"font-variant-east-asian"},{inherited:!0,keywords:["normal","text","emoji","unicode"],name:"font-variant-emoji"},{inherited:!0,keywords:["normal","none","common-ligatures","no-common-ligatures","discretionary-ligatures","no-discretionary-ligatures","historical-ligatures","no-historical-ligatures","contextual","no-contextual"],name:"font-variant-ligatures"},{inherited:!0,keywords:["normal","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions","ordinal","slashed-zero"],name:"font-variant-numeric"},{inherited:!0,keywords:["normal","sub","super"],name:"font-variant-position"},{inherited:!0,keywords:["normal"],name:"font-variation-settings"},{inherited:!0,keywords:["normal","bold","bolder","lighter"],name:"font-weight"},{inherited:!0,keywords:["auto","none","preserve-parent-color"],name:"forced-color-adjust"},{longhands:["row-gap","column-gap"],name:"gap"},{inherited:!1,keywords:["row-over-column","column-over-row"],name:"gap-rule-paint-order"},{longhands:["grid-template-rows","grid-template-columns","grid-template-areas","grid-auto-flow","grid-auto-rows","grid-auto-columns"],name:"grid"},{longhands:["grid-row-start","grid-column-start","grid-row-end","grid-column-end"],name:"grid-area"},{keywords:["auto","min-content","max-content"],name:"grid-auto-columns"},{keywords:["row","column"],name:"grid-auto-flow"},{keywords:["auto","min-content","max-content"],name:"grid-auto-rows"},{longhands:["grid-column-start","grid-column-end"],name:"grid-column"},{keywords:["auto"],name:"grid-column-end"},{keywords:["auto"],name:"grid-column-start"},{longhands:["grid-row-start","grid-row-end"],name:"grid-row"},{keywords:["auto"],name:"grid-row-end"},{keywords:["auto"],name:"grid-row-start"},{longhands:["grid-template-rows","grid-template-columns","grid-template-areas"],name:"grid-template"},{keywords:["none"],name:"grid-template-areas"},{keywords:["none"],name:"grid-template-columns"},{keywords:["none"],name:"grid-template-rows"},{keywords:["auto","fit-content","min-content","max-content"],name:"height"},{inherited:!0,name:"hyphenate-character"},{inherited:!0,keywords:["auto"],name:"hyphenate-limit-chars"},{inherited:!0,keywords:["none","manual","auto"],name:"hyphens"},{inherited:!0,name:"image-orientation"},{inherited:!0,keywords:["auto","optimizespeed","optimizequality","-webkit-optimize-contrast","pixelated"],name:"image-rendering"},{name:"inherits"},{inherited:!1,keywords:["drop","normal","raise"],name:"initial-letter"},{name:"initial-value"},{keywords:["auto"],name:"inline-size"},{longhands:["top","right","bottom","left"],name:"inset"},{longhands:["inset-block-start","inset-block-end"],name:"inset-block"},{name:"inset-block-end"},{name:"inset-block-start"},{longhands:["inset-inline-start","inset-inline-end"],name:"inset-inline"},{name:"inset-inline-end"},{name:"inset-inline-start"},{inherited:!0,keywords:["auto","inert"],name:"interactivity"},{longhands:["interest-target-show-delay","interest-target-hide-delay"],name:"interest-target-delay"},{name:"interest-target-hide-delay"},{name:"interest-target-show-delay"},{inherited:!0,keywords:["numeric-only","allow-keywords"],name:"interpolate-size"},{keywords:["auto","isolate"],name:"isolation"},{name:"justify-content"},{name:"justify-items"},{name:"justify-self"},{keywords:["auto"],name:"left"},{inherited:!0,keywords:["normal"],name:"letter-spacing"},{keywords:["currentcolor"],name:"lighting-color"},{inherited:!0,keywords:["auto","loose","normal","strict","anywhere"],name:"line-break"},{keywords:["none","auto"],name:"line-clamp"},{name:"line-gap-override"},{inherited:!0,keywords:["normal"],name:"line-height"},{inherited:!0,longhands:["list-style-position","list-style-image","list-style-type"],name:"list-style"},{inherited:!0,keywords:["none"],name:"list-style-image"},{inherited:!0,keywords:["outside","inside"],name:"list-style-position"},{inherited:!0,keywords:["disc","circle","square","disclosure-open","disclosure-closed","decimal","none"],name:"list-style-type"},{longhands:["margin-top","margin-right","margin-bottom","margin-left"],name:"margin"},{longhands:["margin-block-start","margin-block-end"],name:"margin-block"},{keywords:["auto"],name:"margin-block-end"},{keywords:["auto"],name:"margin-block-start"},{keywords:["auto"],name:"margin-bottom"},{longhands:["margin-inline-start","margin-inline-end"],name:"margin-inline"},{keywords:["auto"],name:"margin-inline-end"},{keywords:["auto"],name:"margin-inline-start"},{keywords:["auto"],name:"margin-left"},{keywords:["auto"],name:"margin-right"},{keywords:["auto"],name:"margin-top"},{inherited:!0,longhands:["marker-start","marker-mid","marker-end"],name:"marker"},{inherited:!0,keywords:["none"],name:"marker-end"},{inherited:!0,keywords:["none"],name:"marker-mid"},{inherited:!0,keywords:["none"],name:"marker-start"},{longhands:["mask-image","-webkit-mask-position-x","-webkit-mask-position-y","mask-size","mask-repeat","mask-origin","mask-clip","mask-composite","mask-mode"],name:"mask"},{name:"mask-clip"},{name:"mask-composite"},{name:"mask-image"},{name:"mask-mode"},{name:"mask-origin"},{longhands:["-webkit-mask-position-x","-webkit-mask-position-y"],name:"mask-position"},{name:"mask-repeat"},{name:"mask-size"},{keywords:["luminance","alpha"],name:"mask-type"},{keywords:["auto","min-content","max-content"],name:"masonry-auto-tracks"},{keywords:["row","row-reverse","column","column-reverse"],name:"masonry-direction"},{keywords:["normal","reverse"],name:"masonry-fill"},{longhands:["masonry-direction","masonry-fill"],name:"masonry-flow"},{keywords:["normal"],name:"masonry-slack"},{name:"masonry-template-tracks"},{longhands:["masonry-track-start","masonry-track-end"],name:"masonry-track"},{keywords:["auto"],name:"masonry-track-end"},{keywords:["auto"],name:"masonry-track-start"},{inherited:!0,name:"math-depth"},{inherited:!0,keywords:["normal","compact"],name:"math-shift"},{inherited:!0,keywords:["normal","compact"],name:"math-style"},{keywords:["none"],name:"max-block-size"},{keywords:["none"],name:"max-height"},{keywords:["none"],name:"max-inline-size"},{keywords:["none"],name:"max-width"},{name:"min-block-size"},{name:"min-height"},{name:"min-inline-size"},{name:"min-width"},{keywords:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],name:"mix-blend-mode"},{name:"navigation"},{name:"negative"},{keywords:["fill","contain","cover","none","scale-down"],name:"object-fit"},{name:"object-position"},{keywords:["none"],name:"object-view-box"},{longhands:["offset-position","offset-path","offset-distance","offset-rotate","offset-anchor"],name:"offset"},{keywords:["auto"],name:"offset-anchor"},{name:"offset-distance"},{keywords:["none"],name:"offset-path"},{keywords:["auto","normal"],name:"offset-position"},{keywords:["auto","reverse"],name:"offset-rotate"},{name:"opacity"},{name:"order"},{keywords:["normal","none"],name:"origin-trial-test-property"},{inherited:!0,name:"orphans"},{longhands:["outline-color","outline-style","outline-width"],name:"outline"},{keywords:["currentcolor"],name:"outline-color"},{name:"outline-offset"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"outline-style"},{keywords:["thin","medium","thick"],name:"outline-width"},{longhands:["overflow-x","overflow-y"],name:"overflow"},{inherited:!1,keywords:["visible","none","auto"],name:"overflow-anchor"},{name:"overflow-block"},{keywords:["border-box","content-box","padding-box"],name:"overflow-clip-margin"},{name:"overflow-inline"},{inherited:!0,keywords:["normal","break-word","anywhere"],name:"overflow-wrap"},{keywords:["visible","hidden","scroll","auto","overlay","clip"],name:"overflow-x"},{keywords:["visible","hidden","scroll","auto","overlay","clip"],name:"overflow-y"},{keywords:["none","auto"],name:"overlay"},{name:"override-colors"},{longhands:["overscroll-behavior-x","overscroll-behavior-y"],name:"overscroll-behavior"},{name:"overscroll-behavior-block"},{name:"overscroll-behavior-inline"},{keywords:["auto","contain","none"],name:"overscroll-behavior-x"},{keywords:["auto","contain","none"],name:"overscroll-behavior-y"},{name:"pad"},{longhands:["padding-top","padding-right","padding-bottom","padding-left"],name:"padding"},{longhands:["padding-block-start","padding-block-end"],name:"padding-block"},{name:"padding-block-end"},{name:"padding-block-start"},{name:"padding-bottom"},{longhands:["padding-inline-start","padding-inline-end"],name:"padding-inline"},{name:"padding-inline-end"},{name:"padding-inline-start"},{name:"padding-left"},{name:"padding-right"},{name:"padding-top"},{keywords:["auto"],name:"page"},{longhands:["break-after"],name:"page-break-after"},{longhands:["break-before"],name:"page-break-before"},{longhands:["break-inside"],name:"page-break-inside"},{name:"page-orientation"},{inherited:!0,keywords:["normal","fill","stroke","markers"],name:"paint-order"},{keywords:["none"],name:"perspective"},{name:"perspective-origin"},{longhands:["align-content","justify-content"],name:"place-content"},{longhands:["align-items","justify-items"],name:"place-items"},{longhands:["align-self","justify-self"],name:"place-self"},{inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"],name:"pointer-events"},{keywords:["static","relative","absolute","fixed","sticky"],name:"position"},{keywords:["auto"],name:"position-anchor"},{keywords:["none","top","bottom","center","left","right","x-start","x-end","y-start","y-end","start","end","self-start","self-end","all"],name:"position-area"},{longhands:["position-try-order","position-try-fallbacks"],name:"position-try"},{keywords:["none","flip-block","flip-inline","flip-start"],name:"position-try-fallbacks"},{keywords:["normal","most-width","most-height","most-block-size","most-inline-size"],name:"position-try-order"},{keywords:["always","anchors-visible","no-overflow"],name:"position-visibility"},{name:"prefix"},{inherited:!0,keywords:["economy","exact"],name:"print-color-adjust"},{inherited:!0,keywords:["auto","none"],name:"quotes"},{name:"r"},{name:"range"},{keywords:["normal","flex-visual","flex-flow","grid-rows","grid-columns","grid-order","source-order"],name:"reading-flow"},{name:"reading-order"},{keywords:["none","both","horizontal","vertical","block","inline"],name:"resize"},{name:"result"},{keywords:["auto"],name:"right"},{name:"rotate"},{keywords:["normal"],name:"row-gap"},{inherited:!1,keywords:["none","spanning-item","intersection"],name:"row-rule-break"},{keywords:["currentcolor"],name:"row-rule-color"},{inherited:!1,name:"row-rule-outset"},{keywords:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"],name:"row-rule-style"},{keywords:["thin","medium","thick"],name:"row-rule-width"},{inherited:!0,keywords:["space-around","start","center","space-between"],name:"ruby-align"},{inherited:!0,keywords:["over","under"],name:"ruby-position"},{keywords:["auto"],name:"rx"},{keywords:["auto"],name:"ry"},{name:"scale"},{keywords:["auto","smooth"],name:"scroll-behavior"},{keywords:["none","nearest"],name:"scroll-initial-target"},{longhands:["scroll-margin-top","scroll-margin-right","scroll-margin-bottom","scroll-margin-left"],name:"scroll-margin"},{longhands:["scroll-margin-block-start","scroll-margin-block-end"],name:"scroll-margin-block"},{name:"scroll-margin-block-end"},{name:"scroll-margin-block-start"},{name:"scroll-margin-bottom"},{longhands:["scroll-margin-inline-start","scroll-margin-inline-end"],name:"scroll-margin-inline"},{name:"scroll-margin-inline-end"},{name:"scroll-margin-inline-start"},{name:"scroll-margin-left"},{name:"scroll-margin-right"},{name:"scroll-margin-top"},{keywords:["none","auto"],name:"scroll-marker-contain"},{keywords:["none","after","before"],name:"scroll-marker-group"},{longhands:["scroll-padding-top","scroll-padding-right","scroll-padding-bottom","scroll-padding-left"],name:"scroll-padding"},{longhands:["scroll-padding-block-start","scroll-padding-block-end"],name:"scroll-padding-block"},{keywords:["auto"],name:"scroll-padding-block-end"},{keywords:["auto"],name:"scroll-padding-block-start"},{keywords:["auto"],name:"scroll-padding-bottom"},{longhands:["scroll-padding-inline-start","scroll-padding-inline-end"],name:"scroll-padding-inline"},{keywords:["auto"],name:"scroll-padding-inline-end"},{keywords:["auto"],name:"scroll-padding-inline-start"},{keywords:["auto"],name:"scroll-padding-left"},{keywords:["auto"],name:"scroll-padding-right"},{keywords:["auto"],name:"scroll-padding-top"},{keywords:["none","start","end","center"],name:"scroll-snap-align"},{keywords:["normal","always"],name:"scroll-snap-stop"},{keywords:["none","x","y","block","inline","both","mandatory","proximity"],name:"scroll-snap-type"},{longhands:["scroll-start-block","scroll-start-inline"],name:"scroll-start"},{name:"scroll-start-block"},{name:"scroll-start-inline"},{name:"scroll-start-x"},{name:"scroll-start-y"},{longhands:["scroll-timeline-name","scroll-timeline-axis"],name:"scroll-timeline"},{name:"scroll-timeline-axis"},{name:"scroll-timeline-name"},{inherited:!0,keywords:["auto"],name:"scrollbar-color"},{inherited:!1,keywords:["auto","stable","both-edges"],name:"scrollbar-gutter"},{inherited:!1,keywords:["auto","thin","none"],name:"scrollbar-width"},{name:"shape-image-threshold"},{keywords:["none"],name:"shape-margin"},{keywords:["none"],name:"shape-outside"},{inherited:!0,keywords:["auto","optimizespeed","crispedges","geometricprecision"],name:"shape-rendering"},{name:"size"},{name:"size-adjust"},{inherited:!0,keywords:["none","normal","spell-out","digits","literal-punctuation","no-punctuation"],name:"speak"},{name:"speak-as"},{name:"src"},{keywords:["currentcolor"],name:"stop-color"},{name:"stop-opacity"},{inherited:!0,name:"stroke"},{inherited:!0,keywords:["none"],name:"stroke-dasharray"},{inherited:!0,name:"stroke-dashoffset"},{inherited:!0,keywords:["butt","round","square"],name:"stroke-linecap"},{inherited:!0,keywords:["miter","bevel","round"],name:"stroke-linejoin"},{inherited:!0,name:"stroke-miterlimit"},{inherited:!0,name:"stroke-opacity"},{inherited:!0,name:"stroke-width"},{name:"suffix"},{name:"symbols"},{name:"syntax"},{name:"system"},{inherited:!0,name:"tab-size"},{keywords:["auto","fixed"],name:"table-layout"},{inherited:!0,keywords:["left","right","center","justify","-webkit-left","-webkit-right","-webkit-center","start","end"],name:"text-align"},{inherited:!0,keywords:["auto","start","end","left","right","center","justify"],name:"text-align-last"},{inherited:!0,keywords:["start","middle","end"],name:"text-anchor"},{inherited:!0,keywords:["normal","no-autospace"],name:"text-autospace"},{longhands:["text-box-trim","text-box-edge"],name:"text-box"},{inherited:!0,name:"text-box-edge"},{keywords:["none","trim-start","trim-end","trim-both"],name:"text-box-trim"},{inherited:!0,keywords:["none","all"],name:"text-combine-upright"},{longhands:["text-decoration-line","text-decoration-thickness","text-decoration-style","text-decoration-color"],name:"text-decoration"},{keywords:["currentcolor"],name:"text-decoration-color"},{keywords:["none","underline","overline","line-through","blink","spelling-error","grammar-error"],name:"text-decoration-line"},{inherited:!0,keywords:["none","auto"],name:"text-decoration-skip-ink"},{keywords:["solid","double","dotted","dashed","wavy"],name:"text-decoration-style"},{inherited:!1,keywords:["auto","from-font"],name:"text-decoration-thickness"},{inherited:!0,longhands:["text-emphasis-style","text-emphasis-color"],name:"text-emphasis"},{inherited:!0,keywords:["currentcolor"],name:"text-emphasis-color"},{inherited:!0,name:"text-emphasis-position"},{inherited:!0,name:"text-emphasis-style"},{inherited:!0,name:"text-indent"},{inherited:!0,keywords:["sideways","mixed","upright"],name:"text-orientation"},{keywords:["clip","ellipsis"],name:"text-overflow"},{inherited:!0,keywords:["auto","optimizespeed","optimizelegibility","geometricprecision"],name:"text-rendering"},{inherited:!0,keywords:["none"],name:"text-shadow"},{inherited:!0,keywords:["none","auto"],name:"text-size-adjust"},{inherited:!0,longhands:["text-autospace","text-spacing-trim"],name:"text-spacing"},{inherited:!0,keywords:["normal","space-all","space-first","trim-start"],name:"text-spacing-trim"},{inherited:!0,keywords:["capitalize","uppercase","lowercase","none","math-auto"],name:"text-transform"},{inherited:!0,keywords:["auto"],name:"text-underline-offset"},{inherited:!0,keywords:["auto","from-font","under","left","right"],name:"text-underline-position"},{inherited:!0,longhands:["text-wrap-mode","text-wrap-style"],name:"text-wrap"},{inherited:!0,keywords:["wrap","nowrap"],name:"text-wrap-mode"},{inherited:!0,keywords:["auto","balance","pretty","stable"],name:"text-wrap-style"},{name:"timeline-scope"},{keywords:["auto"],name:"top"},{keywords:["auto","none","pan-x","pan-left","pan-right","pan-y","pan-up","pan-down","pinch-zoom","manipulation"],name:"touch-action"},{keywords:["none"],name:"transform"},{keywords:["content-box","border-box","fill-box","stroke-box","view-box"],name:"transform-box"},{name:"transform-origin"},{keywords:["flat","preserve-3d"],name:"transform-style"},{longhands:["transition-property","transition-duration","transition-timing-function","transition-delay","transition-behavior"],name:"transition"},{keywords:["normal","allow-discrete"],name:"transition-behavior"},{name:"transition-delay"},{name:"transition-duration"},{keywords:["none"],name:"transition-property"},{keywords:["linear","ease","ease-in","ease-out","ease-in-out","jump-both","jump-end","jump-none","jump-start","step-start","step-end"],name:"transition-timing-function"},{name:"translate"},{name:"types"},{keywords:["normal","embed","bidi-override","isolate","plaintext","isolate-override"],name:"unicode-bidi"},{name:"unicode-range"},{inherited:!0,keywords:["auto","none","text","all","contain"],name:"user-select"},{keywords:["none","non-scaling-stroke"],name:"vector-effect"},{keywords:["baseline","sub","super","text-top","text-bottom","middle"],name:"vertical-align"},{longhands:["view-timeline-name","view-timeline-axis","view-timeline-inset"],name:"view-timeline"},{name:"view-timeline-axis"},{name:"view-timeline-inset"},{name:"view-timeline-name"},{keywords:["none"],name:"view-transition-class"},{keywords:["normal","contain","nearest"],name:"view-transition-group"},{keywords:["none","auto"],name:"view-transition-name"},{inherited:!0,keywords:["visible","hidden","collapse"],name:"visibility"},{inherited:!0,longhands:["white-space-collapse","text-wrap-mode"],name:"white-space"},{inherited:!0,keywords:["collapse","preserve","preserve-breaks","break-spaces"],name:"white-space-collapse"},{inherited:!0,name:"widows"},{keywords:["auto","fit-content","min-content","max-content"],name:"width"},{keywords:["auto"],name:"will-change"},{inherited:!0,keywords:["normal","break-all","keep-all","break-word","auto-phrase"],name:"word-break"},{inherited:!0,keywords:["normal"],name:"word-spacing"},{inherited:!0,keywords:["horizontal-tb","vertical-rl","vertical-lr","sideways-rl","sideways-lr"],name:"writing-mode"},{name:"x"},{name:"y"},{keywords:["auto"],name:"z-index"},{name:"zoom"}],p={"-webkit-box-align":{values:["stretch","start","center","end","baseline"]},"-webkit-box-decoration-break":{values:["slice","clone"]},"-webkit-box-direction":{values:["normal","reverse"]},"-webkit-box-orient":{values:["horizontal","vertical"]},"-webkit-box-pack":{values:["start","center","end","justify"]},"-webkit-line-break":{values:["auto","loose","normal","strict","after-white-space","anywhere"]},"-webkit-line-clamp":{values:["none"]},"-webkit-rtl-ordering":{values:["logical","visual"]},"-webkit-text-security":{values:["none","disc","circle","square"]},"-webkit-user-drag":{values:["auto","none","element"]},"-webkit-user-modify":{values:["read-only","read-write","read-write-plaintext-only"]},"accent-color":{values:["auto","currentcolor"]},"alignment-baseline":{values:["auto","baseline","alphabetic","ideographic","middle","central","mathematical","before-edge","text-before-edge","after-edge","text-after-edge","hanging"]},"anchor-name":{values:["none"]},"anchor-scope":{values:["none","all"]},"animation-composition":{values:["replace","add","accumulate"]},"animation-direction":{values:["normal","reverse","alternate","alternate-reverse"]},"animation-fill-mode":{values:["none","forwards","backwards","both"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["running","paused"]},"animation-timeline":{values:["none","auto"]},"animation-timing-function":{values:["linear","ease","ease-in","ease-out","ease-in-out","jump-both","jump-end","jump-none","jump-start","step-start","step-end"]},"animation-trigger-timeline":{values:["none","auto"]},"animation-trigger-type":{values:["once","repeat","alternate","state"]},"app-region":{values:["none","drag","no-drag"]},"aspect-ratio":{values:["auto"]},"backdrop-filter":{values:["none"]},"backface-visibility":{values:["visible","hidden"]},"background-attachment":{values:["scroll","fixed","local"]},"background-blend-mode":{values:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},"background-clip":{values:["border-box","padding-box","content-box","text"]},"background-color":{values:["currentcolor"]},"background-image":{values:["auto","none"]},"background-origin":{values:["border-box","padding-box","content-box"]},"background-size":{values:["auto","cover","contain"]},"baseline-shift":{values:["baseline","sub","super"]},"baseline-source":{values:["auto","first","last"]},"block-size":{values:["auto"]},"border-bottom-color":{values:["currentcolor"]},"border-bottom-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"border-bottom-width":{values:["thin","medium","thick"]},"border-collapse":{values:["separate","collapse"]},"border-image-repeat":{values:["stretch","repeat","round","space"]},"border-image-source":{values:["none"]},"border-image-width":{values:["auto"]},"border-left-color":{values:["currentcolor"]},"border-left-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"border-left-width":{values:["thin","medium","thick"]},"border-right-color":{values:["currentcolor"]},"border-right-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"border-right-width":{values:["thin","medium","thick"]},"border-style":{values:["none"]},"border-top-color":{values:["currentcolor"]},"border-top-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"border-top-width":{values:["thin","medium","thick"]},bottom:{values:["auto"]},"box-decoration-break":{values:["slice","clone"]},"box-shadow":{values:["none"]},"box-sizing":{values:["content-box","border-box"]},"break-after":{values:["auto","avoid","avoid-column","avoid-page","column","left","page","recto","right","verso"]},"break-before":{values:["auto","avoid","avoid-column","avoid-page","column","left","page","recto","right","verso"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page"]},"buffered-rendering":{values:["auto","dynamic","static"]},"caption-side":{values:["top","bottom"]},"caret-animation":{values:["auto","manual"]},"caret-color":{values:["auto","currentcolor"]},clear:{values:["none","left","right","both","inline-start","inline-end"]},clip:{values:["auto"]},"clip-path":{values:["border-box","padding-box","content-box","margin-box","fill-box","stroke-box","view-box","none"]},"clip-rule":{values:["nonzero","evenodd"]},color:{values:["currentcolor"]},"color-interpolation":{values:["auto","srgb","linearrgb"]},"color-interpolation-filters":{values:["auto","srgb","linearrgb"]},"color-rendering":{values:["auto","optimizespeed","optimizequality"]},"column-count":{values:["auto"]},"column-fill":{values:["balance","auto"]},"column-gap":{values:["normal"]},"column-height":{values:["auto"]},"column-rule-break":{values:["none","spanning-item","intersection"]},"column-rule-color":{values:["currentcolor"]},"column-rule-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"column-rule-width":{values:["thin","medium","thick"]},"column-span":{values:["none","all"]},"column-width":{values:["auto"]},"column-wrap":{values:["nowrap","wrap"]},contain:{values:["none","strict","content","size","layout","style","paint","inline-size","block-size"]},"contain-intrinsic-height":{values:["none"]},"contain-intrinsic-width":{values:["none"]},"container-name":{values:["none"]},"container-type":{values:["normal","inline-size","size","scroll-state"]},"content-visibility":{values:["visible","auto","hidden"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},"counter-set":{values:["none"]},cursor:{values:["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","e-resize","n-resize","ne-resize","nw-resize","s-resize","se-resize","sw-resize","w-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","col-resize","row-resize","all-scroll","zoom-in","zoom-out","grab","grabbing"]},d:{values:["none"]},direction:{values:["ltr","rtl"]},display:{values:["inline","block","list-item","inline-block","table","inline-table","table-row-group","table-header-group","table-footer-group","table-row","table-column-group","table-column","table-cell","table-caption","-webkit-box","-webkit-inline-box","flex","inline-flex","grid","inline-grid","contents","flow-root","none","flow","math","ruby","ruby-text","masonry","inline-masonry"]},"dominant-baseline":{values:["auto","alphabetic","ideographic","middle","central","mathematical","hanging","use-script","no-change","reset-size","text-after-edge","text-before-edge"]},"dynamic-range-limit":{values:["standard","no-limit","constrained"]},"empty-cells":{values:["show","hide"]},"field-sizing":{values:["fixed","content"]},"fill-rule":{values:["nonzero","evenodd"]},filter:{values:["none"]},"flex-basis":{values:["auto","fit-content","min-content","max-content","content"]},"flex-direction":{values:["row","row-reverse","column","column-reverse"]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["none","left","right","inline-start","inline-end"]},"flood-color":{values:["currentcolor"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","normal","none"]},"font-optical-sizing":{values:["auto","none"]},"font-palette":{values:["normal","light","dark"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller","-webkit-xxx-large"]},"font-size-adjust":{values:["none","ex-height","cap-height","ch-width","ic-width","ic-height","from-font"]},"font-stretch":{values:["normal","ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded"]},"font-style":{values:["normal","italic","oblique"]},"font-synthesis-small-caps":{values:["auto","none"]},"font-synthesis-style":{values:["auto","none"]},"font-synthesis-weight":{values:["auto","none"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal","jis78","jis83","jis90","jis04","simplified","traditional","full-width","proportional-width","ruby"]},"font-variant-emoji":{values:["normal","text","emoji","unicode"]},"font-variant-ligatures":{values:["normal","none","common-ligatures","no-common-ligatures","discretionary-ligatures","no-discretionary-ligatures","historical-ligatures","no-historical-ligatures","contextual","no-contextual"]},"font-variant-numeric":{values:["normal","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions","ordinal","slashed-zero"]},"font-variant-position":{values:["normal","sub","super"]},"font-variation-settings":{values:["normal"]},"font-weight":{values:["normal","bold","bolder","lighter"]},"forced-color-adjust":{values:["auto","none","preserve-parent-color"]},"gap-rule-paint-order":{values:["row-over-column","column-over-row"]},"grid-auto-columns":{values:["auto","min-content","max-content"]},"grid-auto-flow":{values:["row","column"]},"grid-auto-rows":{values:["auto","min-content","max-content"]},"grid-column-end":{values:["auto"]},"grid-column-start":{values:["auto"]},"grid-row-end":{values:["auto"]},"grid-row-start":{values:["auto"]},"grid-template-areas":{values:["none"]},"grid-template-columns":{values:["none"]},"grid-template-rows":{values:["none"]},height:{values:["auto","fit-content","min-content","max-content"]},"hyphenate-limit-chars":{values:["auto"]},hyphens:{values:["none","manual","auto"]},"image-rendering":{values:["auto","optimizespeed","optimizequality","-webkit-optimize-contrast","pixelated"]},"initial-letter":{values:["drop","normal","raise"]},"inline-size":{values:["auto"]},interactivity:{values:["auto","inert"]},"interpolate-size":{values:["numeric-only","allow-keywords"]},isolation:{values:["auto","isolate"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"lighting-color":{values:["currentcolor"]},"line-break":{values:["auto","loose","normal","strict","anywhere"]},"line-clamp":{values:["none","auto"]},"line-height":{values:["normal"]},"list-style-image":{values:["none"]},"list-style-position":{values:["outside","inside"]},"list-style-type":{values:["disc","circle","square","disclosure-open","disclosure-closed","decimal","none"]},"margin-block-end":{values:["auto"]},"margin-block-start":{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-inline-end":{values:["auto"]},"margin-inline-start":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"marker-end":{values:["none"]},"marker-mid":{values:["none"]},"marker-start":{values:["none"]},"mask-type":{values:["luminance","alpha"]},"masonry-auto-tracks":{values:["auto","min-content","max-content"]},"masonry-direction":{values:["row","row-reverse","column","column-reverse"]},"masonry-fill":{values:["normal","reverse"]},"masonry-slack":{values:["normal"]},"masonry-track-end":{values:["auto"]},"masonry-track-start":{values:["auto"]},"math-shift":{values:["normal","compact"]},"math-style":{values:["normal","compact"]},"max-block-size":{values:["none"]},"max-height":{values:["none"]},"max-inline-size":{values:["none"]},"max-width":{values:["none"]},"mix-blend-mode":{values:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},"object-fit":{values:["fill","contain","cover","none","scale-down"]},"object-view-box":{values:["none"]},"offset-anchor":{values:["auto"]},"offset-path":{values:["none"]},"offset-position":{values:["auto","normal"]},"offset-rotate":{values:["auto","reverse"]},"origin-trial-test-property":{values:["normal","none"]},"outline-color":{values:["currentcolor"]},"outline-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"outline-width":{values:["thin","medium","thick"]},"overflow-anchor":{values:["visible","none","auto"]},"overflow-clip-margin":{values:["border-box","content-box","padding-box"]},"overflow-wrap":{values:["normal","break-word","anywhere"]},"overflow-x":{values:["visible","hidden","scroll","auto","overlay","clip"]},"overflow-y":{values:["visible","hidden","scroll","auto","overlay","clip"]},overlay:{values:["none","auto"]},"overscroll-behavior-x":{values:["auto","contain","none"]},"overscroll-behavior-y":{values:["auto","contain","none"]},page:{values:["auto"]},"paint-order":{values:["normal","fill","stroke","markers"]},perspective:{values:["none"]},"pointer-events":{values:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"]},position:{values:["static","relative","absolute","fixed","sticky"]},"position-anchor":{values:["auto"]},"position-area":{values:["none","top","bottom","center","left","right","x-start","x-end","y-start","y-end","start","end","self-start","self-end","all"]},"position-try-fallbacks":{values:["none","flip-block","flip-inline","flip-start"]},"position-try-order":{values:["normal","most-width","most-height","most-block-size","most-inline-size"]},"position-visibility":{values:["always","anchors-visible","no-overflow"]},"print-color-adjust":{values:["economy","exact"]},quotes:{values:["auto","none"]},"reading-flow":{values:["normal","flex-visual","flex-flow","grid-rows","grid-columns","grid-order","source-order"]},resize:{values:["none","both","horizontal","vertical","block","inline"]},right:{values:["auto"]},"row-gap":{values:["normal"]},"row-rule-break":{values:["none","spanning-item","intersection"]},"row-rule-color":{values:["currentcolor"]},"row-rule-style":{values:["none","hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"]},"row-rule-width":{values:["thin","medium","thick"]},"ruby-align":{values:["space-around","start","center","space-between"]},"ruby-position":{values:["over","under"]},rx:{values:["auto"]},ry:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-initial-target":{values:["none","nearest"]},"scroll-marker-contain":{values:["none","auto"]},"scroll-marker-group":{values:["none","after","before"]},"scroll-padding-block-end":{values:["auto"]},"scroll-padding-block-start":{values:["auto"]},"scroll-padding-bottom":{values:["auto"]},"scroll-padding-inline-end":{values:["auto"]},"scroll-padding-inline-start":{values:["auto"]},"scroll-padding-left":{values:["auto"]},"scroll-padding-right":{values:["auto"]},"scroll-padding-top":{values:["auto"]},"scroll-snap-align":{values:["none","start","end","center"]},"scroll-snap-stop":{values:["normal","always"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},"scrollbar-color":{values:["auto"]},"scrollbar-gutter":{values:["auto","stable","both-edges"]},"scrollbar-width":{values:["auto","thin","none"]},"shape-margin":{values:["none"]},"shape-outside":{values:["none"]},"shape-rendering":{values:["auto","optimizespeed","crispedges","geometricprecision"]},speak:{values:["none","normal","spell-out","digits","literal-punctuation","no-punctuation"]},"stop-color":{values:["currentcolor"]},"stroke-dasharray":{values:["none"]},"stroke-linecap":{values:["butt","round","square"]},"stroke-linejoin":{values:["miter","bevel","round"]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["left","right","center","justify","-webkit-left","-webkit-right","-webkit-center","start","end"]},"text-align-last":{values:["auto","start","end","left","right","center","justify"]},"text-anchor":{values:["start","middle","end"]},"text-autospace":{values:["normal","no-autospace"]},"text-box-trim":{values:["none","trim-start","trim-end","trim-both"]},"text-combine-upright":{values:["none","all"]},"text-decoration-color":{values:["currentcolor"]},"text-decoration-line":{values:["none","underline","overline","line-through","blink","spelling-error","grammar-error"]},"text-decoration-skip-ink":{values:["none","auto"]},"text-decoration-style":{values:["solid","double","dotted","dashed","wavy"]},"text-decoration-thickness":{values:["auto","from-font"]},"text-emphasis-color":{values:["currentcolor"]},"text-orientation":{values:["sideways","mixed","upright"]},"text-overflow":{values:["clip","ellipsis"]},"text-rendering":{values:["auto","optimizespeed","optimizelegibility","geometricprecision"]},"text-shadow":{values:["none"]},"text-size-adjust":{values:["none","auto"]},"text-spacing-trim":{values:["normal","space-all","space-first","trim-start"]},"text-transform":{values:["capitalize","uppercase","lowercase","none","math-auto"]},"text-underline-offset":{values:["auto"]},"text-underline-position":{values:["auto","from-font","under","left","right"]},"text-wrap-mode":{values:["wrap","nowrap"]},"text-wrap-style":{values:["auto","balance","pretty","stable"]},top:{values:["auto"]},"touch-action":{values:["auto","none","pan-x","pan-left","pan-right","pan-y","pan-up","pan-down","pinch-zoom","manipulation"]},transform:{values:["none"]},"transform-box":{values:["content-box","border-box","fill-box","stroke-box","view-box"]},"transform-style":{values:["flat","preserve-3d"]},"transition-behavior":{values:["normal","allow-discrete"]},"transition-property":{values:["none"]},"transition-timing-function":{values:["linear","ease","ease-in","ease-out","ease-in-out","jump-both","jump-end","jump-none","jump-start","step-start","step-end"]},"unicode-bidi":{values:["normal","embed","bidi-override","isolate","plaintext","isolate-override"]},"user-select":{values:["auto","none","text","all","contain"]},"vector-effect":{values:["none","non-scaling-stroke"]},"vertical-align":{values:["baseline","sub","super","text-top","text-bottom","middle"]},"view-transition-class":{values:["none"]},"view-transition-group":{values:["normal","contain","nearest"]},"view-transition-name":{values:["none","auto"]},visibility:{values:["visible","hidden","collapse"]},"white-space-collapse":{values:["collapse","preserve","preserve-breaks","break-spaces"]},width:{values:["auto","fit-content","min-content","max-content"]},"will-change":{values:["auto"]},"word-break":{values:["normal","break-all","keep-all","break-word","auto-phrase"]},"word-spacing":{values:["normal"]},"writing-mode":{values:["horizontal-tb","vertical-rl","vertical-lr","sideways-rl","sideways-lr"]},"z-index":{values:["auto"]}},m=new Map([["-epub-caption-side","caption-side"],["-epub-text-combine","-webkit-text-combine"],["-epub-text-emphasis","text-emphasis"],["-epub-text-emphasis-color","text-emphasis-color"],["-epub-text-emphasis-style","text-emphasis-style"],["-epub-text-orientation","-webkit-text-orientation"],["-epub-text-transform","text-transform"],["-epub-word-break","word-break"],["-epub-writing-mode","-webkit-writing-mode"],["-webkit-align-content","align-content"],["-webkit-align-items","align-items"],["-webkit-align-self","align-self"],["-webkit-animation","animation"],["-webkit-animation-delay","animation-delay"],["-webkit-animation-direction","animation-direction"],["-webkit-animation-duration","animation-duration"],["-webkit-animation-fill-mode","animation-fill-mode"],["-webkit-animation-iteration-count","animation-iteration-count"],["-webkit-animation-name","animation-name"],["-webkit-animation-play-state","animation-play-state"],["-webkit-animation-timing-function","animation-timing-function"],["-webkit-app-region","app-region"],["-webkit-appearance","appearance"],["-webkit-backface-visibility","backface-visibility"],["-webkit-background-clip","background-clip"],["-webkit-background-origin","background-origin"],["-webkit-background-size","background-size"],["-webkit-border-after","border-block-end"],["-webkit-border-after-color","border-block-end-color"],["-webkit-border-after-style","border-block-end-style"],["-webkit-border-after-width","border-block-end-width"],["-webkit-border-before","border-block-start"],["-webkit-border-before-color","border-block-start-color"],["-webkit-border-before-style","border-block-start-style"],["-webkit-border-before-width","border-block-start-width"],["-webkit-border-bottom-left-radius","border-bottom-left-radius"],["-webkit-border-bottom-right-radius","border-bottom-right-radius"],["-webkit-border-end","border-inline-end"],["-webkit-border-end-color","border-inline-end-color"],["-webkit-border-end-style","border-inline-end-style"],["-webkit-border-end-width","border-inline-end-width"],["-webkit-border-radius","border-radius"],["-webkit-border-start","border-inline-start"],["-webkit-border-start-color","border-inline-start-color"],["-webkit-border-start-style","border-inline-start-style"],["-webkit-border-start-width","border-inline-start-width"],["-webkit-border-top-left-radius","border-top-left-radius"],["-webkit-border-top-right-radius","border-top-right-radius"],["-webkit-box-shadow","box-shadow"],["-webkit-box-sizing","box-sizing"],["-webkit-clip-path","clip-path"],["-webkit-column-count","column-count"],["-webkit-column-gap","column-gap"],["-webkit-column-rule","column-rule"],["-webkit-column-rule-color","column-rule-color"],["-webkit-column-rule-style","column-rule-style"],["-webkit-column-rule-width","column-rule-width"],["-webkit-column-span","column-span"],["-webkit-column-width","column-width"],["-webkit-columns","columns"],["-webkit-filter","filter"],["-webkit-flex","flex"],["-webkit-flex-basis","flex-basis"],["-webkit-flex-direction","flex-direction"],["-webkit-flex-flow","flex-flow"],["-webkit-flex-grow","flex-grow"],["-webkit-flex-shrink","flex-shrink"],["-webkit-flex-wrap","flex-wrap"],["-webkit-font-feature-settings","font-feature-settings"],["-webkit-hyphenate-character","hyphenate-character"],["-webkit-justify-content","justify-content"],["-webkit-logical-height","block-size"],["-webkit-logical-width","inline-size"],["-webkit-margin-after","margin-block-end"],["-webkit-margin-before","margin-block-start"],["-webkit-margin-end","margin-inline-end"],["-webkit-margin-start","margin-inline-start"],["-webkit-mask","mask"],["-webkit-mask-clip","mask-clip"],["-webkit-mask-composite","mask-composite"],["-webkit-mask-image","mask-image"],["-webkit-mask-origin","mask-origin"],["-webkit-mask-position","mask-position"],["-webkit-mask-repeat","mask-repeat"],["-webkit-mask-size","mask-size"],["-webkit-max-logical-height","max-block-size"],["-webkit-max-logical-width","max-inline-size"],["-webkit-min-logical-height","min-block-size"],["-webkit-min-logical-width","min-inline-size"],["-webkit-opacity","opacity"],["-webkit-order","order"],["-webkit-padding-after","padding-block-end"],["-webkit-padding-before","padding-block-start"],["-webkit-padding-end","padding-inline-end"],["-webkit-padding-start","padding-inline-start"],["-webkit-perspective","perspective"],["-webkit-perspective-origin","perspective-origin"],["-webkit-print-color-adjust","print-color-adjust"],["-webkit-shape-image-threshold","shape-image-threshold"],["-webkit-shape-margin","shape-margin"],["-webkit-shape-outside","shape-outside"],["-webkit-text-emphasis","text-emphasis"],["-webkit-text-emphasis-color","text-emphasis-color"],["-webkit-text-emphasis-position","text-emphasis-position"],["-webkit-text-emphasis-style","text-emphasis-style"],["-webkit-text-size-adjust","text-size-adjust"],["-webkit-transform","transform"],["-webkit-transform-origin","transform-origin"],["-webkit-transform-style","transform-style"],["-webkit-transition","transition"],["-webkit-transition-delay","transition-delay"],["-webkit-transition-duration","transition-duration"],["-webkit-transition-property","transition-property"],["-webkit-transition-timing-function","transition-timing-function"],["-webkit-user-select","user-select"],["grid-column-gap","column-gap"],["grid-gap","gap"],["grid-row-gap","row-gap"],["word-wrap","overflow-wrap"]]);class f{#t=[];#n=new Map;#r=new Map;#s=new Set;#i=new Set;#o=new Map;#a=new Map;#l=[];#d=[];#c;constructor(e,t){this.#a=t;for(let t=0;tCSS.supports(e,t))).sort(f.sortPrefixesAndCSSWideKeywordsToEnd).map((t=>`${e}: ${t}`));this.isSVGProperty(e)||this.#l.push(...t),this.#d.push(...t)}}static isCSSWideKeyword(e){return y.includes(e)}static isPositionTryOrderKeyword(e){return v.includes(e)}static sortPrefixesAndCSSWideKeywordsToEnd(e,t){const n=f.isCSSWideKeyword(e),r=f.isCSSWideKeyword(t);if(n&&!r)return 1;if(!n&&r)return-1;const s=e.startsWith("-webkit-"),i=t.startsWith("-webkit-");return s&&!i?1:!s&&i||et?1:0}allProperties(){return this.#t}aliasesFor(){return this.#a}nameValuePresets(e){return e?this.#d:this.#l}isSVGProperty(e){return e=e.toLowerCase(),this.#i.has(e)}getLonghands(e){return this.#n.get(e)||null}getShorthands(e){return this.#r.get(e)||null}isColorAwareProperty(e){return E.has(e.toLowerCase())||this.isCustomProperty(e.toLowerCase())}isFontFamilyProperty(e){return"font-family"===e.toLowerCase()}isAngleAwareProperty(e){const t=e.toLowerCase();return E.has(t)||L.has(t)}isGridAreaDefiningProperty(e){return"grid"===(e=e.toLowerCase())||"grid-template"===e||"grid-template-areas"===e}isGridColumnNameAwareProperty(e){return e=e.toLowerCase(),["grid-column","grid-column-start","grid-column-end"].includes(e)}isGridRowNameAwareProperty(e){return e=e.toLowerCase(),["grid-row","grid-row-start","grid-row-end"].includes(e)}isGridAreaNameAwareProperty(e){return"grid-area"===(e=e.toLowerCase())}isGridNameAwareProperty(e){return this.isGridAreaNameAwareProperty(e)||this.isGridColumnNameAwareProperty(e)||this.isGridRowNameAwareProperty(e)}isLengthProperty(e){return"line-height"!==(e=e.toLowerCase())&&(T.has(e)||e.startsWith("margin")||e.startsWith("padding")||-1!==e.indexOf("width")||-1!==e.indexOf("height"))}isBezierAwareProperty(e){return e=e.toLowerCase(),M.has(e)||this.isCustomProperty(e)}isFontAwareProperty(e){return e=e.toLowerCase(),P.has(e)||this.isCustomProperty(e)}isCustomProperty(e){return e.startsWith("--")}isShadowProperty(e){return"box-shadow"===(e=e.toLowerCase())||"text-shadow"===e||"-webkit-box-shadow"===e}isStringProperty(e){return"content"===(e=e.toLowerCase())}canonicalPropertyName(e){if(this.isCustomProperty(e))return e;e=e.toLowerCase();const t=this.#a.get(e);if(t)return t;if(!e||e.length<9||"-"!==e.charAt(0))return e;const n=e.match(/(?:-webkit-)(.+)/);return n&&this.#c.has(n[1])?n[1]:e}isCSSPropertyName(e){return!!((e=e.toLowerCase()).startsWith("--")&&e.length>2||e.startsWith("-moz-")||e.startsWith("-ms-")||e.startsWith("-o-")||e.startsWith("-webkit-"))||this.#c.has(e)}isPropertyInherited(e){return(e=e.toLowerCase()).startsWith("--")||this.#s.has(this.canonicalPropertyName(e))||this.#s.has(e)}specificPropertyValues(e){const t=e.replace(/^-webkit-/,""),n=this.#o;let r=n.get(e)||n.get(t);if(!r){r=[];for(const t of F)CSS.supports(e,t)&&r.push(t);n.set(e,r)}return r}getPropertyValues(t){t=t.toLowerCase();const n=[...this.specificPropertyValues(t),...y];if(this.isColorAwareProperty(t)){n.push("currentColor");for(const t of e.Color.Nicknames.keys())n.push(t)}return n.sort(f.sortPrefixesAndCSSWideKeywordsToEnd)}propertyUsageWeight(e){return N.get(e)||N.get(this.canonicalPropertyName(e))||0}getValuePreset(e,t){const n=R.get(e);let r=n?n.get(t):null;if(!r)return null;let s=r.length,i=r.length;return r&&(s=r.indexOf("|"),i=r.lastIndexOf("|"),i=s===i?i:i-1,r=r.replace(/\|/g,"")),{text:r,startColumn:s,endColumn:i}}isHighlightPseudoType(e){return"highlight"===e||"selection"===e||"target-text"===e||"grammar-error"===e||"spelling-error"===e}}const b=new Map([["linear","cubic-bezier(0, 0, 1, 1)"],["ease","cubic-bezier(0.25, 0.1, 0.25, 1)"],["ease-in","cubic-bezier(0.42, 0, 1, 1)"],["ease-in-out","cubic-bezier(0.42, 0, 0.58, 1)"],["ease-out","cubic-bezier(0, 0, 0.58, 1)"]]),y=["inherit","initial","revert","revert-layer","unset"],v=["normal","most-height","most-width","most-block-size","most-inline-size"],I=/((?:\[[\w\- ]+\]\s*)*(?:"[^"]+"|'[^']+'))[^'"\[]*\[?[^'"\[]*/;let w=null;function S(){if(!w){w=new f(g,m)}return w}const k=new Map([["linear-gradient","linear-gradient(|45deg, black, transparent|)"],["radial-gradient","radial-gradient(|black, transparent|)"],["repeating-linear-gradient","repeating-linear-gradient(|45deg, black, transparent 100px|)"],["repeating-radial-gradient","repeating-radial-gradient(|black, transparent 100px|)"],["url","url(||)"]]),C=new Map([["blur","blur(|1px|)"],["brightness","brightness(|0.5|)"],["contrast","contrast(|0.5|)"],["drop-shadow","drop-shadow(|2px 4px 6px black|)"],["grayscale","grayscale(|1|)"],["hue-rotate","hue-rotate(|45deg|)"],["invert","invert(|1|)"],["opacity","opacity(|0.5|)"],["saturate","saturate(|0.5|)"],["sepia","sepia(|1|)"],["url","url(||)"]]),x=new Map([["superellipse(0.5)","superellipse(|0.5|)"],["superellipse(infinity)","superellipse(|infinity|)"]]),R=new Map([["filter",C],["backdrop-filter",C],["background",k],["background-image",k],["-webkit-mask-image",k],["transform",new Map([["scale","scale(|1.5|)"],["scaleX","scaleX(|1.5|)"],["scaleY","scaleY(|1.5|)"],["scale3d","scale3d(|1.5, 1.5, 1.5|)"],["rotate","rotate(|45deg|)"],["rotateX","rotateX(|45deg|)"],["rotateY","rotateY(|45deg|)"],["rotateZ","rotateZ(|45deg|)"],["rotate3d","rotate3d(|1, 1, 1, 45deg|)"],["skew","skew(|10deg, 10deg|)"],["skewX","skewX(|10deg|)"],["skewY","skewY(|10deg|)"],["translate","translate(|10px, 10px|)"],["translateX","translateX(|10px|)"],["translateY","translateY(|10px|)"],["translateZ","translateZ(|10px|)"],["translate3d","translate3d(|10px, 10px, 10px|)"],["matrix","matrix(|1, 0, 0, 1, 0, 0|)"],["matrix3d","matrix3d(|1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1|)"],["perspective","perspective(|10px|)"]])],["corner-shape",x]]),T=new Set(["background-position","border-spacing","bottom","font-size","height","left","letter-spacing","max-height","max-width","min-height","min-width","right","text-indent","top","width","word-spacing","grid-row-gap","grid-column-gap","row-gap"]),M=new Set(["animation","animation-timing-function","transition","transition-timing-function","-webkit-animation","-webkit-animation-timing-function","-webkit-transition","-webkit-transition-timing-function"]),P=new Set(["font-size","line-height","font-weight","font-family","letter-spacing"]),E=new Set(["accent-color","background","background-color","background-image","border","border-color","border-image","border-image-source","border-bottom","border-bottom-color","border-left","border-left-color","border-right","border-right-color","border-top","border-top-color","border-block","border-block-color","border-block-end","border-block-end-color","border-block-start","border-block-start-color","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-start","border-inline-start-color","box-shadow","caret-color","color","column-rule","column-rule-color","content","fill","list-style-image","mask","mask-image","mask-border","mask-border-source","outline","outline-color","scrollbar-color","stop-color","stroke","text-decoration-color","text-shadow","text-emphasis","text-emphasis-color","-webkit-border-after","-webkit-border-after-color","-webkit-border-before","-webkit-border-before-color","-webkit-border-end","-webkit-border-end-color","-webkit-border-start","-webkit-border-start-color","-webkit-box-reflect","-webkit-box-shadow","-webkit-column-rule-color","-webkit-mask","-webkit-mask-box-image","-webkit-mask-box-image-source","-webkit-mask-image","-webkit-tap-highlight-color","-webkit-text-emphasis","-webkit-text-emphasis-color","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color","flood-color","lighting-color","stop-color"]),L=new Set(["-webkit-border-image","transform","-webkit-transform","rotate","filter","-webkit-filter","backdrop-filter","offset","offset-rotate","font-style"]),A=new Set(["over","under","over right","over left","under right","under left"]),O=new Set(["none","dot","circle","double-circle","triangle","sesame","filled","open","dot open","circle open","double-circle open","triangle open","sesame open",'"❤️"']),D=new Map([["background-repeat",new Set(["repeat","repeat-x","repeat-y","no-repeat","space","round"])],["content",new Set(["normal","close-quote","no-close-quote","no-open-quote","open-quote"])],["baseline-shift",new Set(["baseline"])],["max-height",new Set(["min-content","max-content","-webkit-fill-available","fit-content"])],["color",new Set(["black"])],["background-color",new Set(["white"])],["box-shadow",new Set(["inset"])],["text-shadow",new Set(["0 0 black"])],["-webkit-writing-mode",new Set(["horizontal-tb","vertical-rl","vertical-lr"])],["writing-mode",new Set(["lr","rl","tb","lr-tb","rl-tb","tb-rl"])],["page-break-inside",new Set(["avoid"])],["cursor",new Set(["-webkit-zoom-in","-webkit-zoom-out","-webkit-grab","-webkit-grabbing"])],["border-width",new Set(["medium","thick","thin"])],["border-style",new Set(["hidden","inset","groove","ridge","outset","dotted","dashed","solid","double"])],["size",new Set(["a3","a4","a5","b4","b5","landscape","ledger","legal","letter","portrait"])],["overflow",new Set(["hidden","visible","overlay","scroll"])],["overscroll-behavior",new Set(["contain"])],["text-rendering",new Set(["optimizeSpeed","optimizeLegibility","geometricPrecision"])],["text-align",new Set(["-webkit-auto","-webkit-match-parent"])],["clip-path",new Set(["circle","ellipse","inset","polygon","url"])],["color-interpolation",new Set(["sRGB","linearRGB"])],["word-wrap",new Set(["normal","break-word"])],["font-weight",new Set(["100","200","300","400","500","600","700","800","900"])],["text-emphasis",O],["-webkit-text-emphasis",O],["color-rendering",new Set(["optimizeSpeed","optimizeQuality"])],["-webkit-text-combine",new Set(["horizontal"])],["text-orientation",new Set(["sideways-right"])],["outline",new Set(["inset","groove","ridge","outset","dotted","dashed","solid","double","medium","thick","thin"])],["font",new Set(["caption","icon","menu","message-box","small-caption","-webkit-mini-control","-webkit-small-control","-webkit-control","status-bar"])],["dominant-baseline",new Set(["text-before-edge","text-after-edge","use-script","no-change","reset-size"])],["text-emphasis-position",A],["-webkit-text-emphasis-position",A],["alignment-baseline",new Set(["before-edge","after-edge","text-before-edge","text-after-edge","hanging"])],["page-break-before",new Set(["left","right","always","avoid"])],["border-image",new Set(["repeat","stretch","space","round"])],["text-decoration",new Set(["blink","line-through","overline","underline","wavy","double","solid","dashed","dotted"])],["font-family",new Set(["serif","sans-serif","cursive","fantasy","monospace","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","-webkit-body"])],["zoom",new Set(["normal"])],["max-width",new Set(["min-content","max-content","-webkit-fill-available","fit-content"])],["-webkit-font-smoothing",new Set(["antialiased","subpixel-antialiased"])],["border",new Set(["hidden","inset","groove","ridge","outset","dotted","dashed","solid","double","medium","thick","thin"])],["font-variant",new Set(["small-caps","normal","common-ligatures","no-common-ligatures","discretionary-ligatures","no-discretionary-ligatures","historical-ligatures","no-historical-ligatures","contextual","no-contextual","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions","ordinal","slashed-zero","jis78","jis83","jis90","jis04","simplified","traditional","full-width","proportional-width","ruby"])],["vertical-align",new Set(["top","bottom","-webkit-baseline-middle"])],["page-break-after",new Set(["left","right","always","avoid"])],["text-emphasis-style",O],["-webkit-text-emphasis-style",O],["transform",new Set(["scale","scaleX","scaleY","scale3d","rotate","rotateX","rotateY","rotateZ","rotate3d","skew","skewX","skewY","translate","translateX","translateY","translateZ","translate3d","matrix","matrix3d","perspective"])],["align-content",new Set(["normal","baseline","space-between","space-around","space-evenly","stretch","center","start","end","flex-start","flex-end"])],["justify-content",new Set(["normal","space-between","space-around","space-evenly","stretch","center","start","end","flex-start","flex-end","left","right"])],["place-content",new Set(["normal","space-between","space-around","space-evenly","stretch","center","start","end","flex-start","flex-end","baseline"])],["align-items",new Set(["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","anchor-center"])],["justify-items",new Set(["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","left","right","legacy","anchor-center"])],["place-items",new Set(["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","anchor-center"])],["align-self",new Set(["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","anchor-center"])],["justify-self",new Set(["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","left","right","anchor-center"])],["place-self",new Set(["normal","stretch","baseline","center","start","end","self-start","self-end","flex-start","flex-end","anchor-center"])],["perspective-origin",new Set(["left","center","right","top","bottom"])],["transform-origin",new Set(["left","center","right","top","bottom"])],["transition-timing-function",new Set(["cubic-bezier","steps"])],["animation-timing-function",new Set(["cubic-bezier","steps"])],["-webkit-backface-visibility",new Set(["visible","hidden"])],["-webkit-column-break-after",new Set(["always","avoid"])],["-webkit-column-break-before",new Set(["always","avoid"])],["-webkit-column-break-inside",new Set(["avoid"])],["-webkit-column-span",new Set(["all"])],["-webkit-column-gap",new Set(["normal"])],["filter",new Set(["url","blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","opacity","saturate","sepia"])],["backdrop-filter",new Set(["url","blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","opacity","saturate","sepia"])],["grid-template-columns",new Set(["min-content","max-content"])],["grid-template-rows",new Set(["min-content","max-content"])],["grid-auto-flow",new Set(["dense"])],["background",new Set(["repeat","repeat-x","repeat-y","no-repeat","top","bottom","left","right","center","fixed","local","scroll","space","round","border-box","content-box","padding-box","linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","url"])],["background-image",new Set(["linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","url"])],["background-position",new Set(["top","bottom","left","right","center"])],["background-position-x",new Set(["left","right","center"])],["background-position-y",new Set(["top","bottom","center"])],["background-repeat-x",new Set(["repeat","no-repeat"])],["background-repeat-y",new Set(["repeat","no-repeat"])],["border-bottom",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["border-left",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["border-right",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["border-top",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["buffered-rendering",new Set(["static","dynamic"])],["color-interpolation-filters",new Set(["srgb","linearrgb"])],["column-rule",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["flex-flow",new Set(["nowrap","row","row-reverse","column","column-reverse","wrap","wrap-reverse"])],["height",new Set(["-webkit-fill-available"])],["inline-size",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["list-style",new Set(["outside","inside","disc","circle","square","decimal","decimal-leading-zero","arabic-indic","bengali","cambodian","khmer","devanagari","gujarati","gurmukhi","kannada","lao","malayalam","mongolian","myanmar","oriya","persian","urdu","telugu","tibetan","thai","lower-roman","upper-roman","lower-greek","lower-alpha","lower-latin","upper-alpha","upper-latin","cjk-earthly-branch","cjk-heavenly-stem","ethiopic-halehame","ethiopic-halehame-am","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","hangul","hangul-consonant","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","hebrew","armenian","lower-armenian","upper-armenian","georgian","cjk-ideographic","simp-chinese-formal","simp-chinese-informal","trad-chinese-formal","trad-chinese-informal","hiragana","katakana","hiragana-iroha","katakana-iroha"])],["max-block-size",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["max-inline-size",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["min-block-size",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["min-height",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["min-inline-size",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["min-width",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["object-position",new Set(["top","bottom","left","right","center"])],["shape-outside",new Set(["border-box","content-box","padding-box","margin-box"])],["-webkit-appearance",new Set(["checkbox","radio","push-button","square-button","button","inner-spin-button","listbox","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","menulist","menulist-button","meter","progress-bar","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","searchfield","searchfield-cancel-button","textfield","textarea"])],["-webkit-border-after",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["-webkit-border-after-style",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"])],["-webkit-border-after-width",new Set(["medium","thick","thin"])],["-webkit-border-before",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["-webkit-border-before-style",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"])],["-webkit-border-before-width",new Set(["medium","thick","thin"])],["-webkit-border-end",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["-webkit-border-end-style",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"])],["-webkit-border-end-width",new Set(["medium","thick","thin"])],["-webkit-border-start",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double","medium","thick","thin"])],["-webkit-border-start-style",new Set(["hidden","inset","groove","outset","ridge","dotted","dashed","solid","double"])],["-webkit-border-start-width",new Set(["medium","thick","thin"])],["-webkit-logical-height",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["-webkit-logical-width",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["-webkit-mask-box-image",new Set(["repeat","stretch","space","round"])],["-webkit-mask-box-image-repeat",new Set(["repeat","stretch","space","round"])],["-webkit-mask-clip",new Set(["text","border","border-box","content","content-box","padding","padding-box"])],["-webkit-mask-composite",new Set(["clear","copy","source-over","source-in","source-out","source-atop","destination-over","destination-in","destination-out","destination-atop","xor","plus-lighter"])],["-webkit-mask-image",new Set(["linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","url"])],["-webkit-mask-origin",new Set(["border","border-box","content","content-box","padding","padding-box"])],["-webkit-mask-position",new Set(["top","bottom","left","right","center"])],["-webkit-mask-position-x",new Set(["left","right","center"])],["-webkit-mask-position-y",new Set(["top","bottom","center"])],["-webkit-mask-repeat",new Set(["repeat","repeat-x","repeat-y","no-repeat","space","round"])],["-webkit-mask-size",new Set(["contain","cover"])],["-webkit-max-logical-height",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["-webkit-max-logical-width",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["-webkit-min-logical-height",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["-webkit-min-logical-width",new Set(["-webkit-fill-available","min-content","max-content","fit-content"])],["-webkit-perspective-origin-x",new Set(["left","right","center"])],["-webkit-perspective-origin-y",new Set(["top","bottom","center"])],["-webkit-text-decorations-in-effect",new Set(["blink","line-through","overline","underline"])],["-webkit-text-stroke",new Set(["medium","thick","thin"])],["-webkit-text-stroke-width",new Set(["medium","thick","thin"])],["-webkit-transform-origin-x",new Set(["left","right","center"])],["-webkit-transform-origin-y",new Set(["top","bottom","center"])],["width",new Set(["-webkit-fill-available"])],["contain-intrinsic-width",new Set(["auto none","auto 100px"])],["contain-intrinsic-height",new Set(["auto none","auto 100px"])],["contain-intrinsic-size",new Set(["auto none","auto 100px"])],["contain-intrinsic-inline-size",new Set(["auto none","auto 100px"])],["contain-intrinsic-block-size",new Set(["auto none","auto 100px"])],["white-space",new Set(["normal","pre","pre-wrap","pre-line","nowrap","break-spaces"])],["text-box-edge",new Set(["auto","text","cap","ex","text alphabetic","cap alphabetic","ex alphabetic"])],["corner-shape",new Set(["round","scoop","bevel","notch","straight","squircle","superellipse(0.5)","superellipse(infinity)"])]]),N=new Map([["align-content",57],["align-items",129],["align-self",55],["animation",175],["animation-delay",114],["animation-direction",113],["animation-duration",137],["animation-fill-mode",132],["animation-iteration-count",124],["animation-name",139],["animation-play-state",104],["animation-timing-function",141],["backface-visibility",123],["background",260],["background-attachment",119],["background-clip",165],["background-color",259],["background-image",246],["background-origin",107],["background-position",237],["background-position-x",108],["background-position-y",93],["background-repeat",234],["background-size",203],["border",263],["border-bottom",233],["border-bottom-color",190],["border-bottom-left-radius",186],["border-bottom-right-radius",185],["border-bottom-style",150],["border-bottom-width",179],["border-collapse",209],["border-color",226],["border-image",89],["border-image-outset",50],["border-image-repeat",49],["border-image-slice",58],["border-image-source",32],["border-image-width",52],["border-left",221],["border-left-color",174],["border-left-style",142],["border-left-width",172],["border-radius",224],["border-right",223],["border-right-color",182],["border-right-style",130],["border-right-width",178],["border-spacing",198],["border-style",206],["border-top",231],["border-top-color",192],["border-top-left-radius",187],["border-top-right-radius",189],["border-top-style",152],["border-top-width",180],["border-width",214],["bottom",227],["box-shadow",213],["box-sizing",216],["caption-side",96],["clear",229],["clip",173],["clip-rule",5],["color",256],["content",219],["counter-increment",111],["counter-reset",110],["cursor",250],["direction",176],["display",262],["empty-cells",99],["fill",140],["fill-opacity",82],["fill-rule",22],["filter",160],["flex",133],["flex-basis",66],["flex-direction",85],["flex-flow",94],["flex-grow",112],["flex-shrink",61],["flex-wrap",68],["float",252],["font",211],["font-family",254],["font-kerning",18],["font-size",264],["font-stretch",77],["font-style",220],["font-variant",161],["font-weight",257],["height",266],["image-rendering",90],["justify-content",127],["left",248],["letter-spacing",188],["line-height",244],["list-style",215],["list-style-image",145],["list-style-position",149],["list-style-type",199],["margin",267],["margin-bottom",241],["margin-left",243],["margin-right",238],["margin-top",253],["mask",20],["max-height",205],["max-width",225],["min-height",217],["min-width",218],["object-fit",33],["opacity",251],["order",117],["orphans",146],["outline",222],["outline-color",153],["outline-offset",147],["outline-style",151],["outline-width",148],["overflow",255],["overflow-wrap",105],["overflow-x",184],["overflow-y",196],["padding",265],["padding-bottom",230],["padding-left",235],["padding-right",232],["padding-top",240],["page",8],["page-break-after",120],["page-break-before",69],["page-break-inside",121],["perspective",92],["perspective-origin",103],["pointer-events",183],["position",261],["quotes",158],["resize",168],["right",245],["shape-rendering",38],["size",64],["speak",118],["src",170],["stop-color",42],["stop-opacity",31],["stroke",98],["stroke-dasharray",36],["stroke-dashoffset",3],["stroke-linecap",30],["stroke-linejoin",21],["stroke-miterlimit",12],["stroke-opacity",34],["stroke-width",87],["table-layout",171],["tab-size",46],["text-align",260],["text-anchor",35],["text-decoration",247],["text-indent",207],["text-overflow",204],["text-rendering",155],["text-shadow",208],["text-transform",202],["top",258],["touch-action",80],["transform",181],["transform-origin",162],["transform-style",86],["transition",193],["transition-delay",134],["transition-duration",135],["transition-property",131],["transition-timing-function",122],["unicode-bidi",156],["unicode-range",136],["vertical-align",236],["visibility",242],["-webkit-appearance",191],["-webkit-backface-visibility",154],["-webkit-background-clip",164],["-webkit-background-origin",40],["-webkit-background-size",163],["-webkit-border-end",9],["-webkit-border-horizontal-spacing",81],["-webkit-border-image",75],["-webkit-border-radius",212],["-webkit-border-start",10],["-webkit-border-start-color",16],["-webkit-border-start-width",13],["-webkit-border-vertical-spacing",43],["-webkit-box-align",101],["-webkit-box-direction",51],["-webkit-box-flex",128],["-webkit-box-ordinal-group",91],["-webkit-box-orient",144],["-webkit-box-pack",106],["-webkit-box-reflect",39],["-webkit-box-shadow",210],["-webkit-column-break-inside",60],["-webkit-column-count",84],["-webkit-column-gap",76],["-webkit-column-rule",25],["-webkit-column-rule-color",23],["-webkit-columns",44],["-webkit-column-span",29],["-webkit-column-width",47],["-webkit-filter",159],["-webkit-font-feature-settings",59],["-webkit-font-smoothing",177],["-webkit-line-break",45],["-webkit-line-clamp",126],["-webkit-margin-after",67],["-webkit-margin-before",70],["-webkit-margin-collapse",14],["-webkit-margin-end",65],["-webkit-margin-start",100],["-webkit-mask",19],["-webkit-mask-box-image",72],["-webkit-mask-image",88],["-webkit-mask-position",54],["-webkit-mask-repeat",63],["-webkit-mask-size",79],["-webkit-padding-after",15],["-webkit-padding-before",28],["-webkit-padding-end",48],["-webkit-padding-start",73],["-webkit-print-color-adjust",83],["-webkit-rtl-ordering",7],["-webkit-tap-highlight-color",169],["-webkit-text-emphasis-color",11],["-webkit-text-fill-color",71],["-webkit-text-security",17],["-webkit-text-stroke",56],["-webkit-text-stroke-color",37],["-webkit-text-stroke-width",53],["-webkit-user-drag",95],["-webkit-user-modify",62],["-webkit-user-select",194],["-webkit-writing-mode",4],["white-space",228],["widows",115],["width",268],["will-change",74],["word-break",166],["word-spacing",157],["word-wrap",197],["writing-mode",41],["z-index",239],["zoom",200]]),F=["auto","none"];var B=Object.freeze({__proto__:null,CSSMetadata:f,CSSWideKeywords:y,CubicBezierKeywordValues:b,CustomVariableRegex:/(var\(*--[\w\d]+-([\w]+-[\w]+)\))/g,GridAreaRowRegex:I,PositionTryOrderKeywords:v,URLRegex:/url\(\s*('.+?'|".+?"|[^)]+)\s*\)/g,VariableNameRegex:/(\s*--.*?)/gs,VariableRegex:/(var\(\s*--.*?\))/gs,cssMetadata:S});const _="";class H{#h;#u;#g;#p=new Map;#m=0;#f;#b=null;#y;constructor(e,t,n,r,s){this.#h=e,this.#u=t,this.#g=n,this.#f=r||"Medium",this.#y=s}static fromProtocolCookie(e){const t=new H(e.name,e.value,null,e.priority);return t.addAttribute("domain",e.domain),t.addAttribute("path",e.path),e.expires&&t.addAttribute("expires",1e3*e.expires),e.httpOnly&&t.addAttribute("http-only"),e.secure&&t.addAttribute("secure"),e.sameSite&&t.addAttribute("same-site",e.sameSite),"sourcePort"in e&&t.addAttribute("source-port",e.sourcePort),"sourceScheme"in e&&t.addAttribute("source-scheme",e.sourceScheme),"partitionKey"in e&&e.partitionKey&&t.setPartitionKey(e.partitionKey.topLevelSite,e.partitionKey.hasCrossSiteAncestor),"partitionKeyOpaque"in e&&e.partitionKeyOpaque&&t.addAttribute("partition-key",_),t.setSize(e.size),t}key(){return(this.domain()||"-")+" "+this.name()+" "+(this.path()||"-")+" "+(this.partitionKey()?this.topLevelSite()+" "+(this.hasCrossSiteAncestor()?"cross_site":"same_site"):"-")}name(){return this.#h}value(){return this.#u}type(){return this.#g}httpOnly(){return this.#p.has("http-only")}secure(){return this.#p.has("secure")}partitioned(){return this.#p.has("partitioned")||Boolean(this.partitionKey())||this.partitionKeyOpaque()}sameSite(){return this.#p.get("same-site")}partitionKey(){return this.#y}setPartitionKey(e,t){this.#y={topLevelSite:e,hasCrossSiteAncestor:t},this.#p.has("partitioned")||this.addAttribute("partitioned")}topLevelSite(){return this.#y?this.#y?.topLevelSite:""}setTopLevelSite(e,t){this.setPartitionKey(e,t)}hasCrossSiteAncestor(){return!!this.#y&&this.#y?.hasCrossSiteAncestor}setHasCrossSiteAncestor(e){this.partitionKey()&&Boolean(this.topLevelSite())&&this.setPartitionKey(this.topLevelSite(),e)}partitionKeyOpaque(){return!!this.#y&&this.topLevelSite()===_}setPartitionKeyOpaque(){this.addAttribute("partition-key",_),this.setPartitionKey(_,!1)}priority(){return this.#f}session(){return!(this.#p.has("expires")||this.#p.has("max-age"))}path(){return this.#p.get("path")}domain(){return this.#p.get("domain")}expires(){return this.#p.get("expires")}maxAge(){return this.#p.get("max-age")}sourcePort(){return this.#p.get("source-port")}sourceScheme(){return this.#p.get("source-scheme")}size(){return this.#m}url(){if(!this.domain()||!this.path())return null;let e="";const t=this.sourcePort();return t&&80!==t&&443!==t&&(e=`:${this.sourcePort()}`),(this.secure()?"https://":"http://")+this.domain()+e+this.path()}setSize(e){this.#m=e}expiresDate(e){return this.maxAge()?new Date(e.getTime()+1e3*this.maxAge()):this.expires()?new Date(this.expires()):null}addAttribute(e,t){if(e)if("priority"===e)this.#f=t;else this.#p.set(e,t)}hasAttribute(e){return this.#p.has(e)}getAttribute(e){return this.#p.get(e)}setCookieLine(e){this.#b=e}getCookieLine(){return this.#b}matchesSecurityOrigin(e){const t=new URL(e).hostname;return H.isDomainMatch(this.domain(),t)}static isDomainMatch(e,t){return t===e||!(!e||"."!==e[0])&&(e.substr(1)===t||t.length>e.length&&t.endsWith(e))}}var U,q=Object.freeze({__proto__:null,Cookie:H});class z extends l.InspectorBackend.TargetBase{#v;#h;#I=r.DevToolsPath.EmptyUrlString;#w="";#S;#g;#k;#C;#x=new Map;#R;#T=!1;#M;#P;constructor(t,n,r,s,i,o,a,l,d){switch(super(s===U.NODE,i,o,l),this.#v=t,this.#h=r,this.#S=0,s){case U.FRAME:this.#S=1027519,i?.type()!==U.FRAME&&(this.#S|=21056,e.ParsedURL.schemeIs(d?.url,"chrome-extension:")&&(this.#S&=-513));break;case U.ServiceWorker:this.#S=657468,i?.type()!==U.FRAME&&(this.#S|=1);break;case U.SHARED_WORKER:this.#S=919612;break;case U.SHARED_STORAGE_WORKLET:this.#S=526348;break;case U.Worker:this.#S=917820;break;case U.WORKLET:this.#S=524316;break;case U.NODE:this.#S=20;break;case U.AUCTION_WORKLET:this.#S=524292;break;case U.BROWSER:this.#S=131104;break;case U.TAB:this.#S=160}this.#g=s,this.#k=i,this.#C=n,this.#R=a,this.#M=d}createModels(e){this.#P=!0;const t=Array.from(h.registeredModels.entries());for(const[e,n]of t)n.early&&this.model(e);for(const[n,r]of t)(r.autostart||e.has(n))&&this.model(n);this.#P=!1}id(){return this.#C}name(){return this.#h||this.#w}setName(e){this.#h!==e&&(this.#h=e,this.#v.onNameChange(this))}type(){return this.#g}markAsNodeJSForTest(){super.markAsNodeJSForTest(),this.#g=U.NODE}targetManager(){return this.#v}hasAllCapabilities(e){return(this.#S&e)===e}decorateLabel(e){return this.#g===U.Worker||this.#g===U.ServiceWorker?"⚙ "+e:e}parentTarget(){return this.#k}outermostTarget(){let e=null,t=this;do{t.type()!==U.TAB&&t.type()!==U.BROWSER&&(e=t),t=t.parentTarget()}while(t);return e}dispose(e){super.dispose(e),this.#v.removeTarget(this);for(const e of this.#x.values())e.dispose()}model(e){if(!this.#x.get(e)){const t=h.registeredModels.get(e);if(void 0===t)throw new Error("Model class is not registered");if((this.#S&t.capabilities)===t.capabilities){const t=new e(this);this.#x.set(e,t),this.#P||this.#v.modelAdded(this,e,t,this.#v.isInScope(this))}}return this.#x.get(e)||null}models(){return this.#x}inspectedURL(){return this.#I}setInspectedURL(t){this.#I=t;const n=e.ParsedURL.ParsedURL.fromString(t);this.#w=n?n.lastPathComponentWithFragment():"#"+this.#C,this.#v.onInspectedURLChange(this),this.#h||this.#v.onNameChange(this)}hasCrashed(){return this.#T}setHasCrashed(e){const t=this.#T;this.#T=e,t&&!e&&this.resume()}async suspend(e){this.#R||(this.#R=!0,this.#T||(await Promise.all(Array.from(this.models().values(),(t=>t.preSuspendModel(e)))),await Promise.all(Array.from(this.models().values(),(t=>t.suspendModel(e))))))}async resume(){this.#R&&(this.#R=!1,this.#T||(await Promise.all(Array.from(this.models().values(),(e=>e.resumeModel()))),await Promise.all(Array.from(this.models().values(),(e=>e.postResumeModel())))))}suspended(){return this.#R}updateTargetInfo(e){this.#M=e}targetInfo(){return this.#M}}!function(e){e.FRAME="frame",e.ServiceWorker="service-worker",e.Worker="worker",e.SHARED_WORKER="shared-worker",e.SHARED_STORAGE_WORKLET="shared-storage-worklet",e.NODE="node",e.BROWSER="browser",e.AUCTION_WORKLET="auction-worklet",e.WORKLET="worklet",e.TAB="tab"}(U||(U={}));var j=Object.freeze({__proto__:null,Target:z,get Type(){return U}});let V;class W extends e.ObjectWrapper.ObjectWrapper{#E;#L;#A;#O;#D;#R;#N;#F;#B;#_;constructor(){super(),this.#E=new Set,this.#L=new Set,this.#A=new r.MapUtilities.Multimap,this.#O=new r.MapUtilities.Multimap,this.#R=!1,this.#N=null,this.#F=null,this.#D=new WeakSet,this.#B=!1,this.#_=new Set}static instance({forceNew:e}={forceNew:!1}){return V&&!e||(V=new W),V}static removeInstance(){V=void 0}onInspectedURLChange(e){e===this.#F&&(a.InspectorFrontendHost.InspectorFrontendHostInstance.inspectedURLChanged(e.inspectedURL()||r.DevToolsPath.EmptyUrlString),this.dispatchEventToListeners("InspectedURLChanged",e))}onNameChange(e){this.dispatchEventToListeners("NameChanged",e)}async suspendAllTargets(e){if(this.#R)return;this.#R=!0,this.dispatchEventToListeners("SuspendStateChanged");const t=Array.from(this.#E.values(),(t=>t.suspend(e)));await Promise.all(t)}async resumeAllTargets(){if(!this.#R)return;this.#R=!1,this.dispatchEventToListeners("SuspendStateChanged");const e=Array.from(this.#E.values(),(e=>e.resume()));await Promise.all(e)}allTargetsSuspended(){return this.#R}models(e,t){const n=[];for(const r of this.#E){if(t?.scoped&&!this.isInScope(r))continue;const s=r.model(e);s&&n.push(s)}return n}inspectedURL(){const e=this.primaryPageTarget();return e?e.inspectedURL():""}observeModels(e,t,n){const r=this.models(e,n);this.#O.set(e,t),n?.scoped&&this.#D.add(t);for(const e of r)t.modelAdded(e)}unobserveModels(e,t){this.#O.delete(e,t),this.#D.delete(t)}modelAdded(e,t,n,r){for(const e of this.#O.get(t).values())this.#D.has(e)&&!r||e.modelAdded(n)}modelRemoved(e,t,n,r){for(const e of this.#O.get(t).values())this.#D.has(e)&&!r||e.modelRemoved(n)}addModelListener(e,t,n,r,s){const i=e=>{s?.scoped&&!this.isInScope(e)||n.call(r,e)};for(const n of this.models(e))n.addEventListener(t,i);this.#A.set(t,{modelClass:e,thisObject:r,listener:n,wrappedListener:i})}removeModelListener(e,t,n,r){if(!this.#A.has(t))return;let s=null;for(const i of this.#A.get(t))i.modelClass===e&&i.listener===n&&i.thisObject===r&&(s=i.wrappedListener,this.#A.delete(t,i));if(s)for(const n of this.models(e))n.removeEventListener(t,s)}observeTargets(e,t){if(this.#L.has(e))throw new Error("Observer can only be registered once");t?.scoped&&this.#D.add(e);for(const n of this.#E)t?.scoped&&!this.isInScope(n)||e.targetAdded(n);this.#L.add(e)}unobserveTargets(e){this.#L.delete(e),this.#D.delete(e)}createTarget(e,t,n,r,s,i,o,a){const l=new z(this,e,t,n,r,s||"",this.#R,o||null,a);i&&l.pageAgent().invoke_waitForDebugger(),l.createModels(new Set(this.#O.keysArray())),this.#E.add(l);const d=this.isInScope(l);for(const e of[...this.#L])this.#D.has(e)&&!d||e.targetAdded(l);for(const[e,t]of l.models().entries())this.modelAdded(l,e,t,d);for(const e of this.#A.keysArray())for(const t of this.#A.get(e)){const n=l.model(t.modelClass);n&&n.addEventListener(e,t.wrappedListener)}return l!==l.outermostTarget()||l.type()===U.FRAME&&l!==this.primaryPageTarget()||this.#B||this.setScopeTarget(l),l}removeTarget(e){if(!this.#E.has(e))return;const t=this.isInScope(e);this.#E.delete(e);for(const n of e.models().keys()){const r=e.models().get(n);s(r),this.modelRemoved(e,n,r,t)}for(const n of[...this.#L])this.#D.has(n)&&!t||n.targetRemoved(e);for(const t of this.#A.keysArray())for(const n of this.#A.get(t)){const r=e.model(n.modelClass);r&&r.removeEventListener(t,n.wrappedListener)}}targets(){return[...this.#E]}targetById(e){return this.targets().find((t=>t.id()===e))||null}rootTarget(){return 0===this.#E.size?null:this.#E.values().next().value??null}primaryPageTarget(){let e=this.rootTarget();return e?.type()===U.TAB&&(e=this.targets().find((t=>t.parentTarget()===e&&t.type()===U.FRAME&&!t.targetInfo()?.subtype?.length))||null),e}browserTarget(){return this.#N}async maybeAttachInitialTarget(){if(!Boolean(o.Runtime.Runtime.queryParam("browserConnection")))return!1;this.#N||(this.#N=new z(this,"main","browser",U.BROWSER,null,"",!1,null,void 0),this.#N.createModels(new Set(this.#O.keysArray())));const e=await a.InspectorFrontendHost.InspectorFrontendHostInstance.initialTargetId();return this.#N.targetAgent().invoke_autoAttachRelated({targetId:e,waitForDebuggerOnStart:!0}),!0}clearAllTargetsForTest(){this.#E.clear()}isInScope(e){if(!e)return!1;for(function(e){return"source"in e&&e.source instanceof h}(e)&&(e=e.source),e instanceof h&&(e=e.target());e&&e!==this.#F;)e=e.parentTarget();return Boolean(e)&&e===this.#F}setScopeTarget(e){if(e!==this.#F){for(const e of this.targets())if(this.isInScope(e)){for(const t of this.#O.keysArray()){const n=e.models().get(t);if(n)for(const e of[...this.#O.get(t)].filter((e=>this.#D.has(e))))e.modelRemoved(n)}for(const t of[...this.#L].filter((e=>this.#D.has(e))))t.targetRemoved(e)}this.#F=e;for(const e of this.targets())if(this.isInScope(e)){for(const t of[...this.#L].filter((e=>this.#D.has(e))))t.targetAdded(e);for(const[t,n]of e.models().entries())for(const e of[...this.#O.get(t)].filter((e=>this.#D.has(e))))e.modelAdded(n)}for(const e of this.#_)e();e&&e.inspectedURL()&&this.onInspectedURLChange(e)}}addScopeChangeListener(e){this.#_.add(e)}scopeTarget(){return this.#F}}var G=Object.freeze({__proto__:null,Observer:class{targetAdded(e){}targetRemoved(e){}},SDKModelObserver:class{modelAdded(e){}modelRemoved(e){}},TargetManager:W});const K={noContentForWebSocket:"Content for WebSockets is currently not supported",noContentForRedirect:"No content available because this request was redirected",noContentForPreflight:"No content available for preflight request",noThrottling:"No throttling",offline:"Offline",slowG:"3G",fastG:"Slow 4G",fast4G:"Fast 4G",requestWasBlockedByDevtoolsS:'Request was blocked by DevTools: "{PH1}"',sFailedLoadingSS:'{PH1} failed loading: {PH2} "{PH3}".',sFinishedLoadingSS:'{PH1} finished loading: {PH2} "{PH3}".',directSocketStatusOpening:"Opening",directSocketStatusOpen:"Open",directSocketStatusClosed:"Closed",directSocketStatusAborted:"Aborted"},Q=n.i18n.registerUIStrings("core/sdk/NetworkManager.ts",K),$=n.i18n.getLocalizedString.bind(void 0,Q),X=n.i18n.getLazilyComputedLocalizedString.bind(void 0,Q),J=new WeakMap,Y=new Map([["2g","cellular2g"],["3g","cellular3g"],["4g","cellular4g"],["bluetooth","bluetooth"],["wifi","wifi"],["wimax","wimax"]]);class Z extends h{dispatcher;fetchDispatcher;#H;#U;constructor(t){super(t),this.dispatcher=new le(this),this.fetchDispatcher=new ae(t.fetchAgent(),this),this.#H=t.networkAgent(),t.registerNetworkDispatcher(this.dispatcher),t.registerFetchDispatcher(this.fetchDispatcher),e.Settings.Settings.instance().moduleSetting("cache-disabled").get()&&this.#H.invoke_setCacheDisabled({cacheDisabled:!0}),o.Runtime.hostConfig.devToolsPrivacyUI?.enabled&&!0!==o.Runtime.hostConfig.thirdPartyCookieControls?.managedBlockThirdPartyCookies&&(e.Settings.Settings.instance().createSetting("cookie-control-override-enabled",void 0).get()||e.Settings.Settings.instance().createSetting("grace-period-mitigation-disabled",void 0).get()||e.Settings.Settings.instance().createSetting("heuristic-mitigation-disabled",void 0).get())&&this.cookieControlFlagsSettingChanged(),this.#H.invoke_enable({maxPostDataSize:oe}),this.#H.invoke_setAttachDebugStack({enabled:!0}),this.#U=e.Settings.Settings.instance().createSetting("bypass-service-worker",!1),this.#U.get()&&this.bypassServiceWorkerChanged(),this.#U.addChangeListener(this.bypassServiceWorkerChanged,this),e.Settings.Settings.instance().moduleSetting("cache-disabled").addChangeListener(this.cacheDisabledSettingChanged,this),e.Settings.Settings.instance().createSetting("cookie-control-override-enabled",void 0).addChangeListener(this.cookieControlFlagsSettingChanged,this),e.Settings.Settings.instance().createSetting("grace-period-mitigation-disabled",void 0).addChangeListener(this.cookieControlFlagsSettingChanged,this),e.Settings.Settings.instance().createSetting("heuristic-mitigation-disabled",void 0).addChangeListener(this.cookieControlFlagsSettingChanged,this)}static forRequest(e){return J.get(e)||null}static canReplayRequest(t){return Boolean(J.get(t))&&Boolean(t.backendRequestId())&&!t.isRedirect()&&t.resourceType()===e.ResourceType.resourceTypes.XHR}static replayRequest(e){const t=J.get(e),n=e.backendRequestId();t&&n&&!e.isRedirect()&&t.#H.invoke_replayXHR({requestId:n})}static async searchInRequest(e,n,r,s){const i=Z.forRequest(e),o=e.backendRequestId();if(!i||!o||e.isRedirect())return[];const a=await i.#H.invoke_searchInResponseBody({requestId:o,query:n,caseSensitive:r,isRegex:s});return t.TextUtils.performSearchInSearchMatches(a.result||[],n,r,s)}static async requestContentData(n){if(n.resourceType()===e.ResourceType.resourceTypes.WebSocket)return{error:$(K.noContentForWebSocket)};if(n.finished||await n.once(Ti.FINISHED_LOADING),n.isRedirect())return{error:$(K.noContentForRedirect)};if(n.isPreflightRequest())return{error:$(K.noContentForPreflight)};const r=Z.forRequest(n);if(!r)return{error:"No network manager for request"};const s=n.backendRequestId();if(!s)return{error:"No backend request id for request"};const i=await r.#H.invoke_getResponseBody({requestId:s}),o=i.getError();return o?{error:o}:new t.ContentData.ContentData(i.body,i.base64Encoded,n.mimeType,n.charset()??void 0)}static async streamResponseBody(e){if(e.finished)return{error:"Streaming the response body is only available for in-flight requests."};const n=Z.forRequest(e);if(!n)return{error:"No network manager for request"};const r=e.backendRequestId();if(!r)return{error:"No backend request id for request"};const s=await n.#H.invoke_streamResourceContent({requestId:r}),i=s.getError();return i?{error:i}:(await e.waitForResponseReceived(),new t.ContentData.ContentData(s.bufferedData,!0,e.mimeType,e.charset()??void 0))}static async requestPostData(e){const t=Z.forRequest(e);if(!t)return console.error("No network manager for request"),null;const n=e.backendRequestId();if(!n)return console.error("No backend request id for request"),null;try{const{postData:e}=await t.#H.invoke_getRequestPostData({requestId:n});return e}catch(e){return e.message}}static connectionType(e){if(!e.download&&!e.upload)return"none";try{const t="function"==typeof e.title?e.title().toLowerCase():e.title.toLowerCase();for(const[e,n]of Y)if(t.includes(e))return n}catch{return"none"}return"other"}static lowercaseHeaders(e){const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}requestForURL(e){return this.dispatcher.requestForURL(e)}requestForId(e){return this.dispatcher.requestForId(e)}requestForLoaderId(e){return this.dispatcher.requestForLoaderId(e)}cacheDisabledSettingChanged({data:e}){this.#H.invoke_setCacheDisabled({cacheDisabled:e})}cookieControlFlagsSettingChanged(){const t=Boolean(e.Settings.Settings.instance().createSetting("cookie-control-override-enabled",void 0).get()),n=!!t&&Boolean(e.Settings.Settings.instance().createSetting("grace-period-mitigation-disabled",void 0).get()),r=!!t&&Boolean(e.Settings.Settings.instance().createSetting("heuristic-mitigation-disabled",void 0).get());this.#H.invoke_setCookieControls({enableThirdPartyCookieRestriction:t,disableThirdPartyCookieMetadata:n,disableThirdPartyCookieHeuristics:r})}dispose(){e.Settings.Settings.instance().moduleSetting("cache-disabled").removeChangeListener(this.cacheDisabledSettingChanged,this)}bypassServiceWorkerChanged(){this.#H.invoke_setBypassServiceWorker({bypass:this.#U.get()})}async getSecurityIsolationStatus(e){const t=await this.#H.invoke_getSecurityIsolationStatus({frameId:e??void 0});return t.getError()?null:t.status}async enableReportingApi(e=!0){return await this.#H.invoke_enableReportingApi({enable:e})}async loadNetworkResource(e,t,n){const r=await this.#H.invoke_loadNetworkResource({frameId:e??void 0,url:t,options:n});if(r.getError())throw new Error(r.getError());return r.resource}clearRequests(){this.dispatcher.clearRequests()}}var ee;!function(e){e.RequestStarted="RequestStarted",e.RequestUpdated="RequestUpdated",e.RequestFinished="RequestFinished",e.RequestUpdateDropped="RequestUpdateDropped",e.ResponseReceived="ResponseReceived",e.MessageGenerated="MessageGenerated",e.RequestRedirected="RequestRedirected",e.LoadingFinished="LoadingFinished",e.ReportingApiReportAdded="ReportingApiReportAdded",e.ReportingApiReportUpdated="ReportingApiReportUpdated",e.ReportingApiEndpointsChangedForOrigin="ReportingApiEndpointsChangedForOrigin"}(ee||(ee={}));const te={title:X(K.noThrottling),i18nTitleKey:K.noThrottling,download:-1,upload:-1,latency:0},ne={title:X(K.offline),i18nTitleKey:K.offline,download:0,upload:0,latency:0},re={title:X(K.slowG),i18nTitleKey:K.slowG,download:5e4,upload:5e4,latency:2e3,targetLatency:400},se={title:X(K.fastG),i18nTitleKey:K.fastG,download:18e4,upload:84375,latency:562.5,targetLatency:150},ie={title:X(K.fast4G),i18nTitleKey:K.fast4G,download:1012500,upload:168750,latency:165,targetLatency:60},oe=65536;class ae{#q;#z;constructor(e,t){this.#q=e,this.#z=t}requestPaused({requestId:e,request:t,resourceType:n,responseStatusCode:r,responseHeaders:s,networkId:i}){const o=i?this.#z.requestForId(i):null;0===o?.originalResponseHeaders.length&&s&&(o.originalResponseHeaders=s),ce.instance().requestIntercepted(new he(this.#q,t,n,e,o,r,s))}authRequired({}){}}class le{#z;#j=new Map;#V=new Map;#W=new Map;#G=new Map;#K=new Map;constructor(e){this.#z=e,ce.instance().addEventListener("RequestIntercepted",this.#Q.bind(this))}#Q(e){const t=this.requestForId(e.data);t&&t.setWasIntercepted(!0)}headersMapToHeadersArray(e){const t=[];for(const n in e){const r=e[n].split("\n");for(let e=0;e=0&&t.setTransferSize(n.encodedDataLength),n.requestHeaders&&!t.hasExtraRequestInfo()&&(t.setRequestHeaders(this.headersMapToHeadersArray(n.requestHeaders)),t.setRequestHeadersText(n.requestHeadersText||"")),t.connectionReused=n.connectionReused,t.connectionId=String(n.connectionId),n.remoteIPAddress&&t.setRemoteAddress(n.remoteIPAddress,n.remotePort||-1),n.fromServiceWorker&&(t.fetchedViaServiceWorker=!0),n.fromDiskCache&&t.setFromDiskCache(),n.fromPrefetchCache&&t.setFromPrefetchCache(),n.fromEarlyHints&&t.setFromEarlyHints(),n.cacheStorageCacheName&&t.setResponseCacheStorageCacheName(n.cacheStorageCacheName),n.serviceWorkerRouterInfo&&(t.serviceWorkerRouterInfo=n.serviceWorkerRouterInfo),n.responseTime&&t.setResponseRetrievalTime(new Date(n.responseTime)),t.timing=n.timing,t.protocol=n.protocol||"",t.alternateProtocolUsage=n.alternateProtocolUsage,n.serviceWorkerResponseSource&&t.setServiceWorkerResponseSource(n.serviceWorkerResponseSource),t.setSecurityState(n.securityState),n.securityDetails&&t.setSecurityDetails(n.securityDetails);const r=e.ResourceType.ResourceType.fromMimeTypeOverride(t.mimeType);r&&t.setResourceType(r),t.responseReceivedPromiseResolve?t.responseReceivedPromiseResolve():t.responseReceivedPromise=Promise.resolve()}requestForId(e){return this.#j.get(e)||null}requestForURL(e){return this.#V.get(e)||null}requestForLoaderId(e){return this.#W.get(e)||null}resourceChangedPriority({requestId:e,newPriority:t}){const n=this.#j.get(e);n&&n.setPriority(t)}signedExchangeReceived({requestId:t,info:n}){let r=this.#j.get(t);(r||(r=this.#V.get(n.outerResponse.url),r))&&(r.setSignedExchangeInfo(n),r.setResourceType(e.ResourceType.resourceTypes.SignedExchange),this.updateNetworkRequestWithResponse(r,n.outerResponse),this.updateNetworkRequest(r),this.#z.dispatchEventToListeners(ee.ResponseReceived,{request:r,response:n.outerResponse}))}requestWillBeSent({requestId:t,loaderId:n,documentURL:r,request:s,timestamp:i,wallTime:o,initiator:a,redirectResponse:l,type:d,frameId:c,hasUserGesture:h}){let u=this.#j.get(t);if(u){if(!l)return;u.signedExchangeInfo()||this.responseReceived({requestId:t,loaderId:n,timestamp:i,type:d||"Other",response:l,hasExtraInfo:!1,frameId:c}),u=this.appendRedirect(t,i,s.url),this.#z.dispatchEventToListeners(ee.RequestRedirected,u)}else u=Ri.create(t,s.url,r,c??null,n,a,h),J.set(u,this.#z);u.hasNetworkData=!0,this.updateNetworkRequestWithRequest(u,s),u.setIssueTime(i,o),u.setResourceType(d?e.ResourceType.resourceTypes[d]:e.ResourceType.resourceTypes.Other),s.trustTokenParams&&u.setTrustTokenParams(s.trustTokenParams);const g=this.#K.get(t);g&&(u.setTrustTokenOperationDoneEvent(g),this.#K.delete(t)),this.getExtraInfoBuilder(t).addRequest(u),this.startNetworkRequest(u,s)}requestServedFromCache({requestId:e}){const t=this.#j.get(e);t&&t.setFromMemoryCache()}responseReceived({requestId:t,loaderId:n,timestamp:r,type:s,response:i,frameId:o}){const a=this.#j.get(t),l=Z.lowercaseHeaders(i.headers);if(a)a.responseReceivedTime=r,a.setResourceType(e.ResourceType.resourceTypes[s]),this.updateNetworkRequestWithResponse(a,i),this.updateNetworkRequest(a),this.#z.dispatchEventToListeners(ee.ResponseReceived,{request:a,response:i});else{const e=l["last-modified"],t={url:i.url,frameId:o??null,loaderId:n,resourceType:s,mimeType:i.mimeType,lastModified:e?new Date(e):null};this.#z.dispatchEventToListeners(ee.RequestUpdateDropped,t)}}dataReceived(e){let t=this.#j.get(e.requestId);t||(t=this.maybeAdoptMainResourceRequest(e.requestId)),t&&(t.addDataReceivedEvent(e),this.updateNetworkRequest(t))}loadingFinished({requestId:e,timestamp:t,encodedDataLength:n}){let r=this.#j.get(e);r||(r=this.maybeAdoptMainResourceRequest(e)),r&&(this.getExtraInfoBuilder(e).finished(),this.finishNetworkRequest(r,t,n),this.#z.dispatchEventToListeners(ee.LoadingFinished,r))}loadingFailed({requestId:t,timestamp:n,type:r,errorText:s,canceled:i,blockedReason:o,corsErrorStatus:a}){const l=this.#j.get(t);if(l){if(l.failed=!0,l.setResourceType(e.ResourceType.resourceTypes[r]),l.canceled=Boolean(i),o&&(l.setBlockedReason(o),"inspector"===o)){const e=$(K.requestWasBlockedByDevtoolsS,{PH1:l.url()});this.#z.dispatchEventToListeners(ee.MessageGenerated,{message:e,requestId:t,warning:!0})}a&&l.setCorsErrorStatus(a),l.localizedFailDescription=s,this.getExtraInfoBuilder(t).finished(),this.finishNetworkRequest(l,n,-1)}}webSocketCreated({requestId:t,url:n,initiator:r}){const s=Ri.createForWebSocket(t,n,r);J.set(s,this.#z),s.setResourceType(e.ResourceType.resourceTypes.WebSocket),this.startNetworkRequest(s,null)}webSocketWillSendHandshakeRequest({requestId:e,timestamp:t,wallTime:n,request:r}){const s=this.#j.get(e);s&&(s.requestMethod="GET",s.setRequestHeaders(this.headersMapToHeadersArray(r.headers)),s.setIssueTime(t,n),this.updateNetworkRequest(s))}webSocketHandshakeResponseReceived({requestId:e,timestamp:t,response:n}){const r=this.#j.get(e);r&&(r.statusCode=n.status,r.statusText=n.statusText,r.responseHeaders=this.headersMapToHeadersArray(n.headers),r.responseHeadersText=n.headersText||"",n.requestHeaders&&r.setRequestHeaders(this.headersMapToHeadersArray(n.requestHeaders)),n.requestHeadersText&&r.setRequestHeadersText(n.requestHeadersText),r.responseReceivedTime=t,r.protocol="websocket",this.updateNetworkRequest(r))}webSocketFrameReceived({requestId:e,timestamp:t,response:n}){const r=this.#j.get(e);r&&(r.addProtocolFrame(n,t,!1),r.responseReceivedTime=t,this.updateNetworkRequest(r))}webSocketFrameSent({requestId:e,timestamp:t,response:n}){const r=this.#j.get(e);r&&(r.addProtocolFrame(n,t,!0),r.responseReceivedTime=t,this.updateNetworkRequest(r))}webSocketFrameError({requestId:e,timestamp:t,errorMessage:n}){const r=this.#j.get(e);r&&(r.addProtocolFrameError(n,t),r.responseReceivedTime=t,this.updateNetworkRequest(r))}webSocketClosed({requestId:e,timestamp:t}){const n=this.#j.get(e);n&&this.finishNetworkRequest(n,t,-1)}eventSourceMessageReceived({requestId:e,timestamp:t,eventName:n,eventId:r,data:s}){const i=this.#j.get(e);i&&i.addEventSourceMessage(t,n,r,s)}requestIntercepted({}){}requestWillBeSentExtraInfo({requestId:e,associatedCookies:t,headers:n,clientSecurityState:r,connectTiming:s,siteHasCookieInOtherPartition:i}){const o=[],a=[];for(const{blockedReasons:e,exemptionReason:n,cookie:r}of t)0===e.length?a.push({exemptionReason:n,cookie:H.fromProtocolCookie(r)}):o.push({blockedReasons:e,cookie:H.fromProtocolCookie(r)});const l={blockedRequestCookies:o,includedRequestCookies:a,requestHeaders:this.headersMapToHeadersArray(n),clientSecurityState:r,connectTiming:s,siteHasCookieInOtherPartition:i};this.getExtraInfoBuilder(e).addRequestExtraInfo(l)}responseReceivedEarlyHints({requestId:e,headers:t}){this.getExtraInfoBuilder(e).setEarlyHintsHeaders(this.headersMapToHeadersArray(t))}responseReceivedExtraInfo({requestId:e,blockedCookies:t,headers:n,headersText:r,resourceIPAddressSpace:s,statusCode:i,cookiePartitionKey:o,cookiePartitionKeyOpaque:a,exemptedCookies:l}){const d={blockedResponseCookies:t.map((e=>({blockedReasons:e.blockedReasons,cookieLine:e.cookieLine,cookie:e.cookie?H.fromProtocolCookie(e.cookie):null}))),responseHeaders:this.headersMapToHeadersArray(n),responseHeadersText:r,resourceIPAddressSpace:s,statusCode:i,cookiePartitionKey:o,cookiePartitionKeyOpaque:a,exemptedResponseCookies:l?.map((e=>({cookie:H.fromProtocolCookie(e.cookie),cookieLine:e.cookieLine,exemptionReason:e.exemptionReason})))};this.getExtraInfoBuilder(e).addResponseExtraInfo(d)}getExtraInfoBuilder(e){let t;return this.#G.has(e)?t=this.#G.get(e):(t=new ue,this.#G.set(e,t)),t}appendRedirect(e,t,n){const r=this.#j.get(e);if(!r)throw new Error(`Could not find original network request for ${e}`);let s=0;for(let e=r.redirectSource();e;e=e.redirectSource())s++;r.markAsRedirect(s),this.finishNetworkRequest(r,t,-1);const i=Ri.create(e,n,r.documentURL,r.frameId,r.loaderId,r.initiator(),r.hasUserGesture()??void 0);return J.set(i,this.#z),i.setRedirectSource(r),r.setRedirectDestination(i),i}maybeAdoptMainResourceRequest(e){const t=ce.instance().inflightMainResourceRequests.get(e);if(!t)return null;const n=Z.forRequest(t).dispatcher;n.#j.delete(e),n.#V.delete(t.url());const r=t.loaderId;r&&n.#W.delete(r);const s=n.#G.get(e);return n.#G.delete(e),this.#j.set(e,t),this.#V.set(t.url(),t),r&&this.#W.set(r,t),s&&this.#G.set(e,s),J.set(t,this.#z),t}startNetworkRequest(e,t){this.#j.set(e.requestId(),e),this.#V.set(e.url(),e);const n=e.loaderId;n&&this.#W.set(n,e),e.loaderId!==e.requestId()&&""!==e.loaderId||ce.instance().inflightMainResourceRequests.set(e.requestId(),e),this.#z.dispatchEventToListeners(ee.RequestStarted,{request:e,originalRequest:t})}updateNetworkRequest(e){this.#z.dispatchEventToListeners(ee.RequestUpdated,e)}finishNetworkRequest(t,n,r){if(t.endTime=n,t.finished=!0,r>=0){const e=t.redirectSource();e?.signedExchangeInfo()?(t.setTransferSize(0),e.setTransferSize(r),this.updateNetworkRequest(e)):t.setTransferSize(r)}if(this.#z.dispatchEventToListeners(ee.RequestFinished,t),ce.instance().inflightMainResourceRequests.delete(t.requestId()),e.Settings.Settings.instance().moduleSetting("monitoring-xhr-enabled").get()&&t.resourceType().category()===e.ResourceType.resourceCategories.XHR){let e;const n=t.failed||t.hasErrorStatusCode();e=$(n?K.sFailedLoadingSS:K.sFinishedLoadingSS,{PH1:t.resourceType().title(),PH2:t.requestMethod,PH3:t.url()}),this.#z.dispatchEventToListeners(ee.MessageGenerated,{message:e,requestId:t.requestId(),warning:!1})}}clearRequests(){for(const[e,t]of this.#j)t.finished&&this.#j.delete(e);for(const[e,t]of this.#V)t.finished&&this.#V.delete(e);for(const[e,t]of this.#W)t.finished&&this.#W.delete(e);for(const[e,t]of this.#G)t.isFinished()&&this.#G.delete(e)}webTransportCreated({transportId:t,url:n,timestamp:r,initiator:s}){const i=Ri.createForWebSocket(t,n,s);i.hasNetworkData=!0,J.set(i,this.#z),i.setResourceType(e.ResourceType.resourceTypes.WebTransport),i.setIssueTime(r,0),this.startNetworkRequest(i,null)}webTransportConnectionEstablished({transportId:e,timestamp:t}){const n=this.#j.get(e);n&&(n.responseReceivedTime=t,n.endTime=t+.001,this.updateNetworkRequest(n))}webTransportClosed({transportId:e,timestamp:t}){const n=this.#j.get(e);n&&(n.endTime=t,this.finishNetworkRequest(n,t,0))}directTCPSocketCreated(t){const r=0===t.remotePort?t.remoteAddr:`${t.remoteAddr}:${t.remotePort}`,s=Ri.createForWebSocket(t.identifier,r,t.initiator);s.hasNetworkData=!0,s.setRemoteAddress(t.remoteAddr,t.remotePort),s.protocol=n.i18n.lockedString("tcp"),s.statusText=$(K.directSocketStatusOpening),s.directSocketInfo={type:Li.TCP,status:Ai.OPENING,createOptions:{remoteAddr:t.remoteAddr,remotePort:t.remotePort,noDelay:t.options.noDelay,keepAliveDelay:t.options.keepAliveDelay,sendBufferSize:t.options.sendBufferSize,receiveBufferSize:t.options.receiveBufferSize,dnsQueryType:t.options.dnsQueryType}},s.setResourceType(e.ResourceType.resourceTypes.DirectSocket),s.setIssueTime(t.timestamp,t.timestamp),J.set(s,this.#z),this.startNetworkRequest(s,null)}directTCPSocketOpened(e){const t=this.#j.get(e.identifier);if(!t?.directSocketInfo)return;t.responseReceivedTime=e.timestamp,t.directSocketInfo.status=Ai.OPEN,t.statusText=$(K.directSocketStatusOpen),t.directSocketInfo.openInfo={remoteAddr:e.remoteAddr,remotePort:e.remotePort,localAddr:e.localAddr,localPort:e.localPort},t.setRemoteAddress(e.remoteAddr,e.remotePort);const n=0===e.remotePort?e.remoteAddr:`${e.remoteAddr}:${e.remotePort}`;t.setUrl(n),this.updateNetworkRequest(t)}directTCPSocketAborted(e){const t=this.#j.get(e.identifier);t?.directSocketInfo&&(t.failed=!0,t.directSocketInfo.status=Ai.ABORTED,t.statusText=$(K.directSocketStatusAborted),t.directSocketInfo.errorMessage=e.errorMessage,this.finishNetworkRequest(t,e.timestamp,0))}directTCPSocketClosed(e){const t=this.#j.get(e.identifier);t?.directSocketInfo&&(t.statusText=$(K.directSocketStatusClosed),t.directSocketInfo.status=Ai.CLOSED,this.finishNetworkRequest(t,e.timestamp,0))}trustTokenOperationDone(e){const t=this.#j.get(e.requestId);t?t.setTrustTokenOperationDoneEvent(e):this.#K.set(e.requestId,e)}subresourceWebBundleMetadataReceived({requestId:e,urls:t}){const n=this.getExtraInfoBuilder(e);n.setWebBundleInfo({resourceUrls:t});const r=n.finalRequest();r&&this.updateNetworkRequest(r)}subresourceWebBundleMetadataError({requestId:e,errorMessage:t}){const n=this.getExtraInfoBuilder(e);n.setWebBundleInfo({errorMessage:t});const r=n.finalRequest();r&&this.updateNetworkRequest(r)}subresourceWebBundleInnerResponseParsed({innerRequestId:e,bundleRequestId:t}){const n=this.getExtraInfoBuilder(e);n.setWebBundleInnerRequestInfo({bundleRequestId:t});const r=n.finalRequest();r&&this.updateNetworkRequest(r)}subresourceWebBundleInnerResponseError({innerRequestId:e,errorMessage:t}){const n=this.getExtraInfoBuilder(e);n.setWebBundleInnerRequestInfo({errorMessage:t});const r=n.finalRequest();r&&this.updateNetworkRequest(r)}reportingApiReportAdded(e){this.#z.dispatchEventToListeners(ee.ReportingApiReportAdded,e.report)}reportingApiReportUpdated(e){this.#z.dispatchEventToListeners(ee.ReportingApiReportUpdated,e.report)}reportingApiEndpointsChangedForOrigin(e){this.#z.dispatchEventToListeners(ee.ReportingApiEndpointsChangedForOrigin,e)}policyUpdated(){}createNetworkRequest(e,t,n,r,s,i){const o=Ri.create(e,r,s,t,n,i);return J.set(o,this.#z),o}}let de;class ce extends e.ObjectWrapper.ObjectWrapper{#$="";#X=null;#J=null;#Y=new Set;#Z=new Set;inflightMainResourceRequests=new Map;#ee=te;#te=null;#ne=e.Settings.Settings.instance().moduleSetting("request-blocking-enabled");#re=e.Settings.Settings.instance().createSetting("network-blocked-patterns",[]);#se=[];#ie=new r.MapUtilities.Multimap;#oe;#ae;constructor(){super();const e=()=>{this.updateBlockedPatterns(),this.dispatchEventToListeners("BlockedPatternsChanged")};this.#ne.addChangeListener(e),this.#re.addChangeListener(e),this.updateBlockedPatterns(),W.instance().observeModels(Z,this)}static instance(e={forceNew:null}){const{forceNew:t}=e;return de&&!t||(de=new ce),de}static dispose(){de=null}static patchUserAgentWithChromeVersion(e){const t=o.Runtime.getChromeVersion();if(t.length>0){const n=t.split(".",1)[0]+".0.100.0";return r.StringUtilities.sprintf(e,t,n)}return e}static patchUserAgentMetadataWithChromeVersion(e){if(!e.brands)return;const t=o.Runtime.getChromeVersion();if(0===t.length)return;const n=t.split(".",1)[0];for(const t of e.brands)t.version.includes("%s")&&(t.version=r.StringUtilities.sprintf(t.version,n));e.fullVersion&&e.fullVersion.includes("%s")&&(e.fullVersion=r.StringUtilities.sprintf(e.fullVersion,t))}modelAdded(e){const t=e.target().networkAgent(),n=e.target().fetchAgent();this.#oe&&t.invoke_setExtraHTTPHeaders({headers:this.#oe}),this.currentUserAgent()&&t.invoke_setUserAgentOverride({userAgent:this.currentUserAgent(),userAgentMetadata:this.#X||void 0}),this.#se.length&&t.invoke_setBlockedURLs({urls:this.#se}),this.isIntercepting()&&n.invoke_enable({patterns:this.#ie.valuesArray()}),null===this.#J?t.invoke_clearAcceptedEncodingsOverride():t.invoke_setAcceptedEncodings({encodings:this.#J}),this.#Y.add(t),this.#Z.add(n),this.isThrottling()&&this.updateNetworkConditions(t)}modelRemoved(e){for(const t of this.inflightMainResourceRequests){Z.forRequest(t[1])===e&&this.inflightMainResourceRequests.delete(t[0])}this.#Y.delete(e.target().networkAgent()),this.#Z.delete(e.target().fetchAgent())}isThrottling(){return this.#ee.download>=0||this.#ee.upload>=0||this.#ee.latency>0}isOffline(){return!this.#ee.download&&!this.#ee.upload}setNetworkConditions(e){this.#ee=e;for(const e of this.#Y)this.updateNetworkConditions(e);this.dispatchEventToListeners("ConditionsChanged")}networkConditions(){return this.#ee}updateNetworkConditions(e){const t=this.#ee;this.isThrottling()?e.invoke_emulateNetworkConditions({offline:this.isOffline(),latency:t.latency,downloadThroughput:t.download<0?0:t.download,uploadThroughput:t.upload<0?0:t.upload,packetLoss:(t.packetLoss??0)<0?0:t.packetLoss,packetQueueLength:t.packetQueueLength,packetReordering:t.packetReordering,connectionType:Z.connectionType(t)}):e.invoke_emulateNetworkConditions({offline:!1,latency:0,downloadThroughput:0,uploadThroughput:0})}setExtraHTTPHeaders(e){this.#oe=e;for(const e of this.#Y)e.invoke_setExtraHTTPHeaders({headers:this.#oe})}currentUserAgent(){return this.#ae?this.#ae:this.#$}updateUserAgentOverride(){const e=this.currentUserAgent();for(const t of this.#Y)t.invoke_setUserAgentOverride({userAgent:e,userAgentMetadata:this.#X||void 0})}setUserAgentOverride(e,t){const n=this.#$!==e;this.#$=e,this.#ae?this.#X=null:(this.#X=t,this.updateUserAgentOverride()),n&&this.dispatchEventToListeners("UserAgentChanged")}userAgentOverride(){return this.#$}setCustomUserAgentOverride(e,t=null){this.#ae=e,this.#X=t,this.updateUserAgentOverride()}setCustomAcceptedEncodingsOverride(e){this.#J=e,this.updateAcceptedEncodingsOverride(),this.dispatchEventToListeners("AcceptedEncodingsChanged")}clearCustomAcceptedEncodingsOverride(){this.#J=null,this.updateAcceptedEncodingsOverride(),this.dispatchEventToListeners("AcceptedEncodingsChanged")}isAcceptedEncodingOverrideSet(){return null!==this.#J}updateAcceptedEncodingsOverride(){const e=this.#J;for(const t of this.#Y)null===e?t.invoke_clearAcceptedEncodingsOverride():t.invoke_setAcceptedEncodings({encodings:e})}blockedPatterns(){return this.#re.get().slice()}blockingEnabled(){return this.#ne.get()}isBlocking(){return Boolean(this.#se.length)}setBlockedPatterns(e){this.#re.set(e)}setBlockingEnabled(e){this.#ne.get()!==e&&this.#ne.set(e)}updateBlockedPatterns(){const e=[];if(this.#ne.get())for(const t of this.#re.get())t.enabled&&e.push(t.url);if(e.length||this.#se.length){this.#se=e;for(const e of this.#Y)e.invoke_setBlockedURLs({urls:this.#se})}}isIntercepting(){return Boolean(this.#ie.size)}setInterceptionHandlerForPatterns(e,t){this.#ie.deleteAll(t);for(const n of e)this.#ie.set(t,n);return this.updateInterceptionPatternsOnNextTick()}updateInterceptionPatternsOnNextTick(){return this.#te||(this.#te=Promise.resolve().then(this.updateInterceptionPatterns.bind(this))),this.#te}async updateInterceptionPatterns(){e.Settings.Settings.instance().moduleSetting("cache-disabled").get()||e.Settings.Settings.instance().moduleSetting("cache-disabled").set(!0),this.#te=null;const t=[];for(const e of this.#Z)t.push(e.invoke_enable({patterns:this.#ie.valuesArray()}));this.dispatchEventToListeners("InterceptorsChanged"),await Promise.all(t)}async requestIntercepted(e){for(const t of this.#ie.keysArray())if(await t(e),e.hasResponded()&&e.networkRequest)return void this.dispatchEventToListeners("RequestIntercepted",e.networkRequest.requestId());e.hasResponded()||e.continueRequestWithoutChange()}clearBrowserCache(){for(const e of this.#Y)e.invoke_clearBrowserCache()}clearBrowserCookies(){for(const e of this.#Y)e.invoke_clearBrowserCookies()}async getCertificate(e){const t=W.instance().primaryPageTarget();if(!t)return[];const n=await t.networkAgent().invoke_getCertificate({origin:e});return n?n.tableNames:[]}async loadResource(t){const n={},r=this.currentUserAgent();r&&(n["User-Agent"]=r),e.Settings.Settings.instance().moduleSetting("cache-disabled").get()&&(n["Cache-Control"]="no-cache");const s=e.Settings.Settings.instance().moduleSetting("network.enable-remote-file-loading").get();return await new Promise((e=>a.ResourceLoader.load(t,n,((t,n,r,s)=>{e({success:t,content:r,errorDescription:s})}),s)))}}class he{#q;#le;request;resourceType;responseStatusCode;responseHeaders;requestId;networkRequest;constructor(e,t,n,r,s,i,o){this.#q=e,this.#le=!1,this.request=t,this.resourceType=n,this.responseStatusCode=i,this.responseHeaders=o,this.requestId=r,this.networkRequest=s}hasResponded(){return this.#le}static mergeSetCookieHeaders(e,t){const n=e=>{const t=new Map;for(const n of e){const e=n.value.match(/^([a-zA-Z0-9!#$%&'*+.^_`|~-]+=)(.*)$/);e?t.has(e[1])?t.get(e[1])?.push(n.value):t.set(e[1],[n.value]):t.has(n.value)?t.get(n.value)?.push(n.value):t.set(n.value,[n.value])}return t},r=n(e),s=n(t),i=[];for(const[e,t]of r)if(s.has(e))for(const t of s.get(e)||[])i.push({name:"set-cookie",value:t});else for(const e of t)i.push({name:"set-cookie",value:e});for(const[e,t]of s)if(!r.has(e))for(const e of t)i.push({name:"set-cookie",value:e});return i}async continueRequestWithContent(t,n,r,s){this.#le=!0;const i=n?await t.text():await e.Base64.encode(t).catch((e=>(console.error(e),""))),o=s?200:this.responseStatusCode||200;if(this.networkRequest){const e=this.networkRequest?.originalResponseHeaders.filter((e=>"set-cookie"===e.name))||[],t=r.filter((e=>"set-cookie"===e.name));this.networkRequest.setCookieHeaders=he.mergeSetCookieHeaders(e,t),this.networkRequest.hasOverriddenContent=s}this.#q.invoke_fulfillRequest({requestId:this.requestId,responseCode:o,body:i,responseHeaders:r}),ce.instance().dispatchEventToListeners("RequestFulfilled",this.request.url)}continueRequestWithoutChange(){console.assert(!this.#le),this.#le=!0,this.#q.invoke_continueRequest({requestId:this.requestId})}continueRequestWithError(e){console.assert(!this.#le),this.#le=!0,this.#q.invoke_failRequest({requestId:this.requestId,errorReason:e})}async responseBody(){const e=await this.#q.invoke_getResponseBody({requestId:this.requestId}),n=e.getError();if(n)return{error:n};const{mimeType:r,charset:s}=this.getMimeTypeAndCharset();return new t.ContentData.ContentData(e.body,e.base64Encoded,r??"application/octet-stream",s??void 0)}isRedirect(){return void 0!==this.responseStatusCode&&this.responseStatusCode>=300&&this.responseStatusCode<400}getMimeTypeAndCharset(){for(const e of this.responseHeaders??[])if("content-type"===e.name.toLowerCase())return r.MimeType.parseContentType(e.value);return{mimeType:this.networkRequest?.mimeType??null,charset:this.networkRequest?.charset()??null}}}class ue{#de;#ce;#he;#ue;#ge;#pe;#me;constructor(){this.#de=[],this.#ce=[],this.#ue=[],this.#he=[],this.#ge=!1,this.#pe=null,this.#me=null}addRequest(e){this.#de.push(e),this.sync(this.#de.length-1)}addRequestExtraInfo(e){this.#ce.push(e),this.sync(this.#ce.length-1)}addResponseExtraInfo(e){this.#he.push(e),this.sync(this.#he.length-1)}setEarlyHintsHeaders(e){this.#ue=e,this.updateFinalRequest()}setWebBundleInfo(e){this.#pe=e,this.updateFinalRequest()}setWebBundleInnerRequestInfo(e){this.#me=e,this.updateFinalRequest()}finished(){this.#ge=!0,this.updateFinalRequest()}isFinished(){return this.#ge}sync(e){const t=this.#de[e];if(!t)return;const n=this.#ce[e];n&&(t.addExtraRequestInfo(n),this.#ce[e]=null);const r=this.#he[e];r&&(t.addExtraResponseInfo(r),this.#he[e]=null)}finalRequest(){return this.#ge&&this.#de[this.#de.length-1]||null}updateFinalRequest(){if(!this.#ge)return;const e=this.finalRequest();e?.setWebBundleInfo(this.#pe),e?.setWebBundleInnerRequestInfo(this.#me),e?.setEarlyHintsHeaders(this.#ue)}}h.register(Z,{capabilities:16,autostart:!0});var ge=Object.freeze({__proto__:null,ConditionsSerializer:class{stringify(e){const t=e;return JSON.stringify({...t,title:"function"==typeof t.title?t.title():t.title})}parse(e){const t=JSON.parse(e);return{...t,title:t.i18nTitleKey?X(t.i18nTitleKey):t.title}}},get Events(){return ee},Fast4GConditions:ie,FetchDispatcher:ae,InterceptedRequest:he,MultitargetNetworkManager:ce,NetworkDispatcher:le,NetworkManager:Z,NoThrottlingConditions:te,OfflineConditions:ne,Slow3GConditions:re,Slow4GConditions:se,networkConditionsEqual:function(e,t){const n=e.i18nTitleKey||("function"==typeof e.title?e.title():e.title),r=t.i18nTitleKey||("function"==typeof t.title?t.title():t.title);return t.download===e.download&&t.upload===e.upload&&t.latency===e.latency&&e.packetLoss===t.packetLoss&&e.packetQueueLength===t.packetQueueLength&&e.packetReordering===t.packetReordering&&r===n}});class pe{#fe;#be;#ye=new Map;#ve;#Ie;constructor(e){this.#fe=e.fontFamily,this.#be=e.fontVariationAxes||[],this.#ve=e.src,this.#Ie=e.fontDisplay;for(const e of this.#be)this.#ye.set(e.tag,e)}getFontFamily(){return this.#fe}getSrc(){return this.#ve}getFontDisplay(){return this.#Ie}getVariationAxisByTag(e){return this.#ye.get(e)}}var me=Object.freeze({__proto__:null,CSSFontFace:pe});class fe{text;node;name;fallback;matching;computedTextCallback;constructor(e,t,n,r,s,i){this.text=e,this.node=t,this.name=n,this.fallback=r,this.matching=s,this.computedTextCallback=i}computedText(){return this.computedTextCallback(this,this.matching)}}class be extends(kt(fe)){#we;constructor(e){super(),this.#we=e}matches(e,t){const n=e.getChild("Callee"),r=e.getChild("ArgList");if("CallExpression"!==e.name||!n||"var"!==t.ast.text(n)||!r)return null;const[s,i,...o]=Pt.children(r);if("("!==s?.name||"VariableName"!==i?.name)return null;if(o.length<=1&&")"!==o[0]?.name)return null;let a=[];if(o.length>1){if(","!==o.shift()?.name)return null;if(")"!==o.pop()?.name)return null;if(a=o,0===a.length)return null;if(a.some((e=>","===e.name)))return null}const l=t.ast.text(i);return l.startsWith("--")?new fe(t.ast.text(e),e,l,a,t,this.#we):null}}class ye extends fe{matchedStyles;style;constructor(e,t,n,r,s,i,o){super(e,t,n,r,s,(()=>this.resolveVariable()?.value??this.fallbackValue())),this.matchedStyles=i,this.style=o}resolveVariable(){return this.matchedStyles.computeCSSVariable(this.style,this.name)}fallbackValue(){return 0===this.fallback.length||this.matching.hasUnresolvedVarsRange(this.fallback[0],this.fallback[this.fallback.length-1])?null:this.matching.getComputedTextRange(this.fallback[0],this.fallback[this.fallback.length-1])}}class ve extends(kt(ye)){matchedStyles;style;constructor(e,t){super(),this.matchedStyles=e,this.style=t}matches(e,t){const n=new be((()=>null)).matches(e,t);return n?new ye(n.text,n.node,n.name,n.fallback,n.matching,this.matchedStyles,this.style):null}}class Ie{text;node;constructor(e,t){this.text=e,this.node=t}}class we extends(kt(Ie)){accepts(){return!0}matches(e,t){return"BinaryExpression"===e.name?new Ie(t.ast.text(e),e):null}}class Se{text;node;computedText;constructor(e,t){this.text=e,this.node=t,"Comment"===t.name&&(this.computedText=()=>"")}render(){const e=document.createElement("span");return e.appendChild(document.createTextNode(this.text)),[e]}}class ke extends(kt(Se)){accepts(){return!0}matches(e,t){if(!e.firstChild||"NumberLiteral"===e.name){const n=t.ast.text(e);if(n.length)return new Se(n,e)}return null}}class Ce{text;node;constructor(e,t){this.text=e,this.node=t}computedText(){return this.text}}class xe extends(kt(Ce)){accepts(e){return S().isAngleAwareProperty(e)}matches(e,t){if("NumberLiteral"!==e.name)return null;const n=e.getChild("Unit");return n&&["deg","grad","rad","turn"].includes(t.ast.text(n))?new Ce(t.ast.text(e),e):null}}function Re(e,t){if("NumberLiteral"!==e.type.name)return null;const n=t.text(e);return Number(n.substring(0,n.length-t.text(e.getChild("Unit")).length))}class Te{text;node;space;color1;color2;constructor(e,t,n,r,s){this.text=e,this.node=t,this.space=n,this.color1=r,this.color2=s}}class Me extends(kt(Te)){accepts(e){return S().isColorAwareProperty(e)}matches(e,t){if("CallExpression"!==e.name||"color-mix"!==t.ast.text(e.getChild("Callee")))return null;const n=Lt("--property",t.getComputedText(e));if(!n)return null;const r=Pt.declValue(n.tree);if(!r)return null;const s=Pt.callArgs(r);if(3!==s.length)return null;const[i,o,a]=s;if(i.length<2||"in"!==n.text(Pt.stripComments(i).next().value)||o.length<1||a.length<1)return null;const l=o.filter((e=>"NumberLiteral"===e.type.name&&"%"===n.text(e.getChild("Unit")))),d=a.filter((e=>"NumberLiteral"===e.type.name&&"%"===n.text(e.getChild("Unit"))));if(l.length>1||d.length>1)return null;if(l[0]&&d[0]&&0===(Re(l[0],n)??0)&&0===(Re(d[0],n)??0))return null;const c=Pt.callArgs(e);return 3!==c.length?null:new Te(t.ast.text(e),e,c[0],c[1],c[2])}}class Pe{url;text;node;constructor(e,t,n){this.url=e,this.text=t,this.node=n}}class Ee extends(kt(Pe)){matches(e,t){if("CallLiteral"!==e.name)return null;const n=e.getChild("CallTag");if(!n||"url"!==t.ast.text(n))return null;const[,r,s,i]=Pt.siblings(n);if("("!==t.ast.text(r)||"ParenthesizedContent"!==s.name&&"StringLiteral"!==s.name||")"!==t.ast.text(i))return null;const o=t.ast.text(s),a="StringLiteral"===s.name?o.substr(1,o.length-2):o.trim();return new Pe(a,t.ast.text(e),e)}}class Le{text;node;constructor(e,t){this.text=e,this.node=t}}class Ae extends(kt(Le)){matches(e,t){const n=t.ast.text(e);return"CallExpression"===e.name&&"linear-gradient"===t.ast.text(e.getChild("Callee"))?new Le(n,e):null}accepts(e){return["background","background-image","-webkit-mask-image"].includes(e)}}class Oe{text;node;currentColorCallback;computedText;constructor(e,t,n){this.text=e,this.node=t,this.currentColorCallback=n,this.computedText=n}}class De extends(kt(Oe)){currentColorCallback;constructor(e){super(),this.currentColorCallback=e}accepts(e){return S().isColorAwareProperty(e)}matches(t,n){const r=n.ast.text(t);if("ColorLiteral"===t.name)return new Oe(r,t);if("ValueName"===t.name){if(e.Color.Nicknames.has(r))return new Oe(r,t);if("currentcolor"===r.toLowerCase()&&this.currentColorCallback){const e=this.currentColorCallback;return new Oe(r,t,(()=>e()??r))}}if("CallExpression"===t.name){const e=t.getChild("Callee");if(e&&n.ast.text(e).match(/^(rgba?|hsla?|hwba?|lab|lch|oklab|oklch|color)$/))return new Oe(r,t)}return null}}class Ne{text;node;light;dark;style;constructor(e,t,n,r,s){this.text=e,this.node=t,this.light=n,this.dark=r,this.style=s}}class Fe extends(kt(Ne)){style;constructor(e){super(),this.style=e}accepts(e){return S().isColorAwareProperty(e)}matches(e,t){if("CallExpression"!==e.name||"light-dark"!==t.ast.text(e.getChild("Callee")))return null;const n=Pt.callArgs(e);return 2!==n.length||0===n[0].length||0===n[1].length?null:new Ne(t.ast.text(e),e,n[0],n[1],this.style)}}class Be{text;node;auto;base;constructor(e,t,n,r){this.text=e,this.node=t,this.auto=n,this.base=r}}class _e extends(kt(Be)){matches(e,t){if("CallExpression"!==e.name||"-internal-auto-base"!==t.ast.text(e.getChild("Callee")))return null;const n=Pt.callArgs(e);return 2!==n.length||0===n[0].length||0===n[1].length?null:new Be(t.ast.text(e),e,n[0],n[1])}}class He{text;node;propertyName;constructor(e,t,n){this.text=e,this.node=t,this.propertyName=n}}class Ue extends(kt(He)){static isLinkableNameProperty(e){return["animation","animation-name","font-palette","position-try-fallbacks","position-try"].includes(e)}static identifierAnimationLonghandMap=new Map(Object.entries({normal:"direction",alternate:"direction",reverse:"direction","alternate-reverse":"direction",none:"fill-mode",forwards:"fill-mode",backwards:"fill-mode",both:"fill-mode",running:"play-state",paused:"play-state",infinite:"iteration-count",linear:"easing-function",ease:"easing-function","ease-in":"easing-function","ease-out":"easing-function","ease-in-out":"easing-function",steps:"easing-function","step-start":"easing-function","step-end":"easing-function"}));matchAnimationNameInShorthand(e,t){const n=t.ast.text(e);if(!Ue.identifierAnimationLonghandMap.has(n))return new He(n,e,"animation");const r=Pt.split(Pt.siblings(Pt.declValue(t.ast.tree))).find((t=>t[0].from<=e.from&&t[t.length-1].to>=e.to));if(!r)return null;const s=Lt("--p",t.getComputedTextRange(r[0],e));if(!s)return null;const i=Ue.identifierAnimationLonghandMap.get(n);for(let t=Pt.declValue(s.tree);t?.nextSibling;t=t.nextSibling)if("ValueName"===t.name){const r=Ue.identifierAnimationLonghandMap.get(s.text(t));if(r&&r===i)return new He(n,e,"animation")}return null}accepts(e){return Ue.isLinkableNameProperty(e)}matches(e,t){const{propertyName:n}=t.ast,r=t.ast.text(e),s=e.parent;if(!s)return null;const i="Declaration"===s.name,o="ArgList"===s.name&&"Callee"===s.prevSibling?.name&&"var"===t.ast.text(s.prevSibling),a=i||o,l="position-try"===n||"position-try-fallbacks"===n;return!n||"ValueName"!==e.name&&"VariableName"!==e.name||!a||"ValueName"===e.name&&l?null:"animation"===n?this.matchAnimationNameInShorthand(e,t):new He(r,e,n)}}class qe{text;node;constructor(e,t){this.text=e,this.node=t}}class ze extends(kt(qe)){accepts(e){return S().isBezierAwareProperty(e)}matches(e,t){const n=t.ast.text(e),r="ValueName"===e.name&&b.has(n),s="CallExpression"===e.name&&["cubic-bezier","linear"].includes(t.ast.text(e.getChild("Callee")));return r||s?new qe(n,e):null}}class je{text;node;constructor(e,t){this.text=e,this.node=t}}class Ve extends(kt(je)){matches(e,t){return"StringLiteral"===e.name?new je(t.ast.text(e),e):null}}class We{text;node;shadowType;constructor(e,t,n){this.text=e,this.node=t,this.shadowType=n}}class Ge extends(kt(We)){accepts(e){return S().isShadowProperty(e)}matches(e,t){if("Declaration"!==e.name)return null;const n=Pt.siblings(Pt.declValue(e));if(0===n.length)return null;const r=t.ast.textRange(n[0],n[n.length-1]);return new We(r,e,"text-shadow"===t.ast.propertyName?"textShadow":"boxShadow")}}class Ke{text;node;constructor(e,t){this.text=e,this.node=t}}class Qe extends(kt(Ke)){accepts(e){return S().isFontAwareProperty(e)}matches(e,t){if("Declaration"!==e.name)return null;const n=Pt.siblings(Pt.declValue(e));if(0===n.length)return null;const r="font-family"===t.ast.propertyName?["ValueName","StringLiteral","Comment",","]:["Comment","ValueName","NumberLiteral"];if(n.some((e=>!r.includes(e.name))))return null;const s=t.ast.textRange(n[0],n[n.length-1]);return new Ke(s,e)}}class $e{text;node;unit;constructor(e,t,n){this.text=e,this.node=t,this.unit=n}}class Xe extends(kt($e)){static LENGTH_UNITS=new Set(["em","ex","ch","cap","ic","lh","rem","rex","rch","rlh","ric","rcap","pt","pc","in","cm","mm","Q","vw","vh","vi","vb","vmin","vmax","dvw","dvh","dvi","dvb","dvmin","dvmax","svw","svh","svi","svb","svmin","svmax","lvw","lvh","lvi","lvb","lvmin","lvmax","cqw","cqh","cqi","cqb","cqmin","cqmax","cqem","cqlh","cqex","cqch"]);matches(e,t){if("NumberLiteral"!==e.name)return null;const n=t.ast.text(e.getChild("Unit"));if(!Xe.LENGTH_UNITS.has(n))return null;const r=t.ast.text(e);return new $e(r,e,n)}}class Je{text;node;func;args;constructor(e,t,n,r){this.text=e,this.node=t,this.func=n,this.args=r}}class Ye extends(kt(Je)){matches(e,t){if("CallExpression"!==e.name)return null;const n=t.ast.text(e.getChild("Callee"));if(!["min","max","clamp","calc"].includes(n))return null;const r=Pt.callArgs(e);if(r.some((e=>0===e.length||t.hasUnresolvedVarsRange(e[0],e[e.length-1]))))return null;const s=t.ast.text(e);return new Je(s,e,n,r)}}class Ze{text;node;isFlex;constructor(e,t,n){this.text=e,this.node=t,this.isFlex=n}}class et extends(kt(Ze)){static FLEX=["flex","inline-flex","block flex","inline flex"];static GRID=["grid","inline-grid","block grid","inline grid"];accepts(e){return"display"===e}matches(e,t){if("Declaration"!==e.name)return null;const n=Pt.siblings(Pt.declValue(e));if(n.length<1)return null;const r=n.filter((e=>"Important"!==e.name)).map((e=>t.getComputedText(e).trim())).filter((e=>e)),s=r.join(" ");return et.FLEX.includes(s)?new Ze(t.ast.text(e),e,!0):et.GRID.includes(s)?new Ze(t.ast.text(e),e,!1):null}}class tt{text;node;lines;constructor(e,t,n){this.text=e,this.node=t,this.lines=n}}class nt extends(kt(tt)){accepts(e){return S().isGridAreaDefiningProperty(e)}matches(e,t){if("Declaration"!==e.name||t.hasUnresolvedVars(e))return null;const n=[];let r=[],s=!1,i=!1;const o=Pt.siblings(Pt.declValue(e));!function e(o,a=!1){for(const l of o)if(t.getMatch(l)instanceof fe){const o=Lt("--property",t.getComputedText(l));if(!o)continue;const a=Pt.siblings(Pt.declValue(o.tree));if(0===a.length)continue;"StringLiteral"===a[0].name&&!s||"LineNames"===a[0].name&&!i?(n.push(r),r=[l]):r.push(l),e(a,!0)}else"BinaryExpression"===l.name?e(Pt.siblings(l.firstChild)):"StringLiteral"===l.name?(a||(s?r.push(l):(n.push(r),r=[l])),i=!0,s=!1):"LineNames"===l.name?(a||(i?r.push(l):(n.push(r),r=[l])),s=!i,i=!i):a||r.push(l)}(o),n.push(r);const a=t.ast.textRange(o[0],o[o.length-1]);return new tt(a,e,n.filter((e=>e.length>0)))}}class rt{text;node;functionName;constructor(e,t,n){this.text=e,this.node=t,this.functionName=n}}class st extends(kt(rt)){anchorFunction(e,t){if("CallExpression"!==e.name)return null;const n=t.ast.text(e.getChild("Callee"));return"anchor"===n||"anchor-size"===n?n:null}matches(e,t){if("VariableName"===e.name){let n=e.parent;return n&&"ArgList"===n.name?(n=n.parent,n&&this.anchorFunction(n,t)?new rt(t.ast.text(e),e,null):null):null}const n=this.anchorFunction(e,t);if(!n)return null;const r=Pt.children(e.getChild("ArgList"));return"anchor"===n&&r.length<=2||r.find((e=>"VariableName"===e.name))?null:new rt(t.ast.text(e),e,n)}}class it{text;matching;node;constructor(e,t,n){this.text=e,this.matching=t,this.node=n}}class ot extends(kt(it)){accepts(e){return"position-anchor"===e}matches(e,t){if("VariableName"!==e.name)return null;const n=t.ast.text(e);return new it(n,t,e)}}class at{text;node;property;matchedStyles;constructor(e,t,n,r){this.text=e,this.node=t,this.property=n,this.matchedStyles=r}resolveProperty(){return this.matchedStyles.resolveGlobalKeyword(this.property,this.text)}computedText(){return this.resolveProperty()?.value??null}}class lt extends(kt(at)){property;matchedStyles;constructor(e,t){super(),this.property=e,this.matchedStyles=t}matches(e,t){const n=e.parent;if("ValueName"!==e.name||"Declaration"!==n?.name)return null;if(Array.from(Pt.stripComments(Pt.siblings(Pt.declValue(n)))).some((t=>!Pt.equals(t,e))))return null;const r=t.ast.text(e);return f.isCSSWideKeyword(r)?new at(r,e,this.property,this.matchedStyles):null}}class dt{text;node;preamble;fallbacks;constructor(e,t,n,r){this.text=e,this.node=t,this.preamble=n,this.fallbacks=r}}class ct extends(kt(dt)){accepts(e){return"position-try"===e||"position-try-fallbacks"===e}matches(e,t){if("Declaration"!==e.name)return null;let n=[];const r=Pt.siblings(Pt.declValue(e)),s=Pt.split(r);if("position-try"===t.ast.propertyName)for(const[e,r]of s[0].entries()){const i=t.getComputedText(r);if(f.isCSSWideKeyword(i))return null;if(f.isPositionTryOrderKeyword(i)){n=s[0].splice(0,e+1);break}}const i=t.ast.textRange(r[0],r[r.length-1]);return new dt(i,e,n,s)}}var ht=Object.freeze({__proto__:null,AnchorFunctionMatch:rt,AnchorFunctionMatcher:st,AngleMatch:Ce,AngleMatcher:xe,AutoBaseMatch:Be,AutoBaseMatcher:_e,BaseVariableMatch:fe,BaseVariableMatcher:be,BezierMatch:qe,BezierMatcher:ze,BinOpMatch:Ie,BinOpMatcher:we,CSSWideKeywordMatch:at,CSSWideKeywordMatcher:lt,ColorMatch:Oe,ColorMatcher:De,ColorMixMatch:Te,ColorMixMatcher:Me,FlexGridMatch:Ze,FlexGridMatcher:et,FontMatch:Ke,FontMatcher:Qe,GridTemplateMatch:tt,GridTemplateMatcher:nt,LengthMatch:$e,LengthMatcher:Xe,LightDarkColorMatch:Ne,LightDarkColorMatcher:Fe,LinearGradientMatch:Le,LinearGradientMatcher:Ae,LinkableNameMatch:He,LinkableNameMatcher:Ue,MathFunctionMatch:Je,MathFunctionMatcher:Ye,PositionAnchorMatch:it,PositionAnchorMatcher:ot,PositionTryMatch:dt,PositionTryMatcher:ct,ShadowMatch:We,ShadowMatcher:Ge,StringMatch:je,StringMatcher:Ve,TextMatch:Se,TextMatcher:ke,URLMatch:Pe,URLMatcher:Ee,VariableMatch:ye,VariableMatcher:ve});const ut=new Set(["inherit","initial","unset"]),gt=/[\x20-\x7E]{4}/,pt=new RegExp(`(?:'(${gt.source})')|(?:"(${gt.source})")\\s+(${/[+-]?(?:\d*\.)?\d+(?:[eE]\d+)?/.source})`);const mt=/^"(.+)"|'(.+)'$/;function ft(e){return e.split(",").map((e=>e.trim()))}function bt(e){return e.replaceAll(/(\/\*(?:.|\s)*?\*\/)/g,"")}const yt=d.css.cssLanguage.parser;function vt(e,t){return It(e,e,t)}function It(e,t,n){return n.substring(e.from,t.to)}class wt{propertyValue;rule;tree;trailingNodes;propertyName;constructor(e,t,n,r,s=[]){this.propertyName=r,this.propertyValue=e,this.rule=t,this.tree=n,this.trailingNodes=s}text(e){return null===e?"":vt(e??this.tree,this.rule)}textRange(e,t){return It(e,t,this.rule)}subtree(e){return new wt(this.propertyValue,this.rule,e)}}class St{ast;constructor(e){this.ast=e}static walkExcludingSuccessors(e,...t){const n=new this(e,...t);return"Declaration"===e.tree.name?n.iterateDeclaration(e.tree):n.iterateExcludingSuccessors(e.tree),n}static walk(e,...t){const n=new this(e,...t);return"Declaration"===e.tree.name?n.iterateDeclaration(e.tree):n.iterate(e.tree),n}iterateDeclaration(e){if("Declaration"===e.name){if(this.enter(e))for(const t of Pt.siblings(Pt.declValue(e)))t.cursor().iterate(this.enter.bind(this),this.leave.bind(this));this.leave(e)}}iterate(e){for(const t of Pt.siblings(e))t.cursor().iterate(this.enter.bind(this),this.leave.bind(this))}iterateExcludingSuccessors(e){e.cursor().iterate(this.enter.bind(this),this.leave.bind(this))}enter(e){return!0}leave(e){}}function kt(e){return class{matchType=e;accepts(e){return!0}matches(e,t){return null}}}class Ct extends St{#Se=[];#ke=new Map;computedText;#Ce(e){return`${e.from}:${e.to}`}constructor(e,t){super(e),this.computedText=new Rt(e.rule.substring(e.tree.from)),this.#Se.push(...t.filter((t=>!e.propertyName||t.accepts(e.propertyName)))),this.#Se.push(new ke)}leave({node:e}){for(const t of this.#Se){const n=t.matches(e,this);if(n){this.computedText.push(n,e.from-this.ast.tree.from),this.#ke.set(this.#Ce(e),n);break}}}matchText(e){const t=this.#Se.splice(0);this.#Se.push(new ke),this.iterateExcludingSuccessors(e),this.#Se.push(...t)}hasMatches(...e){return Boolean(this.#ke.values().find((t=>e.some((e=>t instanceof e)))))}getMatch(e){return this.#ke.get(this.#Ce(e))}hasUnresolvedVars(e){return this.hasUnresolvedVarsRange(e,e)}hasUnresolvedVarsRange(e,t){return this.computedText.hasUnresolvedVars(e.from-this.ast.tree.from,t.to-this.ast.tree.from)}getComputedText(e,t){return this.getComputedTextRange(e,e,t)}getComputedPropertyValueText(){const[e,t]=Pt.range(Pt.siblings(Pt.declValue(this.ast.tree)));return this.getComputedTextRange(e??this.ast.tree,t??this.ast.tree)}getComputedTextRange(e,t,n){return this.computedText.get(e.from-this.ast.tree.from,t.to-this.ast.tree.from,n)}}class xt{match;offset;#xe=null;constructor(e,t){this.match=e,this.offset=t}get end(){return this.offset+this.length}get length(){return this.match.text.length}get computedText(){return null===this.#xe&&(this.#xe=this.match.computedText()),this.#xe}}class Rt{#Re=[];text;#Te=!0;constructor(e){this.text=e}clear(){this.#Re.splice(0)}get chunkCount(){return this.#Re.length}#Me(){this.#Te||(this.#Re.sort(((e,t)=>e.offsett.end?-1:e.end=this.text.length)return;const n=new xt(e,t);n.end>this.text.length||(this.#Te=!1,this.#Re.push(n))}*#Pe(e,t){this.#Me();let n=this.#Re.findIndex((t=>t.offset>=e));for(;n>=0&&ne&&et)n++;else for(yield this.#Re[n],e=this.#Re[n].end;e=n.end&&(yield n),e=n.end}if(e{if("string"==typeof e)return e;const t=n?.get(e.match);return t?s(t):e.computedText??e.match.text};for(const n of this.#Ee(e,t)){const e=s(n);0!==e.length&&(r.length>0&&Tt(r[r.length-1],e)&&r.push(" "),r.push(e))}return r.join("")}}function Tt(e,t){const n=Array.isArray(e)?e.findLast((e=>e.textContent))?.textContent:e,r=Array.isArray(t)?t.find((e=>e.textContent))?.textContent:t,s=n?n[n.length-1]:"",i=r?r[0]:"";return!(/\s/.test(s)||/\s/.test(i)||["","(","{","}",";","["].includes(s)||["","(",")",",",":","*","{",";","]"].includes(i))}const Mt=Map;var Pt;function Et(e){return yt.parse(e).topNode.getChild("RuleSet")?.getChild("Block")?.getChild("Declaration")??null}function Lt(e,t){const n=At(e);if(!n)return null;const r=`*{${n}: ${t};}`,s=Et(r);if(!s||s.type.isError)return null;const i=Pt.children(s);if(i.length<2)return null;const[o,a,l]=i;if(!o||o.type.isError||!a||a.type.isError||l?.type.isError)return null;const d=Pt.siblings(s).slice(1),[c,h]=d.splice(d.length-2,2);if(";"!==c?.name&&"}"!==h?.name)return null;const u=new wt(t,r,s,n,d);return u.text(o)!==n||":"!==a.name?null:u}function At(e){const t=`*{${e}: inherit;}`,n=Et(t);if(!n||n.type.isError)return null;const r=n.getChild("PropertyName")??n.getChild("VariableName");return r?vt(r,t):null}function Ot(e,t,n){const r=Lt(e,t),s=r&&Ct.walk(r,n);return r?.trailingNodes.forEach((e=>s?.matchText(e))),s}!function(e){function t(e){const t=[];for(;e;)t.push(e),e=e.nextSibling;return t}function n(e){return t(e?.firstChild??null)}function r(e){const t=[];let n=[];for(const r of e)","===r.name?(t.push(n),n=[]):n.push(r);return t.push(n),t}e.siblings=t,e.children=n,e.range=function(e){return[e[0],e[e.length-1]]},e.declValue=function(e){return"Declaration"!==e.name?null:n(e).find((e=>":"===e.name))?.nextSibling??null},e.stripComments=function*(e){for(const t of e)"Comment"!==t.type.name&&(yield t)},e.split=r,e.callArgs=function(e){const t=n(e.getChild("ArgList")),s=t.splice(0,1)[0],i=t.pop();return"("!==s?.name||")"!==i?.name?[]:r(t)},e.equals=function(e,t){return e.name===t.name&&e.from===t.from&&e.to===t.to}}(Pt||(Pt={}));class Dt extends St{#Le=null;#Ae;constructor(e,t){super(e),this.#Ae=t}enter({node:e}){return!this.#Le&&(!this.#Ae(e)||(this.#Le=this.#Le??e,!1))}static find(e,t){return Dt.walk(e,t).#Le}static findAll(e,t){const n=[];return Dt.walk(e,(e=>(t(e)&&n.push(e),!1))),n}}var Nt=Object.freeze({__proto__:null,get ASTUtils(){return Pt},BottomUpTreeMatching:Ct,CSSControlMap:Mt,ComputedText:Rt,SyntaxTree:wt,TreeSearch:Dt,TreeWalker:St,matchDeclaration:Ot,matcherBase:kt,parseFontFamily:function(e){if(ut.has(e.trim()))return[];const t=[];for(const n of ft(bt(e))){const e=n.match(mt);e?t.push(e[1]||e[2]):t.push(n)}return t},parseFontVariationSettings:function(e){if(ut.has(e.trim())||"normal"===e.trim())return[];const t=[];for(const n of ft(bt(e))){const e=n.match(pt);e&&t.push({tag:e[1]||e[2],value:parseFloat(e[3])})}return t},requiresSpace:Tt,splitByComma:ft,stripComments:bt,tokenizeDeclaration:Lt,tokenizePropertyName:At});class Ft extends e.ObjectWrapper.ObjectWrapper{ownerStyle;index;name;value;important;disabled;parsedOk;implicit;text;range;#Oe;#De;#Ne;#Fe;#Be=[];constructor(e,n,r,s,i,o,a,l,d,c,h){if(super(),this.ownerStyle=e,this.index=n,this.name=r,this.value=s,this.important=i,this.disabled=o,this.parsedOk=a,this.implicit=l,this.text=d,this.range=c?t.TextRange.TextRange.fromObject(c):null,this.#Oe=!0,this.#De=null,this.#Ne=null,h&&h.length>0)for(const t of h)this.#Be.push(new Ft(e,++n,t.name,t.value,i,o,a,!0));else{const t=S().getLonghands(r);for(const r of t||[])this.#Be.push(new Ft(e,++n,r,"",i,o,a,!0))}}static parsePayload(e,t,n){return new Ft(e,t,n.name,n.value,n.important||!1,n.disabled||!1,!("parsedOk"in n)||Boolean(n.parsedOk),Boolean(n.implicit),n.text,n.range,n.longhandProperties)}parseExpression(e,t,n){return this.parsedOk?Ot(this.name,e,this.#Se(t,n)):null}parseValue(e,t){return this.parsedOk?Ot(this.name,this.value,this.#Se(e,t)):null}#Se(e,t){const n=e.propertyMatchers(this.ownerStyle,t);return n.push(new lt(this,e)),o.Runtime.experiments.isEnabled("font-editor")&&n.push(new Qe),n}ensureRanges(){if(this.#De&&this.#Ne)return;const e=this.range,n=this.text?new t.Text.Text(this.text):null;if(!e||!n)return;const r=n.value().indexOf(this.name),s=n.value().lastIndexOf(this.value);if(-1===r||-1===s||r>s)return;const i=new t.TextRange.SourceRange(r,this.name.length),o=new t.TextRange.SourceRange(s,this.value.length);function a(e,t,n){return 0===e.startLine&&(e.startColumn+=n,e.endColumn+=n),e.startLine+=t,e.endLine+=t,e}this.#De=a(n.toTextRange(i),e.startLine,e.startColumn),this.#Ne=a(n.toTextRange(o),e.startLine,e.startColumn)}nameRange(){return this.ensureRanges(),this.#De}valueRange(){return this.ensureRanges(),this.#Ne}rebase(e){this.ownerStyle.styleSheetId===e.styleSheetId&&this.range&&(this.range=this.range.rebaseAfterTextEdit(e.oldRange,e.newRange))}setActive(e){this.#Oe=e}get propertyText(){return void 0!==this.text?this.text:""===this.name?"":this.name+": "+this.value+(this.important?" !important":"")+";"}activeInStyle(){return this.#Oe}async setText(n,s,i){if(!this.ownerStyle)throw new Error("No ownerStyle for property");if(!this.ownerStyle.styleSheetId)throw new Error("No owner style id");if(!this.range||!this.ownerStyle.range)throw new Error("Style not editable");if(s&&(a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited),this.ownerStyle.parentRule?.isKeyframeRule()&&a.userMetrics.actionTaken(a.UserMetrics.Action.StylePropertyInsideKeyframeEdited),this.name.startsWith("--")&&a.userMetrics.actionTaken(a.UserMetrics.Action.CustomPropertyEdited)),i&&n===this.propertyText)return this.ownerStyle.cssModel().domModel().markUndoableState(!s),!0;const o=this.range.relativeTo(this.ownerStyle.range.startLine,this.ownerStyle.range.startColumn),l=this.ownerStyle.cssText?this.detectIndentation(this.ownerStyle.cssText):e.Settings.Settings.instance().moduleSetting("text-editor-indent").get(),d=this.ownerStyle.cssText?l.substring(0,this.ownerStyle.range.endColumn):"",c=new t.Text.Text(this.ownerStyle.cssText||"").replaceRange(o,r.StringUtilities.sprintf(";%s;",n)),h=await Ft.formatStyle(c,l,d);return await this.ownerStyle.setText(h,s)}static async formatStyle(e,n,r){const s=n.substring(r.length)+n;n&&(n="\n"+n);let i="",o="",a="",l=!1,d=!1;const c=t.CodeMirrorUtils.createCssTokenizer();return await c("*{"+e+"}",(function(e,t){if(!l){const r=t?.includes("comment")&&function(e){const t=e.indexOf(":");if(-1===t)return!1;const n=e.substring(2,t).trim();return S().isCSSPropertyName(n)}(e),s=t?.includes("def")||t?.includes("string")||t?.includes("meta")||t?.includes("property")||t?.includes("variableName")&&"variableName.function"!==t;return r?i=i.trimEnd()+n+e:s?(l=!0,a=e):(";"!==e||d)&&(i+=e,e.trim()&&!t?.includes("comment")&&(d=";"!==e)),void("{"!==e||t||(d=!1))}if("}"===e||";"===e){const t=a.trim();return i=i.trimEnd()+n+t+(t.endsWith(":")?" ":"")+e,d=!1,l=!1,void(o="")}if(S().isGridAreaDefiningProperty(o)){const t=I.exec(e);t&&0===t.index&&!a.trimEnd().endsWith("]")&&(a=a.trimEnd()+"\n"+s)}o||":"!==e||(o=a);a+=e})),l&&(i+=a),i=i.substring(2,i.length-1).trimEnd(),i+(n?"\n"+r:"")}detectIndentation(e){const n=e.split("\n");return n.length<2?"":t.TextUtils.Utils.lineIndent(n[1])}setValue(e,t,n,r){const s=this.name+": "+e+(this.important?" !important":"")+";";this.setText(s,t,n).then(r)}setLocalValue(e){this.value=e,this.dispatchEventToListeners("localValueUpdated")}async setDisabled(e){if(!this.ownerStyle)return!1;if(e===this.disabled)return!0;if(!this.text)return!0;const t=this.text.trim(),n=e=>e+(e.endsWith(";")?"":";");let r;return r=e?"/* "+n(bt(t))+" */":n(this.text.substring(2,t.length-2).trim()),await this.setText(r,!0,!0)}setDisplayedStringForInvalidProperty(e){this.#Fe=e}getInvalidStringForInvalidProperty(){return this.#Fe}getLonghandProperties(){return this.#Be}}var Bt=Object.freeze({__proto__:null,CSSProperty:Ft});class _t{text="";range;styleSheetId;cssModel;constructor(e){this.cssModel=e}rebase(e){this.styleSheetId===e.styleSheetId&&this.range&&(e.oldRange.equal(this.range)?this.reinitialize(e.payload):this.range=this.range.rebaseAfterTextEdit(e.oldRange,e.newRange))}equal(e){return!!(this.styleSheetId&&this.range&&e.range)&&(this.styleSheetId===e.styleSheetId&&this.range.equal(e.range))}lineNumberInSource(){if(this.range)return this.header()?.lineNumberInSource(this.range.startLine)}columnNumberInSource(){if(this.range)return this.header()?.columnNumberInSource(this.range.startLine,this.range.startColumn)}header(){return this.styleSheetId?this.cssModel.styleSheetHeaderForId(this.styleSheetId):null}rawLocation(){const e=this.header();if(!e||void 0===this.lineNumberInSource())return null;const t=Number(this.lineNumberInSource());return new Ur(e,t,this.columnNumberInSource())}}var Ht=Object.freeze({__proto__:null,CSSQuery:_t});class Ut extends _t{name;physicalAxes;logicalAxes;queriesScrollState;static parseContainerQueriesPayload(e,t){return t.map((t=>new Ut(e,t)))}constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){this.text=e.text,this.range=e.range?t.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId,this.name=e.name,this.physicalAxes=e.physicalAxes,this.logicalAxes=e.logicalAxes,this.queriesScrollState=e.queriesScrollState}active(){return!0}async getContainerForNode(e){const t=await this.cssModel.domModel().getContainerForNode(e,this.name,this.physicalAxes,this.logicalAxes,this.queriesScrollState);if(t)return new qt(t)}}class qt{containerNode;constructor(e){this.containerNode=e}async getContainerSizeDetails(){const e=await this.containerNode.domModel().cssModel().getComputedStyle(this.containerNode.id);if(!e)return;const t=e.get("container-type"),n=e.get("writing-mode");if(!t||!n)return;const r=zt(`${t}`),s=jt(r,n);let i,o;return"Both"!==s&&"Horizontal"!==s||(i=e.get("width")),"Both"!==s&&"Vertical"!==s||(o=e.get("height")),{queryAxis:r,physicalAxis:s,width:i,height:o}}}const zt=e=>{const t=e.split(" ");let n=!1;for(const e of t){if("size"===e)return"size";n=n||"inline-size"===e}return n?"inline-size":""},jt=(e,t)=>{const n=t.startsWith("vertical");switch(e){case"":return"";case"size":return"Both";case"inline-size":return n?"Vertical":"Horizontal";case"block-size":return n?"Horizontal":"Vertical"}};var Vt=Object.freeze({__proto__:null,CSSContainerQuery:Ut,CSSContainerQueryContainer:qt,getPhysicalAxisFromQueryAxis:jt,getQueryAxisFromContainerType:zt});class Wt extends _t{static parseLayerPayload(e,t){return t.map((t=>new Wt(e,t)))}constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){this.text=e.text,this.range=e.range?t.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId}active(){return!0}}var Gt=Object.freeze({__proto__:null,CSSLayer:Wt});class Kt{#_e;#He;constructor(e){this.#_e=e.active,this.#He=[];for(let t=0;tnew $t(e,t)))}constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){if(this.text=e.text,this.source=e.source,this.sourceURL=e.sourceURL||"",this.range=e.range?t.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId,this.mediaList=null,e.mediaList){this.mediaList=[];for(let t=0;tnew Jt(e,t)))}constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){this.text=e.text,this.range=e.range?t.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId}active(){return!0}}var Yt,Zt=Object.freeze({__proto__:null,CSSScope:Jt});class en{#je;parentRule;#Ve;styleSheetId;range;cssText;#We=new Map;#Ge=new Set;#Ke=new Map;#Qe;type;#$e;constructor(e,t,n,r,s){this.#je=e,this.parentRule=t,this.#Xe(n),this.type=r,this.#$e=s}rebase(e){if(this.styleSheetId===e.styleSheetId&&this.range)if(e.oldRange.equal(this.range))this.#Xe(e.payload);else{this.range=this.range.rebaseAfterTextEdit(e.oldRange,e.newRange);for(let t=0;t=0;--e)if(this.allProperties()[e].range)return e+1;return 0}#et(e){const t=this.propertyAt(e);if(t?.range)return t.range.collapseToStart();if(!this.range)throw new Error("CSSStyleDeclaration.range is null");return this.range.collapseToEnd()}newBlankProperty(e){e=void 0===e?this.pastLastSourcePropertyIndex():e;return new Ft(this,e,"","",!1,!1,!0,!1,"",this.#et(e))}setText(e,t){return this.range&&this.styleSheetId?this.#je.setStyleText(this.styleSheetId,this.range,e,t):Promise.resolve(!1)}insertPropertyAt(e,t,n,r){this.newBlankProperty(e).setText(t+": "+n+";",!1,!0).then(r)}appendProperty(e,t,n){this.insertPropertyAt(this.allProperties().length,e,t,n)}}!function(e){e.Regular="Regular",e.Inline="Inline",e.Attributes="Attributes",e.Pseudo="Pseudo",e.Transition="Transition",e.Animation="Animation"}(Yt||(Yt={}));var tn=Object.freeze({__proto__:null,CSSStyleDeclaration:en,get Type(){return Yt}});class nn extends _t{static parseSupportsPayload(e,t){return t.map((t=>new nn(e,t)))}#Oe=!0;constructor(e,t){super(e),this.reinitialize(t)}reinitialize(e){this.text=e.text,this.range=e.range?t.TextRange.TextRange.fromObject(e.range):null,this.styleSheetId=e.styleSheetId,this.#Oe=e.active}active(){return this.#Oe}}var rn=Object.freeze({__proto__:null,CSSSupports:nn});class sn{cssModelInternal;styleSheetId;sourceURL;origin;style;constructor(e,t){if(this.cssModelInternal=e,this.styleSheetId=t.styleSheetId,this.styleSheetId){const e=this.getStyleSheetHeader(this.styleSheetId);this.sourceURL=e.sourceURL}this.origin=t.origin,this.style=new en(this.cssModelInternal,this,t.style,Yt.Regular)}rebase(e){this.styleSheetId===e.styleSheetId&&this.style.rebase(e)}resourceURL(){if(!this.styleSheetId)return r.DevToolsPath.EmptyUrlString;return this.getStyleSheetHeader(this.styleSheetId).resourceURL()}isUserAgent(){return"user-agent"===this.origin}isInjected(){return"injected"===this.origin}isViaInspector(){return"inspector"===this.origin}isRegular(){return"regular"===this.origin}isKeyframeRule(){return!1}cssModel(){return this.cssModelInternal}getStyleSheetHeader(e){const t=this.cssModelInternal.styleSheetHeaderForId(e);return console.assert(null!==t),t}}class on{text;range;specificity;constructor(e){this.text=e.text,e.range&&(this.range=t.TextRange.TextRange.fromObject(e.range)),e.specificity&&(this.specificity=e.specificity)}rebase(e){this.range&&(this.range=this.range.rebaseAfterTextEdit(e.oldRange,e.newRange))}}class an extends sn{selectors;nestingSelectors;media;containerQueries;supports;scopes;layers;ruleTypes;wasUsed;constructor(e,t,n){super(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId}),this.reinitializeSelectors(t.selectorList),this.nestingSelectors=t.nestingSelectors,this.media=t.media?$t.parseMediaArrayPayload(e,t.media):[],this.containerQueries=t.containerQueries?Ut.parseContainerQueriesPayload(e,t.containerQueries):[],this.scopes=t.scopes?Jt.parseScopesPayload(e,t.scopes):[],this.supports=t.supports?nn.parseSupportsPayload(e,t.supports):[],this.layers=t.layers?Wt.parseLayerPayload(e,t.layers):[],this.ruleTypes=t.ruleTypes||[],this.wasUsed=n||!1}static createDummyRule(e,n){const r={selectorList:{text:"",selectors:[{text:n,value:void 0}]},style:{styleSheetId:"0",range:new t.TextRange.TextRange(0,0,0,0),shorthandEntries:[],cssProperties:[]},origin:"inspector"};return new an(e,r)}reinitializeSelectors(e){this.selectors=[];for(let t=0;te.text)).join(", ")}selectorRange(){if(0===this.selectors.length)return null;const e=this.selectors[0].range,n=this.selectors[this.selectors.length-1].range;return e&&n?new t.TextRange.TextRange(e.startLine,e.startColumn,n.endLine,n.endColumn):null}lineNumberInSource(e){const t=this.selectors[e];if(!t?.range||!this.styleSheetId)return 0;return this.getStyleSheetHeader(this.styleSheetId).lineNumberInSource(t.range.startLine)}columnNumberInSource(e){const t=this.selectors[e];if(!t?.range||!this.styleSheetId)return;return this.getStyleSheetHeader(this.styleSheetId).columnNumberInSource(t.range.startLine,t.range.startColumn)}rebase(e){if(this.styleSheetId!==e.styleSheetId)return;const t=this.selectorRange();if(t?.equal(e.oldRange))this.reinitializeSelectors(e.payload);else for(let t=0;tt.rebase(e))),this.containerQueries.forEach((t=>t.rebase(e))),this.scopes.forEach((t=>t.rebase(e))),this.supports.forEach((t=>t.rebase(e))),super.rebase(e)}}class ln extends sn{#tt;constructor(e,t){super(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId}),this.#tt=new on(t.propertyName)}propertyName(){return this.#tt}initialValue(){return this.style.hasActiveProperty("initial-value")?this.style.getPropertyValue("initial-value"):null}syntax(){return this.style.getPropertyValue("syntax")}inherits(){return"true"===this.style.getPropertyValue("inherits")}setPropertyName(e){const t=this.styleSheetId;if(!t)throw new Error("No rule stylesheet id");const n=this.#tt.range;if(!n)throw new Error("Property name is not editable");return this.cssModelInternal.setPropertyRulePropertyName(t,n,e)}}class dn extends sn{#nt;constructor(e,t){super(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId}),this.#nt=new on(t.fontPaletteName)}name(){return this.#nt}}class cn{#$e;#rt;constructor(e,t){this.#$e=new on(t.animationName),this.#rt=t.keyframes.map((t=>new hn(e,t)))}name(){return this.#$e}keyframes(){return this.#rt}}class hn extends sn{#st;constructor(e,t){super(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId}),this.reinitializeKey(t.keyText)}key(){return this.#st}reinitializeKey(e){this.#st=new on(e)}rebase(e){this.styleSheetId===e.styleSheetId&&this.#st.range&&(e.oldRange.equal(this.#st.range)?this.reinitializeKey(e.payload):this.#st.rebase(e),super.rebase(e))}isKeyframeRule(){return!0}setKeyText(e){const t=this.styleSheetId;if(!t)throw new Error("No rule stylesheet id");const n=this.#st.range;if(!n)throw new Error("Keyframe key is not editable");return this.cssModelInternal.setKeyframeKey(t,n,e)}}class un extends sn{#tt;#Oe;constructor(e,t){super(e,{origin:t.origin,style:t.style,styleSheetId:t.styleSheetId}),this.#tt=new on(t.name),this.#Oe=t.active}name(){return this.#tt}active(){return this.#Oe}}class gn extends sn{#tt;#it;#ot;constructor(e,t){super(e,{origin:t.origin,style:{cssProperties:[],shorthandEntries:[]},styleSheetId:t.styleSheetId}),this.#tt=new on(t.name),this.#it=t.parameters.map((({name:e})=>e)),this.#ot=this.protocolNodesToNestedStyles(t.children)}functionName(){return this.#tt}parameters(){return this.#it}children(){return this.#ot}protocolNodesToNestedStyles(e){const t=[];for(const n of e){const e=this.protocolNodeToNestedStyle(n);e&&t.push(e)}return t}protocolNodeToNestedStyle(e){if(e.style)return{style:new en(this.cssModelInternal,this,e.style,Yt.Regular)};if(e.condition){const t=this.protocolNodesToNestedStyles(e.condition.children);return e.condition.media?{children:t,media:new $t(this.cssModelInternal,e.condition.media)}:e.condition.containerQueries?{children:t,container:new Ut(this.cssModelInternal,e.condition.containerQueries)}:e.condition.supports?{children:t,supports:new nn(this.cssModelInternal,e.condition.supports)}:void console.error("A function rule condition must have a media, container, or supports")}console.error("A function rule node must have a style or condition")}}var pn=Object.freeze({__proto__:null,CSSFontPaletteValuesRule:dn,CSSFunctionRule:gn,CSSKeyframeRule:hn,CSSKeyframesRule:cn,CSSPositionTryRule:un,CSSPropertyRule:ln,CSSRule:sn,CSSStyleRule:an});function mn(e,t){if(!t.styleSheetId||!t.range)return!1;for(const n of e)if(t.styleSheetId===n.styleSheetId&&n.range&&t.range.equal(n.range))return!0;return!1}function fn(e){const t=e.allProperties();for(let e=0;e({name:e,value:t}))),t.rule.style.cssProperties=[...r.entries()].map((([e,t])=>({name:e,value:t})))}function r(e){return e.rule.media?e.rule.media.map((e=>e.text)).join(", "):null}function s(e){const{matchingSelectors:t,rule:n}=e;"user-agent"===n.origin&&t.length&&(n.selectorList.selectors=n.selectorList.selectors.filter(((e,n)=>t.includes(n))),n.selectorList.text=n.selectorList.selectors.map((e=>e.text)).join(", "),e.matchingSelectors=t.map(((e,t)=>t)))}}function yn(e){const t=new Map;for(let n=0;nnew ln(e,t))),...o].map((t=>new vn(e,t))),n&&(this.#rt=n.map((t=>new cn(e,t)))),this.#It=s.map((t=>new un(e,t))),this.#vt=r,this.#Rt=a?new dn(e,a):void 0,this.#wt=l,this.#xt=d.map((t=>new gn(e,t)))}async init({matchedPayload:e,inheritedPayload:t,inlinePayload:n,attributesPayload:r,pseudoPayload:s,inheritedPseudoPayload:i,animationStylesPayload:o,transitionsStylePayload:a,inheritedAnimatedPayload:l}){e=bn(e);for(const e of t)e.matchedCSSRules=bn(e.matchedCSSRules);this.#St=await this.buildMainCascade(n,r,e,t,o,a,l),[this.#kt,this.#Ct]=this.buildPseudoCascades(s,i);for(const e of Array.from(this.#Ct.values()).concat(Array.from(this.#kt.values())).concat(this.#St))for(const t of e.styles())this.#yt.set(t,e);for(const e of this.#pt)this.#mt.set(e.propertyName(),e)}async buildMainCascade(e,t,n,r,s,i,o){const a=[],l=[];function d(){if(!t)return;const e=new en(this.#je,null,t,Yt.Attributes);this.#ft.set(e,this.#ht),l.push(e)}if(i){const e=new en(this.#je,null,i,Yt.Transition);this.#ft.set(e,this.#ht),l.push(e)}for(const e of s){const t=new en(this.#je,null,e.style,Yt.Animation,e.name);this.#ft.set(t,this.#ht),l.push(t)}if(e&&this.#ht.nodeType()===Node.ELEMENT_NODE){const t=new en(this.#je,null,e,Yt.Inline);this.#ft.set(t,this.#ht),l.push(t)}let c;for(let e=n.length-1;e>=0;--e){const t=new an(this.#je,n[e].rule);!t.isInjected()&&!t.isUserAgent()||c||(c=!0,d.call(this)),this.#ft.set(t.style,this.#ht),l.push(t.style),this.addMatchingSelectors(this.#ht,t,n[e].matchingSelectors)}c||d.call(this),a.push(new wn(this,l,!1));let h=this.#ht.parentNode;const u=async e=>e.hasAssignedSlot()?await(e.assignedSlot?.deferredNode.resolvePromise())??null:e.parentNode;for(let e=0;h&&r&&enew en(this.#je,null,e.style,Yt.Animation,e.name)))??[];d&&fn(d)&&(this.#ft.set(d,h),t.push(d),this.#bt.add(d));for(const e of c)fn(e)&&(this.#ft.set(e,h),t.push(e),this.#bt.add(e));i&&fn(i)&&(this.#ft.set(i,h),t.push(i),this.#bt.add(i));const g=n.matchedCSSRules||[];for(let e=g.length-1;e>=0;--e){const n=new an(this.#je,g[e].rule);this.addMatchingSelectors(h,n,g[e].matchingSelectors),fn(n.style)&&((n.style.allProperties().some((e=>S().isCustomProperty(e.name)))||!mn(l,n.style)&&!mn(this.#bt,n.style))&&(this.#ft.set(n.style,h),t.push(n.style),this.#bt.add(n.style)))}h=await u(h),a.push(new wn(this,t,!0))}return new Tn(a,this.#pt)}buildSplitCustomHighlightCascades(e,t,n,r){const s=new Map;for(let r=e.length-1;r>=0;--r){const i=yn(e[r]);for(const[o,a]of i){const i=new an(this.#je,e[r].rule);this.#ft.set(i.style,t),n&&this.#bt.add(i.style),this.addMatchingSelectors(t,i,a);const l=s.get(o);l?l.push(i.style):s.set(o,[i.style])}}for(const[e,t]of s){const s=new wn(this,t,n,!0),i=r.get(e);i?i.push(s):r.set(e,[s])}}buildPseudoCascades(e,t){const n=new Map,r=new Map;if(!e)return[n,r];const s=new Map,i=new Map;for(let t=0;t=0;--e){const t=new an(this.#je,a[e].rule);o.push(t.style);const s=S().isHighlightPseudoType(n.pseudoType)?this.#ht:r;this.#ft.set(t.style,s),s&&this.addMatchingSelectors(s,t,a[e].matchingSelectors)}const e=S().isHighlightPseudoType(n.pseudoType),t=new wn(this,o,!1,e);s.set(n.pseudoType,[t])}}if(t){let e=this.#ht.parentNode;for(let n=0;e&&n=0;--n){const r=new an(this.#je,o[n].rule);t.push(r.style),this.#ft.set(r.style,e),this.#bt.add(r.style),this.addMatchingSelectors(e,r,o[n].matchingSelectors)}const r=S().isHighlightPseudoType(n.pseudoType),i=new wn(this,t,!0,r),a=s.get(n.pseudoType);a?a.push(i):s.set(n.pseudoType,[i])}}e=e.parentNode}}for(const[e,t]of s.entries())n.set(e,new Tn(t,this.#pt));for(const[e,t]of i.entries())r.set(e,new Tn(t,this.#pt));return[n,r]}addMatchingSelectors(e,t,n){for(const r of n){const n=t.selectors[r];n&&this.setSelectorMatches(e,n.text,!0)}}node(){return this.#ht}cssModel(){return this.#je}hasMatchingSelectors(e){return(0===e.selectors.length||this.getMatchingSelectors(e).length>0)&&function(e){if(!e.parentRule)return!0;const t=e.parentRule,n=[...t.media,...t.containerQueries,...t.supports,...t.scopes];for(const e of n)if(!e.active())return!1;return!0}(e.style)}getParentLayoutNodeId(){return this.#vt}getMatchingSelectors(e){const t=this.nodeForStyle(e.style);if(!t||"number"!=typeof t.id)return[];const n=this.#gt.get(t.id);if(!n)return[];const r=[];for(let t=0;tthis.isInherited(e)))??[]}animationStyles(){return this.#St?.styles().filter((e=>!this.isInherited(e)&&e.type===Yt.Animation))??[]}transitionsStyle(){return this.#St?.styles().find((e=>!this.isInherited(e)&&e.type===Yt.Transition))??null}registeredProperties(){return this.#pt}getRegisteredProperty(e){return this.#mt.get(e)}functionRules(){return this.#xt}fontPaletteValuesRule(){return this.#Rt}keyframes(){return this.#rt}positionTryRules(){return this.#It}activePositionFallbackIndex(){return this.#wt}pseudoStyles(e){r.assertNotNullOrUndefined(this.#kt);const t=this.#kt.get(e);return t?t.styles():[]}pseudoTypes(){return r.assertNotNullOrUndefined(this.#kt),new Set(this.#kt.keys())}customHighlightPseudoStyles(e){r.assertNotNullOrUndefined(this.#Ct);const t=this.#Ct.get(e);return t?t.styles():[]}customHighlightPseudoNames(){return r.assertNotNullOrUndefined(this.#Ct),new Set(this.#Ct.keys())}nodeForStyle(e){return this.#ut.get(e)||this.#ft.get(e)||null}availableCSSVariables(e){const t=this.#yt.get(e);return t?t.findAvailableCSSVariables(e):[]}computeCSSVariable(e,t){const n=this.#yt.get(e);return n?n.computeCSSVariable(e,t):null}resolveProperty(e,t){return this.#yt.get(t)?.resolveProperty(e,t)??null}resolveGlobalKeyword(e,t){const n=this.#yt.get(e.ownerStyle)?.resolveGlobalKeyword(e,t);return n?new kn(n):null}isInherited(e){return this.#bt.has(e)}propertyState(e){const t=this.#yt.get(e.ownerStyle);return t?t.propertyState(e):null}resetActiveProperties(){r.assertNotNullOrUndefined(this.#St),r.assertNotNullOrUndefined(this.#kt),r.assertNotNullOrUndefined(this.#Ct),this.#St.reset();for(const e of this.#kt.values())e.reset();for(const e of this.#Ct.values())e.reset()}propertyMatchers(e,t){return[new ve(this,e),new De((()=>t?.get("color")??null)),new Me,new Ee,new xe,new Ue,new ze,new Ve,new Ge,new Fe(e),new nt,new Ae,new st,new ot,new et,new ct,new Xe,new Ye,new _e,new we]}}class wn{#Tt;styles;#Mt;#Pt;propertiesState=new Map;activeProperties=new Map;constructor(e,t,n,r=!1){this.#Tt=e,this.styles=t,this.#Mt=n,this.#Pt=r}computeActiveProperties(){this.propertiesState.clear(),this.activeProperties.clear();for(let e=this.styles.length-1;e>=0;e--){const t=this.styles[e],n=t.parentRule;if((!n||n instanceof an)&&(!n||this.#Tt.hasMatchingSelectors(n)))for(const e of t.allProperties()){const n=S();if(this.#Mt&&!this.#Pt&&!n.isPropertyInherited(e.name))continue;if(t.range&&!e.range)continue;if(!e.activeInStyle()){this.propertiesState.set(e,"Overloaded");continue}if(this.#Mt){const t=this.#Tt.getRegisteredProperty(e.name);if(t&&!t.inherits()){this.propertiesState.set(e,"Overloaded");continue}}const r=n.canonicalPropertyName(e.name);this.updatePropertyState(e,r);for(const t of e.getLonghandProperties())n.isCSSPropertyName(t.name)&&this.updatePropertyState(t,t.name)}}}updatePropertyState(e,t){const n=this.activeProperties.get(t);!n?.important||e.important?(n&&this.propertiesState.set(n,"Overloaded"),this.propertiesState.set(e,"Active"),this.activeProperties.set(t,e)):this.propertiesState.set(e,"Overloaded")}}function Sn(e){return"ownerStyle"in e}class kn{declaration;constructor(e){this.declaration=e}get value(){return Sn(this.declaration)?this.declaration.value:this.declaration.initialValue()}get style(){return Sn(this.declaration)?this.declaration.ownerStyle:this.declaration.style()}get name(){return Sn(this.declaration)?this.declaration.name:this.declaration.propertyName()}}class Cn{nodeCascade;name;discoveryTime;rootDiscoveryTime;get isRootEntry(){return this.rootDiscoveryTime===this.discoveryTime}updateRoot(e){this.rootDiscoveryTime=Math.min(this.rootDiscoveryTime,e.rootDiscoveryTime)}constructor(e,t,n){this.nodeCascade=e,this.name=t,this.discoveryTime=n,this.rootDiscoveryTime=n}}class xn{#Et=0;#Lt=[];#At=new Map;get(e,t){return this.#At.get(e)?.get(t)}add(e,t){const n=this.get(e,t);if(n)return n;const r=new Cn(e,t,this.#Et++);this.#Lt.push(r);let s=this.#At.get(e);return s||(s=new Map,this.#At.set(e,s)),s.set(t,r),r}isInInProgressSCC(e){return this.#Lt.includes(e)}finishSCC(e){const t=this.#Lt.lastIndexOf(e);return console.assert(t>=0,"Root is not an in-progress scc"),this.#Lt.splice(t)}}function*Rn(e,t){for(let n=void 0!==t?e.indexOf(t)+1:0;nn.name===e.name&&t(n)));if(n)return n}return null}resolveProperty(e,t){const n=this.#Ft.get(t);if(!n)return null;for(const r of function*(e,t){(void 0===t||e.includes(t))&&(void 0!==t&&(yield t),yield*Rn(e,t))}(n.styles,t)){const t=r.allProperties().findLast((t=>t.name===e));if(t)return t}return this.#Ut({name:e,ownerStyle:t})}#qt(e){const t=this.#Ft.get(e.ownerStyle);if(!t)return null;for(const n of Rn(this.#_t,t))for(const t of n.styles){const n=t.allProperties().findLast((t=>t.name===e.name));if(n)return n}return null}#Ut(e){return S().isPropertyInherited(e.name)&&(this.#zt(e.name)?.inherits()??1)?this.#qt(e):null}#zt(e){const t=this.#pt.find((t=>t.propertyName()===e));return t||null}resolveGlobalKeyword(e,t){const n=t=>t.ownerStyle.parentRule instanceof an&&(e.ownerStyle.type===Yt.Inline||e.ownerStyle.parentRule instanceof an&&"regular"===t.ownerStyle.parentRule?.origin&&JSON.stringify(t.ownerStyle.parentRule.layers)!==JSON.stringify(e.ownerStyle.parentRule.layers));switch(t){case"initial":return this.#zt(e.name);case"inherit":return this.#qt(e)??this.#zt(e.name);case"revert":return this.#Ht(e,(t=>null!==t.ownerStyle.parentRule&&t.ownerStyle.parentRule.origin!==(e.ownerStyle.parentRule?.origin??"regular")))??this.resolveGlobalKeyword(e,"unset");case"revert-layer":return this.#Ht(e,n)??this.resolveGlobalKeyword(e,"revert");case"unset":return this.#Ut(e)??this.#zt(e.name)}}computeCSSVariable(e,t){const n=this.#Ft.get(e);return n?(this.ensureInitialized(),this.innerComputeCSSVariable(n,t)):null}innerComputeCSSVariable(e,t,n=new xn){const r=this.#Dt.get(e),s=this.#Nt.get(e);if(!s||!r?.has(t))return null;if(s?.has(t))return s.get(t)||null;let i=r.get(t);if(null==i)return null;if(i.declaration.declaration instanceof Ft&&i.declaration.value&&f.isCSSWideKeyword(i.declaration.value)){const e=this.resolveGlobalKeyword(i.declaration.declaration,i.declaration.value);if(!e)return i;const t=new kn(e),{value:n}=t;if(!n)return i;i={declaration:t,value:n}}const o=Lt(`--${t}`,i.value);if(!o)return null;const a=n.add(e,t),l=Ct.walk(o,[new be((e=>{const t=i.declaration.style,r=this.#Ft.get(t);if(!r)return null;const s=n.get(r,e.name);if(s)return n.isInInProgressSCC(s)?(a.updateRoot(s),null):this.#Nt.get(r)?.get(e.name)?.value??null;const o=this.innerComputeCSSVariable(r,e.name,n),l=n.get(r,e.name);return l&&a.updateRoot(l),void 0!==o?.value?o.value:0===e.fallback.length||e.matching.hasUnresolvedVarsRange(e.fallback[0],e.fallback[e.fallback.length-1])?null:e.matching.getComputedTextRange(e.fallback[0],e.fallback[e.fallback.length-1])}))]),d=Pt.siblings(Pt.declValue(l.ast.tree)),c=d.length>0?l.getComputedTextRange(d[0],d[d.length-1]):"";if(a.isRootEntry){const t=n.finishSCC(a);if(t.length>1){for(const n of t)console.assert(n.nodeCascade===e,"Circles should be within the cascade"),s.set(n.name,null);return null}}if(d.length>0&&l.hasUnresolvedVarsRange(d[0],d[d.length-1]))return s.set(t,null),null;const h={value:c,declaration:i.declaration};return s.set(t,h),h}styles(){return Array.from(this.#Ft.keys())}propertyState(e){return this.ensureInitialized(),this.#Ot.get(e)||null}reset(){this.#Bt=!1,this.#Ot.clear(),this.#Dt.clear(),this.#Nt.clear()}ensureInitialized(){if(this.#Bt)return;this.#Bt=!0;const e=new Map;for(const t of this.#_t){t.computeActiveProperties();for(const[n,r]of t.propertiesState){if("Overloaded"===r){this.#Ot.set(n,"Overloaded");continue}const t=S().canonicalPropertyName(n.name);e.has(t)?this.#Ot.set(n,"Overloaded"):(e.set(t,n),this.#Ot.set(n,"Active"))}}for(const[t,n]of e){const r=n.ownerStyle,s=n.getLonghandProperties();if(!s.length)continue;let i=!1;for(const t of s){const n=S().canonicalPropertyName(t.name),s=e.get(n);if(s&&s.ownerStyle===r){i=!0;break}}i||(e.delete(t),this.#Ot.set(n,"Overloaded"))}const t=new Map;for(const e of this.#pt){const n=e.initialValue();t.set(e.propertyName(),null!==n?{value:n,declaration:new kn(e)}:null)}for(let e=this.#_t.length-1;e>=0;--e){const n=this.#_t[e],r=[];for(const e of n.activeProperties.entries()){const n=e[0],s=e[1];n.startsWith("--")&&(t.set(n,{value:s.value,declaration:new kn(s)}),r.push(n))}const s=new Map(t),i=new Map;this.#Dt.set(n,s),this.#Nt.set(n,i);for(const e of r){const r=t.get(e);t.delete(e);const s=this.innerComputeCSSVariable(n,e);r&&s?.value===r.value&&(s.declaration=r.declaration),t.set(e,s)}}}}var Mn=Object.freeze({__proto__:null,CSSMatchedStyles:In,CSSRegisteredProperty:vn,CSSValueSource:kn});const Pn={couldNotFindTheOriginalStyle:"Could not find the original style sheet.",thereWasAnErrorRetrievingThe:"There was an error retrieving the source styles."},En=n.i18n.registerUIStrings("core/sdk/CSSStyleSheetHeader.ts",Pn),Ln=n.i18n.getLocalizedString.bind(void 0,En);class An{#je;id;frameId;sourceURL;hasSourceURL;origin;title;disabled;isInline;isMutable;isConstructed;startLine;startColumn;endLine;endColumn;contentLength;ownerNode;sourceMapURL;loadingFailed;#jt;constructor(e,t){this.#je=e,this.id=t.styleSheetId,this.frameId=t.frameId,this.sourceURL=t.sourceURL,this.hasSourceURL=Boolean(t.hasSourceURL),this.origin=t.origin,this.title=t.title,this.disabled=t.disabled,this.isInline=t.isInline,this.isMutable=t.isMutable,this.isConstructed=t.isConstructed,this.startLine=t.startLine,this.startColumn=t.startColumn,this.endLine=t.endLine,this.endColumn=t.endColumn,this.contentLength=t.length,t.ownerNode&&(this.ownerNode=new js(e.target(),t.ownerNode)),this.sourceMapURL=t.sourceMapURL,this.loadingFailed=t.loadingFailed??!1,this.#jt=null}originalContentProvider(){if(!this.#jt){const e=async()=>{const e=await this.#je.originalStyleSheetText(this);return null===e?{error:Ln(Pn.couldNotFindTheOriginalStyle)}:new t.ContentData.ContentData(e,!1,"text/css")};this.#jt=new t.StaticContentProvider.StaticContentProvider(this.contentURL(),this.contentType(),e)}return this.#jt}setSourceMapURL(e){this.sourceMapURL=e}cssModel(){return this.#je}isAnonymousInlineStyleSheet(){return!this.resourceURL()&&!this.#je.sourceMapManager().sourceMapForClient(this)}isConstructedByNew(){return this.isConstructed&&0===this.sourceURL.length}resourceURL(){return this.isViaInspector()?this.viaInspectorResourceURL():this.sourceURL}getFrameURLPath(){const t=this.#je.target().model(ii);if(console.assert(Boolean(t)),!t)return"";const n=t.frameForId(this.frameId);if(!n)return"";console.assert(Boolean(n));const r=new e.ParsedURL.ParsedURL(n.url);let s=r.host+r.folderPathComponents;return s.endsWith("/")||(s+="/"),s}viaInspectorResourceURL(){return`inspector:///inspector-stylesheet#${this.id}`}lineNumberInSource(e){return this.startLine+e}columnNumberInSource(e,t){return(e?0:this.startColumn)+t}containsLocation(e,t){const n=e===this.startLine&&t>=this.startColumn||e>this.startLine,r=ee.isOutermostFrame()));this.#Kt=e.length>0?e[0]:null}getFrame(e){const t=this.#Wt.get(e);return t?t.frame:null}getAllFrames(){return Array.from(this.#Wt.values(),(e=>e.frame))}getOutermostFrame(){return this.#Kt}async getOrWaitForFrame(e,t){const n=this.getFrame(e);return!n||t&&t===n.resourceTreeModel().target()?await new Promise((n=>{const r=this.#$t.get(e);r?r.push({notInTarget:t,resolve:n}):this.#$t.set(e,[{notInTarget:t,resolve:n}])})):n}resolveAwaitedFrame(e){const t=this.#$t.get(e.id);if(!t)return;const n=t.filter((({notInTarget:t,resolve:n})=>!(!t||t!==e.resourceTreeModel().target())||(n(e),!1)));n.length>0?this.#$t.set(e.id,n):this.#$t.delete(e.id)}}var Fn=Object.freeze({__proto__:null,FrameManager:Nn});class Bn{static fromLocalObject(e){return new zn(e)}static type(e){if(null===e)return"null";const t=typeof e;return"object"!==t&&"function"!==t?t:e.type}static isNullOrUndefined(e){if(void 0===e)return!0;switch(e.type){case"object":return"null"===e.subtype;case"undefined":return!0;default:return!1}}static arrayNameFromDescription(e){return e.replace(Gn,"").replace(Kn,"")}static arrayLength(e){if("array"!==e.subtype&&"typedarray"!==e.subtype)return 0;const t=e.description?.match(Gn),n=e.description?.match(Kn);return t?parseInt(t[1],10):n?parseInt(n[1],10):0}static arrayBufferByteLength(e){if("arraybuffer"!==e.subtype)return 0;const t=e.description?.match(Gn);return t?parseInt(t[1],10):0}static unserializableDescription(e){if("number"==typeof e){const t=String(e);if(0===e&&1/e<0)return"-0";if("NaN"===t||"Infinity"===t||"-Infinity"===t)return t}return"bigint"==typeof e?e+"n":null}static toCallArgument(e){const t=typeof e;if("undefined"===t)return{};const n=Bn.unserializableDescription(e);if("number"===t)return null!==n?{unserializableValue:n}:{value:e};if("bigint"===t)return{unserializableValue:n};if("string"===t||"boolean"===t)return{value:e};if(!e)return{value:null};const r=e;if(e instanceof Bn){const t=e.unserializableValue();if(void 0!==t)return{unserializableValue:t}}else if(void 0!==r.unserializableValue)return{unserializableValue:r.unserializableValue};return void 0!==r.objectId?{objectId:r.objectId}:{value:r.value}}static async loadFromObjectPerProto(e,t,n=!1){const r=await Promise.all([e.getAllProperties(!0,t,n),e.getOwnProperties(t,n)]),s=r[0].properties,i=r[1].properties,o=r[1].internalProperties;if(!i||!s)return{properties:null,internalProperties:null};const a=new Map,l=[];for(let e=0;e100){r+=",…";break}e&&(r+=", "),r+=t}return r+=t,r}get type(){return typeof this.valueInternal}get subtype(){return null===this.valueInternal?"null":Array.isArray(this.valueInternal)?"array":this.valueInternal instanceof Date?"date":void 0}get hasChildren(){return"object"==typeof this.valueInternal&&null!==this.valueInternal&&Boolean(Object.keys(this.valueInternal).length)}async getOwnProperties(e,t=!1){let n=this.children();return t&&(n=n.filter((e=>!function(e){const t=Number(e)>>>0;return String(t)===e}(e.name)))),{properties:n,internalProperties:null}}async getAllProperties(e,t,n=!1){return e?{properties:[],internalProperties:null}:await this.getOwnProperties(t,n)}children(){return this.hasChildren?(this.#an||(this.#an=Object.entries(this.valueInternal).map((([e,t])=>new qn(e,t instanceof Bn?t:Bn.fromLocalObject(t))))),this.#an):[]}arrayLength(){return Array.isArray(this.valueInternal)?this.valueInternal.length:0}async callFunction(e,t){const n=this.valueInternal,r=t?t.map((e=>e.value)):[];let s,i=!1;try{s=e.apply(n,r)}catch{i=!0}return{object:Bn.fromLocalObject(s),wasThrown:i}}async callFunctionJSON(e,t){const n=this.valueInternal,r=t?t.map((e=>e.value)):[];let s;try{s=e.apply(n,r)}catch{s=null}return s}}class jn{#ln;constructor(e){this.#ln=e}static objectAsArray(e){if(!e||"object"!==e.type||"array"!==e.subtype&&"typedarray"!==e.subtype)throw new Error("Object is empty or not an array");return new jn(e)}static async createFromRemoteObjects(e){if(!e.length)throw new Error("Input array is empty");const t=await e[0].callFunction((function(...e){return e}),e.map(Bn.toCallArgument));if(t.wasThrown||!t.object)throw new Error("Call function throws exceptions or returns empty value");return jn.objectAsArray(t.object)}async at(e){if(e<0||e>this.#ln.arrayLength())throw new Error("Out of range");const t=await this.#ln.callFunction((function(e){return this[e]}),[Bn.toCallArgument(e)]);if(t.wasThrown||!t.object)throw new Error("Exception in callFunction or result value is empty");return t.object}length(){return this.#ln.arrayLength()}map(e){const t=[];for(let n=0;n"[[TargetFunction]]"===e));return t?.value??this.#dn}async targetFunctionDetails(){const e=await this.targetFunction(),t=await e.debuggerModel().functionDetailsPromise(e);return this.#dn!==e&&e.release(),t}}class Wn{#dn;#cn;#hn;constructor(e){this.#dn=e}static objectAsError(e){if("error"!==e.subtype)throw new Error(`Object of type ${e.subtype} is not an error`);return new Wn(e)}get errorStack(){return this.#dn.description??""}exceptionDetails(){return this.#cn||(this.#cn=this.#un()),this.#cn}#un(){return this.#dn.objectId?this.#dn.runtimeModel().getExceptionDetails(this.#dn.objectId):Promise.resolve(void 0)}cause(){return this.#hn||(this.#hn=this.#gn()),this.#hn}async#gn(){const e=await this.#dn.getAllProperties(!1,!1),t=e.properties?.find((e=>"cause"===e.name));return t?.value}}const Gn=/\(([0-9]+)\)/,Kn=/\[([0-9]+)\]/;var Qn=Object.freeze({__proto__:null,LinearMemoryInspectable:class{object;expression;constructor(e,t){if(!e.isLinearMemoryInspectable())throw new Error("object must be linear memory inspectable");this.object=e,this.expression=t}},LocalJSONObject:zn,RemoteArray:jn,RemoteArrayBuffer:class{#ln;constructor(e){if("object"!==e.type||"arraybuffer"!==e.subtype)throw new Error("Object is not an arraybuffer");this.#ln=e}byteLength(){return this.#ln.arrayBufferByteLength()}async bytes(e=0,t=this.byteLength()){if(e<0||e>=this.byteLength())throw new RangeError("start is out of range");if(tthis.byteLength())throw new RangeError("end is out of range");return await this.#ln.callFunctionJSON((function(e,t){return[...new Uint8Array(this,e,t)]}),[{value:e},{value:t-e}])}object(){return this.#ln}},RemoteError:Wn,RemoteFunction:Vn,RemoteObject:Bn,RemoteObjectImpl:_n,RemoteObjectProperty:qn,ScopeRef:Un,ScopeRemoteObject:Hn});class $n extends h{constructor(e){super(e)}async read(t,n,r){const s=await this.target().ioAgent().invoke_read({handle:t,offset:r,size:n});if(s.getError())throw new Error(s.getError());return s.eof?null:s.base64Encoded?e.Base64.decode(s.data):s.data}async close(e){(await this.target().ioAgent().invoke_close({handle:e})).getError()&&console.error("Could not close stream.")}async resolveBlob(e){const t=e instanceof Bn?e.objectId:e;if(!t)throw new Error("Remote object has undefined objectId");const n=await this.target().ioAgent().invoke_resolveBlob({objectId:t});if(n.getError())throw new Error(n.getError());return`blob:${n.uuid}`}async readToString(e){const t=[],n=new TextDecoder;for(;;){const r=await this.read(e,4194304);if(null===r){t.push(n.decode());break}r instanceof ArrayBuffer?t.push(n.decode(r,{stream:!0})):t.push(r)}return t.join("")}}h.register($n,{capabilities:131072,autostart:!0});var Xn=Object.freeze({__proto__:null,IOModel:$n});const Jn={loadCanceledDueToReloadOf:"Load canceled due to reload of inspected page"},Yn=n.i18n.registerUIStrings("core/sdk/PageResourceLoader.ts",Jn),Zn=n.i18n.getLocalizedString.bind(void 0,Yn);function er(e){return"extensionId"in e}let tr=null;class nr extends e.ObjectWrapper.ObjectWrapper{#pn=0;#mn=!1;#fn=void 0;#bn=new Map;#yn;#vn=new Map;#In=[];#wn;constructor(e,t){super(),this.#yn=t,W.instance().addModelListener(ii,ri.PrimaryPageChanged,this.onPrimaryPageChanged,this),this.#wn=e}static instance({forceNew:e,loadOverride:t,maxConcurrentLoads:n}={forceNew:!1,loadOverride:null,maxConcurrentLoads:500}){return tr&&!e||(tr=new nr(t,n)),tr}static removeInstance(){tr=null}onPrimaryPageChanged(e){const{frame:t,type:n}=e.data;if(!t.isOutermostFrame())return;for(const{reject:e}of this.#In)e(new Error(Zn(Jn.loadCanceledDueToReloadOf)));this.#In=[];const r=t.resourceTreeModel().target(),s=new Map;for(const[e,t]of this.#vn.entries())"Activation"===n&&r===t.initiator.target&&s.set(e,t);this.#vn=s,this.dispatchEventToListeners("Update")}getResourcesLoaded(){return this.#vn}getScopedResourcesLoaded(){return new Map([...this.#vn].filter((([e,t])=>W.instance().isInScope(t.initiator.target)||er(t.initiator))))}getNumberOfResources(){return{loading:this.#pn,queued:this.#In.length,resources:this.#vn.size}}getScopedNumberOfResources(){const e=W.instance();let t=0;for(const[n,r]of this.#bn){const s=e.targetById(n);e.isInScope(s)&&(t+=r)}return{loading:t,resources:this.getScopedResourcesLoaded().size}}async acquireLoadSlot(e){if(this.#pn++,e){const t=this.#bn.get(e.id())||0;this.#bn.set(e.id(),t+1)}if(this.#pn>this.#yn){const{promise:e,resolve:t,reject:n}=Promise.withResolvers();this.#In.push({resolve:t,reject:n}),await e}}releaseLoadSlot(e){if(this.#pn--,e){const t=this.#bn.get(e.id());t&&this.#bn.set(e.id(),t-1)}const t=this.#In.shift();t&&t.resolve()}static makeExtensionKey(e,t){if(er(t)&&t.extensionId)return`${e}-${t.extensionId}`;throw new Error("Invalid initiator")}static makeKey(e,t){if(t.frameId)return`${e}-${t.frameId}`;if(t.target)return`${e}-${t.target.id()}`;throw new Error("Invalid initiator")}resourceLoadedThroughExtension(e){const t=nr.makeExtensionKey(e.url,e.initiator);this.#vn.set(t,e),this.dispatchEventToListeners("Update")}async loadResource(e,t){if(er(t))throw new Error("Invalid initiator");const n=nr.makeKey(e,t),r={success:null,size:null,duration:null,errorMessage:void 0,url:e,initiator:t};this.#vn.set(n,r),this.dispatchEventToListeners("Update");const s=performance.now();try{await this.acquireLoadSlot(t.target);const n=this.dispatchLoad(e,t),s=await n;if(this.#mn||(window.clearTimeout(this.#fn),this.#fn=window.setTimeout((()=>{this.#mn||0!==this.#pn||(a.rnPerfMetrics.developerResourcesStartupLoadingFinishedEvent(this.getNumberOfResources().resources,performance.now()-3e3),this.#mn=!0)}),3e3)),r.errorMessage=s.errorDescription.message,r.success=s.success,s.success)return r.size=s.content.length,{content:s.content};throw new Error(s.errorDescription.message)}catch(e){throw void 0===r.errorMessage&&(r.errorMessage=e.message),null===r.success&&(r.success=!1),e}finally{r.duration=performance.now()-s,this.releaseLoadSlot(t.target),this.dispatchEventToListeners("Update")}}async dispatchLoad(t,n){if(er(n))throw new Error("Invalid initiator");let r=null;if(this.#wn)return await this.#wn(t);const s=new e.ParsedURL.ParsedURL(t),i=rr().get()&&s&&"file"!==s.scheme&&"data"!==s.scheme&&"devtools"!==s.scheme;if(a.userMetrics.developerResourceScheme(this.getDeveloperResourceScheme(s)),i){try{if(n.target){a.userMetrics.developerResourceLoaded(0),a.rnPerfMetrics.developerResourceLoadingStarted(s,0);const e=await this.loadFromTarget(n.target,n.frameId,t);return a.rnPerfMetrics.developerResourceLoadingFinished(s,0,e),e}const e=Nn.instance().getFrame(n.frameId);if(e){a.userMetrics.developerResourceLoaded(1),a.rnPerfMetrics.developerResourceLoadingStarted(s,1);const r=await this.loadFromTarget(e.resourceTreeModel().target(),n.frameId,t);return a.rnPerfMetrics.developerResourceLoadingFinished(s,0,r),r}}catch(e){e instanceof Error&&(a.userMetrics.developerResourceLoaded(2),r=e.message),a.rnPerfMetrics.developerResourceLoadingFinished(s,2,{success:!1,errorDescription:{message:r}})}a.userMetrics.developerResourceLoaded(3),a.rnPerfMetrics.developerResourceLoadingStarted(s,3)}else{const e=rr().get()?6:5;a.userMetrics.developerResourceLoaded(e),a.rnPerfMetrics.developerResourceLoadingStarted(s,e)}const o=await ce.instance().loadResource(t);return i&&!o.success&&a.userMetrics.developerResourceLoaded(7),r&&(o.errorDescription.message=`Fetch through target failed: ${r}; Fallback: ${o.errorDescription.message}`),a.rnPerfMetrics.developerResourceLoadingFinished(s,4,o),o}getDeveloperResourceScheme(e){if(!e||""===e.scheme)return 1;const t="localhost"===e.host||e.host.endsWith(".localhost");switch(e.scheme){case"file":return 7;case"data":return 6;case"blob":return 8;case"http":return t?4:2;case"https":return t?5:3}return 0}async loadFromTarget(t,n,r){const s=t.model(Z),i=t.model($n),o=e.Settings.Settings.instance().moduleSetting("cache-disabled").get(),l=await s.loadNetworkResource(n,r,{disableCache:o,includeCredentials:!0});try{const e=l.stream?await i.readToString(l.stream):"";return{success:l.success,content:e,errorDescription:{statusCode:l.httpStatusCode||0,netError:l.netError,netErrorName:l.netErrorName,message:a.ResourceLoader.netErrorToMessage(l.netError,l.httpStatusCode,l.netErrorName)||"",urlValid:void 0}}}finally{l.stream&&i.close(l.stream)}}}function rr(){return e.Settings.Settings.instance().createSetting("load-through-target",!0)}var sr=Object.freeze({__proto__:null,PageResourceLoader:nr,ResourceKey:class{key;constructor(e){this.key=e}},getLoadThroughTargetSetting:rr});function ir(e,t){return e.line-t.line||e.column-t.column}function or(e,t={line:0,column:0}){if(!e.originalScopes||void 0===e.generatedRanges)throw new Error('Cant decode scopes without "originalScopes" or "generatedRanges"');const n=ar(e.originalScopes,e.names??[]);return{originalScopes:n.map((e=>e.root)),generatedRanges:dr(e.generatedRanges,n,e.names??[],t)}}function ar(e,t){return e.map((e=>function(e,t){const n=new Map,r=[];let s=0,i=0;for(const[o,a]of function*(e){const t=new Er(e);let n=0,r=0;for(;t.hasNext();){","===t.peek()&&t.next();const[e,s]=[t.nextVLQ(),t.nextVLQ()];if(0===e&&st[e])),h={start:{line:s,column:e},end:{line:s,column:e},kind:l,name:d,isStackFrame:Boolean(4&a.flags),variables:c,children:[]};r.push(h),n.set(o,h)}else{const t=r.pop();if(!t)throw new Error('Scope items not nested properly: encountered "end" item without "start" item');if(t.end={line:s,column:e},0===r.length)return{root:t,scopeForItemIndex:n};t.parent=r[r.length-1],r[r.length-1].children.push(t)}}throw new Error("Malformed original scope encoding")}(e,t)))}function lr(e){return"flags"in e}function dr(e,t,n,r={line:0,column:0}){const s=[{start:{line:0,column:0},end:{line:0,column:0},isStackFrame:!1,isHidden:!1,children:[],values:[]}],i=new Map;for(const o of function*(e,t){const n=new Er(e);let r=t.line;const s={line:t.line,column:t.column,defSourceIdx:0,defScopeIdx:0,callsiteSourceIdx:0,callsiteLine:0,callsiteColumn:0};for(;n.hasNext();){if(";"===n.peek()){n.next(),++r;continue}if(","===n.peek()){n.next();continue}if(s.column=n.nextVLQ()+(r===s.line?s.column:0),s.line=r,null===n.peekVLQ()){yield{line:r,column:s.column};continue}const e={line:r,column:s.column,flags:n.nextVLQ(),bindings:[]};if(1&e.flags){const t=n.nextVLQ(),r=n.nextVLQ();s.defScopeIdx=r+(0===t?s.defScopeIdx:0),s.defSourceIdx+=t,e.definition={sourceIdx:s.defSourceIdx,scopeIdx:s.defScopeIdx}}if(2&e.flags){const t=n.nextVLQ(),r=n.nextVLQ(),i=n.nextVLQ();s.callsiteColumn=i+(0===r&&0===t?s.callsiteColumn:0),s.callsiteLine=r+(0===t?s.callsiteLine:0),s.callsiteSourceIdx+=t,e.callsite={sourceIdx:s.callsiteSourceIdx,line:s.callsiteLine,column:s.callsiteColumn}}for(;n.hasNext()&&";"!==n.peek()&&","!==n.peek();){const t=[];e.bindings.push(t);const r=n.nextVLQ();if(r>=-1){t.push({line:e.line,column:e.column,nameIdx:r});continue}t.push({line:e.line,column:e.column,nameIdx:n.nextVLQ()});const s=-r;for(let e=0;e{if(1===n.length)return ur(n[0].nameIdx,t);const r=n.map((e=>({from:{line:e.line,column:e.column},to:{line:e.line,column:e.column},value:ur(e.nameIdx,t)})));for(let e=1;e=0)throw new Error(`Invalid range. End before start: ${JSON.stringify(t)}`)}(e),e.sort(((e,t)=>ir(e.start,t.start)||ir(t.end,e.end)));const t={start:{line:0,column:0},end:{line:Number.POSITIVE_INFINITY,column:Number.POSITIVE_INFINITY},kind:"Global",isStackFrame:!1,children:[],variables:[]},n=[t];for(const t of e){let e=n.at(-1);for(;ir(e.end,t.start)<=0;)n.pop(),e=n.at(-1);if(ir(t.start,e.end)<0&&ir(e.end,t.end)<0)throw new Error(`Range ${JSON.stringify(t)} and ${JSON.stringify(e)} partially overlap.`);const r=mr(t);e.children.push(r),n.push(r)}const r=t.children.at(-1);return r&&(t.end=r.end),t}function mr(e){return{...e,kind:"Function",isStackFrame:!0,children:[],variables:[]}}function fr(e,t){const n=[];let r=0,s=0,i=0,o=0,a=0;const l=new Er(e);let d=!0;for(;l.hasNext();){if(d)d=!1;else{if(","!==l.peek())break;l.next()}r+=l.nextVLQ(),s=o+l.nextVLQ(),i+=l.nextVLQ(),o=s+l.nextVLQ(),a+=l.nextVLQ();const e=t[r];void 0!==e&&n.push({start:{line:s,column:i},end:{line:o,column:a},name:e})}return n}var br=Object.freeze({__proto__:null,buildOriginalScopes:pr,decodePastaRanges:fr});const yr={local:"Local",closure:"Closure",block:"Block",global:"Global",returnValue:"Return value"},vr=n.i18n.registerUIStrings("core/sdk/SourceMapScopeChainEntry.ts",yr),Ir=n.i18n.getLocalizedString.bind(void 0,vr);class wr{#Sn;#kn;#Pe;#Cn;#xn;constructor(e,t,n,r,s){this.#Sn=e,this.#kn=t,this.#Pe=n,this.#Cn=r,this.#xn=s}extraProperties(){return this.#xn?[new qn(Ir(yr.returnValue),this.#xn,void 0,void 0,void 0,void 0,void 0,!0)]:[]}callFrame(){return this.#Sn}type(){switch(this.#kn.kind){case"global":return"global";case"function":return this.#Cn?"local":"closure";case"block":return"block"}return this.#kn.kind??""}typeName(){switch(this.#kn.kind){case"global":return Ir(yr.global);case"function":return this.#Cn?Ir(yr.local):Ir(yr.closure);case"block":return Ir(yr.block)}return this.#kn.kind??""}name(){return this.#kn.name}range(){return null}object(){return new Sr(this.#Sn,this.#kn,this.#Pe)}description(){return""}icon(){}}class Sr extends _n{#Sn;#kn;#Pe;constructor(e,t,n){super(e.debuggerModel.runtimeModel(),void 0,"object",void 0,null),this.#Sn=e,this.#kn=t,this.#Pe=n}async doGetProperties(e,t,n){if(t)return{properties:[],internalProperties:[]};const r=[];for(const[e,t]of this.#kn.variables.entries()){const s=this.#Rn(e);if(null===s){r.push(Sr.#Tn(t));continue}const i=await this.#Sn.evaluate({expression:s,generatePreview:n});"error"in i||i.exceptionDetails?r.push(Sr.#Tn(t)):r.push(new qn(t,i.object,!1,!1,!0,!1))}return{properties:r,internalProperties:[]}}#Rn(e){if(!this.#Pe)return null;const t=this.#Pe.values[e];if("string"==typeof t)return t;if(void 0===t)return null;const n=this.#Sn.location();for(const e of t)if(xr({start:e.from,end:e.to},n.lineNumber,n.columnNumber))return e.value??null;return null}static#Tn(e){return new qn(e,null,!1,!1,!0,!1)}}var kr=Object.freeze({__proto__:null,SourceMapScopeChainEntry:wr});class Cr{#Mn;#Pn;#En;#Ln=null;constructor(e,t,n){this.#Mn=e,this.#Pn=t,this.#En=n}addOriginalScopes(e){for(const t of e)this.#Pn.push(t)}addGeneratedRanges(e){for(const t of e)this.#En.push(t)}hasOriginalScopes(e){return Boolean(this.#Pn[e])}addOriginalScopesAtIndex(e,t){if(this.#Pn[e])throw new Error(`Trying to re-augment existing scopes for source at index: ${e}`);this.#Pn[e]=t}findInlinedFunctions(e,t){const n=this.#An(e,t),r={inlinedFunctions:[],originalFunctionName:""};for(let e=n.length-1;e>=0;--e){const t=n[e];if(t.callsite&&r.inlinedFunctions.push({name:t.originalScope?.name??"",callsite:t.callsite}),t.isStackFrame){r.originalFunctionName=t.originalScope?.name??"";break}}return r}expandCallFrame(e){const{originalFunctionName:t,inlinedFunctions:n}=this.findInlinedFunctions(e.location().lineNumber,e.location().columnNumber),r=[];for(const[t,s]of n.entries())r.push(e.createVirtualCallFrame(t,s.name));return r.push(e.createVirtualCallFrame(r.length,t)),r}#An(e,t){const n=[];return function r(s){for(const i of s)xr(i,e,t)&&(n.push(i),r(i.children))}(this.#En),n}hasVariablesAndBindings(){return null===this.#Ln&&(this.#Ln=this.#On()),this.#Ln}#On(){function e(t){for(const n of t)if(n){if("variables"in n&&n.variables.length>0)return!0;if("values"in n&&n.values.some((e=>void 0!==e)))return!0;if(e(n.children))return!0}return!1}return e(this.#Pn)&&e(this.#En)}resolveMappedScopeChain(e){const t=this.#Dn(e),n=t.at(-1)?.originalScope;if(void 0===n)return null;let r=!1;const s=[];for(let n=t.at(-1)?.originalScope;n;n=n.parent){const i=t.findLast((e=>e.originalScope===n)),o="function"===n.kind,a=o&&!r,l=a?e.returnValue():null;s.push(new wr(e,n,i,a,l??void 0)),r||=o}if(null!==e.returnValue())for(;s.length&&"local"!==s[0].type();)s.shift();return s}#Dn(e){const t=this.#An(e.location().lineNumber,e.location().columnNumber);if(0===e.inlineFrameIndex)return t;for(let n=0;n0){const r=this.#An(e,t);n=r.at(-1)?.originalScope}else{const r=this.#Mn.findEntry(e,t);if(void 0===r?.sourceIndex)return null;n=this.#Nn({sourceIndex:r.sourceIndex,line:r.sourceLineNumber,column:r.sourceColumnNumber}).at(-1)}for(let e=n;e;e=e.parent)if(e.isStackFrame)return e.name??"";return null}#Nn({sourceIndex:e,line:t,column:n}){const r=this.#Pn[e];if(!r)return[];const s=[];return function e(r){for(const i of r)xr(i,t,n)&&(s.push(i),e(i.children))}([r]),s}}function xr(e,t,n){return!(e.start.line>t||e.start.line===t&&e.start.column>n)&&!(e.end.line"url"in e))&&e.Console.Console.instance().warn(`SourceMap "${n}" contains unsupported "URL" field in one of its sections.`),this.eachSection(this.parseSources.bind(this))}json(){return this.#Fn}augmentWithScopes(e,t){if(this.#Vn(),this.#Fn&&this.#Fn.version>3)throw new Error("Only support augmenting source maps up to version 3.");const n=this.#Wn(e);if(!(n>=0))throw new Error(`Could not find sourceURL ${e} in sourceMap`);if(this.#jn||(this.#jn=new Cr(this,[],[])),!this.#jn.hasOriginalScopes(n)){const e=pr(t);this.#jn.addOriginalScopesAtIndex(n,e)}}#Wn(e){return this.#qn.findIndex((t=>t.sourceURL===e))}compiledURL(){return this.#Bn}url(){return this.#_n}sourceURLs(){return[...this.#zn.keys()]}embeddedContentByURL(e){const t=this.#zn.get(e);return t?t.content:null}hasScopeInfo(){return this.#Vn(),null!==this.#jn}findEntry(e,t,n){if(this.#Vn(),n&&null!==this.#jn){const{inlinedFunctions:r}=this.#jn.findInlinedFunctions(e,t),{callsite:s}=r[n-1];return s?{lineNumber:e,columnNumber:t,sourceIndex:s.sourceIndex,sourceURL:this.sourceURLs()[s.sourceIndex],sourceLineNumber:s.line,sourceColumnNumber:s.column,name:void 0}:(console.error("Malformed source map. Expected to have a callsite info for index",n),null)}const s=this.mappings(),i=r.ArrayUtilities.upperBound(s,void 0,((n,r)=>e-r.lineNumber||t-r.columnNumber));return i?s[i-1]:null}findEntryRanges(e,n){const s=this.mappings(),i=r.ArrayUtilities.upperBound(s,void 0,((t,r)=>e-r.lineNumber||n-r.columnNumber));if(!i)return null;const o=i-1,a=s[o].sourceURL;if(!a)return null;const l=iu-s[t].sourceLineNumber||g-s[t].sourceColumnNumber));if(!p)return null;const m=p=i.length||s[i[o]].sourceLineNumber!==t)return null;const l=i.slice(o,a);if(!l.length)return null;const d=r.ArrayUtilities.lowerBound(l,n,((e,t)=>e-s[t].sourceColumnNumber));return d>=l.length?s[l[l.length-1]]:s[l[d]];function c(e,t){return e-s[t].sourceLineNumber}}findReverseIndices(e,t,n){const s=this.mappings(),i=this.reversedMappings(e),o=r.ArrayUtilities.upperBound(i,void 0,((e,r)=>t-s[r].sourceLineNumber||n-s[r].sourceColumnNumber));let a=o;for(;a>0&&s[i[a-1]].sourceLineNumber===s[i[o-1]].sourceLineNumber&&s[i[a-1]].sourceColumnNumber===s[i[o-1]].sourceColumnNumber;)--a;return i.slice(a,o)}findReverseEntries(e,t,n){const r=this.mappings();return this.findReverseIndices(e,t,n).map((e=>r[e]))}findReverseRanges(e,n,r){const s=this.mappings(),i=this.findReverseIndices(e,n,r),o=[];for(let e=0;e{if(!e)return;return pr(fr(e,n))}))}isSeparator(e){return","===e||";"===e}reverseMapTextRanges(e,n){const s=this.reversedMappings(e),i=this.mappings();if(0===s.length)return[];let o=r.ArrayUtilities.lowerBound(s,n,(({startLine:e,startColumn:t},n)=>{const{sourceLineNumber:r,sourceColumnNumber:s}=i[n];return e-r||t-s}));for(;o===s.length||o>0&&(i[s[o]].sourceLineNumber>n.startLine||i[s[o]].sourceColumnNumber>n.startColumn);)o--;let a=o+1;for(;a0){const t=e[0];return 0===t?.lineNumber||0===t.columnNumber}return!1}hasIgnoreListHint(e){return this.#zn.get(e)?.ignoreListHint??!1}findRanges(e,n){const r=this.mappings(),s=[];if(!r.length)return[];let i=null;0===r[0].lineNumber&&0===r[0].columnNumber||!n?.isStartMatching||(i=t.TextRange.TextRange.createUnboundedFromLocation(0,0),s.push(i));for(const{sourceURL:n,lineNumber:o,columnNumber:a}of r){const r=n&&e(n);i||!r?i&&!r&&(i.endLine=o,i.endColumn=a,i=null):(i=t.TextRange.TextRange.createUnboundedFromLocation(o,a),s.push(i))}return s}compatibleForURL(e,t){return this.embeddedContentByURL(e)===t.embeddedContentByURL(e)&&this.hasIgnoreListHint(e)===t.hasIgnoreListHint(e)}expandCallFrame(e){return this.#Vn(),null===this.#jn?[e]:this.#jn.expandCallFrame(e)}resolveScopeChain(e){return this.#Vn(),null===this.#jn?null:this.#jn.resolveMappedScopeChain(e)}findOriginalFunctionName(e){return this.#Vn(),this.#jn?.findOriginalFunctionName(e)??null}}class Er{#Kn;#Qn;constructor(e){this.#Kn=e,this.#Qn=0}next(){return this.#Kn.charAt(this.#Qn++)}nextCharCode(){return this.#Kn.charCodeAt(this.#Qn++)}peek(){return this.#Kn.charAt(this.#Qn)}hasNext(){return this.#Qn>=1,s?-t:t}peekVLQ(){const e=this.#Qn;try{return this.nextVLQ()}catch{return null}finally{this.#Qn=e}}}var Lr,Ar=Object.freeze({__proto__:null,SourceMap:Pr,SourceMapEntry:Mr,TokenIterator:Er,parseSourceMap:Tr});class Or extends e.ObjectWrapper.ObjectWrapper{#$n;#Xn=!0;#Jn=new Map;#Yn=new Map;#Zn=null;constructor(e){super(),this.#$n=e}setEnabled(e){if(e===this.#Xn)return;const t=[...this.#Jn.entries()];for(const[e]of t)this.detachSourceMap(e);this.#Xn=e;for(const[e,{relativeSourceURL:n,relativeSourceMapURL:r}]of t)this.attachSourceMap(e,n,r)}static getBaseUrl(e){for(;e&&e.type()!==U.FRAME;)e=e.parentTarget();return e?.inspectedURL()??r.DevToolsPath.EmptyUrlString}static resolveRelativeSourceURL(t,n){return n=e.ParsedURL.ParsedURL.completeURL(Or.getBaseUrl(t),n)??n}sourceMapForClient(e){return this.#Jn.get(e)?.sourceMap}sourceMapForClientPromise(e){const t=this.#Jn.get(e);return t?t.sourceMapPromise:Promise.resolve(void 0)}clientForSourceMap(e){return this.#Yn.get(e)}attachSourceMap(t,n,r){if(this.#Jn.has(t))throw new Error("SourceMap is already attached or being attached to client");if(!r)return;let s={relativeSourceURL:n,relativeSourceMapURL:r,sourceMap:void 0,sourceMapPromise:Promise.resolve(void 0)};if(this.#Xn){const i=Or.resolveRelativeSourceURL(this.#$n,n),o=e.ParsedURL.ParsedURL.completeURL(i,r);if(o)if(this.#Zn&&console.error("Attaching source map may cancel previously attaching source map"),this.#Zn=t,this.dispatchEventToListeners(Lr.SourceMapWillAttach,{client:t}),this.#Zn===t){this.#Zn=null;const e=t.createPageResourceLoadInitiator();s.sourceMapPromise=Dr(o,e).then((e=>{const n=new Pr(i,o,e);return this.#Jn.get(t)===s&&(s.sourceMap=n,this.#Yn.set(n,t),this.dispatchEventToListeners(Lr.SourceMapAttached,{client:t,sourceMap:n})),n}),(()=>{this.#Jn.get(t)===s&&this.dispatchEventToListeners(Lr.SourceMapFailedToAttach,{client:t})}))}else this.#Zn&&console.error("Cancelling source map attach because another source map is attaching"),s=null,this.dispatchEventToListeners(Lr.SourceMapFailedToAttach,{client:t})}s&&this.#Jn.set(t,s)}cancelAttachSourceMap(e){e===this.#Zn?this.#Zn=null:this.#Zn?console.error("cancel attach source map requested but a different source map was being attached"):console.error("cancel attach source map requested but no source map was being attached")}detachSourceMap(e){const t=this.#Jn.get(e);if(!t)return;if(this.#Jn.delete(e),!this.#Xn)return;const{sourceMap:n}=t;n?(this.#Yn.delete(n),this.dispatchEventToListeners(Lr.SourceMapDetached,{client:e,sourceMap:n})):this.dispatchEventToListeners(Lr.SourceMapFailedToAttach,{client:e})}}async function Dr(e,t){try{const{content:n}=await nr.instance().loadResource(e,t);return Tr(n)}catch(t){throw new Error(`Could not load content for ${e}: ${t.message}`,{cause:t})}}!function(e){e.SourceMapWillAttach="SourceMapWillAttach",e.SourceMapFailedToAttach="SourceMapFailedToAttach",e.SourceMapAttached="SourceMapAttached",e.SourceMapDetached="SourceMapDetached"}(Lr||(Lr={}));var Nr,Fr=Object.freeze({__proto__:null,get Events(){return Lr},SourceMapManager:Or,loadSourceMap:Dr,tryLoadSourceMap:async function(e,t){try{const{content:n}=await nr.instance().loadResource(e,t);return Tr(n)}catch(t){return console.error(`Could not load content for ${e}: ${t.message}`,{cause:t}),null}}});class Br extends h{agent;#er;#tr=new Map;#nr=new Map;#rr;#sr;#ir;#or=new e.Throttler.Throttler(Wr);#ar=new Map;#lr=new Map;#dr=null;#cr=null;#hr=null;#ur=!1;#Xn=!1;#gr=!1;#pr=!1;#mr;constructor(t){super(t),this.#er=t.model(Gs),this.#sr=new Or(t),this.agent=t.cssAgent(),this.#ir=new zr(this),this.#rr=t.model(ii),this.#rr&&this.#rr.addEventListener(ri.PrimaryPageChanged,this.onPrimaryPageChanged,this),t.registerCSSDispatcher(new qr(this)),t.suspended()||this.enable(),this.#sr.setEnabled(e.Settings.Settings.instance().moduleSetting("css-source-maps-enabled").get()),e.Settings.Settings.instance().moduleSetting("css-source-maps-enabled").addChangeListener((e=>this.#sr.setEnabled(e.data)))}async colorScheme(){if(!this.#mr){const e=await(this.domModel()?.target().runtimeAgent().invoke_evaluate({expression:'window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches'}));!e||e.exceptionDetails||e.getError()||(this.#mr=e.result.value?"dark":"light")}return this.#mr}async resolveValues(e,...t){const n=await this.agent.invoke_resolveValues({values:t,nodeId:e});return n.getError()?null:n.results}headersForSourceURL(e){const t=[];for(const n of this.getStyleSheetIdsForURL(e)){const e=this.styleSheetHeaderForId(n);e&&t.push(e)}return t}createRawLocationsByURL(e,t,n=0){const s=this.headersForSourceURL(e);s.sort((function(e,t){return e.startLine-t.startLine||e.startColumn-t.startColumn||e.id.localeCompare(t.id)}));const i=r.ArrayUtilities.upperBound(s,void 0,((e,r)=>t-r.startLine||n-r.startColumn));if(!i)return[];const o=[],a=s[i-1];for(let e=i-1;e>=0&&s[e].startLine===a.startLine&&s[e].startColumn===a.startColumn;--e)s[e].containsLocation(t,n)&&o.push(new Ur(s[e],t,n));return o}sourceMapManager(){return this.#sr}static readableLayerName(e){return e||""}static trimSourceURL(e){let t=e.lastIndexOf("/*# sourceURL=");if(-1===t&&(t=e.lastIndexOf("/*@ sourceURL="),-1===t))return e;const n=e.lastIndexOf("\n",t);if(-1===n)return e;const r=e.substr(n+1).split("\n",1)[0];return-1===r.search(/[\x20\t]*\/\*[#@] sourceURL=[\x20\t]*([^\s]*)[\x20\t]*\*\/[\x20\t]*$/)?e:e.substr(0,n)+e.substr(n+r.length+1)}domModel(){return this.#er}async trackComputedStyleUpdatesForNode(e){await this.agent.invoke_trackComputedStyleUpdatesForNode({nodeId:e})}async setStyleText(e,t,n,r){try{await this.ensureOriginalStyleSheetText(e);const{styles:s}=await this.agent.invoke_setStyleTexts({edits:[{styleSheetId:e,range:t.serializeToObject(),text:n}]});if(!s||1!==s.length)return!1;this.#er.markUndoableState(!r);const i=new Hr(e,t,n,s[0]);return this.fireStyleSheetChanged(e,i),!0}catch(e){return console.error(e),!1}}async setSelectorText(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{selectorList:r}=await this.agent.invoke_setRuleSelector({styleSheetId:e,range:t,selector:n});if(!r)return!1;this.#er.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async setPropertyRulePropertyName(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{propertyName:r}=await this.agent.invoke_setPropertyRulePropertyName({styleSheetId:e,range:t,propertyName:n});if(!r)return!1;this.#er.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async setKeyframeKey(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{keyText:r}=await this.agent.invoke_setKeyframeKey({styleSheetId:e,range:t,keyText:n});if(!r)return!1;this.#er.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}startCoverage(){return this.#gr=!0,this.agent.invoke_startRuleUsageTracking()}async takeCoverageDelta(){const e=await this.agent.invoke_takeCoverageDelta();return{timestamp:e?.timestamp||0,coverage:e?.coverage||[]}}setLocalFontsEnabled(e){return this.agent.invoke_setLocalFontsEnabled({enabled:e})}async stopCoverage(){this.#gr=!1,await this.agent.invoke_stopRuleUsageTracking()}async getMediaQueries(){const{medias:e}=await this.agent.invoke_getMediaQueries();return e?$t.parseMediaArrayPayload(this,e):[]}async getRootLayer(e){const{rootLayer:t}=await this.agent.invoke_getLayersForNode({nodeId:e});return t}isEnabled(){return this.#Xn}async enable(){await this.agent.invoke_enable(),this.#Xn=!0,this.#gr&&await this.startCoverage(),this.dispatchEventToListeners(Nr.ModelWasEnabled)}async getAnimatedStylesForNode(e){const t=await this.agent.invoke_getAnimatedStylesForNode({nodeId:e});return t.getError()?null:t}async getMatchedStyles(e){const t=this.#er.nodeForId(e);if(!t)return null;const n=o.Runtime.hostConfig.devToolsAnimationStylesInStylesTab?.enabled,[r,s]=await Promise.all([this.agent.invoke_getMatchedStylesForNode({nodeId:e}),n?this.agent.invoke_getAnimatedStylesForNode({nodeId:e}):void 0]);if(r.getError())return null;const i={cssModel:this,node:t,inlinePayload:r.inlineStyle||null,attributesPayload:r.attributesStyle||null,matchedPayload:r.matchedCSSRules||[],pseudoPayload:r.pseudoElements||[],inheritedPayload:r.inherited||[],inheritedPseudoPayload:r.inheritedPseudoElements||[],animationsPayload:r.cssKeyframesRules||[],parentLayoutNodeId:r.parentLayoutNodeId,positionTryRules:r.cssPositionTryRules||[],propertyRules:r.cssPropertyRules??[],functionRules:r.cssFunctionRules??[],cssPropertyRegistrations:r.cssPropertyRegistrations??[],fontPaletteValuesRule:r.cssFontPaletteValuesRule,activePositionFallbackIndex:r.activePositionFallbackIndex??-1,animationStylesPayload:s?.animationStyles||[],inheritedAnimatedPayload:s?.inherited||[],transitionsStylePayload:s?.transitionsStyle||null};return await In.create(i)}async getClassNames(e){const{classNames:t}=await this.agent.invoke_collectClassNames({styleSheetId:e});return t||[]}async getComputedStyle(e){return this.isEnabled()||await this.enable(),await this.#ir.computedStylePromise(e)}async getLayoutPropertiesFromComputedStyle(e){const t=await this.getComputedStyle(e);if(!t)return null;const n=t.get("display"),r="flex"===n||"inline-flex"===n,s="grid"===n||"inline-grid"===n,i=(s&&(t.get("grid-template-columns")?.startsWith("subgrid")||t.get("grid-template-rows")?.startsWith("subgrid")))??!1,o=t.get("container-type");return{isFlex:r,isGrid:s,isSubgrid:i,isContainer:Boolean(o)&&""!==o&&"normal"!==o,hasScroll:Boolean(t.get("scroll-snap-type"))&&"none"!==t.get("scroll-snap-type")}}async getBackgroundColors(e){const t=await this.agent.invoke_getBackgroundColors({nodeId:e});return t.getError()?null:{backgroundColors:t.backgroundColors||null,computedFontSize:t.computedFontSize||"",computedFontWeight:t.computedFontWeight||""}}async getPlatformFonts(e){const{fonts:t}=await this.agent.invoke_getPlatformFontsForNode({nodeId:e});return t}allStyleSheets(){const e=[...this.#lr.values()];return e.sort((function(e,t){return e.sourceURLt.sourceURL?1:e.startLine-t.startLine||e.startColumn-t.startColumn})),e}async getInlineStyles(e){const t=await this.agent.invoke_getInlineStylesForNode({nodeId:e});if(t.getError()||!t.inlineStyle)return null;const n=new en(this,null,t.inlineStyle,Yt.Inline),r=t.attributesStyle?new en(this,null,t.attributesStyle,Yt.Attributes):null;return new jr(n,r)}forcePseudoState(e,t,n){const s=e.marker(_r)||[],i=s.includes(t);if(n){if(i)return!1;s.push(t),e.setMarker(_r,s)}else{if(!i)return!1;r.ArrayUtilities.removeElement(s,t),s.length?e.setMarker(_r,s):e.setMarker(_r,null)}return void 0!==e.id&&(this.agent.invoke_forcePseudoState({nodeId:e.id,forcedPseudoClasses:s}),this.dispatchEventToListeners(Nr.PseudoStateForced,{node:e,pseudoClass:t,enable:n}),!0)}pseudoState(e){return e.marker(_r)||[]}async setMediaText(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{media:r}=await this.agent.invoke_setMediaText({styleSheetId:e,range:t,text:n});if(!r)return!1;this.#er.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async setContainerQueryText(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{containerQuery:r}=await this.agent.invoke_setContainerQueryText({styleSheetId:e,range:t,text:n});if(!r)return!1;this.#er.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async setSupportsText(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{supports:r}=await this.agent.invoke_setSupportsText({styleSheetId:e,range:t,text:n});if(!r)return!1;this.#er.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async setScopeText(e,t,n){a.userMetrics.actionTaken(a.UserMetrics.Action.StyleRuleEdited);try{await this.ensureOriginalStyleSheetText(e);const{scope:r}=await this.agent.invoke_setScopeText({styleSheetId:e,range:t,text:n});if(!r)return!1;this.#er.markUndoableState();const s=new Hr(e,t,n,r);return this.fireStyleSheetChanged(e,s),!0}catch(e){return console.error(e),!1}}async addRule(e,t,n){try{await this.ensureOriginalStyleSheetText(e);const{rule:r}=await this.agent.invoke_addRule({styleSheetId:e,ruleText:t,location:n});if(!r)return null;this.#er.markUndoableState();const s=new Hr(e,n,t,r);return this.fireStyleSheetChanged(e,s),new an(this,r)}catch(e){return console.error(e),null}}async requestViaInspectorStylesheet(e){const t=e||(this.#rr&&this.#rr.mainFrame?this.#rr.mainFrame.id:null),n=[...this.#lr.values()].find((e=>e.frameId===t&&e.isViaInspector()));if(n)return n;if(!t)return null;try{return await this.createInspectorStylesheet(t)}catch(e){return console.error(e),null}}async createInspectorStylesheet(e,t=!1){const n=await this.agent.invoke_createStyleSheet({frameId:e,force:t});if(n.getError())throw new Error(n.getError());return this.#lr.get(n.styleSheetId)||null}mediaQueryResultChanged(){this.#mr=void 0,this.dispatchEventToListeners(Nr.MediaQueryResultChanged)}fontsUpdated(e){e&&this.#tr.set(e.src,new pe(e)),this.dispatchEventToListeners(Nr.FontsUpdated)}fontFaces(){return[...this.#tr.values()]}fontFaceForSource(e){return this.#tr.get(e)}styleSheetHeaderForId(e){return this.#lr.get(e)||null}styleSheetHeaders(){return[...this.#lr.values()]}fireStyleSheetChanged(e,t){this.dispatchEventToListeners(Nr.StyleSheetChanged,{styleSheetId:e,edit:t})}ensureOriginalStyleSheetText(e){const t=this.styleSheetHeaderForId(e);if(!t)return Promise.resolve(null);let n=this.#nr.get(t);return n||(n=this.getStyleSheetText(t.id),this.#nr.set(t,n),this.originalContentRequestedForTest(t)),n}originalContentRequestedForTest(e){}originalStyleSheetText(e){return this.ensureOriginalStyleSheetText(e.id)}getAllStyleSheetHeaders(){return this.#lr.values()}computedStyleUpdated(e){this.dispatchEventToListeners(Nr.ComputedStyleUpdated,{nodeId:e})}styleSheetAdded(e){console.assert(!this.#lr.get(e.styleSheetId)),e.loadingFailed&&(e.hasSourceURL=!1,e.isConstructed=!0,e.isInline=!1,e.isMutable=!1,e.sourceURL="",e.sourceMapURL=void 0);const t=new An(this,e);this.#lr.set(e.styleSheetId,t);const n=t.resourceURL();let r=this.#ar.get(n);if(r||(r=new Map,this.#ar.set(n,r)),r){let e=r.get(t.frameId);e||(e=new Set,r.set(t.frameId,e)),e.add(t.id)}this.#sr.attachSourceMap(t,t.sourceURL,t.sourceMapURL),this.dispatchEventToListeners(Nr.StyleSheetAdded,t)}styleSheetRemoved(e){const t=this.#lr.get(e);if(console.assert(Boolean(t)),!t)return;this.#lr.delete(e);const n=t.resourceURL(),r=this.#ar.get(n);if(console.assert(Boolean(r),"No frameId to styleSheetId map is available for given style sheet URL."),r){const s=r.get(t.frameId);s&&(s.delete(e),s.size||(r.delete(t.frameId),r.size||this.#ar.delete(n)))}this.#nr.delete(t),this.#sr.detachSourceMap(t),this.dispatchEventToListeners(Nr.StyleSheetRemoved,t)}getStyleSheetIdsForURL(e){const t=this.#ar.get(e);if(!t)return[];const n=[];for(const e of t.values())n.push(...e);return n}async setStyleSheetText(e,t,n){const r=this.#lr.get(e);if(!r)return"Unknown stylesheet in CSS.setStyleSheetText";t=Br.trimSourceURL(t),r.hasSourceURL&&(t+="\n/*# sourceURL="+r.sourceURL+" */"),await this.ensureOriginalStyleSheetText(e);const s=(await this.agent.invoke_setStyleSheetText({styleSheetId:r.id,text:t})).sourceMapURL;return this.#sr.detachSourceMap(r),r.setSourceMapURL(s),this.#sr.attachSourceMap(r,r.sourceURL,r.sourceMapURL),null===s?"Error in CSS.setStyleSheetText":(this.#er.markUndoableState(!n),this.fireStyleSheetChanged(e),null)}async getStyleSheetText(e){const t=await this.agent.invoke_getStyleSheetText({styleSheetId:e});if(t.getError())return null;const{text:n}=t;return n&&Br.trimSourceURL(n)}async onPrimaryPageChanged(e){e.data.frame.backForwardCacheDetails.restoredFromCache?(await this.suspendModel(),await this.resumeModel()):"Activation"!==e.data.type&&(this.resetStyleSheets(),this.resetFontFaces())}resetStyleSheets(){const e=[...this.#lr.values()];this.#ar.clear(),this.#lr.clear();for(const t of e)this.#sr.detachSourceMap(t),this.dispatchEventToListeners(Nr.StyleSheetRemoved,t)}resetFontFaces(){this.#tr.clear()}async suspendModel(){this.#Xn=!1,await this.agent.invoke_disable(),this.resetStyleSheets(),this.resetFontFaces()}async resumeModel(){return await this.enable()}setEffectivePropertyValueForNode(e,t,n){this.agent.invoke_setEffectivePropertyValueForNode({nodeId:e,propertyName:t,value:n})}cachedMatchedCascadeForNode(e){if(this.#dr!==e&&this.discardCachedMatchedCascade(),this.#dr=e,!this.#cr){if(!e.id)return Promise.resolve(null);this.#cr=this.getMatchedStyles(e.id)}return this.#cr}discardCachedMatchedCascade(){this.#dr=null,this.#cr=null}createCSSPropertyTracker(e){return new Vr(this,e)}enableCSSPropertyTracker(e){const t=e.getTrackedProperties();0!==t.length&&(this.agent.invoke_trackComputedStyleUpdates({propertiesToTrack:t}),this.#ur=!0,this.#hr=e,this.pollComputedStyleUpdates())}disableCSSPropertyTracker(){this.#ur=!1,this.#hr=null,this.agent.invoke_trackComputedStyleUpdates({propertiesToTrack:[]})}async pollComputedStyleUpdates(){if(!this.#pr){if(this.#ur){this.#pr=!0;const e=await this.agent.invoke_takeComputedStyleUpdates();if(this.#pr=!1,e.getError()||!e.nodeIds||!this.#ur)return;this.#hr&&this.#hr.dispatchEventToListeners("TrackedCSSPropertiesUpdated",e.nodeIds.map((e=>this.#er.nodeForId(e))))}this.#ur&&this.#or.schedule(this.pollComputedStyleUpdates.bind(this))}}dispose(){this.disableCSSPropertyTracker(),super.dispose(),this.dispatchEventToListeners(Nr.ModelDisposed,this)}getAgent(){return this.agent}}!function(e){e.FontsUpdated="FontsUpdated",e.MediaQueryResultChanged="MediaQueryResultChanged",e.ModelWasEnabled="ModelWasEnabled",e.ModelDisposed="ModelDisposed",e.PseudoStateForced="PseudoStateForced",e.StyleSheetAdded="StyleSheetAdded",e.StyleSheetChanged="StyleSheetChanged",e.StyleSheetRemoved="StyleSheetRemoved",e.ComputedStyleUpdated="ComputedStyleUpdated"}(Nr||(Nr={}));const _r="pseudo-state-marker";class Hr{styleSheetId;oldRange;newRange;newText;payload;constructor(e,n,r,s){this.styleSheetId=e,this.oldRange=n,this.newRange=t.TextRange.TextRange.fromEdit(n,r),this.newText=r,this.payload=s}}class Ur{#je;styleSheetId;url;lineNumber;columnNumber;constructor(e,t,n){this.#je=e.cssModel(),this.styleSheetId=e.id,this.url=e.resourceURL(),this.lineNumber=t,this.columnNumber=n||0}cssModel(){return this.#je}header(){return this.#je.styleSheetHeaderForId(this.styleSheetId)}}class qr{#lt;constructor(e){this.#lt=e}mediaQueryResultChanged(){this.#lt.mediaQueryResultChanged()}fontsUpdated({font:e}){this.#lt.fontsUpdated(e)}styleSheetChanged({styleSheetId:e}){this.#lt.fireStyleSheetChanged(e)}styleSheetAdded({header:e}){this.#lt.styleSheetAdded(e)}styleSheetRemoved({styleSheetId:e}){this.#lt.styleSheetRemoved(e)}computedStyleUpdated({nodeId:e}){this.#lt.computedStyleUpdated(e)}}class zr{#lt;#fr=new Map;constructor(e){this.#lt=e}computedStylePromise(e){let t=this.#fr.get(e);return t||(t=this.#lt.getAgent().invoke_getComputedStyleForNode({nodeId:e}).then((({computedStyle:t})=>{if(this.#fr.delete(e),!t?.length)return null;const n=new Map;for(const e of t)n.set(e.name,e.value);return n})),this.#fr.set(e,t),t)}}class jr{inlineStyle;attributesStyle;constructor(e,t){this.inlineStyle=e,this.attributesStyle=t}}class Vr extends e.ObjectWrapper.ObjectWrapper{#lt;#br;constructor(e,t){super(),this.#lt=e,this.#br=t}start(){this.#lt.enableCSSPropertyTracker(this)}stop(){this.#lt.disableCSSPropertyTracker()}getTrackedProperties(){return this.#br}}const Wr=1e3;h.register(Br,{capabilities:2,autostart:!0});var Gr=Object.freeze({__proto__:null,CSSLocation:Ur,CSSModel:Br,CSSPropertyTracker:Vr,Edit:Hr,get Events(){return Nr},InlineStyleResult:jr});class Kr extends h{#yr;#vr;#Ir;#wr;constructor(e){super(e),e.registerHeapProfilerDispatcher(new Qr(this)),this.#yr=!1,this.#vr=e.heapProfilerAgent(),this.#Ir=e.model(Jr),this.#wr=0}debuggerModel(){return this.#Ir.debuggerModel()}runtimeModel(){return this.#Ir}async enable(){this.#yr||(this.#yr=!0,await this.#vr.invoke_enable())}async startSampling(e){if(this.#wr++)return!1;const t=await this.#vr.invoke_startSampling({samplingInterval:e||16384});return Boolean(t.getError())}async stopSampling(){if(!this.#wr)throw new Error("Sampling profiler is not running.");if(--this.#wr)return await this.getSamplingProfile();const e=await this.#vr.invoke_stopSampling();return e.getError()?null:e.profile}async getSamplingProfile(){const e=await this.#vr.invoke_getSamplingProfile();return e.getError()?null:e.profile}async collectGarbage(){const e=await this.#vr.invoke_collectGarbage();return Boolean(e.getError())}async snapshotObjectIdForObjectId(e){const t=await this.#vr.invoke_getHeapObjectId({objectId:e});return t.getError()?null:t.heapSnapshotObjectId}async objectForSnapshotObjectId(e,t){const n=await this.#vr.invoke_getObjectByHeapObjectId({objectId:e,objectGroup:t});return n.getError()?null:this.#Ir.createRemoteObject(n.result)}async addInspectedHeapObject(e){const t=await this.#vr.invoke_addInspectedHeapObject({heapObjectId:e});return Boolean(t.getError())}async takeHeapSnapshot(e){const t=await this.#vr.invoke_takeHeapSnapshot(e);return Boolean(t.getError())}async startTrackingHeapObjects(e){const t=await this.#vr.invoke_startTrackingHeapObjects({trackAllocations:e});return Boolean(t.getError())}async stopTrackingHeapObjects(e){const t=await this.#vr.invoke_stopTrackingHeapObjects({reportProgress:e});return Boolean(t.getError())}heapStatsUpdate(e){this.dispatchEventToListeners("HeapStatsUpdate",e)}lastSeenObjectId(e,t){this.dispatchEventToListeners("LastSeenObjectId",{lastSeenObjectId:e,timestamp:t})}addHeapSnapshotChunk(e){this.dispatchEventToListeners("AddHeapSnapshotChunk",e)}reportHeapSnapshotProgress(e,t,n){this.dispatchEventToListeners("ReportHeapSnapshotProgress",{done:e,total:t,finished:n})}resetProfiles(){this.dispatchEventToListeners("ResetProfiles",this)}}class Qr{#Sr;constructor(e){this.#Sr=e}heapStatsUpdate({statsUpdate:e}){this.#Sr.heapStatsUpdate(e)}lastSeenObjectId({lastSeenObjectId:e,timestamp:t}){this.#Sr.lastSeenObjectId(e,t)}addHeapSnapshotChunk({chunk:e}){this.#Sr.addHeapSnapshotChunk(e)}reportHeapSnapshotProgress({done:e,total:t,finished:n}){this.#Sr.reportHeapSnapshotProgress(e,t,n)}resetProfiles(){this.#Sr.resetProfiles()}}h.register(Kr,{capabilities:4,autostart:!1});var $r,Xr=Object.freeze({__proto__:null,HeapProfilerModel:Kr});class Jr extends h{agent;#kr=new Map;#Cr=Zr.comparator;constructor(t){super(t),this.agent=t.runtimeAgent(),this.target().registerRuntimeDispatcher(new Yr(this)),this.agent.invoke_enable(),e.Settings.Settings.instance().moduleSetting("custom-formatters").get()&&this.agent.invoke_setCustomObjectFormatterEnabled({enabled:!0}),e.Settings.Settings.instance().moduleSetting("custom-formatters").addChangeListener(this.customFormattersStateChanged.bind(this))}static isSideEffectFailure(e){const t="exceptionDetails"in e&&e.exceptionDetails;return Boolean(t&&t.exception?.description?.startsWith("EvalError: Possible side-effect in debug-evaluate"))}debuggerModel(){return this.target().model(ms)}heapProfilerModel(){return this.target().model(Kr)}executionContexts(){return[...this.#kr.values()].sort(this.executionContextComparator())}setExecutionContextComparator(e){this.#Cr=e}executionContextComparator(){return this.#Cr}defaultExecutionContext(){for(const e of this.executionContexts())if(e.isDefault)return e;return null}executionContext(e){return this.#kr.get(e)||null}executionContextCreated(e){const t=e.auxData||{isDefault:!0},n=new Zr(this,e.id,e.uniqueId,e.name,e.origin,t.isDefault,t.frameId);this.#kr.set(n.id,n),this.dispatchEventToListeners($r.ExecutionContextCreated,n)}executionContextDestroyed(e){const t=this.#kr.get(e);t&&(this.debuggerModel().executionContextDestroyed(t),this.#kr.delete(e),this.dispatchEventToListeners($r.ExecutionContextDestroyed,t))}fireExecutionContextOrderChanged(){this.dispatchEventToListeners($r.ExecutionContextOrderChanged,this)}executionContextsCleared(){this.debuggerModel().globalObjectCleared();const e=this.executionContexts();this.#kr.clear();for(let t=0;te+t.length+1),0);const d="";if(n)for(;;){const e=await this.debuggerModel.target().debuggerAgent().invoke_nextWasmDisassemblyChunk({streamId:n});if(e.getError())throw new Error(e.getError());const{chunk:{lines:t,bytecodeOffsets:r}}=e;if(l+=t.reduce(((e,t)=>e+t.length+1),0),0===t.length)break;if(l>=999999989){o.push([d]),a.push([0]);break}o.push(t),a.push(r)}const c=[];for(let e=0;ee){ss||(ss={cache:new Map,registry:new FinalizationRegistry((e=>ss?.cache.delete(e)))});const e=[this.#Er,this.contentLength,this.lineOffset,this.columnOffset,this.endLine,this.endColumn,this.#Pr,this.hash].join(":"),t=ss.cache.get(e)?.deref();t?this.#Lr=t:(this.#Lr=this.requestContentInternal(),ss.cache.set(e,new WeakRef(this.#Lr)),ss.registry.register(this.#Lr,e))}else this.#Lr=this.requestContentInternal()}return this.#Lr}async requestContent(){const e=await this.requestContentData();return t.ContentData.ContentData.asDeferredContent(e)}async requestContentInternal(){if(!this.scriptId)return{error:rs(ts.scriptRemovedOrDeleted)};try{return this.isWasm()?await this.loadWasmContent():await this.loadTextContent()}catch{return{error:rs(ts.unableToFetchScriptSource)}}}async getWasmBytecode(){const e=await this.debuggerModel.target().debuggerAgent().invoke_getWasmBytecode({scriptId:this.scriptId}),t=await fetch(`data:application/wasm;base64,${e.bytecode}`);return await t.arrayBuffer()}originalContentProvider(){return new t.StaticContentProvider.StaticContentProvider(this.contentURL(),this.contentType(),(()=>this.requestContentData()))}async searchInContent(e,n,r){if(!this.scriptId)return[];const s=await this.debuggerModel.target().debuggerAgent().invoke_searchInContent({scriptId:this.scriptId,query:e,caseSensitive:n,isRegex:r});return t.TextUtils.performSearchInSearchMatches(s.result||[],e,n,r)}appendSourceURLCommentIfNeeded(e){return this.hasSourceURL?e+"\n //# sourceURL="+this.sourceURL:e}async editSource(e){e=is.trimSourceURLComment(e),e=this.appendSourceURLCommentIfNeeded(e);if(t.ContentData.ContentData.textOr(await this.requestContentData(),null)===e)return{changed:!1,status:"Ok"};const n=await this.debuggerModel.target().debuggerAgent().invoke_setScriptSource({scriptId:this.scriptId,scriptSource:e,allowTopFrameEditing:!0});if(n.getError())throw new Error(`Script#editSource failed for script with id ${this.scriptId}: ${n.getError()}`);return n.getError()||"Ok"!==n.status||(this.#Lr=Promise.resolve(new t.ContentData.ContentData(e,!1,"text/javascript"))),this.debuggerModel.dispatchEventToListeners(ys.ScriptSourceWasEdited,{script:this,status:n.status}),{changed:!0,status:n.status,exceptionDetails:n.exceptionDetails}}rawLocation(e,t){return this.containsLocation(e,t)?new Is(this.debuggerModel,this.scriptId,e,t):null}isInlineScript(){const e=!this.lineOffset&&!this.columnOffset;return!this.isWasm()&&Boolean(this.sourceURL)&&!e}isAnonymousScript(){return!this.sourceURL}async setBlackboxedRanges(e){return!(await this.debuggerModel.target().debuggerAgent().invoke_setBlackboxedRanges({scriptId:this.scriptId,positions:e})).getError()}containsLocation(e,t){const n=e===this.lineOffset&&t>=this.columnOffset||e>this.lineOffset,r=e{r.onmessage=({data:r})=>{if("method"in r&&"disassemble"===r.method)if("error"in r)n(r.error);else if("result"in r){const{lines:n,offsets:s,functionBodyOffsets:i}=r.result;e(new t.WasmDisassembly.WasmDisassembly(n,s,i))}},r.onerror=n}));r.postMessage({method:"disassemble",params:{content:n}});try{return await s}finally{r.terminate()}}var ds=Object.freeze({__proto__:null,Script:is,disassembleWasm:ls,sourceURLRegex:as});const cs={local:"Local",closure:"Closure",block:"Block",script:"Script",withBlock:"`With` block",catchBlock:"`Catch` block",global:"Global",module:"Module",expression:"Expression",exception:"Exception",returnValue:"Return value"},hs=n.i18n.registerUIStrings("core/sdk/DebuggerModel.ts",cs),us=n.i18n.getLocalizedString.bind(void 0,hs);function gs(e){function t(e,t){return e.lineNumber-t.lineNumber||e.columnNumber-t.columnNumber}function n(e,n){if(e.scriptId!==n.scriptId)return!1;const r=t(e.start,n.start);return r<0?t(e.end,n.start)>=0:!(r>0)||t(e.start,n.end)<=0}if(0===e.length)return[];e.sort(((e,n)=>e.scriptIdn.scriptId?1:t(e.start,n.start)||t(e.end,n.end)));let r=e[0];const s=[];for(let i=1;ithis.#Or.setEnabled(e.data)));const n=t.model(ii);n&&n.addEventListener(ri.FrameNavigated,this.onFrameNavigated,this)}static selectSymbolSource(t){if(!t||0===t.length)return null;if("type"in t)return"None"===t.type?null:t;let n=null;const r=new Map(t.map((e=>[e.type,e])));for(const e of ps)if(r.has(e)){n=r.get(e)||null;break}return console.assert(null!==n,"Unknown symbol types. Front-end and back-end should be kept in sync regarding Protocol.Debugger.DebugSymbolTypes"),n&&t.length>1&&e.Console.Console.instance().warn(`Multiple debug symbols for script were found. Using ${n.type}`),n}sourceMapManager(){return this.#Or}runtimeModel(){return this.runtimeModelInternal}debuggerEnabled(){return Boolean(this.#Hr)}debuggerId(){return this.#Ur}async enableDebugger(){if(this.#Hr)return;this.#Hr=!0;const t=o.Runtime.Runtime.queryParam("remoteFrontend")||o.Runtime.Runtime.queryParam("ws")?1e7:1e8,n=this.agent.invoke_enable({maxScriptsCacheSize:t});let r;o.Runtime.experiments.isEnabled("instrumentation-breakpoints")&&(r=this.agent.invoke_setInstrumentationBreakpoint({instrumentation:"beforeScriptExecution"})),this.pauseOnExceptionStateChanged(),this.asyncStackTracesStateChanged(),e.Settings.Settings.instance().moduleSetting("breakpoints-active").get()||this.breakpointsActiveChanged(),this.dispatchEventToListeners(ys.DebuggerWasEnabled,this);const[s]=await Promise.all([n,r]);this.registerDebugger(s)}async syncDebuggerId(){const e=o.Runtime.Runtime.queryParam("remoteFrontend")||o.Runtime.Runtime.queryParam("ws")?1e7:1e8,t=this.agent.invoke_enable({maxScriptsCacheSize:e});return t.then(this.registerDebugger.bind(this)),await t}onFrameNavigated(){ms.shouldResyncDebuggerId||(ms.shouldResyncDebuggerId=!0)}registerDebugger(e){if(e.getError())return void(this.#Hr=!1);const{debuggerId:t}=e;fs.set(t,this),this.#Ur=t,this.dispatchEventToListeners(ys.DebuggerIsReadyToPause,this)}isReadyToPause(){return Boolean(this.#Ur)}static async modelForDebuggerId(e){return ms.shouldResyncDebuggerId&&(await ms.resyncDebuggerIdForModels(),ms.shouldResyncDebuggerId=!1),fs.get(e)||null}static async resyncDebuggerIdForModels(){const e=fs.values();for(const t of e)t.debuggerEnabled()&&await t.syncDebuggerId()}async disableDebugger(){this.#Hr&&(this.#Hr=!1,await this.asyncStackTracesStateChanged(),await this.agent.invoke_disable(),this.#Qr=!1,this.globalObjectCleared(),this.dispatchEventToListeners(ys.DebuggerWasDisabled,this),"string"==typeof this.#Ur&&fs.delete(this.#Ur),this.#Ur=null)}skipAllPauses(e){this.#qr&&(clearTimeout(this.#qr),this.#qr=0),this.agent.invoke_setSkipAllPauses({skip:e})}skipAllPausesUntilReloadOrTimeout(e){this.#qr&&clearTimeout(this.#qr),this.agent.invoke_setSkipAllPauses({skip:!0}),this.#qr=window.setTimeout(this.skipAllPauses.bind(this,!1),e)}pauseOnExceptionStateChanged(){const t=e.Settings.Settings.instance().moduleSetting("pause-on-caught-exception").get();let n;const r=e.Settings.Settings.instance().moduleSetting("pause-on-uncaught-exception").get();n=t&&r?"all":t?"caught":r?"uncaught":"none",this.agent.invoke_setPauseOnExceptions({state:n})}asyncStackTracesStateChanged(){const t=!e.Settings.Settings.instance().moduleSetting("disable-async-stack-traces").get()&&this.#Hr?32:0;return this.agent.invoke_setAsyncCallStackDepth({maxDepth:t})}breakpointsActiveChanged(){this.agent.invoke_setBreakpointsActive({active:e.Settings.Settings.instance().moduleSetting("breakpoints-active").get()})}setComputeAutoStepRangesCallback(e){this.#jr=e}async computeAutoStepSkipList(e){let t=[];if(this.#jr&&this.#Dr&&this.#Dr.callFrames.length>0){const[n]=this.#Dr.callFrames;t=await this.#jr.call(null,e,n)}return gs(t.map((({start:e,end:t})=>({scriptId:e.scriptId,start:{lineNumber:e.lineNumber,columnNumber:e.columnNumber},end:{lineNumber:t.lineNumber,columnNumber:t.columnNumber}}))))}async stepInto(){const e=await this.computeAutoStepSkipList("StepInto");this.agent.invoke_stepInto({breakOnAsyncCall:!1,skipList:e})}async stepOver(){this.#Kr=this.#Dr?.callFrames[0]?.functionLocation()??null;const e=await this.computeAutoStepSkipList("StepOver");this.agent.invoke_stepOver({skipList:e})}async stepOut(){const e=await this.computeAutoStepSkipList("StepOut");0!==e.length?this.agent.invoke_stepOver({skipList:e}):this.agent.invoke_stepOut()}scheduleStepIntoAsync(){this.computeAutoStepSkipList("StepInto").then((e=>{this.agent.invoke_stepInto({breakOnAsyncCall:!0,skipList:e})}))}resume(){this.agent.invoke_resume({terminateOnResume:!1}),this.#Qr=!1}pause(){this.#Qr=!0,this.skipAllPauses(!1),this.agent.invoke_pause()}async setBreakpointByURL(t,n,s,i){let o;if(this.target().type()===U.NODE&&e.ParsedURL.schemeIs(t,"file:")){const n=e.ParsedURL.ParsedURL.urlToRawPathString(t,a.Platform.isWin());o=`${r.StringUtilities.escapeForRegExp(n)}|${r.StringUtilities.escapeForRegExp(t)}`,a.Platform.isWin()&&n.match(/^.:\\/)&&(o=`[${n[0].toUpperCase()}${n[0].toLowerCase()}]`+o.substr(1))}let l=0;const d=this.#Fr.get(t)||[];for(let e=0,t=d.length;eIs.fromPayload(this,e)))),{locations:h,breakpointId:c.breakpointId}}async setBreakpointInAnonymousScript(e,t,n,r){const s=await this.agent.invoke_setBreakpointByUrl({lineNumber:t,scriptHash:e,columnNumber:n,condition:r});if(s.getError())return{locations:[],breakpointId:null};let i=[];return s.locations&&(i=s.locations.map((e=>Is.fromPayload(this,e)))),{locations:i,breakpointId:s.breakpointId}}async removeBreakpoint(e){await this.agent.invoke_removeBreakpoint({breakpointId:e})}async getPossibleBreakpoints(e,t,n){const r=await this.agent.invoke_getPossibleBreakpoints({start:e.payload(),end:t?t.payload():void 0,restrictToFunction:n});return r.getError()||!r.locations?[]:r.locations.map((e=>ws.fromPayload(this,e)))}async fetchAsyncStackTrace(e){const t=await this.agent.invoke_getStackTrace({stackTraceId:e});return t.getError()?null:t.stackTrace}breakpointResolved(e,t){this.#Gr.dispatchEventToListeners(e,Is.fromPayload(this,t))}globalObjectCleared(){this.resetDebuggerPausedDetails(),this.reset(),this.dispatchEventToListeners(ys.GlobalObjectCleared,this)}reset(){for(const e of this.#Nr.values())this.#Or.detachSourceMap(e);this.#Nr.clear(),this.#Fr.clear(),this.#Br=[],this.#Kr=null}scripts(){return Array.from(this.#Nr.values())}scriptForId(e){return this.#Nr.get(e)||null}scriptsForSourceURL(e){return this.#Fr.get(e)||[]}scriptsForExecutionContext(e){const t=[];for(const n of this.#Nr.values())n.executionContextId===e.id&&t.push(n);return t}get callFrames(){return this.#Dr?this.#Dr.callFrames:null}debuggerPausedDetails(){return this.#Dr}async setDebuggerPausedDetails(e){return this.#Qr=!1,this.#Dr=e,!(this.#zr&&!await this.#zr.call(null,e,this.#Kr))&&(this.#Kr=null,this.dispatchEventToListeners(ys.DebuggerPaused,this),this.setSelectedCallFrame(e.callFrames[0]),!0)}resetDebuggerPausedDetails(){this.#Qr=!1,this.#Dr=null,this.setSelectedCallFrame(null)}setBeforePausedCallback(e){this.#zr=e}setExpandCallFramesCallback(e){this.#Vr=e}setEvaluateOnCallFrameCallback(e){this.evaluateOnCallFrameCallback=e}setSynchronizeBreakpointsCallback(e){this.#Wr=e}async pausedScript(t,n,r,s,i,o){if("instrumentation"===n){const e=this.scriptForId(r.scriptId);return this.#Wr&&e&&await this.#Wr(e),void this.resume()}const a=new Cs(this,t,n,r,s,i,o);if(await this.#$r(a),this.continueToLocationCallback){const e=this.continueToLocationCallback;if(this.continueToLocationCallback=null,e(a))return}await this.setDebuggerPausedDetails(a)?e.EventTarget.fireEvent("DevTools.DebuggerPaused"):this.#Kr?this.stepOver():this.stepInto()}async#$r(e){if(this.#Vr&&(e.callFrames=await this.#Vr.call(null,e.callFrames)),!o.Runtime.experiments.isEnabled("use-source-map-scopes"))return;const t=[];for(const n of e.callFrames){const e=await this.sourceMapManager().sourceMapForClientPromise(n.script);e?.hasScopeInfo()?t.push(...e.expandCallFrame(n)):t.push(n)}e.callFrames=t}resumedScript(){this.resetDebuggerPausedDetails(),this.dispatchEventToListeners(ys.DebuggerResumed,this)}parsedScriptSource(e,t,n,r,s,i,o,a,l,d,c,h,u,g,p,m,f,b,y,v){const I=this.#Nr.get(e);if(I)return I;let w=!1;l&&"isDefault"in l&&(w=!l.isDefault);const S=ms.selectSymbolSource(y),k=new is(this,e,t,n,r,s,i,o,a,w,d,c,h,g,p,m,f,b,S,v);this.registerScript(k),this.dispatchEventToListeners(ys.ParsedScriptSource,k),k.sourceMapURL&&!u&&this.#Or.attachSourceMap(k,k.sourceURL,k.sourceMapURL);return u&&k.isAnonymousScript()&&(this.#Br.push(k),this.collectDiscardedScripts()),k}setSourceMapURL(e,t){this.#Or.detachSourceMap(e),e.sourceMapURL=t,this.#Or.attachSourceMap(e,e.sourceURL,e.sourceMapURL)}async setDebugInfoURL(e,t){this.#Vr&&this.#Dr&&(this.#Dr.callFrames=await this.#Vr.call(null,this.#Dr.callFrames)),this.dispatchEventToListeners(ys.DebugInfoAttached,e)}executionContextDestroyed(e){for(const t of this.#Nr.values())t.executionContextId===e.id&&this.#Or.detachSourceMap(t)}registerScript(e){if(this.#Nr.set(e.scriptId,e),e.isAnonymousScript())return;let t=this.#Fr.get(e.sourceURL);t||(t=[],this.#Fr.set(e.sourceURL,t)),t.unshift(e)}unregisterScript(e){console.assert(e.isAnonymousScript()),this.#Nr.delete(e.scriptId)}collectDiscardedScripts(){if(this.#Br.length<1e3)return;const e=this.#Br.splice(0,100);for(const t of e)this.unregisterScript(t),this.dispatchEventToListeners(ys.DiscardedAnonymousScriptSource,t)}createRawLocation(e,t,n,r){return this.createRawLocationByScriptId(e.scriptId,t,n,r)}createRawLocationByURL(e,t,n,r,s){for(const i of this.#Fr.get(e)||[]){if(!s){if(i.lineOffset>t||i.lineOffset===t&&void 0!==n&&i.columnOffset>n)continue;if(i.endLine=this.#os.length&&(this.#as=0),e}}var Ps=Object.freeze({__proto__:null,OverlayColorGenerator:Ms});class Es{#ls;#os=new Map;#ds=e.Settings.Settings.instance().createLocalSetting("persistent-highlight-setting",[]);#cs=new Map;#hs=new Map;#us=new Map;#gs=new Map;#ps=new Map;#ms=new Ms;#fs=new Ms;#bs=e.Settings.Settings.instance().moduleSetting("show-grid-line-labels");#ys=e.Settings.Settings.instance().moduleSetting("extend-grid-lines");#vs=e.Settings.Settings.instance().moduleSetting("show-grid-areas");#Is=e.Settings.Settings.instance().moduleSetting("show-grid-track-sizes");#ws;constructor(e,t){this.#ls=e,this.#ws=t,this.#bs.addChangeListener(this.onSettingChange,this),this.#ys.addChangeListener(this.onSettingChange,this),this.#vs.addChangeListener(this.onSettingChange,this),this.#Is.addChangeListener(this.onSettingChange,this)}onSettingChange(){this.resetOverlay()}buildGridHighlightConfig(e){const t=this.colorOfGrid(e).asLegacyColor(),n=t.setAlpha(.1).asLegacyColor(),r=t.setAlpha(.3).asLegacyColor(),s=t.setAlpha(.8).asLegacyColor(),i=this.#ys.get(),o="lineNumbers"===this.#bs.get(),a=o,l="lineNames"===this.#bs.get();return{rowGapColor:r.toProtocolRGBA(),rowHatchColor:s.toProtocolRGBA(),columnGapColor:r.toProtocolRGBA(),columnHatchColor:s.toProtocolRGBA(),gridBorderColor:t.toProtocolRGBA(),gridBorderDash:!1,rowLineColor:t.toProtocolRGBA(),columnLineColor:t.toProtocolRGBA(),rowLineDash:!0,columnLineDash:!0,showGridExtensionLines:i,showPositiveLineNumbers:o,showNegativeLineNumbers:a,showLineNames:l,showAreaNames:this.#vs.get(),showTrackSizes:this.#Is.get(),areaBorderColor:t.toProtocolRGBA(),gridBackgroundColor:n.toProtocolRGBA()}}buildFlexContainerHighlightConfig(e){const t=this.colorOfFlex(e).asLegacyColor();return{containerBorder:{color:t.toProtocolRGBA(),pattern:"dashed"},itemSeparator:{color:t.toProtocolRGBA(),pattern:"dotted"},lineSeparator:{color:t.toProtocolRGBA(),pattern:"dashed"},mainDistributedSpace:{hatchColor:t.toProtocolRGBA()},crossDistributedSpace:{hatchColor:t.toProtocolRGBA()}}}buildScrollSnapContainerHighlightConfig(t){return{snapAreaBorder:{color:e.Color.PageHighlight.GridBorder.toProtocolRGBA(),pattern:"dashed"},snapportBorder:{color:e.Color.PageHighlight.GridBorder.toProtocolRGBA()},scrollMarginColor:e.Color.PageHighlight.Margin.toProtocolRGBA(),scrollPaddingColor:e.Color.PageHighlight.Padding.toProtocolRGBA()}}highlightGridInOverlay(e){this.#cs.set(e,this.buildGridHighlightConfig(e)),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting(),this.#ws.onGridOverlayStateChanged({nodeId:e,enabled:!0})}isGridHighlighted(e){return this.#cs.has(e)}colorOfGrid(e){let t=this.#os.get(e);return t||(t=this.#ms.next(),this.#os.set(e,t)),t}setColorOfGrid(e,t){this.#os.set(e,t)}hideGridInOverlay(e){this.#cs.has(e)&&(this.#cs.delete(e),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting(),this.#ws.onGridOverlayStateChanged({nodeId:e,enabled:!1}))}highlightScrollSnapInOverlay(e){this.#hs.set(e,this.buildScrollSnapContainerHighlightConfig(e)),this.updateHighlightsInOverlay(),this.#ws.onScrollSnapOverlayStateChanged({nodeId:e,enabled:!0}),this.savePersistentHighlightSetting()}isScrollSnapHighlighted(e){return this.#hs.has(e)}hideScrollSnapInOverlay(e){this.#hs.has(e)&&(this.#hs.delete(e),this.updateHighlightsInOverlay(),this.#ws.onScrollSnapOverlayStateChanged({nodeId:e,enabled:!1}),this.savePersistentHighlightSetting())}highlightFlexInOverlay(e){this.#us.set(e,this.buildFlexContainerHighlightConfig(e)),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting(),this.#ws.onFlexOverlayStateChanged({nodeId:e,enabled:!0})}isFlexHighlighted(e){return this.#us.has(e)}colorOfFlex(e){let t=this.#os.get(e);return t||(t=this.#fs.next(),this.#os.set(e,t)),t}setColorOfFlex(e,t){this.#os.set(e,t)}hideFlexInOverlay(e){this.#us.has(e)&&(this.#us.delete(e),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting(),this.#ws.onFlexOverlayStateChanged({nodeId:e,enabled:!1}))}highlightContainerQueryInOverlay(e){this.#gs.set(e,this.buildContainerQueryContainerHighlightConfig()),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting(),this.#ws.onContainerQueryOverlayStateChanged({nodeId:e,enabled:!0})}hideContainerQueryInOverlay(e){this.#gs.has(e)&&(this.#gs.delete(e),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting(),this.#ws.onContainerQueryOverlayStateChanged({nodeId:e,enabled:!1}))}isContainerQueryHighlighted(e){return this.#gs.has(e)}buildContainerQueryContainerHighlightConfig(){return{containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},descendantBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"}}}highlightIsolatedElementInOverlay(e){this.#ps.set(e,this.buildIsolationModeHighlightConfig()),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting()}hideIsolatedElementInOverlay(e){this.#ps.has(e)&&(this.#ps.delete(e),this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting())}isIsolatedElementHighlighted(e){return this.#ps.has(e)}buildIsolationModeHighlightConfig(){return{resizerColor:e.Color.IsolationModeHighlight.Resizer.toProtocolRGBA(),resizerHandleColor:e.Color.IsolationModeHighlight.ResizerHandle.toProtocolRGBA(),maskColor:e.Color.IsolationModeHighlight.Mask.toProtocolRGBA()}}hideAllInOverlayWithoutSave(){this.#us.clear(),this.#cs.clear(),this.#hs.clear(),this.#gs.clear(),this.#ps.clear(),this.updateHighlightsInOverlay()}refreshHighlights(){const e=this.updateHighlightsForDeletedNodes(this.#cs),t=this.updateHighlightsForDeletedNodes(this.#us),n=this.updateHighlightsForDeletedNodes(this.#hs),r=this.updateHighlightsForDeletedNodes(this.#gs),s=this.updateHighlightsForDeletedNodes(this.#ps);(t||e||n||r||s)&&(this.updateHighlightsInOverlay(),this.savePersistentHighlightSetting())}updateHighlightsForDeletedNodes(e){let t=!1;for(const n of e.keys())null===this.#ls.getDOMModel().nodeForId(n)&&(e.delete(n),t=!0);return t}resetOverlay(){for(const e of this.#cs.keys())this.#cs.set(e,this.buildGridHighlightConfig(e));for(const e of this.#us.keys())this.#us.set(e,this.buildFlexContainerHighlightConfig(e));for(const e of this.#hs.keys())this.#hs.set(e,this.buildScrollSnapContainerHighlightConfig(e));for(const e of this.#gs.keys())this.#gs.set(e,this.buildContainerQueryContainerHighlightConfig());for(const e of this.#ps.keys())this.#ps.set(e,this.buildIsolationModeHighlightConfig());this.updateHighlightsInOverlay()}updateHighlightsInOverlay(){const e=this.#cs.size>0||this.#us.size>0||this.#gs.size>0||this.#ps.size>0;this.#ls.setShowViewportSizeOnResize(!e),this.updateGridHighlightsInOverlay(),this.updateFlexHighlightsInOverlay(),this.updateScrollSnapHighlightsInOverlay(),this.updateContainerQueryHighlightsInOverlay(),this.updateIsolatedElementHighlightsInOverlay()}updateGridHighlightsInOverlay(){const e=this.#ls,t=[];for(const[e,n]of this.#cs.entries())t.push({nodeId:e,gridHighlightConfig:n});e.target().overlayAgent().invoke_setShowGridOverlays({gridNodeHighlightConfigs:t})}updateFlexHighlightsInOverlay(){const e=this.#ls,t=[];for(const[e,n]of this.#us.entries())t.push({nodeId:e,flexContainerHighlightConfig:n});e.target().overlayAgent().invoke_setShowFlexOverlays({flexNodeHighlightConfigs:t})}updateScrollSnapHighlightsInOverlay(){const e=this.#ls,t=[];for(const[e,n]of this.#hs.entries())t.push({nodeId:e,scrollSnapContainerHighlightConfig:n});e.target().overlayAgent().invoke_setShowScrollSnapOverlays({scrollSnapHighlightConfigs:t})}updateContainerQueryHighlightsInOverlay(){const e=this.#ls,t=[];for(const[e,n]of this.#gs.entries())t.push({nodeId:e,containerQueryContainerHighlightConfig:n});e.target().overlayAgent().invoke_setShowContainerQueryOverlays({containerQueryHighlightConfigs:t})}updateIsolatedElementHighlightsInOverlay(){const e=this.#ls,t=[];for(const[e,n]of this.#ps.entries())t.push({nodeId:e,isolationModeHighlightConfig:n});e.target().overlayAgent().invoke_setShowIsolatedElements({isolatedElementHighlightConfigs:t})}async restoreHighlightsForDocument(){this.#us=new Map,this.#cs=new Map,this.#hs=new Map,this.#gs=new Map,this.#ps=new Map;const e=await this.#ls.getDOMModel().requestDocument(),t=e?e.documentURL:r.DevToolsPath.EmptyUrlString;await Promise.all(this.#ds.get().map((async e=>{if(e.url===t)return await this.#ls.getDOMModel().pushNodeByPathToFrontend(e.path).then((t=>{const n=this.#ls.getDOMModel().nodeForId(t);if(n)switch(e.type){case"GRID":this.#cs.set(n.id,this.buildGridHighlightConfig(n.id)),this.#ws.onGridOverlayStateChanged({nodeId:n.id,enabled:!0});break;case"FLEX":this.#us.set(n.id,this.buildFlexContainerHighlightConfig(n.id)),this.#ws.onFlexOverlayStateChanged({nodeId:n.id,enabled:!0});break;case"CONTAINER_QUERY":this.#gs.set(n.id,this.buildContainerQueryContainerHighlightConfig()),this.#ws.onContainerQueryOverlayStateChanged({nodeId:n.id,enabled:!0});break;case"SCROLL_SNAP":this.#hs.set(n.id,this.buildScrollSnapContainerHighlightConfig(n.id)),this.#ws.onScrollSnapOverlayStateChanged({nodeId:n.id,enabled:!0});break;case"ISOLATED_ELEMENT":this.#ps.set(n.id,this.buildIsolationModeHighlightConfig())}}))}))),this.updateHighlightsInOverlay()}currentUrl(){const e=this.#ls.getDOMModel().existingDocument();return e?e.documentURL:r.DevToolsPath.EmptyUrlString}getPersistentHighlightSettingForOneType(e,t){const n=[];for(const r of e.keys()){const e=this.#ls.getDOMModel().nodeForId(r);e&&n.push({url:this.currentUrl(),path:e.path(),type:t})}return n}savePersistentHighlightSetting(){const e=this.currentUrl(),t=[...this.#ds.get().filter((t=>t.url!==e)),...this.getPersistentHighlightSettingForOneType(this.#cs,"GRID"),...this.getPersistentHighlightSettingForOneType(this.#us,"FLEX"),...this.getPersistentHighlightSettingForOneType(this.#gs,"CONTAINER_QUERY"),...this.getPersistentHighlightSettingForOneType(this.#hs,"SCROLL_SNAP"),...this.getPersistentHighlightSettingForOneType(this.#ps,"ISOLATED_ELEMENT")];this.#ds.set(t)}}var Ls=Object.freeze({__proto__:null,OverlayPersistentHighlighter:Es});const As={pausedInDebugger:"Paused in debugger"},Os=n.i18n.registerUIStrings("core/sdk/OverlayModel.ts",As),Ds=n.i18n.getLocalizedString.bind(void 0,Os),Ns={mac:{x:85,y:0,width:185,height:40},linux:{x:0,y:0,width:196,height:34},windows:{x:0,y:0,width:238,height:33}};class Fs extends h{#er;overlayAgent;#Xr;#Ss=!1;#ks=null;#Cs;#xs;#Rs;#Ts;#Ms;#Ps;#Es;#Ls;#As=[];#Os=!0;#Ds;#Ns;#Fs=!1;#Bs;constructor(t){super(t),this.#er=t.model(Gs),t.registerOverlayDispatcher(this),this.overlayAgent=t.overlayAgent(),this.#Xr=t.model(ms),this.#Xr&&(e.Settings.Settings.instance().moduleSetting("disable-paused-state-overlay").addChangeListener(this.updatePausedInDebuggerMessage,this),this.#Xr.addEventListener(ys.DebuggerPaused,this.updatePausedInDebuggerMessage,this),this.#Xr.addEventListener(ys.DebuggerResumed,this.updatePausedInDebuggerMessage,this),this.#Xr.addEventListener(ys.GlobalObjectCleared,this.updatePausedInDebuggerMessage,this)),this.#Cs=new _s(this),this.#xs=this.#Cs,this.#Rs=e.Settings.Settings.instance().moduleSetting("show-paint-rects"),this.#Ts=e.Settings.Settings.instance().moduleSetting("show-layout-shift-regions"),this.#Ms=e.Settings.Settings.instance().moduleSetting("show-ad-highlights"),this.#Ps=e.Settings.Settings.instance().moduleSetting("show-debug-borders"),this.#Es=e.Settings.Settings.instance().moduleSetting("show-fps-counter"),this.#Ls=e.Settings.Settings.instance().moduleSetting("show-scroll-bottleneck-rects"),t.suspended()||(this.overlayAgent.invoke_enable(),this.wireAgentToSettings()),this.#Ds=new Es(this,{onGridOverlayStateChanged:({nodeId:e,enabled:t})=>this.dispatchEventToListeners("PersistentGridOverlayStateChanged",{nodeId:e,enabled:t}),onFlexOverlayStateChanged:({nodeId:e,enabled:t})=>this.dispatchEventToListeners("PersistentFlexContainerOverlayStateChanged",{nodeId:e,enabled:t}),onContainerQueryOverlayStateChanged:({nodeId:e,enabled:t})=>this.dispatchEventToListeners("PersistentContainerQueryOverlayStateChanged",{nodeId:e,enabled:t}),onScrollSnapOverlayStateChanged:({nodeId:e,enabled:t})=>this.dispatchEventToListeners("PersistentScrollSnapOverlayStateChanged",{nodeId:e,enabled:t})}),this.#er.addEventListener(Us.NodeRemoved,(()=>{this.#Ds&&this.#Ds.refreshHighlights()})),this.#er.addEventListener(Us.DocumentUpdated,(()=>{this.#Ds&&(this.#Ds.hideAllInOverlayWithoutSave(),t.suspended()||this.#Ds.restoreHighlightsForDocument())})),this.#Ns=new Hs(this),this.#Bs=new Bs(this.#er.cssModel())}static highlightObjectAsDOMNode(e){const t=e.runtimeModel().target().model(Gs);t&&t.overlayModel().highlightInOverlay({object:e,selectorList:void 0})}static hideDOMNodeHighlight(){for(const e of W.instance().models(Fs))e.delayedHideHighlight(0)}static async muteHighlight(){return await Promise.all(W.instance().models(Fs).map((e=>e.suspendModel())))}static async unmuteHighlight(){return await Promise.all(W.instance().models(Fs).map((e=>e.resumeModel())))}static highlightRect(e){for(const t of W.instance().models(Fs))t.highlightRect(e)}static clearHighlight(){for(const e of W.instance().models(Fs))e.clearHighlight()}getDOMModel(){return this.#er}highlightRect({x:e,y:t,width:n,height:r,color:s,outlineColor:i}){const o=s||{r:255,g:0,b:255,a:.3},a=i||{r:255,g:0,b:255,a:.5};return this.overlayAgent.invoke_highlightRect({x:e,y:t,width:n,height:r,color:o,outlineColor:a})}clearHighlight(){return this.overlayAgent.invoke_hideHighlight()}async wireAgentToSettings(){this.#As=[this.#Rs.addChangeListener((()=>this.overlayAgent.invoke_setShowPaintRects({result:this.#Rs.get()}))),this.#Ts.addChangeListener((()=>this.overlayAgent.invoke_setShowLayoutShiftRegions({result:this.#Ts.get()}))),this.#Ms.addChangeListener((()=>this.overlayAgent.invoke_setShowAdHighlights({show:this.#Ms.get()}))),this.#Ps.addChangeListener((()=>this.overlayAgent.invoke_setShowDebugBorders({show:this.#Ps.get()}))),this.#Es.addChangeListener((()=>this.overlayAgent.invoke_setShowFPSCounter({show:this.#Es.get()}))),this.#Ls.addChangeListener((()=>this.overlayAgent.invoke_setShowScrollBottleneckRects({show:this.#Ls.get()})))],this.#Rs.get()&&this.overlayAgent.invoke_setShowPaintRects({result:!0}),this.#Ts.get()&&this.overlayAgent.invoke_setShowLayoutShiftRegions({result:!0}),this.#Ms.get()&&this.overlayAgent.invoke_setShowAdHighlights({show:!0}),this.#Ps.get()&&this.overlayAgent.invoke_setShowDebugBorders({show:!0}),this.#Es.get()&&this.overlayAgent.invoke_setShowFPSCounter({show:!0}),this.#Ls.get()&&this.overlayAgent.invoke_setShowScrollBottleneckRects({show:!0}),this.#Xr&&this.#Xr.isPaused()&&this.updatePausedInDebuggerMessage(),await this.overlayAgent.invoke_setShowViewportSizeOnResize({show:this.#Os}),this.#Ds?.resetOverlay()}async suspendModel(){e.EventTarget.removeEventListeners(this.#As),await this.overlayAgent.invoke_disable()}async resumeModel(){await Promise.all([this.overlayAgent.invoke_enable(),this.wireAgentToSettings()])}setShowViewportSizeOnResize(e){this.#Os!==e&&(this.#Os=e,this.target().suspended()||this.overlayAgent.invoke_setShowViewportSizeOnResize({show:e}))}updatePausedInDebuggerMessage(){if(this.target().suspended())return;const t=this.#Xr&&this.#Xr.isPaused()&&!e.Settings.Settings.instance().moduleSetting("disable-paused-state-overlay").get()?Ds(As.pausedInDebugger):void 0;this.overlayAgent.invoke_setPausedInDebuggerMessage({message:t})}setHighlighter(e){this.#xs=e||this.#Cs}async setInspectMode(e,t=!0){await this.#er.requestDocument(),this.#Ss="none"!==e,this.dispatchEventToListeners("InspectModeWillBeToggled",this),this.#xs.setInspectMode(e,this.buildHighlightConfig("all",t))}inspectModeEnabled(){return this.#Ss}highlightInOverlay(e,t,n){if(this.#Fs)return;this.#ks&&(clearTimeout(this.#ks),this.#ks=null);const r=this.buildHighlightConfig(t);void 0!==n&&(r.showInfo=n),this.#xs.highlightInOverlay(e,r)}highlightInOverlayForTwoSeconds(e){this.highlightInOverlay(e),this.delayedHideHighlight(2e3)}highlightGridInPersistentOverlay(e){this.#Ds&&this.#Ds.highlightGridInOverlay(e)}isHighlightedGridInPersistentOverlay(e){return!!this.#Ds&&this.#Ds.isGridHighlighted(e)}hideGridInPersistentOverlay(e){this.#Ds&&this.#Ds.hideGridInOverlay(e)}highlightScrollSnapInPersistentOverlay(e){this.#Ds&&this.#Ds.highlightScrollSnapInOverlay(e)}isHighlightedScrollSnapInPersistentOverlay(e){return!!this.#Ds&&this.#Ds.isScrollSnapHighlighted(e)}hideScrollSnapInPersistentOverlay(e){this.#Ds&&this.#Ds.hideScrollSnapInOverlay(e)}highlightFlexContainerInPersistentOverlay(e){this.#Ds&&this.#Ds.highlightFlexInOverlay(e)}isHighlightedFlexContainerInPersistentOverlay(e){return!!this.#Ds&&this.#Ds.isFlexHighlighted(e)}hideFlexContainerInPersistentOverlay(e){this.#Ds&&this.#Ds.hideFlexInOverlay(e)}highlightContainerQueryInPersistentOverlay(e){this.#Ds&&this.#Ds.highlightContainerQueryInOverlay(e)}isHighlightedContainerQueryInPersistentOverlay(e){return!!this.#Ds&&this.#Ds.isContainerQueryHighlighted(e)}hideContainerQueryInPersistentOverlay(e){this.#Ds&&this.#Ds.hideContainerQueryInOverlay(e)}highlightSourceOrderInOverlay(t){const n={parentOutlineColor:e.Color.SourceOrderHighlight.ParentOutline.toProtocolRGBA(),childOutlineColor:e.Color.SourceOrderHighlight.ChildOutline.toProtocolRGBA()};this.#Ns.highlightSourceOrderInOverlay(t,n)}colorOfGridInPersistentOverlay(e){return this.#Ds?this.#Ds.colorOfGrid(e).asString("hex"):null}setColorOfGridInPersistentOverlay(t,n){if(!this.#Ds)return;const r=e.Color.parse(n);r&&(this.#Ds.setColorOfGrid(t,r),this.#Ds.resetOverlay())}colorOfFlexInPersistentOverlay(e){return this.#Ds?this.#Ds.colorOfFlex(e).asString("hex"):null}setColorOfFlexInPersistentOverlay(t,n){if(!this.#Ds)return;const r=e.Color.parse(n);r&&(this.#Ds.setColorOfFlex(t,r),this.#Ds.resetOverlay())}hideSourceOrderInOverlay(){this.#Ns.hideSourceOrderHighlight()}setSourceOrderActive(e){this.#Fs=e}sourceOrderModeActive(){return this.#Fs}delayedHideHighlight(e){null===this.#ks&&(this.#ks=window.setTimeout((()=>this.highlightInOverlay({clear:!0})),e))}highlightFrame(e){this.#ks&&(clearTimeout(this.#ks),this.#ks=null),this.#xs.highlightFrame(e)}showHingeForDualScreen(e){if(e){const{x:t,y:n,width:r,height:s,contentColor:i,outlineColor:o}=e;this.overlayAgent.invoke_setShowHinge({hingeConfig:{rect:{x:t,y:n,width:r,height:s},contentColor:i,outlineColor:o}})}else this.overlayAgent.invoke_setShowHinge({})}setWindowControlsPlatform(e){this.#Bs.selectedPlatform=e}setWindowControlsThemeColor(e){this.#Bs.themeColor=e}getWindowControlsConfig(){return this.#Bs.config}async toggleWindowControlsToolbar(e){const t=e?{windowControlsOverlayConfig:this.#Bs.config}:{},n=this.overlayAgent.invoke_setShowWindowControlsOverlay(t),r=this.#Bs.toggleEmulatedOverlay(e);await Promise.all([n,r]),this.setShowViewportSizeOnResize(!e)}buildHighlightConfig(t="all",n=!1){const r=e.Settings.Settings.instance().moduleSetting("show-metrics-rulers").get(),s={showInfo:"all"===t||"container-outline"===t,showRulers:r,showStyles:n,showAccessibilityInfo:n,showExtensionLines:r,gridHighlightConfig:{},flexContainerHighlightConfig:{},flexItemHighlightConfig:{},contrastAlgorithm:o.Runtime.experiments.isEnabled("apca")?"apca":"aa"};return"all"!==t&&"content"!==t||(s.contentColor=e.Color.PageHighlight.Content.toProtocolRGBA()),"all"!==t&&"padding"!==t||(s.paddingColor=e.Color.PageHighlight.Padding.toProtocolRGBA()),"all"!==t&&"border"!==t||(s.borderColor=e.Color.PageHighlight.Border.toProtocolRGBA()),"all"!==t&&"margin"!==t||(s.marginColor=e.Color.PageHighlight.Margin.toProtocolRGBA()),"all"===t&&(s.eventTargetColor=e.Color.PageHighlight.EventTarget.toProtocolRGBA(),s.shapeColor=e.Color.PageHighlight.Shape.toProtocolRGBA(),s.shapeMarginColor=e.Color.PageHighlight.ShapeMargin.toProtocolRGBA(),s.gridHighlightConfig={rowGapColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA(),rowHatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),columnGapColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA(),columnHatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),rowLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),columnLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),rowLineDash:!0,columnLineDash:!0},s.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},itemSeparator:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dotted"},lineSeparator:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},mainDistributedSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()},crossDistributedSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()},rowGapSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()},columnGapSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()}},s.flexItemHighlightConfig={baseSizeBox:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA()},baseSizeBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dotted"},flexibilityArrow:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA()}}),t.endsWith("gap")&&(s.gridHighlightConfig={gridBorderColor:e.Color.PageHighlight.GridBorder.toProtocolRGBA(),gridBorderDash:!0},"gap"!==t&&"row-gap"!==t||(s.gridHighlightConfig.rowGapColor=e.Color.PageHighlight.GapBackground.toProtocolRGBA(),s.gridHighlightConfig.rowHatchColor=e.Color.PageHighlight.GapHatch.toProtocolRGBA()),"gap"!==t&&"column-gap"!==t||(s.gridHighlightConfig.columnGapColor=e.Color.PageHighlight.GapBackground.toProtocolRGBA(),s.gridHighlightConfig.columnHatchColor=e.Color.PageHighlight.GapHatch.toProtocolRGBA())),t.endsWith("gap")&&(s.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"}},"gap"!==t&&"row-gap"!==t||(s.flexContainerHighlightConfig.rowGapSpace={hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()}),"gap"!==t&&"column-gap"!==t||(s.flexContainerHighlightConfig.columnGapSpace={hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()})),"grid-areas"===t&&(s.gridHighlightConfig={rowLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),columnLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),rowLineDash:!0,columnLineDash:!0,showAreaNames:!0,areaBorderColor:e.Color.PageHighlight.GridAreaBorder.toProtocolRGBA()}),"grid-template-columns"===t&&(s.contentColor=e.Color.PageHighlight.Content.toProtocolRGBA(),s.gridHighlightConfig={columnLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),columnLineDash:!0}),"grid-template-rows"===t&&(s.contentColor=e.Color.PageHighlight.Content.toProtocolRGBA(),s.gridHighlightConfig={rowLineColor:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),rowLineDash:!0}),"justify-content"===t&&(s.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},mainDistributedSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()}}),"align-content"===t&&(s.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},crossDistributedSpace:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA(),fillColor:e.Color.PageHighlight.GapBackground.toProtocolRGBA()}}),"align-items"===t&&(s.flexContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},lineSeparator:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"},crossAlignment:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA()}}),"flexibility"===t&&(s.flexItemHighlightConfig={baseSizeBox:{hatchColor:e.Color.PageHighlight.GapHatch.toProtocolRGBA()},baseSizeBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dotted"},flexibilityArrow:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA()}}),"container-outline"===t&&(s.containerQueryContainerHighlightConfig={containerBorder:{color:e.Color.PageHighlight.LayoutLine.toProtocolRGBA(),pattern:"dashed"}}),s}nodeHighlightRequested({nodeId:e}){const t=this.#er.nodeForId(e);t&&this.dispatchEventToListeners("HighlightNodeRequested",t)}static setInspectNodeHandler(e){Fs.inspectNodeHandler=e}inspectNodeRequested({backendNodeId:t}){const n=new js(this.target(),t);Fs.inspectNodeHandler?n.resolvePromise().then((e=>{e&&Fs.inspectNodeHandler&&Fs.inspectNodeHandler(e)})):e.Revealer.reveal(n),this.dispatchEventToListeners("InspectModeExited")}screenshotRequested({viewport:e}){this.dispatchEventToListeners("ScreenshotRequested",e),this.dispatchEventToListeners("InspectModeExited")}inspectModeCanceled(){this.dispatchEventToListeners("InspectModeExited")}static inspectNodeHandler=null;getOverlayAgent(){return this.overlayAgent}async hasStyleSheetText(e){return await this.#Bs.initializeStyleSheetText(e)}}class Bs{#lt;#_s;#Hs;#Us;#qs={showCSS:!1,selectedPlatform:"Windows",themeColor:"#ffffff"};constructor(e){this.#lt=e}get selectedPlatform(){return this.#qs.selectedPlatform}set selectedPlatform(e){this.#qs.selectedPlatform=e}get themeColor(){return this.#qs.themeColor}set themeColor(e){this.#qs.themeColor=e}get config(){return this.#qs}async initializeStyleSheetText(e){if(this.#_s&&e===this.#Us)return!0;const t=this.#zs(e);if(!t)return!1;if(this.#Hs=this.#js(t),!this.#Hs)return!1;const n=await this.#lt.getStyleSheetText(this.#Hs);return!!n&&(this.#_s=n,this.#Us=e,!0)}async toggleEmulatedOverlay(e){if(this.#Hs&&this.#_s)if(e){const e=Bs.#Vs(this.#qs.selectedPlatform.toLowerCase(),this.#_s);e&&await this.#lt.setStyleSheetText(this.#Hs,e,!1)}else await this.#lt.setStyleSheetText(this.#Hs,this.#_s,!1)}static#Vs(e,t){const n=Ns[e];return Bs.#Ws(n.x,n.y,n.width,n.height,t)}#zs(t){const n=e.ParsedURL.ParsedURL.extractOrigin(t),r=this.#lt.styleSheetHeaders().find((e=>e.sourceURL&&e.sourceURL.includes(n)));return r?.sourceURL}#js(e){const t=this.#lt.getStyleSheetIdsForURL(e);return t.length>0?t[0]:void 0}static#Ws(e,t,n,r,s){if(!s)return;return s.replace(/: env\(titlebar-area-x(?:,[^)]*)?\);/g,`: env(titlebar-area-x, ${e}px);`).replace(/: env\(titlebar-area-y(?:,[^)]*)?\);/g,`: env(titlebar-area-y, ${t}px);`).replace(/: env\(titlebar-area-width(?:,[^)]*)?\);/g,`: env(titlebar-area-width, calc(100% - ${n}px));`).replace(/: env\(titlebar-area-height(?:,[^)]*)?\);/g,`: env(titlebar-area-height, ${r}px);`)}transformStyleSheetforTesting(e,t,n,r,s){return Bs.#Ws(e,t,n,r,s)}}class _s{#ls;constructor(e){this.#ls=e}highlightInOverlay(e,t){const{node:n,deferredNode:r,object:s,selectorList:i}={node:void 0,deferredNode:void 0,object:void 0,selectorList:void 0,...e},o=n?n.id:void 0,a=r?r.backendNodeId():void 0,l=s?s.objectId:void 0;o||a||l?this.#ls.target().overlayAgent().invoke_highlightNode({highlightConfig:t,nodeId:o,backendNodeId:a,objectId:l,selector:i}):this.#ls.target().overlayAgent().invoke_hideHighlight()}async setInspectMode(e,t){await this.#ls.target().overlayAgent().invoke_setInspectMode({mode:e,highlightConfig:t})}highlightFrame(t){this.#ls.target().overlayAgent().invoke_highlightFrame({frameId:t,contentColor:e.Color.PageHighlight.Content.toProtocolRGBA(),contentOutlineColor:e.Color.PageHighlight.ContentOutline.toProtocolRGBA()})}}class Hs{#ls;constructor(e){this.#ls=e}highlightSourceOrderInOverlay(e,t){this.#ls.setSourceOrderActive(!0),this.#ls.setShowViewportSizeOnResize(!1),this.#ls.getOverlayAgent().invoke_highlightSourceOrder({sourceOrderConfig:t,nodeId:e.id})}hideSourceOrderHighlight(){this.#ls.setSourceOrderActive(!1),this.#ls.setShowViewportSizeOnResize(!0),this.#ls.clearHighlight()}}h.register(Fs,{capabilities:2,autostart:!0});var Us,qs=Object.freeze({__proto__:null,OverlayModel:Fs,SourceOrderHighlighter:Hs,WindowControls:Bs});class zs{#Gs;#Ks;ownerDocument;#Qs;id;index=void 0;#$s;#Xs;#Js;#Ys;nodeValueInternal;#Zs;#ei;#ti;#ni;#ri;#si;#ii;#oi=null;#ai=new Map;#li=[];assignedSlot=null;shadowRootsInternal=[];#di=new Map;#ci=new Map;#hi=0;childNodeCountInternal;childrenInternal=null;nextSibling=null;previousSibling=null;firstChild=null;lastChild=null;parentNode=null;templateContentInternal;contentDocumentInternal;childDocumentPromiseForTesting;#ui;publicId;systemId;internalSubset;name;value;constructor(e){this.#Gs=e,this.#Ks=this.#Gs.getAgent()}static create(e,t,n,r){const s=new zs(e);return s.init(t,n,r),s}init(e,t,n){if(this.#Ks=this.#Gs.getAgent(),this.ownerDocument=e,this.#Qs=t,this.id=n.nodeId,this.#$s=n.backendNodeId,this.#Gs.registerNode(this),this.#Xs=n.nodeType,this.#Js=n.nodeName,this.#Ys=n.localName,this.nodeValueInternal=n.nodeValue,this.#Zs=n.pseudoType,this.#ei=n.pseudoIdentifier,this.#ti=n.shadowRootType,this.#ni=n.frameId||null,this.#ri=n.xmlVersion,this.#si=Boolean(n.isSVG),this.#ii=Boolean(n.isScrollable),n.attributes&&this.setAttributesPayload(n.attributes),this.childNodeCountInternal=n.childNodeCount||0,n.shadowRoots)for(let e=0;ee.creation||null)),this.#oi}get subtreeMarkerCount(){return this.#hi}domModel(){return this.#Gs}backendNodeId(){return this.#$s}children(){return this.childrenInternal?this.childrenInternal.slice():null}setChildren(e){this.childrenInternal=e}setIsScrollable(e){this.#ii=e}hasAttributes(){return this.#di.size>0}childNodeCount(){return this.childNodeCountInternal}setChildNodeCount(e){this.childNodeCountInternal=e}shadowRoots(){return this.shadowRootsInternal.slice()}templateContent(){return this.templateContentInternal||null}contentDocument(){return this.contentDocumentInternal||null}setContentDocument(e){this.contentDocumentInternal=e}isIframe(){return"IFRAME"===this.#Js}importedDocument(){return this.#ui||null}nodeType(){return this.#Xs}nodeName(){return this.#Js}pseudoType(){return this.#Zs}pseudoIdentifier(){return this.#ei}hasPseudoElements(){return this.#ai.size>0}pseudoElements(){return this.#ai}checkmarkPseudoElement(){return this.#ai.get("checkmark")?.at(-1)}beforePseudoElement(){return this.#ai.get("before")?.at(-1)}afterPseudoElement(){return this.#ai.get("after")?.at(-1)}pickerIconPseudoElement(){return this.#ai.get("picker-icon")?.at(-1)}markerPseudoElement(){return this.#ai.get("marker")?.at(-1)}backdropPseudoElement(){return this.#ai.get("backdrop")?.at(-1)}viewTransitionPseudoElements(){return[...this.#ai.get("view-transition")||[],...this.#ai.get("view-transition-group")||[],...this.#ai.get("view-transition-image-pair")||[],...this.#ai.get("view-transition-old")||[],...this.#ai.get("view-transition-new")||[]]}carouselPseudoElements(){return[...this.#ai.get("scroll-button")||[],...this.#ai.get("column")||[],...this.#ai.get("scroll-marker")||[],...this.#ai.get("scroll-marker-group")||[]]}hasAssignedSlot(){return null!==this.assignedSlot}isInsertionPoint(){return!this.isXMLNode()&&("SHADOW"===this.#Js||"CONTENT"===this.#Js||"SLOT"===this.#Js)}distributedNodes(){return this.#li}isInShadowTree(){return this.#Qs}ancestorShadowHost(){const e=this.ancestorShadowRoot();return e?e.parentNode:null}ancestorShadowRoot(){if(!this.#Qs)return null;let e=this;for(;e&&!e.isShadowRoot();)e=e.parentNode;return e}ancestorUserAgentShadowRoot(){const e=this.ancestorShadowRoot();return e&&e.shadowRootType()===zs.ShadowRootTypes.UserAgent?e:null}isShadowRoot(){return Boolean(this.#ti)}shadowRootType(){return this.#ti||null}nodeNameInCorrectCase(){const e=this.shadowRootType();return e?"#shadow-root ("+e+")":this.localName()?this.localName().length!==this.nodeName().length?this.nodeName():this.localName():this.nodeName()}setNodeName(e,t){this.#Ks.invoke_setNodeName({nodeId:this.id,name:e}).then((e=>{e.getError()||this.#Gs.markUndoableState(),t&&t(e.getError()||null,this.#Gs.nodeForId(e.nodeId))}))}localName(){return this.#Ys}nodeValue(){return this.nodeValueInternal}setNodeValueInternal(e){this.nodeValueInternal=e}setNodeValue(e,t){this.#Ks.invoke_setNodeValue({nodeId:this.id,value:e}).then((e=>{e.getError()||this.#Gs.markUndoableState(),t&&t(e.getError()||null)}))}getAttribute(e){const t=this.#di.get(e);return t?t.value:void 0}setAttribute(e,t,n){this.#Ks.invoke_setAttributesAsText({nodeId:this.id,text:t,name:e}).then((e=>{e.getError()||this.#Gs.markUndoableState(),n&&n(e.getError()||null)}))}setAttributeValue(e,t,n){this.#Ks.invoke_setAttributeValue({nodeId:this.id,name:e,value:t}).then((e=>{e.getError()||this.#Gs.markUndoableState(),n&&n(e.getError()||null)}))}setAttributeValuePromise(e,t){return new Promise((n=>this.setAttributeValue(e,t,n)))}attributes(){return[...this.#di.values()]}async removeAttribute(e){(await this.#Ks.invoke_removeAttribute({nodeId:this.id,name:e})).getError()||(this.#di.delete(e),this.#Gs.markUndoableState())}getChildNodesPromise(){return new Promise((e=>this.getChildNodes((t=>e(t)))))}getChildNodes(e){this.childrenInternal?e(this.children()):this.#Ks.invoke_requestChildNodes({nodeId:this.id}).then((t=>{e(t.getError()?null:this.children())}))}async getSubtree(e,t){return(await this.#Ks.invoke_requestChildNodes({nodeId:this.id,depth:e,pierce:t})).getError()?null:this.childrenInternal}async getOuterHTML(){const{outerHTML:e}=await this.#Ks.invoke_getOuterHTML({nodeId:this.id});return e}setOuterHTML(e,t){this.#Ks.invoke_setOuterHTML({nodeId:this.id,outerHTML:e}).then((e=>{e.getError()||this.#Gs.markUndoableState(),t&&t(e.getError()||null)}))}removeNode(e){return this.#Ks.invoke_removeNode({nodeId:this.id}).then((t=>{t.getError()||this.#Gs.markUndoableState(),e&&e(t.getError()||null)}))}async copyNode(){const{outerHTML:e}=await this.#Ks.invoke_getOuterHTML({nodeId:this.id});return null!==e&&a.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(e),e}path(){function e(e){return e.#Js.length?void 0!==e.index?e.index:e.parentNode?e.isShadowRoot()?e.shadowRootType()===zs.ShadowRootTypes.UserAgent?"u":"a":e.nodeType()===Node.DOCUMENT_NODE?"d":null:null:null}const t=[];let n=this;for(;n;){const r=e(n);if(null===r)break;t.push([r,n.#Js]),n=n.parentNode}return t.reverse(),t.join(",")}isAncestor(e){if(!e)return!1;let t=e.parentNode;for(;t;){if(this===t)return!0;t=t.parentNode}return!1}isDescendant(e){return e.isAncestor(this)}frameOwnerFrameId(){return this.#ni}frameId(){let e=this.parentNode||this;for(;!e.#ni&&e.parentNode;)e=e.parentNode;return e.#ni}setAttributesPayload(e){let t=!this.#di||e.length!==2*this.#di.size;const n=this.#di||new Map;this.#di=new Map;for(let r=0;rt!==e));n&&n.length>0?this.#ai.set(t,n):this.#ai.delete(t)}else{const t=this.shadowRootsInternal.indexOf(e);if(-1!==t)this.shadowRootsInternal.splice(t,1);else{if(!this.childrenInternal)throw new Error("DOMNode._children is expected to not be null.");if(-1===this.childrenInternal.indexOf(e))throw new Error("DOMNode._children is expected to contain the node to be removed.");this.childrenInternal.splice(this.childrenInternal.indexOf(e),1)}}e.parentNode=null,this.#hi-=e.#hi,e.#hi&&this.#Gs.dispatchEventToListeners(Us.MarkersChanged,this),this.renumber()}setChildrenPayload(e){this.childrenInternal=[];for(let t=0;t=0?this.childrenInternal[e-1]:null,t.parentNode=this}}addAttribute(e,t){const n={name:e,value:t,_node:this};this.#di.set(e,n)}setAttributeInternal(e,t){const n=this.#di.get(e);n?n.value=t:this.addAttribute(e,t)}removeAttributeInternal(e){this.#di.delete(e)}copyTo(e,t,n){this.#Ks.invoke_copyTo({nodeId:this.id,targetNodeId:e.id,insertBeforeNodeId:t?t.id:void 0}).then((e=>{e.getError()||this.#Gs.markUndoableState(),n&&n(e.getError()||null,this.#Gs.nodeForId(e.nodeId))}))}moveTo(e,t,n){this.#Ks.invoke_moveTo({nodeId:this.id,targetNodeId:e.id,insertBeforeNodeId:t?t.id:void 0}).then((e=>{e.getError()||this.#Gs.markUndoableState(),n&&n(e.getError()||null,this.#Gs.nodeForId(e.nodeId))}))}isXMLNode(){return Boolean(this.#ri)}setMarker(e,t){if(null!==t){if(this.parentNode&&!this.#ci.has(e))for(let e=this;e;e=e.parentNode)++e.#hi;this.#ci.set(e,t);for(let e=this;e;e=e.parentNode)this.#Gs.dispatchEventToListeners(Us.MarkersChanged,e)}else{if(!this.#ci.has(e))return;this.#ci.delete(e);for(let e=this;e;e=e.parentNode)--e.#hi;for(let e=this;e;e=e.parentNode)this.#Gs.dispatchEventToListeners(Us.MarkersChanged,e)}}marker(e){return this.#ci.get(e)||null}getMarkerKeysForTest(){return[...this.#ci.keys()]}traverseMarkers(e){!function t(n){if(n.#hi){for(const t of n.#ci.keys())e(n,t);if(n.childrenInternal)for(const e of n.childrenInternal)t(e)}}(this)}resolveURL(t){if(!t)return t;for(let n=this;n;n=n.parentNode)if(n instanceof Ws&&n.baseURL)return e.ParsedURL.ParsedURL.completeURL(n.baseURL,t);return null}highlight(e){this.#Gs.overlayModel().highlightInOverlay({node:this,selectorList:void 0},e)}highlightForTwoSeconds(){this.#Gs.overlayModel().highlightInOverlayForTwoSeconds({node:this,selectorList:void 0})}async resolveToObject(e,t){const{object:n}=await this.#Ks.invoke_resolveNode({nodeId:this.id,backendNodeId:void 0,executionContextId:t,objectGroup:e});return n&&this.#Gs.runtimeModelInternal.createRemoteObject(n)||null}async boxModel(){const{model:e}=await this.#Ks.invoke_getBoxModel({nodeId:this.id});return e}async setAsInspectedNode(){let e=this;for(e?.pseudoType()&&(e=e.parentNode);e;){let t=e.ancestorUserAgentShadowRoot();if(!t)break;if(t=e.ancestorShadowHost(),!t)break;e=t}if(!e)throw new Error("In DOMNode.setAsInspectedNode: node is expected to not be null.");await this.#Ks.invoke_setInspectedNode({nodeId:e.id})}enclosingElementOrSelf(){let e=this;return e&&e.nodeType()===Node.TEXT_NODE&&e.parentNode&&(e=e.parentNode),e&&e.nodeType()!==Node.ELEMENT_NODE&&(e=null),e}async callFunction(e,t=[]){const n=await this.resolveToObject();if(!n)return null;const r=await n.callFunction(e,t.map((e=>Bn.toCallArgument(e))));return n.release(),r.wasThrown||!r.object?null:{value:r.object.value}}async scrollIntoView(){const e=this.enclosingElementOrSelf();if(!e)return;await e.callFunction((function(){this.scrollIntoViewIfNeeded(!0)}))&&e.highlightForTwoSeconds()}async focus(){const e=this.enclosingElementOrSelf();if(!e)throw new Error("DOMNode.focus expects node to not be null.");await e.callFunction((function(){this.focus()}))&&(e.highlightForTwoSeconds(),await this.#Gs.target().pageAgent().invoke_bringToFront())}simpleSelector(){const e=this.localName()||this.nodeName().toLowerCase();if(this.nodeType()!==Node.ELEMENT_NODE)return e;const t=this.getAttribute("type"),n=this.getAttribute("id"),r=this.getAttribute("class");if("input"===e&&t&&!n&&!r)return e+'[type="'+CSS.escape(t)+'"]';if(n)return e+"#"+CSS.escape(n);if(r){return("div"===e?"":e)+"."+r.trim().split(/\s+/g).map((e=>CSS.escape(e))).join(".")}return this.pseudoIdentifier()?`${e}(${this.pseudoIdentifier()})`:e}async getAnchorBySpecifier(e){const t=await this.#Ks.invoke_getAnchorElement({nodeId:this.id,anchorSpecifier:e});return t.getError()?null:this.domModel().nodeForId(t.nodeId)}classNames(){const e=this.getAttribute("class");return e?e.split(/\s+/):[]}}!function(e){let t;!function(e){e.UserAgent="user-agent",e.Open="open",e.Closed="closed"}(t=e.ShadowRootTypes||(e.ShadowRootTypes={}))}(zs||(zs={}));class js{#Gs;#$s;constructor(e,t){this.#Gs=e.model(Gs),this.#$s=t}resolve(e){this.resolvePromise().then(e)}async resolvePromise(){const e=await this.#Gs.pushNodesByBackendIdsToFrontend(new Set([this.#$s]));return e?.get(this.#$s)||null}backendNodeId(){return this.#$s}domModel(){return this.#Gs}highlight(){this.#Gs.overlayModel().highlightInOverlay({deferredNode:this,selectorList:void 0})}}class Vs{nodeType;nodeName;deferredNode;constructor(e,t,n,r){this.nodeType=n,this.nodeName=r,this.deferredNode=new js(e,t)}}class Ws extends zs{body;documentElement;documentURL;baseURL;constructor(e,t){super(e),this.body=null,this.documentElement=null,this.init(this,!1,t),this.documentURL=t.documentURL||"",this.baseURL=t.baseURL||""}}class Gs extends h{agent;idToDOMNode=new Map;#gi=null;#pi=new Set;runtimeModelInternal;#mi;#fi=null;#bi;#yi;#vi;constructor(e){super(e),this.agent=e.domAgent(),e.registerDOMDispatcher(new Ks(this)),this.runtimeModelInternal=e.model(Jr),e.suspended()||this.agent.invoke_enable({}),o.Runtime.experiments.isEnabled("capture-node-creation-stacks")&&this.agent.invoke_setNodeStackTracesEnabled({enable:!0})}runtimeModel(){return this.runtimeModelInternal}cssModel(){return this.target().model(Br)}overlayModel(){return this.target().model(Fs)}static cancelSearch(){for(const e of W.instance().models(Gs))e.cancelSearch()}scheduleMutationEvent(e){this.hasEventListeners(Us.DOMMutated)&&(this.#mi=(this.#mi||0)+1,Promise.resolve().then(function(e,t){if(!this.hasEventListeners(Us.DOMMutated)||this.#mi!==t)return;this.dispatchEventToListeners(Us.DOMMutated,e)}.bind(this,e,this.#mi)))}requestDocument(){return this.#gi?Promise.resolve(this.#gi):(this.#fi||(this.#fi=this.requestDocumentInternal()),this.#fi)}async getOwnerNodeForFrame(e){const t=await this.agent.invoke_getFrameOwner({frameId:e});return t.getError()?null:new js(this.target(),t.backendNodeId)}async requestDocumentInternal(){const e=await this.agent.invoke_getDocument({});if(e.getError())return null;const{root:t}=e;if(this.#fi=null,t&&this.setDocument(t),!this.#gi)return console.error("No document"),null;const n=this.parentModel();if(n&&!this.#bi){await n.requestDocument();const e=this.target().model(ii)?.mainFrame;if(e){const t=await n.agent.invoke_getFrameOwner({frameId:e.id});!t.getError()&&t.nodeId&&(this.#bi=n.nodeForId(t.nodeId))}}if(this.#bi){const e=this.#bi.contentDocument();this.#bi.setContentDocument(this.#gi),this.#bi.setChildren([]),this.#gi?(this.#gi.parentNode=this.#bi,this.dispatchEventToListeners(Us.NodeInserted,this.#gi)):e&&this.dispatchEventToListeners(Us.NodeRemoved,{node:e,parent:this.#bi})}return this.#gi}existingDocument(){return this.#gi}async pushNodeToFrontend(e){await this.requestDocument();const{nodeId:t}=await this.agent.invoke_requestNode({objectId:e});return this.nodeForId(t)}pushNodeByPathToFrontend(e){return this.requestDocument().then((()=>this.agent.invoke_pushNodeByPathToFrontend({path:e}))).then((({nodeId:e})=>e))}async pushNodesByBackendIdsToFrontend(e){await this.requestDocument();const t=[...e],{nodeIds:n}=await this.agent.invoke_pushNodesByBackendIdsToFrontend({backendNodeIds:t});if(!n)return null;const r=new Map;for(let e=0;ethis.#pi.add(e))),this.#yi||(this.#yi=window.setTimeout(this.loadNodeAttributes.bind(this),20))}loadNodeAttributes(){this.#yi=void 0;for(const e of this.#pi)this.agent.invoke_getAttributes({nodeId:e}).then((({attributes:t})=>{if(!t)return;const n=this.idToDOMNode.get(e);n&&n.setAttributesPayload(t)&&(this.dispatchEventToListeners(Us.AttrModified,{node:n,name:"style"}),this.scheduleMutationEvent(n))}));this.#pi.clear()}characterDataModified(e,t){const n=this.idToDOMNode.get(e);n?(n.setNodeValueInternal(t),this.dispatchEventToListeners(Us.CharacterDataModified,n),this.scheduleMutationEvent(n)):console.error("nodeId could not be resolved to a node")}nodeForId(e){return e&&this.idToDOMNode.get(e)||null}documentUpdated(){const e=Boolean(this.#gi);this.setDocument(null),this.parentModel()&&e&&!this.#fi&&this.requestDocument()}setDocument(e){this.idToDOMNode=new Map,this.#gi=e&&"nodeId"in e?new Ws(this,e):null,$s.instance().dispose(this),this.parentModel()||this.dispatchEventToListeners(Us.DocumentUpdated,this)}setDocumentForTest(e){this.setDocument(e)}setDetachedRoot(e){"#document"===e.nodeName?new Ws(this,e):zs.create(this,null,!1,e)}setChildNodes(e,t){if(!e&&t.length)return void this.setDetachedRoot(t[0]);const n=this.idToDOMNode.get(e);n?.setChildrenPayload(t)}childNodeCountUpdated(e,t){const n=this.idToDOMNode.get(e);n?(n.setChildNodeCount(t),this.dispatchEventToListeners(Us.ChildNodeCountUpdated,n),this.scheduleMutationEvent(n)):console.error("nodeId could not be resolved to a node")}childNodeInserted(e,t,n){const r=this.idToDOMNode.get(e),s=this.idToDOMNode.get(t);if(!r)return void console.error("parentId could not be resolved to a node");const i=r.insertChild(s,n);this.idToDOMNode.set(i.id,i),this.dispatchEventToListeners(Us.NodeInserted,i),this.scheduleMutationEvent(i)}childNodeRemoved(e,t){const n=this.idToDOMNode.get(e),r=this.idToDOMNode.get(t);n&&r?(n.removeChild(r),this.unbind(r),this.dispatchEventToListeners(Us.NodeRemoved,{node:r,parent:n}),this.scheduleMutationEvent(r)):console.error("parentId or nodeId could not be resolved to a node")}shadowRootPushed(e,t){const n=this.idToDOMNode.get(e);if(!n)return;const r=zs.create(this,n.ownerDocument,!0,t);r.parentNode=n,this.idToDOMNode.set(r.id,r),n.shadowRootsInternal.unshift(r),this.dispatchEventToListeners(Us.NodeInserted,r),this.scheduleMutationEvent(r)}shadowRootPopped(e,t){const n=this.idToDOMNode.get(e);if(!n)return;const r=this.idToDOMNode.get(t);r&&(n.removeChild(r),this.unbind(r),this.dispatchEventToListeners(Us.NodeRemoved,{node:r,parent:n}),this.scheduleMutationEvent(r))}pseudoElementAdded(e,t){const n=this.idToDOMNode.get(e);if(!n)return;const r=zs.create(this,n.ownerDocument,!1,t);r.parentNode=n,this.idToDOMNode.set(r.id,r);const s=r.pseudoType();if(!s)throw new Error("DOMModel._pseudoElementAdded expects pseudoType to be defined.");const i=n.pseudoElements().get(s);if(i&&i.length>0){if(!s.startsWith("view-transition")&&!s.startsWith("scroll-")&&"column"!==s)throw new Error(`DOMModel.pseudoElementAdded expects parent to not already have this pseudo type added; only view-transition* and scrolling pseudo elements can coexist under the same parent. ${i.length} elements of type ${s} already exist on parent.`);i.push(r)}else n.pseudoElements().set(s,[r]);this.dispatchEventToListeners(Us.NodeInserted,r),this.scheduleMutationEvent(r)}scrollableFlagUpdated(e,t){const n=this.nodeForId(e);n&&n.isScrollable()!==t&&(n.setIsScrollable(t),this.dispatchEventToListeners(Us.ScrollableFlagUpdated,{node:n}))}topLayerElementsUpdated(){this.dispatchEventToListeners(Us.TopLayerElementsChanged)}pseudoElementRemoved(e,t){const n=this.idToDOMNode.get(e);if(!n)return;const r=this.idToDOMNode.get(t);r&&(n.removeChild(r),this.unbind(r),this.dispatchEventToListeners(Us.NodeRemoved,{node:r,parent:n}),this.scheduleMutationEvent(r))}distributedNodesUpdated(e,t){const n=this.idToDOMNode.get(e);n&&(n.setDistributedNodePayloads(t),this.dispatchEventToListeners(Us.DistributedNodesChanged,n),this.scheduleMutationEvent(n))}unbind(e){this.idToDOMNode.delete(e.id);const t=e.children();for(let e=0;t&&ee||[]))}querySelector(e,t){return this.agent.invoke_querySelector({nodeId:e,selector:t}).then((({nodeId:e})=>e))}querySelectorAll(e,t){return this.agent.invoke_querySelectorAll({nodeId:e,selector:t}).then((({nodeIds:e})=>e))}getTopLayerElements(){return this.agent.invoke_getTopLayerElements().then((({nodeIds:e})=>e))}getDetachedDOMNodes(){return this.agent.invoke_getDetachedDomNodes().then((({detachedNodes:e})=>e))}getElementByRelation(e,t){return this.agent.invoke_getElementByRelation({nodeId:e,relation:t}).then((({nodeId:e})=>e))}markUndoableState(e){$s.instance().markUndoableState(this,e||!1)}async nodeForLocation(e,t,n){const r=await this.agent.invoke_getNodeForLocation({x:e,y:t,includeUserAgentShadowDOM:n});return r.getError()||!r.nodeId?null:this.nodeForId(r.nodeId)}async getContainerForNode(e,t,n,r,s){const{nodeId:i}=await this.agent.invoke_getContainerForNode({nodeId:e,containerName:t,physicalAxes:n,logicalAxes:r,queriesScrollState:s});return i?this.nodeForId(i):null}pushObjectAsNodeToFrontend(e){return e.isNode()&&e.objectId?this.pushNodeToFrontend(e.objectId):Promise.resolve(null)}suspendModel(){return this.agent.invoke_disable().then((()=>this.setDocument(null)))}async resumeModel(){await this.agent.invoke_enable({})}dispose(){$s.instance().dispose(this)}parentModel(){const e=this.target().parentTarget();return e?e.model(Gs):null}getAgent(){return this.agent}registerNode(e){this.idToDOMNode.set(e.id,e)}}!function(e){e.AttrModified="AttrModified",e.AttrRemoved="AttrRemoved",e.CharacterDataModified="CharacterDataModified",e.DOMMutated="DOMMutated",e.NodeInserted="NodeInserted",e.NodeRemoved="NodeRemoved",e.DocumentUpdated="DocumentUpdated",e.ChildNodeCountUpdated="ChildNodeCountUpdated",e.DistributedNodesChanged="DistributedNodesChanged",e.MarkersChanged="MarkersChanged",e.TopLayerElementsChanged="TopLayerElementsChanged",e.ScrollableFlagUpdated="ScrollableFlagUpdated"}(Us||(Us={}));class Ks{#er;constructor(e){this.#er=e}documentUpdated(){this.#er.documentUpdated()}attributeModified({nodeId:e,name:t,value:n}){this.#er.attributeModified(e,t,n)}attributeRemoved({nodeId:e,name:t}){this.#er.attributeRemoved(e,t)}inlineStyleInvalidated({nodeIds:e}){this.#er.inlineStyleInvalidated(e)}characterDataModified({nodeId:e,characterData:t}){this.#er.characterDataModified(e,t)}setChildNodes({parentId:e,nodes:t}){this.#er.setChildNodes(e,t)}childNodeCountUpdated({nodeId:e,childNodeCount:t}){this.#er.childNodeCountUpdated(e,t)}childNodeInserted({parentNodeId:e,previousNodeId:t,node:n}){this.#er.childNodeInserted(e,t,n)}childNodeRemoved({parentNodeId:e,nodeId:t}){this.#er.childNodeRemoved(e,t)}shadowRootPushed({hostId:e,root:t}){this.#er.shadowRootPushed(e,t)}shadowRootPopped({hostId:e,rootId:t}){this.#er.shadowRootPopped(e,t)}pseudoElementAdded({parentId:e,pseudoElement:t}){this.#er.pseudoElementAdded(e,t)}pseudoElementRemoved({parentId:e,pseudoElementId:t}){this.#er.pseudoElementRemoved(e,t)}distributedNodesUpdated({insertionPointId:e,distributedNodes:t}){this.#er.distributedNodesUpdated(e,t)}topLayerElementsUpdated(){this.#er.topLayerElementsUpdated()}scrollableFlagUpdated({nodeId:e,isScrollable:t}){this.#er.scrollableFlagUpdated(e,t)}}let Qs=null;class $s{#Lt;#as;#Ii;constructor(){this.#Lt=[],this.#as=0,this.#Ii=null}static instance(e={forceNew:null}){const{forceNew:t}=e;return Qs&&!t||(Qs=new $s),Qs}async markUndoableState(e,t){this.#Ii&&e!==this.#Ii&&(this.#Ii.markUndoableState(),this.#Ii=null),t&&this.#Ii===e||(this.#Lt=this.#Lt.slice(0,this.#as),this.#Lt.push(e),this.#as=this.#Lt.length,t?this.#Ii=e:(await e.getAgent().invoke_markUndoableState(),this.#Ii=null))}async undo(){if(0===this.#as)return await Promise.resolve();--this.#as,this.#Ii=null,await this.#Lt[this.#as].getAgent().invoke_undo()}async redo(){if(this.#as>=this.#Lt.length)return await Promise.resolve();++this.#as,this.#Ii=null,await this.#Lt[this.#as-1].getAgent().invoke_redo()}dispose(e){let t=0;for(let n=0;n(t.ContentData.ContentData.isError(e)||(this.#Ai=e),this.#Oi=null,e)))),await this.#Oi)}canonicalMimeType(){return this.contentType().canonicalMimeType()||this.mimeType}async searchInContent(e,n,r){if(!this.frameId)return[];if(this.request)return await this.request.searchInContent(e,n,r);const s=await this.#rr.target().pageAgent().invoke_searchInResource({frameId:this.frameId,url:this.url,query:e,caseSensitive:n,isRegex:r});return t.TextUtils.performSearchInSearchMatches(s.result||[],e,n,r)}async populateImageSource(e){const n=await this.requestContentData();t.ContentData.ContentData.isError(n)||(e.src=n.asDataUrl()??this.#Si)}async innerRequestContent(){if(this.request)return await this.request.requestContentData();const e=await this.#rr.target().pageAgent().invoke_getResourceContent({frameId:this.frameId,url:this.url}),n=e.getError();return n?{error:n}:new t.ContentData.ContentData(e.content,e.base64Encoded,this.mimeType)}frame(){return this.#Ci?this.#rr.frameForId(this.#Ci):null}statusCode(){return this.#wi?this.#wi.statusCode:0}}var Ys,Zs=Object.freeze({__proto__:null,Resource:Js});class ei extends h{#Di="";#Ni="";#Fi=new Set;constructor(e){super(e)}updateSecurityOrigins(e){const t=this.#Fi;this.#Fi=e;for(const e of t)this.#Fi.has(e)||this.dispatchEventToListeners(Ys.SecurityOriginRemoved,e);for(const e of this.#Fi)t.has(e)||this.dispatchEventToListeners(Ys.SecurityOriginAdded,e)}securityOrigins(){return[...this.#Fi]}mainSecurityOrigin(){return this.#Di}unreachableMainSecurityOrigin(){return this.#Ni}setMainSecurityOrigin(e,t){this.#Di=e,this.#Ni=t||null,this.dispatchEventToListeners(Ys.MainSecurityOriginChanged,{mainSecurityOrigin:this.#Di,unreachableMainSecurityOrigin:this.#Ni})}}!function(e){e.SecurityOriginAdded="SecurityOriginAdded",e.SecurityOriginRemoved="SecurityOriginRemoved",e.MainSecurityOriginChanged="MainSecurityOriginChanged"}(Ys||(Ys={})),h.register(ei,{capabilities:0,autostart:!1});var ti=Object.freeze({__proto__:null,get Events(){return Ys},SecurityOriginManager:ei});class ni extends h{#Bi;#_i;constructor(e){super(e),this.#Bi="",this.#_i=new Set}updateStorageKeys(e){const t=this.#_i;this.#_i=e;for(const e of t)this.#_i.has(e)||this.dispatchEventToListeners("StorageKeyRemoved",e);for(const e of this.#_i)t.has(e)||this.dispatchEventToListeners("StorageKeyAdded",e)}storageKeys(){return[...this.#_i]}mainStorageKey(){return this.#Bi}setMainStorageKey(e){this.#Bi=e,this.dispatchEventToListeners("MainStorageKeyChanged",{mainStorageKey:this.#Bi})}}h.register(ni,{capabilities:0,autostart:!1});var ri,si=Object.freeze({__proto__:null,StorageKeyManager:ni,parseStorageKey:function(t){const n=t.split("^"),r={origin:e.ParsedURL.ParsedURL.extractOrigin(n[0]),components:new Map};for(let e=1;e{this.processCachedResources(e.getError()?null:e.frameTree),this.mainFrame&&this.processPendingEvents(this.mainFrame)}))}static frameForRequest(e){const t=Z.forRequest(e),n=t?t.target().model(ii):null;return n&&e.frameId?n.frameForId(e.frameId):null}static frames(){const e=[];for(const t of W.instance().models(ii))e.push(...t.frames());return e}static resourceForURL(e){for(const t of W.instance().models(ii)){const n=t.mainFrame,r=n?n.resourceForURL(e):null;if(r)return r}return null}static reloadAllPages(e,t){for(const n of W.instance().models(ii))n.target().parentTarget()?.type()!==U.FRAME&&n.reloadPage(e,t)}async storageKeyForFrame(e){if(!this.framesInternal.has(e))return null;const t=await this.storageAgent.invoke_getStorageKeyForFrame({frameId:e});return"Frame tree node for given frame not found"===t.getError()?null:t.storageKey}domModel(){return this.target().model(Gs)}processCachedResources(e){e&&":"!==e.frame.url&&(this.dispatchEventToListeners(ri.WillLoadCachedResources),this.addFramesRecursively(null,e),this.target().setInspectedURL(e.frame.url)),this.#qi=!0;const t=this.target().model(Jr);t&&(t.setExecutionContextComparator(this.executionContextComparator.bind(this)),t.fireExecutionContextOrderChanged()),this.dispatchEventToListeners(ri.CachedResourcesLoaded,this)}cachedResourcesLoaded(){return this.#qi}addFrame(e,t){this.framesInternal.set(e.id,e),e.isMainFrame()&&(this.mainFrame=e),this.dispatchEventToListeners(ri.FrameAdded,e),this.updateSecurityOrigins(),this.updateStorageKeys()}frameAttached(e,t,n){const r=t&&this.framesInternal.get(t)||null;if(!this.#qi&&r)return null;if(this.framesInternal.has(e))return null;const s=new oi(this,r,e,null,n||null);return t&&!r&&(s.crossTargetParentFrameId=t),s.isMainFrame()&&this.mainFrame&&this.frameDetached(this.mainFrame.id,!1),this.addFrame(s,!0),s}frameNavigated(e,t){const n=e.parentId&&this.framesInternal.get(e.parentId)||null;if(!this.#qi&&n)return;let r=this.framesInternal.get(e.id)||null;if(!r&&(r=this.frameAttached(e.id,e.parentId||null),console.assert(Boolean(r)),!r))return;this.dispatchEventToListeners(ri.FrameWillNavigate,r),r.navigate(e),t&&(r.backForwardCacheDetails.restoredFromCache="BackForwardCacheRestore"===t),r.isMainFrame()&&this.target().setInspectedURL(r.url),this.dispatchEventToListeners(ri.FrameNavigated,r),r.isPrimaryFrame()&&this.primaryPageChanged(r,"Navigation");const s=r.resources();for(let e=0;e=0,"Unbalanced call to ResourceTreeModel.resumeReload()"),!this.#ji&&this.#zi){const{ignoreCache:e,scriptToEvaluateOnLoad:t}=this.#zi;this.reloadPage(e,t)}}reloadPage(e,t){const n=this.mainFrame?.loaderId;if(!n)return;if(this.#zi||this.dispatchEventToListeners(ri.PageReloadRequested,this),this.#ji)return void(this.#zi={ignoreCache:e,scriptToEvaluateOnLoad:t});this.#zi=null;const r=this.target().model(Z);r&&r.clearRequests(),this.dispatchEventToListeners(ri.WillReloadPage),this.agent.invoke_reload({ignoreCache:e,scriptToEvaluateOnLoad:t,loaderId:n})}navigate(e){return this.agent.invoke_navigate({url:e})}async navigationHistory(){const e=await this.agent.invoke_getNavigationHistory();return e.getError()?null:{currentIndex:e.currentIndex,entries:e.entries}}navigateToHistoryEntry(e){this.agent.invoke_navigateToHistoryEntry({entryId:e.id})}setLifecycleEventsEnabled(e){return this.agent.invoke_setLifecycleEventsEnabled({enabled:e})}async fetchAppManifest(){const e=await this.agent.invoke_getAppManifest({});return e.getError()?{url:e.url,data:null,errors:[]}:{url:e.url,data:e.data||null,errors:e.errors}}async getInstallabilityErrors(){return(await this.agent.invoke_getInstallabilityErrors()).installabilityErrors||[]}async getAppId(){return await this.agent.invoke_getAppId()}executionContextComparator(e,t){function n(e){let t=e;const n=[];for(;t;)n.push(t),t=t.sameTargetParentFrame();return n.reverse()}if(e.target()!==t.target())return Zr.comparator(e,t);const r=e.frameId?n(this.frameForId(e.frameId)):[],s=t.frameId?n(this.frameForId(t.frameId)):[];let i,o;for(let e=0;;e++)if(!r[e]||!s[e]||r[e]!==s[e]){i=r[e],o=s[e];break}return!i&&o?-1:!o&&i?1:i&&o?i.id.localeCompare(o.id):Zr.comparator(e,t)}getSecurityOriginData(){const t=new Set;let n=null,r=null;for(const s of this.framesInternal.values()){const i=s.securityOrigin;if(i&&(t.add(i),s.isMainFrame()&&(n=i,s.unreachableUrl()))){r=new e.ParsedURL.ParsedURL(s.unreachableUrl()).securityOrigin()}}return{securityOrigins:t,mainSecurityOrigin:n,unreachableMainSecurityOrigin:r}}async getStorageKeyData(){const e=new Set;let t=null;for(const{isMainFrame:n,storageKey:r}of await Promise.all([...this.framesInternal.values()].map((e=>e.getStorageKey(!1).then((t=>({isMainFrame:e.isMainFrame(),storageKey:t})))))))n&&(t=r),r&&e.add(r);return{storageKeys:e,mainStorageKey:t}}updateSecurityOrigins(){const e=this.getSecurityOriginData();this.#Hi.setMainSecurityOrigin(e.mainSecurityOrigin||"",e.unreachableMainSecurityOrigin||""),this.#Hi.updateSecurityOrigins(e.securityOrigins)}async updateStorageKeys(){const e=await this.getStorageKeyData();this.#Ui.setMainStorageKey(e.mainStorageKey||""),this.#Ui.updateStorageKeys(e.storageKeys)}async getMainStorageKey(){return this.mainFrame?await this.mainFrame.getStorageKey(!1):null}getMainSecurityOrigin(){const e=this.getSecurityOriginData();return e.mainSecurityOrigin||e.unreachableMainSecurityOrigin}onBackForwardCacheNotUsed(e){this.mainFrame&&this.mainFrame.id===e.frameId&&this.mainFrame.loaderId===e.loaderId?(this.mainFrame.setBackForwardCacheDetails(e),this.dispatchEventToListeners(ri.BackForwardCacheDetailsUpdated,this.mainFrame)):this.#Vi.add(e)}processPendingEvents(e){if(e.isMainFrame())for(const t of this.#Vi)if(e.id===t.frameId&&e.loaderId===t.loaderId){e.setBackForwardCacheDetails(t),this.#Vi.delete(t);break}}}!function(e){e.FrameAdded="FrameAdded",e.FrameNavigated="FrameNavigated",e.FrameDetached="FrameDetached",e.FrameResized="FrameResized",e.FrameWillNavigate="FrameWillNavigate",e.PrimaryPageChanged="PrimaryPageChanged",e.ResourceAdded="ResourceAdded",e.WillLoadCachedResources="WillLoadCachedResources",e.CachedResourcesLoaded="CachedResourcesLoaded",e.DOMContentLoaded="DOMContentLoaded",e.LifecycleEvent="LifecycleEvent",e.Load="Load",e.PageReloadRequested="PageReloadRequested",e.WillReloadPage="WillReloadPage",e.InterstitialShown="InterstitialShown",e.InterstitialHidden="InterstitialHidden",e.BackForwardCacheDetailsUpdated="BackForwardCacheDetailsUpdated",e.JavaScriptDialogOpening="JavaScriptDialogOpening"}(ri||(ri={}));class oi{#ls;#Gi;#C;crossTargetParentFrameId=null;#xi;#h;#Si;#Ki;#Qi;#$i;#Xi;#Ji;#Yi;#Zi;#eo;#to;#no;#ro=null;#so=new Set;resourcesMap=new Map;backForwardCacheDetails={restoredFromCache:void 0,explanations:[],explanationsTree:void 0};constructor(e,t,n,s,i){this.#ls=e,this.#Gi=t,this.#C=n,this.#xi=s?.loaderId??"",this.#h=s?.name,this.#Si=s&&s.url||r.DevToolsPath.EmptyUrlString,this.#Ki=s?.domainAndRegistry||"",this.#Qi=s?.securityOrigin??null,this.#$i=s?.securityOriginDetails,this.#Ji=s&&s.unreachableUrl||r.DevToolsPath.EmptyUrlString,this.#Yi=s?.adFrameStatus,this.#Zi=s?.secureContextType??null,this.#eo=s?.crossOriginIsolatedContextType??null,this.#to=s?.gatedAPIFeatures??null,this.#no=i,this.#Gi&&this.#Gi.#so.add(this)}isSecureContext(){return null!==this.#Zi&&this.#Zi.startsWith("Secure")}getSecureContextType(){return this.#Zi}isCrossOriginIsolated(){return null!==this.#eo&&this.#eo.startsWith("Isolated")}getCrossOriginIsolatedContextType(){return this.#eo}getGatedAPIFeatures(){return this.#to}getCreationStackTraceData(){return{creationStackTrace:this.#no,creationStackTraceTarget:this.#ro||this.resourceTreeModel().target()}}navigate(e){this.#xi=e.loaderId,this.#h=e.name,this.#Si=e.url,this.#Ki=e.domainAndRegistry,this.#Qi=e.securityOrigin,this.#$i=e.securityOriginDetails,this.getStorageKey(!0),this.#Ji=e.unreachableUrl||r.DevToolsPath.EmptyUrlString,this.#Yi=e?.adFrameStatus,this.#Zi=e.secureContextType,this.#eo=e.crossOriginIsolatedContextType,this.#to=e.gatedAPIFeatures,this.backForwardCacheDetails={restoredFromCache:void 0,explanations:[],explanationsTree:void 0};const t=this.resourcesMap.get(this.#Si);this.resourcesMap.clear(),this.removeChildFrames(),t&&t.loaderId===this.#xi&&this.addResource(t)}resourceTreeModel(){return this.#ls}get id(){return this.#C}get name(){return this.#h||""}get url(){return this.#Si}domainAndRegistry(){return this.#Ki}async getAdScriptId(e){return(await this.#ls.agent.invoke_getAdScriptId({frameId:e})).adScriptId||null}get securityOrigin(){return this.#Qi}get securityOriginDetails(){return this.#$i??null}getStorageKey(e){return this.#Xi&&!e||(this.#Xi=this.#ls.storageKeyForFrame(this.#C)),this.#Xi}unreachableUrl(){return this.#Ji}get loaderId(){return this.#xi}adFrameType(){return this.#Yi?.adFrameType||"none"}adFrameStatus(){return this.#Yi}get childFrames(){return[...this.#so]}sameTargetParentFrame(){return this.#Gi}crossTargetParentFrame(){if(!this.crossTargetParentFrameId)return null;const e=this.#ls.target().parentTarget();if(e?.type()!==U.FRAME)return null;const t=e.model(ii);return t&&t.framesInternal.get(this.crossTargetParentFrameId)||null}parentFrame(){return this.sameTargetParentFrame()||this.crossTargetParentFrame()}isMainFrame(){return!this.#Gi}isOutermostFrame(){return this.#ls.target().parentTarget()?.type()!==U.FRAME&&!this.#Gi&&!this.crossTargetParentFrameId}isPrimaryFrame(){return!this.#Gi&&this.#ls.target()===W.instance().primaryPageTarget()}removeChildFrame(e,t){this.#so.delete(e),e.remove(t)}removeChildFrames(){const e=this.#so;this.#so=new Set;for(const t of e)t.remove(!1)}remove(e){this.removeChildFrames(),this.#ls.framesInternal.delete(this.id),this.#ls.dispatchEventToListeners(ri.FrameDetached,{frame:this,isSwap:e})}addResource(e){this.resourcesMap.get(e.url)!==e&&(this.resourcesMap.set(e.url,e),this.#ls.dispatchEventToListeners(ri.ResourceAdded,e))}addRequest(e){let t=this.resourcesMap.get(e.url());t&&t.request===e||(t=new Js(this.#ls,e,e.url(),e.documentURL,e.frameId,e.loaderId,e.resourceType(),e.mimeType,null,null),this.resourcesMap.set(t.url,t),this.#ls.dispatchEventToListeners(ri.ResourceAdded,t))}resources(){return Array.from(this.resourcesMap.values())}resourceForURL(e){const t=this.resourcesMap.get(e);if(t)return t;for(const t of this.#so){const n=t.resourceForURL(e);if(n)return n}return null}callForFrameResources(e){for(const t of this.resourcesMap.values())if(e(t))return!0;for(const t of this.#so)if(t.callForFrameResources(e))return!0;return!1}displayName(){if(this.isOutermostFrame())return n.i18n.lockedString("top");const t=new e.ParsedURL.ParsedURL(this.#Si).displayName;return t?this.#h?this.#h+" ("+t+")":t:n.i18n.lockedString("iframe")}async getOwnerDeferredDOMNode(){const e=this.parentFrame();return e?await e.resourceTreeModel().domModel().getOwnerNodeForFrame(this.#C):null}async getOwnerDOMNodeOrDocument(){const e=await this.getOwnerDeferredDOMNode();return e?await e.resolvePromise():this.isOutermostFrame()?await this.resourceTreeModel().domModel().requestDocument():null}async highlight(){const e=this.parentFrame(),t=this.resourceTreeModel().target().parentTarget(),n=async e=>{const t=await e.getOwnerNodeForFrame(this.#C);t&&e.overlayModel().highlightInOverlay({deferredNode:t,selectorList:""},"all",!0)};if(e)return await n(e.resourceTreeModel().domModel());if(t?.type()===U.FRAME){const e=t.model(Gs);if(e)return await n(e)}const r=await this.resourceTreeModel().domModel().requestDocument();r&&this.resourceTreeModel().domModel().overlayModel().highlightInOverlay({node:r,selectorList:""},"all",!0)}async getPermissionsPolicyState(){const e=await this.resourceTreeModel().target().pageAgent().invoke_getPermissionsPolicyState({frameId:this.#C});return e.getError()?null:e.states}async getOriginTrials(){const e=await this.resourceTreeModel().target().pageAgent().invoke_getOriginTrials({frameId:this.#C});return e.getError()?[]:e.originTrials}setCreationStackTrace(e){this.#no=e.creationStackTrace,this.#ro=e.creationStackTraceTarget}setBackForwardCacheDetails(e){this.backForwardCacheDetails.restoredFromCache=!1,this.backForwardCacheDetails.explanations=e.notRestoredExplanations,this.backForwardCacheDetails.explanationsTree=e.notRestoredExplanationsTree}getResourcesMap(){return this.resourcesMap}}class ai{#rr;constructor(e){this.#rr=e}backForwardCacheNotUsed(e){this.#rr.onBackForwardCacheNotUsed(e)}domContentEventFired({timestamp:e}){this.#rr.dispatchEventToListeners(ri.DOMContentLoaded,e)}loadEventFired({timestamp:e}){this.#rr.dispatchEventToListeners(ri.Load,{resourceTreeModel:this.#rr,loadTime:e})}lifecycleEvent({frameId:e,name:t}){this.#rr.dispatchEventToListeners(ri.LifecycleEvent,{frameId:e,name:t})}frameAttached({frameId:e,parentFrameId:t,stack:n}){this.#rr.frameAttached(e,t,n)}frameNavigated({frame:e,type:t}){this.#rr.frameNavigated(e,t)}documentOpened({frame:e}){this.#rr.documentOpened(e)}frameDetached({frameId:e,reason:t}){this.#rr.frameDetached(e,"swap"===t)}frameSubtreeWillBeDetached(e){}frameStartedLoading({}){}frameStoppedLoading({}){}frameRequestedNavigation({}){}frameScheduledNavigation({}){}frameClearedScheduledNavigation({}){}frameStartedNavigating({}){}navigatedWithinDocument({}){}frameResized(){this.#rr.dispatchEventToListeners(ri.FrameResized)}javascriptDialogOpening(e){this.#rr.dispatchEventToListeners(ri.JavaScriptDialogOpening,e),e.hasBrowserHandler||this.#rr.agent.invoke_handleJavaScriptDialog({accept:!1})}javascriptDialogClosed({}){}screencastFrame({}){}screencastVisibilityChanged({}){}interstitialShown(){this.#rr.isInterstitialShowing=!0,this.#rr.dispatchEventToListeners(ri.InterstitialShown)}interstitialHidden(){this.#rr.isInterstitialShowing=!1,this.#rr.dispatchEventToListeners(ri.InterstitialHidden)}windowOpen({}){}compilationCacheProduced({}){}fileChooserOpened({}){}downloadWillBegin({}){}downloadProgress(){}}h.register(ii,{capabilities:2,autostart:!0,early:!0});var li=Object.freeze({__proto__:null,get Events(){return ri},PageDispatcher:ai,ResourceTreeFrame:oi,ResourceTreeModel:ii});class di extends h{#io=new Map;#oo=new Map;#ao=new e.Throttler.Throttler(300);#lo=new Map;constructor(e){super(e),e.model(ii)?.addEventListener(ri.PrimaryPageChanged,this.#do,this),e.model(Z)?.addEventListener(ee.ResponseReceived,this.#co,this),e.model(Z)?.addEventListener(ee.LoadingFinished,this.#ho,this)}addBlockedCookie(e,t){const n=e.key(),r=this.#io.get(n);this.#io.set(n,e),t?this.#oo.set(e,t):this.#oo.delete(e),r&&this.#oo.delete(r)}removeBlockedCookie(e){this.#io.delete(e.key())}async#do(){this.#io.clear(),this.#oo.clear(),await this.#uo()}getCookieToBlockedReasonsMap(){return this.#oo}async#go(e){const t=this.target().networkAgent(),n=new Map(await Promise.all(e.keysArray().map((n=>t.invoke_getCookies({urls:[...e.get(n).values()]}).then((({cookies:e})=>[n,e.map(H.fromProtocolCookie)])))))),r=this.#po(n);this.#lo=n,r&&this.dispatchEventToListeners("CookieListUpdated")}async deleteCookie(e){await this.deleteCookies([e])}async clear(e,t){this.#mo()||await this.#fo();const n=e?this.#lo.get(e)||[]:[...this.#lo.values()].flat();if(n.push(...this.#io.values()),t){const e=n.filter((e=>e.matchesSecurityOrigin(t)));await this.deleteCookies(e)}else await this.deleteCookies(n)}async saveCookie(e){let t,n=e.domain();n.startsWith(".")||(n=""),e.expires()&&(t=Math.floor(Date.parse(`${e.expires()}`)/1e3));const r=o.Runtime.experiments.isEnabled("experimental-cookie-features"),s={name:e.name(),value:e.value(),url:e.url()||void 0,domain:n,path:e.path(),secure:e.secure(),httpOnly:e.httpOnly(),sameSite:e.sameSite(),expires:t,priority:e.priority(),partitionKey:e.partitionKey(),sourceScheme:r?e.sourceScheme():(i=e.sourceScheme(),"Unset"===i?i:void 0),sourcePort:r?e.sourcePort():void 0};var i;const a=await this.target().networkAgent().invoke_setCookie(s);return!(a.getError()||!a.success)&&(await this.#fo(),a.success)}async getCookiesForDomain(e,t){this.#mo()&&!t||await this.#fo();return(this.#lo.get(e)||[]).concat(Array.from(this.#io.values()))}async deleteCookies(e){const t=this.target().networkAgent();this.#io.clear(),this.#oo.clear(),await Promise.all(e.map((e=>t.invoke_deleteCookies({name:e.name(),url:void 0,domain:e.domain(),path:e.path(),partitionKey:e.partitionKey()})))),await this.#fo()}#mo(){return Boolean(this.listeners?.size)}#po(e){if(e.size!==this.#lo.size)return!0;for(const[t,n]of e){if(!this.#lo.has(t))return!0;const e=this.#lo.get(t)||[];if(n.length!==e.length)return!0;const r=e=>e.key()+" "+e.value(),s=new Set(e.map(r));for(const e of n)if(!s.has(r(e)))return!0}return!1}#fo(){return this.#ao.schedule((()=>this.#uo()))}#uo(){const t=new r.MapUtilities.Multimap;const n=this.target().model(ii);if(n){const r=n.mainFrame?.unreachableUrl();if(r){const n=e.ParsedURL.ParsedURL.fromString(r);n&&t.set(n.securityOrigin(),r)}n.forAllResources((function(n){const r=e.ParsedURL.ParsedURL.fromString(n.documentURL);return r&&t.set(r.securityOrigin(),n.url),!1}))}return this.#go(t)}#co(){this.#mo()&&this.#fo()}#ho(){this.#mo()&&this.#fo()}}h.register(di,{capabilities:16,autostart:!1});var ci=Object.freeze({__proto__:null,CookieModel:di});class hi{#bo;#yo;#vo;#Io;#wo;#So;#ko;constructor(e){e&&(this.#bo=e.toLowerCase().replace(/^\./,"")),this.#yo=[],this.#Io=0}static parseSetCookie(e,t){return new hi(t).parseSetCookie(e)}getCookieAttribute(e){if(!e)return null;switch(e.toLowerCase()){case"domain":return"domain";case"expires":return"expires";case"max-age":return"max-age";case"httponly":return"http-only";case"name":return"name";case"path":return"path";case"samesite":return"same-site";case"secure":return"secure";case"value":return"value";case"priority":return"priority";case"sourceport":return"source-port";case"sourcescheme":return"source-scheme";case"partitioned":return"partitioned";default:return console.error("Failed getting cookie attribute: "+e),null}}cookies(){return this.#yo}parseSetCookie(e){if(!this.initialize(e))return null;for(let e=this.extractKeyValue();e;e=this.extractKeyValue())this.#wo?this.#wo.addAttribute(this.getCookieAttribute(e.key),e.value):this.addCookie(e,1),this.advanceAndCheckCookieDelimiter()&&this.flushCookie();return this.flushCookie(),this.#yo}initialize(e){return this.#vo=e,"string"==typeof e&&(this.#yo=[],this.#wo=null,this.#So="",this.#Io=this.#vo.length,!0)}flushCookie(){this.#wo&&(this.#wo.setSize(this.#Io-this.#vo.length-this.#ko),this.#wo.setCookieLine(this.#So.replace("\n",""))),this.#wo=null,this.#So=""}extractKeyValue(){if(!this.#vo||!this.#vo.length)return null;const e=/^[ \t]*([^=;\n]+)[ \t]*(?:=[ \t]*([^;\n]*))?/.exec(this.#vo);if(!e)return console.error("Failed parsing cookie header before: "+this.#vo),null;const t=new ui(e[1]?.trim(),e[2]?.trim(),this.#Io-this.#vo.length);return this.#So+=e[0],this.#vo=this.#vo.slice(e[0].length),t}advanceAndCheckCookieDelimiter(){if(!this.#vo)return!1;const e=/^\s*[\n;]\s*/.exec(this.#vo);return!!e&&(this.#So+=e[0],this.#vo=this.#vo.slice(e[0].length),null!==e[0].match("\n"))}addCookie(e,t){this.#wo&&this.#wo.setSize(e.position-this.#ko),this.#wo="string"==typeof e.value?new H(e.key,e.value,t):new H("",e.key,t),this.#bo&&this.#wo.addAttribute("domain",this.#bo),this.#ko=e.position,this.#yo.push(this.#wo)}}class ui{key;value;position;constructor(e,t,n){this.key=e,this.value=t,this.position=n}}var gi=Object.freeze({__proto__:null,CookieParser:hi});class pi{#Co;#xo;#Ro=!1;#To="";#Mo="";#Po="";#Eo="";constructor(e,t){this.#Co=e,this.#xo=new mi(this.#Lo.bind(this),t)}async addBase64Chunk(e){await this.#xo.addBase64Chunk(e)}#Lo(e){let t=0;for(let n=0;n0){const e=this.#Po.slice(0,-1);this.#Co(this.#Eo||"message",e,this.#Mo),this.#Po=""}return void(this.#Eo="")}let e,t=this.#To.indexOf(":");t<0?(t=this.#To.length,e=t):(e=t+1,ee.codePointAt(0)));await this.#Oo.ready,await this.#Oo.write(n)}}var fi=Object.freeze({__proto__:null,ServerSentEventsParser:pi});class bi{#Do;#No;#Fo=0;#Bo=[];constructor(e,n){this.#Do=e,n&&(this.#Fo=e.pseudoWallTime(e.startTime),this.#No=new pi(this.#_o.bind(this),e.charset()??void 0),this.#Do.requestStreamingContent().then((n=>{t.StreamingContentData.isError(n)||(this.#No?.addBase64Chunk(n.content().base64),n.addEventListener("ChunkAdded",(({data:{chunk:t}})=>{this.#Fo=e.pseudoWallTime(e.endTime),this.#No?.addBase64Chunk(t)})))})))}get eventSourceMessages(){return this.#Bo}onProtocolEventSourceMessageReceived(e,t,n,r){this.#Ho({eventName:e,eventId:n,data:t,time:r})}#_o(e,t,n){this.#Ho({eventName:e,eventId:n,data:t,time:this.#Fo})}#Ho(e){this.#Bo.push(e),this.#Do.dispatchEventToListeners(Ti.EVENT_SOURCE_MESSAGE_ADDED,e)}}const yi={deprecatedSyntaxFoundPleaseUse:"Deprecated syntax found. Please use: ;dur=;desc=",duplicateParameterSIgnored:'Duplicate parameter "{PH1}" ignored.',noValueFoundForParameterS:'No value found for parameter "{PH1}".',unrecognizedParameterS:'Unrecognized parameter "{PH1}".',extraneousTrailingCharacters:"Extraneous trailing characters.",unableToParseSValueS:'Unable to parse "{PH1}" value "{PH2}".'},vi=n.i18n.registerUIStrings("core/sdk/ServerTiming.ts",yi),Ii=n.i18n.getLocalizedString.bind(void 0,vi);class wi{metric;value;description;constructor(e,t,n){this.metric=e,this.value=t,this.description=n}static parseHeaders(e){const t=e.filter((e=>"server-timing"===e.name.toLowerCase()));if(!t.length)return null;const n=t.reduce(((e,t)=>{const n=this.createFromHeaderValue(t.value);return e.push(...n.map((function(e){return new wi(e.name,e.hasOwnProperty("dur")?e.dur:null,e.hasOwnProperty("desc")?e.desc:"")}))),e}),[]);return n.sort(((e,t)=>r.StringUtilities.compare(e.metric.toLowerCase(),t.metric.toLowerCase()))),n}static createFromHeaderValue(e){function t(){e=e.replace(/^\s*/,"")}function n(n){return console.assert(1===n.length),t(),e.charAt(0)===n&&(e=e.substring(1),!0)}function r(){const t=/^(?:\s*)([\w!#$%&'*+\-.^`|~]+)(?:\s*)(.*)/.exec(e);return t?(e=t[2],t[1]):null}function s(){return t(),'"'===e.charAt(0)?function(){console.assert('"'===e.charAt(0)),e=e.substring(1);let t="";for(;e.length;){const n=/^([^"\\]*)(.*)/.exec(e);if(!n)return null;if(t+=n[1],'"'===n[2].charAt(0))return e=n[2].substring(1),t;console.assert("\\"===n[2].charAt(0)),t+=n[2].charAt(1),e=n[2].substring(2)}return null}():r()}function i(){const t=/([,;].*)/.exec(e);t&&(e=t[1])}const o=[];let a;for(;null!==(a=r());){const t={name:a};for("="===e.charAt(0)&&this.showWarning(Ii(yi.deprecatedSyntaxFoundPleaseUse));n(";");){let e;if(null===(e=r()))continue;e=e.toLowerCase();const o=this.getParserForParameter(e);let a=null;if(n("=")&&(a=s(),i()),o){if(t.hasOwnProperty(e)){this.showWarning(Ii(yi.duplicateParameterSIgnored,{PH1:e}));continue}null===a&&this.showWarning(Ii(yi.noValueFoundForParameterS,{PH1:e})),o.call(this,t,a)}else this.showWarning(Ii(yi.unrecognizedParameterS,{PH1:e}))}if(o.push(t),!n(","))break}return e.length&&this.showWarning(Ii(yi.extraneousTrailingCharacters)),o}static getParserForParameter(e){switch(e){case"dur":{function t(t,n){if(t.dur=0,null!==n){const r=parseFloat(n);if(isNaN(r))return void wi.showWarning(Ii(yi.unableToParseSValueS,{PH1:e,PH2:n}));t.dur=r}}return t}case"desc":{function n(e,t){e.desc=t||""}return n}default:return null}}static showWarning(t){e.Console.Console.instance().warn(`ServerTiming: ${t}`)}}var Si=Object.freeze({__proto__:null,ServerTiming:wi});const ki={binary:"(binary)",secureOnly:'This cookie was blocked because it had the "`Secure`" attribute and the connection was not secure.',notOnPath:"This cookie was blocked because its path was not an exact match for or a superdirectory of the request url's path.",domainMismatch:"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.",sameSiteStrict:'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.',sameSiteLax:'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.',sameSiteUnspecifiedTreatedAsLax:'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.',sameSiteNoneInsecure:'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.',userPreferences:"This cookie was blocked due to user preferences.",thirdPartyPhaseout:"This cookie was blocked either because of Chrome flags or browser configuration. Learn more in the Issues panel.",unknownError:"An unknown error was encountered when trying to send this cookie.",schemefulSameSiteStrict:'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.',schemefulSameSiteLax:'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.',schemefulSameSiteUnspecifiedTreatedAsLax:'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.',samePartyFromCrossPartyContext:"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.",nameValuePairExceedsMaxSize:"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.",thisSetcookieWasBlockedDueToUser:"This attempt to set a cookie via a `Set-Cookie` header was blocked due to user preferences.",thisSetcookieWasBlockedDueThirdPartyPhaseout:"Setting this cookie was blocked either because of Chrome flags or browser configuration. Learn more in the Issues panel.",thisSetcookieHadInvalidSyntax:"This `Set-Cookie` header had invalid syntax.",thisSetcookieHadADisallowedCharacter:"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).",theSchemeOfThisConnectionIsNot:"The scheme of this connection is not allowed to store cookies.",anUnknownErrorWasEncounteredWhenTrying:"An unknown error was encountered when trying to store this cookie.",thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax:'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.',thisSetcookieDidntSpecifyASamesite:'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.',thisSetcookieWasBlockedBecauseItHadTheSameparty:"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.",thisSetcookieWasBlockedBecauseItHadTheSamepartyAttribute:'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`".',blockedReasonSecureOnly:'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.',blockedReasonSameSiteStrictLax:'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.',blockedReasonSameSiteUnspecifiedTreatedAsLax:'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.',blockedReasonSameSiteNoneInsecure:'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`".',blockedReasonOverwriteSecure:"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.",blockedReasonInvalidDomain:"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.",blockedReasonInvalidPrefix:'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`.',thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize:"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.",setcookieHeaderIsIgnoredIn:"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.",exemptionReasonUserSetting:"This cookie is allowed by user preference.",exemptionReasonTPCDMetadata:"This cookie is allowed by a third-party cookie deprecation trial grace period. Learn more: goo.gle/dt-grace.",exemptionReasonTPCDDeprecationTrial:"This cookie is allowed by third-party cookie deprecation trial. Learn more: goo.gle/ps-dt.",exemptionReasonTopLevelTPCDDeprecationTrial:"This cookie is allowed by top-level third-party cookie deprecation trial. Learn more: goo.gle/ps-dt.",exemptionReasonTPCDHeuristics:"This cookie is allowed by third-party cookie heuristics. Learn more: goo.gle/hbe",exemptionReasonEnterprisePolicy:"This cookie is allowed by Chrome Enterprise policy. Learn more: goo.gle/ce-3pc",exemptionReasonStorageAccessAPI:"This cookie is allowed by the Storage Access API. Learn more: goo.gle/saa",exemptionReasonTopLevelStorageAccessAPI:"This cookie is allowed by the top-level Storage Access API. Learn more: goo.gle/saa-top",exemptionReasonScheme:"This cookie is allowed by the top-level url scheme"},Ci=n.i18n.registerUIStrings("core/sdk/NetworkRequest.ts",ki),xi=n.i18n.getLocalizedString.bind(void 0,Ci);class Ri extends e.ObjectWrapper.ObjectWrapper{#Uo;#qo;#ki;#Ci;#xi;#zo;#jo;#Vo;#Wo;#Go;#Ko;#Qo;#$o;#Xo;#Jo;#Yo;#Zo;statusCode;statusText;requestMethod;requestTime;protocol;alternateProtocolUsage;mixedContentType;#ea;#ta;#na;#ra;#sa;#ia;#oa;#aa;#la;#da;#ca;#ha;#ua;#ga;#pa;#ma;#fa;#ba;#ya;#va;#Ia;connectionId;connectionReused;hasNetworkData;#wa;#Sa;#ka;#Ca;#xa;#Ra;#Ta;#Ma;#Pa;#Ea;#La;localizedFailDescription;#Si;#Aa;#Oa;#ge;#Da;#Na;#Fa;#Ti;#Ba;#Li;#h;#_a;#Ha;#Ua;#qa;#za;#ja;#Va;#Wa;#Ga;#Ka;#Qa;#$a;#Xa;#Ja;#Ya;#Za;#el;#tl;#nl;#rl;#sl;#il;#ol;#al;#ll;#dl;#cl;#hl=new Map;#ul;#gl;#pl;responseReceivedPromise;responseReceivedPromiseResolve;directSocketInfo;constructor(t,n,r,s,i,o,a,l){super(),this.#Uo=t,this.#qo=n,this.setUrl(r),this.#ki=s,this.#Ci=i,this.#xi=o,this.#jo=a,this.#zo=l,this.#Vo=null,this.#Wo=null,this.#Go=null,this.#Ko=!1,this.#Qo=null,this.#$o=-1,this.#Xo=-1,this.#Jo=-1,this.#Yo=void 0,this.#Zo=void 0,this.statusCode=0,this.statusText="",this.requestMethod="",this.requestTime=0,this.protocol="",this.alternateProtocolUsage=void 0,this.mixedContentType="none",this.#ea=null,this.#ta=null,this.#na=null,this.#ra=null,this.#sa=null,this.#ia=e.ResourceType.resourceTypes.Other,this.#oa=null,this.#aa=null,this.#la=[],this.#da={},this.#ca="",this.#ha=[],this.#ga=[],this.#pa=[],this.#ma={},this.#fa="",this.#ba="Unknown",this.#ya=null,this.#va="unknown",this.#Ia=null,this.connectionId="0",this.connectionReused=!1,this.hasNetworkData=!1,this.#wa=null,this.#Sa=Promise.resolve(null),this.#ka=!1,this.#Ca=!1,this.#xa=[],this.#Ra=[],this.#Ta=[],this.#Ma=[],this.#La=!1,this.#Pa=null,this.#Ea=null,this.localizedFailDescription=null,this.#dl=null,this.#cl=!1,this.#ul=!1,this.#gl=!1}static create(e,t,n,r,s,i,o){return new Ri(e,e,t,n,r,s,i,o)}static createForWebSocket(e,t,n){return new Ri(e,e,t,r.DevToolsPath.EmptyUrlString,null,null,n||null)}static createWithoutBackendRequest(e,t,n,r){return new Ri(e,void 0,t,n,null,null,r)}identityCompare(e){const t=this.requestId(),n=e.requestId();return t>n?1:te&&(this.#Aa=e)),this.dispatchEventToListeners(Ti.TIMING_CHANGED,this)}get duration(){return-1===this.#Jo||-1===this.#Xo?-1:this.#Jo-this.#Xo}get latency(){return-1===this.#Aa||-1===this.#Xo?-1:this.#Aa-this.#Xo}get resourceSize(){return this.#Ga||0}set resourceSize(e){this.#Ga=e}get transferSize(){return this.#Oa||0}increaseTransferSize(e){this.#Oa=(this.#Oa||0)+e}setTransferSize(e){this.#Oa=e}get finished(){return this.#ge}set finished(e){this.#ge!==e&&(this.#ge=e,e&&this.dispatchEventToListeners(Ti.FINISHED_LOADING,this))}get failed(){return this.#Da}set failed(e){this.#Da=e}get canceled(){return this.#Na}set canceled(e){this.#Na=e}get preserved(){return this.#Fa}set preserved(e){this.#Fa=e}blockedReason(){return this.#Yo}setBlockedReason(e){this.#Yo=e}corsErrorStatus(){return this.#Zo}setCorsErrorStatus(e){this.#Zo=e}wasBlocked(){return Boolean(this.#Yo)}cached(){return(Boolean(this.#Ka)||Boolean(this.#Qa))&&!this.#Oa}cachedInMemory(){return Boolean(this.#Ka)&&!this.#Oa}fromPrefetchCache(){return Boolean(this.#$a)}setFromMemoryCache(){this.#Ka=!0,this.#Za=void 0}get fromDiskCache(){return this.#Qa}setFromDiskCache(){this.#Qa=!0}setFromPrefetchCache(){this.#$a=!0}fromEarlyHints(){return Boolean(this.#Xa)}setFromEarlyHints(){this.#Xa=!0}get fetchedViaServiceWorker(){return Boolean(this.#Ja)}set fetchedViaServiceWorker(e){this.#Ja=e}get serviceWorkerRouterInfo(){return this.#Ya}set serviceWorkerRouterInfo(e){this.#Ya=e}initiatedByServiceWorker(){const e=Z.forRequest(this);return!!e&&e.target().type()===U.ServiceWorker}get timing(){return this.#Za}set timing(e){if(!e||this.#Ka)return;this.#Xo=e.requestTime;const t=e.requestTime+e.receiveHeadersEnd/1e3;((this.#Aa||-1)<0||this.#Aa>t)&&(this.#Aa=t),this.#Xo>this.#Aa&&(this.#Aa=this.#Xo),this.#Za=e,this.dispatchEventToListeners(Ti.TIMING_CHANGED,this)}setConnectTimingFromExtraInfo(e){this.#Xo=e.requestTime,this.dispatchEventToListeners(Ti.TIMING_CHANGED,this)}get mimeType(){return this.#Ti}set mimeType(t){if(this.#Ti=t,"text/event-stream"===t&&!this.#pl){const t=this.resourceType()!==e.ResourceType.resourceTypes.EventSource;this.#pl=new bi(this,t)}}get displayName(){return this.#Li.displayName}name(){return this.#h||this.parseNameAndPathFromURL(),this.#h}path(){return this.#_a||this.parseNameAndPathFromURL(),this.#_a}parseNameAndPathFromURL(){if(this.#Li.isDataURL())this.#h=this.#Li.dataURLDisplayName(),this.#_a="";else if(this.#Li.isBlobURL())this.#h=this.#Li.url,this.#_a="";else if(this.#Li.isAboutBlank())this.#h=this.#Li.url,this.#_a="";else{this.#_a=this.#Li.host+this.#Li.folderPathComponents;const t=Z.forRequest(this),n=t?e.ParsedURL.ParsedURL.fromString(t.target().inspectedURL()):null;this.#_a=r.StringUtilities.trimURL(this.#_a,n?n.host:""),this.#Li.lastPathComponent||this.#Li.queryParams?this.#h=this.#Li.lastPathComponent+(this.#Li.queryParams?"?"+this.#Li.queryParams:""):this.#Li.folderPathComponents?(this.#h=this.#Li.folderPathComponents.substring(this.#Li.folderPathComponents.lastIndexOf("/")+1)+"/",this.#_a=this.#_a.substring(0,this.#_a.lastIndexOf("/"))):(this.#h=this.#Li.host,this.#_a="")}}get folder(){let e=this.#Li.path;const t=e.indexOf("?");-1!==t&&(e=e.substring(0,t));const n=e.lastIndexOf("/");return-1!==n?e.substring(0,n):""}get pathname(){return this.#Li.path}resourceType(){return this.#ia}setResourceType(e){this.#ia=e}get domain(){return this.#Li.host}get scheme(){return this.#Li.scheme}getInferredStatusText(){return this.statusText||(e=this.statusCode,n.i18n.lockedString({100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Content Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"}[e]??""));var e}redirectSource(){return this.#Vo}setRedirectSource(e){this.#Vo=e}preflightRequest(){return this.#Wo}setPreflightRequest(e){this.#Wo=e}preflightInitiatorRequest(){return this.#Go}setPreflightInitiatorRequest(e){this.#Go=e}isPreflightRequest(){return null!==this.#jo&&void 0!==this.#jo&&"preflight"===this.#jo.type}redirectDestination(){return this.#Qo}setRedirectDestination(e){this.#Qo=e}requestHeaders(){return this.#pa}setRequestHeaders(e){this.#pa=e,this.dispatchEventToListeners(Ti.REQUEST_HEADERS_CHANGED)}requestHeadersText(){return this.#el}setRequestHeadersText(e){this.#el=e,this.dispatchEventToListeners(Ti.REQUEST_HEADERS_CHANGED)}requestHeaderValue(e){return this.#ma[e]||(this.#ma[e]=this.computeHeaderValue(this.requestHeaders(),e)),this.#ma[e]}requestFormData(){return this.#Sa||(this.#Sa=Z.requestPostData(this)),this.#Sa}setRequestFormData(e,t){this.#Sa=e&&null===t?null:Promise.resolve(t),this.#wa=null}filteredProtocolName(){const e=this.protocol.toLowerCase();return"h2"===e?"http/2.0":e.replace(/^http\/2(\.0)?\+/,"http/2.0+")}requestHttpVersion(){const e=this.requestHeadersText();if(!e){const e=this.requestHeaderValue("version")||this.requestHeaderValue(":version");return e||this.filteredProtocolName()}const t=e.split(/\r\n/)[0].match(/(HTTP\/\d+\.\d+)$/);return t?t[1]:"HTTP/0.9"}get responseHeaders(){return this.#tl||[]}set responseHeaders(e){this.#tl=e,this.#rl=void 0,this.#il=void 0,this.#sl=void 0,this.#da={},this.dispatchEventToListeners(Ti.RESPONSE_HEADERS_CHANGED)}get earlyHintsHeaders(){return this.#nl||[]}set earlyHintsHeaders(e){this.#nl=e}get originalResponseHeaders(){return this.#ha}set originalResponseHeaders(e){this.#ha=e,this.#ua=void 0}get setCookieHeaders(){return this.#ga}set setCookieHeaders(e){this.#ga=e}get responseHeadersText(){return this.#ca}set responseHeadersText(e){this.#ca=e,this.dispatchEventToListeners(Ti.RESPONSE_HEADERS_CHANGED)}get sortedResponseHeaders(){return void 0!==this.#rl?this.#rl:(this.#rl=this.responseHeaders.slice(),this.#rl.sort((function(e,t){return r.StringUtilities.compare(e.name.toLowerCase(),t.name.toLowerCase())})))}get sortedOriginalResponseHeaders(){return void 0!==this.#ua?this.#ua:(this.#ua=this.originalResponseHeaders.slice(),this.#ua.sort((function(e,t){return r.StringUtilities.compare(e.name.toLowerCase(),t.name.toLowerCase())})))}get overrideTypes(){const e=[];return this.hasOverriddenContent&&e.push("content"),this.hasOverriddenHeaders()&&e.push("headers"),e}get hasOverriddenContent(){return this.#ul}set hasOverriddenContent(e){this.#ul=e}#ml(e){const t=[];for(const n of e)t.length&&t[t.length-1].name===n.name?t[t.length-1].value+=`, ${n.value}`:t.push({name:n.name,value:n.value});return t}hasOverriddenHeaders(){if(!this.#ha.length)return!1;const e=this.#ml(this.sortedResponseHeaders),t=this.#ml(this.sortedOriginalResponseHeaders);if(e.length!==t.length)return!0;for(let n=0;ne.cookie)),...this.responseCookies,...this.blockedRequestCookies().map((e=>e.cookie)),...this.blockedResponseCookies().map((e=>e.cookie))].filter((e=>!!e))}get serverTimings(){return void 0===this.#il&&(this.#il=wi.parseHeaders(this.responseHeaders)),this.#il}queryString(){if(void 0!==this.#ol)return this.#ol;let e=null;const t=this.url(),n=t.indexOf("?");if(-1!==n){e=t.substring(n+1);const r=e.indexOf("#");-1!==r&&(e=e.substring(0,r))}return this.#ol=e,this.#ol}get queryParameters(){if(this.#al)return this.#al;const e=this.queryString();return e?(this.#al=this.parseParameters(e),this.#al):null}async parseFormParameters(){const e=this.requestContentType();if(!e)return null;if(e.match(/^application\/x-www-form-urlencoded\s*(;.*)?$/i)){const e=await this.requestFormData();return e?this.parseParameters(e):null}const t=e.match(/^multipart\/form-data\s*;\s*boundary\s*=\s*(\S+)\s*$/);if(!t)return null;const n=t[1];if(!n)return null;const r=await this.requestFormData();return r?this.parseMultipartFormDataParameters(r,n):null}formParameters(){return this.#wa||(this.#wa=this.parseFormParameters()),this.#wa}responseHttpVersion(){const e=this.#ca;if(!e){const e=this.responseHeaderValue("version")||this.responseHeaderValue(":version");return e||this.filteredProtocolName()}const t=e.split(/\r\n/)[0].match(/^(HTTP\/\d+\.\d+)/);return t?t[1]:"HTTP/0.9"}parseParameters(e){return e.split("&").map((function(e){const t=e.indexOf("=");return-1===t?{name:e,value:""}:{name:e.substring(0,t),value:e.substring(t+1)}}))}parseMultipartFormDataParameters(e,t){const n=r.StringUtilities.escapeForRegExp(t),s=new RegExp('^\\r\\ncontent-disposition\\s*:\\s*form-data\\s*;\\s*name="([^"]*)"(?:\\s*;\\s*filename="([^"]*)")?(?:\\r\\ncontent-type\\s*:\\s*([^\\r\\n]*))?\\r\\n\\r\\n(.*)\\r\\n$',"is");return e.split(new RegExp(`--${n}(?:--s*$)?`,"g")).reduce((function(e,t){const[n,r,i,o,a]=t.match(s)||[];if(!n)return e;const l=i||o?xi(ki.binary):a;return e.push({name:r,value:l}),e}),[])}computeHeaderValue(e,t){t=t.toLowerCase();const n=[];for(let r=0;rt.ContentData.ContentData.isError(e)?e:t.StreamingContentData.StreamingContentData.from(e))),this.#aa}contentURL(){return this.#Si}contentType(){return this.#ia}async requestContent(){return t.ContentData.ContentData.asDeferredContent(await this.requestContentData())}async searchInContent(e,n,r){if(!this.#ll)return await Z.searchInRequest(this,e,n,r);const s=await this.requestContentData();return t.ContentData.ContentData.isError(s)||!s.isTextContent?[]:t.TextUtils.performSearchInContentData(s,e,n,r)}requestContentType(){return this.requestHeaderValue("Content-Type")}hasErrorStatusCode(){return this.statusCode>=400}setInitialPriority(e){this.#ea=e}initialPriority(){return this.#ea}setPriority(e){this.#ta=e}priority(){return this.#ta||this.#ea||null}setSignedExchangeInfo(e){this.#na=e}signedExchangeInfo(){return this.#na}setWebBundleInfo(e){this.#ra=e}webBundleInfo(){return this.#ra}setWebBundleInnerRequestInfo(e){this.#sa=e}webBundleInnerRequestInfo(){return this.#sa}async populateImageSource(e){const n=await this.requestContentData();if(t.ContentData.ContentData.isError(n))return;let r=n.asDataUrl();if(null===r&&!this.#Da){(this.responseHeaderValue("cache-control")||"").includes("no-cache")||(r=this.#Si)}null!==r&&(e.src=r)}initiator(){return this.#jo||null}hasUserGesture(){return this.#zo??null}frames(){return this.#la}addProtocolFrameError(e,t){this.addFrame({type:Mi.Error,text:e,time:this.pseudoWallTime(t),opCode:-1,mask:!1})}addProtocolFrame(e,t,n){const r=n?Mi.Send:Mi.Receive;this.addFrame({type:r,text:e.payloadData,time:this.pseudoWallTime(t),opCode:e.opcode,mask:e.mask})}addFrame(e){this.#la.push(e),this.dispatchEventToListeners(Ti.WEBSOCKET_FRAME_ADDED,e)}eventSourceMessages(){return this.#pl?.eventSourceMessages??[]}addEventSourceMessage(e,t,n,r){this.#pl?.onProtocolEventSourceMessageReceived(t,r,n,this.pseudoWallTime(e))}markAsRedirect(e){this.#Ko=!0,this.#Uo=`${this.#qo}:redirected.${e}`}isRedirect(){return this.#Ko}setRequestIdForTest(e){this.#qo=e,this.#Uo=e}charset(){return this.#Ba??null}setCharset(e){this.#Ba=e}addExtraRequestInfo(e){this.#xa=e.blockedRequestCookies,this.#Ra=e.includedRequestCookies,this.setRequestHeaders(e.requestHeaders),this.#ka=!0,this.setRequestHeadersText(""),this.#Ha=e.clientSecurityState,this.setConnectTimingFromExtraInfo(e.connectTiming),this.#La=e.siteHasCookieInOtherPartition??!1,this.#gl=this.#xa.some((e=>e.blockedReasons.includes("ThirdPartyPhaseout")))}hasExtraRequestInfo(){return this.#ka}blockedRequestCookies(){return this.#xa}includedRequestCookies(){return this.#Ra}hasRequestCookies(){return this.#Ra.length>0||this.#xa.length>0}siteHasCookieInOtherPartition(){return this.#La}static parseStatusTextFromResponseHeadersText(e){return e.split("\r")[0].split(" ").slice(2).join(" ")}addExtraResponseInfo(e){if(this.#Ta=e.blockedResponseCookies,e.exemptedResponseCookies&&(this.#Ma=e.exemptedResponseCookies),this.#Pa=e.cookiePartitionKey?e.cookiePartitionKey:null,this.#Ea=e.cookiePartitionKeyOpaque||null,this.responseHeaders=e.responseHeaders,this.originalResponseHeaders=e.responseHeaders.map((e=>({...e}))),e.responseHeadersText){if(this.responseHeadersText=e.responseHeadersText,!this.requestHeadersText()){let e=`${this.requestMethod} ${this.parsedURL.path}`;this.parsedURL.queryParams&&(e+=`?${this.parsedURL.queryParams}`),e+=" HTTP/1.1\r\n";for(const{name:t,value:n}of this.requestHeaders())e+=`${t}: ${n}\r\n`;this.setRequestHeadersText(e)}this.statusText=Ri.parseStatusTextFromResponseHeadersText(e.responseHeadersText)}this.#ba=e.resourceIPAddressSpace,e.statusCode&&(this.statusCode=e.statusCode),this.#Ca=!0;const t=Z.forRequest(this);if(!t)return;for(const e of this.#Ta)if(e.blockedReasons.includes("NameValuePairExceedsMaxSize")){const e=xi(ki.setcookieHeaderIsIgnoredIn,{PH1:this.url()});t.dispatchEventToListeners(ee.MessageGenerated,{message:e,requestId:this.#Uo,warning:!0})}const n=t.target().model(di);if(n){for(const e of this.#Ma)n.removeBlockedCookie(e.cookie);for(const e of this.#Ta){const t=e.cookie;t&&(e.blockedReasons.includes("ThirdPartyPhaseout")&&(this.#gl=!0),n.addBlockedCookie(t,e.blockedReasons.map((e=>({attribute:Ei(e),uiString:Pi(e)})))))}}}hasExtraResponseInfo(){return this.#Ca}blockedResponseCookies(){return this.#Ta}exemptedResponseCookies(){return this.#Ma}nonBlockedResponseCookies(){const e=this.blockedResponseCookies().map((e=>e.cookieLine));return this.responseCookies.filter((t=>{const n=e.indexOf(t.getCookieLine());return-1===n||(e[n]=null,!1)}))}responseCookiesPartitionKey(){return this.#Pa}responseCookiesPartitionKeyOpaque(){return this.#Ea}redirectSourceSignedExchangeInfoHasNoErrors(){return null!==this.#Vo&&null!==this.#Vo.#na&&!this.#Vo.#na.errors}clientSecurityState(){return this.#Ha}setTrustTokenParams(e){this.#Ua=e}trustTokenParams(){return this.#Ua}setTrustTokenOperationDoneEvent(e){this.#qa=e,this.dispatchEventToListeners(Ti.TRUST_TOKEN_RESULT_ADDED)}trustTokenOperationDoneEvent(){return this.#qa}setIsSameSite(e){this.#dl=e}isSameSite(){return this.#dl}getAssociatedData(e){return this.#hl.get(e)||null}setAssociatedData(e,t){this.#hl.set(e,t)}deleteAssociatedData(e){this.#hl.delete(e)}hasThirdPartyCookiePhaseoutIssue(){return this.#gl}addDataReceivedEvent({timestamp:e,dataLength:n,encodedDataLength:r,data:s}){this.resourceSize+=n,-1!==r&&this.increaseTransferSize(r),this.endTime=e,s&&this.#aa?.then((e=>{t.StreamingContentData.isError(e)||e.addChunk(s)}))}waitForResponseReceived(){if(this.responseReceivedPromise)return this.responseReceivedPromise;const{promise:e,resolve:t}=Promise.withResolvers();return this.responseReceivedPromise=e,this.responseReceivedPromiseResolve=t,this.responseReceivedPromise}}var Ti,Mi;!function(e){e.FINISHED_LOADING="FinishedLoading",e.TIMING_CHANGED="TimingChanged",e.REMOTE_ADDRESS_CHANGED="RemoteAddressChanged",e.REQUEST_HEADERS_CHANGED="RequestHeadersChanged",e.RESPONSE_HEADERS_CHANGED="ResponseHeadersChanged",e.WEBSOCKET_FRAME_ADDED="WebsocketFrameAdded",e.EVENT_SOURCE_MESSAGE_ADDED="EventSourceMessageAdded",e.TRUST_TOKEN_RESULT_ADDED="TrustTokenResultAdded"}(Ti||(Ti={})),function(e){e.Send="send",e.Receive="receive",e.Error="error"}(Mi||(Mi={}));const Pi=function(e){switch(e){case"SecureOnly":return xi(ki.blockedReasonSecureOnly);case"SameSiteStrict":return xi(ki.blockedReasonSameSiteStrictLax,{PH1:"SameSite=Strict"});case"SameSiteLax":return xi(ki.blockedReasonSameSiteStrictLax,{PH1:"SameSite=Lax"});case"SameSiteUnspecifiedTreatedAsLax":return xi(ki.blockedReasonSameSiteUnspecifiedTreatedAsLax);case"SameSiteNoneInsecure":return xi(ki.blockedReasonSameSiteNoneInsecure);case"UserPreferences":return xi(ki.thisSetcookieWasBlockedDueToUser);case"SyntaxError":return xi(ki.thisSetcookieHadInvalidSyntax);case"SchemeNotSupported":return xi(ki.theSchemeOfThisConnectionIsNot);case"OverwriteSecure":return xi(ki.blockedReasonOverwriteSecure);case"InvalidDomain":return xi(ki.blockedReasonInvalidDomain);case"InvalidPrefix":return xi(ki.blockedReasonInvalidPrefix);case"UnknownError":return xi(ki.anUnknownErrorWasEncounteredWhenTrying);case"SchemefulSameSiteStrict":return xi(ki.thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax,{PH1:"SameSite=Strict"});case"SchemefulSameSiteLax":return xi(ki.thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax,{PH1:"SameSite=Lax"});case"SchemefulSameSiteUnspecifiedTreatedAsLax":return xi(ki.thisSetcookieDidntSpecifyASamesite);case"SamePartyFromCrossPartyContext":return xi(ki.thisSetcookieWasBlockedBecauseItHadTheSameparty);case"SamePartyConflictsWithOtherAttributes":return xi(ki.thisSetcookieWasBlockedBecauseItHadTheSamepartyAttribute);case"NameValuePairExceedsMaxSize":return xi(ki.thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize);case"DisallowedCharacter":return xi(ki.thisSetcookieHadADisallowedCharacter);case"ThirdPartyPhaseout":return xi(ki.thisSetcookieWasBlockedDueThirdPartyPhaseout)}return""},Ei=function(e){switch(e){case"SecureOnly":case"OverwriteSecure":return"secure";case"SameSiteStrict":case"SameSiteLax":case"SameSiteUnspecifiedTreatedAsLax":case"SameSiteNoneInsecure":case"SchemefulSameSiteStrict":case"SchemefulSameSiteLax":case"SchemefulSameSiteUnspecifiedTreatedAsLax":return"same-site";case"InvalidDomain":return"domain";case"InvalidPrefix":return"name";case"SamePartyConflictsWithOtherAttributes":case"SamePartyFromCrossPartyContext":case"NameValuePairExceedsMaxSize":case"UserPreferences":case"ThirdPartyPhaseout":case"SyntaxError":case"SchemeNotSupported":case"UnknownError":case"DisallowedCharacter":return null}return null};var Li,Ai;!function(e){e[e.TCP=1]="TCP",e[e.UDP_BOUND=2]="UDP_BOUND",e[e.UDP_CONNECTED=3]="UDP_CONNECTED"}(Li||(Li={})),function(e){e[e.OPENING=1]="OPENING",e[e.OPEN=2]="OPEN",e[e.CLOSED=3]="CLOSED",e[e.ABORTED=4]="ABORTED"}(Ai||(Ai={}));var Oi=Object.freeze({__proto__:null,get DirectSocketStatus(){return Ai},get DirectSocketType(){return Li},get Events(){return Ti},NetworkRequest:Ri,get WebSocketFrameType(){return Mi},cookieBlockedReasonToAttribute:function(e){switch(e){case"SecureOnly":return"secure";case"NotOnPath":return"path";case"DomainMismatch":return"domain";case"SameSiteStrict":case"SameSiteLax":case"SameSiteUnspecifiedTreatedAsLax":case"SameSiteNoneInsecure":case"SchemefulSameSiteStrict":case"SchemefulSameSiteLax":case"SchemefulSameSiteUnspecifiedTreatedAsLax":return"same-site";case"SamePartyFromCrossPartyContext":case"NameValuePairExceedsMaxSize":case"UserPreferences":case"ThirdPartyPhaseout":case"UnknownError":return null}return null},cookieBlockedReasonToUiString:function(e){switch(e){case"SecureOnly":return xi(ki.secureOnly);case"NotOnPath":return xi(ki.notOnPath);case"DomainMismatch":return xi(ki.domainMismatch);case"SameSiteStrict":return xi(ki.sameSiteStrict);case"SameSiteLax":return xi(ki.sameSiteLax);case"SameSiteUnspecifiedTreatedAsLax":return xi(ki.sameSiteUnspecifiedTreatedAsLax);case"SameSiteNoneInsecure":return xi(ki.sameSiteNoneInsecure);case"UserPreferences":return xi(ki.userPreferences);case"UnknownError":return xi(ki.unknownError);case"SchemefulSameSiteStrict":return xi(ki.schemefulSameSiteStrict);case"SchemefulSameSiteLax":return xi(ki.schemefulSameSiteLax);case"SchemefulSameSiteUnspecifiedTreatedAsLax":return xi(ki.schemefulSameSiteUnspecifiedTreatedAsLax);case"SamePartyFromCrossPartyContext":return xi(ki.samePartyFromCrossPartyContext);case"NameValuePairExceedsMaxSize":return xi(ki.nameValuePairExceedsMaxSize);case"ThirdPartyPhaseout":return xi(ki.thirdPartyPhaseout)}return""},cookieExemptionReasonToUiString:function(e){switch(e){case"UserSetting":return xi(ki.exemptionReasonUserSetting);case"TPCDMetadata":return xi(ki.exemptionReasonTPCDMetadata);case"TopLevelTPCDDeprecationTrial":return xi(ki.exemptionReasonTopLevelTPCDDeprecationTrial);case"TPCDDeprecationTrial":return xi(ki.exemptionReasonTPCDDeprecationTrial);case"TPCDHeuristics":return xi(ki.exemptionReasonTPCDHeuristics);case"EnterprisePolicy":return xi(ki.exemptionReasonEnterprisePolicy);case"StorageAccess":return xi(ki.exemptionReasonStorageAccessAPI);case"TopLevelStorageAccess":return xi(ki.exemptionReasonTopLevelStorageAccessAPI);case"Scheme":return xi(ki.exemptionReasonScheme)}return""},setCookieBlockedReasonToAttribute:Ei,setCookieBlockedReasonToUiString:Pi});class Di{#fl;#C;#bl;#yl;#vl;#Il;#wl;#h;#Zt;#u;#Sl;#kl;#Cl;#xl;constructor(e,t){this.#fl=e,this.#C=t.nodeId,e.setAXNodeForAXId(this.#C,this),t.backendDOMNodeId?(e.setAXNodeForBackendDOMNodeId(t.backendDOMNodeId,this),this.#bl=t.backendDOMNodeId,this.#yl=new js(e.target(),t.backendDOMNodeId)):(this.#bl=null,this.#yl=null),this.#vl=t.ignored,this.#vl&&"ignoredReasons"in t&&(this.#Il=t.ignoredReasons),this.#wl=t.role||null,this.#h=t.name||null,this.#Zt=t.description||null,this.#u=t.value||null,this.#Sl=t.properties||null,this.#xl=[...new Set(t.childIds)],this.#kl=t.parentId||null,t.frameId&&!t.parentId?(this.#Cl=t.frameId,e.setRootAXNodeForFrameId(t.frameId,this)):this.#Cl=null}id(){return this.#C}accessibilityModel(){return this.#fl}ignored(){return this.#vl}ignoredReasons(){return this.#Il||null}role(){return this.#wl||null}coreProperties(){const e=[];return this.#h&&e.push({name:"name",value:this.#h}),this.#Zt&&e.push({name:"description",value:this.#Zt}),this.#u&&e.push({name:"value",value:this.#u}),e}name(){return this.#h||null}description(){return this.#Zt||null}value(){return this.#u||null}properties(){return this.#Sl||null}parentNode(){return this.#kl?this.#fl.axNodeForId(this.#kl):null}isDOMNode(){return Boolean(this.#bl)}backendDOMNodeId(){return this.#bl}deferredDOMNode(){return this.#yl}highlightDOMNode(){const e=this.deferredDOMNode();e&&e.highlight()}children(){if(!this.#xl)return[];const e=[];for(const t of this.#xl){const n=this.#fl.axNodeForId(t);n&&e.push(n)}return e}numChildren(){return this.#xl?this.#xl.length:0}hasOnlyUnloadedChildren(){return!(!this.#xl||!this.#xl.length)&&this.#xl.every((e=>null===this.#fl.axNodeForId(e)))}hasUnloadedChildren(){return!(!this.#xl||!this.#xl.length)&&this.#xl.some((e=>null===this.#fl.axNodeForId(e)))}getFrameId(){return this.#Cl||this.parentNode()?.getFrameId()||null}}class Ni extends h{agent;#Rl=new Map;#Tl=new Map;#Ml=new Map;#Pl=new Map;#El=null;constructor(e){super(e),e.registerAccessibilityDispatcher(this),this.agent=e.accessibilityAgent(),this.resumeModel()}clear(){this.#El=null,this.#Rl.clear(),this.#Tl.clear(),this.#Ml.clear()}async resumeModel(){await this.agent.invoke_enable()}async suspendModel(){await this.agent.invoke_disable()}async requestPartialAXTree(e){const{nodes:t}=await this.agent.invoke_getPartialAXTree({nodeId:e.id,fetchRelatives:!0});if(!t)return;const n=[];for(const e of t)n.push(new Di(this,e))}loadComplete({root:e}){this.clear(),this.#El=new Di(this,e),this.dispatchEventToListeners("TreeUpdated",{root:this.#El})}nodesUpdated({nodes:e}){this.createNodesFromPayload(e),this.dispatchEventToListeners("TreeUpdated",{})}createNodesFromPayload(e){return e.map((e=>new Di(this,e)))}async requestRootNode(e){if(e&&this.#Ml.has(e))return this.#Ml.get(e);if(!e&&this.#El)return this.#El;const{node:t}=await this.agent.invoke_getRootAXNode({frameId:e});return t?this.createNodesFromPayload([t])[0]:void 0}async requestAXChildren(e,t){const n=this.#Rl.get(e);if(!n)throw new Error("Cannot request children before parent");if(!n.hasUnloadedChildren())return n.children();const r=this.#Pl.get(e);if(r)await r;else{const n=this.agent.invoke_getChildAXNodes({id:e,frameId:t});this.#Pl.set(e,n);const r=await n;r.getError()||(this.createNodesFromPayload(r.nodes),this.#Pl.delete(e))}return n.children()}async requestAndLoadSubTreeToNode(e){const t=[];let n=this.axNodeForDOMNode(e);for(;n;){t.push(n);const e=n.parentNode();if(!e)return t;n=e}const{nodes:r}=await this.agent.invoke_getAXNodeAndAncestors({backendNodeId:e.backendNodeId()});if(!r)return null;return this.createNodesFromPayload(r)}axNodeForId(e){return this.#Rl.get(e)||null}setRootAXNodeForFrameId(e,t){this.#Ml.set(e,t)}setAXNodeForAXId(e,t){this.#Rl.set(e,t)}axNodeForDOMNode(e){return e?this.#Tl.get(e.backendNodeId())??null:null}setAXNodeForBackendDOMNodeId(e,t){this.#Tl.set(e,t)}getAgent(){return this.agent}}h.register(Ni,{capabilities:2,autostart:!1});var Fi=Object.freeze({__proto__:null,AccessibilityModel:Ni,AccessibilityNode:Di});class Bi extends h{#Ks;#Ll=1;#Al=[];constructor(e){super(e),this.#Ks=e.pageAgent(),e.registerPageDispatcher(this)}async startScreencast(e,t,n,r,s,i,o){this.#Al.at(-1)&&await this.#Ks.invoke_stopScreencast();const a={id:this.#Ll++,request:{format:e,quality:t,maxWidth:n,maxHeight:r,everyNthFrame:s},callbacks:{onScreencastFrame:i,onScreencastVisibilityChanged:o}};return this.#Al.push(a),this.#Ks.invoke_startScreencast({format:e,quality:t,maxWidth:n,maxHeight:r,everyNthFrame:s}),a.id}stopScreencast(e){const t=this.#Al.pop();if(!t)throw new Error("There is no screencast operation to stop.");if(t.id!==e)throw new Error("Trying to stop a screencast operation that is not being served right now.");this.#Ks.invoke_stopScreencast();const n=this.#Al.at(-1);n&&this.#Ks.invoke_startScreencast({format:n.request.format,quality:n.request.quality,maxWidth:n.request.maxWidth,maxHeight:n.request.maxHeight,everyNthFrame:n.request.everyNthFrame})}async captureScreenshot(e,t,n,r){const s={format:e,quality:t,fromSurface:!0};switch(n){case"fromClip":s.captureBeyondViewport=!0,s.clip=r;break;case"fullpage":s.captureBeyondViewport=!0;break;case"fromViewport":s.captureBeyondViewport=!1;break;default:throw new Error("Unexpected or unspecified screnshotMode")}await Fs.muteHighlight();const i=await this.#Ks.invoke_captureScreenshot(s);return await Fs.unmuteHighlight(),i.data}screencastFrame({data:e,metadata:t,sessionId:n}){this.#Ks.invoke_screencastFrameAck({sessionId:n});const r=this.#Al.at(-1);r&&r.callbacks.onScreencastFrame.call(null,e,t)}screencastVisibilityChanged({visible:e}){const t=this.#Al.at(-1);t&&t.callbacks.onScreencastVisibilityChanged.call(null,e)}backForwardCacheNotUsed(e){}domContentEventFired(e){}loadEventFired(e){}lifecycleEvent(e){}navigatedWithinDocument(e){}frameAttached(e){}frameNavigated(e){}documentOpened(e){}frameDetached(e){}frameStartedLoading(e){}frameStoppedLoading(e){}frameRequestedNavigation(e){}frameStartedNavigating(e){}frameSubtreeWillBeDetached(e){}frameScheduledNavigation(e){}frameClearedScheduledNavigation(e){}frameResized(){}javascriptDialogOpening(e){}javascriptDialogClosed(e){}interstitialShown(){}interstitialHidden(){}windowOpen(e){}fileChooserOpened(e){}compilationCacheProduced(e){}downloadWillBegin(e){}downloadProgress(){}prefetchStatusUpdated(e){}prerenderStatusUpdated(e){}}h.register(Bi,{capabilities:64,autostart:!1});var _i=Object.freeze({__proto__:null,ScreenCaptureModel:Bi});const Hi="devtools_animations",Ui="__devtools_report_scroll_position__",qi=e=>`__devtools_scroll_listener_${e}__`;async function zi(e,t){const n=e.domModel().target().model(ii),r=e.domModel().target().pageAgent();for(const s of n.frames()){const{executionContextId:n}=await r.invoke_createIsolatedWorld({frameId:s.id,worldName:t}),i=await e.resolveToObject(void 0,n);if(i)return i}return null}class ji{#Ol;#Dl=new Map;#Nl;static lastAddedListenerId=0;constructor(e){this.#Ol=e}async#Fl(){if(this.#Nl)return;this.#Nl=e=>{const{name:t,payload:n}=e.data;if(t!==Ui)return;const{scrollTop:r,scrollLeft:s,id:i}=JSON.parse(n),o=this.#Dl.get(i);o&&o({scrollTop:r,scrollLeft:s})};const e=this.#Ol.domModel().target().model(Jr);await e.addBinding({name:Ui,executionContextName:Hi}),e.addEventListener($r.BindingCalled,this.#Nl)}async#Bl(){if(!this.#Nl)return;const e=this.#Ol.domModel().target().model(Jr);await e.removeBinding({name:Ui}),e.removeEventListener($r.BindingCalled,this.#Nl),this.#Nl=void 0}async addScrollEventListener(e){ji.lastAddedListenerId++;const t=ji.lastAddedListenerId;this.#Dl.set(t,e),this.#Nl||await this.#Fl();const n=await zi(this.#Ol,Hi);return n?(await n.callFunction((function(e,t,n){if("scrollingElement"in this&&!this.scrollingElement)return;const r="scrollingElement"in this?this.scrollingElement:this;this[n]=()=>{globalThis[t](JSON.stringify({scrollTop:r.scrollTop,scrollLeft:r.scrollLeft,id:e}))},this.addEventListener("scroll",this[n],!0)}),[t,Ui,qi(t)].map((e=>Bn.toCallArgument(e)))),n.release(),t):null}async removeScrollEventListener(e){const t=await zi(this.#Ol,Hi);t&&(await t.callFunction((function(e){this.removeEventListener("scroll",this[e]),delete this[e]}),[qi(e)].map((e=>Bn.toCallArgument(e)))),t.release(),this.#Dl.delete(e),0===this.#Dl.size&&await this.#Bl())}async scrollTop(){return await this.#Ol.callFunction((function(){if("scrollingElement"in this)return this.scrollingElement?this.scrollingElement.scrollTop:0;return this.scrollTop})).then((e=>e?.value??null))}async scrollLeft(){return await this.#Ol.callFunction((function(){if("scrollingElement"in this)return this.scrollingElement?this.scrollingElement.scrollLeft:0;return this.scrollLeft})).then((e=>e?.value??null))}async setScrollTop(e){await this.#Ol.callFunction((function(e){if("scrollingElement"in this){if(!this.scrollingElement)return;this.scrollingElement.scrollTop=e}else this.scrollTop=e}),[e])}async setScrollLeft(e){await this.#Ol.callFunction((function(e){if("scrollingElement"in this){if(!this.scrollingElement)return;this.scrollingElement.scrollLeft=e}else this.scrollLeft=e}),[e])}async verticalScrollRange(){return await this.#Ol.callFunction((function(){if("scrollingElement"in this)return this.scrollingElement?this.scrollingElement.scrollHeight-this.scrollingElement.clientHeight:0;return this.scrollHeight-this.clientHeight})).then((e=>e?.value??null))}async horizontalScrollRange(){return await this.#Ol.callFunction((function(){if("scrollingElement"in this)return this.scrollingElement?this.scrollingElement.scrollWidth-this.scrollingElement.clientWidth:0;return this.scrollWidth-this.clientWidth})).then((e=>e?.value??null))}}function Vi(e,t){const n=e.viewOrScrollTimeline(),r=t.viewOrScrollTimeline();return n?Boolean(r&&n.sourceNodeId===r.sourceNodeId&&n.axis===r.axis):!r&&e.startTime()===t.startTime()}class Wi extends h{runtimeModel;agent;#_l=new Map;animationGroups=new Map;#Hl=new Set;playbackRate=1;#Ul;#ql;constructor(t){super(t),this.runtimeModel=t.model(Jr),this.agent=t.animationAgent(),t.registerAnimationDispatcher(new Yi(this)),t.suspended()||this.agent.invoke_enable();t.model(ii).addEventListener(ri.PrimaryPageChanged,this.reset,this);const n=t.model(Bi);n&&(this.#Ul=new Zi(this,n)),this.#ql=e.Debouncer.debounce((()=>{for(;this.#Hl.size;)this.matchExistingGroups(this.createGroupFromPendingAnimations())}),100)}reset(){this.#_l.clear(),this.animationGroups.clear(),this.#Hl.clear(),this.dispatchEventToListeners(Gi.ModelReset)}async devicePixelRatio(){const e=await this.target().runtimeAgent().invoke_evaluate({expression:"window.devicePixelRatio"});return"number"===e?.result.type?e?.result.value??1:1}async getAnimationGroupForAnimation(e,t){for(const n of this.animationGroups.values())for(const r of n.animations())if(r.name()===e){const e=await r.source().node();if(e?.id===t)return n}return null}animationCanceled(e){this.#Hl.delete(e)}async animationUpdated(e){let t,n;for(const r of this.animationGroups.values())if(n=r.animations().find((t=>t.id()===e.id)),n){t=r;break}n&&t&&(await n.setPayload(e),this.dispatchEventToListeners(Gi.AnimationGroupUpdated,t))}async animationStarted(e){if(!e.source||!e.source.backendNodeId)return;const t=await Ki.parsePayload(this,e),n=t.source().keyframesRule();"WebAnimation"===t.type()&&n&&0===n.keyframes().length?this.#Hl.delete(t.id()):(this.#_l.set(t.id(),t),this.#Hl.add(t.id())),this.#ql()}matchExistingGroups(e){let t=null;for(const n of this.animationGroups.values()){if(n.matches(e)){t=n,n.rebaseTo(e);break}if(n.shouldInclude(e)){t=n,n.appendAnimations(e.animations());break}}return t?this.dispatchEventToListeners(Gi.AnimationGroupUpdated,t):(this.animationGroups.set(e.id(),e),this.#Ul&&this.#Ul.captureScreenshots(e.finiteDuration(),e.screenshotsInternal),this.dispatchEventToListeners(Gi.AnimationGroupStarted,e)),Boolean(t)}createGroupFromPendingAnimations(){console.assert(this.#Hl.size>0);const e=this.#Hl.values().next().value;this.#Hl.delete(e);const t=this.#_l.get(e);if(!t)throw new Error("Unable to locate first animation");const n=[t],r=new Set;for(const e of this.#Hl){const s=this.#_l.get(e);Vi(t,s)?n.push(s):r.add(e)}return this.#Hl=r,n.sort(((e,t)=>e.startTime()-t.startTime())),new Ji(this,e,n)}setPlaybackRate(e){this.playbackRate=e,this.agent.invoke_setPlaybackRate({playbackRate:e})}async releaseAllAnimations(){const e=[...this.animationGroups.values()].flatMap((e=>e.animations().map((e=>e.id()))));await this.agent.invoke_releaseAnimations({animations:e})}releaseAnimations(e){this.agent.invoke_releaseAnimations({animations:e})}async suspendModel(){await this.agent.invoke_disable().then((()=>this.reset()))}async resumeModel(){await this.agent.invoke_enable()}}var Gi;!function(e){e.AnimationGroupStarted="AnimationGroupStarted",e.AnimationGroupUpdated="AnimationGroupUpdated",e.ModelReset="ModelReset"}(Gi||(Gi={}));class Ki{#zl;#jl;#Vl;#Wl;constructor(e){this.#zl=e}static async parsePayload(e,t){const n=new Ki(e);return await n.setPayload(t),n}async setPayload(e){if(e.viewOrScrollTimeline){const t=await this.#zl.devicePixelRatio();e.viewOrScrollTimeline.startOffset&&(e.viewOrScrollTimeline.startOffset/=t),e.viewOrScrollTimeline.endOffset&&(e.viewOrScrollTimeline.endOffset/=t)}this.#jl=e,this.#Vl&&e.source?this.#Vl.setPayload(e.source):!this.#Vl&&e.source&&(this.#Vl=new Qi(this.#zl,e.source))}percentageToPixels(e,t){const{startOffset:n,endOffset:r}=t;if(void 0===n||void 0===r)throw new Error("startOffset or endOffset does not exist in viewOrScrollTimeline");return e/100*(r-n)}viewOrScrollTimeline(){return this.#jl.viewOrScrollTimeline}id(){return this.#jl.id}name(){return this.#jl.name}paused(){return this.#jl.pausedState}playState(){return this.#Wl||this.#jl.playState}playbackRate(){return this.#jl.playbackRate}startTime(){const e=this.viewOrScrollTimeline();return e?this.percentageToPixels(this.playbackRate()>0?this.#jl.startTime:100-this.#jl.startTime,e)+(this.viewOrScrollTimeline()?.startOffset??0):this.#jl.startTime}iterationDuration(){const e=this.viewOrScrollTimeline();return e?this.percentageToPixels(this.source().duration(),e):this.source().duration()}endTime(){return this.source().iterations?this.viewOrScrollTimeline()?this.startTime()+this.iterationDuration()*this.source().iterations():this.startTime()+this.source().delay()+this.source().duration()*this.source().iterations()+this.source().endDelay():1/0}finiteDuration(){const e=Math.min(this.source().iterations(),3);return this.viewOrScrollTimeline()?this.iterationDuration()*e:this.source().delay()+this.source().duration()*e}currentTime(){const e=this.viewOrScrollTimeline();return e?this.percentageToPixels(this.#jl.currentTime,e):this.#jl.currentTime}source(){return this.#Vl}type(){return this.#jl.type}overlaps(e){if(!this.source().iterations()||!e.source().iterations())return!0;const t=this.startTime()=n.startTime()}delayOrStartTime(){return this.viewOrScrollTimeline()?this.startTime():this.source().delay()}setTiming(e,t){this.#Vl.node().then((n=>{if(!n)throw new Error("Unable to find node");this.updateNodeStyle(e,t,n)})),this.#Vl.durationInternal=e,this.#Vl.delayInternal=t,this.#zl.agent.invoke_setTiming({animationId:this.id(),duration:e,delay:t})}updateNodeStyle(e,t,n){let r;if("CSSTransition"===this.type())r="transition-";else{if("CSSAnimation"!==this.type())return;r="animation-"}if(!n.id)throw new Error("Node has no id");const s=n.domModel().cssModel();s.setEffectivePropertyValueForNode(n.id,r+"duration",e+"ms"),s.setEffectivePropertyValueForNode(n.id,r+"delay",t+"ms")}async remoteObjectPromise(){const e=await this.#zl.agent.invoke_resolveAnimation({animationId:this.id()});return e?this.#zl.runtimeModel.createRemoteObject(e.remoteObject):null}cssId(){return this.#jl.cssId||""}}class Qi{#zl;#rs;delayInternal;durationInternal;#Gl;#Kl;constructor(e,t){this.#zl=e,this.setPayload(t)}setPayload(e){this.#rs=e,!this.#Gl&&e.keyframesRule?this.#Gl=new $i(e.keyframesRule):this.#Gl&&e.keyframesRule&&this.#Gl.setPayload(e.keyframesRule),this.delayInternal=e.delay,this.durationInternal=e.duration}delay(){return this.delayInternal}endDelay(){return this.#rs.endDelay}iterations(){return this.delay()||this.endDelay()||this.duration()?this.#rs.iterations||1/0:0}duration(){return this.durationInternal}direction(){return this.#rs.direction}fill(){return this.#rs.fill}node(){return this.#Kl||(this.#Kl=new js(this.#zl.target(),this.backendNodeId())),this.#Kl.resolvePromise()}deferredNode(){return new js(this.#zl.target(),this.backendNodeId())}backendNodeId(){return this.#rs.backendNodeId}keyframesRule(){return this.#Gl||null}easing(){return this.#rs.easing}}class $i{#rs;#rt;constructor(e){this.setPayload(e)}setPayload(e){this.#rs=e,this.#rt?this.#rs.keyframes.forEach(((e,t)=>{this.#rt[t]?.setPayload(e)})):this.#rt=this.#rs.keyframes.map((e=>new Xi(e)))}name(){return this.#rs.name}keyframes(){return this.#rt}}class Xi{#rs;#Ql;constructor(e){this.setPayload(e)}setPayload(e){this.#rs=e,this.#Ql=e.offset}offset(){return this.#Ql}setOffset(e){this.#Ql=100*e+"%"}offsetAsNumber(){return parseFloat(this.#Ql)/100}easing(){return this.#rs.easing}}class Ji{#zl;#C;#$l;#Xl;#Jl;screenshotsInternal;#Yl;constructor(e,t,n){this.#zl=e,this.#C=t,this.#Xl=n,this.#Jl=!1,this.screenshotsInternal=[],this.#Yl=[]}isScrollDriven(){return Boolean(this.#Xl[0]?.viewOrScrollTimeline())}id(){return this.#C}animations(){return this.#Xl}release(){this.#zl.animationGroups.delete(this.id()),this.#zl.releaseAnimations(this.animationIds())}animationIds(){return this.#Xl.map((function(e){return e.id()}))}startTime(){return this.#Xl[0].startTime()}groupDuration(){let e=0;for(const t of this.#Xl)e=Math.max(e,t.delayOrStartTime()+t.iterationDuration());return e}finiteDuration(){let e=0;for(let t=0;te.endTime())&&(e=t);if(!e)throw new Error("No longest animation found");return this.#zl.agent.invoke_getCurrentTime({id:e.id()}).then((({currentTime:e})=>e||0))}matches(e){function t(e){const t=(e.viewOrScrollTimeline()?.sourceNodeId??"")+(e.viewOrScrollTimeline()?.axis??"");return("WebAnimation"===e.type()?e.type()+e.id():e.cssId())+t}if(this.#Xl.length!==e.#Xl.length)return!1;const n=this.#Xl.map(t).sort(),r=e.#Xl.map(t).sort();for(let e=0;ethis.#rd)&&(clearTimeout(this.#nd),this.#nd=window.setTimeout(this.stopScreencast.bind(this),n),this.#rd=r),this.#ed||(this.#ed=!0,this.#td=await this.#Zl.startScreencast("jpeg",80,void 0,300,2,this.screencastFrame.bind(this),(e=>{})))}screencastFrame(e,t){if(!this.#ed)return;const n=window.performance.now();this.#de=this.#de.filter((function(e){return e.endTime>=n}));for(const t of this.#de)t.screenshots.push(e)}stopScreencast(){this.#td&&(this.#Zl.stopScreencast(this.#td),this.#nd=void 0,this.#rd=void 0,this.#de=[],this.#ed=!1,this.#td=void 0)}}h.register(Wi,{capabilities:2,autostart:!0});var eo=Object.freeze({__proto__:null,AnimationDOMNode:ji,AnimationDispatcher:Yi,AnimationEffect:Qi,AnimationGroup:Ji,AnimationImpl:Ki,AnimationModel:Wi,get Events(){return Gi},KeyframeStyle:Xi,KeyframesRule:$i,ScreenshotCapture:Zi});class to extends h{agent;#yr;#sd;constructor(t){super(t),this.agent=t.autofillAgent(),this.#sd=e.Settings.Settings.instance().createSetting("show-test-addresses-in-autofill-menu-on-event",!1),t.registerAutofillDispatcher(this),this.enable()}setTestAddresses(){this.agent.invoke_setAddresses({addresses:this.#sd.get()?[{fields:[{name:"ADDRESS_HOME_COUNTRY",value:"US"},{name:"NAME_FULL",value:"Jon Stewart Doe"},{name:"NAME_FIRST",value:"Jon"},{name:"NAME_MIDDLE",value:"Stewart"},{name:"NAME_LAST",value:"Doe"},{name:"COMPANY_NAME",value:"Fake Company"},{name:"ADDRESS_HOME_LINE1",value:"1600 Fake Street"},{name:"ADDRESS_HOME_LINE2",value:"Apartment 1"},{name:"ADDRESS_HOME_ZIP",value:"94043"},{name:"ADDRESS_HOME_CITY",value:"Mountain View"},{name:"ADDRESS_HOME_STATE",value:"CA"},{name:"EMAIL_ADDRESS",value:"test@example.us"},{name:"PHONE_HOME_WHOLE_NUMBER",value:"+16019521325"}]},{fields:[{name:"ADDRESS_HOME_COUNTRY",value:"BR"},{name:"NAME_FULL",value:"João Souza Silva"},{name:"NAME_FIRST",value:"João"},{name:"NAME_LAST",value:"Souza Silva"},{name:"NAME_LAST_FIRST",value:"Souza"},{name:"NAME_LAST_SECOND",value:"Silva"},{name:"COMPANY_NAME",value:"Empresa Falsa"},{name:"ADDRESS_HOME_STREET_ADDRESS",value:"Rua Inexistente, 2000\nAndar 2, Apartamento 1"},{name:"ADDRESS_HOME_STREET_LOCATION",value:"Rua Inexistente, 2000"},{name:"ADDRESS_HOME_STREET_NAME",value:"Rua Inexistente"},{name:"ADDRESS_HOME_HOUSE_NUMBER",value:"2000"},{name:"ADDRESS_HOME_SUBPREMISE",value:"Andar 2, Apartamento 1"},{name:"ADDRESS_HOME_APT_NUM",value:"1"},{name:"ADDRESS_HOME_FLOOR",value:"2"},{name:"ADDRESS_HOME_APT",value:"Apartamento 1"},{name:"ADDRESS_HOME_APT_TYPE",value:"Apartamento"},{name:"ADDRESS_HOME_APT_NUM",value:"1"},{name:"ADDRESS_HOME_DEPENDENT_LOCALITY",value:"Santa Efigênia"},{name:"ADDRESS_HOME_LANDMARK",value:"Próximo à estação Santa Efigênia"},{name:"ADDRESS_HOME_OVERFLOW",value:"Andar 2, Apartamento 1"},{name:"ADDRESS_HOME_ZIP",value:"30260-080"},{name:"ADDRESS_HOME_CITY",value:"Belo Horizonte"},{name:"ADDRESS_HOME_STATE",value:"MG"},{name:"EMAIL_ADDRESS",value:"teste@exemplo.us"},{name:"PHONE_HOME_WHOLE_NUMBER",value:"+553121286800"}]},{fields:[{name:"ADDRESS_HOME_COUNTRY",value:"MX"},{name:"NAME_FULL",value:"Juan Francisco García Flores"},{name:"NAME_FIRST",value:"Juan Francisco"},{name:"NAME_LAST",value:"García Flores"},{name:"NAME_LAST_FIRST",value:"García"},{name:"NAME_LAST_SECOND",value:"Flores"},{name:"COMPANY_NAME",value:"Empresa Falsa"},{name:"ADDRESS_HOME_STREET_ADDRESS",value:"C. Falsa 445\nPiso 2, Apartamento 1\nEntre calle Volcán y calle Montes Blancos, cerca de la estación de metro"},{name:"ADDRESS_HOME_STREET_LOCATION",value:"C. Falsa 445"},{name:"ADDRESS_HOME_STREET_NAME",value:"C. Falsa"},{name:"ADDRESS_HOME_HOUSE_NUMBER",value:"445"},{name:"ADDRESS_HOME_SUBPREMISE",value:"Piso 2, Apartamento 1"},{name:"ADDRESS_HOME_FLOOR",value:"2"},{name:"ADDRESS_HOME_APT",value:"Apartamento 1"},{name:"ADDRESS_HOME_APT_TYPE",value:"Apartamento"},{name:"ADDRESS_HOME_APT_NUM",value:"1"},{name:"ADDRESS_HOME_DEPENDENT_LOCALITY",value:"Lomas de Chapultepec"},{name:"ADDRESS_HOME_OVERFLOW",value:"Entre calle Volcán y calle Montes Celestes, cerca de la estación de metro"},{name:"ADDRESS_HOME_BETWEEN_STREETS_OR_LANDMARK",value:"Entre calle Volcán y calle Montes Blancos, cerca de la estación de metro"},{name:"ADDRESS_HOME_LANDMARK",value:"Cerca de la estación de metro"},{name:"ADDRESS_HOME_BETWEEN_STREETS",value:"Entre calle Volcán y calle Montes Blancos"},{name:"ADDRESS_HOME_BETWEEN_STREETS_1",value:"calle Volcán"},{name:"ADDRESS_HOME_BETWEEN_STREETS_2",value:"calle Montes Blancos"},{name:"ADDRESS_HOME_ADMIN_LEVEL2",value:"Miguel Hidalgo"},{name:"ADDRESS_HOME_ZIP",value:"11001"},{name:"ADDRESS_HOME_CITY",value:"Ciudad de México"},{name:"ADDRESS_HOME_STATE",value:"Distrito Federal"},{name:"EMAIL_ADDRESS",value:"ejemplo@ejemplo.mx"},{name:"PHONE_HOME_WHOLE_NUMBER",value:"+525553428400"}]},{fields:[{name:"ADDRESS_HOME_COUNTRY",value:"DE"},{name:"NAME_FULL",value:"Gottfried Wilhelm Leibniz"},{name:"NAME_FIRST",value:"Gottfried"},{name:"NAME_MIDDLE",value:"Wilhelm"},{name:"NAME_LAST",value:"Leibniz"},{name:"COMPANY_NAME",value:"Erfundenes Unternehmen"},{name:"ADDRESS_HOME_LINE1",value:"Erfundene Straße 33"},{name:"ADDRESS_HOME_LINE2",value:"Wohnung 1"},{name:"ADDRESS_HOME_ZIP",value:"80732"},{name:"ADDRESS_HOME_CITY",value:"München"},{name:"EMAIL_ADDRESS",value:"test@beispiel.de"},{name:"PHONE_HOME_WHOLE_NUMBER",value:"+4930303986300"}]}]:[]})}enable(){this.#yr||a.InspectorFrontendHost.isUnderTest()||(this.agent.invoke_enable(),this.setTestAddresses(),this.#yr=!0)}disable(){this.#yr&&!a.InspectorFrontendHost.isUnderTest()&&(this.#yr=!1,this.agent.invoke_disable())}addressFormFilled(e){this.dispatchEventToListeners("AddressFormFilled",{autofillModel:this,event:e})}}h.register(to,{capabilities:2,autostart:!0});var no=Object.freeze({__proto__:null,AutofillModel:to});class ro{name;#id;enabledInternal;constructor(e,t){this.#id=e,this.name=t,this.enabledInternal=!1}category(){return this.#id}enabled(){return this.enabledInternal}setEnabled(e){this.enabledInternal=e}}var so=Object.freeze({__proto__:null,CategorizedBreakpoint:ro});class io{#od;#ad=[];#ld=new Map;#dd=new Map;#cd=new Map;#hd=new Map;#ud=new Map;#gd=[];#pd=[];#md=[];static enhancedTraceVersion=1;constructor(e){this.#od=e;try{this.parseEnhancedTrace()}catch(e){throw new i.UserVisibleError(e)}}parseEnhancedTrace(){for(const e of this.#od.traceEvents)if(this.isTargetRundownEvent(e)){const t=e.args?.data;this.#ld.set(this.getScriptIsolateId(t.isolate,t.scriptId),t.v8context),this.#dd.set(this.getScriptIsolateId(t.isolate,t.scriptId),t.frame),this.#gd.find((e=>e.targetId===t.frame))||this.#gd.push({targetId:t.frame,type:t.frameType,isolate:t.isolate,pid:e.pid,url:t.url}),this.#pd.find((e=>e.v8Context===t.v8context))||this.#pd.push({id:-1,origin:t.origin,v8Context:t.v8context,auxData:{frameId:t.frame,isDefault:t.isDefault,type:t.contextType},isolate:t.isolate})}else if(this.isScriptRundownEvent(e)){this.#ad.push(e);const t=e.args.data;this.#md.find((e=>e.scriptId===t.scriptId&&e.isolate===t.isolate))||this.#md.push({scriptId:t.scriptId,isolate:t.isolate,executionContextId:t.executionContextId,startLine:t.startLine,startColumn:t.startColumn,endLine:t.endLine,endColumn:t.endColumn,hash:t.hash,isModule:t.isModule,url:t.url,hasSourceURL:t.hasSourceUrl,sourceURL:t.sourceUrl,sourceMapURL:t.sourceMapUrl})}else if(this.isScriptRundownSourceEvent(e)){const t=e.args.data,n=this.getScriptIsolateId(t.isolate,t.scriptId);if("splitIndex"in t&&"splitCount"in t){this.#hd.has(n)||this.#hd.set(n,new Array(t.splitCount).fill(""));const e=this.#hd.get(n);e&&t.sourceText&&(e[t.splitIndex]=t.sourceText)}else t.sourceText&&this.#cd.set(n,t.sourceText),t.length&&this.#ud.set(n,t.length)}}data(){const e=new Map;this.#ad.forEach((t=>{const n=t.args.data,r=this.#ld.get(this.getScriptIsolateId(n.isolate,n.scriptId));r&&e.set(r,n.executionContextId)})),this.#pd.forEach((t=>{if(t.v8Context){const n=e.get(t.v8Context);n&&(t.id=n)}})),this.#md.forEach((e=>{const t=this.getScriptIsolateId(e.isolate,e.scriptId);if(this.#cd.has(t))e.sourceText=this.#cd.get(t),e.length=this.#ud.get(t);else if(this.#hd.has(t)){const n=this.#hd.get(t);n&&(e.sourceText=n.join(""),e.length=e.sourceText.length)}e.auxData=this.#pd.find((t=>t.id===e.executionContextId&&t.isolate===e.isolate))?.auxData}));for(const e of this.#md)e.sourceMapURL=this.getEncodedSourceMapUrl(e);const t=new Map;for(const e of this.#gd)t.set(e,this.groupContextsAndScriptsUnderTarget(e,this.#pd,this.#md));return t}getEncodedSourceMapUrl(e){if(e.sourceMapURL?.startsWith("data:"))return e.sourceMapURL;const t=this.getSourceMapFromMetadata(e);if(t)try{return`data:text/plain;base64,${btoa(JSON.stringify(t))}`}catch{return}}getSourceMapFromMetadata(t){const{hasSourceURL:n,sourceURL:r,url:s,sourceMapURL:i,isolate:o,scriptId:a}=t;if(!i||!this.#od.metadata.sourceMaps)return;const l=this.#dd.get(this.getScriptIsolateId(o,a));if(!l)return;const d=this.#gd.find((e=>e.targetId===l));if(!d)return;let c=s;if(n&&r){const t=d.url;c=e.ParsedURL.ParsedURL.completeURL(t,r)??r}const h=e.ParsedURL.ParsedURL.completeURL(c,i);if(!h)return;const{sourceMap:u}=this.#od.metadata.sourceMaps.find((e=>e.sourceMapUrl===h))??{};return u}getScriptIsolateId(e,t){return t+"@"+e}isTraceEvent(e){return"cat"in e&&"pid"in e&&"args"in e&&"data"in e.args}isTargetRundownEvent(e){return this.isTraceEvent(e)&&"disabled-by-default-devtools.target-rundown"===e.cat}isScriptRundownEvent(e){return this.isTraceEvent(e)&&"disabled-by-default-devtools.v8-source-rundown"===e.cat}isScriptRundownSourceEvent(e){return this.isTraceEvent(e)&&"disabled-by-default-devtools.v8-source-rundown-sources"===e.cat}groupContextsAndScriptsUnderTarget(e,t,n){const r=[],s=[];for(const n of t)n.auxData?.frameId===e.targetId&&r.push(n);for(const t of n)null===t.auxData&&console.error(t+" missing aux data"),t.auxData?.frameId===e.targetId&&s.push(t);return[r,s]}}var oo=Object.freeze({__proto__:null,EnhancedTracesParser:io});class ao{traceEvents;metadata;constructor(e,t={}){this.traceEvents=e,this.metadata=t}}class lo{networkRequest;constructor(e){this.networkRequest=e}static create(t){const n=t.args.data.url,r=e.ParsedURL.ParsedURL.urlWithoutHash(n),s=ii.resourceForURL(n)??ii.resourceForURL(r),i=s?.request;return i?new lo(i):null}}var co=Object.freeze({__proto__:null,RevealableEvent:class{event;constructor(e){this.event=e}},RevealableNetworkRequest:lo,TraceObject:ao});const ho={noSourceText:"No source text available",noHostWindow:"Can not find host window",errorLoadingLog:"Error loading log"},uo=n.i18n.registerUIStrings("core/sdk/RehydratingConnection.ts",ho),go=n.i18n.getLocalizedString.bind(void 0,uo);class po{rehydratingConnectionState=1;onDisconnect=null;onMessage=null;trace=null;sessions=new Map;#fd;#bd;#yd=this.#vd.bind(this);constructor(e){this.#fd=e,this.#bd=window,this.#Id()}#Id(){this.#bd.addEventListener("message",this.#yd),this.#bd.opener||this.#fd({reason:go(ho.noHostWindow)}),this.#bd.opener.postMessage({type:"REHYDRATING_WINDOW_READY"})}#vd(e){if("REHYDRATING_TRACE_FILE"===e.data.type){const{traceFile:t}=e.data,n=new FileReader;n.onload=async()=>{await this.startHydration(n.result)},n.onerror=()=>{this.#fd({reason:go(ho.errorLoadingLog)})},n.readAsText(t)}this.#bd.removeEventListener("message",this.#yd)}async startHydration(e){if(!this.onMessage||2!==this.rehydratingConnectionState)return!1;const t=JSON.parse(e);if(!("traceEvents"in t))return console.error("RehydratingConnection failed to initialize due to missing trace events in payload"),!1;this.trace=t;const n=new io(t).data();let r=0;this.sessions.set(r,new mo(this));for(const[e,[t,s]]of n.entries())this.postToFrontend({method:"Target.targetCreated",params:{targetInfo:{targetId:e.targetId,type:e.type,title:e.url,url:e.url,attached:!1,canAccessOpener:!1}}}),r+=1,this.sessions.set(r,new fo(r,e,t,s,this));return await this.#wd(),!0}async#wd(){if(!this.trace)return;this.rehydratingConnectionState=3;const t=new ao(this.trace.traceEvents,this.trace.metadata);await e.Revealer.reveal(t)}setOnMessage(e){this.onMessage=e,this.rehydratingConnectionState=2}setOnDisconnect(e){this.onDisconnect=e}sendRawMessage(e){"string"==typeof e&&(e=JSON.parse(e));const t=e;if(void 0!==t.sessionId){const e=this.sessions.get(t.sessionId);e?e.handleFrontendMessageAsFakeCDPAgent(t):console.error("Invalid SessionId: "+t.sessionId)}else this.sessions.get(0)?.handleFrontendMessageAsFakeCDPAgent(t)}postToFrontend(e){this.onMessage?this.onMessage(e):console.error("onMessage was not initialized")}disconnect(){return Promise.reject()}}class mo{connection=null;constructor(e){this.connection=e}sendMessageToFrontend(e){requestAnimationFrame((()=>{this.connection&&this.connection.postToFrontend(e)}))}handleFrontendMessageAsFakeCDPAgent(e){this.sendMessageToFrontend({id:e.id,result:{}})}}class fo extends mo{sessionId;target;executionContexts=[];scripts=[];constructor(e,t,n,r,s){super(s),this.sessionId=e,this.target=t,this.executionContexts=n,this.scripts=r,this.sessionAttachToTarget()}sendMessageToFrontend(e,t=!0){0!==this.sessionId&&t&&(e.sessionId=this.sessionId),super.sendMessageToFrontend(e)}handleFrontendMessageAsFakeCDPAgent(e){switch(e.method){case"Runtime.enable":this.handleRuntimeEnabled(e.id);break;case"Debugger.enable":this.handleDebuggerEnable(e.id);break;case"Debugger.getScriptSource":if(e.params){const t=e.params;this.handleDebuggerGetScriptSource(e.id,t.scriptId)}break;default:this.sendMessageToFrontend({id:e.id,result:{}})}}sessionAttachToTarget(){this.sendMessageToFrontend({method:"Target.attachedToTarget",params:{sessionId:this.sessionId,waitingForDebugger:!1,targetInfo:{targetId:this.target.targetId,type:this.target.type,title:this.target.url,url:this.target.url,attached:!0,canAccessOpener:!1}}},!1)}handleRuntimeEnabled(e){for(const e of this.executionContexts)e.name=e.origin,this.sendMessageToFrontend({method:"Runtime.executionContextCreated",params:{context:e}});this.sendMessageToFrontend({id:e,result:{}})}handleDebuggerGetScriptSource(e,t){const n=this.scripts.find((e=>e.scriptId===t));n?this.sendMessageToFrontend({id:e,result:{scriptSource:void 0===n.sourceText?go(ho.noSourceText):n.sourceText}}):console.error("No script for id: "+t)}handleDebuggerEnable(e){for(const e of this.scripts)this.sendMessageToFrontend({method:"Debugger.scriptParsed",params:e});this.sendMessageToFrontend({id:e,result:{debuggerId:"7777777777777777777.8888888888888888888"}})}}const bo={websocketDisconnected:"WebSocket disconnected"},yo=n.i18n.registerUIStrings("core/sdk/Connections.ts",bo),vo=n.i18n.getLocalizedString.bind(void 0,yo);class Io{onMessage;#Sd;#kd;#Cd;#Vt;constructor(){this.onMessage=null,this.#Sd=null,this.#kd="",this.#Cd=0,this.#Vt=[a.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(a.InspectorFrontendHostAPI.Events.DispatchMessage,this.dispatchMessage,this),a.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(a.InspectorFrontendHostAPI.Events.DispatchMessageChunk,this.dispatchMessageChunk,this)]}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#Sd=e}sendRawMessage(e){this.onMessage&&a.InspectorFrontendHost.InspectorFrontendHostInstance.sendMessageToBackend(e)}dispatchMessage(e){this.onMessage&&this.onMessage.call(null,e.data)}dispatchMessageChunk(e){const{messageChunk:t,messageSize:n}=e.data;n&&(this.#kd="",this.#Cd=n),this.#kd+=t,this.#kd.length===this.#Cd&&this.onMessage&&(this.onMessage.call(null,this.#kd),this.#kd="",this.#Cd=0)}async disconnect(){const t=this.#Sd;e.EventTarget.removeEventListeners(this.#Vt),this.#Sd=null,this.onMessage=null,t&&t.call(null,"force disconnect")}}class wo{#xd;onMessage;#Sd;#Rd;#Td;#Md;constructor(e,t){this.#xd=new WebSocket(e),this.#xd.onerror=this.onError.bind(this),this.#xd.onopen=this.onOpen.bind(this),this.#xd.onmessage=e=>{this.onMessage&&this.onMessage.call(null,e.data)},this.#xd.onclose=this.onClose.bind(this),this.onMessage=null,this.#Sd=null,this.#Rd=t,this.#Td=!1,this.#Md=[]}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#Sd=e}onError(e){this.#Rd&&this.#Rd.call(null,{reason:vo(bo.websocketDisconnected),errorType:e.type}),this.#Sd&&this.#Sd.call(null,"connection failed"),this.close()}onOpen(){if(this.#Td=!0,this.#xd){this.#xd.onerror=console.error;for(const e of this.#Md)this.#xd.send(e)}this.#Md=[]}onClose(e){this.#Rd&&this.#Rd.call(null,{reason:e.reason,code:String(e.code||0)}),this.#Sd&&this.#Sd.call(null,"websocket closed"),this.close()}close(e){this.#xd&&(this.#xd.onerror=null,this.#xd.onopen=null,this.#xd.onclose=e||null,this.#xd.onmessage=null,this.#xd.close(),this.#xd=null),this.#Rd=null}sendRawMessage(e){this.#Td&&this.#xd?this.#xd.send(e):this.#Md.push(e)}disconnect(){return new Promise((e=>{this.close((()=>{this.#Sd&&this.#Sd.call(null,"force disconnect"),e()}))}))}}class So{onMessage;#Sd;constructor(){this.onMessage=null,this.#Sd=null}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#Sd=e}sendRawMessage(e){window.setTimeout(this.respondWithError.bind(this,e),0)}respondWithError(e){const t=JSON.parse(e),n={message:"This is a stub connection, can't dispatch message.",code:l.InspectorBackend.DevToolsStubErrorCode,data:t};this.onMessage&&this.onMessage.call(null,{id:t.id,error:n})}async disconnect(){this.#Sd&&this.#Sd.call(null,"force disconnect"),this.#Sd=null,this.onMessage=null}}class ko{#Pd;#Ed;onMessage;#Sd;constructor(e,t){this.#Pd=e,this.#Ed=t,this.onMessage=null,this.#Sd=null}setOnMessage(e){this.onMessage=e}setOnDisconnect(e){this.#Sd=e}getOnDisconnect(){return this.#Sd}sendRawMessage(e){const t=JSON.parse(e);t.sessionId||(t.sessionId=this.#Ed),this.#Pd.sendRawMessage(JSON.stringify(t))}getSessionId(){return this.#Ed}async disconnect(){this.#Sd&&this.#Sd.call(null,"force disconnect"),this.#Sd=null,this.onMessage=null}}function Co(e){if(o.Runtime.getPathName().includes("rehydrated_devtools_app"))return new po(e);const t=o.Runtime.Runtime.queryParam("ws"),n=o.Runtime.Runtime.queryParam("wss");if(t||n){const r=t?"ws":"wss";let s=t||n;a.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode()&&s.startsWith("/")&&(s=`${window.location.host}${s}`);return new wo(`${r}://${s}`,e)}return a.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode()?new So:new Io}var xo=Object.freeze({__proto__:null,MainConnection:Io,ParallelConnection:ko,StubConnection:So,WebSocketConnection:wo,initMainConnection:async function(e,t){l.InspectorBackend.Connection.setFactory(Co.bind(null,t)),await e(),a.InspectorFrontendHost.InspectorFrontendHostInstance.connectionReady()}});const Ro={main:"Main"},To=n.i18n.registerUIStrings("core/sdk/ChildTargetManager.ts",Ro),Mo=n.i18n.getLocalizedString.bind(void 0,To);class Po extends h{#Ld;#Ad;#Od;#Dd=new Map;#Nd=new Map;#Fd=new Map;#Bd=new Map;#_d=null;constructor(e){super(e),this.#Ld=e.targetManager(),this.#Ad=e,this.#Od=e.targetAgent(),e.registerTargetDispatcher(this);const t=this.#Ld.browserTarget();t?t!==e&&t.targetAgent().invoke_autoAttachRelated({targetId:e.id(),waitForDebuggerOnStart:!0}):this.#Od.invoke_setAutoAttach({autoAttach:!0,waitForDebuggerOnStart:!0,flatten:!0}),e.parentTarget()?.type()===U.FRAME||a.InspectorFrontendHost.isUnderTest()||(this.#Od.invoke_setDiscoverTargets({discover:!0}),this.#Od.invoke_setRemoteLocations({locations:[{host:"localhost",port:9229}]}))}static install(e){Po.attachCallback=e,h.register(Po,{capabilities:32,autostart:!0})}childTargets(){return Array.from(this.#Nd.values())}async suspendModel(){await this.#Od.invoke_setAutoAttach({autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0})}async resumeModel(){await this.#Od.invoke_setAutoAttach({autoAttach:!0,waitForDebuggerOnStart:!0,flatten:!0})}dispose(){for(const e of this.#Nd.keys())this.detachedFromTarget({sessionId:e,targetId:void 0})}targetCreated({targetInfo:e}){this.#Dd.set(e.targetId,e),this.fireAvailableTargetsChanged(),this.dispatchEventToListeners("TargetCreated",e)}targetInfoChanged({targetInfo:e}){this.#Dd.set(e.targetId,e);const t=this.#Fd.get(e.targetId);if(t)if(t.setHasCrashed(!1),"prerender"!==t.targetInfo()?.subtype||e.subtype)t.updateTargetInfo(e);else{const n=t.model(ii);t.updateTargetInfo(e),n?.mainFrame&&n.primaryPageChanged(n.mainFrame,"Activation"),t.setName(Mo(Ro.main))}this.fireAvailableTargetsChanged(),this.dispatchEventToListeners("TargetInfoChanged",e)}targetDestroyed({targetId:e}){this.#Dd.delete(e),this.fireAvailableTargetsChanged(),this.dispatchEventToListeners("TargetDestroyed",e)}targetCrashed({targetId:e}){const t=this.#Fd.get(e);t&&t.setHasCrashed(!0)}fireAvailableTargetsChanged(){W.instance().dispatchEventToListeners("AvailableTargetsChanged",[...this.#Dd.values()])}async getParentTargetId(){return this.#_d||(this.#_d=(await this.#Ad.targetAgent().invoke_getTargetInfo({})).targetInfo.targetId),this.#_d}async getTargetInfo(){return(await this.#Ad.targetAgent().invoke_getTargetInfo({})).targetInfo}async attachedToTarget({sessionId:t,targetInfo:n,waitingForDebugger:r}){if(this.#_d===n.targetId)return;let s=U.BROWSER,i="";if("worker"===n.type&&n.title&&n.title!==n.url)i=n.title;else if(!["page","iframe","webview"].includes(n.type)){if(["^chrome://print/$","^chrome://file-manager/","^chrome://feedback/","^chrome://.*\\.top-chrome/$","^chrome://view-cert/$","^devtools://"].some((e=>n.url.match(e))))s=U.FRAME;else{const t=e.ParsedURL.ParsedURL.fromString(n.url);i=t?t.lastPathComponentWithFragment():"#"+ ++Po.lastAnonymousTargetId}}"iframe"===n.type||"webview"===n.type||"background_page"===n.type||"app"===n.type||"popup_page"===n.type||"page"===n.type?s=U.FRAME:"worker"===n.type?s=U.Worker:"worklet"===n.type?s=U.WORKLET:"shared_worker"===n.type?s=U.SHARED_WORKER:"shared_storage_worklet"===n.type?s=U.SHARED_STORAGE_WORKLET:"service_worker"===n.type?s=U.ServiceWorker:"auction_worklet"===n.type&&(s=U.AUCTION_WORKLET);const o=this.#Ld.createTarget(n.targetId,i,s,this.#Ad,t,void 0,void 0,n);this.#Nd.set(t,o),this.#Fd.set(o.id(),o),Po.attachCallback&&await Po.attachCallback({target:o,waitingForDebugger:r}),r&&o.runtimeAgent().invoke_runIfWaitingForDebugger()}detachedFromTarget({sessionId:e}){if(this.#Bd.has(e))this.#Bd.delete(e);else{const t=this.#Nd.get(e);t&&(t.dispose("target terminated"),this.#Nd.delete(e),this.#Fd.delete(t.id()))}}receivedMessageFromTarget({}){}async createParallelConnection(e){const t=await this.getParentTargetId(),{connection:n,sessionId:r}=await this.createParallelConnectionAndSessionForTarget(this.#Ad,t);return n.setOnMessage(e),this.#Bd.set(r,n),{connection:n,sessionId:r}}async createParallelConnectionAndSessionForTarget(e,t){const n=e.targetAgent(),r=e.router(),s=(await n.invoke_attachToTarget({targetId:t,flatten:!0})).sessionId,i=new ko(r.connection(),s);return r.registerSession(e,s,i),i.setOnDisconnect((()=>{r.unregisterSession(s),n.invoke_detachFromTarget({sessionId:s})})),{connection:i,sessionId:s}}targetInfos(){return Array.from(this.#Dd.values())}static lastAnonymousTargetId=0;static attachCallback}var Eo=Object.freeze({__proto__:null,ChildTargetManager:Po});const Lo={couldNotLoadContentForSS:"Could not load content for {PH1} ({PH2})"},Ao=n.i18n.registerUIStrings("core/sdk/CompilerSourceMappingContentProvider.ts",Lo),Oo=n.i18n.getLocalizedString.bind(void 0,Ao);var Do,No=Object.freeze({__proto__:null,CompilerSourceMappingContentProvider:class{#Hd;#Ud;#qd;constructor(e,t,n){this.#Hd=e,this.#Ud=t,this.#qd=n}contentURL(){return this.#Hd}contentType(){return this.#Ud}async requestContent(){const e=await this.requestContentData();return t.ContentData.ContentData.asDeferredContent(e)}async requestContentData(){try{const{content:e}=await nr.instance().loadResource(this.#Hd,this.#qd);return new t.ContentData.ContentData(e,!1,this.#Ud.canonicalMimeType())}catch(e){const t=Oo(Lo.couldNotLoadContentForSS,{PH1:this.#Hd,PH2:e.message});return console.error(t),{error:t}}}async searchInContent(e,n,r){const s=await this.requestContentData();return t.TextUtils.performSearchInContentData(s,e,n,r)}}});!function(e){e.Result="result",e.Command="command",e.System="system",e.QueryObjectResult="queryObjectResult"}(Do||(Do={}));const Fo={profileD:"Profile {PH1}"},Bo=n.i18n.registerUIStrings("core/sdk/CPUProfilerModel.ts",Fo),_o=n.i18n.getLocalizedString.bind(void 0,Bo);class Ho extends h{#zd;#jd;#Vd;#Wd;#Gd;registeredConsoleProfileMessages=[];constructor(e){super(e),this.#zd=1,this.#jd=new Map,this.#Vd=e.profilerAgent(),this.#Wd=null,e.registerProfilerDispatcher(this),this.#Vd.invoke_enable(),this.#Gd=e.model(ms)}runtimeModel(){return this.#Gd.runtimeModel()}debuggerModel(){return this.#Gd}consoleProfileStarted({id:e,location:t,title:n}){n||(n=_o(Fo.profileD,{PH1:this.#zd++}),this.#jd.set(e,n));const r=this.createEventDataFrom(e,t,n);this.dispatchEventToListeners("ConsoleProfileStarted",r)}consoleProfileFinished({id:e,location:t,profile:n,title:r}){r||(r=this.#jd.get(e),this.#jd.delete(e));const s={...this.createEventDataFrom(e,t,r),cpuProfile:n};this.registeredConsoleProfileMessages.push(s),this.dispatchEventToListeners("ConsoleProfileFinished",s)}createEventDataFrom(e,t,n){const r=Is.fromPayload(this.#Gd,t);return{id:this.target().id()+"."+e,scriptLocation:r,title:n||"",cpuProfilerModel:this}}startRecording(){return this.#Vd.invoke_setSamplingInterval({interval:100}),this.#Vd.invoke_start()}stopRecording(){return this.#Vd.invoke_stop().then((e=>e.profile||null))}startPreciseCoverage(e,t){this.#Wd=t;return this.#Vd.invoke_startPreciseCoverage({callCount:!1,detailed:e,allowTriggeredUpdates:!0})}async takePreciseCoverage(){const e=await this.#Vd.invoke_takePreciseCoverage();return{timestamp:e?.timestamp||0,coverage:e?.result||[]}}stopPreciseCoverage(){return this.#Wd=null,this.#Vd.invoke_stopPreciseCoverage()}preciseCoverageDeltaUpdate({timestamp:e,occasion:t,result:n}){this.#Wd&&this.#Wd(e,t,n)}}h.register(Ho,{capabilities:4,autostart:!0});var Uo=Object.freeze({__proto__:null,CPUProfilerModel:Ho});class qo extends h{#Kd;constructor(e){super(e),e.registerLogDispatcher(this),this.#Kd=e.logAgent(),this.#Kd.invoke_enable(),a.InspectorFrontendHost.isUnderTest()||this.#Kd.invoke_startViolationsReport({config:[{name:"longTask",threshold:200},{name:"longLayout",threshold:30},{name:"blockedEvent",threshold:100},{name:"blockedParser",threshold:-1},{name:"handler",threshold:150},{name:"recurringHandler",threshold:50},{name:"discouragedAPIUse",threshold:-1}]})}entryAdded({entry:e}){this.dispatchEventToListeners("EntryAdded",{logModel:this,entry:e})}requestClear(){this.#Kd.invoke_clear()}}h.register(qo,{capabilities:8,autostart:!0});var zo=Object.freeze({__proto__:null,LogModel:qo});const jo={navigatedToS:"Navigated to {PH1}",bfcacheNavigation:"Navigation to {PH1} was restored from back/forward cache (see https://web.dev/bfcache/)",profileSStarted:"Profile ''{PH1}'' started.",profileSFinished:"Profile ''{PH1}'' finished.",failedToSaveToTempVariable:"Failed to save to temp variable."},Vo=n.i18n.registerUIStrings("core/sdk/ConsoleModel.ts",jo),Wo=n.i18n.getLocalizedString.bind(void 0,Vo);class Go extends h{#Qd=[];#$d=new r.MapUtilities.Multimap;#Xd=new Map;#Jd=0;#Yd=0;#Zd=0;#ec=0;#tc=new WeakMap;constructor(t){super(t);const n=t.model(ii);if(!n||n.cachedResourcesLoaded())return void this.initTarget(t);const r=n.addEventListener(ri.CachedResourcesLoaded,(()=>{e.EventTarget.removeEventListeners([r]),this.initTarget(t)}))}initTarget(e){const t=[],n=e.model(Ho);n&&(t.push(n.addEventListener("ConsoleProfileStarted",this.consoleProfileStarted.bind(this,n))),t.push(n.addEventListener("ConsoleProfileFinished",this.consoleProfileFinished.bind(this,n))));const r=e.model(ii);r&&e.parentTarget()?.type()!==U.FRAME&&t.push(r.addEventListener(ri.PrimaryPageChanged,this.primaryPageChanged,this));const s=e.model(Jr);s&&(t.push(s.addEventListener($r.ExceptionThrown,this.exceptionThrown.bind(this,s))),t.push(s.addEventListener($r.ExceptionRevoked,this.exceptionRevoked.bind(this,s))),t.push(s.addEventListener($r.ConsoleAPICalled,this.consoleAPICalled.bind(this,s))),e.parentTarget()?.type()!==U.FRAME&&t.push(s.debuggerModel().addEventListener(ys.GlobalObjectCleared,this.clearIfNecessary,this)),t.push(s.addEventListener($r.QueryObjectRequested,this.queryObjectRequested.bind(this,s)))),this.#tc.set(e,t)}targetRemoved(t){const n=t.model(Jr);n&&this.#Xd.delete(n),e.EventTarget.removeEventListeners(this.#tc.get(t)||[])}async evaluateCommandInConsole(t,n,r,s){const i=await t.evaluate({expression:r,objectGroup:"console",includeCommandLineAPI:s,silent:!1,returnByValue:!1,generatePreview:!0,replMode:!0,allowUnsafeEvalBlockedByCSP:!1},e.Settings.Settings.instance().moduleSetting("console-user-activation-eval").get(),!1);a.userMetrics.actionTaken(a.UserMetrics.Action.ConsoleEvaluated),"error"in i||(await e.Console.Console.instance().showPromise(),this.dispatchEventToListeners(Ko.CommandEvaluated,{result:i.object,commandMessage:n,exceptionDetails:i.exceptionDetails}))}addCommandMessage(e,t){const n=new $o(e.runtimeModel,"javascript",null,t,{type:Do.Command});return n.setExecutionContextId(e.id),this.addMessage(n),n}addMessage(t){t.setPageLoadSequenceNumber(this.#ec),t.source===e.Console.FrontendMessageSource.ConsoleAPI&&"clear"===t.type&&this.clearIfNecessary(),this.#Qd.push(t),this.#$d.set(t.timestamp,t);const n=t.runtimeModel(),r=t.getExceptionId();if(r&&n){let e=this.#Xd.get(n);e||(e=new Map,this.#Xd.set(n,e)),e.set(r,t)}this.incrementErrorWarningCount(t),this.dispatchEventToListeners(Ko.MessageAdded,t)}exceptionThrown(e,t){const n=t.data,r=function(e){if(!e)return;return{requestId:e.requestId||void 0,issueId:e.issueId||void 0}}(n.details.exceptionMetaData),s=$o.fromException(e,n.details,void 0,n.timestamp,void 0,r);s.setExceptionId(n.details.exceptionId),this.addMessage(s)}exceptionRevoked(e,t){const n=t.data,r=this.#Xd.get(e),s=r?r.get(n):null;s&&(this.#Yd--,s.level="verbose",this.dispatchEventToListeners(Ko.MessageUpdated,s))}consoleAPICalled(t,n){const r=n.data;let s="info";"debug"===r.type?s="verbose":"error"===r.type||"assert"===r.type?s="error":"warning"===r.type?s="warning":"info"!==r.type&&"log"!==r.type||(s="info");let i="";r.args.length&&r.args[0].unserializableValue?i=r.args[0].unserializableValue:r.args.length&&("object"!=typeof r.args[0].value&&void 0!==r.args[0].value||null===r.args[0].value)?i=String(r.args[0].value):r.args.length&&r.args[0].description&&(i=r.args[0].description);const o=r.stackTrace?.callFrames.length?r.stackTrace.callFrames[0]:null,a={type:r.type,url:o?.url,line:o?.lineNumber,column:o?.columnNumber,parameters:r.args,stackTrace:r.stackTrace,timestamp:r.timestamp,executionContextId:r.executionContextId,context:r.context},l=new $o(t,e.Console.FrontendMessageSource.ConsoleAPI,s,i,a);for(const e of this.#$d.get(l.timestamp).values())if(l.isEqual(e))return;this.addMessage(l)}queryObjectRequested(t,n){const{objects:r,executionContextId:s}=n.data,i={type:Do.QueryObjectResult,parameters:[r],executionContextId:s},o=new $o(t,e.Console.FrontendMessageSource.ConsoleAPI,"info","",i);this.addMessage(o)}clearIfNecessary(){e.Settings.Settings.instance().moduleSetting("preserve-console-log").get()||this.clear(),++this.#ec}primaryPageChanged(t){if(e.Settings.Settings.instance().moduleSetting("preserve-console-log").get()){const{frame:n}=t.data;n.backForwardCacheDetails.restoredFromCache?e.Console.Console.instance().log(Wo(jo.bfcacheNavigation,{PH1:n.url})):e.Console.Console.instance().log(Wo(jo.navigatedToS,{PH1:n.url}))}}consoleProfileStarted(e,t){const{data:n}=t;this.addConsoleProfileMessage(e,"profile",n.scriptLocation,Wo(jo.profileSStarted,{PH1:n.title}))}consoleProfileFinished(e,t){const{data:n}=t;this.addConsoleProfileMessage(e,"profileEnd",n.scriptLocation,Wo(jo.profileSFinished,{PH1:n.title}))}addConsoleProfileMessage(t,n,r,s){const i=r.script(),o=[{functionName:"",scriptId:r.scriptId,url:i?i.contentURL():"",lineNumber:r.lineNumber,columnNumber:r.columnNumber||0}];this.addMessage(new $o(t.runtimeModel(),e.Console.FrontendMessageSource.ConsoleAPI,"info",s,{type:n,stackTrace:{callFrames:o}}))}incrementErrorWarningCount(e){if("violation"!==e.source)switch(e.level){case"warning":this.#Jd++;break;case"error":this.#Yd++}else this.#Zd++}messages(){return this.#Qd}static allMessagesUnordered(){const e=[];for(const t of W.instance().targets()){const n=t.model(Go)?.messages()||[];e.push(...n)}return e}static requestClearMessages(){for(const e of W.instance().models(qo))e.requestClear();for(const e of W.instance().models(Jr))e.discardConsoleEntries(),e.releaseObjectGroup("live-expression");for(const e of W.instance().targets())e.model(Go)?.clear()}clear(){this.#Qd=[],this.#$d.clear(),this.#Xd.clear(),this.#Yd=0,this.#Jd=0,this.#Zd=0,this.dispatchEventToListeners(Ko.ConsoleCleared)}errors(){return this.#Yd}static allErrors(){let e=0;for(const t of W.instance().targets())e+=t.model(Go)?.errors()||0;return e}warnings(){return this.#Jd}static allWarnings(){let e=0;for(const t of W.instance().targets())e+=t.model(Go)?.warnings()||0;return e}violations(){return this.#Zd}async saveToTempVariable(t,n){if(!n||!t)return void a(null);const r=t,s=await r.globalObject("",!1);if("error"in s||Boolean(s.exceptionDetails)||!s.object)return void a("object"in s&&s.object||null);const i=s.object,o=await i.callFunction((function(e){const t="temp";let n=1;for(;t+n in this;)++n;const r=t+n;return this[r]=e,r}),[Bn.toCallArgument(n)]);if(i.release(),o.wasThrown||!o.object||"string"!==o.object.type)a(o.object||null);else{const e=o.object.value,t=this.addCommandMessage(r,e);this.evaluateCommandInConsole(r,t,e,!1)}function a(t){let n=Wo(jo.failedToSaveToTempVariable);t&&(n=n+" "+t.description),e.Console.Console.instance().error(n)}o.object&&o.object.release()}}var Ko;function Qo(e,t){if(!e!=!t)return!1;if(!e||!t)return!0;const n=e.callFrames,r=t.callFrames;if(n.length!==r.length)return!1;for(let e=0,t=n.length;et.includes(e)));if(-1===n||n===e.length-1)return{callFrame:null,type:null};const r=e[n].url===xs?"LOGPOINT":"CONDITIONAL_BREAKPOINT";return{callFrame:e[n+1],type:r}}}h.register(Go,{capabilities:4,autostart:!0});const Xo=new Map([["xml","xml"],["javascript","javascript"],["network","network"],[e.Console.FrontendMessageSource.ConsoleAPI,"console-api"],["storage","storage"],["appcache","appcache"],["rendering","rendering"],[e.Console.FrontendMessageSource.CSS,"css"],["security","security"],["deprecation","deprecation"],["worker","worker"],["violation","violation"],["intervention","intervention"],["recommendation","recommendation"],["other","other"],[e.Console.FrontendMessageSource.ISSUE_PANEL,"issue-panel"]]);var Jo=Object.freeze({__proto__:null,ConsoleMessage:$o,ConsoleModel:Go,get Events(){return Ko},get FrontendMessageType(){return Do},MessageSourceDisplayName:Xo});class Yo extends h{#lc;#dc;#lt;#cc;#hc;#uc;#gc;#pc;#mc;#fc;#bc;constructor(t){super(t),this.#lc=t.emulationAgent(),this.#dc=t.deviceOrientationAgent(),this.#lt=t.model(Br),this.#cc=t.model(Fs),this.#cc&&this.#cc.addEventListener("InspectModeWillBeToggled",(()=>{this.updateTouch()}),this);const n=e.Settings.Settings.instance().moduleSetting("java-script-disabled");n.addChangeListener((async()=>await this.#lc.invoke_setScriptExecutionDisabled({value:n.get()}))),n.get()&&this.#lc.invoke_setScriptExecutionDisabled({value:!0});const r=e.Settings.Settings.instance().moduleSetting("emulation.touch");r.addChangeListener((()=>{const e=r.get();this.overrideEmulateTouch("force"===e)}));const s=e.Settings.Settings.instance().moduleSetting("emulation.idle-detection");s.addChangeListener((async()=>{const e=s.get();if("none"===e)return void await this.clearIdleOverride();const t=JSON.parse(e);await this.setIdleOverride(t)}));const i=e.Settings.Settings.instance().moduleSetting("emulation.cpu-pressure");i.addChangeListener((async()=>{const e=i.get();if("none"===e)return await this.setPressureSourceOverrideEnabled(!1),void(this.#uc=!1);this.#uc||(this.#uc=!0,await this.setPressureSourceOverrideEnabled(!0)),await this.setPressureStateOverride(e)}));const o=e.Settings.Settings.instance().moduleSetting("emulated-css-media"),a=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-color-gamut"),l=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-prefers-color-scheme"),d=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-forced-colors"),c=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-prefers-contrast"),h=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-prefers-reduced-data"),u=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-prefers-reduced-transparency"),g=e.Settings.Settings.instance().moduleSetting("emulated-css-media-feature-prefers-reduced-motion");this.#hc=new Map([["type",o.get()],["color-gamut",a.get()],["prefers-color-scheme",l.get()],["forced-colors",d.get()],["prefers-contrast",c.get()],["prefers-reduced-data",h.get()],["prefers-reduced-motion",g.get()],["prefers-reduced-transparency",u.get()]]),o.addChangeListener((()=>{this.#hc.set("type",o.get()),this.updateCssMedia()})),a.addChangeListener((()=>{this.#hc.set("color-gamut",a.get()),this.updateCssMedia()})),l.addChangeListener((()=>{this.#hc.set("prefers-color-scheme",l.get()),this.updateCssMedia()})),d.addChangeListener((()=>{this.#hc.set("forced-colors",d.get()),this.updateCssMedia()})),c.addChangeListener((()=>{this.#hc.set("prefers-contrast",c.get()),this.updateCssMedia()})),h.addChangeListener((()=>{this.#hc.set("prefers-reduced-data",h.get()),this.updateCssMedia()})),g.addChangeListener((()=>{this.#hc.set("prefers-reduced-motion",g.get()),this.updateCssMedia()})),u.addChangeListener((()=>{this.#hc.set("prefers-reduced-transparency",u.get()),this.updateCssMedia()})),this.updateCssMedia();const p=e.Settings.Settings.instance().moduleSetting("emulate-auto-dark-mode");p.addChangeListener((()=>{const e=p.get();l.setDisabled(e),l.set(e?"dark":""),this.emulateAutoDarkMode(e)})),p.get()&&(l.setDisabled(!0),l.set("dark"),this.emulateAutoDarkMode(!0));const m=e.Settings.Settings.instance().moduleSetting("emulated-vision-deficiency");m.addChangeListener((()=>this.emulateVisionDeficiency(m.get()))),m.get()&&this.emulateVisionDeficiency(m.get());const f=e.Settings.Settings.instance().moduleSetting("local-fonts-disabled");f.addChangeListener((()=>this.setLocalFontsDisabled(f.get()))),f.get()&&this.setLocalFontsDisabled(f.get());const b=e.Settings.Settings.instance().moduleSetting("avif-format-disabled"),y=e.Settings.Settings.instance().moduleSetting("webp-format-disabled"),v=()=>{const e=[];b.get()&&e.push("avif"),y.get()&&e.push("webp"),this.setDisabledImageTypes(e)};b.addChangeListener(v),y.addChangeListener(v),(b.get()||y.get())&&v(),this.#uc=!1,this.#mc=!0,this.#gc=!1,this.#pc=!1,this.#fc=!1,this.#bc={enabled:!1,configuration:"mobile"}}setTouchEmulationAllowed(e){this.#mc=e}supportsDeviceEmulation(){return this.target().hasAllCapabilities(4096)}async resetPageScaleFactor(){await this.#lc.invoke_resetPageScaleFactor()}async emulateDevice(e){e?await this.#lc.invoke_setDeviceMetricsOverride(e):await this.#lc.invoke_clearDeviceMetricsOverride()}overlayModel(){return this.#cc}async setPressureSourceOverrideEnabled(e){await this.#lc.invoke_setPressureSourceOverrideEnabled({source:"cpu",enabled:e})}async setPressureStateOverride(e){await this.#lc.invoke_setPressureStateOverride({source:"cpu",state:e})}async emulateLocation(e){if(e)if(e.unavailable)await Promise.all([this.#lc.invoke_setGeolocationOverride({}),this.#lc.invoke_setTimezoneOverride({timezoneId:""}),this.#lc.invoke_setLocaleOverride({locale:""}),this.#lc.invoke_setUserAgentOverride({userAgent:ce.instance().currentUserAgent()})]);else{function t(e,t){const n=t.getError();return n?Promise.reject({type:e,message:n}):Promise.resolve()}await Promise.all([this.#lc.invoke_setGeolocationOverride({latitude:e.latitude,longitude:e.longitude,accuracy:Zo.defaultGeoMockAccuracy}).then((e=>t("emulation-set-location",e))),this.#lc.invoke_setTimezoneOverride({timezoneId:e.timezoneId}).then((e=>t("emulation-set-timezone",e))),this.#lc.invoke_setLocaleOverride({locale:e.locale}).then((e=>t("emulation-set-locale",e))),this.#lc.invoke_setUserAgentOverride({userAgent:ce.instance().currentUserAgent(),acceptLanguage:e.locale}).then((e=>t("emulation-set-user-agent",e)))])}else await Promise.all([this.#lc.invoke_clearGeolocationOverride(),this.#lc.invoke_setTimezoneOverride({timezoneId:""}),this.#lc.invoke_setLocaleOverride({locale:""}),this.#lc.invoke_setUserAgentOverride({userAgent:ce.instance().currentUserAgent()})])}async emulateDeviceOrientation(e){e?await this.#dc.invoke_setDeviceOrientationOverride({alpha:e.alpha,beta:e.beta,gamma:e.gamma}):await this.#dc.invoke_clearDeviceOrientationOverride()}async setIdleOverride(e){await this.#lc.invoke_setIdleOverride(e)}async clearIdleOverride(){await this.#lc.invoke_clearIdleOverride()}async emulateCSSMedia(e,t){await this.#lc.invoke_setEmulatedMedia({media:e,features:t}),this.#lt&&this.#lt.mediaQueryResultChanged()}async emulateAutoDarkMode(e){e&&(this.#hc.set("prefers-color-scheme","dark"),await this.updateCssMedia()),await this.#lc.invoke_setAutoDarkModeOverride({enabled:e||void 0})}async emulateVisionDeficiency(e){await this.#lc.invoke_setEmulatedVisionDeficiency({type:e})}setLocalFontsDisabled(e){this.#lt&&this.#lt.setLocalFontsEnabled(!e)}setDisabledImageTypes(e){this.#lc.invoke_setDisabledImageTypes({imageTypes:e})}async setCPUThrottlingRate(e){await this.#lc.invoke_setCPUThrottlingRate({rate:e})}async setHardwareConcurrency(e){if(e<1)throw new Error("hardwareConcurrency must be a positive value");await this.#lc.invoke_setHardwareConcurrencyOverride({hardwareConcurrency:e})}async emulateTouch(e,t){this.#gc=e&&this.#mc,this.#pc=t&&this.#mc,await this.updateTouch()}async overrideEmulateTouch(e){this.#fc=e&&this.#mc,await this.updateTouch()}async updateTouch(){let e={enabled:this.#gc,configuration:this.#pc?"mobile":"desktop"};this.#fc&&(e={enabled:!0,configuration:"mobile"}),this.#cc&&this.#cc.inspectModeEnabled()&&(e={enabled:!1,configuration:"mobile"}),(this.#bc.enabled||e.enabled)&&(this.#bc.enabled&&e.enabled&&this.#bc.configuration===e.configuration||(this.#bc=e,await this.#lc.invoke_setTouchEmulationEnabled({enabled:e.enabled,maxTouchPoints:1}),await this.#lc.invoke_setEmitTouchEventsForMouse({enabled:e.enabled,configuration:e.configuration})))}async updateCssMedia(){const e=this.#hc.get("type")??"",t=[{name:"color-gamut",value:this.#hc.get("color-gamut")??""},{name:"prefers-color-scheme",value:this.#hc.get("prefers-color-scheme")??""},{name:"forced-colors",value:this.#hc.get("forced-colors")??""},{name:"prefers-contrast",value:this.#hc.get("prefers-contrast")??""},{name:"prefers-reduced-data",value:this.#hc.get("prefers-reduced-data")??""},{name:"prefers-reduced-motion",value:this.#hc.get("prefers-reduced-motion")??""},{name:"prefers-reduced-transparency",value:this.#hc.get("prefers-reduced-transparency")??""}];return await this.emulateCSSMedia(e,t)}}class Zo{latitude;longitude;timezoneId;locale;unavailable;constructor(e,t,n,r,s){this.latitude=e,this.longitude=t,this.timezoneId=n,this.locale=r,this.unavailable=s}static parseSetting(e){if(e){const[t,n,r,s]=e.split(":"),[i,o]=t.split("@");return new Zo(parseFloat(i),parseFloat(o),n,r,Boolean(s))}return new Zo(0,0,"","",!1)}static parseUserInput(e,t,n,r){if(!e&&!t)return null;const{valid:s}=Zo.latitudeValidator(e),{valid:i}=Zo.longitudeValidator(t);if(!s&&!i)return null;const o=s?parseFloat(e):-1,a=i?parseFloat(t):-1;return new Zo(o,a,n,r,!1)}static latitudeValidator(e){const t=parseFloat(e);return{valid:/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(e)&&t>=-90&&t<=90,errorMessage:void 0}}static longitudeValidator(e){const t=parseFloat(e);return{valid:/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(e)&&t>=-180&&t<=180,errorMessage:void 0}}static timezoneIdValidator(e){return{valid:""===e||/[a-zA-Z]/.test(e),errorMessage:void 0}}static localeValidator(e){return{valid:""===e||/[a-zA-Z]{2}/.test(e),errorMessage:void 0}}toSetting(){return`${this.latitude}@${this.longitude}:${this.timezoneId}:${this.locale}:${this.unavailable||""}`}static defaultGeoMockAccuracy=150}class ea{alpha;beta;gamma;constructor(e,t,n){this.alpha=e,this.beta=t,this.gamma=n}static parseSetting(e){if(e){const t=JSON.parse(e);return new ea(t.alpha,t.beta,t.gamma)}return new ea(0,0,0)}static parseUserInput(e,t,n){if(!e&&!t&&!n)return null;const{valid:r}=ea.alphaAngleValidator(e),{valid:s}=ea.betaAngleValidator(t),{valid:i}=ea.gammaAngleValidator(n);if(!r&&!s&&!i)return null;const o=r?parseFloat(e):-1,a=s?parseFloat(t):-1,l=i?parseFloat(n):-1;return new ea(o,a,l)}static angleRangeValidator(e,t){const n=parseFloat(e);return{valid:/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(e)&&n>=t.minimum&&n{this.#wc=n=>{e(n),t(n)}})):await new Promise((e=>{this.#wc=e}));const n=await e.runtimeAgent().invoke_evaluate({expression:"navigator.hardwareConcurrency",returnByValue:!0,silent:!0,throwOnSideEffect:!0}),r=n.getError();if(r)throw new Error(r);const{result:s,exceptionDetails:i}=n;if(i)throw new Error(i.text);return s.value}modelAdded(e){if(this.#yc!==ca&&e.setCPUThrottlingRate(this.#yc.rate()),void 0!==this.#Ic&&e.setHardwareConcurrency(this.#Ic),this.#wc){const e=this.#wc;this.#wc=void 0,this.getHardwareConcurrency().then(e)}}modelRemoved(e){}}var la;function da(e){return{title:1===e?ia(na.noThrottling):ia(na.dSlowdown,{PH1:e}),rate:()=>e,jslogContext:1===e?"cpu-no-throttling":`cpu-throttled-${e}`}}!function(e){e[e.NO_THROTTLING=1]="NO_THROTTLING",e[e.MID_TIER_MOBILE=4]="MID_TIER_MOBILE",e[e.LOW_TIER_MOBILE=6]="LOW_TIER_MOBILE",e[e.EXTRA_SLOW=20]="EXTRA_SLOW",e[e.MidTierMobile=4]="MidTierMobile",e[e.LowEndMobile=6]="LowEndMobile"}(la||(la={}));const ca=da(la.NO_THROTTLING),ha=da(la.MID_TIER_MOBILE),ua=da(la.LOW_TIER_MOBILE),ga=da(la.EXTRA_SLOW);function pa(t){const n=()=>{const n=e.Settings.Settings.instance().createSetting("calibrated-cpu-throttling",{},"Global").get();return"low-tier-mobile"===t?n.low??null:"mid-tier-mobile"===t?n.mid??null:null};return{title(){const e=sa("low-tier-mobile"===t?na.calibratedLowTierMobile:na.calibratedMidTierMobile),r=n();return"number"==typeof r?`${e} – ${r.toFixed(1)}×`:e},rate(){const e=n();return"number"==typeof e?e:0},calibratedDeviceType:t,jslogContext:`cpu-throttled-calibrated-${t}`}}const ma=pa("low-tier-mobile"),fa=pa("mid-tier-mobile");var ba;!function(e){e.DEVICE_TOO_WEAK="DEVICE_TOO_WEAK"}(ba||(ba={}));var ya=Object.freeze({__proto__:null,CPUThrottlingManager:aa,get CPUThrottlingRates(){return la},CalibratedLowTierMobileThrottlingOption:ma,CalibratedMidTierMobileThrottlingOption:fa,get CalibrationError(){return ba},ExtraSlowThrottlingOption:ga,LowTierThrottlingOption:ua,MidTierThrottlingOption:ha,NoThrottlingOption:ca,calibrationErrorToString:function(e){return e===ba.DEVICE_TOO_WEAK?sa(na.calibrationErrorDeviceTooWeak):e},throttlingManager:function(){return aa.instance()}});class va extends h{agent;#Ir;#er;#kc;#Cc;suspended=!1;constructor(t){super(t),this.agent=t.domdebuggerAgent(),this.#Ir=t.model(Jr),this.#er=t.model(Gs),this.#er.addEventListener(Us.DocumentUpdated,this.documentUpdated,this),this.#er.addEventListener(Us.NodeRemoved,this.nodeRemoved,this),this.#kc=[],this.#Cc=e.Settings.Settings.instance().createLocalSetting("dom-breakpoints",[]),this.#er.existingDocument()&&this.documentUpdated()}runtimeModel(){return this.#Ir}async suspendModel(){this.suspended=!0}async resumeModel(){this.suspended=!1}async eventListeners(e){if(console.assert(e.runtimeModel()===this.#Ir),!e.objectId)return[];const t=await this.agent.invoke_getEventListeners({objectId:e.objectId}),n=[];for(const r of t.listeners||[]){const t=this.#Ir.debuggerModel().createRawLocationByScriptId(r.scriptId,r.lineNumber,r.columnNumber);t&&n.push(new Sa(this,e,r.type,r.useCapture,r.passive,r.once,r.handler?this.#Ir.createRemoteObject(r.handler):null,r.originalHandler?this.#Ir.createRemoteObject(r.originalHandler):null,t,null))}return n}retrieveDOMBreakpoints(){this.#er.requestDocument()}domBreakpoints(){return this.#kc.slice()}hasDOMBreakpoint(e,t){return this.#kc.some((n=>n.node===e&&n.type===t))}setDOMBreakpoint(e,t){for(const n of this.#kc)if(n.node===e&&n.type===t)return this.toggleDOMBreakpoint(n,!0),n;const n=new wa(this,e,t,!0);return this.#kc.push(n),this.saveDOMBreakpoints(),this.enableDOMBreakpoint(n),this.dispatchEventToListeners("DOMBreakpointAdded",n),n}removeDOMBreakpoint(e,t){this.removeDOMBreakpoints((n=>n.node===e&&n.type===t))}removeAllDOMBreakpoints(){this.removeDOMBreakpoints((e=>!0))}toggleDOMBreakpoint(e,t){t!==e.enabled&&(e.enabled=t,t?this.enableDOMBreakpoint(e):this.disableDOMBreakpoint(e),this.dispatchEventToListeners("DOMBreakpointToggled",e))}enableDOMBreakpoint(e){e.node.id&&(this.agent.invoke_setDOMBreakpoint({nodeId:e.node.id,type:e.type}),e.node.setMarker(Ia,!0))}disableDOMBreakpoint(e){e.node.id&&(this.agent.invoke_removeDOMBreakpoint({nodeId:e.node.id,type:e.type}),e.node.setMarker(Ia,!!this.nodeHasBreakpoints(e.node)||null))}nodeHasBreakpoints(e){for(const t of this.#kc)if(t.node===e&&t.enabled)return!0;return!1}resolveDOMBreakpointData(e){const t=e.type,n=this.#er.nodeForId(e.nodeId);if(!t||!n)return null;let r=null,s=!1;return"subtree-modified"===t&&(s=e.insertion||!1,r=this.#er.nodeForId(e.targetNodeId)),{type:t,node:n,targetNode:r,insertion:s}}currentURL(){const e=this.#er.existingDocument();return e?e.documentURL:r.DevToolsPath.EmptyUrlString}async documentUpdated(){if(this.suspended)return;const e=this.#kc;this.#kc=[],this.dispatchEventToListeners("DOMBreakpointsRemoved",e);const t=await this.#er.requestDocument(),n=t?t.documentURL:r.DevToolsPath.EmptyUrlString;for(const e of this.#Cc.get())e.url===n&&this.#er.pushNodeByPathToFrontend(e.path).then(s.bind(this,e));function s(e,t){const n=t?this.#er.nodeForId(t):null;if(!n)return;const r=new wa(this,n,e.type,e.enabled);this.#kc.push(r),e.enabled&&this.enableDOMBreakpoint(r),this.dispatchEventToListeners("DOMBreakpointAdded",r)}}removeDOMBreakpoints(e){const t=[],n=[];for(const r of this.#kc)e(r)?(t.push(r),r.enabled&&(r.enabled=!1,this.disableDOMBreakpoint(r))):n.push(r);t.length&&(this.#kc=n,this.saveDOMBreakpoints(),this.dispatchEventToListeners("DOMBreakpointsRemoved",t))}nodeRemoved(e){if(this.suspended)return;const{node:t}=e.data,n=t.children()||[];this.removeDOMBreakpoints((e=>e.node===t||-1!==n.indexOf(e.node)))}saveDOMBreakpoints(){const e=this.currentURL(),t=this.#Cc.get().filter((t=>t.url!==e));for(const n of this.#kc)t.push({url:e,path:n.node.path(),type:n.type,enabled:n.enabled});this.#Cc.set(t)}}const Ia="breakpoint-marker";class wa{domDebuggerModel;node;type;enabled;constructor(e,t,n,r){this.domDebuggerModel=e,this.node=t,this.type=n,this.enabled=r}}class Sa{#xc;#Rc;#g;#Tc;#Mc;#Pc;#Ec;#Lc;#Jr;#Ac;#Oc;#Dc;constructor(e,t,n,s,i,o,a,l,d,c,h){this.#xc=e,this.#Rc=t,this.#g=n,this.#Tc=s,this.#Mc=i,this.#Pc=o,this.#Ec=a,this.#Lc=l||a,this.#Jr=d;const u=d.script();this.#Ac=u?u.contentURL():r.DevToolsPath.EmptyUrlString,this.#Oc=c,this.#Dc=h||"Raw"}domDebuggerModel(){return this.#xc}type(){return this.#g}useCapture(){return this.#Tc}passive(){return this.#Mc}once(){return this.#Pc}handler(){return this.#Ec}location(){return this.#Jr}sourceURL(){return this.#Ac}originalHandler(){return this.#Lc}canRemove(){return Boolean(this.#Oc)||"FrameworkUser"!==this.#Dc}remove(){if(!this.canRemove())return Promise.resolve(void 0);if("FrameworkUser"!==this.#Dc){function e(e,t,n){this.removeEventListener(e,t,n),this["on"+e]&&(this["on"+e]=void 0)}return this.#Rc.callFunction(e,[Bn.toCallArgument(this.#g),Bn.toCallArgument(this.#Lc),Bn.toCallArgument(this.#Tc)]).then((()=>{}))}if(this.#Oc){function t(e,t,n,r){this.call(null,e,t,n,r)}return this.#Oc.callFunction(t,[Bn.toCallArgument(this.#g),Bn.toCallArgument(this.#Lc),Bn.toCallArgument(this.#Tc),Bn.toCallArgument(this.#Mc)]).then((()=>{}))}return Promise.resolve(void 0)}canTogglePassive(){return"FrameworkUser"!==this.#Dc}togglePassive(){return this.#Rc.callFunction((function(e,t,n,r){this.removeEventListener(e,t,{capture:n}),this.addEventListener(e,t,{capture:n,passive:!r})}),[Bn.toCallArgument(this.#g),Bn.toCallArgument(this.#Lc),Bn.toCallArgument(this.#Tc),Bn.toCallArgument(this.#Mc)]).then((()=>{}))}origin(){return this.#Dc}markAsFramework(){this.#Dc="Framework"}isScrollBlockingType(){return"touchstart"===this.#g||"touchmove"===this.#g||"mousewheel"===this.#g||"wheel"===this.#g}}class ka extends ro{#g;constructor(e,t){super(e,t),this.#g=t}type(){return this.#g}}class Ca extends ro{eventTargetNames;constructor(e,t,n){super(n,e),this.eventTargetNames=t}setEnabled(e){if(this.enabled()!==e){super.setEnabled(e);for(const e of W.instance().models(va))this.updateOnModel(e)}}updateOnModel(e){for(const t of this.eventTargetNames)this.enabled()?e.agent.invoke_setEventListenerBreakpoint({eventName:this.name,targetName:t}):e.agent.invoke_removeEventListenerBreakpoint({eventName:this.name,targetName:t})}static listener="listener:"}let xa;class Ra{#Nc;#Fc=new Map;#Bc=[];#_c=[];constructor(){this.#Nc=e.Settings.Settings.instance().createLocalSetting("xhr-breakpoints",[]);for(const e of this.#Nc.get())this.#Fc.set(e.url,e.enabled);this.#Bc.push(new ka("trusted-type-violation","trustedtype-sink-violation")),this.#Bc.push(new ka("trusted-type-violation","trustedtype-policy-violation")),this.createEventListenerBreakpoints("media",["play","pause","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange","loadstart","progress","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","waiting"],["audio","video"]),this.createEventListenerBreakpoints("picture-in-picture",["enterpictureinpicture","leavepictureinpicture"],["video"]),this.createEventListenerBreakpoints("picture-in-picture",["resize"],["PictureInPictureWindow"]),this.createEventListenerBreakpoints("picture-in-picture",["enter"],["documentPictureInPicture"]),this.createEventListenerBreakpoints("clipboard",["copy","cut","paste","beforecopy","beforecut","beforepaste"],["*"]),this.createEventListenerBreakpoints("control",["resize","scroll","scrollend","scrollsnapchange","scrollsnapchanging","zoom","focus","blur","select","change","submit","reset"],["*"]),this.createEventListenerBreakpoints("device",["deviceorientation","devicemotion"],["*"]),this.createEventListenerBreakpoints("dom-mutation",["DOMActivate","DOMFocusIn","DOMFocusOut","DOMAttrModified","DOMCharacterDataModified","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","DOMContentLoaded"],["*"]),this.createEventListenerBreakpoints("drag-drop",["drag","dragstart","dragend","dragenter","dragover","dragleave","drop"],["*"]),this.createEventListenerBreakpoints("keyboard",["keydown","keyup","keypress","input"],["*"]),this.createEventListenerBreakpoints("load",["load","beforeunload","unload","abort","error","hashchange","popstate","navigate","navigatesuccess","navigateerror","currentchange","navigateto","navigatefrom","finish","dispose"],["*"]),this.createEventListenerBreakpoints("mouse",["auxclick","click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout","mouseenter","mouseleave","mousewheel","wheel","contextmenu"],["*"]),this.createEventListenerBreakpoints("pointer",["pointerover","pointerout","pointerenter","pointerleave","pointerdown","pointerup","pointermove","pointercancel","gotpointercapture","lostpointercapture","pointerrawupdate"],["*"]),this.createEventListenerBreakpoints("touch",["touchstart","touchmove","touchend","touchcancel"],["*"]),this.createEventListenerBreakpoints("worker",["message","messageerror"],["*"]),this.createEventListenerBreakpoints("xhr",["readystatechange","load","loadstart","loadend","abort","error","progress","timeout"],["xmlhttprequest","xmlhttprequestupload"]),W.instance().observeModels(va,this)}static instance(e={forceNew:null}){const{forceNew:t}=e;return xa&&!t||(xa=new Ra),xa}cspViolationBreakpoints(){return this.#Bc.slice()}createEventListenerBreakpoints(e,t,n){for(const r of t)this.#_c.push(new Ca(r,n,e))}resolveEventListenerBreakpoint({eventName:e,targetName:t}){const n="listener:";if(!e.startsWith(n))return null;e=e.substring(9),t=(t||"*").toLowerCase();let r=null;for(const n of this.#_c)e&&n.name===e&&-1!==n.eventTargetNames.indexOf(t)&&(r=n),!r&&e&&n.name===e&&-1!==n.eventTargetNames.indexOf("*")&&(r=n);return r}eventListenerBreakpoints(){return this.#_c.slice()}updateCSPViolationBreakpoints(){const e=this.#Bc.filter((e=>e.enabled())).map((e=>e.type()));for(const t of W.instance().models(va))this.updateCSPViolationBreakpointsForModel(t,e)}updateCSPViolationBreakpointsForModel(e,t){e.agent.invoke_setBreakOnCSPViolation({violationTypes:t})}xhrBreakpoints(){return this.#Fc}saveXHRBreakpoints(){const e=[];for(const t of this.#Fc.keys())e.push({url:t,enabled:this.#Fc.get(t)||!1});this.#Nc.set(e)}addXHRBreakpoint(e,t){if(this.#Fc.set(e,t),t)for(const t of W.instance().models(va))t.agent.invoke_setXHRBreakpoint({url:e});this.saveXHRBreakpoints()}removeXHRBreakpoint(e){const t=this.#Fc.get(e);if(this.#Fc.delete(e),t)for(const t of W.instance().models(va))t.agent.invoke_removeXHRBreakpoint({url:e});this.saveXHRBreakpoints()}toggleXHRBreakpoint(e,t){this.#Fc.set(e,t);for(const n of W.instance().models(va))t?n.agent.invoke_setXHRBreakpoint({url:e}):n.agent.invoke_removeXHRBreakpoint({url:e});this.saveXHRBreakpoints()}modelAdded(e){for(const t of this.#Fc.keys())this.#Fc.get(t)&&e.agent.invoke_setXHRBreakpoint({url:t});for(const t of this.#_c)t.enabled()&&t.updateOnModel(e);const t=this.#Bc.filter((e=>e.enabled())).map((e=>e.type()));this.updateCSPViolationBreakpointsForModel(e,t)}modelRemoved(e){}}h.register(va,{capabilities:2,autostart:!1});var Ta=Object.freeze({__proto__:null,CSPViolationBreakpoint:ka,DOMBreakpoint:wa,DOMDebuggerManager:Ra,DOMDebuggerModel:va,DOMEventListenerBreakpoint:Ca,EventListener:Sa});class Ma extends h{agent;constructor(e){super(e),this.agent=e.eventBreakpointsAgent()}}class Pa extends ro{setEnabled(e){if(this.enabled()!==e){super.setEnabled(e);for(const e of W.instance().models(Ma))this.updateOnModel(e)}}updateOnModel(e){this.enabled()?e.agent.invoke_setInstrumentationBreakpoint({eventName:this.name}):e.agent.invoke_removeInstrumentationBreakpoint({eventName:this.name})}static instrumentationPrefix="instrumentation:"}let Ea;class La{#_c=[];constructor(){this.createInstrumentationBreakpoints("auction-worklet",["beforeBidderWorkletBiddingStart","beforeBidderWorkletReportingStart","beforeSellerWorkletScoringStart","beforeSellerWorkletReportingStart"]),this.createInstrumentationBreakpoints("animation",["requestAnimationFrame","cancelAnimationFrame","requestAnimationFrame.callback"]),this.createInstrumentationBreakpoints("canvas",["canvasContextCreated","webglErrorFired","webglWarningFired"]),this.createInstrumentationBreakpoints("geolocation",["Geolocation.getCurrentPosition","Geolocation.watchPosition"]),this.createInstrumentationBreakpoints("notification",["Notification.requestPermission"]),this.createInstrumentationBreakpoints("parse",["Element.setInnerHTML","Document.write"]),this.createInstrumentationBreakpoints("script",["scriptFirstStatement","scriptBlockedByCSP"]),this.createInstrumentationBreakpoints("shared-storage-worklet",["sharedStorageWorkletScriptFirstStatement"]),this.createInstrumentationBreakpoints("timer",["setTimeout","clearTimeout","setTimeout.callback","setInterval","clearInterval","setInterval.callback"]),this.createInstrumentationBreakpoints("window",["DOMWindow.close"]),this.createInstrumentationBreakpoints("web-audio",["audioContextCreated","audioContextClosed","audioContextResumed","audioContextSuspended"]),W.instance().observeModels(Ma,this)}static instance(e={forceNew:null}){const{forceNew:t}=e;return Ea&&!t||(Ea=new La),Ea}createInstrumentationBreakpoints(e,t){for(const n of t)this.#_c.push(new Pa(e,n))}eventListenerBreakpoints(){return this.#_c.slice()}resolveEventListenerBreakpoint({eventName:e}){if(!e.startsWith(Pa.instrumentationPrefix))return null;const t=e.substring(Pa.instrumentationPrefix.length);return this.#_c.find((e=>e.name===t))||null}modelAdded(e){for(const t of this.#_c)t.enabled()&&t.updateOnModel(e)}modelRemoved(e){}}h.register(Ma,{capabilities:524288,autostart:!1});var Aa=Object.freeze({__proto__:null,EventBreakpointsManager:La,EventBreakpointsModel:Ma}),Oa=Object.freeze({__proto__:null});let Da;class Na extends e.ObjectWrapper.ObjectWrapper{#Hc=new Map;#Uc=new Map;#L=new Set;#qc=0;constructor(){super(),W.instance().observeModels(Jr,this)}static instance({forceNew:e}={forceNew:!1}){return Da&&!e||(Da=new Na),Da}observeIsolates(e){if(this.#L.has(e))throw new Error("Observer can only be registered once");this.#L.size||this.poll(),this.#L.add(e);for(const t of this.#Hc.values())e.isolateAdded(t)}modelAdded(e){this.modelAddedInternal(e)}async modelAddedInternal(e){this.#Uc.set(e,null);const t=await e.isolateId();if(!this.#Uc.has(e))return;if(!t)return void this.#Uc.delete(e);this.#Uc.set(e,t);let n=this.#Hc.get(t);if(n||(n=new _a(t),this.#Hc.set(t,n)),n.modelsInternal.add(e),1===n.modelsInternal.size)for(const e of this.#L)e.isolateAdded(n);else for(const e of this.#L)e.isolateChanged(n)}modelRemoved(e){const t=this.#Uc.get(e);if(this.#Uc.delete(e),!t)return;const n=this.#Hc.get(t);if(n)if(n.modelsInternal.delete(e),n.modelsInternal.size)for(const e of this.#L)e.isolateChanged(n);else{for(const e of this.#L)e.isolateRemoved(n);this.#Hc.delete(t)}}isolateByModel(e){return this.#Hc.get(this.#Uc.get(e)||"")||null}isolates(){return this.#Hc.values()}async poll(){const e=this.#qc;for(;e===this.#qc;)await Promise.all(Array.from(this.isolates(),(e=>e.update()))),await new Promise((e=>window.setTimeout(e,Ba)))}}const Fa=12e4,Ba=2e3;class _a{#C;modelsInternal;#zc;#jc;constructor(e){this.#C=e,this.modelsInternal=new Set,this.#zc=0;const t=Fa/Ba;this.#jc=new Ha(t)}id(){return this.#C}models(){return this.modelsInternal}runtimeModel(){return this.modelsInternal.values().next().value||null}heapProfilerModel(){const e=this.runtimeModel();return e?.heapProfilerModel()??null}async update(){const e=this.runtimeModel(),t=e&&await e.heapUsage();t&&(this.#zc=t.usedSize+(t.embedderHeapUsedSize??0)+(t.backingStorageSize??0),this.#jc.add(this.#zc),Na.instance().dispatchEventToListeners("MemoryChanged",this))}samplesCount(){return this.#jc.count()}usedHeapSize(){return this.#zc}usedHeapSizeGrowRate(){return this.#jc.fitSlope()}}class Ha{#Vc;#Wc;#as;#Gc;#Kc;#Qc;#$c;#Xc;#Jc;constructor(e){this.#Vc=0|e,this.reset()}reset(){this.#Wc=Date.now(),this.#as=0,this.#Gc=[],this.#Kc=[],this.#Qc=0,this.#$c=0,this.#Xc=0,this.#Jc=0}count(){return this.#Gc.length}add(e,t){const n="number"==typeof t?t:Date.now()-this.#Wc,r=e;if(this.#Gc.length===this.#Vc){const e=this.#Gc[this.#as],t=this.#Kc[this.#as];this.#Qc-=e,this.#$c-=t,this.#Xc-=e*e,this.#Jc-=e*t}this.#Qc+=n,this.#$c+=r,this.#Xc+=n*n,this.#Jc+=n*r,this.#Gc[this.#as]=n,this.#Kc[this.#as]=r,this.#as=(this.#as+1)%this.#Vc}fitSlope(){const e=this.count();return e<2?0:(this.#Jc-this.#Qc*this.#$c/e)/(this.#Xc-this.#Qc*this.#Qc/e)}}var Ua=Object.freeze({__proto__:null,Isolate:_a,IsolateManager:Na,MemoryTrend:Ha,MemoryTrendWindowMs:Fa});class qa extends h{#Yc=!1;#yr=!1;constructor(e){super(e),this.ensureEnabled()}async ensureEnabled(){if(this.#yr)return;this.#yr=!0,this.target().registerAuditsDispatcher(this);const e=this.target().auditsAgent();await e.invoke_enable()}issueAdded(e){this.dispatchEventToListeners("IssueAdded",{issuesModel:this,inspectorIssue:e.issue})}dispose(){super.dispose(),this.#Yc=!0}getTargetIfNotDisposed(){return this.#Yc?null:this.target()}}h.register(qa,{capabilities:32768,autostart:!0});var za=Object.freeze({__proto__:null,IssuesModel:qa});var ja=Object.freeze({__proto__:null,LayerTreeBase:class{#e;#er;layersById=new Map;#Zc=null;#eh=null;#th=new Map;#nh;constructor(e){this.#e=e,this.#er=e?e.model(Gs):null}target(){return this.#e}root(){return this.#Zc}setRoot(e){this.#Zc=e}contentRoot(){return this.#eh}setContentRoot(e){this.#eh=e}forEachLayer(e,t){return!(!t&&!(t=this.root()))&&(e(t)||t.children().some(this.forEachLayer.bind(this,e)))}layerById(e){return this.layersById.get(e)||null}async resolveBackendNodeIds(e){if(!e.size||!this.#er)return;const t=await this.#er.pushNodesByBackendIdsToFrontend(e);if(t)for(const e of t.keys())this.#th.set(e,t.get(e)||null)}backendNodeIdToNode(){return this.#th}setViewportSize(e){this.#nh=e}viewportSize(){return this.#nh}nodeForId(e){return this.#er?this.#er.nodeForId(e):null}},StickyPositionConstraint:class{#rh;#sh;#ih;#oh;constructor(e,t){this.#rh=t.stickyBoxRect,this.#sh=t.containingBlockRect,this.#ih=null,e&&t.nearestLayerShiftingStickyBox&&(this.#ih=e.layerById(t.nearestLayerShiftingStickyBox)),this.#oh=null,e&&t.nearestLayerShiftingContainingBlock&&(this.#oh=e.layerById(t.nearestLayerShiftingContainingBlock))}stickyBoxRect(){return this.#rh}containingBlockRect(){return this.#sh}nearestLayerShiftingStickyBox(){return this.#ih}nearestLayerShiftingContainingBlock(){return this.#oh}}});class Va{id;url;startTime;loadTime;contentLoadTime;mainRequest;constructor(e){this.id=++Va.lastIdentifier,this.url=e.url(),this.startTime=e.startTime,this.mainRequest=e}static forRequest(e){return Wa.get(e)||null}bindRequest(e){Wa.set(e,this)}static lastIdentifier=0}const Wa=new WeakMap;var Ga=Object.freeze({__proto__:null,PageLoad:Va});class Ka extends h{layerTreeAgent;constructor(e){super(e),this.layerTreeAgent=e.layerTreeAgent()}async loadSnapshotFromFragments(e){const{snapshotId:t}=await this.layerTreeAgent.invoke_loadSnapshot({tiles:e});return t?new Qa(this,t):null}loadSnapshot(e){const t={x:0,y:0,picture:e};return this.loadSnapshotFromFragments([t])}async makeSnapshot(e){const{snapshotId:t}=await this.layerTreeAgent.invoke_makeSnapshot({layerId:e});return t?new Qa(this,t):null}}class Qa{#ah;#Mo;#lh;constructor(e,t){this.#ah=e,this.#Mo=t,this.#lh=1}release(){console.assert(this.#lh>0,"release is already called on the object"),--this.#lh||this.#ah.layerTreeAgent.invoke_releaseSnapshot({snapshotId:this.#Mo})}addReference(){++this.#lh,console.assert(this.#lh>0,"Referencing a dead object")}async replay(e,t,n){return(await this.#ah.layerTreeAgent.invoke_replaySnapshot({snapshotId:this.#Mo,fromStep:t,toStep:n,scale:e||1})).dataURL}async profile(e){return(await this.#ah.layerTreeAgent.invoke_profileSnapshot({snapshotId:this.#Mo,minRepeatCount:5,minDuration:1,clipRect:e||void 0})).timings}async commandLog(){const e=await this.#ah.layerTreeAgent.invoke_snapshotCommandLog({snapshotId:this.#Mo});return e.commandLog?e.commandLog.map(((e,t)=>new $a(e,t))):null}}class $a{method;params;commandIndex;constructor(e,t){this.method=e.method,this.params=e.params,this.commandIndex=t}}h.register(Ka,{capabilities:2,autostart:!1});var Xa=Object.freeze({__proto__:null,PaintProfilerLogItem:$a,PaintProfilerModel:Ka,PaintProfilerSnapshot:Qa});class Ja extends h{#Ks;#dh=new Map([["TaskDuration","CumulativeTime"],["ScriptDuration","CumulativeTime"],["LayoutDuration","CumulativeTime"],["RecalcStyleDuration","CumulativeTime"],["LayoutCount","CumulativeCount"],["RecalcStyleCount","CumulativeCount"]]);#ch=new Map;constructor(e){super(e),this.#Ks=e.performanceAgent()}enable(){return this.#Ks.invoke_enable({})}disable(){return this.#Ks.invoke_disable()}async requestMetrics(){const e=await this.#Ks.invoke_getMetrics()||[],t=new Map,n=performance.now();for(const s of e.metrics){let e,i=this.#ch.get(s.name);switch(i||(i={lastValue:void 0,lastTimestamp:void 0},this.#ch.set(s.name,i)),this.#dh.get(s.name)){case"CumulativeTime":e=i.lastTimestamp&&i.lastValue?r.NumberUtilities.clamp(1e3*(s.value-i.lastValue)/(n-i.lastTimestamp),0,1):0,i.lastValue=s.value,i.lastTimestamp=n;break;case"CumulativeCount":e=i.lastTimestamp&&i.lastValue?Math.max(0,1e3*(s.value-i.lastValue)/(n-i.lastTimestamp)):0,i.lastValue=s.value,i.lastTimestamp=n;break;default:e=s.value}t.set(s.name,e)}return{metrics:t,timestamp:n}}}h.register(Ja,{capabilities:2,autostart:!1});var Ya=Object.freeze({__proto__:null,PerformanceMetricsModel:Ja});class Za extends Map{getOrInsert(e,t){return this.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return this.has(e)||this.set(e,t(e)),this.get(e)}}class el extends h{agent;loaderIds=[];targetJustAttached=!0;lastPrimaryPageModel=null;documents=new Map;constructor(e){super(e),e.registerPreloadDispatcher(new tl(this)),this.agent=e.preloadAgent(),this.agent.invoke_enable();const t=e.targetInfo();void 0!==t&&"prerender"===t.subtype&&(this.lastPrimaryPageModel=W.instance().primaryPageTarget()?.model(el)||null),W.instance().addModelListener(ii,ri.PrimaryPageChanged,this.onPrimaryPageChanged,this)}dispose(){super.dispose(),W.instance().removeModelListener(ii,ri.PrimaryPageChanged,this.onPrimaryPageChanged,this),this.agent.invoke_disable()}ensureDocumentPreloadingData(e){void 0===this.documents.get(e)&&this.documents.set(e,new nl)}currentLoaderId(){if(this.targetJustAttached)return null;if(0===this.loaderIds.length)throw new Error("unreachable");return this.loaderIds[this.loaderIds.length-1]}currentDocument(){const e=this.currentLoaderId();return null===e?null:this.documents.get(e)||null}getRuleSetById(e){return this.currentDocument()?.ruleSets.getById(e)||null}getAllRuleSets(){return this.currentDocument()?.ruleSets.getAll()||[]}getPreloadCountsByRuleSetId(){const e=new Map;for(const{value:t}of this.getRepresentativePreloadingAttempts(null))for(const n of[null,...t.ruleSetIds]){void 0===e.get(n)&&e.set(n,new Map);const r=e.get(n);s(r);const i=r.get(t.status)||0;r.set(t.status,i+1)}return e}getPreloadingAttemptById(e){const t=this.currentDocument();return null===t?null:t.preloadingAttempts.getById(e,t.sources)||null}getRepresentativePreloadingAttempts(e){const t=this.currentDocument();return null===t?[]:t.preloadingAttempts.getAllRepresentative(e,t.sources)}getRepresentativePreloadingAttemptsOfPreviousPage(){if(this.loaderIds.length<=1)return[];const e=this.documents.get(this.loaderIds[this.loaderIds.length-2]);return void 0===e?[]:e.preloadingAttempts.getAllRepresentative(null,e.sources)}getPipelineById(e){const t=this.currentDocument();return null===t?null:t.preloadingAttempts.getPipeline(e,t.sources)}getPipeline(e){let t=null;if(null!==e.pipelineId&&(t=this.getPipelineById(e.pipelineId)),null===t){const t=new Map;return t.set(e.action,e),new ol(t)}return new ol(t)}onPrimaryPageChanged(e){const{frame:t,type:n}=e.data;if(null===this.lastPrimaryPageModel&&"Activation"===n)return;if(null!==this.lastPrimaryPageModel&&"Activation"!==n)return;if(null!==this.lastPrimaryPageModel&&"Activation"===n){this.loaderIds=this.lastPrimaryPageModel.loaderIds;for(const[e,t]of this.lastPrimaryPageModel.documents.entries())this.ensureDocumentPreloadingData(e),this.documents.get(e)?.mergePrevious(t)}this.lastPrimaryPageModel=null;const r=t.loaderId;this.loaderIds.push(r),this.loaderIds=this.loaderIds.slice(-2),this.ensureDocumentPreloadingData(r);for(const e of this.documents.keys())this.loaderIds.includes(e)||this.documents.delete(e);this.dispatchEventToListeners("ModelUpdated")}onRuleSetUpdated(e){const t=e.ruleSet,n=t.loaderId;null===this.currentLoaderId()&&(this.loaderIds=[n],this.targetJustAttached=!1),this.ensureDocumentPreloadingData(n),this.documents.get(n)?.ruleSets.upsert(t),this.dispatchEventToListeners("ModelUpdated")}onRuleSetRemoved(e){const t=e.id;for(const e of this.documents.values())e.ruleSets.delete(t);this.dispatchEventToListeners("ModelUpdated")}onPreloadingAttemptSourcesUpdated(e){const t=e.loaderId;this.ensureDocumentPreloadingData(t);const n=this.documents.get(t);void 0!==n&&(n.sources.update(e.preloadingAttemptSources),n.preloadingAttempts.maybeRegisterNotTriggered(n.sources),n.preloadingAttempts.cleanUpRemovedAttempts(n.sources),this.dispatchEventToListeners("ModelUpdated"))}onPrefetchStatusUpdated(e){if("PrefetchEvictedAfterCandidateRemoved"===e.prefetchStatus)return;const t=e.key.loaderId;this.ensureDocumentPreloadingData(t);const n={action:"Prefetch",key:e.key,pipelineId:e.pipelineId,status:sl(e.status),prefetchStatus:e.prefetchStatus||null,requestId:e.requestId};this.documents.get(t)?.preloadingAttempts.upsert(n),this.dispatchEventToListeners("ModelUpdated")}onPrerenderStatusUpdated(e){const t=e.key.loaderId;this.ensureDocumentPreloadingData(t);const n={action:"Prerender",key:e.key,pipelineId:e.pipelineId,status:sl(e.status),prerenderStatus:e.prerenderStatus||null,disallowedMojoInterface:e.disallowedMojoInterface||null,mismatchedHeaders:e.mismatchedHeaders||null};this.documents.get(t)?.preloadingAttempts.upsert(n),this.dispatchEventToListeners("ModelUpdated")}onPreloadEnabledStateUpdated(e){this.dispatchEventToListeners("WarningsUpdated",e)}}h.register(el,{capabilities:2,autostart:!1});class tl{model;constructor(e){this.model=e}ruleSetUpdated(e){this.model.onRuleSetUpdated(e)}ruleSetRemoved(e){this.model.onRuleSetRemoved(e)}preloadingAttemptSourcesUpdated(e){this.model.onPreloadingAttemptSourcesUpdated(e)}prefetchStatusUpdated(e){this.model.onPrefetchStatusUpdated(e)}prerenderStatusUpdated(e){this.model.onPrerenderStatusUpdated(e)}preloadEnabledStateUpdated(e){this.model.onPreloadEnabledStateUpdated(e)}}class nl{ruleSets=new rl;preloadingAttempts=new al;sources=new ll;mergePrevious(e){if(!this.ruleSets.isEmpty()||!this.sources.isEmpty())throw new Error("unreachable");this.ruleSets=e.ruleSets,this.preloadingAttempts.mergePrevious(e.preloadingAttempts),this.sources=e.sources}}class rl{map=new Map;isEmpty(){return 0===this.map.size}getById(e){return this.map.get(e)||null}getAll(){return Array.from(this.map.entries()).map((([e,t])=>({id:e,value:t})))}upsert(e){this.map.set(e.id,e)}delete(e){this.map.delete(e)}}function sl(e){switch(e){case"Pending":return"Pending";case"Running":return"Running";case"Ready":return"Ready";case"Success":return"Success";case"Failure":return"Failure";case"NotSupported":return"NotSupported"}throw new Error("unreachable")}function il(e){let t,n;switch(e.action){case"Prefetch":t="Prefetch";break;case"Prerender":t="Prerender"}switch(e.targetHint){case void 0:n="undefined";break;case"Blank":n="Blank";break;case"Self":n="Self"}return`${e.loaderId}:${t}:${e.url}:${n}`}class ol{inner;constructor(e){if(0===e.size)throw new Error("unreachable");this.inner=e}static newFromAttemptsForTesting(e){const t=new Map;for(const n of e)t.set(n.action,n);return new ol(t)}getOriginallyTriggered(){const e=this.getPrerender()||this.getPrefetch();return s(e),e}getPrefetch(){return this.inner.get("Prefetch")||null}getPrerender(){return this.inner.get("Prerender")||null}getAttempts(){const e=[],t=this.getPrefetch();null!==t&&e.push(t);const n=this.getPrerender();if(null!==n&&e.push(n),0===e.length)throw new Error("unreachable");return e}}class al{map=new Map;pipelines=new Za;enrich(e,t){let n=[],r=[];return null!==t&&(n=t.ruleSetIds,r=t.nodeIds),{...e,ruleSetIds:n,nodeIds:r}}isAttemptRepresentative(e){function t(e){switch(e){case"Prefetch":return 0;case"Prerender":return 1}}if(null===e.pipelineId)return!0;const n=this.pipelines.get(e.pipelineId);if(s(n),0===n.size)throw new Error("unreachable");return[...n.keys()].every((n=>t(n)<=t(e.action)))}getById(e,t){const n=this.map.get(e)||null;return null===n?null:this.enrich(n,t.getById(e))}getAllRepresentative(e,t){return[...this.map.entries()].map((([e,n])=>({id:e,value:this.enrich(n,t.getById(e))}))).filter((({value:t})=>!e||t.ruleSetIds.includes(e))).filter((({value:e})=>this.isAttemptRepresentative(e)))}getPipeline(e,t){const n=this.pipelines.get(e);if(void 0===n||0===n.size)return null;const r={};for(const[e,t]of this.map.entries())r[e]=t;return new Map(n.entries().map((([e,n])=>{const r=this.getById(n,t);return s(r),[e,r]})))}upsert(e){const t=il(e.key);this.map.set(t,e),null!==e.pipelineId&&this.pipelines.getOrInsertComputed(e.pipelineId,(()=>new Map)).set(e.action,t)}reconstructPipelines(){this.pipelines.clear();for(const[e,t]of this.map.entries()){if(null===t.pipelineId)continue;this.pipelines.getOrInsertComputed(t.pipelineId,(()=>new Map)).set(t.action,e)}}maybeRegisterNotTriggered(e){for(const[t,{key:n}]of e.entries()){if(void 0!==this.map.get(t))continue;let e;switch(n.action){case"Prefetch":e={action:"Prefetch",key:n,pipelineId:null,status:"NotTriggered",prefetchStatus:null,requestId:""};break;case"Prerender":e={action:"Prerender",key:n,pipelineId:null,status:"NotTriggered",prerenderStatus:null,disallowedMojoInterface:null,mismatchedHeaders:null}}this.map.set(t,e)}}cleanUpRemovedAttempts(e){const t=Array.from(this.map.keys()).filter((t=>!e.getById(t)));for(const e of t)this.map.delete(e);this.reconstructPipelines()}mergePrevious(e){for(const[t,n]of this.map.entries())e.map.set(t,n);this.map=e.map,this.reconstructPipelines()}}class ll{map=new Map;entries(){return this.map.entries()}isEmpty(){return 0===this.map.size}getById(e){return this.map.get(e)||null}update(e){this.map=new Map(e.map((e=>[il(e.key),e])))}}var dl=Object.freeze({__proto__:null,PreloadPipeline:ol,PreloadingModel:el});var cl=Object.freeze({__proto__:null,ReactNativeApplicationModel:class extends h{#yr;#Ks;metadataCached=null;constructor(e){super(e),a.rnPerfMetrics.fuseboxSetClientMetadataStarted(),this.#yr=!1,this.#Ks=e.reactNativeApplicationAgent(),e.registerReactNativeApplicationDispatcher(this),this.ensureEnabled()}ensureEnabled(){this.#yr||(this.#Ks.invoke_enable().then((e=>{const t=e.getError(),n=!t;a.rnPerfMetrics.fuseboxSetClientMetadataFinished(n,t)})).catch((e=>{a.rnPerfMetrics.fuseboxSetClientMetadataFinished(!1,e)})),this.#yr=!0)}metadataUpdated(e){this.metadataCached=e,this.dispatchEventToListeners("MetadataUpdated",e)}traceRequested(){this.dispatchEventToListeners("TraceRequested")}}});class hl extends h{enabled=!1;storageAgent;storageKeyManager;bucketsById=new Map;trackedStorageKeys=new Set;constructor(e){super(e),e.registerStorageDispatcher(this),this.storageAgent=e.storageAgent(),this.storageKeyManager=e.model(ni)}getBuckets(){return new Set(this.bucketsById.values())}getBucketsForStorageKey(e){const t=[...this.bucketsById.values()];return new Set(t.filter((({bucket:t})=>t.storageKey===e)))}getDefaultBucketForStorageKey(e){return[...this.bucketsById.values()].find((({bucket:t})=>t.storageKey===e&&void 0===t.name))??null}getBucketById(e){return this.bucketsById.get(e)??null}getBucketByName(e,t){if(!t)return this.getDefaultBucketForStorageKey(e);return[...this.bucketsById.values()].find((({bucket:n})=>n.storageKey===e&&n.name===t))??null}deleteBucket(e){this.storageAgent.invoke_deleteStorageBucket({bucket:e})}enable(){if(!this.enabled){if(this.storageKeyManager){this.storageKeyManager.addEventListener("StorageKeyAdded",this.storageKeyAdded,this),this.storageKeyManager.addEventListener("StorageKeyRemoved",this.storageKeyRemoved,this);for(const e of this.storageKeyManager.storageKeys())this.addStorageKey(e)}this.enabled=!0}}storageKeyAdded(e){this.addStorageKey(e.data)}storageKeyRemoved(e){this.removeStorageKey(e.data)}addStorageKey(e){if(this.trackedStorageKeys.has(e))throw new Error("Can't call addStorageKey for a storage key if it has already been added.");this.trackedStorageKeys.add(e),this.storageAgent.invoke_setStorageBucketTracking({storageKey:e,enable:!0})}removeStorageKey(e){if(!this.trackedStorageKeys.has(e))throw new Error("Can't call removeStorageKey for a storage key if it hasn't already been added.");const t=this.getBucketsForStorageKey(e);for(const e of t)this.bucketRemoved(e);this.trackedStorageKeys.delete(e),this.storageAgent.invoke_setStorageBucketTracking({storageKey:e,enable:!1})}bucketAdded(e){this.bucketsById.set(e.id,e),this.dispatchEventToListeners("BucketAdded",{model:this,bucketInfo:e})}bucketRemoved(e){this.bucketsById.delete(e.id),this.dispatchEventToListeners("BucketRemoved",{model:this,bucketInfo:e})}bucketChanged(e){this.dispatchEventToListeners("BucketChanged",{model:this,bucketInfo:e})}bucketInfosAreEqual(e,t){return e.bucket.storageKey===t.bucket.storageKey&&e.id===t.id&&e.bucket.name===t.bucket.name&&e.expiration===t.expiration&&e.quota===t.quota&&e.persistent===t.persistent&&e.durability===t.durability}storageBucketCreatedOrUpdated({bucketInfo:e}){const t=this.getBucketById(e.id);t?this.bucketInfosAreEqual(t,e)||this.bucketChanged(e):this.bucketAdded(e)}storageBucketDeleted({bucketId:e}){const t=this.getBucketById(e);if(!t)throw new Error(`Received an event that Storage Bucket '${e}' was deleted, but it wasn't in the StorageBucketsModel.`);this.bucketRemoved(t)}attributionReportingTriggerRegistered(e){}interestGroupAccessed(e){}interestGroupAuctionEventOccurred(e){}interestGroupAuctionNetworkRequestCreated(e){}indexedDBListUpdated(e){}indexedDBContentUpdated(e){}cacheStorageListUpdated(e){}cacheStorageContentUpdated(e){}sharedStorageAccessed(e){}attributionReportingSourceRegistered(e){}}h.register(hl,{capabilities:8192,autostart:!1});var ul=Object.freeze({__proto__:null,StorageBucketsModel:hl});const gl={serviceworkercacheagentError:"`ServiceWorkerCacheAgent` error deleting cache entry {PH1} in cache: {PH2}"},pl=n.i18n.registerUIStrings("core/sdk/ServiceWorkerCacheModel.ts",gl),ml=n.i18n.getLocalizedString.bind(void 0,pl);class fl extends h{cacheAgent;#hh;#uh;#gh=new Map;#ph=new Set;#mh=new Set;#fh=new e.Throttler.Throttler(2e3);#yr=!1;#bh=!1;constructor(e){super(e),e.registerStorageDispatcher(this),this.cacheAgent=e.cacheStorageAgent(),this.#hh=e.storageAgent(),this.#uh=e.model(hl)}enable(){if(!this.#yr){this.#uh.addEventListener("BucketAdded",this.storageBucketAdded,this),this.#uh.addEventListener("BucketRemoved",this.storageBucketRemoved,this);for(const e of this.#uh.getBuckets())this.addStorageBucket(e.bucket);this.#yr=!0}}clearForStorageKey(e){for(const[t,n]of this.#gh.entries())n.storageKey===e&&(this.#gh.delete(t),this.cacheRemoved(n));for(const t of this.#uh.getBucketsForStorageKey(e))this.loadCacheNames(t.bucket)}refreshCacheNames(){for(const e of this.#gh.values())this.cacheRemoved(e);this.#gh.clear();const e=this.#uh.getBuckets();for(const t of e)this.loadCacheNames(t.bucket)}async deleteCache(e){const t=await this.cacheAgent.invoke_deleteCache({cacheId:e.cacheId});t.getError()?console.error(`ServiceWorkerCacheAgent error deleting cache ${e.toString()}: ${t.getError()}`):(this.#gh.delete(e.cacheId),this.cacheRemoved(e))}async deleteCacheEntry(t,n){const r=await this.cacheAgent.invoke_deleteEntry({cacheId:t.cacheId,request:n});r.getError()&&e.Console.Console.instance().error(ml(gl.serviceworkercacheagentError,{PH1:t.toString(),PH2:String(r.getError())}))}loadCacheData(e,t,n,r,s){this.requestEntries(e,t,n,r,s)}loadAllCacheData(e,t,n){this.requestAllEntries(e,t,n)}caches(){return[...this.#gh.values()]}dispose(){for(const e of this.#gh.values())this.cacheRemoved(e);this.#gh.clear(),this.#yr&&(this.#uh.removeEventListener("BucketAdded",this.storageBucketAdded,this),this.#uh.removeEventListener("BucketRemoved",this.storageBucketRemoved,this))}addStorageBucket(e){this.loadCacheNames(e),this.#ph.has(e.storageKey)||(this.#ph.add(e.storageKey),this.#hh.invoke_trackCacheStorageForStorageKey({storageKey:e.storageKey}))}removeStorageBucket(e){let t=0;for(const[n,r]of this.#gh.entries())e.storageKey===r.storageKey&&t++,r.inBucket(e)&&(t--,this.#gh.delete(n),this.cacheRemoved(r));0===t&&(this.#ph.delete(e.storageKey),this.#hh.invoke_untrackCacheStorageForStorageKey({storageKey:e.storageKey}))}async loadCacheNames(e){const t=await this.cacheAgent.invoke_requestCacheNames({storageBucket:e});t.getError()||this.updateCacheNames(e,t.caches)}updateCacheNames(e,t){const n=new Set,r=new Map,s=new Map;for(const e of t){const t=e.storageBucket??this.#uh.getDefaultBucketForStorageKey(e.storageKey)?.bucket;if(!t)continue;const s=new bl(this,t,e.cacheName,e.cacheId);n.add(s.cacheId),this.#gh.has(s.cacheId)||(r.set(s.cacheId,s),this.#gh.set(s.cacheId,s))}this.#gh.forEach((function(t){t.inBucket(e)&&!n.has(t.cacheId)&&(s.set(t.cacheId,t),this.#gh.delete(t.cacheId))}),this),r.forEach(this.cacheAdded,this),s.forEach(this.cacheRemoved,this)}storageBucketAdded({data:{bucketInfo:{bucket:e}}}){this.addStorageBucket(e)}storageBucketRemoved({data:{bucketInfo:{bucket:e}}}){this.removeStorageBucket(e)}cacheAdded(e){this.dispatchEventToListeners("CacheAdded",{model:this,cache:e})}cacheRemoved(e){this.dispatchEventToListeners("CacheRemoved",{model:this,cache:e})}async requestEntries(e,t,n,r,s){const i=await this.cacheAgent.invoke_requestEntries({cacheId:e.cacheId,skipCount:t,pageSize:n,pathFilter:r});i.getError()?console.error("ServiceWorkerCacheAgent error while requesting entries: ",i.getError()):s(i.cacheDataEntries,i.returnCount)}async requestAllEntries(e,t,n){const r=await this.cacheAgent.invoke_requestEntries({cacheId:e.cacheId,pathFilter:t});r.getError()?console.error("ServiceWorkerCacheAgent error while requesting entries: ",r.getError()):n(r.cacheDataEntries,r.returnCount)}cacheStorageListUpdated({bucketId:e}){const t=this.#uh.getBucketById(e)?.bucket;t&&(this.#mh.add(t),this.#fh.schedule((()=>{const e=Array.from(this.#mh,(e=>this.loadCacheNames(e)));return this.#mh.clear(),Promise.all(e)}),this.#bh?"AsSoonAsPossible":"Default"))}cacheStorageContentUpdated({bucketId:e,cacheName:t}){const n=this.#uh.getBucketById(e)?.bucket;n&&this.dispatchEventToListeners("CacheStorageContentUpdated",{storageBucket:n,cacheName:t})}attributionReportingTriggerRegistered(e){}indexedDBListUpdated(e){}indexedDBContentUpdated(e){}interestGroupAuctionEventOccurred(e){}interestGroupAccessed(e){}interestGroupAuctionNetworkRequestCreated(e){}sharedStorageAccessed(e){}storageBucketCreatedOrUpdated(e){}storageBucketDeleted(e){}setThrottlerSchedulesAsSoonAsPossibleForTest(){this.#bh=!0}attributionReportingSourceRegistered(e){}}class bl{#ls;storageKey;storageBucket;cacheName;cacheId;constructor(e,t,n,r){this.#ls=e,this.storageBucket=t,this.storageKey=t.storageKey,this.cacheName=n,this.cacheId=r}inBucket(e){return this.storageKey===e.storageKey&&this.storageBucket.name===e.name}equals(e){return this.cacheId===e.cacheId}toString(){return this.storageKey+this.cacheName}async requestCachedResponse(e,t){const n=await this.#ls.cacheAgent.invoke_requestCachedResponse({cacheId:this.cacheId,requestURL:e,requestHeaders:t});return n.getError()?null:n.response}}h.register(fl,{capabilities:8192,autostart:!1});var yl=Object.freeze({__proto__:null,Cache:bl,ServiceWorkerCacheModel:fl});const vl={running:"running",starting:"starting",stopped:"stopped",stopping:"stopping",activated:"activated",activating:"activating",installed:"installed",installing:"installing",new:"new",redundant:"redundant",sSS:"{PH1} #{PH2} ({PH3})"},Il=n.i18n.registerUIStrings("core/sdk/ServiceWorkerManager.ts",vl),wl=n.i18n.getLocalizedString.bind(void 0,Il),Sl=n.i18n.getLazilyComputedLocalizedString.bind(void 0,Il);class kl extends h{#Ks;#yh=new Map;#yr=!1;#vh;serviceWorkerNetworkRequestsPanelStatus={isOpen:!1,openedAt:0};constructor(t){super(t),t.registerServiceWorkerDispatcher(new Cl(this)),this.#Ks=t.serviceWorkerAgent(),this.enable(),this.#vh=e.Settings.Settings.instance().createSetting("service-worker-update-on-reload",!1),this.#vh.get()&&this.forceUpdateSettingChanged(),this.#vh.addChangeListener(this.forceUpdateSettingChanged,this),new Pl(t,this)}async enable(){this.#yr||(this.#yr=!0,await this.#Ks.invoke_enable())}async disable(){this.#yr&&(this.#yr=!1,this.#yh.clear(),await this.#Ks.invoke_enable())}registrations(){return this.#yh}findVersion(e){for(const t of this.registrations().values()){const n=t.versions.get(e);if(n)return n}return null}deleteRegistration(e){const t=this.#yh.get(e);if(t){if(t.isRedundant())return this.#yh.delete(e),void this.dispatchEventToListeners("RegistrationDeleted",t);t.deleting=!0;for(const e of t.versions.values())this.stopWorker(e.id);this.unregister(t.scopeURL)}}async updateRegistration(e){const t=this.#yh.get(e);t&&await this.#Ks.invoke_updateRegistration({scopeURL:t.scopeURL})}async deliverPushMessage(t,n){const r=this.#yh.get(t);if(!r)return;const s=e.ParsedURL.ParsedURL.extractOrigin(r.scopeURL);await this.#Ks.invoke_deliverPushMessage({origin:s,registrationId:t,data:n})}async dispatchSyncEvent(t,n,r){const s=this.#yh.get(t);if(!s)return;const i=e.ParsedURL.ParsedURL.extractOrigin(s.scopeURL);await this.#Ks.invoke_dispatchSyncEvent({origin:i,registrationId:t,tag:n,lastChance:r})}async dispatchPeriodicSyncEvent(t,n){const r=this.#yh.get(t);if(!r)return;const s=e.ParsedURL.ParsedURL.extractOrigin(r.scopeURL);await this.#Ks.invoke_dispatchPeriodicSyncEvent({origin:s,registrationId:t,tag:n})}async unregister(e){await this.#Ks.invoke_unregister({scopeURL:e})}async startWorker(e){await this.#Ks.invoke_startWorker({scopeURL:e})}async skipWaiting(e){await this.#Ks.invoke_skipWaiting({scopeURL:e})}async stopWorker(e){await this.#Ks.invoke_stopWorker({versionId:e})}async inspectWorker(e){await this.#Ks.invoke_inspectWorker({versionId:e})}workerRegistrationUpdated(e){for(const t of e){let e=this.#yh.get(t.registrationId);e?(e.update(t),e.shouldBeRemoved()?(this.#yh.delete(e.id),this.dispatchEventToListeners("RegistrationDeleted",e)):this.dispatchEventToListeners("RegistrationUpdated",e)):(e=new Ml(t),this.#yh.set(t.registrationId,e),this.dispatchEventToListeners("RegistrationUpdated",e))}}workerVersionUpdated(e){const t=new Set;for(const n of e){const e=this.#yh.get(n.registrationId);e&&(e.updateVersion(n),t.add(e))}for(const e of t)e.shouldBeRemoved()?(this.#yh.delete(e.id),this.dispatchEventToListeners("RegistrationDeleted",e)):this.dispatchEventToListeners("RegistrationUpdated",e)}workerErrorReported(e){const t=this.#yh.get(e.registrationId);t&&(t.errors.push(e),this.dispatchEventToListeners("RegistrationErrorAdded",{registration:t,error:e}))}forceUpdateSettingChanged(){const e=this.#vh.get();this.#Ks.invoke_setForceUpdateOnPageLoad({forceUpdateOnPageLoad:e})}}class Cl{#z;constructor(e){this.#z=e}workerRegistrationUpdated({registrations:e}){this.#z.workerRegistrationUpdated(e)}workerVersionUpdated({versions:e}){this.#z.workerVersionUpdated(e)}workerErrorReported({errorMessage:e}){this.#z.workerErrorReported(e)}}class xl{runningStatus;status;lastUpdatedTimestamp;previousState;constructor(e,t,n,r){this.runningStatus=e,this.status=t,this.lastUpdatedTimestamp=r,this.previousState=n}}class Rl{condition;source;id;constructor(e,t,n){this.condition=e,this.source=t,this.id=n}}class Tl{id;scriptURL;parsedURL;securityOrigin;scriptLastModified;scriptResponseTime;controlledClients;targetId;routerRules;currentState;registration;constructor(e,t){this.registration=e,this.update(t)}update(t){this.id=t.versionId,this.scriptURL=t.scriptURL;const n=new e.ParsedURL.ParsedURL(t.scriptURL);this.securityOrigin=n.securityOrigin(),this.currentState=new xl(t.runningStatus,t.status,this.currentState,Date.now()),this.scriptLastModified=t.scriptLastModified,this.scriptResponseTime=t.scriptResponseTime,t.controlledClients?this.controlledClients=t.controlledClients.slice():this.controlledClients=[],this.targetId=t.targetId||null,this.routerRules=null,t.routerRules&&(this.routerRules=this.parseJSONRules(t.routerRules))}isStartable(){return!this.registration.isDeleted&&this.isActivated()&&this.isStopped()}isStoppedAndRedundant(){return"stopped"===this.runningStatus&&"redundant"===this.status}isStopped(){return"stopped"===this.runningStatus}isStarting(){return"starting"===this.runningStatus}isRunning(){return"running"===this.runningStatus}isStopping(){return"stopping"===this.runningStatus}isNew(){return"new"===this.status}isInstalling(){return"installing"===this.status}isInstalled(){return"installed"===this.status}isActivating(){return"activating"===this.status}isActivated(){return"activated"===this.status}isRedundant(){return"redundant"===this.status}get status(){return this.currentState.status}get runningStatus(){return this.currentState.runningStatus}mode(){return this.isNew()||this.isInstalling()?"installing":this.isInstalled()?"waiting":this.isActivating()||this.isActivated()?"active":"redundant"}parseJSONRules(e){try{const t=JSON.parse(e);if(!Array.isArray(t))return console.error("Parse error: `routerRules` in ServiceWorkerVersion should be an array"),null;const n=[];for(const e of t){const{condition:t,source:r,id:s}=e;if(void 0===t||void 0===r||void 0===s)return console.error("Parse error: Missing some fields of `routerRules` in ServiceWorkerVersion"),null;n.push(new Rl(JSON.stringify(t),JSON.stringify(r),s))}return n}catch{return console.error("Parse error: Invalid `routerRules` in ServiceWorkerVersion"),null}}}!function(e){e.RunningStatus={running:Sl(vl.running),starting:Sl(vl.starting),stopped:Sl(vl.stopped),stopping:Sl(vl.stopping)},e.Status={activated:Sl(vl.activated),activating:Sl(vl.activating),installed:Sl(vl.installed),installing:Sl(vl.installing),new:Sl(vl.new),redundant:Sl(vl.redundant)}}(Tl||(Tl={}));class Ml{#Ih;id;scopeURL;securityOrigin;isDeleted;versions=new Map;deleting=!1;errors=[];constructor(e){this.update(e)}update(t){this.#Ih=Symbol("fingerprint"),this.id=t.registrationId,this.scopeURL=t.scopeURL;const n=new e.ParsedURL.ParsedURL(t.scopeURL);this.securityOrigin=n.securityOrigin(),this.isDeleted=t.isDeleted}fingerprint(){return this.#Ih}versionsByMode(){const e=new Map;for(const t of this.versions.values())e.set(t.mode(),t);return e}updateVersion(e){this.#Ih=Symbol("fingerprint");let t=this.versions.get(e.versionId);return t?(t.update(e),t):(t=new Tl(this,e),this.versions.set(e.versionId,t),t)}isRedundant(){for(const e of this.versions.values())if(!e.isStoppedAndRedundant())return!1;return!0}shouldBeRemoved(){return this.isRedundant()&&(!this.errors.length||this.deleting)}canBeRemoved(){return this.isDeleted||this.deleting}}class Pl{#$n;#wh;#Sh=new Map;constructor(e,t){this.#$n=e,this.#wh=t,t.addEventListener("RegistrationUpdated",this.registrationsUpdated,this),t.addEventListener("RegistrationDeleted",this.registrationsUpdated,this),W.instance().addModelListener(Jr,$r.ExecutionContextCreated,this.executionContextCreated,this)}registrationsUpdated(){this.#Sh.clear();const e=this.#wh.registrations().values();for(const t of e)for(const e of t.versions.values())e.targetId&&this.#Sh.set(e.targetId,e);this.updateAllContextLabels()}executionContextCreated(e){const t=e.data,n=this.serviceWorkerTargetId(t.target());n&&this.updateContextLabel(t,this.#Sh.get(n)||null)}serviceWorkerTargetId(e){return e.parentTarget()!==this.#$n||e.type()!==U.ServiceWorker?null:e.id()}updateAllContextLabels(){for(const e of W.instance().targets()){const t=this.serviceWorkerTargetId(e);if(!t)continue;const n=this.#Sh.get(t)||null,r=e.model(Jr),s=r?r.executionContexts():[];for(const e of s)this.updateContextLabel(e,n)}}updateContextLabel(t,n){if(!n)return void t.setLabel("");const r=e.ParsedURL.ParsedURL.fromString(t.origin),s=r?r.lastPathComponentWithFragment():t.name,i=Tl.Status[n.status];t.setLabel(wl(vl.sSS,{PH1:s,PH2:n.id,PH3:i()}))}}h.register(kl,{capabilities:16384,autostart:!0});var El=Object.freeze({__proto__:null,ServiceWorkerManager:kl,ServiceWorkerRegistration:Ml,ServiceWorkerRouterRule:Rl,get ServiceWorkerVersion(){return Tl},ServiceWorkerVersionState:xl});class Ll extends h{#Ks;constructor(e){super(e),this.#Ks=e.webAuthnAgent(),e.registerWebAuthnDispatcher(new Al(this))}setVirtualAuthEnvEnabled(e){return e?this.#Ks.invoke_enable({enableUI:!0}):this.#Ks.invoke_disable()}async addAuthenticator(e){return(await this.#Ks.invoke_addVirtualAuthenticator({options:e})).authenticatorId}async removeAuthenticator(e){await this.#Ks.invoke_removeVirtualAuthenticator({authenticatorId:e})}async setAutomaticPresenceSimulation(e,t){await this.#Ks.invoke_setAutomaticPresenceSimulation({authenticatorId:e,enabled:t})}async getCredentials(e){return(await this.#Ks.invoke_getCredentials({authenticatorId:e})).credentials}async removeCredential(e,t){await this.#Ks.invoke_removeCredential({authenticatorId:e,credentialId:t})}credentialAdded(e){this.dispatchEventToListeners("CredentialAdded",e)}credentialAsserted(e){this.dispatchEventToListeners("CredentialAsserted",e)}credentialDeleted(e){this.dispatchEventToListeners("CredentialDeleted",e)}credentialUpdated(e){this.dispatchEventToListeners("CredentialUpdated",e)}}class Al{#ls;constructor(e){this.#ls=e}credentialAdded(e){this.#ls.credentialAdded(e)}credentialAsserted(e){this.#ls.credentialAsserted(e)}credentialDeleted(e){this.#ls.credentialDeleted(e)}credentialUpdated(e){this.#ls.credentialUpdated(e)}}h.register(Ll,{capabilities:65536,autostart:!1});var Ol=Object.freeze({__proto__:null,WebAuthnModel:Ll});export{Fi as AccessibilityModel,eo as AnimationModel,no as AutofillModel,Uo as CPUProfilerModel,ya as CPUThrottlingManager,Vt as CSSContainerQuery,me as CSSFontFace,Gt as CSSLayer,Mn as CSSMatchedStyles,Xt as CSSMedia,B as CSSMetadata,Gr as CSSModel,Bt as CSSProperty,Nt as CSSPropertyParser,ht as CSSPropertyParserMatchers,Ht as CSSQuery,pn as CSSRule,Zt as CSSScope,tn as CSSStyleDeclaration,On as CSSStyleSheetHeader,rn as CSSSupports,so as CategorizedBreakpoint,Eo as ChildTargetManager,No as CompilerSourceMappingContentProvider,xo as Connections,Jo as ConsoleModel,q as Cookie,ci as CookieModel,gi as CookieParser,Ta as DOMDebuggerModel,Xs as DOMModel,Ts as DebuggerModel,ta as EmulationModel,oo as EnhancedTracesParser,Aa as EventBreakpointsModel,Oa as FrameAssociated,Fn as FrameManager,Xr as HeapProfilerModel,Xn as IOModel,Ua as IsolateManager,za as IssuesModel,ja as LayerTreeBase,zo as LogModel,ge as NetworkManager,Oi as NetworkRequest,Ps as OverlayColorGenerator,qs as OverlayModel,Ls as OverlayPersistentHighlighter,Ga as PageLoad,sr as PageResourceLoader,Xa as PaintProfiler,Ya as PerformanceMetricsModel,dl as PreloadingModel,cl as ReactNativeApplicationModel,Qn as RemoteObject,Zs as Resource,li as ResourceTreeModel,es as RuntimeModel,u as SDKModel,_i as ScreenCaptureModel,ds as Script,ti as SecurityOriginManager,fi as ServerSentEventProtocol,Si as ServerTiming,yl as ServiceWorkerCacheModel,El as ServiceWorkerManager,Ar as SourceMap,br as SourceMapFunctionRanges,Fr as SourceMapManager,kr as SourceMapScopeChainEntry,gr as SourceMapScopes,Rr as SourceMapScopesInfo,ul as StorageBucketsModel,si as StorageKeyManager,j as Target,G as TargetManager,co as TraceObject,Ol as WebAuthnModel}; diff --git a/packages/debugger-frontend/dist/third-party/front_end/panels/rn_welcome/rn_welcome.js b/packages/debugger-frontend/dist/third-party/front_end/panels/rn_welcome/rn_welcome.js index f9ca6deeae9cd0..4735662af4960f 100644 --- a/packages/debugger-frontend/dist/third-party/front_end/panels/rn_welcome/rn_welcome.js +++ b/packages/debugger-frontend/dist/third-party/front_end/panels/rn_welcome/rn_welcome.js @@ -1,17 +1,17 @@ -import*as e from"../../core/host/host.js";import*as i from"../../core/i18n/i18n.js";import*as t from"../../core/root/root.js";import*as o from"../../core/sdk/sdk.js";import*as s from"../../ui/legacy/legacy.js";import{render as n,html as r}from"../../ui/lit/lit.js";var a={cssText:`.rn-welcome-panel{display:flex;flex-direction:column;flex-shrink:0;align-items:stretch;justify-content:center;padding:36px;background-color:var(--color-background);min-height:100%}@media (width >= 1000px){.rn-welcome-panel{flex-direction:row;align-items:center;justify-content:stretch;height:100%;padding:0}}.rn-welcome-hero{display:flex;flex-direction:column;flex-grow:1;flex-shrink:0;align-items:center;justify-content:center;padding:16px;text-align:center}@media (width >= 1000px){.rn-welcome-hero{margin-left:24px}}.rn-welcome-heading{display:flex;align-items:center;margin-bottom:16px}.rn-welcome-icon{width:30px;height:30px;border-radius:4px;margin-right:12px}.rn-welcome-title{font-size:20px;font-weight:normal;color:var(--color-text-primary)}.rn-welcome-title-accessory{margin-left:12px;padding:4px 8px;border-radius:4px;background-color:var(--sys-color-green-bright);font-size:12px;color:var(--sys-color-primary)}.rn-welcome-title-accessory-purple{background-color:var(--sys-color-purple-bright)}.rn-welcome-tagline{margin-bottom:24px;font-size:1rem;line-height:1.3;color:var(--color-text-secondary)}.rn-welcome-links{display:flex;align-items:center}.rn-welcome-links > .devtools-link{position:relative;margin:0 16px;font-size:14px}.rn-welcome-links > .devtools-link:not(:last-child)::after{content:"";position:absolute;right:-16px;height:16px;border-right:1px solid var(--sys-color-on-base-divider)}.rn-session-id-message{display:block;margin-top:24px}.rn-session-id-message > .rn-session-id{user-select:all}.rn-welcome-version{position:fixed;top:8px;right:8px;margin-top:24px;padding:4px 12px;border-radius:6px;background-color:var(--sys-color-surface-variant);color:var(--color-text-secondary);font-size:11px}.rn-welcome-docsfeed{display:flex;flex-direction:column;flex-shrink:0;align-items:stretch;max-width:700px;margin:0 auto;padding:24px}@media (width >= 1000px){.rn-welcome-docsfeed{flex-shrink:1;width:45%;max-height:100%;margin:0;padding:20px 24px;padding-right:80px;overflow:auto}}.rn-welcome-h2{flex-shrink:0;font-size:16px;font-weight:normal;color:var(--color-text-primary)}.rn-welcome-docsfeed-item{display:flex;flex-shrink:0;align-items:center;margin-bottom:8px;padding:8px;padding-right:16px;border:1px solid var(--input-outline);border-radius:4px;background-color:var(--color-background);text-align:left;font-size:14px;cursor:pointer}.rn-welcome-docsfeed-item:hover{background-color:var(--color-background-elevation-1)}.rn-welcome-docsfeed-item:focus{outline:solid var(--color-grid-focus-selected)}.rn-welcome-docsfeed-item p{margin:0;margin-bottom:4px;text-decoration:none}.rn-welcome-docsfeed-item :not(.devtools-link){color:var(--color-text-secondary)}.rn-welcome-image{flex-shrink:0;aspect-ratio:calc(16 / 9);height:64px;margin-right:16px;border-radius:2px;background-color:var(--sys-color-on-surface-subtle);background-position:center;background-size:cover}\n/*# sourceURL=${import.meta.resolve("./rnWelcome.css")} */\n`};const l={betaLabel:"Beta",techPreviewLabel:"Tech Preview",welcomeMessage:"Welcome to debugging in React Native",docsLabel:"Debugging docs",whatsNewLabel:"What's new",sessionIdMessage:"[FB-only] The ID for this React Native DevTools session is:",docsDebuggingBasics:"Debugging Basics",docsDebuggingBasicsDetail:"Overview of debugging tools in React Native",docsReactNativeDevTools:"React Native DevTools",docsReactDevToolsDetail:"Explore features available in React Native DevTools",docsNativeDebugging:"Native Debugging",docsNativeDebuggingDetail:"Find out more about native debugging tools"},c=i.i18n.registerUIStrings("panels/rn_welcome/RNWelcome.ts",l),d=i.i18n.getLocalizedString.bind(void 0,c);let g;class p extends s.Widget.VBox{options;#e;#i=!1;static instance(e){return g||(g=new p(e)),g}constructor(e){super(!0,!0),this.registerRequiredCSS(a),this.options=e,o.TargetManager.TargetManager.instance().observeModels(o.ReactNativeApplicationModel.ReactNativeApplicationModel,this)}wasShown(){super.wasShown(),this.render(),this.#i||s.InspectorView.InspectorView.instance().showDrawer({focus:!0,hasTargetDrawer:!1})}modelAdded(e){e.ensureEnabled(),e.addEventListener("MetadataUpdated",this.#t,this),this.#e=e.metadataCached?.reactNativeVersion,this.#i=e.metadataCached?.unstable_isProfilingBuild||!1}modelRemoved(e){e.removeEventListener("MetadataUpdated",this.#t,this)}#t(e){this.#e=e.data.reactNativeVersion,this.#i=e.data.unstable_isProfilingBuild||!1,this.isShowing()&&this.render()}#o(i){e.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(i)}render(){const{debuggerBrandName:e,showBetaLabel:i=!1,showTechPreviewLabel:o=!1,showDocs:s=!1}=this.options,a=new URL("../../Images/react_native/welcomeIcon.png",import.meta.url).toString(),c=new URL("../../Images/react_native/learn-debugging-basics.jpg",import.meta.url).toString(),g=new URL("../../Images/react_native/learn-react-native-devtools.jpg",import.meta.url).toString(),p=new URL("../../Images/react_native/learn-native-debugging.jpg",import.meta.url).toString(),m=t.Runtime.Runtime.queryParam("launchId");n(r` +import*as e from"../../core/host/host.js";import*as i from"../../core/i18n/i18n.js";import*as o from"../../core/root/root.js";import*as t from"../../core/sdk/sdk.js";import*as s from"../../ui/legacy/legacy.js";import{render as r,html as a}from"../../ui/lit/lit.js";var n={cssText:`.rn-welcome-panel{display:flex;flex-direction:column;flex-shrink:0;align-items:stretch;justify-content:center;padding:36px;background-color:var(--color-background);min-height:100%}@media (width >= 1000px){.rn-welcome-panel{flex-direction:row;align-items:center;justify-content:stretch;height:100%;padding:0}}.rn-welcome-hero{display:flex;flex-direction:column;flex-grow:1;flex-shrink:0;align-items:center;justify-content:center;padding:16px;text-align:center}@media (width >= 1000px){.rn-welcome-hero{margin-left:24px}}.rn-welcome-heading{display:flex;align-items:center;margin-bottom:16px}.rn-welcome-icon{width:30px;height:30px;border-radius:7px;margin-right:12px}.rn-welcome-title{font-size:20px;font-weight:normal;color:var(--color-text-primary)}.rn-welcome-title-accessory{margin-left:12px;padding:4px 8px;border-radius:6px;background-color:var(--sys-color-green-bright);font-size:12px;color:var(--sys-color-primary)}.rn-welcome-title-accessory-purple{background-color:var(--sys-color-purple-bright)}.rn-welcome-tagline{margin-bottom:24px;font-size:1rem;line-height:1.3;color:var(--color-text-secondary)}.rn-welcome-links{display:flex;align-items:center}.rn-welcome-links > .devtools-link{position:relative;margin:0 16px;font-size:14px}.rn-welcome-links > .devtools-link:not(:last-child)::after{content:"";position:absolute;right:-16px;height:16px;border-right:1px solid var(--sys-color-on-base-divider)}.rn-welcome-version{position:fixed;top:8px;right:8px;margin-top:24px;padding:4px 12px;border-radius:8px;background:var(--sys-color-surface2);color:var(--color-text-secondary);font-size:11px}.rn-welcome-docsfeed{display:flex;flex-direction:column;flex-shrink:0;align-items:stretch;max-width:700px;margin:0 auto;padding:24px}@media (width >= 1000px){.rn-welcome-docsfeed{flex-shrink:1;width:45%;max-height:100%;margin:0;padding:20px 24px;padding-right:80px;overflow:auto}}.rn-welcome-h2{flex-shrink:0;font-size:16px;font-weight:normal;color:var(--color-text-primary)}.rn-welcome-docsfeed-item{display:flex;flex-shrink:0;align-items:center;margin-bottom:8px;padding:8px;padding-right:16px;border:1px solid var(--sys-color-divider);border-radius:10px;background-color:var(--sys-color-base);text-align:left;font-size:14px;cursor:pointer}.rn-welcome-docsfeed-item:hover{background-color:var(--color-background-elevation-1)}.rn-welcome-docsfeed-item:focus{outline:solid var(--color-grid-focus-selected)}.rn-welcome-docsfeed-item p{margin:0;margin-bottom:4px;text-decoration:none}.rn-welcome-docsfeed-item :not(.devtools-link){color:var(--color-text-secondary)}.rn-welcome-image{flex-shrink:0;aspect-ratio:calc(16 / 9);height:70px;margin-right:16px;border-radius:6px;background-color:var(--sys-color-on-surface-subtle);background-position:center;background-size:cover}.rn-session-id-message{display:block;margin-top:64px;margin-bottom:8px}.rn-session-id{user-select:all;cursor:text}.code-block{background:var(--sys-color-surface2);padding:8px;border-radius:8px;color:var(--sys-color-on-surface);font-family:var(--monospace-font-family)}\n/*# sourceURL=${import.meta.resolve("./rnWelcome.css")} */\n`};const l={betaLabel:"Beta",techPreviewLabel:"Tech Preview",welcomeMessage:"Welcome to debugging in React Native",docsLabel:"Debugging docs",whatsNewLabel:"What's new",sessionIdMessage:"[FB-only] The ID for this React Native DevTools session is:",docsDebuggingBasics:"Debugging Basics",docsDebuggingBasicsDetail:"Overview of debugging tools in React Native",docsReactNativeDevTools:"React Native DevTools",docsReactDevToolsDetail:"Explore features available in React Native DevTools",docsNativeDebugging:"Native Debugging",docsNativeDebuggingDetail:"Find out more about native debugging tools"},c=i.i18n.registerUIStrings("panels/rn_welcome/RNWelcome.ts",l),d=i.i18n.getLocalizedString.bind(void 0,c);let g;class p extends s.Widget.VBox{options;#e;#i=!1;static instance(e){return g||(g=new p(e)),g}constructor(e){super(!0,!0),this.registerRequiredCSS(n),this.options=e,t.TargetManager.TargetManager.instance().observeModels(t.ReactNativeApplicationModel.ReactNativeApplicationModel,this)}wasShown(){super.wasShown(),this.render(),this.#i||s.InspectorView.InspectorView.instance().showDrawer({focus:!0,hasTargetDrawer:!1})}modelAdded(e){e.ensureEnabled(),e.addEventListener("MetadataUpdated",this.#o,this),this.#e=e.metadataCached?.reactNativeVersion,this.#i=e.metadataCached?.unstable_isProfilingBuild||!1}modelRemoved(e){e.removeEventListener("MetadataUpdated",this.#o,this)}#o(e){this.#e=e.data.reactNativeVersion,this.#i=e.data.unstable_isProfilingBuild||!1,this.isShowing()&&this.render()}#t(i){e.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(i)}render(){const{debuggerBrandName:e,showBetaLabel:i=!1,showTechPreviewLabel:t=!1,showDocs:s=!1}=this.options,n=new URL("../../Images/react_native/welcomeIcon.png",import.meta.url).toString(),c=new URL("../../Images/react_native/learn-debugging-basics.jpg",import.meta.url).toString(),g=new URL("../../Images/react_native/learn-react-native-devtools.jpg",import.meta.url).toString(),p=new URL("../../Images/react_native/learn-native-debugging.jpg",import.meta.url).toString(),m=o.Runtime.Runtime.queryParam("launchId");r(a`
- +

${e()}

- ${i?r` + ${i?a`
${d(l.betaLabel)}
`:null} - ${o?r` + ${t?a`
${d(l.techPreviewLabel)}
@@ -28,36 +28,38 @@ import*as e from"../../core/host/host.js";import*as i from"../../core/i18n/i18n. ${d(l.whatsNewLabel)}
- ${m?r` -
- ${d(l.sessionIdMessage)} -
+ ${m?a` +
+ `:""} - ${null!==this.#e&&void 0!==this.#e?r` + ${null!==this.#e&&void 0!==this.#e?a`

React Native: ${this.#e}

`:null}
- ${s?r` + ${s?a`

Learn

- - -