@skyramp/mcp 0.4.4 → 0.5.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/entitlements/entitlementGate.d.ts +8 -0
- package/build/entitlements/entitlementGate.js +57 -0
- package/build/entitlements/runCodes.d.ts +18 -0
- package/build/entitlements/runCodes.js +16 -0
- package/build/index.js +32 -6
- package/build/playwright/PlaywrightTraceService.d.ts +17 -0
- package/build/playwright/PlaywrightTraceService.js +29 -1
- package/build/playwright/dataSafetyConfig.d.ts +74 -0
- package/build/playwright/dataSafetyConfig.js +109 -0
- package/build/playwright/essentialTools.d.ts +1 -0
- package/build/playwright/essentialTools.js +44 -0
- package/build/playwright/registerPlaywrightTools.d.ts +36 -1
- package/build/playwright/registerPlaywrightTools.js +87 -43
- package/build/playwright/safeResolveDataSafety.d.ts +24 -0
- package/build/playwright/safeResolveDataSafety.js +33 -0
- package/build/prompts/initialize-workspace/initializeWorkspacePrompt.d.ts +17 -0
- package/build/prompts/initialize-workspace/initializeWorkspacePrompt.js +46 -177
- package/build/prompts/modularization/ui-test-modularization.d.ts +1 -0
- package/build/prompts/modularization/ui-test-modularization.js +9 -2
- package/build/prompts/test-maintenance/driftAnalysisShared.js +1 -1
- package/build/services/FleetExecutionService.d.ts +87 -16
- package/build/services/FleetExecutionService.js +487 -48
- package/build/services/FleetRunRegistry.d.ts +49 -0
- package/build/services/FleetRunRegistry.js +178 -0
- package/build/services/containerEnv.js +8 -2
- package/build/services/fleetLimitConfirmation.d.ts +19 -0
- package/build/services/fleetLimitConfirmation.js +126 -0
- package/build/tool-phases.d.ts +14 -8
- package/build/tool-phases.js +88 -43
- package/build/tools/code-refactor/assertion-state.js +3 -1
- package/build/tools/code-refactor/codeReuseTool.js +2 -1
- package/build/tools/code-refactor/utils-verify-gates.js +1 -1
- package/build/tools/executeFleetTool.d.ts +6 -4
- package/build/tools/executeFleetTool.js +67 -23
- package/build/tools/fixErrorTool.js +2 -1
- package/build/tools/fleetLifecycleTools.d.ts +20 -0
- package/build/tools/fleetLifecycleTools.js +124 -0
- package/build/tools/generate-tests/generateIntegrationRestTool.d.ts +38 -0
- package/build/tools/generate-tests/generateIntegrationRestTool.js +7 -1
- package/build/tools/generate-tests/generateUILoadRestTool.d.ts +19 -1
- package/build/tools/generate-tests/generateUILoadRestTool.js +316 -50
- package/build/tools/submitReportTool.js +4 -122
- package/build/tools/test-management/registerTestPlanTool.js +22 -6
- package/build/tools/workspace/initScanWorkspaceTool.d.ts +11 -1
- package/build/tools/workspace/initScanWorkspaceTool.js +111 -9
- package/build/tools/workspace/initializeWorkspaceTool.js +40 -4
- package/build/types/AssertionOutcome.d.ts +3 -0
- package/build/types/TestbotReport.d.ts +0 -37
- package/build/types/TestbotReport.js +0 -22
- package/build/types/index.d.ts +1 -1
- package/build/types/index.js +1 -1
- package/build/utils/assertion-verify/created-add-guard.d.ts +12 -0
- package/build/utils/assertion-verify/created-add-guard.js +173 -0
- package/build/utils/assertion-verify/index.d.ts +1 -0
- package/build/utils/assertion-verify/index.js +1 -0
- package/build/utils/assertion-verify/verify.d.ts +7 -3
- package/build/utils/assertion-verify/verify.js +9 -3
- package/build/utils/featureFlags.js +6 -3
- package/build/utils/repositorySlug.d.ts +14 -0
- package/build/utils/repositorySlug.js +46 -1
- package/build/utils/telemetry.d.ts +2 -0
- package/build/utils/telemetry.js +12 -0
- package/build/utils/utils-verify/action-key.d.ts +59 -2
- package/build/utils/utils-verify/action-key.js +162 -6
- package/build/utils/utils-verify/action-sites.d.ts +7 -0
- package/build/utils/utils-verify/action-sites.js +277 -35
- package/build/utils/utils-verify/call-sites.d.ts +8 -2
- package/build/utils/utils-verify/language-spec.js +1 -1
- package/build/utils/utils-verify/parse.d.ts +4 -0
- package/build/utils/utils-verify/parse.js +2 -1
- package/build/utils/versions.d.ts +3 -3
- package/build/utils/versions.js +1 -1
- package/build/workspace/workspace.d.ts +63 -121
- package/build/workspace/workspace.js +45 -48
- package/build/workspace/workspaceVerifier.d.ts +22 -0
- package/build/workspace/workspaceVerifier.js +65 -0
- package/node_modules/playwright/lib/dom-analyzer/blueprint.js +7 -6
- package/node_modules/playwright/lib/dom-analyzer/dynamicId.js +5 -4
- package/node_modules/playwright/lib/dom-analyzer/dynamicId.test.js +12 -0
- package/node_modules/playwright/lib/mcp/skyramp/dataSafetyGuard.js +822 -0
- package/node_modules/playwright/lib/mcp/skyramp/dataSafetySession.js +372 -0
- package/node_modules/playwright/lib/mcp/skyramp/exportTool.js +101 -8
- package/node_modules/playwright/lib/mcp/skyramp/finishTestSetupTool.js +45 -0
- package/node_modules/playwright/lib/mcp/skyramp/index.js +16 -0
- package/node_modules/playwright/lib/mcp/skyramp/recordingPhase.js +65 -0
- package/node_modules/playwright/lib/mcp/skyramp/skyRampImport.js +1 -0
- package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +598 -127
- package/node_modules/playwright/lib/mcp/test/skyRampExport.js +85 -31
- package/node_modules/playwright/lib/mcp/test/skyRampExport.test.js +132 -5
- package/node_modules/playwright/node_modules/playwright-core/lib/cli/program.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/client/browserContext.js +4 -2
- package/node_modules/playwright/node_modules/playwright-core/lib/generated/injectedScriptSource.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/protocol/validator.js +2 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/server/browserContext.js +17 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/server/codegen/skyramp/jsonlReader.js +1 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/server/har/harRecorder.js +1 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/server/har/harTracer.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +2 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +2 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/skyramp/clickExpandedState.js +75 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder.js +4 -2
- package/node_modules/playwright/node_modules/playwright-core/lib/utils/isomorphic/volatileDate.js +85 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/{codeMirrorModule-Bou8kKzE.js → codeMirrorModule-BuhAdckO.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-COAHN430.js +809 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.0MJW0uG7.js → index.7AU8h0PZ.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +2 -2
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{uiMode.GLqsx5cI.js → uiMode.Dl7smBJn.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +2 -2
- package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/cli/program.ts +5 -0
- package/node_modules/playwright/node_modules/playwright-core/src/client/browserContext.ts +3 -1
- package/node_modules/playwright/node_modules/playwright-core/src/client/types.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/src/generated/injectedScriptSource.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/generated/pollingRecorderSource.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/protocol/validator.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/browserContext.ts +25 -1
- package/node_modules/playwright/node_modules/playwright-core/src/server/codegen/skyramp/jsonlReader.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/har/harRecorder.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/har/harTracer.ts +3 -1
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderRunner.ts +3 -1
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderSignalProcessor.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/skyramp/clickExpandedState.ts +82 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/src/utils/isomorphic/volatileDate.ts +137 -1
- package/node_modules/playwright/package.json +1 -1
- package/package.json +4 -4
- package/plugin/prompts/plan-tests.md +2 -2
- package/plugin/prompts/testbot-task1.md +1 -1
- package/plugin/skills/enhance-assertions/reference/integration.md +1 -0
- package/plugin/skills/setup-testbot-target-sut/SKILL.md +60 -0
- package/plugin/skills/setup-testbot-target-sut/reference/ci-workflow.md +26 -0
- package/plugin/skills/setup-testbot-target-sut/reference/deployed-environment.md +105 -0
- package/plugin/skills/setup-testbot-target-sut/reference/existing-tests.md +14 -0
- package/plugin/skills/setup-testbot-target-sut/reference/troubleshooting.md +20 -0
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.d.ts +0 -2
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +0 -178
- package/build/prompts/sut-setup/modes/dockerComposePrompt.d.ts +0 -2
- package/build/prompts/sut-setup/modes/dockerComposePrompt.js +0 -311
- package/build/prompts/sut-setup/shared.d.ts +0 -62
- package/build/prompts/sut-setup/shared.js +0 -196
- package/build/resources/sutSetupResource.d.ts +0 -2
- package/build/resources/sutSetupResource.js +0 -63
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-DTp2-8Si.js +0 -809
|
@@ -0,0 +1,809 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-BuhAdckO.js","../codeMirrorModule.DYBRYzYX.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Wx=Object.defineProperty;var Jx=(i,e,t)=>e in i?Wx(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Xo=(i,e,t)=>Jx(i,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function t(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(o){if(o.ep)return;o.ep=!0;const a=t(o);fetch(o.href,a)}})();function Zx(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Dh={exports:{}},Yo={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var j_;function Qx(){if(j_)return Yo;j_=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,o,a){var c=null;if(a!==void 0&&(c=""+a),o.key!==void 0&&(c=""+o.key),"key"in o){a={};for(var u in o)u!=="key"&&(a[u]=o[u])}else a=o;return o=a.ref,{$$typeof:i,type:n,key:c,ref:o!==void 0?o:null,props:a}}return Yo.Fragment=e,Yo.jsx=t,Yo.jsxs=t,Yo}var H_;function eT(){return H_||(H_=1,Dh.exports=Qx()),Dh.exports}var T=eT(),Lh={exports:{}},fe={};/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react.production.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var $_;function tT(){if($_)return fe;$_=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),_=Symbol.iterator;function b(M){return M===null||typeof M!="object"?null:(M=_&&M[_]||M["@@iterator"],typeof M=="function"?M:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,x={};function E(M,G,ee){this.props=M,this.context=G,this.refs=x,this.updater=ee||S}E.prototype.isReactComponent={},E.prototype.setState=function(M,G){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,G,"setState")},E.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function C(){}C.prototype=E.prototype;function L(M,G,ee){this.props=M,this.context=G,this.refs=x,this.updater=ee||S}var R=L.prototype=new C;R.constructor=L,v(R,E.prototype),R.isPureReactComponent=!0;var N=Array.isArray;function V(){}var I={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function O(M,G,ee){var ne=ee.ref;return{$$typeof:i,type:M,key:G,ref:ne!==void 0?ne:null,props:ee}}function Q(M,G){return O(M.type,G,M.props)}function se(M){return typeof M=="object"&&M!==null&&M.$$typeof===i}function Y(M){var G={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(ee){return G[ee]})}var W=/\/+/g;function te(M,G){return typeof M=="object"&&M!==null&&M.key!=null?Y(""+M.key):G.toString(36)}function Ne(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(V,V):(M.status="pending",M.then(function(G){M.status==="pending"&&(M.status="fulfilled",M.value=G)},function(G){M.status==="pending"&&(M.status="rejected",M.reason=G)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function P(M,G,ee,ne,de){var ae=typeof M;(ae==="undefined"||ae==="boolean")&&(M=null);var Ee=!1;if(M===null)Ee=!0;else switch(ae){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(M.$$typeof){case i:case e:Ee=!0;break;case y:return Ee=M._init,P(Ee(M._payload),G,ee,ne,de)}}if(Ee)return de=de(M),Ee=ne===""?"."+te(M,0):ne,N(de)?(ee="",Ee!=null&&(ee=Ee.replace(W,"$&/")+"/"),P(de,G,ee,"",function(Zi){return Zi})):de!=null&&(se(de)&&(de=Q(de,ee+(de.key==null||M&&M.key===de.key?"":(""+de.key).replace(W,"$&/")+"/")+Ee)),G.push(de)),1;Ee=0;var at=ne===""?".":ne+":";if(N(M))for(var $e=0;$e<M.length;$e++)ne=M[$e],ae=at+te(ne,$e),Ee+=P(ne,G,ee,ae,de);else if($e=b(M),typeof $e=="function")for(M=$e.call(M),$e=0;!(ne=M.next()).done;)ne=ne.value,ae=at+te(ne,$e++),Ee+=P(ne,G,ee,ae,de);else if(ae==="object"){if(typeof M.then=="function")return P(Ne(M),G,ee,ne,de);throw G=String(M),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function Z(M,G,ee){if(M==null)return M;var ne=[],de=0;return P(M,ne,"","",function(ae){return G.call(ee,ae,de++)}),ne}function oe(M){if(M._status===-1){var G=M._result;G=G(),G.then(function(ee){(M._status===0||M._status===-1)&&(M._status=1,M._result=ee)},function(ee){(M._status===0||M._status===-1)&&(M._status=2,M._result=ee)}),M._status===-1&&(M._status=0,M._result=G)}if(M._status===1)return M._result.default;throw M._result}var xe=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},Te={map:Z,forEach:function(M,G,ee){Z(M,function(){G.apply(this,arguments)},ee)},count:function(M){var G=0;return Z(M,function(){G++}),G},toArray:function(M){return Z(M,function(G){return G})||[]},only:function(M){if(!se(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return fe.Activity=m,fe.Children=Te,fe.Component=E,fe.Fragment=t,fe.Profiler=o,fe.PureComponent=L,fe.StrictMode=n,fe.Suspense=h,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,fe.__COMPILER_RUNTIME={__proto__:null,c:function(M){return I.H.useMemoCache(M)}},fe.cache=function(M){return function(){return M.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(M,G,ee){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var ne=v({},M.props),de=M.key;if(G!=null)for(ae in G.key!==void 0&&(de=""+G.key),G)!B.call(G,ae)||ae==="key"||ae==="__self"||ae==="__source"||ae==="ref"&&G.ref===void 0||(ne[ae]=G[ae]);var ae=arguments.length-2;if(ae===1)ne.children=ee;else if(1<ae){for(var Ee=Array(ae),at=0;at<ae;at++)Ee[at]=arguments[at+2];ne.children=Ee}return O(M.type,de,ne)},fe.createContext=function(M){return M={$$typeof:c,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:a,_context:M},M},fe.createElement=function(M,G,ee){var ne,de={},ae=null;if(G!=null)for(ne in G.key!==void 0&&(ae=""+G.key),G)B.call(G,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(de[ne]=G[ne]);var Ee=arguments.length-2;if(Ee===1)de.children=ee;else if(1<Ee){for(var at=Array(Ee),$e=0;$e<Ee;$e++)at[$e]=arguments[$e+2];de.children=at}if(M&&M.defaultProps)for(ne in Ee=M.defaultProps,Ee)de[ne]===void 0&&(de[ne]=Ee[ne]);return O(M,ae,de)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(M){return{$$typeof:u,render:M}},fe.isValidElement=se,fe.lazy=function(M){return{$$typeof:y,_payload:{_status:-1,_result:M},_init:oe}},fe.memo=function(M,G){return{$$typeof:f,type:M,compare:G===void 0?null:G}},fe.startTransition=function(M){var G=I.T,ee={};I.T=ee;try{var ne=M(),de=I.S;de!==null&&de(ee,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(V,xe)}catch(ae){xe(ae)}finally{G!==null&&ee.types!==null&&(G.types=ee.types),I.T=G}},fe.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},fe.use=function(M){return I.H.use(M)},fe.useActionState=function(M,G,ee){return I.H.useActionState(M,G,ee)},fe.useCallback=function(M,G){return I.H.useCallback(M,G)},fe.useContext=function(M){return I.H.useContext(M)},fe.useDebugValue=function(){},fe.useDeferredValue=function(M,G){return I.H.useDeferredValue(M,G)},fe.useEffect=function(M,G){return I.H.useEffect(M,G)},fe.useEffectEvent=function(M){return I.H.useEffectEvent(M)},fe.useId=function(){return I.H.useId()},fe.useImperativeHandle=function(M,G,ee){return I.H.useImperativeHandle(M,G,ee)},fe.useInsertionEffect=function(M,G){return I.H.useInsertionEffect(M,G)},fe.useLayoutEffect=function(M,G){return I.H.useLayoutEffect(M,G)},fe.useMemo=function(M,G){return I.H.useMemo(M,G)},fe.useOptimistic=function(M,G){return I.H.useOptimistic(M,G)},fe.useReducer=function(M,G,ee){return I.H.useReducer(M,G,ee)},fe.useRef=function(M){return I.H.useRef(M)},fe.useState=function(M){return I.H.useState(M)},fe.useSyncExternalStore=function(M,G,ee){return I.H.useSyncExternalStore(M,G,ee)},fe.useTransition=function(){return I.H.useTransition()},fe.version="19.2.1",fe}var z_;function Pf(){return z_||(z_=1,Lh.exports=tT()),Lh.exports}var q=Pf();const wt=Zx(q);function Ec(i,e,t,n){const[o,a]=wt.useState(t);return wt.useEffect(()=>{let c=!1;return i().then(u=>{c||a(u)}),()=>{c=!0}},e),o}function Ds(){const i=wt.useRef(null),[e]=pf(i);return[e,i]}function pf(i){const[e,t]=wt.useState(new DOMRect(0,0,10,10)),n=wt.useCallback(()=>{const o=i==null?void 0:i.current;o&&t(o.getBoundingClientRect())},[i]);return wt.useLayoutEffect(()=>{const o=i==null?void 0:i.current;if(!o)return;n();const a=new ResizeObserver(n);return a.observe(o),window.addEventListener("resize",n),()=>{a.disconnect(),window.removeEventListener("resize",n)}},[n,i]),[e,n]}function Nt(i){if(i<0||!isFinite(i))return"-";if(i===0)return"0";if(i<1e3)return i.toFixed(0)+"ms";const e=i/1e3;if(e<60)return e.toFixed(1)+"s";const t=e/60;if(t<60)return t.toFixed(1)+"m";const n=t/60;return n<24?n.toFixed(1)+"h":(n/24).toFixed(1)+"d"}function nT(i){if(i<0||!isFinite(i))return"-";if(i===0)return"0";if(i<1e3)return i.toFixed(0);const e=i/1024;if(e<1e3)return e.toFixed(1)+"K";const t=e/1024;return t<1e3?t.toFixed(1)+"M":(t/1024).toFixed(1)+"G"}function E0(i,e,t,n,o){let a=0,c=i.length;for(;a<c;){const u=a+c>>1;t(e,i[u])>=0?a=u+1:c=u}return c}function I_(i){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=i,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function pn(i,e){i&&(e=Ss.getObject(i,e));const[t,n]=wt.useState(e),o=wt.useCallback(a=>{i?Ss.setObject(i,a):n(a)},[i,n]);return wt.useEffect(()=>{if(i){const a=()=>n(Ss.getObject(i,e));return Ss.onChangeEmitter.addEventListener(i,a),()=>Ss.onChangeEmitter.removeEventListener(i,a)}},[e,i]),[t,o]}const mf=new Map,A0=new Map;let Ac;function Pi(i,e){const[t,n]=wt.useState();A0.set(i,{setter:n,defaultValue:e});const o=wt.useCallback(a=>{const c=mf.get(Ac||"default")||{};c[i]=a,mf.set(Ac||"default",c),n(a)},[i]);return[t,o]}function iT(i){if(Ac===i)return;Ac=i;const e=mf.get(i)||{};for(const[t,n]of A0.entries())n.setter(e[t]||n.defaultValue)}class sT{constructor(){this.onChangeEmitter=new EventTarget}getString(e,t){return localStorage[e]||t}setString(e,t){var n;localStorage[e]=t,this.onChangeEmitter.dispatchEvent(new Event(e)),(n=window.saveSettings)==null||n.call(window)}getObject(e,t){if(!localStorage[e])return t;try{return JSON.parse(localStorage[e])}catch{return t}}setObject(e,t){var n;localStorage[e]=JSON.stringify(t),this.onChangeEmitter.dispatchEvent(new Event(e)),(n=window.saveSettings)==null||n.call(window)}}const Ss=new sT;function et(...i){return i.filter(Boolean).join(" ")}function C0(i){i&&(i!=null&&i.scrollIntoViewIfNeeded?i.scrollIntoViewIfNeeded(!1):i==null||i.scrollIntoView())}const B_="\\u0000-\\u0020\\u007f-\\u009f",k0=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+B_+'"]{2,}[^\\s'+B_+`"')}\\],:;.!?]`,"ug");function rT(){const[i,e]=wt.useState(!1),t=wt.useCallback(()=>{const n=[];return e(o=>(n.push(setTimeout(()=>e(!1),1e3)),o?(n.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>n.forEach(clearTimeout)},[e]);return[i,t]}const oT="system",N0="theme",aT=[{label:"Dark mode",value:"dark-mode"},{label:"Light mode",value:"light-mode"},{label:"System",value:"system"}],M0=window.matchMedia("(prefers-color-scheme: dark)");function JM(){document.playwrightThemeInitialized||(document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",i=>{i.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",i=>{document.body.classList.add("inactive")},!1),yf(_f()),M0.addEventListener("change",()=>{yf(_f())}))}const qf=new Set;function yf(i){const e=lT(),t=i==="system"?M0.matches?"dark-mode":"light-mode":i;if(e!==t){e&&document.documentElement.classList.remove(e),document.documentElement.classList.add(t);for(const n of qf)n(t)}}function ZM(i){qf.add(i)}function QM(i){qf.delete(i)}function _f(){return Ss.getString(N0,oT)}function lT(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":document.documentElement.classList.contains("light-mode")?"light-mode":null}function cT(){const[i,e]=wt.useState(_f());return wt.useEffect(()=>{Ss.setString(N0,i),yf(i)},[i]),[i,e]}var Oh={exports:{}},Ko={},Rh={exports:{}},jh={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var P_;function uT(){return P_||(P_=1,(function(i){function e(P,Z){var oe=P.length;P.push(Z);e:for(;0<oe;){var xe=oe-1>>>1,Te=P[xe];if(0<o(Te,Z))P[xe]=Z,P[oe]=Te,oe=xe;else break e}}function t(P){return P.length===0?null:P[0]}function n(P){if(P.length===0)return null;var Z=P[0],oe=P.pop();if(oe!==Z){P[0]=oe;e:for(var xe=0,Te=P.length,M=Te>>>1;xe<M;){var G=2*(xe+1)-1,ee=P[G],ne=G+1,de=P[ne];if(0>o(ee,oe))ne<Te&&0>o(de,ee)?(P[xe]=de,P[ne]=oe,xe=ne):(P[xe]=ee,P[G]=oe,xe=G);else if(ne<Te&&0>o(de,oe))P[xe]=de,P[ne]=oe,xe=ne;else break e}}return Z}function o(P,Z){var oe=P.sortIndex-Z.sortIndex;return oe!==0?oe:P.id-Z.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;i.unstable_now=function(){return a.now()}}else{var c=Date,u=c.now();i.unstable_now=function(){return c.now()-u}}var h=[],f=[],y=1,m=null,_=3,b=!1,S=!1,v=!1,x=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function R(P){for(var Z=t(f);Z!==null;){if(Z.callback===null)n(f);else if(Z.startTime<=P)n(f),Z.sortIndex=Z.expirationTime,e(h,Z);else break;Z=t(f)}}function N(P){if(v=!1,R(P),!S)if(t(h)!==null)S=!0,V||(V=!0,Y());else{var Z=t(f);Z!==null&&Ne(N,Z.startTime-P)}}var V=!1,I=-1,B=5,O=-1;function Q(){return x?!0:!(i.unstable_now()-O<B)}function se(){if(x=!1,V){var P=i.unstable_now();O=P;var Z=!0;try{e:{S=!1,v&&(v=!1,C(I),I=-1),b=!0;var oe=_;try{t:{for(R(P),m=t(h);m!==null&&!(m.expirationTime>P&&Q());){var xe=m.callback;if(typeof xe=="function"){m.callback=null,_=m.priorityLevel;var Te=xe(m.expirationTime<=P);if(P=i.unstable_now(),typeof Te=="function"){m.callback=Te,R(P),Z=!0;break t}m===t(h)&&n(h),R(P)}else n(h);m=t(h)}if(m!==null)Z=!0;else{var M=t(f);M!==null&&Ne(N,M.startTime-P),Z=!1}}break e}finally{m=null,_=oe,b=!1}Z=void 0}}finally{Z?Y():V=!1}}}var Y;if(typeof L=="function")Y=function(){L(se)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,te=W.port2;W.port1.onmessage=se,Y=function(){te.postMessage(null)}}else Y=function(){E(se,0)};function Ne(P,Z){I=E(function(){P(i.unstable_now())},Z)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(P){P.callback=null},i.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<P?Math.floor(1e3/P):5},i.unstable_getCurrentPriorityLevel=function(){return _},i.unstable_next=function(P){switch(_){case 1:case 2:case 3:var Z=3;break;default:Z=_}var oe=_;_=Z;try{return P()}finally{_=oe}},i.unstable_requestPaint=function(){x=!0},i.unstable_runWithPriority=function(P,Z){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var oe=_;_=P;try{return Z()}finally{_=oe}},i.unstable_scheduleCallback=function(P,Z,oe){var xe=i.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?xe+oe:xe):oe=xe,P){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=oe+Te,P={id:y++,callback:Z,priorityLevel:P,startTime:oe,expirationTime:Te,sortIndex:-1},oe>xe?(P.sortIndex=oe,e(f,P),t(h)===null&&P===t(f)&&(v?(C(I),I=-1):v=!0,Ne(N,oe-xe))):(P.sortIndex=Te,e(h,P),S||b||(S=!0,V||(V=!0,Y()))),P},i.unstable_shouldYield=Q,i.unstable_wrapCallback=function(P){var Z=_;return function(){var oe=_;_=Z;try{return P.apply(this,arguments)}finally{_=oe}}}})(jh)),jh}var q_;function dT(){return q_||(q_=1,Rh.exports=uT()),Rh.exports}var Hh={exports:{}},xt={};/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var U_;function hT(){if(U_)return xt;U_=1;var i=Pf();function e(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)f+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var n={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},o=Symbol.for("react.portal");function a(h,f,y){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:m==null?null:""+m,children:h,containerInfo:f,implementation:y}}var c=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,xt.createPortal=function(h,f){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return a(h,f,null,y)},xt.flushSync=function(h){var f=c.T,y=n.p;try{if(c.T=null,n.p=2,h)return h()}finally{c.T=f,n.p=y,n.d.f()}},xt.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,n.d.C(h,f))},xt.prefetchDNS=function(h){typeof h=="string"&&n.d.D(h)},xt.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var y=f.as,m=u(y,f.crossOrigin),_=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;y==="style"?n.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:_,fetchPriority:b}):y==="script"&&n.d.X(h,{crossOrigin:m,integrity:_,fetchPriority:b,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},xt.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var y=u(f.as,f.crossOrigin);n.d.M(h,{crossOrigin:y,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&n.d.M(h)},xt.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var y=f.as,m=u(y,f.crossOrigin);n.d.L(h,y,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},xt.preloadModule=function(h,f){if(typeof h=="string")if(f){var y=u(f.as,f.crossOrigin);n.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:y,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else n.d.m(h)},xt.requestFormReset=function(h){n.d.r(h)},xt.unstable_batchedUpdates=function(h,f){return h(f)},xt.useFormState=function(h,f,y){return c.H.useFormState(h,f,y)},xt.useFormStatus=function(){return c.H.useHostTransitionStatus()},xt.version="19.2.1",xt}var V_;function fT(){if(V_)return Hh.exports;V_=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),Hh.exports=hT(),Hh.exports}/**
|
|
35
|
+
* @license React
|
|
36
|
+
* react-dom-client.production.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/var F_;function gT(){if(F_)return Ko;F_=1;var i=dT(),e=Pf(),t=fT();function n(s){var r="https://react.dev/errors/"+s;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+s+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function a(s){var r=s,l=s;if(s.alternate)for(;r.return;)r=r.return;else{s=r;do r=s,(r.flags&4098)!==0&&(l=r.return),s=r.return;while(s)}return r.tag===3?l:null}function c(s){if(s.tag===13){var r=s.memoizedState;if(r===null&&(s=s.alternate,s!==null&&(r=s.memoizedState)),r!==null)return r.dehydrated}return null}function u(s){if(s.tag===31){var r=s.memoizedState;if(r===null&&(s=s.alternate,s!==null&&(r=s.memoizedState)),r!==null)return r.dehydrated}return null}function h(s){if(a(s)!==s)throw Error(n(188))}function f(s){var r=s.alternate;if(!r){if(r=a(s),r===null)throw Error(n(188));return r!==s?null:s}for(var l=s,d=r;;){var g=l.return;if(g===null)break;var p=g.alternate;if(p===null){if(d=g.return,d!==null){l=d;continue}break}if(g.child===p.child){for(p=g.child;p;){if(p===l)return h(g),s;if(p===d)return h(g),r;p=p.sibling}throw Error(n(188))}if(l.return!==d.return)l=g,d=p;else{for(var w=!1,A=g.child;A;){if(A===l){w=!0,l=g,d=p;break}if(A===d){w=!0,d=g,l=p;break}A=A.sibling}if(!w){for(A=p.child;A;){if(A===l){w=!0,l=p,d=g;break}if(A===d){w=!0,d=p,l=g;break}A=A.sibling}if(!w)throw Error(n(189))}}if(l.alternate!==d)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?s:r}function y(s){var r=s.tag;if(r===5||r===26||r===27||r===6)return s;for(s=s.child;s!==null;){if(r=y(s),r!==null)return r;s=s.sibling}return null}var m=Object.assign,_=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),L=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function Y(s){return s===null||typeof s!="object"?null:(s=se&&s[se]||s["@@iterator"],typeof s=="function"?s:null)}var W=Symbol.for("react.client.reference");function te(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===W?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case v:return"Fragment";case E:return"Profiler";case x:return"StrictMode";case N:return"Suspense";case V:return"SuspenseList";case O:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case S:return"Portal";case L:return s.displayName||"Context";case C:return(s._context.displayName||"Context")+".Consumer";case R:var r=s.render;return s=s.displayName,s||(s=r.displayName||r.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case I:return r=s.displayName||null,r!==null?r:te(s.type)||"Memo";case B:r=s._payload,s=s._init;try{return te(s(r))}catch{}}return null}var Ne=Array.isArray,P=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},xe=[],Te=-1;function M(s){return{current:s}}function G(s){0>Te||(s.current=xe[Te],xe[Te]=null,Te--)}function ee(s,r){Te++,xe[Te]=s.current,s.current=r}var ne=M(null),de=M(null),ae=M(null),Ee=M(null);function at(s,r){switch(ee(ae,r),ee(de,s),ee(ne,null),r.nodeType){case 9:case 11:s=(s=r.documentElement)&&(s=s.namespaceURI)?s_(s):0;break;default:if(s=r.tagName,r=r.namespaceURI)r=s_(r),s=r_(r,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}G(ne),ee(ne,s)}function $e(){G(ne),G(de),G(ae)}function Zi(s){s.memoizedState!==null&&ee(Ee,s);var r=ne.current,l=r_(r,s.type);r!==l&&(ee(de,s),ee(ne,l))}function Bn(s){de.current===s&&(G(ne),G(de)),Ee.current===s&&(G(Ee),Uo._currentValue=oe)}var vn,Jr;function lt(s){if(vn===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);vn=r&&r[1]||"",Jr=-1<l.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+vn+s+Jr}var js=!1;function Zr(s,r){if(!s||js)return"";js=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(r){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(U){var z=U}Reflect.construct(s,[],K)}else{try{K.call()}catch(U){z=U}s.call(K.prototype)}}else{try{throw Error()}catch(U){z=U}(K=s())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(U){if(U&&z&&typeof U.stack=="string")return[U.stack,z.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=d.DetermineComponentFrameRoot(),w=p[0],A=p[1];if(w&&A){var k=w.split(`
|
|
45
|
+
`),$=A.split(`
|
|
46
|
+
`);for(g=d=0;d<k.length&&!k[d].includes("DetermineComponentFrameRoot");)d++;for(;g<$.length&&!$[g].includes("DetermineComponentFrameRoot");)g++;if(d===k.length||g===$.length)for(d=k.length-1,g=$.length-1;1<=d&&0<=g&&k[d]!==$[g];)g--;for(;1<=d&&0<=g;d--,g--)if(k[d]!==$[g]){if(d!==1||g!==1)do if(d--,g--,0>g||k[d]!==$[g]){var F=`
|
|
47
|
+
`+k[d].replace(" at new "," at ");return s.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",s.displayName)),F}while(1<=d&&0<=g);break}}}finally{js=!1,Error.prepareStackTrace=l}return(l=s?s.displayName||s.name:"")?lt(l):""}function fu(s,r){switch(s.tag){case 26:case 27:case 5:return lt(s.type);case 16:return lt("Lazy");case 13:return s.child!==r&&r!==null?lt("Suspense Fallback"):lt("Suspense");case 19:return lt("SuspenseList");case 0:case 15:return Zr(s.type,!1);case 11:return Zr(s.type.render,!1);case 1:return Zr(s.type,!0);case 31:return lt("Activity");default:return""}}function Hs(s){try{var r="",l=null;do r+=fu(s,l),l=s,s=s.return;while(s);return r}catch(d){return`
|
|
48
|
+
Error generating stack: `+d.message+`
|
|
49
|
+
`+d.stack}}var Qi=Object.prototype.hasOwnProperty,gi=i.unstable_scheduleCallback,Qr=i.unstable_cancelCallback,pi=i.unstable_shouldYield,gu=i.unstable_requestPaint,Et=i.unstable_now,pu=i.unstable_getCurrentPriorityLevel,Ra=i.unstable_ImmediatePriority,eo=i.unstable_UserBlockingPriority,mi=i.unstable_NormalPriority,mu=i.unstable_LowPriority,ja=i.unstable_IdlePriority,yu=i.log,es=i.unstable_setDisableYieldValue,Pn=null,ht=null;function Nn(s){if(typeof yu=="function"&&es(s),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Pn,s)}catch{}}var At=Math.clz32?Math.clz32:ue,_u=Math.log,Ha=Math.LN2;function ue(s){return s>>>=0,s===0?32:31-(_u(s)/Ha|0)|0}var Mn=256,Qt=262144,$a=4194304;function ts(s){var r=s&42;if(r!==0)return r;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function za(s,r,l){var d=s.pendingLanes;if(d===0)return 0;var g=0,p=s.suspendedLanes,w=s.pingedLanes;s=s.warmLanes;var A=d&134217727;return A!==0?(d=A&~p,d!==0?g=ts(d):(w&=A,w!==0?g=ts(w):l||(l=A&~s,l!==0&&(g=ts(l))))):(A=d&~p,A!==0?g=ts(A):w!==0?g=ts(w):l||(l=d&~s,l!==0&&(g=ts(l)))),g===0?0:r!==0&&r!==g&&(r&p)===0&&(p=g&-g,l=r&-r,p>=l||p===32&&(l&4194048)!==0)?r:g}function to(s,r){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&r)===0}function $w(s,r){switch(s){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ig(){var s=$a;return $a<<=1,($a&62914560)===0&&($a=4194304),s}function bu(s){for(var r=[],l=0;31>l;l++)r.push(s);return r}function no(s,r){s.pendingLanes|=r,r!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function zw(s,r,l,d,g,p){var w=s.pendingLanes;s.pendingLanes=l,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=l,s.entangledLanes&=l,s.errorRecoveryDisabledLanes&=l,s.shellSuspendCounter=0;var A=s.entanglements,k=s.expirationTimes,$=s.hiddenUpdates;for(l=w&~l;0<l;){var F=31-At(l),K=1<<F;A[F]=0,k[F]=-1;var z=$[F];if(z!==null)for($[F]=null,F=0;F<z.length;F++){var U=z[F];U!==null&&(U.lane&=-536870913)}l&=~K}d!==0&&Bg(s,d,0),p!==0&&g===0&&s.tag!==0&&(s.suspendedLanes|=p&~(w&~r))}function Bg(s,r,l){s.pendingLanes|=r,s.suspendedLanes&=~r;var d=31-At(r);s.entangledLanes|=r,s.entanglements[d]=s.entanglements[d]|1073741824|l&261930}function Pg(s,r){var l=s.entangledLanes|=r;for(s=s.entanglements;l;){var d=31-At(l),g=1<<d;g&r|s[d]&r&&(s[d]|=r),l&=~g}}function qg(s,r){var l=r&-r;return l=(l&42)!==0?1:vu(l),(l&(s.suspendedLanes|r))!==0?0:l}function vu(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Su(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Ug(){var s=Z.p;return s!==0?s:(s=window.event,s===void 0?32:k_(s.type))}function Vg(s,r){var l=Z.p;try{return Z.p=s,r()}finally{Z.p=l}}var yi=Math.random().toString(36).slice(2),mt="__reactFiber$"+yi,Dt="__reactProps$"+yi,$s="__reactContainer$"+yi,wu="__reactEvents$"+yi,Iw="__reactListeners$"+yi,Bw="__reactHandles$"+yi,Fg="__reactResources$"+yi,io="__reactMarker$"+yi;function xu(s){delete s[mt],delete s[Dt],delete s[wu],delete s[Iw],delete s[Bw]}function zs(s){var r=s[mt];if(r)return r;for(var l=s.parentNode;l;){if(r=l[$s]||l[mt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(s=h_(s);s!==null;){if(l=s[mt])return l;s=h_(s)}return r}s=l,l=s.parentNode}return null}function Is(s){if(s=s[mt]||s[$s]){var r=s.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return s}return null}function so(s){var r=s.tag;if(r===5||r===26||r===27||r===6)return s.stateNode;throw Error(n(33))}function Bs(s){var r=s[Fg];return r||(r=s[Fg]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function ft(s){s[io]=!0}var Gg=new Set,Xg={};function ns(s,r){Ps(s,r),Ps(s+"Capture",r)}function Ps(s,r){for(Xg[s]=r,s=0;s<r.length;s++)Gg.add(r[s])}var Pw=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Yg={},Kg={};function qw(s){return Qi.call(Kg,s)?!0:Qi.call(Yg,s)?!1:Pw.test(s)?Kg[s]=!0:(Yg[s]=!0,!1)}function Ia(s,r,l){if(qw(r))if(l===null)s.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":s.removeAttribute(r);return;case"boolean":var d=r.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){s.removeAttribute(r);return}}s.setAttribute(r,""+l)}}function Ba(s,r,l){if(l===null)s.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(r);return}s.setAttribute(r,""+l)}}function qn(s,r,l,d){if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttributeNS(r,l,""+d)}}function en(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Wg(s){var r=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Uw(s,r,l){var d=Object.getOwnPropertyDescriptor(s.constructor.prototype,r);if(!s.hasOwnProperty(r)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var g=d.get,p=d.set;return Object.defineProperty(s,r,{configurable:!0,get:function(){return g.call(this)},set:function(w){l=""+w,p.call(this,w)}}),Object.defineProperty(s,r,{enumerable:d.enumerable}),{getValue:function(){return l},setValue:function(w){l=""+w},stopTracking:function(){s._valueTracker=null,delete s[r]}}}}function Tu(s){if(!s._valueTracker){var r=Wg(s)?"checked":"value";s._valueTracker=Uw(s,r,""+s[r])}}function Jg(s){if(!s)return!1;var r=s._valueTracker;if(!r)return!0;var l=r.getValue(),d="";return s&&(d=Wg(s)?s.checked?"true":"false":s.value),s=d,s!==l?(r.setValue(s),!0):!1}function Pa(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Vw=/[\n"\\]/g;function tn(s){return s.replace(Vw,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Eu(s,r,l,d,g,p,w,A){s.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?s.type=w:s.removeAttribute("type"),r!=null?w==="number"?(r===0&&s.value===""||s.value!=r)&&(s.value=""+en(r)):s.value!==""+en(r)&&(s.value=""+en(r)):w!=="submit"&&w!=="reset"||s.removeAttribute("value"),r!=null?Au(s,w,en(r)):l!=null?Au(s,w,en(l)):d!=null&&s.removeAttribute("value"),g==null&&p!=null&&(s.defaultChecked=!!p),g!=null&&(s.checked=g&&typeof g!="function"&&typeof g!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?s.name=""+en(A):s.removeAttribute("name")}function Zg(s,r,l,d,g,p,w,A){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(s.type=p),r!=null||l!=null){if(!(p!=="submit"&&p!=="reset"||r!=null)){Tu(s);return}l=l!=null?""+en(l):"",r=r!=null?""+en(r):l,A||r===s.value||(s.value=r),s.defaultValue=r}d=d??g,d=typeof d!="function"&&typeof d!="symbol"&&!!d,s.checked=A?s.checked:!!d,s.defaultChecked=!!d,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(s.name=w),Tu(s)}function Au(s,r,l){r==="number"&&Pa(s.ownerDocument)===s||s.defaultValue===""+l||(s.defaultValue=""+l)}function qs(s,r,l,d){if(s=s.options,r){r={};for(var g=0;g<l.length;g++)r["$"+l[g]]=!0;for(l=0;l<s.length;l++)g=r.hasOwnProperty("$"+s[l].value),s[l].selected!==g&&(s[l].selected=g),g&&d&&(s[l].defaultSelected=!0)}else{for(l=""+en(l),r=null,g=0;g<s.length;g++){if(s[g].value===l){s[g].selected=!0,d&&(s[g].defaultSelected=!0);return}r!==null||s[g].disabled||(r=s[g])}r!==null&&(r.selected=!0)}}function Qg(s,r,l){if(r!=null&&(r=""+en(r),r!==s.value&&(s.value=r),l==null)){s.defaultValue!==r&&(s.defaultValue=r);return}s.defaultValue=l!=null?""+en(l):""}function ep(s,r,l,d){if(r==null){if(d!=null){if(l!=null)throw Error(n(92));if(Ne(d)){if(1<d.length)throw Error(n(93));d=d[0]}l=d}l==null&&(l=""),r=l}l=en(r),s.defaultValue=l,d=s.textContent,d===l&&d!==""&&d!==null&&(s.value=d),Tu(s)}function Us(s,r){if(r){var l=s.firstChild;if(l&&l===s.lastChild&&l.nodeType===3){l.nodeValue=r;return}}s.textContent=r}var Fw=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tp(s,r,l){var d=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?d?s.setProperty(r,""):r==="float"?s.cssFloat="":s[r]="":d?s.setProperty(r,l):typeof l!="number"||l===0||Fw.has(r)?r==="float"?s.cssFloat=l:s[r]=(""+l).trim():s[r]=l+"px"}function np(s,r,l){if(r!=null&&typeof r!="object")throw Error(n(62));if(s=s.style,l!=null){for(var d in l)!l.hasOwnProperty(d)||r!=null&&r.hasOwnProperty(d)||(d.indexOf("--")===0?s.setProperty(d,""):d==="float"?s.cssFloat="":s[d]="");for(var g in r)d=r[g],r.hasOwnProperty(g)&&l[g]!==d&&tp(s,g,d)}else for(var p in r)r.hasOwnProperty(p)&&tp(s,p,r[p])}function Cu(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gw=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Xw=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function qa(s){return Xw.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Un(){}var ku=null;function Nu(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Vs=null,Fs=null;function ip(s){var r=Is(s);if(r&&(s=r.stateNode)){var l=s[Dt]||null;e:switch(s=r.stateNode,r.type){case"input":if(Eu(s,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=s;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+tn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var d=l[r];if(d!==s&&d.form===s.form){var g=d[Dt]||null;if(!g)throw Error(n(90));Eu(d,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(r=0;r<l.length;r++)d=l[r],d.form===s.form&&Jg(d)}break e;case"textarea":Qg(s,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&qs(s,!!l.multiple,r,!1)}}}var Mu=!1;function sp(s,r,l){if(Mu)return s(r,l);Mu=!0;try{var d=s(r);return d}finally{if(Mu=!1,(Vs!==null||Fs!==null)&&(Nl(),Vs&&(r=Vs,s=Fs,Fs=Vs=null,ip(r),s)))for(r=0;r<s.length;r++)ip(s[r])}}function ro(s,r){var l=s.stateNode;if(l===null)return null;var d=l[Dt]||null;if(d===null)return null;l=d[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(s=s.type,d=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!d;break e;default:s=!1}if(s)return null;if(l&&typeof l!="function")throw Error(n(231,r,typeof l));return l}var Vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Du=!1;if(Vn)try{var oo={};Object.defineProperty(oo,"passive",{get:function(){Du=!0}}),window.addEventListener("test",oo,oo),window.removeEventListener("test",oo,oo)}catch{Du=!1}var _i=null,Lu=null,Ua=null;function rp(){if(Ua)return Ua;var s,r=Lu,l=r.length,d,g="value"in _i?_i.value:_i.textContent,p=g.length;for(s=0;s<l&&r[s]===g[s];s++);var w=l-s;for(d=1;d<=w&&r[l-d]===g[p-d];d++);return Ua=g.slice(s,1<d?1-d:void 0)}function Va(s){var r=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&r===13&&(s=13)):s=r,s===10&&(s=13),32<=s||s===13?s:0}function Fa(){return!0}function op(){return!1}function Lt(s){function r(l,d,g,p,w){this._reactName=l,this._targetInst=g,this.type=d,this.nativeEvent=p,this.target=w,this.currentTarget=null;for(var A in s)s.hasOwnProperty(A)&&(l=s[A],this[A]=l?l(p):p[A]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Fa:op,this.isPropagationStopped=op,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Fa)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Fa)},persist:function(){},isPersistent:Fa}),r}var is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ga=Lt(is),ao=m({},is,{view:0,detail:0}),Yw=Lt(ao),Ou,Ru,lo,Xa=m({},ao,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hu,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==lo&&(lo&&s.type==="mousemove"?(Ou=s.screenX-lo.screenX,Ru=s.screenY-lo.screenY):Ru=Ou=0,lo=s),Ou)},movementY:function(s){return"movementY"in s?s.movementY:Ru}}),ap=Lt(Xa),Kw=m({},Xa,{dataTransfer:0}),Ww=Lt(Kw),Jw=m({},ao,{relatedTarget:0}),ju=Lt(Jw),Zw=m({},is,{animationName:0,elapsedTime:0,pseudoElement:0}),Qw=Lt(Zw),e1=m({},is,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),t1=Lt(e1),n1=m({},is,{data:0}),lp=Lt(n1),i1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},s1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},r1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function o1(s){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(s):(s=r1[s])?!!r[s]:!1}function Hu(){return o1}var a1=m({},ao,{key:function(s){if(s.key){var r=i1[s.key]||s.key;if(r!=="Unidentified")return r}return s.type==="keypress"?(s=Va(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?s1[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hu,charCode:function(s){return s.type==="keypress"?Va(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Va(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),l1=Lt(a1),c1=m({},Xa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cp=Lt(c1),u1=m({},ao,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hu}),d1=Lt(u1),h1=m({},is,{propertyName:0,elapsedTime:0,pseudoElement:0}),f1=Lt(h1),g1=m({},Xa,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),p1=Lt(g1),m1=m({},is,{newState:0,oldState:0}),y1=Lt(m1),_1=[9,13,27,32],$u=Vn&&"CompositionEvent"in window,co=null;Vn&&"documentMode"in document&&(co=document.documentMode);var b1=Vn&&"TextEvent"in window&&!co,up=Vn&&(!$u||co&&8<co&&11>=co),dp=" ",hp=!1;function fp(s,r){switch(s){case"keyup":return _1.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gp(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Gs=!1;function v1(s,r){switch(s){case"compositionend":return gp(r);case"keypress":return r.which!==32?null:(hp=!0,dp);case"textInput":return s=r.data,s===dp&&hp?null:s;default:return null}}function S1(s,r){if(Gs)return s==="compositionend"||!$u&&fp(s,r)?(s=rp(),Ua=Lu=_i=null,Gs=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return up&&r.locale!=="ko"?null:r.data;default:return null}}var w1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function pp(s){var r=s&&s.nodeName&&s.nodeName.toLowerCase();return r==="input"?!!w1[s.type]:r==="textarea"}function mp(s,r,l,d){Vs?Fs?Fs.push(d):Fs=[d]:Vs=d,r=Hl(r,"onChange"),0<r.length&&(l=new Ga("onChange","change",null,l,d),s.push({event:l,listeners:r}))}var uo=null,ho=null;function x1(s){Zy(s,0)}function Ya(s){var r=so(s);if(Jg(r))return s}function yp(s,r){if(s==="change")return r}var _p=!1;if(Vn){var zu;if(Vn){var Iu="oninput"in document;if(!Iu){var bp=document.createElement("div");bp.setAttribute("oninput","return;"),Iu=typeof bp.oninput=="function"}zu=Iu}else zu=!1;_p=zu&&(!document.documentMode||9<document.documentMode)}function vp(){uo&&(uo.detachEvent("onpropertychange",Sp),ho=uo=null)}function Sp(s){if(s.propertyName==="value"&&Ya(ho)){var r=[];mp(r,ho,s,Nu(s)),sp(x1,r)}}function T1(s,r,l){s==="focusin"?(vp(),uo=r,ho=l,uo.attachEvent("onpropertychange",Sp)):s==="focusout"&&vp()}function E1(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Ya(ho)}function A1(s,r){if(s==="click")return Ya(r)}function C1(s,r){if(s==="input"||s==="change")return Ya(r)}function k1(s,r){return s===r&&(s!==0||1/s===1/r)||s!==s&&r!==r}var Ft=typeof Object.is=="function"?Object.is:k1;function fo(s,r){if(Ft(s,r))return!0;if(typeof s!="object"||s===null||typeof r!="object"||r===null)return!1;var l=Object.keys(s),d=Object.keys(r);if(l.length!==d.length)return!1;for(d=0;d<l.length;d++){var g=l[d];if(!Qi.call(r,g)||!Ft(s[g],r[g]))return!1}return!0}function wp(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function xp(s,r){var l=wp(s);s=0;for(var d;l;){if(l.nodeType===3){if(d=s+l.textContent.length,s<=r&&d>=r)return{node:l,offset:r-s};s=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=wp(l)}}function Tp(s,r){return s&&r?s===r?!0:s&&s.nodeType===3?!1:r&&r.nodeType===3?Tp(s,r.parentNode):"contains"in s?s.contains(r):s.compareDocumentPosition?!!(s.compareDocumentPosition(r)&16):!1:!1}function Ep(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var r=Pa(s.document);r instanceof s.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)s=r.contentWindow;else break;r=Pa(s.document)}return r}function Bu(s){var r=s&&s.nodeName&&s.nodeName.toLowerCase();return r&&(r==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||r==="textarea"||s.contentEditable==="true")}var N1=Vn&&"documentMode"in document&&11>=document.documentMode,Xs=null,Pu=null,go=null,qu=!1;function Ap(s,r,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;qu||Xs==null||Xs!==Pa(d)||(d=Xs,"selectionStart"in d&&Bu(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),go&&fo(go,d)||(go=d,d=Hl(Pu,"onSelect"),0<d.length&&(r=new Ga("onSelect","select",null,r,l),s.push({event:r,listeners:d}),r.target=Xs)))}function ss(s,r){var l={};return l[s.toLowerCase()]=r.toLowerCase(),l["Webkit"+s]="webkit"+r,l["Moz"+s]="moz"+r,l}var Ys={animationend:ss("Animation","AnimationEnd"),animationiteration:ss("Animation","AnimationIteration"),animationstart:ss("Animation","AnimationStart"),transitionrun:ss("Transition","TransitionRun"),transitionstart:ss("Transition","TransitionStart"),transitioncancel:ss("Transition","TransitionCancel"),transitionend:ss("Transition","TransitionEnd")},Uu={},Cp={};Vn&&(Cp=document.createElement("div").style,"AnimationEvent"in window||(delete Ys.animationend.animation,delete Ys.animationiteration.animation,delete Ys.animationstart.animation),"TransitionEvent"in window||delete Ys.transitionend.transition);function rs(s){if(Uu[s])return Uu[s];if(!Ys[s])return s;var r=Ys[s],l;for(l in r)if(r.hasOwnProperty(l)&&l in Cp)return Uu[s]=r[l];return s}var kp=rs("animationend"),Np=rs("animationiteration"),Mp=rs("animationstart"),M1=rs("transitionrun"),D1=rs("transitionstart"),L1=rs("transitioncancel"),Dp=rs("transitionend"),Lp=new Map,Vu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Vu.push("scrollEnd");function Sn(s,r){Lp.set(s,r),ns(r,[s])}var Ka=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},nn=[],Ks=0,Fu=0;function Wa(){for(var s=Ks,r=Fu=Ks=0;r<s;){var l=nn[r];nn[r++]=null;var d=nn[r];nn[r++]=null;var g=nn[r];nn[r++]=null;var p=nn[r];if(nn[r++]=null,d!==null&&g!==null){var w=d.pending;w===null?g.next=g:(g.next=w.next,w.next=g),d.pending=g}p!==0&&Op(l,g,p)}}function Ja(s,r,l,d){nn[Ks++]=s,nn[Ks++]=r,nn[Ks++]=l,nn[Ks++]=d,Fu|=d,s.lanes|=d,s=s.alternate,s!==null&&(s.lanes|=d)}function Gu(s,r,l,d){return Ja(s,r,l,d),Za(s)}function os(s,r){return Ja(s,null,null,r),Za(s)}function Op(s,r,l){s.lanes|=l;var d=s.alternate;d!==null&&(d.lanes|=l);for(var g=!1,p=s.return;p!==null;)p.childLanes|=l,d=p.alternate,d!==null&&(d.childLanes|=l),p.tag===22&&(s=p.stateNode,s===null||s._visibility&1||(g=!0)),s=p,p=p.return;return s.tag===3?(p=s.stateNode,g&&r!==null&&(g=31-At(l),s=p.hiddenUpdates,d=s[g],d===null?s[g]=[r]:d.push(r),r.lane=l|536870912),p):null}function Za(s){if(50<Ho)throw Ho=0,th=null,Error(n(185));for(var r=s.return;r!==null;)s=r,r=s.return;return s.tag===3?s.stateNode:null}var Ws={};function O1(s,r,l,d){this.tag=s,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gt(s,r,l,d){return new O1(s,r,l,d)}function Xu(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Fn(s,r){var l=s.alternate;return l===null?(l=Gt(s.tag,r,s.key,s.mode),l.elementType=s.elementType,l.type=s.type,l.stateNode=s.stateNode,l.alternate=s,s.alternate=l):(l.pendingProps=r,l.type=s.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=s.flags&65011712,l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,r=s.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=s.sibling,l.index=s.index,l.ref=s.ref,l.refCleanup=s.refCleanup,l}function Rp(s,r){s.flags&=65011714;var l=s.alternate;return l===null?(s.childLanes=0,s.lanes=r,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,r=l.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),s}function Qa(s,r,l,d,g,p){var w=0;if(d=s,typeof s=="function")Xu(s)&&(w=1);else if(typeof s=="string")w=zx(s,l,ne.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case O:return s=Gt(31,l,r,g),s.elementType=O,s.lanes=p,s;case v:return as(l.children,g,p,r);case x:w=8,g|=24;break;case E:return s=Gt(12,l,r,g|2),s.elementType=E,s.lanes=p,s;case N:return s=Gt(13,l,r,g),s.elementType=N,s.lanes=p,s;case V:return s=Gt(19,l,r,g),s.elementType=V,s.lanes=p,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case L:w=10;break e;case C:w=9;break e;case R:w=11;break e;case I:w=14;break e;case B:w=16,d=null;break e}w=29,l=Error(n(130,s===null?"null":typeof s,"")),d=null}return r=Gt(w,l,r,g),r.elementType=s,r.type=d,r.lanes=p,r}function as(s,r,l,d){return s=Gt(7,s,d,r),s.lanes=l,s}function Yu(s,r,l){return s=Gt(6,s,null,r),s.lanes=l,s}function jp(s){var r=Gt(18,null,null,0);return r.stateNode=s,r}function Ku(s,r,l){return r=Gt(4,s.children!==null?s.children:[],s.key,r),r.lanes=l,r.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},r}var Hp=new WeakMap;function sn(s,r){if(typeof s=="object"&&s!==null){var l=Hp.get(s);return l!==void 0?l:(r={value:s,source:r,stack:Hs(r)},Hp.set(s,r),r)}return{value:s,source:r,stack:Hs(r)}}var Js=[],Zs=0,el=null,po=0,rn=[],on=0,bi=null,Dn=1,Ln="";function Gn(s,r){Js[Zs++]=po,Js[Zs++]=el,el=s,po=r}function $p(s,r,l){rn[on++]=Dn,rn[on++]=Ln,rn[on++]=bi,bi=s;var d=Dn;s=Ln;var g=32-At(d)-1;d&=~(1<<g),l+=1;var p=32-At(r)+g;if(30<p){var w=g-g%5;p=(d&(1<<w)-1).toString(32),d>>=w,g-=w,Dn=1<<32-At(r)+g|l<<g|d,Ln=p+s}else Dn=1<<p|l<<g|d,Ln=s}function Wu(s){s.return!==null&&(Gn(s,1),$p(s,1,0))}function Ju(s){for(;s===el;)el=Js[--Zs],Js[Zs]=null,po=Js[--Zs],Js[Zs]=null;for(;s===bi;)bi=rn[--on],rn[on]=null,Ln=rn[--on],rn[on]=null,Dn=rn[--on],rn[on]=null}function zp(s,r){rn[on++]=Dn,rn[on++]=Ln,rn[on++]=bi,Dn=r.id,Ln=r.overflow,bi=s}var yt=null,ze=null,we=!1,vi=null,an=!1,Zu=Error(n(519));function Si(s){var r=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw mo(sn(r,s)),Zu}function Ip(s){var r=s.stateNode,l=s.type,d=s.memoizedProps;switch(r[mt]=s,r[Dt]=d,l){case"dialog":_e("cancel",r),_e("close",r);break;case"iframe":case"object":case"embed":_e("load",r);break;case"video":case"audio":for(l=0;l<zo.length;l++)_e(zo[l],r);break;case"source":_e("error",r);break;case"img":case"image":case"link":_e("error",r),_e("load",r);break;case"details":_e("toggle",r);break;case"input":_e("invalid",r),Zg(r,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":_e("invalid",r);break;case"textarea":_e("invalid",r),ep(r,d.value,d.defaultValue,d.children)}l=d.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||d.suppressHydrationWarning===!0||n_(r.textContent,l)?(d.popover!=null&&(_e("beforetoggle",r),_e("toggle",r)),d.onScroll!=null&&_e("scroll",r),d.onScrollEnd!=null&&_e("scrollend",r),d.onClick!=null&&(r.onclick=Un),r=!0):r=!1,r||Si(s,!0)}function Bp(s){for(yt=s.return;yt;)switch(yt.tag){case 5:case 31:case 13:an=!1;return;case 27:case 3:an=!0;return;default:yt=yt.return}}function Qs(s){if(s!==yt)return!1;if(!we)return Bp(s),we=!0,!1;var r=s.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=s.type,l=!(l!=="form"&&l!=="button")||mh(s.type,s.memoizedProps)),l=!l),l&&ze&&Si(s),Bp(s),r===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));ze=d_(s)}else if(r===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));ze=d_(s)}else r===27?(r=ze,ji(s.type)?(s=Sh,Sh=null,ze=s):ze=r):ze=yt?cn(s.stateNode.nextSibling):null;return!0}function ls(){ze=yt=null,we=!1}function Qu(){var s=vi;return s!==null&&(Ht===null?Ht=s:Ht.push.apply(Ht,s),vi=null),s}function mo(s){vi===null?vi=[s]:vi.push(s)}var ed=M(null),cs=null,Xn=null;function wi(s,r,l){ee(ed,r._currentValue),r._currentValue=l}function Yn(s){s._currentValue=ed.current,G(ed)}function td(s,r,l){for(;s!==null;){var d=s.alternate;if((s.childLanes&r)!==r?(s.childLanes|=r,d!==null&&(d.childLanes|=r)):d!==null&&(d.childLanes&r)!==r&&(d.childLanes|=r),s===l)break;s=s.return}}function nd(s,r,l,d){var g=s.child;for(g!==null&&(g.return=s);g!==null;){var p=g.dependencies;if(p!==null){var w=g.child;p=p.firstContext;e:for(;p!==null;){var A=p;p=g;for(var k=0;k<r.length;k++)if(A.context===r[k]){p.lanes|=l,A=p.alternate,A!==null&&(A.lanes|=l),td(p.return,l,s),d||(w=null);break e}p=A.next}}else if(g.tag===18){if(w=g.return,w===null)throw Error(n(341));w.lanes|=l,p=w.alternate,p!==null&&(p.lanes|=l),td(w,l,s),w=null}else w=g.child;if(w!==null)w.return=g;else for(w=g;w!==null;){if(w===s){w=null;break}if(g=w.sibling,g!==null){g.return=w.return,w=g;break}w=w.return}g=w}}function er(s,r,l,d){s=null;for(var g=r,p=!1;g!==null;){if(!p){if((g.flags&524288)!==0)p=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var w=g.alternate;if(w===null)throw Error(n(387));if(w=w.memoizedProps,w!==null){var A=g.type;Ft(g.pendingProps.value,w.value)||(s!==null?s.push(A):s=[A])}}else if(g===Ee.current){if(w=g.alternate,w===null)throw Error(n(387));w.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(s!==null?s.push(Uo):s=[Uo])}g=g.return}s!==null&&nd(r,s,l,d),r.flags|=262144}function tl(s){for(s=s.firstContext;s!==null;){if(!Ft(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function us(s){cs=s,Xn=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function _t(s){return Pp(cs,s)}function nl(s,r){return cs===null&&us(s),Pp(s,r)}function Pp(s,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Xn===null){if(s===null)throw Error(n(308));Xn=r,s.dependencies={lanes:0,firstContext:r},s.flags|=524288}else Xn=Xn.next=r;return l}var R1=typeof AbortController<"u"?AbortController:function(){var s=[],r=this.signal={aborted:!1,addEventListener:function(l,d){s.push(d)}};this.abort=function(){r.aborted=!0,s.forEach(function(l){return l()})}},j1=i.unstable_scheduleCallback,H1=i.unstable_NormalPriority,nt={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function id(){return{controller:new R1,data:new Map,refCount:0}}function yo(s){s.refCount--,s.refCount===0&&j1(H1,function(){s.controller.abort()})}var _o=null,sd=0,tr=0,nr=null;function $1(s,r){if(_o===null){var l=_o=[];sd=0,tr=ah(),nr={status:"pending",value:void 0,then:function(d){l.push(d)}}}return sd++,r.then(qp,qp),r}function qp(){if(--sd===0&&_o!==null){nr!==null&&(nr.status="fulfilled");var s=_o;_o=null,tr=0,nr=null;for(var r=0;r<s.length;r++)(0,s[r])()}}function z1(s,r){var l=[],d={status:"pending",value:null,reason:null,then:function(g){l.push(g)}};return s.then(function(){d.status="fulfilled",d.value=r;for(var g=0;g<l.length;g++)(0,l[g])(r)},function(g){for(d.status="rejected",d.reason=g,g=0;g<l.length;g++)(0,l[g])(void 0)}),d}var Up=P.S;P.S=function(s,r){Ay=Et(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&$1(s,r),Up!==null&&Up(s,r)};var ds=M(null);function rd(){var s=ds.current;return s!==null?s:je.pooledCache}function il(s,r){r===null?ee(ds,ds.current):ee(ds,r.pool)}function Vp(){var s=rd();return s===null?null:{parent:nt._currentValue,pool:s}}var ir=Error(n(460)),od=Error(n(474)),sl=Error(n(542)),rl={then:function(){}};function Fp(s){return s=s.status,s==="fulfilled"||s==="rejected"}function Gp(s,r,l){switch(l=s[l],l===void 0?s.push(r):l!==r&&(r.then(Un,Un),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw s=r.reason,Yp(s),s;default:if(typeof r.status=="string")r.then(Un,Un);else{if(s=je,s!==null&&100<s.shellSuspendCounter)throw Error(n(482));s=r,s.status="pending",s.then(function(d){if(r.status==="pending"){var g=r;g.status="fulfilled",g.value=d}},function(d){if(r.status==="pending"){var g=r;g.status="rejected",g.reason=d}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw s=r.reason,Yp(s),s}throw fs=r,ir}}function hs(s){try{var r=s._init;return r(s._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(fs=l,ir):l}}var fs=null;function Xp(){if(fs===null)throw Error(n(459));var s=fs;return fs=null,s}function Yp(s){if(s===ir||s===sl)throw Error(n(483))}var sr=null,bo=0;function ol(s){var r=bo;return bo+=1,sr===null&&(sr=[]),Gp(sr,s,r)}function vo(s,r){r=r.props.ref,s.ref=r!==void 0?r:null}function al(s,r){throw r.$$typeof===_?Error(n(525)):(s=Object.prototype.toString.call(r),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":s)))}function Kp(s){function r(j,D){if(s){var H=j.deletions;H===null?(j.deletions=[D],j.flags|=16):H.push(D)}}function l(j,D){if(!s)return null;for(;D!==null;)r(j,D),D=D.sibling;return null}function d(j){for(var D=new Map;j!==null;)j.key!==null?D.set(j.key,j):D.set(j.index,j),j=j.sibling;return D}function g(j,D){return j=Fn(j,D),j.index=0,j.sibling=null,j}function p(j,D,H){return j.index=H,s?(H=j.alternate,H!==null?(H=H.index,H<D?(j.flags|=67108866,D):H):(j.flags|=67108866,D)):(j.flags|=1048576,D)}function w(j){return s&&j.alternate===null&&(j.flags|=67108866),j}function A(j,D,H,X){return D===null||D.tag!==6?(D=Yu(H,j.mode,X),D.return=j,D):(D=g(D,H),D.return=j,D)}function k(j,D,H,X){var le=H.type;return le===v?F(j,D,H.props.children,X,H.key):D!==null&&(D.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===B&&hs(le)===D.type)?(D=g(D,H.props),vo(D,H),D.return=j,D):(D=Qa(H.type,H.key,H.props,null,j.mode,X),vo(D,H),D.return=j,D)}function $(j,D,H,X){return D===null||D.tag!==4||D.stateNode.containerInfo!==H.containerInfo||D.stateNode.implementation!==H.implementation?(D=Ku(H,j.mode,X),D.return=j,D):(D=g(D,H.children||[]),D.return=j,D)}function F(j,D,H,X,le){return D===null||D.tag!==7?(D=as(H,j.mode,X,le),D.return=j,D):(D=g(D,H),D.return=j,D)}function K(j,D,H){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Yu(""+D,j.mode,H),D.return=j,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case b:return H=Qa(D.type,D.key,D.props,null,j.mode,H),vo(H,D),H.return=j,H;case S:return D=Ku(D,j.mode,H),D.return=j,D;case B:return D=hs(D),K(j,D,H)}if(Ne(D)||Y(D))return D=as(D,j.mode,H,null),D.return=j,D;if(typeof D.then=="function")return K(j,ol(D),H);if(D.$$typeof===L)return K(j,nl(j,D),H);al(j,D)}return null}function z(j,D,H,X){var le=D!==null?D.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return le!==null?null:A(j,D,""+H,X);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return H.key===le?k(j,D,H,X):null;case S:return H.key===le?$(j,D,H,X):null;case B:return H=hs(H),z(j,D,H,X)}if(Ne(H)||Y(H))return le!==null?null:F(j,D,H,X,null);if(typeof H.then=="function")return z(j,D,ol(H),X);if(H.$$typeof===L)return z(j,D,nl(j,H),X);al(j,H)}return null}function U(j,D,H,X,le){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return j=j.get(H)||null,A(D,j,""+X,le);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case b:return j=j.get(X.key===null?H:X.key)||null,k(D,j,X,le);case S:return j=j.get(X.key===null?H:X.key)||null,$(D,j,X,le);case B:return X=hs(X),U(j,D,H,X,le)}if(Ne(X)||Y(X))return j=j.get(H)||null,F(D,j,X,le,null);if(typeof X.then=="function")return U(j,D,H,ol(X),le);if(X.$$typeof===L)return U(j,D,H,nl(D,X),le);al(D,X)}return null}function ie(j,D,H,X){for(var le=null,Ae=null,re=D,me=D=0,Se=null;re!==null&&me<H.length;me++){re.index>me?(Se=re,re=null):Se=re.sibling;var Ce=z(j,re,H[me],X);if(Ce===null){re===null&&(re=Se);break}s&&re&&Ce.alternate===null&&r(j,re),D=p(Ce,D,me),Ae===null?le=Ce:Ae.sibling=Ce,Ae=Ce,re=Se}if(me===H.length)return l(j,re),we&&Gn(j,me),le;if(re===null){for(;me<H.length;me++)re=K(j,H[me],X),re!==null&&(D=p(re,D,me),Ae===null?le=re:Ae.sibling=re,Ae=re);return we&&Gn(j,me),le}for(re=d(re);me<H.length;me++)Se=U(re,j,me,H[me],X),Se!==null&&(s&&Se.alternate!==null&&re.delete(Se.key===null?me:Se.key),D=p(Se,D,me),Ae===null?le=Se:Ae.sibling=Se,Ae=Se);return s&&re.forEach(function(Bi){return r(j,Bi)}),we&&Gn(j,me),le}function ce(j,D,H,X){if(H==null)throw Error(n(151));for(var le=null,Ae=null,re=D,me=D=0,Se=null,Ce=H.next();re!==null&&!Ce.done;me++,Ce=H.next()){re.index>me?(Se=re,re=null):Se=re.sibling;var Bi=z(j,re,Ce.value,X);if(Bi===null){re===null&&(re=Se);break}s&&re&&Bi.alternate===null&&r(j,re),D=p(Bi,D,me),Ae===null?le=Bi:Ae.sibling=Bi,Ae=Bi,re=Se}if(Ce.done)return l(j,re),we&&Gn(j,me),le;if(re===null){for(;!Ce.done;me++,Ce=H.next())Ce=K(j,Ce.value,X),Ce!==null&&(D=p(Ce,D,me),Ae===null?le=Ce:Ae.sibling=Ce,Ae=Ce);return we&&Gn(j,me),le}for(re=d(re);!Ce.done;me++,Ce=H.next())Ce=U(re,j,me,Ce.value,X),Ce!==null&&(s&&Ce.alternate!==null&&re.delete(Ce.key===null?me:Ce.key),D=p(Ce,D,me),Ae===null?le=Ce:Ae.sibling=Ce,Ae=Ce);return s&&re.forEach(function(Kx){return r(j,Kx)}),we&&Gn(j,me),le}function Re(j,D,H,X){if(typeof H=="object"&&H!==null&&H.type===v&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case b:e:{for(var le=H.key;D!==null;){if(D.key===le){if(le=H.type,le===v){if(D.tag===7){l(j,D.sibling),X=g(D,H.props.children),X.return=j,j=X;break e}}else if(D.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===B&&hs(le)===D.type){l(j,D.sibling),X=g(D,H.props),vo(X,H),X.return=j,j=X;break e}l(j,D);break}else r(j,D);D=D.sibling}H.type===v?(X=as(H.props.children,j.mode,X,H.key),X.return=j,j=X):(X=Qa(H.type,H.key,H.props,null,j.mode,X),vo(X,H),X.return=j,j=X)}return w(j);case S:e:{for(le=H.key;D!==null;){if(D.key===le)if(D.tag===4&&D.stateNode.containerInfo===H.containerInfo&&D.stateNode.implementation===H.implementation){l(j,D.sibling),X=g(D,H.children||[]),X.return=j,j=X;break e}else{l(j,D);break}else r(j,D);D=D.sibling}X=Ku(H,j.mode,X),X.return=j,j=X}return w(j);case B:return H=hs(H),Re(j,D,H,X)}if(Ne(H))return ie(j,D,H,X);if(Y(H)){if(le=Y(H),typeof le!="function")throw Error(n(150));return H=le.call(H),ce(j,D,H,X)}if(typeof H.then=="function")return Re(j,D,ol(H),X);if(H.$$typeof===L)return Re(j,D,nl(j,H),X);al(j,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,D!==null&&D.tag===6?(l(j,D.sibling),X=g(D,H),X.return=j,j=X):(l(j,D),X=Yu(H,j.mode,X),X.return=j,j=X),w(j)):l(j,D)}return function(j,D,H,X){try{bo=0;var le=Re(j,D,H,X);return sr=null,le}catch(re){if(re===ir||re===sl)throw re;var Ae=Gt(29,re,null,j.mode);return Ae.lanes=X,Ae.return=j,Ae}finally{}}}var gs=Kp(!0),Wp=Kp(!1),xi=!1;function ad(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ld(s,r){s=s.updateQueue,r.updateQueue===s&&(r.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Ti(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Ei(s,r,l){var d=s.updateQueue;if(d===null)return null;if(d=d.shared,(ke&2)!==0){var g=d.pending;return g===null?r.next=r:(r.next=g.next,g.next=r),d.pending=r,r=Za(s),Op(s,null,l),r}return Ja(s,d,r,l),Za(s)}function So(s,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var d=r.lanes;d&=s.pendingLanes,l|=d,r.lanes=l,Pg(s,l)}}function cd(s,r){var l=s.updateQueue,d=s.alternate;if(d!==null&&(d=d.updateQueue,l===d)){var g=null,p=null;if(l=l.firstBaseUpdate,l!==null){do{var w={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};p===null?g=p=w:p=p.next=w,l=l.next}while(l!==null);p===null?g=p=r:p=p.next=r}else g=p=r;l={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:p,shared:d.shared,callbacks:d.callbacks},s.updateQueue=l;return}s=l.lastBaseUpdate,s===null?l.firstBaseUpdate=r:s.next=r,l.lastBaseUpdate=r}var ud=!1;function wo(){if(ud){var s=nr;if(s!==null)throw s}}function xo(s,r,l,d){ud=!1;var g=s.updateQueue;xi=!1;var p=g.firstBaseUpdate,w=g.lastBaseUpdate,A=g.shared.pending;if(A!==null){g.shared.pending=null;var k=A,$=k.next;k.next=null,w===null?p=$:w.next=$,w=k;var F=s.alternate;F!==null&&(F=F.updateQueue,A=F.lastBaseUpdate,A!==w&&(A===null?F.firstBaseUpdate=$:A.next=$,F.lastBaseUpdate=k))}if(p!==null){var K=g.baseState;w=0,F=$=k=null,A=p;do{var z=A.lane&-536870913,U=z!==A.lane;if(U?(ve&z)===z:(d&z)===z){z!==0&&z===tr&&(ud=!0),F!==null&&(F=F.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var ie=s,ce=A;z=r;var Re=l;switch(ce.tag){case 1:if(ie=ce.payload,typeof ie=="function"){K=ie.call(Re,K,z);break e}K=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=ce.payload,z=typeof ie=="function"?ie.call(Re,K,z):ie,z==null)break e;K=m({},K,z);break e;case 2:xi=!0}}z=A.callback,z!==null&&(s.flags|=64,U&&(s.flags|=8192),U=g.callbacks,U===null?g.callbacks=[z]:U.push(z))}else U={lane:z,tag:A.tag,payload:A.payload,callback:A.callback,next:null},F===null?($=F=U,k=K):F=F.next=U,w|=z;if(A=A.next,A===null){if(A=g.shared.pending,A===null)break;U=A,A=U.next,U.next=null,g.lastBaseUpdate=U,g.shared.pending=null}}while(!0);F===null&&(k=K),g.baseState=k,g.firstBaseUpdate=$,g.lastBaseUpdate=F,p===null&&(g.shared.lanes=0),Mi|=w,s.lanes=w,s.memoizedState=K}}function Jp(s,r){if(typeof s!="function")throw Error(n(191,s));s.call(r)}function Zp(s,r){var l=s.callbacks;if(l!==null)for(s.callbacks=null,s=0;s<l.length;s++)Jp(l[s],r)}var rr=M(null),ll=M(0);function Qp(s,r){s=ii,ee(ll,s),ee(rr,r),ii=s|r.baseLanes}function dd(){ee(ll,ii),ee(rr,rr.current)}function hd(){ii=ll.current,G(rr),G(ll)}var Xt=M(null),ln=null;function Ai(s){var r=s.alternate;ee(We,We.current&1),ee(Xt,s),ln===null&&(r===null||rr.current!==null||r.memoizedState!==null)&&(ln=s)}function fd(s){ee(We,We.current),ee(Xt,s),ln===null&&(ln=s)}function em(s){s.tag===22?(ee(We,We.current),ee(Xt,s),ln===null&&(ln=s)):Ci()}function Ci(){ee(We,We.current),ee(Xt,Xt.current)}function Yt(s){G(Xt),ln===s&&(ln=null),G(We)}var We=M(0);function cl(s){for(var r=s;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||bh(l)||vh(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break;for(;r.sibling===null;){if(r.return===null||r.return===s)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Kn=0,pe=null,Le=null,it=null,ul=!1,or=!1,ps=!1,dl=0,To=0,ar=null,I1=0;function Ye(){throw Error(n(321))}function gd(s,r){if(r===null)return!1;for(var l=0;l<r.length&&l<s.length;l++)if(!Ft(s[l],r[l]))return!1;return!0}function pd(s,r,l,d,g,p){return Kn=p,pe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,P.H=s===null||s.memoizedState===null?$m:Md,ps=!1,p=l(d,g),ps=!1,or&&(p=nm(r,l,d,g)),tm(s),p}function tm(s){P.H=Co;var r=Le!==null&&Le.next!==null;if(Kn=0,it=Le=pe=null,ul=!1,To=0,ar=null,r)throw Error(n(300));s===null||st||(s=s.dependencies,s!==null&&tl(s)&&(st=!0))}function nm(s,r,l,d){pe=s;var g=0;do{if(or&&(ar=null),To=0,or=!1,25<=g)throw Error(n(301));if(g+=1,it=Le=null,s.updateQueue!=null){var p=s.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}P.H=zm,p=r(l,d)}while(or);return p}function B1(){var s=P.H,r=s.useState()[0];return r=typeof r.then=="function"?Eo(r):r,s=s.useState()[0],(Le!==null?Le.memoizedState:null)!==s&&(pe.flags|=1024),r}function md(){var s=dl!==0;return dl=0,s}function yd(s,r,l){r.updateQueue=s.updateQueue,r.flags&=-2053,s.lanes&=~l}function _d(s){if(ul){for(s=s.memoizedState;s!==null;){var r=s.queue;r!==null&&(r.pending=null),s=s.next}ul=!1}Kn=0,it=Le=pe=null,or=!1,To=dl=0,ar=null}function Ct(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?pe.memoizedState=it=s:it=it.next=s,it}function Je(){if(Le===null){var s=pe.alternate;s=s!==null?s.memoizedState:null}else s=Le.next;var r=it===null?pe.memoizedState:it.next;if(r!==null)it=r,Le=s;else{if(s===null)throw pe.alternate===null?Error(n(467)):Error(n(310));Le=s,s={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},it===null?pe.memoizedState=it=s:it=it.next=s}return it}function hl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Eo(s){var r=To;return To+=1,ar===null&&(ar=[]),s=Gp(ar,s,r),r=pe,(it===null?r.memoizedState:it.next)===null&&(r=r.alternate,P.H=r===null||r.memoizedState===null?$m:Md),s}function fl(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Eo(s);if(s.$$typeof===L)return _t(s)}throw Error(n(438,String(s)))}function bd(s){var r=null,l=pe.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var d=pe.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(r={data:d.data.map(function(g){return g.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=hl(),pe.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(s),d=0;d<s;d++)l[d]=Q;return r.index++,l}function Wn(s,r){return typeof r=="function"?r(s):r}function gl(s){var r=Je();return vd(r,Le,s)}function vd(s,r,l){var d=s.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=l;var g=s.baseQueue,p=d.pending;if(p!==null){if(g!==null){var w=g.next;g.next=p.next,p.next=w}r.baseQueue=g=p,d.pending=null}if(p=s.baseState,g===null)s.memoizedState=p;else{r=g.next;var A=w=null,k=null,$=r,F=!1;do{var K=$.lane&-536870913;if(K!==$.lane?(ve&K)===K:(Kn&K)===K){var z=$.revertLane;if(z===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),K===tr&&(F=!0);else if((Kn&z)===z){$=$.next,z===tr&&(F=!0);continue}else K={lane:0,revertLane:$.revertLane,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},k===null?(A=k=K,w=p):k=k.next=K,pe.lanes|=z,Mi|=z;K=$.action,ps&&l(p,K),p=$.hasEagerState?$.eagerState:l(p,K)}else z={lane:K,revertLane:$.revertLane,gesture:$.gesture,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},k===null?(A=k=z,w=p):k=k.next=z,pe.lanes|=K,Mi|=K;$=$.next}while($!==null&&$!==r);if(k===null?w=p:k.next=A,!Ft(p,s.memoizedState)&&(st=!0,F&&(l=nr,l!==null)))throw l;s.memoizedState=p,s.baseState=w,s.baseQueue=k,d.lastRenderedState=p}return g===null&&(d.lanes=0),[s.memoizedState,d.dispatch]}function Sd(s){var r=Je(),l=r.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=s;var d=l.dispatch,g=l.pending,p=r.memoizedState;if(g!==null){l.pending=null;var w=g=g.next;do p=s(p,w.action),w=w.next;while(w!==g);Ft(p,r.memoizedState)||(st=!0),r.memoizedState=p,r.baseQueue===null&&(r.baseState=p),l.lastRenderedState=p}return[p,d]}function im(s,r,l){var d=pe,g=Je(),p=we;if(p){if(l===void 0)throw Error(n(407));l=l()}else l=r();var w=!Ft((Le||g).memoizedState,l);if(w&&(g.memoizedState=l,st=!0),g=g.queue,Td(om.bind(null,d,g,s),[s]),g.getSnapshot!==r||w||it!==null&&it.memoizedState.tag&1){if(d.flags|=2048,lr(9,{destroy:void 0},rm.bind(null,d,g,l,r),null),je===null)throw Error(n(349));p||(Kn&127)!==0||sm(d,r,l)}return l}function sm(s,r,l){s.flags|=16384,s={getSnapshot:r,value:l},r=pe.updateQueue,r===null?(r=hl(),pe.updateQueue=r,r.stores=[s]):(l=r.stores,l===null?r.stores=[s]:l.push(s))}function rm(s,r,l,d){r.value=l,r.getSnapshot=d,am(r)&&lm(s)}function om(s,r,l){return l(function(){am(r)&&lm(s)})}function am(s){var r=s.getSnapshot;s=s.value;try{var l=r();return!Ft(s,l)}catch{return!0}}function lm(s){var r=os(s,2);r!==null&&$t(r,s,2)}function wd(s){var r=Ct();if(typeof s=="function"){var l=s;if(s=l(),ps){Nn(!0);try{l()}finally{Nn(!1)}}}return r.memoizedState=r.baseState=s,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:s},r}function cm(s,r,l,d){return s.baseState=l,vd(s,Le,typeof d=="function"?d:Wn)}function P1(s,r,l,d,g){if(yl(s))throw Error(n(485));if(s=r.action,s!==null){var p={payload:g,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){p.listeners.push(w)}};P.T!==null?l(!0):p.isTransition=!1,d(p),l=r.pending,l===null?(p.next=r.pending=p,um(r,p)):(p.next=l.next,r.pending=l.next=p)}}function um(s,r){var l=r.action,d=r.payload,g=s.state;if(r.isTransition){var p=P.T,w={};P.T=w;try{var A=l(g,d),k=P.S;k!==null&&k(w,A),dm(s,r,A)}catch($){xd(s,r,$)}finally{p!==null&&w.types!==null&&(p.types=w.types),P.T=p}}else try{p=l(g,d),dm(s,r,p)}catch($){xd(s,r,$)}}function dm(s,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(d){hm(s,r,d)},function(d){return xd(s,r,d)}):hm(s,r,l)}function hm(s,r,l){r.status="fulfilled",r.value=l,fm(r),s.state=l,r=s.pending,r!==null&&(l=r.next,l===r?s.pending=null:(l=l.next,r.next=l,um(s,l)))}function xd(s,r,l){var d=s.pending;if(s.pending=null,d!==null){d=d.next;do r.status="rejected",r.reason=l,fm(r),r=r.next;while(r!==d)}s.action=null}function fm(s){s=s.listeners;for(var r=0;r<s.length;r++)(0,s[r])()}function gm(s,r){return r}function pm(s,r){if(we){var l=je.formState;if(l!==null){e:{var d=pe;if(we){if(ze){t:{for(var g=ze,p=an;g.nodeType!==8;){if(!p){g=null;break t}if(g=cn(g.nextSibling),g===null){g=null;break t}}p=g.data,g=p==="F!"||p==="F"?g:null}if(g){ze=cn(g.nextSibling),d=g.data==="F!";break e}}Si(d)}d=!1}d&&(r=l[0])}}return l=Ct(),l.memoizedState=l.baseState=r,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gm,lastRenderedState:r},l.queue=d,l=Rm.bind(null,pe,d),d.dispatch=l,d=wd(!1),p=Nd.bind(null,pe,!1,d.queue),d=Ct(),g={state:r,dispatch:null,action:s,pending:null},d.queue=g,l=P1.bind(null,pe,g,p,l),g.dispatch=l,d.memoizedState=s,[r,l,!1]}function mm(s){var r=Je();return ym(r,Le,s)}function ym(s,r,l){if(r=vd(s,r,gm)[0],s=gl(Wn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var d=Eo(r)}catch(w){throw w===ir?sl:w}else d=r;r=Je();var g=r.queue,p=g.dispatch;return l!==r.memoizedState&&(pe.flags|=2048,lr(9,{destroy:void 0},q1.bind(null,g,l),null)),[d,p,s]}function q1(s,r){s.action=r}function _m(s){var r=Je(),l=Le;if(l!==null)return ym(r,l,s);Je(),r=r.memoizedState,l=Je();var d=l.queue.dispatch;return l.memoizedState=s,[r,d,!1]}function lr(s,r,l,d){return s={tag:s,create:l,deps:d,inst:r,next:null},r=pe.updateQueue,r===null&&(r=hl(),pe.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=s.next=s:(d=l.next,l.next=s,s.next=d,r.lastEffect=s),s}function bm(){return Je().memoizedState}function pl(s,r,l,d){var g=Ct();pe.flags|=s,g.memoizedState=lr(1|r,{destroy:void 0},l,d===void 0?null:d)}function ml(s,r,l,d){var g=Je();d=d===void 0?null:d;var p=g.memoizedState.inst;Le!==null&&d!==null&&gd(d,Le.memoizedState.deps)?g.memoizedState=lr(r,p,l,d):(pe.flags|=s,g.memoizedState=lr(1|r,p,l,d))}function vm(s,r){pl(8390656,8,s,r)}function Td(s,r){ml(2048,8,s,r)}function U1(s){pe.flags|=4;var r=pe.updateQueue;if(r===null)r=hl(),pe.updateQueue=r,r.events=[s];else{var l=r.events;l===null?r.events=[s]:l.push(s)}}function Sm(s){var r=Je().memoizedState;return U1({ref:r,nextImpl:s}),function(){if((ke&2)!==0)throw Error(n(440));return r.impl.apply(void 0,arguments)}}function wm(s,r){return ml(4,2,s,r)}function xm(s,r){return ml(4,4,s,r)}function Tm(s,r){if(typeof r=="function"){s=s();var l=r(s);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return s=s(),r.current=s,function(){r.current=null}}function Em(s,r,l){l=l!=null?l.concat([s]):null,ml(4,4,Tm.bind(null,r,s),l)}function Ed(){}function Am(s,r){var l=Je();r=r===void 0?null:r;var d=l.memoizedState;return r!==null&&gd(r,d[1])?d[0]:(l.memoizedState=[s,r],s)}function Cm(s,r){var l=Je();r=r===void 0?null:r;var d=l.memoizedState;if(r!==null&&gd(r,d[1]))return d[0];if(d=s(),ps){Nn(!0);try{s()}finally{Nn(!1)}}return l.memoizedState=[d,r],d}function Ad(s,r,l){return l===void 0||(Kn&1073741824)!==0&&(ve&261930)===0?s.memoizedState=r:(s.memoizedState=l,s=ky(),pe.lanes|=s,Mi|=s,l)}function km(s,r,l,d){return Ft(l,r)?l:rr.current!==null?(s=Ad(s,l,d),Ft(s,r)||(st=!0),s):(Kn&42)===0||(Kn&1073741824)!==0&&(ve&261930)===0?(st=!0,s.memoizedState=l):(s=ky(),pe.lanes|=s,Mi|=s,r)}function Nm(s,r,l,d,g){var p=Z.p;Z.p=p!==0&&8>p?p:8;var w=P.T,A={};P.T=A,Nd(s,!1,r,l);try{var k=g(),$=P.S;if($!==null&&$(A,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var F=z1(k,d);Ao(s,r,F,Jt(s))}else Ao(s,r,d,Jt(s))}catch(K){Ao(s,r,{then:function(){},status:"rejected",reason:K},Jt())}finally{Z.p=p,w!==null&&A.types!==null&&(w.types=A.types),P.T=w}}function V1(){}function Cd(s,r,l,d){if(s.tag!==5)throw Error(n(476));var g=Mm(s).queue;Nm(s,g,r,oe,l===null?V1:function(){return Dm(s),l(d)})}function Mm(s){var r=s.memoizedState;if(r!==null)return r;r={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:oe},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:l},next:null},s.memoizedState=r,s=s.alternate,s!==null&&(s.memoizedState=r),r}function Dm(s){var r=Mm(s);r.next===null&&(r=s.alternate.memoizedState),Ao(s,r.next.queue,{},Jt())}function kd(){return _t(Uo)}function Lm(){return Je().memoizedState}function Om(){return Je().memoizedState}function F1(s){for(var r=s.return;r!==null;){switch(r.tag){case 24:case 3:var l=Jt();s=Ti(l);var d=Ei(r,s,l);d!==null&&($t(d,r,l),So(d,r,l)),r={cache:id()},s.payload=r;return}r=r.return}}function G1(s,r,l){var d=Jt();l={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},yl(s)?jm(r,l):(l=Gu(s,r,l,d),l!==null&&($t(l,s,d),Hm(l,r,d)))}function Rm(s,r,l){var d=Jt();Ao(s,r,l,d)}function Ao(s,r,l,d){var g={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(yl(s))jm(r,g);else{var p=s.alternate;if(s.lanes===0&&(p===null||p.lanes===0)&&(p=r.lastRenderedReducer,p!==null))try{var w=r.lastRenderedState,A=p(w,l);if(g.hasEagerState=!0,g.eagerState=A,Ft(A,w))return Ja(s,r,g,0),je===null&&Wa(),!1}catch{}finally{}if(l=Gu(s,r,g,d),l!==null)return $t(l,s,d),Hm(l,r,d),!0}return!1}function Nd(s,r,l,d){if(d={lane:2,revertLane:ah(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},yl(s)){if(r)throw Error(n(479))}else r=Gu(s,l,d,2),r!==null&&$t(r,s,2)}function yl(s){var r=s.alternate;return s===pe||r!==null&&r===pe}function jm(s,r){or=ul=!0;var l=s.pending;l===null?r.next=r:(r.next=l.next,l.next=r),s.pending=r}function Hm(s,r,l){if((l&4194048)!==0){var d=r.lanes;d&=s.pendingLanes,l|=d,r.lanes=l,Pg(s,l)}}var Co={readContext:_t,use:fl,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};Co.useEffectEvent=Ye;var $m={readContext:_t,use:fl,useCallback:function(s,r){return Ct().memoizedState=[s,r===void 0?null:r],s},useContext:_t,useEffect:vm,useImperativeHandle:function(s,r,l){l=l!=null?l.concat([s]):null,pl(4194308,4,Tm.bind(null,r,s),l)},useLayoutEffect:function(s,r){return pl(4194308,4,s,r)},useInsertionEffect:function(s,r){pl(4,2,s,r)},useMemo:function(s,r){var l=Ct();r=r===void 0?null:r;var d=s();if(ps){Nn(!0);try{s()}finally{Nn(!1)}}return l.memoizedState=[d,r],d},useReducer:function(s,r,l){var d=Ct();if(l!==void 0){var g=l(r);if(ps){Nn(!0);try{l(r)}finally{Nn(!1)}}}else g=r;return d.memoizedState=d.baseState=g,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:g},d.queue=s,s=s.dispatch=G1.bind(null,pe,s),[d.memoizedState,s]},useRef:function(s){var r=Ct();return s={current:s},r.memoizedState=s},useState:function(s){s=wd(s);var r=s.queue,l=Rm.bind(null,pe,r);return r.dispatch=l,[s.memoizedState,l]},useDebugValue:Ed,useDeferredValue:function(s,r){var l=Ct();return Ad(l,s,r)},useTransition:function(){var s=wd(!1);return s=Nm.bind(null,pe,s.queue,!0,!1),Ct().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,r,l){var d=pe,g=Ct();if(we){if(l===void 0)throw Error(n(407));l=l()}else{if(l=r(),je===null)throw Error(n(349));(ve&127)!==0||sm(d,r,l)}g.memoizedState=l;var p={value:l,getSnapshot:r};return g.queue=p,vm(om.bind(null,d,p,s),[s]),d.flags|=2048,lr(9,{destroy:void 0},rm.bind(null,d,p,l,r),null),l},useId:function(){var s=Ct(),r=je.identifierPrefix;if(we){var l=Ln,d=Dn;l=(d&~(1<<32-At(d)-1)).toString(32)+l,r="_"+r+"R_"+l,l=dl++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=I1++,r="_"+r+"r_"+l.toString(32)+"_";return s.memoizedState=r},useHostTransitionStatus:kd,useFormState:pm,useActionState:pm,useOptimistic:function(s){var r=Ct();r.memoizedState=r.baseState=s;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=Nd.bind(null,pe,!0,l),l.dispatch=r,[s,r]},useMemoCache:bd,useCacheRefresh:function(){return Ct().memoizedState=F1.bind(null,pe)},useEffectEvent:function(s){var r=Ct(),l={impl:s};return r.memoizedState=l,function(){if((ke&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}},Md={readContext:_t,use:fl,useCallback:Am,useContext:_t,useEffect:Td,useImperativeHandle:Em,useInsertionEffect:wm,useLayoutEffect:xm,useMemo:Cm,useReducer:gl,useRef:bm,useState:function(){return gl(Wn)},useDebugValue:Ed,useDeferredValue:function(s,r){var l=Je();return km(l,Le.memoizedState,s,r)},useTransition:function(){var s=gl(Wn)[0],r=Je().memoizedState;return[typeof s=="boolean"?s:Eo(s),r]},useSyncExternalStore:im,useId:Lm,useHostTransitionStatus:kd,useFormState:mm,useActionState:mm,useOptimistic:function(s,r){var l=Je();return cm(l,Le,s,r)},useMemoCache:bd,useCacheRefresh:Om};Md.useEffectEvent=Sm;var zm={readContext:_t,use:fl,useCallback:Am,useContext:_t,useEffect:Td,useImperativeHandle:Em,useInsertionEffect:wm,useLayoutEffect:xm,useMemo:Cm,useReducer:Sd,useRef:bm,useState:function(){return Sd(Wn)},useDebugValue:Ed,useDeferredValue:function(s,r){var l=Je();return Le===null?Ad(l,s,r):km(l,Le.memoizedState,s,r)},useTransition:function(){var s=Sd(Wn)[0],r=Je().memoizedState;return[typeof s=="boolean"?s:Eo(s),r]},useSyncExternalStore:im,useId:Lm,useHostTransitionStatus:kd,useFormState:_m,useActionState:_m,useOptimistic:function(s,r){var l=Je();return Le!==null?cm(l,Le,s,r):(l.baseState=s,[s,l.queue.dispatch])},useMemoCache:bd,useCacheRefresh:Om};zm.useEffectEvent=Sm;function Dd(s,r,l,d){r=s.memoizedState,l=l(d,r),l=l==null?r:m({},r,l),s.memoizedState=l,s.lanes===0&&(s.updateQueue.baseState=l)}var Ld={enqueueSetState:function(s,r,l){s=s._reactInternals;var d=Jt(),g=Ti(d);g.payload=r,l!=null&&(g.callback=l),r=Ei(s,g,d),r!==null&&($t(r,s,d),So(r,s,d))},enqueueReplaceState:function(s,r,l){s=s._reactInternals;var d=Jt(),g=Ti(d);g.tag=1,g.payload=r,l!=null&&(g.callback=l),r=Ei(s,g,d),r!==null&&($t(r,s,d),So(r,s,d))},enqueueForceUpdate:function(s,r){s=s._reactInternals;var l=Jt(),d=Ti(l);d.tag=2,r!=null&&(d.callback=r),r=Ei(s,d,l),r!==null&&($t(r,s,l),So(r,s,l))}};function Im(s,r,l,d,g,p,w){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(d,p,w):r.prototype&&r.prototype.isPureReactComponent?!fo(l,d)||!fo(g,p):!0}function Bm(s,r,l,d){s=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,d),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,d),r.state!==s&&Ld.enqueueReplaceState(r,r.state,null)}function ms(s,r){var l=r;if("ref"in r){l={};for(var d in r)d!=="ref"&&(l[d]=r[d])}if(s=s.defaultProps){l===r&&(l=m({},l));for(var g in s)l[g]===void 0&&(l[g]=s[g])}return l}function Pm(s){Ka(s)}function qm(s){console.error(s)}function Um(s){Ka(s)}function _l(s,r){try{var l=s.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(d){setTimeout(function(){throw d})}}function Vm(s,r,l){try{var d=s.onCaughtError;d(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function Od(s,r,l){return l=Ti(l),l.tag=3,l.payload={element:null},l.callback=function(){_l(s,r)},l}function Fm(s){return s=Ti(s),s.tag=3,s}function Gm(s,r,l,d){var g=l.type.getDerivedStateFromError;if(typeof g=="function"){var p=d.value;s.payload=function(){return g(p)},s.callback=function(){Vm(r,l,d)}}var w=l.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(s.callback=function(){Vm(r,l,d),typeof g!="function"&&(Di===null?Di=new Set([this]):Di.add(this));var A=d.stack;this.componentDidCatch(d.value,{componentStack:A!==null?A:""})})}function X1(s,r,l,d,g){if(l.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(r=l.alternate,r!==null&&er(r,l,g,!0),l=Xt.current,l!==null){switch(l.tag){case 31:case 13:return ln===null?Ml():l.alternate===null&&Ke===0&&(Ke=3),l.flags&=-257,l.flags|=65536,l.lanes=g,d===rl?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([d]):r.add(d),sh(s,d,g)),!1;case 22:return l.flags|=65536,d===rl?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([d])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([d]):l.add(d)),sh(s,d,g)),!1}throw Error(n(435,l.tag))}return sh(s,d,g),Ml(),!1}if(we)return r=Xt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=g,d!==Zu&&(s=Error(n(422),{cause:d}),mo(sn(s,l)))):(d!==Zu&&(r=Error(n(423),{cause:d}),mo(sn(r,l))),s=s.current.alternate,s.flags|=65536,g&=-g,s.lanes|=g,d=sn(d,l),g=Od(s.stateNode,d,g),cd(s,g),Ke!==4&&(Ke=2)),!1;var p=Error(n(520),{cause:d});if(p=sn(p,l),jo===null?jo=[p]:jo.push(p),Ke!==4&&(Ke=2),r===null)return!0;d=sn(d,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,s=g&-g,l.lanes|=s,s=Od(l.stateNode,d,s),cd(l,s),!1;case 1:if(r=l.type,p=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Di===null||!Di.has(p))))return l.flags|=65536,g&=-g,l.lanes|=g,g=Fm(g),Gm(g,s,l,d),cd(l,g),!1}l=l.return}while(l!==null);return!1}var Rd=Error(n(461)),st=!1;function bt(s,r,l,d){r.child=s===null?Wp(r,null,l,d):gs(r,s.child,l,d)}function Xm(s,r,l,d,g){l=l.render;var p=r.ref;if("ref"in d){var w={};for(var A in d)A!=="ref"&&(w[A]=d[A])}else w=d;return us(r),d=pd(s,r,l,w,p,g),A=md(),s!==null&&!st?(yd(s,r,g),Jn(s,r,g)):(we&&A&&Wu(r),r.flags|=1,bt(s,r,d,g),r.child)}function Ym(s,r,l,d,g){if(s===null){var p=l.type;return typeof p=="function"&&!Xu(p)&&p.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=p,Km(s,r,p,d,g)):(s=Qa(l.type,null,d,r,r.mode,g),s.ref=r.ref,s.return=r,r.child=s)}if(p=s.child,!qd(s,g)){var w=p.memoizedProps;if(l=l.compare,l=l!==null?l:fo,l(w,d)&&s.ref===r.ref)return Jn(s,r,g)}return r.flags|=1,s=Fn(p,d),s.ref=r.ref,s.return=r,r.child=s}function Km(s,r,l,d,g){if(s!==null){var p=s.memoizedProps;if(fo(p,d)&&s.ref===r.ref)if(st=!1,r.pendingProps=d=p,qd(s,g))(s.flags&131072)!==0&&(st=!0);else return r.lanes=s.lanes,Jn(s,r,g)}return jd(s,r,l,d,g)}function Wm(s,r,l,d){var g=d.children,p=s!==null?s.memoizedState:null;if(s===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((r.flags&128)!==0){if(p=p!==null?p.baseLanes|l:l,s!==null){for(d=r.child=s.child,g=0;d!==null;)g=g|d.lanes|d.childLanes,d=d.sibling;d=g&~p}else d=0,r.child=null;return Jm(s,r,p,l,d)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},s!==null&&il(r,p!==null?p.cachePool:null),p!==null?Qp(r,p):dd(),em(r);else return d=r.lanes=536870912,Jm(s,r,p!==null?p.baseLanes|l:l,l,d)}else p!==null?(il(r,p.cachePool),Qp(r,p),Ci(),r.memoizedState=null):(s!==null&&il(r,null),dd(),Ci());return bt(s,r,g,l),r.child}function ko(s,r){return s!==null&&s.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Jm(s,r,l,d,g){var p=rd();return p=p===null?null:{parent:nt._currentValue,pool:p},r.memoizedState={baseLanes:l,cachePool:p},s!==null&&il(r,null),dd(),em(r),s!==null&&er(s,r,d,!0),r.childLanes=g,null}function bl(s,r){return r=Sl({mode:r.mode,children:r.children},s.mode),r.ref=s.ref,s.child=r,r.return=s,r}function Zm(s,r,l){return gs(r,s.child,null,l),s=bl(r,r.pendingProps),s.flags|=2,Yt(r),r.memoizedState=null,s}function Y1(s,r,l){var d=r.pendingProps,g=(r.flags&128)!==0;if(r.flags&=-129,s===null){if(we){if(d.mode==="hidden")return s=bl(r,d),r.lanes=536870912,ko(null,s);if(fd(r),(s=ze)?(s=u_(s,an),s=s!==null&&s.data==="&"?s:null,s!==null&&(r.memoizedState={dehydrated:s,treeContext:bi!==null?{id:Dn,overflow:Ln}:null,retryLane:536870912,hydrationErrors:null},l=jp(s),l.return=r,r.child=l,yt=r,ze=null)):s=null,s===null)throw Si(r);return r.lanes=536870912,null}return bl(r,d)}var p=s.memoizedState;if(p!==null){var w=p.dehydrated;if(fd(r),g)if(r.flags&256)r.flags&=-257,r=Zm(s,r,l);else if(r.memoizedState!==null)r.child=s.child,r.flags|=128,r=null;else throw Error(n(558));else if(st||er(s,r,l,!1),g=(l&s.childLanes)!==0,st||g){if(d=je,d!==null&&(w=qg(d,l),w!==0&&w!==p.retryLane))throw p.retryLane=w,os(s,w),$t(d,s,w),Rd;Ml(),r=Zm(s,r,l)}else s=p.treeContext,ze=cn(w.nextSibling),yt=r,we=!0,vi=null,an=!1,s!==null&&zp(r,s),r=bl(r,d),r.flags|=4096;return r}return s=Fn(s.child,{mode:d.mode,children:d.children}),s.ref=r.ref,r.child=s,s.return=r,s}function vl(s,r){var l=r.ref;if(l===null)s!==null&&s.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(n(284));(s===null||s.ref!==l)&&(r.flags|=4194816)}}function jd(s,r,l,d,g){return us(r),l=pd(s,r,l,d,void 0,g),d=md(),s!==null&&!st?(yd(s,r,g),Jn(s,r,g)):(we&&d&&Wu(r),r.flags|=1,bt(s,r,l,g),r.child)}function Qm(s,r,l,d,g,p){return us(r),r.updateQueue=null,l=nm(r,d,l,g),tm(s),d=md(),s!==null&&!st?(yd(s,r,p),Jn(s,r,p)):(we&&d&&Wu(r),r.flags|=1,bt(s,r,l,p),r.child)}function ey(s,r,l,d,g){if(us(r),r.stateNode===null){var p=Ws,w=l.contextType;typeof w=="object"&&w!==null&&(p=_t(w)),p=new l(d,p),r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Ld,r.stateNode=p,p._reactInternals=r,p=r.stateNode,p.props=d,p.state=r.memoizedState,p.refs={},ad(r),w=l.contextType,p.context=typeof w=="object"&&w!==null?_t(w):Ws,p.state=r.memoizedState,w=l.getDerivedStateFromProps,typeof w=="function"&&(Dd(r,l,w,d),p.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(w=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),w!==p.state&&Ld.enqueueReplaceState(p,p.state,null),xo(r,d,p,g),wo(),p.state=r.memoizedState),typeof p.componentDidMount=="function"&&(r.flags|=4194308),d=!0}else if(s===null){p=r.stateNode;var A=r.memoizedProps,k=ms(l,A);p.props=k;var $=p.context,F=l.contextType;w=Ws,typeof F=="object"&&F!==null&&(w=_t(F));var K=l.getDerivedStateFromProps;F=typeof K=="function"||typeof p.getSnapshotBeforeUpdate=="function",A=r.pendingProps!==A,F||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(A||$!==w)&&Bm(r,p,d,w),xi=!1;var z=r.memoizedState;p.state=z,xo(r,d,p,g),wo(),$=r.memoizedState,A||z!==$||xi?(typeof K=="function"&&(Dd(r,l,K,d),$=r.memoizedState),(k=xi||Im(r,l,k,d,z,$,w))?(F||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(r.flags|=4194308)):(typeof p.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=d,r.memoizedState=$),p.props=d,p.state=$,p.context=w,d=k):(typeof p.componentDidMount=="function"&&(r.flags|=4194308),d=!1)}else{p=r.stateNode,ld(s,r),w=r.memoizedProps,F=ms(l,w),p.props=F,K=r.pendingProps,z=p.context,$=l.contextType,k=Ws,typeof $=="object"&&$!==null&&(k=_t($)),A=l.getDerivedStateFromProps,($=typeof A=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(w!==K||z!==k)&&Bm(r,p,d,k),xi=!1,z=r.memoizedState,p.state=z,xo(r,d,p,g),wo();var U=r.memoizedState;w!==K||z!==U||xi||s!==null&&s.dependencies!==null&&tl(s.dependencies)?(typeof A=="function"&&(Dd(r,l,A,d),U=r.memoizedState),(F=xi||Im(r,l,F,d,z,U,k)||s!==null&&s.dependencies!==null&&tl(s.dependencies))?($||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(d,U,k),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(d,U,k)),typeof p.componentDidUpdate=="function"&&(r.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof p.componentDidUpdate!="function"||w===s.memoizedProps&&z===s.memoizedState||(r.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||w===s.memoizedProps&&z===s.memoizedState||(r.flags|=1024),r.memoizedProps=d,r.memoizedState=U),p.props=d,p.state=U,p.context=k,d=F):(typeof p.componentDidUpdate!="function"||w===s.memoizedProps&&z===s.memoizedState||(r.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||w===s.memoizedProps&&z===s.memoizedState||(r.flags|=1024),d=!1)}return p=d,vl(s,r),d=(r.flags&128)!==0,p||d?(p=r.stateNode,l=d&&typeof l.getDerivedStateFromError!="function"?null:p.render(),r.flags|=1,s!==null&&d?(r.child=gs(r,s.child,null,g),r.child=gs(r,null,l,g)):bt(s,r,l,g),r.memoizedState=p.state,s=r.child):s=Jn(s,r,g),s}function ty(s,r,l,d){return ls(),r.flags|=256,bt(s,r,l,d),r.child}var Hd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $d(s){return{baseLanes:s,cachePool:Vp()}}function zd(s,r,l){return s=s!==null?s.childLanes&~l:0,r&&(s|=Wt),s}function ny(s,r,l){var d=r.pendingProps,g=!1,p=(r.flags&128)!==0,w;if((w=p)||(w=s!==null&&s.memoizedState===null?!1:(We.current&2)!==0),w&&(g=!0,r.flags&=-129),w=(r.flags&32)!==0,r.flags&=-33,s===null){if(we){if(g?Ai(r):Ci(),(s=ze)?(s=u_(s,an),s=s!==null&&s.data!=="&"?s:null,s!==null&&(r.memoizedState={dehydrated:s,treeContext:bi!==null?{id:Dn,overflow:Ln}:null,retryLane:536870912,hydrationErrors:null},l=jp(s),l.return=r,r.child=l,yt=r,ze=null)):s=null,s===null)throw Si(r);return vh(s)?r.lanes=32:r.lanes=536870912,null}var A=d.children;return d=d.fallback,g?(Ci(),g=r.mode,A=Sl({mode:"hidden",children:A},g),d=as(d,g,l,null),A.return=r,d.return=r,A.sibling=d,r.child=A,d=r.child,d.memoizedState=$d(l),d.childLanes=zd(s,w,l),r.memoizedState=Hd,ko(null,d)):(Ai(r),Id(r,A))}var k=s.memoizedState;if(k!==null&&(A=k.dehydrated,A!==null)){if(p)r.flags&256?(Ai(r),r.flags&=-257,r=Bd(s,r,l)):r.memoizedState!==null?(Ci(),r.child=s.child,r.flags|=128,r=null):(Ci(),A=d.fallback,g=r.mode,d=Sl({mode:"visible",children:d.children},g),A=as(A,g,l,null),A.flags|=2,d.return=r,A.return=r,d.sibling=A,r.child=d,gs(r,s.child,null,l),d=r.child,d.memoizedState=$d(l),d.childLanes=zd(s,w,l),r.memoizedState=Hd,r=ko(null,d));else if(Ai(r),vh(A)){if(w=A.nextSibling&&A.nextSibling.dataset,w)var $=w.dgst;w=$,d=Error(n(419)),d.stack="",d.digest=w,mo({value:d,source:null,stack:null}),r=Bd(s,r,l)}else if(st||er(s,r,l,!1),w=(l&s.childLanes)!==0,st||w){if(w=je,w!==null&&(d=qg(w,l),d!==0&&d!==k.retryLane))throw k.retryLane=d,os(s,d),$t(w,s,d),Rd;bh(A)||Ml(),r=Bd(s,r,l)}else bh(A)?(r.flags|=192,r.child=s.child,r=null):(s=k.treeContext,ze=cn(A.nextSibling),yt=r,we=!0,vi=null,an=!1,s!==null&&zp(r,s),r=Id(r,d.children),r.flags|=4096);return r}return g?(Ci(),A=d.fallback,g=r.mode,k=s.child,$=k.sibling,d=Fn(k,{mode:"hidden",children:d.children}),d.subtreeFlags=k.subtreeFlags&65011712,$!==null?A=Fn($,A):(A=as(A,g,l,null),A.flags|=2),A.return=r,d.return=r,d.sibling=A,r.child=d,ko(null,d),d=r.child,A=s.child.memoizedState,A===null?A=$d(l):(g=A.cachePool,g!==null?(k=nt._currentValue,g=g.parent!==k?{parent:k,pool:k}:g):g=Vp(),A={baseLanes:A.baseLanes|l,cachePool:g}),d.memoizedState=A,d.childLanes=zd(s,w,l),r.memoizedState=Hd,ko(s.child,d)):(Ai(r),l=s.child,s=l.sibling,l=Fn(l,{mode:"visible",children:d.children}),l.return=r,l.sibling=null,s!==null&&(w=r.deletions,w===null?(r.deletions=[s],r.flags|=16):w.push(s)),r.child=l,r.memoizedState=null,l)}function Id(s,r){return r=Sl({mode:"visible",children:r},s.mode),r.return=s,s.child=r}function Sl(s,r){return s=Gt(22,s,null,r),s.lanes=0,s}function Bd(s,r,l){return gs(r,s.child,null,l),s=Id(r,r.pendingProps.children),s.flags|=2,r.memoizedState=null,s}function iy(s,r,l){s.lanes|=r;var d=s.alternate;d!==null&&(d.lanes|=r),td(s.return,r,l)}function Pd(s,r,l,d,g,p){var w=s.memoizedState;w===null?s.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:g,treeForkCount:p}:(w.isBackwards=r,w.rendering=null,w.renderingStartTime=0,w.last=d,w.tail=l,w.tailMode=g,w.treeForkCount=p)}function sy(s,r,l){var d=r.pendingProps,g=d.revealOrder,p=d.tail;d=d.children;var w=We.current,A=(w&2)!==0;if(A?(w=w&1|2,r.flags|=128):w&=1,ee(We,w),bt(s,r,d,l),d=we?po:0,!A&&s!==null&&(s.flags&128)!==0)e:for(s=r.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&iy(s,l,r);else if(s.tag===19)iy(s,l,r);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break e;for(;s.sibling===null;){if(s.return===null||s.return===r)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(g){case"forwards":for(l=r.child,g=null;l!==null;)s=l.alternate,s!==null&&cl(s)===null&&(g=l),l=l.sibling;l=g,l===null?(g=r.child,r.child=null):(g=l.sibling,l.sibling=null),Pd(r,!1,g,l,p,d);break;case"backwards":case"unstable_legacy-backwards":for(l=null,g=r.child,r.child=null;g!==null;){if(s=g.alternate,s!==null&&cl(s)===null){r.child=g;break}s=g.sibling,g.sibling=l,l=g,g=s}Pd(r,!0,l,null,p,d);break;case"together":Pd(r,!1,null,null,void 0,d);break;default:r.memoizedState=null}return r.child}function Jn(s,r,l){if(s!==null&&(r.dependencies=s.dependencies),Mi|=r.lanes,(l&r.childLanes)===0)if(s!==null){if(er(s,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(s!==null&&r.child!==s.child)throw Error(n(153));if(r.child!==null){for(s=r.child,l=Fn(s,s.pendingProps),r.child=l,l.return=r;s.sibling!==null;)s=s.sibling,l=l.sibling=Fn(s,s.pendingProps),l.return=r;l.sibling=null}return r.child}function qd(s,r){return(s.lanes&r)!==0?!0:(s=s.dependencies,!!(s!==null&&tl(s)))}function K1(s,r,l){switch(r.tag){case 3:at(r,r.stateNode.containerInfo),wi(r,nt,s.memoizedState.cache),ls();break;case 27:case 5:Zi(r);break;case 4:at(r,r.stateNode.containerInfo);break;case 10:wi(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,fd(r),null;break;case 13:var d=r.memoizedState;if(d!==null)return d.dehydrated!==null?(Ai(r),r.flags|=128,null):(l&r.child.childLanes)!==0?ny(s,r,l):(Ai(r),s=Jn(s,r,l),s!==null?s.sibling:null);Ai(r);break;case 19:var g=(s.flags&128)!==0;if(d=(l&r.childLanes)!==0,d||(er(s,r,l,!1),d=(l&r.childLanes)!==0),g){if(d)return sy(s,r,l);r.flags|=128}if(g=r.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ee(We,We.current),d)break;return null;case 22:return r.lanes=0,Wm(s,r,l,r.pendingProps);case 24:wi(r,nt,s.memoizedState.cache)}return Jn(s,r,l)}function ry(s,r,l){if(s!==null)if(s.memoizedProps!==r.pendingProps)st=!0;else{if(!qd(s,l)&&(r.flags&128)===0)return st=!1,K1(s,r,l);st=(s.flags&131072)!==0}else st=!1,we&&(r.flags&1048576)!==0&&$p(r,po,r.index);switch(r.lanes=0,r.tag){case 16:e:{var d=r.pendingProps;if(s=hs(r.elementType),r.type=s,typeof s=="function")Xu(s)?(d=ms(s,d),r.tag=1,r=ey(null,r,s,d,l)):(r.tag=0,r=jd(null,r,s,d,l));else{if(s!=null){var g=s.$$typeof;if(g===R){r.tag=11,r=Xm(null,r,s,d,l);break e}else if(g===I){r.tag=14,r=Ym(null,r,s,d,l);break e}}throw r=te(s)||s,Error(n(306,r,""))}}return r;case 0:return jd(s,r,r.type,r.pendingProps,l);case 1:return d=r.type,g=ms(d,r.pendingProps),ey(s,r,d,g,l);case 3:e:{if(at(r,r.stateNode.containerInfo),s===null)throw Error(n(387));d=r.pendingProps;var p=r.memoizedState;g=p.element,ld(s,r),xo(r,d,null,l);var w=r.memoizedState;if(d=w.cache,wi(r,nt,d),d!==p.cache&&nd(r,[nt],l,!0),wo(),d=w.element,p.isDehydrated)if(p={element:d,isDehydrated:!1,cache:w.cache},r.updateQueue.baseState=p,r.memoizedState=p,r.flags&256){r=ty(s,r,d,l);break e}else if(d!==g){g=sn(Error(n(424)),r),mo(g),r=ty(s,r,d,l);break e}else{switch(s=r.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(ze=cn(s.firstChild),yt=r,we=!0,vi=null,an=!0,l=Wp(r,null,d,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ls(),d===g){r=Jn(s,r,l);break e}bt(s,r,d,l)}r=r.child}return r;case 26:return vl(s,r),s===null?(l=m_(r.type,null,r.pendingProps,null))?r.memoizedState=l:we||(l=r.type,s=r.pendingProps,d=$l(ae.current).createElement(l),d[mt]=r,d[Dt]=s,vt(d,l,s),ft(d),r.stateNode=d):r.memoizedState=m_(r.type,s.memoizedProps,r.pendingProps,s.memoizedState),null;case 27:return Zi(r),s===null&&we&&(d=r.stateNode=f_(r.type,r.pendingProps,ae.current),yt=r,an=!0,g=ze,ji(r.type)?(Sh=g,ze=cn(d.firstChild)):ze=g),bt(s,r,r.pendingProps.children,l),vl(s,r),s===null&&(r.flags|=4194304),r.child;case 5:return s===null&&we&&((g=d=ze)&&(d=Ex(d,r.type,r.pendingProps,an),d!==null?(r.stateNode=d,yt=r,ze=cn(d.firstChild),an=!1,g=!0):g=!1),g||Si(r)),Zi(r),g=r.type,p=r.pendingProps,w=s!==null?s.memoizedProps:null,d=p.children,mh(g,p)?d=null:w!==null&&mh(g,w)&&(r.flags|=32),r.memoizedState!==null&&(g=pd(s,r,B1,null,null,l),Uo._currentValue=g),vl(s,r),bt(s,r,d,l),r.child;case 6:return s===null&&we&&((s=l=ze)&&(l=Ax(l,r.pendingProps,an),l!==null?(r.stateNode=l,yt=r,ze=null,s=!0):s=!1),s||Si(r)),null;case 13:return ny(s,r,l);case 4:return at(r,r.stateNode.containerInfo),d=r.pendingProps,s===null?r.child=gs(r,null,d,l):bt(s,r,d,l),r.child;case 11:return Xm(s,r,r.type,r.pendingProps,l);case 7:return bt(s,r,r.pendingProps,l),r.child;case 8:return bt(s,r,r.pendingProps.children,l),r.child;case 12:return bt(s,r,r.pendingProps.children,l),r.child;case 10:return d=r.pendingProps,wi(r,r.type,d.value),bt(s,r,d.children,l),r.child;case 9:return g=r.type._context,d=r.pendingProps.children,us(r),g=_t(g),d=d(g),r.flags|=1,bt(s,r,d,l),r.child;case 14:return Ym(s,r,r.type,r.pendingProps,l);case 15:return Km(s,r,r.type,r.pendingProps,l);case 19:return sy(s,r,l);case 31:return Y1(s,r,l);case 22:return Wm(s,r,l,r.pendingProps);case 24:return us(r),d=_t(nt),s===null?(g=rd(),g===null&&(g=je,p=id(),g.pooledCache=p,p.refCount++,p!==null&&(g.pooledCacheLanes|=l),g=p),r.memoizedState={parent:d,cache:g},ad(r),wi(r,nt,g)):((s.lanes&l)!==0&&(ld(s,r),xo(r,null,null,l),wo()),g=s.memoizedState,p=r.memoizedState,g.parent!==d?(g={parent:d,cache:d},r.memoizedState=g,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=g),wi(r,nt,d)):(d=p.cache,wi(r,nt,d),d!==g.cache&&nd(r,[nt],l,!0))),bt(s,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(n(156,r.tag))}function Zn(s){s.flags|=4}function Ud(s,r,l,d,g){if((r=(s.mode&32)!==0)&&(r=!1),r){if(s.flags|=16777216,(g&335544128)===g)if(s.stateNode.complete)s.flags|=8192;else if(Ly())s.flags|=8192;else throw fs=rl,od}else s.flags&=-16777217}function oy(s,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!S_(r))if(Ly())s.flags|=8192;else throw fs=rl,od}function wl(s,r){r!==null&&(s.flags|=4),s.flags&16384&&(r=s.tag!==22?Ig():536870912,s.lanes|=r,hr|=r)}function No(s,r){if(!we)switch(s.tailMode){case"hidden":r=s.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?s.tail=null:l.sibling=null;break;case"collapsed":l=s.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?r||s.tail===null?s.tail=null:s.tail.sibling=null:d.sibling=null}}function Ie(s){var r=s.alternate!==null&&s.alternate.child===s.child,l=0,d=0;if(r)for(var g=s.child;g!==null;)l|=g.lanes|g.childLanes,d|=g.subtreeFlags&65011712,d|=g.flags&65011712,g.return=s,g=g.sibling;else for(g=s.child;g!==null;)l|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=s,g=g.sibling;return s.subtreeFlags|=d,s.childLanes=l,r}function W1(s,r,l){var d=r.pendingProps;switch(Ju(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(r),null;case 1:return Ie(r),null;case 3:return l=r.stateNode,d=null,s!==null&&(d=s.memoizedState.cache),r.memoizedState.cache!==d&&(r.flags|=2048),Yn(nt),$e(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(s===null||s.child===null)&&(Qs(r)?Zn(r):s===null||s.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Qu())),Ie(r),null;case 26:var g=r.type,p=r.memoizedState;return s===null?(Zn(r),p!==null?(Ie(r),oy(r,p)):(Ie(r),Ud(r,g,null,d,l))):p?p!==s.memoizedState?(Zn(r),Ie(r),oy(r,p)):(Ie(r),r.flags&=-16777217):(s=s.memoizedProps,s!==d&&Zn(r),Ie(r),Ud(r,g,s,d,l)),null;case 27:if(Bn(r),l=ae.current,g=r.type,s!==null&&r.stateNode!=null)s.memoizedProps!==d&&Zn(r);else{if(!d){if(r.stateNode===null)throw Error(n(166));return Ie(r),null}s=ne.current,Qs(r)?Ip(r):(s=f_(g,d,l),r.stateNode=s,Zn(r))}return Ie(r),null;case 5:if(Bn(r),g=r.type,s!==null&&r.stateNode!=null)s.memoizedProps!==d&&Zn(r);else{if(!d){if(r.stateNode===null)throw Error(n(166));return Ie(r),null}if(p=ne.current,Qs(r))Ip(r);else{var w=$l(ae.current);switch(p){case 1:p=w.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:p=w.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":p=w.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":p=w.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":p=w.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof d.is=="string"?w.createElement("select",{is:d.is}):w.createElement("select"),d.multiple?p.multiple=!0:d.size&&(p.size=d.size);break;default:p=typeof d.is=="string"?w.createElement(g,{is:d.is}):w.createElement(g)}}p[mt]=r,p[Dt]=d;e:for(w=r.child;w!==null;){if(w.tag===5||w.tag===6)p.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===r)break e;for(;w.sibling===null;){if(w.return===null||w.return===r)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}r.stateNode=p;e:switch(vt(p,g,d),g){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Zn(r)}}return Ie(r),Ud(r,r.type,s===null?null:s.memoizedProps,r.pendingProps,l),null;case 6:if(s&&r.stateNode!=null)s.memoizedProps!==d&&Zn(r);else{if(typeof d!="string"&&r.stateNode===null)throw Error(n(166));if(s=ae.current,Qs(r)){if(s=r.stateNode,l=r.memoizedProps,d=null,g=yt,g!==null)switch(g.tag){case 27:case 5:d=g.memoizedProps}s[mt]=r,s=!!(s.nodeValue===l||d!==null&&d.suppressHydrationWarning===!0||n_(s.nodeValue,l)),s||Si(r,!0)}else s=$l(s).createTextNode(d),s[mt]=r,r.stateNode=s}return Ie(r),null;case 31:if(l=r.memoizedState,s===null||s.memoizedState!==null){if(d=Qs(r),l!==null){if(s===null){if(!d)throw Error(n(318));if(s=r.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(557));s[mt]=r}else ls(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ie(r),s=!1}else l=Qu(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=l),s=!0;if(!s)return r.flags&256?(Yt(r),r):(Yt(r),null);if((r.flags&128)!==0)throw Error(n(558))}return Ie(r),null;case 13:if(d=r.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(g=Qs(r),d!==null&&d.dehydrated!==null){if(s===null){if(!g)throw Error(n(318));if(g=r.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(n(317));g[mt]=r}else ls(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ie(r),g=!1}else g=Qu(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=g),g=!0;if(!g)return r.flags&256?(Yt(r),r):(Yt(r),null)}return Yt(r),(r.flags&128)!==0?(r.lanes=l,r):(l=d!==null,s=s!==null&&s.memoizedState!==null,l&&(d=r.child,g=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(g=d.alternate.memoizedState.cachePool.pool),p=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(p=d.memoizedState.cachePool.pool),p!==g&&(d.flags|=2048)),l!==s&&l&&(r.child.flags|=8192),wl(r,r.updateQueue),Ie(r),null);case 4:return $e(),s===null&&dh(r.stateNode.containerInfo),Ie(r),null;case 10:return Yn(r.type),Ie(r),null;case 19:if(G(We),d=r.memoizedState,d===null)return Ie(r),null;if(g=(r.flags&128)!==0,p=d.rendering,p===null)if(g)No(d,!1);else{if(Ke!==0||s!==null&&(s.flags&128)!==0)for(s=r.child;s!==null;){if(p=cl(s),p!==null){for(r.flags|=128,No(d,!1),s=p.updateQueue,r.updateQueue=s,wl(r,s),r.subtreeFlags=0,s=l,l=r.child;l!==null;)Rp(l,s),l=l.sibling;return ee(We,We.current&1|2),we&&Gn(r,d.treeForkCount),r.child}s=s.sibling}d.tail!==null&&Et()>Cl&&(r.flags|=128,g=!0,No(d,!1),r.lanes=4194304)}else{if(!g)if(s=cl(p),s!==null){if(r.flags|=128,g=!0,s=s.updateQueue,r.updateQueue=s,wl(r,s),No(d,!0),d.tail===null&&d.tailMode==="hidden"&&!p.alternate&&!we)return Ie(r),null}else 2*Et()-d.renderingStartTime>Cl&&l!==536870912&&(r.flags|=128,g=!0,No(d,!1),r.lanes=4194304);d.isBackwards?(p.sibling=r.child,r.child=p):(s=d.last,s!==null?s.sibling=p:r.child=p,d.last=p)}return d.tail!==null?(s=d.tail,d.rendering=s,d.tail=s.sibling,d.renderingStartTime=Et(),s.sibling=null,l=We.current,ee(We,g?l&1|2:l&1),we&&Gn(r,d.treeForkCount),s):(Ie(r),null);case 22:case 23:return Yt(r),hd(),d=r.memoizedState!==null,s!==null?s.memoizedState!==null!==d&&(r.flags|=8192):d&&(r.flags|=8192),d?(l&536870912)!==0&&(r.flags&128)===0&&(Ie(r),r.subtreeFlags&6&&(r.flags|=8192)):Ie(r),l=r.updateQueue,l!==null&&wl(r,l.retryQueue),l=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),d=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(d=r.memoizedState.cachePool.pool),d!==l&&(r.flags|=2048),s!==null&&G(ds),null;case 24:return l=null,s!==null&&(l=s.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Yn(nt),Ie(r),null;case 25:return null;case 30:return null}throw Error(n(156,r.tag))}function J1(s,r){switch(Ju(r),r.tag){case 1:return s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 3:return Yn(nt),$e(),s=r.flags,(s&65536)!==0&&(s&128)===0?(r.flags=s&-65537|128,r):null;case 26:case 27:case 5:return Bn(r),null;case 31:if(r.memoizedState!==null){if(Yt(r),r.alternate===null)throw Error(n(340));ls()}return s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 13:if(Yt(r),s=r.memoizedState,s!==null&&s.dehydrated!==null){if(r.alternate===null)throw Error(n(340));ls()}return s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 19:return G(We),null;case 4:return $e(),null;case 10:return Yn(r.type),null;case 22:case 23:return Yt(r),hd(),s!==null&&G(ds),s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 24:return Yn(nt),null;case 25:return null;default:return null}}function ay(s,r){switch(Ju(r),r.tag){case 3:Yn(nt),$e();break;case 26:case 27:case 5:Bn(r);break;case 4:$e();break;case 31:r.memoizedState!==null&&Yt(r);break;case 13:Yt(r);break;case 19:G(We);break;case 10:Yn(r.type);break;case 22:case 23:Yt(r),hd(),s!==null&&G(ds);break;case 24:Yn(nt)}}function Mo(s,r){try{var l=r.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var g=d.next;l=g;do{if((l.tag&s)===s){d=void 0;var p=l.create,w=l.inst;d=p(),w.destroy=d}l=l.next}while(l!==g)}}catch(A){De(r,r.return,A)}}function ki(s,r,l){try{var d=r.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var p=g.next;d=p;do{if((d.tag&s)===s){var w=d.inst,A=w.destroy;if(A!==void 0){w.destroy=void 0,g=r;var k=l,$=A;try{$()}catch(F){De(g,k,F)}}}d=d.next}while(d!==p)}}catch(F){De(r,r.return,F)}}function ly(s){var r=s.updateQueue;if(r!==null){var l=s.stateNode;try{Zp(r,l)}catch(d){De(s,s.return,d)}}}function cy(s,r,l){l.props=ms(s.type,s.memoizedProps),l.state=s.memoizedState;try{l.componentWillUnmount()}catch(d){De(s,r,d)}}function Do(s,r){try{var l=s.ref;if(l!==null){switch(s.tag){case 26:case 27:case 5:var d=s.stateNode;break;case 30:d=s.stateNode;break;default:d=s.stateNode}typeof l=="function"?s.refCleanup=l(d):l.current=d}}catch(g){De(s,r,g)}}function On(s,r){var l=s.ref,d=s.refCleanup;if(l!==null)if(typeof d=="function")try{d()}catch(g){De(s,r,g)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(g){De(s,r,g)}else l.current=null}function uy(s){var r=s.type,l=s.memoizedProps,d=s.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&d.focus();break e;case"img":l.src?d.src=l.src:l.srcSet&&(d.srcset=l.srcSet)}}catch(g){De(s,s.return,g)}}function Vd(s,r,l){try{var d=s.stateNode;bx(d,s.type,l,r),d[Dt]=r}catch(g){De(s,s.return,g)}}function dy(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&ji(s.type)||s.tag===4}function Fd(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||dy(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&ji(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Gd(s,r,l){var d=s.tag;if(d===5||d===6)s=s.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(s,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(s),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=Un));else if(d!==4&&(d===27&&ji(s.type)&&(l=s.stateNode,r=null),s=s.child,s!==null))for(Gd(s,r,l),s=s.sibling;s!==null;)Gd(s,r,l),s=s.sibling}function xl(s,r,l){var d=s.tag;if(d===5||d===6)s=s.stateNode,r?l.insertBefore(s,r):l.appendChild(s);else if(d!==4&&(d===27&&ji(s.type)&&(l=s.stateNode),s=s.child,s!==null))for(xl(s,r,l),s=s.sibling;s!==null;)xl(s,r,l),s=s.sibling}function hy(s){var r=s.stateNode,l=s.memoizedProps;try{for(var d=s.type,g=r.attributes;g.length;)r.removeAttributeNode(g[0]);vt(r,d,l),r[mt]=s,r[Dt]=l}catch(p){De(s,s.return,p)}}var Qn=!1,rt=!1,Xd=!1,fy=typeof WeakSet=="function"?WeakSet:Set,gt=null;function Z1(s,r){if(s=s.containerInfo,gh=Vl,s=Ep(s),Bu(s)){if("selectionStart"in s)var l={start:s.selectionStart,end:s.selectionEnd};else e:{l=(l=s.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var g=d.anchorOffset,p=d.focusNode;d=d.focusOffset;try{l.nodeType,p.nodeType}catch{l=null;break e}var w=0,A=-1,k=-1,$=0,F=0,K=s,z=null;t:for(;;){for(var U;K!==l||g!==0&&K.nodeType!==3||(A=w+g),K!==p||d!==0&&K.nodeType!==3||(k=w+d),K.nodeType===3&&(w+=K.nodeValue.length),(U=K.firstChild)!==null;)z=K,K=U;for(;;){if(K===s)break t;if(z===l&&++$===g&&(A=w),z===p&&++F===d&&(k=w),(U=K.nextSibling)!==null)break;K=z,z=K.parentNode}K=U}l=A===-1||k===-1?null:{start:A,end:k}}else l=null}l=l||{start:0,end:0}}else l=null;for(ph={focusedElem:s,selectionRange:l},Vl=!1,gt=r;gt!==null;)if(r=gt,s=r.child,(r.subtreeFlags&1028)!==0&&s!==null)s.return=r,gt=s;else for(;gt!==null;){switch(r=gt,p=r.alternate,s=r.flags,r.tag){case 0:if((s&4)!==0&&(s=r.updateQueue,s=s!==null?s.events:null,s!==null))for(l=0;l<s.length;l++)g=s[l],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&p!==null){s=void 0,l=r,g=p.memoizedProps,p=p.memoizedState,d=l.stateNode;try{var ie=ms(l.type,g);s=d.getSnapshotBeforeUpdate(ie,p),d.__reactInternalSnapshotBeforeUpdate=s}catch(ce){De(l,l.return,ce)}}break;case 3:if((s&1024)!==0){if(s=r.stateNode.containerInfo,l=s.nodeType,l===9)_h(s);else if(l===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":_h(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(n(163))}if(s=r.sibling,s!==null){s.return=r.return,gt=s;break}gt=r.return}}function gy(s,r,l){var d=l.flags;switch(l.tag){case 0:case 11:case 15:ti(s,l),d&4&&Mo(5,l);break;case 1:if(ti(s,l),d&4)if(s=l.stateNode,r===null)try{s.componentDidMount()}catch(w){De(l,l.return,w)}else{var g=ms(l.type,r.memoizedProps);r=r.memoizedState;try{s.componentDidUpdate(g,r,s.__reactInternalSnapshotBeforeUpdate)}catch(w){De(l,l.return,w)}}d&64&&ly(l),d&512&&Do(l,l.return);break;case 3:if(ti(s,l),d&64&&(s=l.updateQueue,s!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Zp(s,r)}catch(w){De(l,l.return,w)}}break;case 27:r===null&&d&4&&hy(l);case 26:case 5:ti(s,l),r===null&&d&4&&uy(l),d&512&&Do(l,l.return);break;case 12:ti(s,l);break;case 31:ti(s,l),d&4&&yy(s,l);break;case 13:ti(s,l),d&4&&_y(s,l),d&64&&(s=l.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(l=ax.bind(null,l),Cx(s,l))));break;case 22:if(d=l.memoizedState!==null||Qn,!d){r=r!==null&&r.memoizedState!==null||rt,g=Qn;var p=rt;Qn=d,(rt=r)&&!p?ni(s,l,(l.subtreeFlags&8772)!==0):ti(s,l),Qn=g,rt=p}break;case 30:break;default:ti(s,l)}}function py(s){var r=s.alternate;r!==null&&(s.alternate=null,py(r)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(r=s.stateNode,r!==null&&xu(r)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var qe=null,Ot=!1;function ei(s,r,l){for(l=l.child;l!==null;)my(s,r,l),l=l.sibling}function my(s,r,l){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Pn,l)}catch{}switch(l.tag){case 26:rt||On(l,r),ei(s,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:rt||On(l,r);var d=qe,g=Ot;ji(l.type)&&(qe=l.stateNode,Ot=!1),ei(s,r,l),Bo(l.stateNode),qe=d,Ot=g;break;case 5:rt||On(l,r);case 6:if(d=qe,g=Ot,qe=null,ei(s,r,l),qe=d,Ot=g,qe!==null)if(Ot)try{(qe.nodeType===9?qe.body:qe.nodeName==="HTML"?qe.ownerDocument.body:qe).removeChild(l.stateNode)}catch(p){De(l,r,p)}else try{qe.removeChild(l.stateNode)}catch(p){De(l,r,p)}break;case 18:qe!==null&&(Ot?(s=qe,l_(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,l.stateNode),vr(s)):l_(qe,l.stateNode));break;case 4:d=qe,g=Ot,qe=l.stateNode.containerInfo,Ot=!0,ei(s,r,l),qe=d,Ot=g;break;case 0:case 11:case 14:case 15:ki(2,l,r),rt||ki(4,l,r),ei(s,r,l);break;case 1:rt||(On(l,r),d=l.stateNode,typeof d.componentWillUnmount=="function"&&cy(l,r,d)),ei(s,r,l);break;case 21:ei(s,r,l);break;case 22:rt=(d=rt)||l.memoizedState!==null,ei(s,r,l),rt=d;break;default:ei(s,r,l)}}function yy(s,r){if(r.memoizedState===null&&(s=r.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{vr(s)}catch(l){De(r,r.return,l)}}}function _y(s,r){if(r.memoizedState===null&&(s=r.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{vr(s)}catch(l){De(r,r.return,l)}}function Q1(s){switch(s.tag){case 31:case 13:case 19:var r=s.stateNode;return r===null&&(r=s.stateNode=new fy),r;case 22:return s=s.stateNode,r=s._retryCache,r===null&&(r=s._retryCache=new fy),r;default:throw Error(n(435,s.tag))}}function Tl(s,r){var l=Q1(s);r.forEach(function(d){if(!l.has(d)){l.add(d);var g=lx.bind(null,s,d);d.then(g,g)}})}function Rt(s,r){var l=r.deletions;if(l!==null)for(var d=0;d<l.length;d++){var g=l[d],p=s,w=r,A=w;e:for(;A!==null;){switch(A.tag){case 27:if(ji(A.type)){qe=A.stateNode,Ot=!1;break e}break;case 5:qe=A.stateNode,Ot=!1;break e;case 3:case 4:qe=A.stateNode.containerInfo,Ot=!0;break e}A=A.return}if(qe===null)throw Error(n(160));my(p,w,g),qe=null,Ot=!1,p=g.alternate,p!==null&&(p.return=null),g.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)by(r,s),r=r.sibling}var wn=null;function by(s,r){var l=s.alternate,d=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Rt(r,s),jt(s),d&4&&(ki(3,s,s.return),Mo(3,s),ki(5,s,s.return));break;case 1:Rt(r,s),jt(s),d&512&&(rt||l===null||On(l,l.return)),d&64&&Qn&&(s=s.updateQueue,s!==null&&(d=s.callbacks,d!==null&&(l=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=l===null?d:l.concat(d))));break;case 26:var g=wn;if(Rt(r,s),jt(s),d&512&&(rt||l===null||On(l,l.return)),d&4){var p=l!==null?l.memoizedState:null;if(d=s.memoizedState,l===null)if(d===null)if(s.stateNode===null){e:{d=s.type,l=s.memoizedProps,g=g.ownerDocument||g;t:switch(d){case"title":p=g.getElementsByTagName("title")[0],(!p||p[io]||p[mt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=g.createElement(d),g.head.insertBefore(p,g.querySelector("head > title"))),vt(p,d,l),p[mt]=s,ft(p),d=p;break e;case"link":var w=b_("link","href",g).get(d+(l.href||""));if(w){for(var A=0;A<w.length;A++)if(p=w[A],p.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&p.getAttribute("rel")===(l.rel==null?null:l.rel)&&p.getAttribute("title")===(l.title==null?null:l.title)&&p.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){w.splice(A,1);break t}}p=g.createElement(d),vt(p,d,l),g.head.appendChild(p);break;case"meta":if(w=b_("meta","content",g).get(d+(l.content||""))){for(A=0;A<w.length;A++)if(p=w[A],p.getAttribute("content")===(l.content==null?null:""+l.content)&&p.getAttribute("name")===(l.name==null?null:l.name)&&p.getAttribute("property")===(l.property==null?null:l.property)&&p.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&p.getAttribute("charset")===(l.charSet==null?null:l.charSet)){w.splice(A,1);break t}}p=g.createElement(d),vt(p,d,l),g.head.appendChild(p);break;default:throw Error(n(468,d))}p[mt]=s,ft(p),d=p}s.stateNode=d}else v_(g,s.type,s.stateNode);else s.stateNode=__(g,d,s.memoizedProps);else p!==d?(p===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):p.count--,d===null?v_(g,s.type,s.stateNode):__(g,d,s.memoizedProps)):d===null&&s.stateNode!==null&&Vd(s,s.memoizedProps,l.memoizedProps)}break;case 27:Rt(r,s),jt(s),d&512&&(rt||l===null||On(l,l.return)),l!==null&&d&4&&Vd(s,s.memoizedProps,l.memoizedProps);break;case 5:if(Rt(r,s),jt(s),d&512&&(rt||l===null||On(l,l.return)),s.flags&32){g=s.stateNode;try{Us(g,"")}catch(ie){De(s,s.return,ie)}}d&4&&s.stateNode!=null&&(g=s.memoizedProps,Vd(s,g,l!==null?l.memoizedProps:g)),d&1024&&(Xd=!0);break;case 6:if(Rt(r,s),jt(s),d&4){if(s.stateNode===null)throw Error(n(162));d=s.memoizedProps,l=s.stateNode;try{l.nodeValue=d}catch(ie){De(s,s.return,ie)}}break;case 3:if(Bl=null,g=wn,wn=zl(r.containerInfo),Rt(r,s),wn=g,jt(s),d&4&&l!==null&&l.memoizedState.isDehydrated)try{vr(r.containerInfo)}catch(ie){De(s,s.return,ie)}Xd&&(Xd=!1,vy(s));break;case 4:d=wn,wn=zl(s.stateNode.containerInfo),Rt(r,s),jt(s),wn=d;break;case 12:Rt(r,s),jt(s);break;case 31:Rt(r,s),jt(s),d&4&&(d=s.updateQueue,d!==null&&(s.updateQueue=null,Tl(s,d)));break;case 13:Rt(r,s),jt(s),s.child.flags&8192&&s.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Al=Et()),d&4&&(d=s.updateQueue,d!==null&&(s.updateQueue=null,Tl(s,d)));break;case 22:g=s.memoizedState!==null;var k=l!==null&&l.memoizedState!==null,$=Qn,F=rt;if(Qn=$||g,rt=F||k,Rt(r,s),rt=F,Qn=$,jt(s),d&8192)e:for(r=s.stateNode,r._visibility=g?r._visibility&-2:r._visibility|1,g&&(l===null||k||Qn||rt||ys(s)),l=null,r=s;;){if(r.tag===5||r.tag===26){if(l===null){k=l=r;try{if(p=k.stateNode,g)w=p.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{A=k.stateNode;var K=k.memoizedProps.style,z=K!=null&&K.hasOwnProperty("display")?K.display:null;A.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ie){De(k,k.return,ie)}}}else if(r.tag===6){if(l===null){k=r;try{k.stateNode.nodeValue=g?"":k.memoizedProps}catch(ie){De(k,k.return,ie)}}}else if(r.tag===18){if(l===null){k=r;try{var U=k.stateNode;g?c_(U,!0):c_(k.stateNode,!1)}catch(ie){De(k,k.return,ie)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===s)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}d&4&&(d=s.updateQueue,d!==null&&(l=d.retryQueue,l!==null&&(d.retryQueue=null,Tl(s,l))));break;case 19:Rt(r,s),jt(s),d&4&&(d=s.updateQueue,d!==null&&(s.updateQueue=null,Tl(s,d)));break;case 30:break;case 21:break;default:Rt(r,s),jt(s)}}function jt(s){var r=s.flags;if(r&2){try{for(var l,d=s.return;d!==null;){if(dy(d)){l=d;break}d=d.return}if(l==null)throw Error(n(160));switch(l.tag){case 27:var g=l.stateNode,p=Fd(s);xl(s,p,g);break;case 5:var w=l.stateNode;l.flags&32&&(Us(w,""),l.flags&=-33);var A=Fd(s);xl(s,A,w);break;case 3:case 4:var k=l.stateNode.containerInfo,$=Fd(s);Gd(s,$,k);break;default:throw Error(n(161))}}catch(F){De(s,s.return,F)}s.flags&=-3}r&4096&&(s.flags&=-4097)}function vy(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var r=s;vy(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),s=s.sibling}}function ti(s,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)gy(s,r.alternate,r),r=r.sibling}function ys(s){for(s=s.child;s!==null;){var r=s;switch(r.tag){case 0:case 11:case 14:case 15:ki(4,r,r.return),ys(r);break;case 1:On(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&cy(r,r.return,l),ys(r);break;case 27:Bo(r.stateNode);case 26:case 5:On(r,r.return),ys(r);break;case 22:r.memoizedState===null&&ys(r);break;case 30:ys(r);break;default:ys(r)}s=s.sibling}}function ni(s,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var d=r.alternate,g=s,p=r,w=p.flags;switch(p.tag){case 0:case 11:case 15:ni(g,p,l),Mo(4,p);break;case 1:if(ni(g,p,l),d=p,g=d.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch($){De(d,d.return,$)}if(d=p,g=d.updateQueue,g!==null){var A=d.stateNode;try{var k=g.shared.hiddenCallbacks;if(k!==null)for(g.shared.hiddenCallbacks=null,g=0;g<k.length;g++)Jp(k[g],A)}catch($){De(d,d.return,$)}}l&&w&64&&ly(p),Do(p,p.return);break;case 27:hy(p);case 26:case 5:ni(g,p,l),l&&d===null&&w&4&&uy(p),Do(p,p.return);break;case 12:ni(g,p,l);break;case 31:ni(g,p,l),l&&w&4&&yy(g,p);break;case 13:ni(g,p,l),l&&w&4&&_y(g,p);break;case 22:p.memoizedState===null&&ni(g,p,l),Do(p,p.return);break;case 30:break;default:ni(g,p,l)}r=r.sibling}}function Yd(s,r){var l=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),s=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),s!==l&&(s!=null&&s.refCount++,l!=null&&yo(l))}function Kd(s,r){s=null,r.alternate!==null&&(s=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==s&&(r.refCount++,s!=null&&yo(s))}function xn(s,r,l,d){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Sy(s,r,l,d),r=r.sibling}function Sy(s,r,l,d){var g=r.flags;switch(r.tag){case 0:case 11:case 15:xn(s,r,l,d),g&2048&&Mo(9,r);break;case 1:xn(s,r,l,d);break;case 3:xn(s,r,l,d),g&2048&&(s=null,r.alternate!==null&&(s=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==s&&(r.refCount++,s!=null&&yo(s)));break;case 12:if(g&2048){xn(s,r,l,d),s=r.stateNode;try{var p=r.memoizedProps,w=p.id,A=p.onPostCommit;typeof A=="function"&&A(w,r.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(k){De(r,r.return,k)}}else xn(s,r,l,d);break;case 31:xn(s,r,l,d);break;case 13:xn(s,r,l,d);break;case 23:break;case 22:p=r.stateNode,w=r.alternate,r.memoizedState!==null?p._visibility&2?xn(s,r,l,d):Lo(s,r):p._visibility&2?xn(s,r,l,d):(p._visibility|=2,cr(s,r,l,d,(r.subtreeFlags&10256)!==0||!1)),g&2048&&Yd(w,r);break;case 24:xn(s,r,l,d),g&2048&&Kd(r.alternate,r);break;default:xn(s,r,l,d)}}function cr(s,r,l,d,g){for(g=g&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var p=s,w=r,A=l,k=d,$=w.flags;switch(w.tag){case 0:case 11:case 15:cr(p,w,A,k,g),Mo(8,w);break;case 23:break;case 22:var F=w.stateNode;w.memoizedState!==null?F._visibility&2?cr(p,w,A,k,g):Lo(p,w):(F._visibility|=2,cr(p,w,A,k,g)),g&&$&2048&&Yd(w.alternate,w);break;case 24:cr(p,w,A,k,g),g&&$&2048&&Kd(w.alternate,w);break;default:cr(p,w,A,k,g)}r=r.sibling}}function Lo(s,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=s,d=r,g=d.flags;switch(d.tag){case 22:Lo(l,d),g&2048&&Yd(d.alternate,d);break;case 24:Lo(l,d),g&2048&&Kd(d.alternate,d);break;default:Lo(l,d)}r=r.sibling}}var Oo=8192;function ur(s,r,l){if(s.subtreeFlags&Oo)for(s=s.child;s!==null;)wy(s,r,l),s=s.sibling}function wy(s,r,l){switch(s.tag){case 26:ur(s,r,l),s.flags&Oo&&s.memoizedState!==null&&Ix(l,wn,s.memoizedState,s.memoizedProps);break;case 5:ur(s,r,l);break;case 3:case 4:var d=wn;wn=zl(s.stateNode.containerInfo),ur(s,r,l),wn=d;break;case 22:s.memoizedState===null&&(d=s.alternate,d!==null&&d.memoizedState!==null?(d=Oo,Oo=16777216,ur(s,r,l),Oo=d):ur(s,r,l));break;default:ur(s,r,l)}}function xy(s){var r=s.alternate;if(r!==null&&(s=r.child,s!==null)){r.child=null;do r=s.sibling,s.sibling=null,s=r;while(s!==null)}}function Ro(s){var r=s.deletions;if((s.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var d=r[l];gt=d,Ey(d,s)}xy(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Ty(s),s=s.sibling}function Ty(s){switch(s.tag){case 0:case 11:case 15:Ro(s),s.flags&2048&&ki(9,s,s.return);break;case 3:Ro(s);break;case 12:Ro(s);break;case 22:var r=s.stateNode;s.memoizedState!==null&&r._visibility&2&&(s.return===null||s.return.tag!==13)?(r._visibility&=-3,El(s)):Ro(s);break;default:Ro(s)}}function El(s){var r=s.deletions;if((s.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var d=r[l];gt=d,Ey(d,s)}xy(s)}for(s=s.child;s!==null;){switch(r=s,r.tag){case 0:case 11:case 15:ki(8,r,r.return),El(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,El(r));break;default:El(r)}s=s.sibling}}function Ey(s,r){for(;gt!==null;){var l=gt;switch(l.tag){case 0:case 11:case 15:ki(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var d=l.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:yo(l.memoizedState.cache)}if(d=l.child,d!==null)d.return=l,gt=d;else e:for(l=s;gt!==null;){d=gt;var g=d.sibling,p=d.return;if(py(d),d===l){gt=null;break e}if(g!==null){g.return=p,gt=g;break e}gt=p}}}var ex={getCacheForType:function(s){var r=_t(nt),l=r.data.get(s);return l===void 0&&(l=s(),r.data.set(s,l)),l},cacheSignal:function(){return _t(nt).controller.signal}},tx=typeof WeakMap=="function"?WeakMap:Map,ke=0,je=null,ye=null,ve=0,Me=0,Kt=null,Ni=!1,dr=!1,Wd=!1,ii=0,Ke=0,Mi=0,_s=0,Jd=0,Wt=0,hr=0,jo=null,Ht=null,Zd=!1,Al=0,Ay=0,Cl=1/0,kl=null,Di=null,ct=0,Li=null,fr=null,si=0,Qd=0,eh=null,Cy=null,Ho=0,th=null;function Jt(){return(ke&2)!==0&&ve!==0?ve&-ve:P.T!==null?ah():Ug()}function ky(){if(Wt===0)if((ve&536870912)===0||we){var s=Qt;Qt<<=1,(Qt&3932160)===0&&(Qt=262144),Wt=s}else Wt=536870912;return s=Xt.current,s!==null&&(s.flags|=32),Wt}function $t(s,r,l){(s===je&&(Me===2||Me===9)||s.cancelPendingCommit!==null)&&(gr(s,0),Oi(s,ve,Wt,!1)),no(s,l),((ke&2)===0||s!==je)&&(s===je&&((ke&2)===0&&(_s|=l),Ke===4&&Oi(s,ve,Wt,!1)),Rn(s))}function Ny(s,r,l){if((ke&6)!==0)throw Error(n(327));var d=!l&&(r&127)===0&&(r&s.expiredLanes)===0||to(s,r),g=d?sx(s,r):ih(s,r,!0),p=d;do{if(g===0){dr&&!d&&Oi(s,r,0,!1);break}else{if(l=s.current.alternate,p&&!nx(l)){g=ih(s,r,!1),p=!1;continue}if(g===2){if(p=r,s.errorRecoveryDisabledLanes&p)var w=0;else w=s.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){r=w;e:{var A=s;g=jo;var k=A.current.memoizedState.isDehydrated;if(k&&(gr(A,w).flags|=256),w=ih(A,w,!1),w!==2){if(Wd&&!k){A.errorRecoveryDisabledLanes|=p,_s|=p,g=4;break e}p=Ht,Ht=g,p!==null&&(Ht===null?Ht=p:Ht.push.apply(Ht,p))}g=w}if(p=!1,g!==2)continue}}if(g===1){gr(s,0),Oi(s,r,0,!0);break}e:{switch(d=s,p=g,p){case 0:case 1:throw Error(n(345));case 4:if((r&4194048)!==r)break;case 6:Oi(d,r,Wt,!Ni);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(n(329))}if((r&62914560)===r&&(g=Al+300-Et(),10<g)){if(Oi(d,r,Wt,!Ni),za(d,0,!0)!==0)break e;si=r,d.timeoutHandle=o_(My.bind(null,d,l,Ht,kl,Zd,r,Wt,_s,hr,Ni,p,"Throttled",-0,0),g);break e}My(d,l,Ht,kl,Zd,r,Wt,_s,hr,Ni,p,null,-0,0)}}break}while(!0);Rn(s)}function My(s,r,l,d,g,p,w,A,k,$,F,K,z,U){if(s.timeoutHandle=-1,K=r.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Un},wy(r,p,K);var ie=(p&62914560)===p?Al-Et():(p&4194048)===p?Ay-Et():0;if(ie=Bx(K,ie),ie!==null){si=p,s.cancelPendingCommit=ie(zy.bind(null,s,r,p,l,d,g,w,A,k,F,K,null,z,U)),Oi(s,p,w,!$);return}}zy(s,r,p,l,d,g,w,A,k)}function nx(s){for(var r=s;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var d=0;d<l.length;d++){var g=l[d],p=g.getSnapshot;g=g.value;try{if(!Ft(p(),g))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===s)break;for(;r.sibling===null;){if(r.return===null||r.return===s)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Oi(s,r,l,d){r&=~Jd,r&=~_s,s.suspendedLanes|=r,s.pingedLanes&=~r,d&&(s.warmLanes|=r),d=s.expirationTimes;for(var g=r;0<g;){var p=31-At(g),w=1<<p;d[p]=-1,g&=~w}l!==0&&Bg(s,l,r)}function Nl(){return(ke&6)===0?($o(0),!1):!0}function nh(){if(ye!==null){if(Me===0)var s=ye.return;else s=ye,Xn=cs=null,_d(s),sr=null,bo=0,s=ye;for(;s!==null;)ay(s.alternate,s),s=s.return;ye=null}}function gr(s,r){var l=s.timeoutHandle;l!==-1&&(s.timeoutHandle=-1,wx(l)),l=s.cancelPendingCommit,l!==null&&(s.cancelPendingCommit=null,l()),si=0,nh(),je=s,ye=l=Fn(s.current,null),ve=r,Me=0,Kt=null,Ni=!1,dr=to(s,r),Wd=!1,hr=Wt=Jd=_s=Mi=Ke=0,Ht=jo=null,Zd=!1,(r&8)!==0&&(r|=r&32);var d=s.entangledLanes;if(d!==0)for(s=s.entanglements,d&=r;0<d;){var g=31-At(d),p=1<<g;r|=s[g],d&=~p}return ii=r,Wa(),l}function Dy(s,r){pe=null,P.H=Co,r===ir||r===sl?(r=Xp(),Me=3):r===od?(r=Xp(),Me=4):Me=r===Rd?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Kt=r,ye===null&&(Ke=1,_l(s,sn(r,s.current)))}function Ly(){var s=Xt.current;return s===null?!0:(ve&4194048)===ve?ln===null:(ve&62914560)===ve||(ve&536870912)!==0?s===ln:!1}function Oy(){var s=P.H;return P.H=Co,s===null?Co:s}function Ry(){var s=P.A;return P.A=ex,s}function Ml(){Ke=4,Ni||(ve&4194048)!==ve&&Xt.current!==null||(dr=!0),(Mi&134217727)===0&&(_s&134217727)===0||je===null||Oi(je,ve,Wt,!1)}function ih(s,r,l){var d=ke;ke|=2;var g=Oy(),p=Ry();(je!==s||ve!==r)&&(kl=null,gr(s,r)),r=!1;var w=Ke;e:do try{if(Me!==0&&ye!==null){var A=ye,k=Kt;switch(Me){case 8:nh(),w=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(r=!0);var $=Me;if(Me=0,Kt=null,pr(s,A,k,$),l&&dr){w=0;break e}break;default:$=Me,Me=0,Kt=null,pr(s,A,k,$)}}ix(),w=Ke;break}catch(F){Dy(s,F)}while(!0);return r&&s.shellSuspendCounter++,Xn=cs=null,ke=d,P.H=g,P.A=p,ye===null&&(je=null,ve=0,Wa()),w}function ix(){for(;ye!==null;)jy(ye)}function sx(s,r){var l=ke;ke|=2;var d=Oy(),g=Ry();je!==s||ve!==r?(kl=null,Cl=Et()+500,gr(s,r)):dr=to(s,r);e:do try{if(Me!==0&&ye!==null){r=ye;var p=Kt;t:switch(Me){case 1:Me=0,Kt=null,pr(s,r,p,1);break;case 2:case 9:if(Fp(p)){Me=0,Kt=null,Hy(r);break}r=function(){Me!==2&&Me!==9||je!==s||(Me=7),Rn(s)},p.then(r,r);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:Fp(p)?(Me=0,Kt=null,Hy(r)):(Me=0,Kt=null,pr(s,r,p,7));break;case 5:var w=null;switch(ye.tag){case 26:w=ye.memoizedState;case 5:case 27:var A=ye;if(w?S_(w):A.stateNode.complete){Me=0,Kt=null;var k=A.sibling;if(k!==null)ye=k;else{var $=A.return;$!==null?(ye=$,Dl($)):ye=null}break t}}Me=0,Kt=null,pr(s,r,p,5);break;case 6:Me=0,Kt=null,pr(s,r,p,6);break;case 8:nh(),Ke=6;break e;default:throw Error(n(462))}}rx();break}catch(F){Dy(s,F)}while(!0);return Xn=cs=null,P.H=d,P.A=g,ke=l,ye!==null?0:(je=null,ve=0,Wa(),Ke)}function rx(){for(;ye!==null&&!pi();)jy(ye)}function jy(s){var r=ry(s.alternate,s,ii);s.memoizedProps=s.pendingProps,r===null?Dl(s):ye=r}function Hy(s){var r=s,l=r.alternate;switch(r.tag){case 15:case 0:r=Qm(l,r,r.pendingProps,r.type,void 0,ve);break;case 11:r=Qm(l,r,r.pendingProps,r.type.render,r.ref,ve);break;case 5:_d(r);default:ay(l,r),r=ye=Rp(r,ii),r=ry(l,r,ii)}s.memoizedProps=s.pendingProps,r===null?Dl(s):ye=r}function pr(s,r,l,d){Xn=cs=null,_d(r),sr=null,bo=0;var g=r.return;try{if(X1(s,g,r,l,ve)){Ke=1,_l(s,sn(l,s.current)),ye=null;return}}catch(p){if(g!==null)throw ye=g,p;Ke=1,_l(s,sn(l,s.current)),ye=null;return}r.flags&32768?(we||d===1?s=!0:dr||(ve&536870912)!==0?s=!1:(Ni=s=!0,(d===2||d===9||d===3||d===6)&&(d=Xt.current,d!==null&&d.tag===13&&(d.flags|=16384))),$y(r,s)):Dl(r)}function Dl(s){var r=s;do{if((r.flags&32768)!==0){$y(r,Ni);return}s=r.return;var l=W1(r.alternate,r,ii);if(l!==null){ye=l;return}if(r=r.sibling,r!==null){ye=r;return}ye=r=s}while(r!==null);Ke===0&&(Ke=5)}function $y(s,r){do{var l=J1(s.alternate,s);if(l!==null){l.flags&=32767,ye=l;return}if(l=s.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(s=s.sibling,s!==null)){ye=s;return}ye=s=l}while(s!==null);Ke=6,ye=null}function zy(s,r,l,d,g,p,w,A,k){s.cancelPendingCommit=null;do Ll();while(ct!==0);if((ke&6)!==0)throw Error(n(327));if(r!==null){if(r===s.current)throw Error(n(177));if(p=r.lanes|r.childLanes,p|=Fu,zw(s,l,p,w,A,k),s===je&&(ye=je=null,ve=0),fr=r,Li=s,si=l,Qd=p,eh=g,Cy=d,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,cx(mi,function(){return Uy(),null})):(s.callbackNode=null,s.callbackPriority=0),d=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||d){d=P.T,P.T=null,g=Z.p,Z.p=2,w=ke,ke|=4;try{Z1(s,r,l)}finally{ke=w,Z.p=g,P.T=d}}ct=1,Iy(),By(),Py()}}function Iy(){if(ct===1){ct=0;var s=Li,r=fr,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=P.T,P.T=null;var d=Z.p;Z.p=2;var g=ke;ke|=4;try{by(r,s);var p=ph,w=Ep(s.containerInfo),A=p.focusedElem,k=p.selectionRange;if(w!==A&&A&&A.ownerDocument&&Tp(A.ownerDocument.documentElement,A)){if(k!==null&&Bu(A)){var $=k.start,F=k.end;if(F===void 0&&(F=$),"selectionStart"in A)A.selectionStart=$,A.selectionEnd=Math.min(F,A.value.length);else{var K=A.ownerDocument||document,z=K&&K.defaultView||window;if(z.getSelection){var U=z.getSelection(),ie=A.textContent.length,ce=Math.min(k.start,ie),Re=k.end===void 0?ce:Math.min(k.end,ie);!U.extend&&ce>Re&&(w=Re,Re=ce,ce=w);var j=xp(A,ce),D=xp(A,Re);if(j&&D&&(U.rangeCount!==1||U.anchorNode!==j.node||U.anchorOffset!==j.offset||U.focusNode!==D.node||U.focusOffset!==D.offset)){var H=K.createRange();H.setStart(j.node,j.offset),U.removeAllRanges(),ce>Re?(U.addRange(H),U.extend(D.node,D.offset)):(H.setEnd(D.node,D.offset),U.addRange(H))}}}}for(K=[],U=A;U=U.parentNode;)U.nodeType===1&&K.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<K.length;A++){var X=K[A];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}Vl=!!gh,ph=gh=null}finally{ke=g,Z.p=d,P.T=l}}s.current=r,ct=2}}function By(){if(ct===2){ct=0;var s=Li,r=fr,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=P.T,P.T=null;var d=Z.p;Z.p=2;var g=ke;ke|=4;try{gy(s,r.alternate,r)}finally{ke=g,Z.p=d,P.T=l}}ct=3}}function Py(){if(ct===4||ct===3){ct=0,gu();var s=Li,r=fr,l=si,d=Cy;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?ct=5:(ct=0,fr=Li=null,qy(s,s.pendingLanes));var g=s.pendingLanes;if(g===0&&(Di=null),Su(l),r=r.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Pn,r,void 0,(r.current.flags&128)===128)}catch{}if(d!==null){r=P.T,g=Z.p,Z.p=2,P.T=null;try{for(var p=s.onRecoverableError,w=0;w<d.length;w++){var A=d[w];p(A.value,{componentStack:A.stack})}}finally{P.T=r,Z.p=g}}(si&3)!==0&&Ll(),Rn(s),g=s.pendingLanes,(l&261930)!==0&&(g&42)!==0?s===th?Ho++:(Ho=0,th=s):Ho=0,$o(0)}}function qy(s,r){(s.pooledCacheLanes&=r)===0&&(r=s.pooledCache,r!=null&&(s.pooledCache=null,yo(r)))}function Ll(){return Iy(),By(),Py(),Uy()}function Uy(){if(ct!==5)return!1;var s=Li,r=Qd;Qd=0;var l=Su(si),d=P.T,g=Z.p;try{Z.p=32>l?32:l,P.T=null,l=eh,eh=null;var p=Li,w=si;if(ct=0,fr=Li=null,si=0,(ke&6)!==0)throw Error(n(331));var A=ke;if(ke|=4,Ty(p.current),Sy(p,p.current,w,l),ke=A,$o(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Pn,p)}catch{}return!0}finally{Z.p=g,P.T=d,qy(s,r)}}function Vy(s,r,l){r=sn(l,r),r=Od(s.stateNode,r,2),s=Ei(s,r,2),s!==null&&(no(s,2),Rn(s))}function De(s,r,l){if(s.tag===3)Vy(s,s,l);else for(;r!==null;){if(r.tag===3){Vy(r,s,l);break}else if(r.tag===1){var d=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Di===null||!Di.has(d))){s=sn(l,s),l=Fm(2),d=Ei(r,l,2),d!==null&&(Gm(l,d,r,s),no(d,2),Rn(d));break}}r=r.return}}function sh(s,r,l){var d=s.pingCache;if(d===null){d=s.pingCache=new tx;var g=new Set;d.set(r,g)}else g=d.get(r),g===void 0&&(g=new Set,d.set(r,g));g.has(l)||(Wd=!0,g.add(l),s=ox.bind(null,s,r,l),r.then(s,s))}function ox(s,r,l){var d=s.pingCache;d!==null&&d.delete(r),s.pingedLanes|=s.suspendedLanes&l,s.warmLanes&=~l,je===s&&(ve&l)===l&&(Ke===4||Ke===3&&(ve&62914560)===ve&&300>Et()-Al?(ke&2)===0&&gr(s,0):Jd|=l,hr===ve&&(hr=0)),Rn(s)}function Fy(s,r){r===0&&(r=Ig()),s=os(s,r),s!==null&&(no(s,r),Rn(s))}function ax(s){var r=s.memoizedState,l=0;r!==null&&(l=r.retryLane),Fy(s,l)}function lx(s,r){var l=0;switch(s.tag){case 31:case 13:var d=s.stateNode,g=s.memoizedState;g!==null&&(l=g.retryLane);break;case 19:d=s.stateNode;break;case 22:d=s.stateNode._retryCache;break;default:throw Error(n(314))}d!==null&&d.delete(r),Fy(s,l)}function cx(s,r){return gi(s,r)}var Ol=null,mr=null,rh=!1,Rl=!1,oh=!1,Ri=0;function Rn(s){s!==mr&&s.next===null&&(mr===null?Ol=mr=s:mr=mr.next=s),Rl=!0,rh||(rh=!0,dx())}function $o(s,r){if(!oh&&Rl){oh=!0;do for(var l=!1,d=Ol;d!==null;){if(s!==0){var g=d.pendingLanes;if(g===0)var p=0;else{var w=d.suspendedLanes,A=d.pingedLanes;p=(1<<31-At(42|s)+1)-1,p&=g&~(w&~A),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(l=!0,Ky(d,p))}else p=ve,p=za(d,d===je?p:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(p&3)===0||to(d,p)||(l=!0,Ky(d,p));d=d.next}while(l);oh=!1}}function ux(){Gy()}function Gy(){Rl=rh=!1;var s=0;Ri!==0&&Sx()&&(s=Ri);for(var r=Et(),l=null,d=Ol;d!==null;){var g=d.next,p=Xy(d,r);p===0?(d.next=null,l===null?Ol=g:l.next=g,g===null&&(mr=l)):(l=d,(s!==0||(p&3)!==0)&&(Rl=!0)),d=g}ct!==0&&ct!==5||$o(s),Ri!==0&&(Ri=0)}function Xy(s,r){for(var l=s.suspendedLanes,d=s.pingedLanes,g=s.expirationTimes,p=s.pendingLanes&-62914561;0<p;){var w=31-At(p),A=1<<w,k=g[w];k===-1?((A&l)===0||(A&d)!==0)&&(g[w]=$w(A,r)):k<=r&&(s.expiredLanes|=A),p&=~A}if(r=je,l=ve,l=za(s,s===r?l:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),d=s.callbackNode,l===0||s===r&&(Me===2||Me===9)||s.cancelPendingCommit!==null)return d!==null&&d!==null&&Qr(d),s.callbackNode=null,s.callbackPriority=0;if((l&3)===0||to(s,l)){if(r=l&-l,r===s.callbackPriority)return r;switch(d!==null&&Qr(d),Su(l)){case 2:case 8:l=eo;break;case 32:l=mi;break;case 268435456:l=ja;break;default:l=mi}return d=Yy.bind(null,s),l=gi(l,d),s.callbackPriority=r,s.callbackNode=l,r}return d!==null&&d!==null&&Qr(d),s.callbackPriority=2,s.callbackNode=null,2}function Yy(s,r){if(ct!==0&&ct!==5)return s.callbackNode=null,s.callbackPriority=0,null;var l=s.callbackNode;if(Ll()&&s.callbackNode!==l)return null;var d=ve;return d=za(s,s===je?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),d===0?null:(Ny(s,d,r),Xy(s,Et()),s.callbackNode!=null&&s.callbackNode===l?Yy.bind(null,s):null)}function Ky(s,r){if(Ll())return null;Ny(s,r,!0)}function dx(){xx(function(){(ke&6)!==0?gi(Ra,ux):Gy()})}function ah(){if(Ri===0){var s=tr;s===0&&(s=Mn,Mn<<=1,(Mn&261888)===0&&(Mn=256)),Ri=s}return Ri}function Wy(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:qa(""+s)}function Jy(s,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,s.id&&l.setAttribute("form",s.id),r.parentNode.insertBefore(l,r),s=new FormData(s),l.parentNode.removeChild(l),s}function hx(s,r,l,d,g){if(r==="submit"&&l&&l.stateNode===g){var p=Wy((g[Dt]||null).action),w=d.submitter;w&&(r=(r=w[Dt]||null)?Wy(r.formAction):w.getAttribute("formAction"),r!==null&&(p=r,w=null));var A=new Ga("action","action",null,d,g);s.push({event:A,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Ri!==0){var k=w?Jy(g,w):new FormData(g);Cd(l,{pending:!0,data:k,method:g.method,action:p},null,k)}}else typeof p=="function"&&(A.preventDefault(),k=w?Jy(g,w):new FormData(g),Cd(l,{pending:!0,data:k,method:g.method,action:p},p,k))},currentTarget:g}]})}}for(var lh=0;lh<Vu.length;lh++){var ch=Vu[lh],fx=ch.toLowerCase(),gx=ch[0].toUpperCase()+ch.slice(1);Sn(fx,"on"+gx)}Sn(kp,"onAnimationEnd"),Sn(Np,"onAnimationIteration"),Sn(Mp,"onAnimationStart"),Sn("dblclick","onDoubleClick"),Sn("focusin","onFocus"),Sn("focusout","onBlur"),Sn(M1,"onTransitionRun"),Sn(D1,"onTransitionStart"),Sn(L1,"onTransitionCancel"),Sn(Dp,"onTransitionEnd"),Ps("onMouseEnter",["mouseout","mouseover"]),Ps("onMouseLeave",["mouseout","mouseover"]),Ps("onPointerEnter",["pointerout","pointerover"]),Ps("onPointerLeave",["pointerout","pointerover"]),ns("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ns("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ns("onBeforeInput",["compositionend","keypress","textInput","paste"]),ns("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ns("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ns("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),px=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zo));function Zy(s,r){r=(r&4)!==0;for(var l=0;l<s.length;l++){var d=s[l],g=d.event;d=d.listeners;e:{var p=void 0;if(r)for(var w=d.length-1;0<=w;w--){var A=d[w],k=A.instance,$=A.currentTarget;if(A=A.listener,k!==p&&g.isPropagationStopped())break e;p=A,g.currentTarget=$;try{p(g)}catch(F){Ka(F)}g.currentTarget=null,p=k}else for(w=0;w<d.length;w++){if(A=d[w],k=A.instance,$=A.currentTarget,A=A.listener,k!==p&&g.isPropagationStopped())break e;p=A,g.currentTarget=$;try{p(g)}catch(F){Ka(F)}g.currentTarget=null,p=k}}}}function _e(s,r){var l=r[wu];l===void 0&&(l=r[wu]=new Set);var d=s+"__bubble";l.has(d)||(Qy(r,s,2,!1),l.add(d))}function uh(s,r,l){var d=0;r&&(d|=4),Qy(l,s,d,r)}var jl="_reactListening"+Math.random().toString(36).slice(2);function dh(s){if(!s[jl]){s[jl]=!0,Gg.forEach(function(l){l!=="selectionchange"&&(px.has(l)||uh(l,!1,s),uh(l,!0,s))});var r=s.nodeType===9?s:s.ownerDocument;r===null||r[jl]||(r[jl]=!0,uh("selectionchange",!1,r))}}function Qy(s,r,l,d){switch(k_(r)){case 2:var g=Ux;break;case 8:g=Vx;break;default:g=Ah}l=g.bind(null,r,l,s),g=void 0,!Du||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(g=!0),d?g!==void 0?s.addEventListener(r,l,{capture:!0,passive:g}):s.addEventListener(r,l,!0):g!==void 0?s.addEventListener(r,l,{passive:g}):s.addEventListener(r,l,!1)}function hh(s,r,l,d,g){var p=d;if((r&1)===0&&(r&2)===0&&d!==null)e:for(;;){if(d===null)return;var w=d.tag;if(w===3||w===4){var A=d.stateNode.containerInfo;if(A===g)break;if(w===4)for(w=d.return;w!==null;){var k=w.tag;if((k===3||k===4)&&w.stateNode.containerInfo===g)return;w=w.return}for(;A!==null;){if(w=zs(A),w===null)return;if(k=w.tag,k===5||k===6||k===26||k===27){d=p=w;continue e}A=A.parentNode}}d=d.return}sp(function(){var $=p,F=Nu(l),K=[];e:{var z=Lp.get(s);if(z!==void 0){var U=Ga,ie=s;switch(s){case"keypress":if(Va(l)===0)break e;case"keydown":case"keyup":U=l1;break;case"focusin":ie="focus",U=ju;break;case"focusout":ie="blur",U=ju;break;case"beforeblur":case"afterblur":U=ju;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=ap;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=Ww;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=d1;break;case kp:case Np:case Mp:U=Qw;break;case Dp:U=f1;break;case"scroll":case"scrollend":U=Yw;break;case"wheel":U=p1;break;case"copy":case"cut":case"paste":U=t1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=cp;break;case"toggle":case"beforetoggle":U=y1}var ce=(r&4)!==0,Re=!ce&&(s==="scroll"||s==="scrollend"),j=ce?z!==null?z+"Capture":null:z;ce=[];for(var D=$,H;D!==null;){var X=D;if(H=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||H===null||j===null||(X=ro(D,j),X!=null&&ce.push(Io(D,X,H))),Re)break;D=D.return}0<ce.length&&(z=new U(z,ie,null,l,F),K.push({event:z,listeners:ce}))}}if((r&7)===0){e:{if(z=s==="mouseover"||s==="pointerover",U=s==="mouseout"||s==="pointerout",z&&l!==ku&&(ie=l.relatedTarget||l.fromElement)&&(zs(ie)||ie[$s]))break e;if((U||z)&&(z=F.window===F?F:(z=F.ownerDocument)?z.defaultView||z.parentWindow:window,U?(ie=l.relatedTarget||l.toElement,U=$,ie=ie?zs(ie):null,ie!==null&&(Re=a(ie),ce=ie.tag,ie!==Re||ce!==5&&ce!==27&&ce!==6)&&(ie=null)):(U=null,ie=$),U!==ie)){if(ce=ap,X="onMouseLeave",j="onMouseEnter",D="mouse",(s==="pointerout"||s==="pointerover")&&(ce=cp,X="onPointerLeave",j="onPointerEnter",D="pointer"),Re=U==null?z:so(U),H=ie==null?z:so(ie),z=new ce(X,D+"leave",U,l,F),z.target=Re,z.relatedTarget=H,X=null,zs(F)===$&&(ce=new ce(j,D+"enter",ie,l,F),ce.target=H,ce.relatedTarget=Re,X=ce),Re=X,U&&ie)t:{for(ce=mx,j=U,D=ie,H=0,X=j;X;X=ce(X))H++;X=0;for(var le=D;le;le=ce(le))X++;for(;0<H-X;)j=ce(j),H--;for(;0<X-H;)D=ce(D),X--;for(;H--;){if(j===D||D!==null&&j===D.alternate){ce=j;break t}j=ce(j),D=ce(D)}ce=null}else ce=null;U!==null&&e_(K,z,U,ce,!1),ie!==null&&Re!==null&&e_(K,Re,ie,ce,!0)}}e:{if(z=$?so($):window,U=z.nodeName&&z.nodeName.toLowerCase(),U==="select"||U==="input"&&z.type==="file")var Ae=yp;else if(pp(z))if(_p)Ae=C1;else{Ae=E1;var re=T1}else U=z.nodeName,!U||U.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?$&&Cu($.elementType)&&(Ae=yp):Ae=A1;if(Ae&&(Ae=Ae(s,$))){mp(K,Ae,l,F);break e}re&&re(s,z,$),s==="focusout"&&$&&z.type==="number"&&$.memoizedProps.value!=null&&Au(z,"number",z.value)}switch(re=$?so($):window,s){case"focusin":(pp(re)||re.contentEditable==="true")&&(Xs=re,Pu=$,go=null);break;case"focusout":go=Pu=Xs=null;break;case"mousedown":qu=!0;break;case"contextmenu":case"mouseup":case"dragend":qu=!1,Ap(K,l,F);break;case"selectionchange":if(N1)break;case"keydown":case"keyup":Ap(K,l,F)}var me;if($u)e:{switch(s){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Gs?fp(s,l)&&(Se="onCompositionEnd"):s==="keydown"&&l.keyCode===229&&(Se="onCompositionStart");Se&&(up&&l.locale!=="ko"&&(Gs||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Gs&&(me=rp()):(_i=F,Lu="value"in _i?_i.value:_i.textContent,Gs=!0)),re=Hl($,Se),0<re.length&&(Se=new lp(Se,s,null,l,F),K.push({event:Se,listeners:re}),me?Se.data=me:(me=gp(l),me!==null&&(Se.data=me)))),(me=b1?v1(s,l):S1(s,l))&&(Se=Hl($,"onBeforeInput"),0<Se.length&&(re=new lp("onBeforeInput","beforeinput",null,l,F),K.push({event:re,listeners:Se}),re.data=me)),hx(K,s,$,l,F)}Zy(K,r)})}function Io(s,r,l){return{instance:s,listener:r,currentTarget:l}}function Hl(s,r){for(var l=r+"Capture",d=[];s!==null;){var g=s,p=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||p===null||(g=ro(s,l),g!=null&&d.unshift(Io(s,g,p)),g=ro(s,r),g!=null&&d.push(Io(s,g,p))),s.tag===3)return d;s=s.return}return[]}function mx(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function e_(s,r,l,d,g){for(var p=r._reactName,w=[];l!==null&&l!==d;){var A=l,k=A.alternate,$=A.stateNode;if(A=A.tag,k!==null&&k===d)break;A!==5&&A!==26&&A!==27||$===null||(k=$,g?($=ro(l,p),$!=null&&w.unshift(Io(l,$,k))):g||($=ro(l,p),$!=null&&w.push(Io(l,$,k)))),l=l.return}w.length!==0&&s.push({event:r,listeners:w})}var yx=/\r\n?/g,_x=/\u0000|\uFFFD/g;function t_(s){return(typeof s=="string"?s:""+s).replace(yx,`
|
|
50
|
+
`).replace(_x,"")}function n_(s,r){return r=t_(r),t_(s)===r}function Oe(s,r,l,d,g,p){switch(l){case"children":typeof d=="string"?r==="body"||r==="textarea"&&d===""||Us(s,d):(typeof d=="number"||typeof d=="bigint")&&r!=="body"&&Us(s,""+d);break;case"className":Ba(s,"class",d);break;case"tabIndex":Ba(s,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Ba(s,l,d);break;case"style":np(s,d,p);break;case"data":if(r!=="object"){Ba(s,"data",d);break}case"src":case"href":if(d===""&&(r!=="a"||l!=="href")){s.removeAttribute(l);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){s.removeAttribute(l);break}d=qa(""+d),s.setAttribute(l,d);break;case"action":case"formAction":if(typeof d=="function"){s.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(l==="formAction"?(r!=="input"&&Oe(s,r,"name",g.name,g,null),Oe(s,r,"formEncType",g.formEncType,g,null),Oe(s,r,"formMethod",g.formMethod,g,null),Oe(s,r,"formTarget",g.formTarget,g,null)):(Oe(s,r,"encType",g.encType,g,null),Oe(s,r,"method",g.method,g,null),Oe(s,r,"target",g.target,g,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){s.removeAttribute(l);break}d=qa(""+d),s.setAttribute(l,d);break;case"onClick":d!=null&&(s.onclick=Un);break;case"onScroll":d!=null&&_e("scroll",s);break;case"onScrollEnd":d!=null&&_e("scrollend",s);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(n(61));if(l=d.__html,l!=null){if(g.children!=null)throw Error(n(60));s.innerHTML=l}}break;case"multiple":s.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":s.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){s.removeAttribute("xlink:href");break}l=qa(""+d),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?s.setAttribute(l,""+d):s.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?s.setAttribute(l,""):s.removeAttribute(l);break;case"capture":case"download":d===!0?s.setAttribute(l,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?s.setAttribute(l,d):s.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?s.setAttribute(l,d):s.removeAttribute(l);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?s.removeAttribute(l):s.setAttribute(l,d);break;case"popover":_e("beforetoggle",s),_e("toggle",s),Ia(s,"popover",d);break;case"xlinkActuate":qn(s,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":qn(s,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":qn(s,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":qn(s,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":qn(s,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":qn(s,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":qn(s,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":qn(s,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":qn(s,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Ia(s,"is",d);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Gw.get(l)||l,Ia(s,l,d))}}function fh(s,r,l,d,g,p){switch(l){case"style":np(s,d,p);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(n(61));if(l=d.__html,l!=null){if(g.children!=null)throw Error(n(60));s.innerHTML=l}}break;case"children":typeof d=="string"?Us(s,d):(typeof d=="number"||typeof d=="bigint")&&Us(s,""+d);break;case"onScroll":d!=null&&_e("scroll",s);break;case"onScrollEnd":d!=null&&_e("scrollend",s);break;case"onClick":d!=null&&(s.onclick=Un);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xg.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(g=l.endsWith("Capture"),r=l.slice(2,g?l.length-7:void 0),p=s[Dt]||null,p=p!=null?p[l]:null,typeof p=="function"&&s.removeEventListener(r,p,g),typeof d=="function")){typeof p!="function"&&p!==null&&(l in s?s[l]=null:s.hasAttribute(l)&&s.removeAttribute(l)),s.addEventListener(r,d,g);break e}l in s?s[l]=d:d===!0?s.setAttribute(l,""):Ia(s,l,d)}}}function vt(s,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",s),_e("load",s);var d=!1,g=!1,p;for(p in l)if(l.hasOwnProperty(p)){var w=l[p];if(w!=null)switch(p){case"src":d=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,r));default:Oe(s,r,p,w,l,null)}}g&&Oe(s,r,"srcSet",l.srcSet,l,null),d&&Oe(s,r,"src",l.src,l,null);return;case"input":_e("invalid",s);var A=p=w=g=null,k=null,$=null;for(d in l)if(l.hasOwnProperty(d)){var F=l[d];if(F!=null)switch(d){case"name":g=F;break;case"type":w=F;break;case"checked":k=F;break;case"defaultChecked":$=F;break;case"value":p=F;break;case"defaultValue":A=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(n(137,r));break;default:Oe(s,r,d,F,l,null)}}Zg(s,p,A,k,$,w,g,!1);return;case"select":_e("invalid",s),d=w=p=null;for(g in l)if(l.hasOwnProperty(g)&&(A=l[g],A!=null))switch(g){case"value":p=A;break;case"defaultValue":w=A;break;case"multiple":d=A;default:Oe(s,r,g,A,l,null)}r=p,l=w,s.multiple=!!d,r!=null?qs(s,!!d,r,!1):l!=null&&qs(s,!!d,l,!0);return;case"textarea":_e("invalid",s),p=g=d=null;for(w in l)if(l.hasOwnProperty(w)&&(A=l[w],A!=null))switch(w){case"value":d=A;break;case"defaultValue":g=A;break;case"children":p=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(n(91));break;default:Oe(s,r,w,A,l,null)}ep(s,d,g,p);return;case"option":for(k in l)if(l.hasOwnProperty(k)&&(d=l[k],d!=null))switch(k){case"selected":s.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Oe(s,r,k,d,l,null)}return;case"dialog":_e("beforetoggle",s),_e("toggle",s),_e("cancel",s),_e("close",s);break;case"iframe":case"object":_e("load",s);break;case"video":case"audio":for(d=0;d<zo.length;d++)_e(zo[d],s);break;case"image":_e("error",s),_e("load",s);break;case"details":_e("toggle",s);break;case"embed":case"source":case"link":_e("error",s),_e("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for($ in l)if(l.hasOwnProperty($)&&(d=l[$],d!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,r));default:Oe(s,r,$,d,l,null)}return;default:if(Cu(r)){for(F in l)l.hasOwnProperty(F)&&(d=l[F],d!==void 0&&fh(s,r,F,d,l,void 0));return}}for(A in l)l.hasOwnProperty(A)&&(d=l[A],d!=null&&Oe(s,r,A,d,l,null))}function bx(s,r,l,d){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,p=null,w=null,A=null,k=null,$=null,F=null;for(U in l){var K=l[U];if(l.hasOwnProperty(U)&&K!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":k=K;default:d.hasOwnProperty(U)||Oe(s,r,U,null,d,K)}}for(var z in d){var U=d[z];if(K=l[z],d.hasOwnProperty(z)&&(U!=null||K!=null))switch(z){case"type":p=U;break;case"name":g=U;break;case"checked":$=U;break;case"defaultChecked":F=U;break;case"value":w=U;break;case"defaultValue":A=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(n(137,r));break;default:U!==K&&Oe(s,r,z,U,d,K)}}Eu(s,w,A,k,$,F,p,g);return;case"select":U=w=A=z=null;for(p in l)if(k=l[p],l.hasOwnProperty(p)&&k!=null)switch(p){case"value":break;case"multiple":U=k;default:d.hasOwnProperty(p)||Oe(s,r,p,null,d,k)}for(g in d)if(p=d[g],k=l[g],d.hasOwnProperty(g)&&(p!=null||k!=null))switch(g){case"value":z=p;break;case"defaultValue":A=p;break;case"multiple":w=p;default:p!==k&&Oe(s,r,g,p,d,k)}r=A,l=w,d=U,z!=null?qs(s,!!l,z,!1):!!d!=!!l&&(r!=null?qs(s,!!l,r,!0):qs(s,!!l,l?[]:"",!1));return;case"textarea":U=z=null;for(A in l)if(g=l[A],l.hasOwnProperty(A)&&g!=null&&!d.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:Oe(s,r,A,null,d,g)}for(w in d)if(g=d[w],p=l[w],d.hasOwnProperty(w)&&(g!=null||p!=null))switch(w){case"value":z=g;break;case"defaultValue":U=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(n(91));break;default:g!==p&&Oe(s,r,w,g,d,p)}Qg(s,z,U);return;case"option":for(var ie in l)if(z=l[ie],l.hasOwnProperty(ie)&&z!=null&&!d.hasOwnProperty(ie))switch(ie){case"selected":s.selected=!1;break;default:Oe(s,r,ie,null,d,z)}for(k in d)if(z=d[k],U=l[k],d.hasOwnProperty(k)&&z!==U&&(z!=null||U!=null))switch(k){case"selected":s.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:Oe(s,r,k,z,d,U)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ce in l)z=l[ce],l.hasOwnProperty(ce)&&z!=null&&!d.hasOwnProperty(ce)&&Oe(s,r,ce,null,d,z);for($ in d)if(z=d[$],U=l[$],d.hasOwnProperty($)&&z!==U&&(z!=null||U!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(n(137,r));break;default:Oe(s,r,$,z,d,U)}return;default:if(Cu(r)){for(var Re in l)z=l[Re],l.hasOwnProperty(Re)&&z!==void 0&&!d.hasOwnProperty(Re)&&fh(s,r,Re,void 0,d,z);for(F in d)z=d[F],U=l[F],!d.hasOwnProperty(F)||z===U||z===void 0&&U===void 0||fh(s,r,F,z,d,U);return}}for(var j in l)z=l[j],l.hasOwnProperty(j)&&z!=null&&!d.hasOwnProperty(j)&&Oe(s,r,j,null,d,z);for(K in d)z=d[K],U=l[K],!d.hasOwnProperty(K)||z===U||z==null&&U==null||Oe(s,r,K,z,d,U)}function i_(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function vx(){if(typeof performance.getEntriesByType=="function"){for(var s=0,r=0,l=performance.getEntriesByType("resource"),d=0;d<l.length;d++){var g=l[d],p=g.transferSize,w=g.initiatorType,A=g.duration;if(p&&A&&i_(w)){for(w=0,A=g.responseEnd,d+=1;d<l.length;d++){var k=l[d],$=k.startTime;if($>A)break;var F=k.transferSize,K=k.initiatorType;F&&i_(K)&&(k=k.responseEnd,w+=F*(k<A?1:(A-$)/(k-$)))}if(--d,r+=8*(p+w)/(g.duration/1e3),s++,10<s)break}}if(0<s)return r/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var gh=null,ph=null;function $l(s){return s.nodeType===9?s:s.ownerDocument}function s_(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function r_(s,r){if(s===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&r==="foreignObject"?0:s}function mh(s,r){return s==="textarea"||s==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var yh=null;function Sx(){var s=window.event;return s&&s.type==="popstate"?s===yh?!1:(yh=s,!0):(yh=null,!1)}var o_=typeof setTimeout=="function"?setTimeout:void 0,wx=typeof clearTimeout=="function"?clearTimeout:void 0,a_=typeof Promise=="function"?Promise:void 0,xx=typeof queueMicrotask=="function"?queueMicrotask:typeof a_<"u"?function(s){return a_.resolve(null).then(s).catch(Tx)}:o_;function Tx(s){setTimeout(function(){throw s})}function ji(s){return s==="head"}function l_(s,r){var l=r,d=0;do{var g=l.nextSibling;if(s.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"||l==="/&"){if(d===0){s.removeChild(g),vr(r);return}d--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")d++;else if(l==="html")Bo(s.ownerDocument.documentElement);else if(l==="head"){l=s.ownerDocument.head,Bo(l);for(var p=l.firstChild;p;){var w=p.nextSibling,A=p.nodeName;p[io]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&p.rel.toLowerCase()==="stylesheet"||l.removeChild(p),p=w}}else l==="body"&&Bo(s.ownerDocument.body);l=g}while(l);vr(r)}function c_(s,r){var l=s;s=0;do{var d=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),d&&d.nodeType===8)if(l=d.data,l==="/$"){if(s===0)break;s--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||s++;l=d}while(l)}function _h(s){var r=s.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":_h(l),xu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}s.removeChild(l)}}function Ex(s,r,l,d){for(;s.nodeType===1;){var g=l;if(s.nodeName.toLowerCase()!==r.toLowerCase()){if(!d&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(d){if(!s[io])switch(r){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(p=s.getAttribute("rel"),p==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(p!==g.rel||s.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||s.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||s.getAttribute("title")!==(g.title==null?null:g.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(p=s.getAttribute("src"),(p!==(g.src==null?null:g.src)||s.getAttribute("type")!==(g.type==null?null:g.type)||s.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&p&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(r==="input"&&s.type==="hidden"){var p=g.name==null?null:""+g.name;if(g.type==="hidden"&&s.getAttribute("name")===p)return s}else return s;if(s=cn(s.nextSibling),s===null)break}return null}function Ax(s,r,l){if(r==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=cn(s.nextSibling),s===null))return null;return s}function u_(s,r){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!r||(s=cn(s.nextSibling),s===null))return null;return s}function bh(s){return s.data==="$?"||s.data==="$~"}function vh(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function Cx(s,r){var l=s.ownerDocument;if(s.data==="$~")s._reactRetry=r;else if(s.data!=="$?"||l.readyState!=="loading")r();else{var d=function(){r(),l.removeEventListener("DOMContentLoaded",d)};l.addEventListener("DOMContentLoaded",d),s._reactRetry=d}}function cn(s){for(;s!=null;s=s.nextSibling){var r=s.nodeType;if(r===1||r===3)break;if(r===8){if(r=s.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return s}var Sh=null;function d_(s){s=s.nextSibling;for(var r=0;s;){if(s.nodeType===8){var l=s.data;if(l==="/$"||l==="/&"){if(r===0)return cn(s.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}s=s.nextSibling}return null}function h_(s){s=s.previousSibling;for(var r=0;s;){if(s.nodeType===8){var l=s.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return s;r--}else l!=="/$"&&l!=="/&"||r++}s=s.previousSibling}return null}function f_(s,r,l){switch(r=$l(l),s){case"html":if(s=r.documentElement,!s)throw Error(n(452));return s;case"head":if(s=r.head,!s)throw Error(n(453));return s;case"body":if(s=r.body,!s)throw Error(n(454));return s;default:throw Error(n(451))}}function Bo(s){for(var r=s.attributes;r.length;)s.removeAttributeNode(r[0]);xu(s)}var un=new Map,g_=new Set;function zl(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var ri=Z.d;Z.d={f:kx,r:Nx,D:Mx,C:Dx,L:Lx,m:Ox,X:jx,S:Rx,M:Hx};function kx(){var s=ri.f(),r=Nl();return s||r}function Nx(s){var r=Is(s);r!==null&&r.tag===5&&r.type==="form"?Dm(r):ri.r(s)}var yr=typeof document>"u"?null:document;function p_(s,r,l){var d=yr;if(d&&typeof r=="string"&&r){var g=tn(r);g='link[rel="'+s+'"][href="'+g+'"]',typeof l=="string"&&(g+='[crossorigin="'+l+'"]'),g_.has(g)||(g_.add(g),s={rel:s,crossOrigin:l,href:r},d.querySelector(g)===null&&(r=d.createElement("link"),vt(r,"link",s),ft(r),d.head.appendChild(r)))}}function Mx(s){ri.D(s),p_("dns-prefetch",s,null)}function Dx(s,r){ri.C(s,r),p_("preconnect",s,r)}function Lx(s,r,l){ri.L(s,r,l);var d=yr;if(d&&s&&r){var g='link[rel="preload"][as="'+tn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(g+='[imagesrcset="'+tn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(g+='[imagesizes="'+tn(l.imageSizes)+'"]')):g+='[href="'+tn(s)+'"]';var p=g;switch(r){case"style":p=_r(s);break;case"script":p=br(s)}un.has(p)||(s=m({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:s,as:r},l),un.set(p,s),d.querySelector(g)!==null||r==="style"&&d.querySelector(Po(p))||r==="script"&&d.querySelector(qo(p))||(r=d.createElement("link"),vt(r,"link",s),ft(r),d.head.appendChild(r)))}}function Ox(s,r){ri.m(s,r);var l=yr;if(l&&s){var d=r&&typeof r.as=="string"?r.as:"script",g='link[rel="modulepreload"][as="'+tn(d)+'"][href="'+tn(s)+'"]',p=g;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=br(s)}if(!un.has(p)&&(s=m({rel:"modulepreload",href:s},r),un.set(p,s),l.querySelector(g)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(qo(p)))return}d=l.createElement("link"),vt(d,"link",s),ft(d),l.head.appendChild(d)}}}function Rx(s,r,l){ri.S(s,r,l);var d=yr;if(d&&s){var g=Bs(d).hoistableStyles,p=_r(s);r=r||"default";var w=g.get(p);if(!w){var A={loading:0,preload:null};if(w=d.querySelector(Po(p)))A.loading=5;else{s=m({rel:"stylesheet",href:s,"data-precedence":r},l),(l=un.get(p))&&wh(s,l);var k=w=d.createElement("link");ft(k),vt(k,"link",s),k._p=new Promise(function($,F){k.onload=$,k.onerror=F}),k.addEventListener("load",function(){A.loading|=1}),k.addEventListener("error",function(){A.loading|=2}),A.loading|=4,Il(w,r,d)}w={type:"stylesheet",instance:w,count:1,state:A},g.set(p,w)}}}function jx(s,r){ri.X(s,r);var l=yr;if(l&&s){var d=Bs(l).hoistableScripts,g=br(s),p=d.get(g);p||(p=l.querySelector(qo(g)),p||(s=m({src:s,async:!0},r),(r=un.get(g))&&xh(s,r),p=l.createElement("script"),ft(p),vt(p,"link",s),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},d.set(g,p))}}function Hx(s,r){ri.M(s,r);var l=yr;if(l&&s){var d=Bs(l).hoistableScripts,g=br(s),p=d.get(g);p||(p=l.querySelector(qo(g)),p||(s=m({src:s,async:!0,type:"module"},r),(r=un.get(g))&&xh(s,r),p=l.createElement("script"),ft(p),vt(p,"link",s),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},d.set(g,p))}}function m_(s,r,l,d){var g=(g=ae.current)?zl(g):null;if(!g)throw Error(n(446));switch(s){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=_r(l.href),l=Bs(g).hoistableStyles,d=l.get(r),d||(d={type:"style",instance:null,count:0,state:null},l.set(r,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){s=_r(l.href);var p=Bs(g).hoistableStyles,w=p.get(s);if(w||(g=g.ownerDocument||g,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(s,w),(p=g.querySelector(Po(s)))&&!p._p&&(w.instance=p,w.state.loading=5),un.has(s)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},un.set(s,l),p||$x(g,s,l,w.state))),r&&d===null)throw Error(n(528,""));return w}if(r&&d!==null)throw Error(n(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=br(l),l=Bs(g).hoistableScripts,d=l.get(r),d||(d={type:"script",instance:null,count:0,state:null},l.set(r,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,s))}}function _r(s){return'href="'+tn(s)+'"'}function Po(s){return'link[rel="stylesheet"]['+s+"]"}function y_(s){return m({},s,{"data-precedence":s.precedence,precedence:null})}function $x(s,r,l,d){s.querySelector('link[rel="preload"][as="style"]['+r+"]")?d.loading=1:(r=s.createElement("link"),d.preload=r,r.addEventListener("load",function(){return d.loading|=1}),r.addEventListener("error",function(){return d.loading|=2}),vt(r,"link",l),ft(r),s.head.appendChild(r))}function br(s){return'[src="'+tn(s)+'"]'}function qo(s){return"script[async]"+s}function __(s,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var d=s.querySelector('style[data-href~="'+tn(l.href)+'"]');if(d)return r.instance=d,ft(d),d;var g=m({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return d=(s.ownerDocument||s).createElement("style"),ft(d),vt(d,"style",g),Il(d,l.precedence,s),r.instance=d;case"stylesheet":g=_r(l.href);var p=s.querySelector(Po(g));if(p)return r.state.loading|=4,r.instance=p,ft(p),p;d=y_(l),(g=un.get(g))&&wh(d,g),p=(s.ownerDocument||s).createElement("link"),ft(p);var w=p;return w._p=new Promise(function(A,k){w.onload=A,w.onerror=k}),vt(p,"link",d),r.state.loading|=4,Il(p,l.precedence,s),r.instance=p;case"script":return p=br(l.src),(g=s.querySelector(qo(p)))?(r.instance=g,ft(g),g):(d=l,(g=un.get(p))&&(d=m({},l),xh(d,g)),s=s.ownerDocument||s,g=s.createElement("script"),ft(g),vt(g,"link",d),s.head.appendChild(g),r.instance=g);case"void":return null;default:throw Error(n(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(d=r.instance,r.state.loading|=4,Il(d,l.precedence,s));return r.instance}function Il(s,r,l){for(var d=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=d.length?d[d.length-1]:null,p=g,w=0;w<d.length;w++){var A=d[w];if(A.dataset.precedence===r)p=A;else if(p!==g)break}p?p.parentNode.insertBefore(s,p.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(s,r.firstChild))}function wh(s,r){s.crossOrigin==null&&(s.crossOrigin=r.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=r.referrerPolicy),s.title==null&&(s.title=r.title)}function xh(s,r){s.crossOrigin==null&&(s.crossOrigin=r.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=r.referrerPolicy),s.integrity==null&&(s.integrity=r.integrity)}var Bl=null;function b_(s,r,l){if(Bl===null){var d=new Map,g=Bl=new Map;g.set(l,d)}else g=Bl,d=g.get(l),d||(d=new Map,g.set(l,d));if(d.has(s))return d;for(d.set(s,null),l=l.getElementsByTagName(s),g=0;g<l.length;g++){var p=l[g];if(!(p[io]||p[mt]||s==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var w=p.getAttribute(r)||"";w=s+w;var A=d.get(w);A?A.push(p):d.set(w,[p])}}return d}function v_(s,r,l){s=s.ownerDocument||s,s.head.insertBefore(l,r==="title"?s.querySelector("head > title"):null)}function zx(s,r,l){if(l===1||r.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return s=r.disabled,typeof r.precedence=="string"&&s==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function S_(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function Ix(s,r,l,d){if(l.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var g=_r(d.href),p=r.querySelector(Po(g));if(p){r=p._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(s.count++,s=Pl.bind(s),r.then(s,s)),l.state.loading|=4,l.instance=p,ft(p);return}p=r.ownerDocument||r,d=y_(d),(g=un.get(g))&&wh(d,g),p=p.createElement("link"),ft(p);var w=p;w._p=new Promise(function(A,k){w.onload=A,w.onerror=k}),vt(p,"link",d),l.instance=p}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(s.count++,l=Pl.bind(s),r.addEventListener("load",l),r.addEventListener("error",l))}}var Th=0;function Bx(s,r){return s.stylesheets&&s.count===0&&Ul(s,s.stylesheets),0<s.count||0<s.imgCount?function(l){var d=setTimeout(function(){if(s.stylesheets&&Ul(s,s.stylesheets),s.unsuspend){var p=s.unsuspend;s.unsuspend=null,p()}},6e4+r);0<s.imgBytes&&Th===0&&(Th=62500*vx());var g=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&Ul(s,s.stylesheets),s.unsuspend)){var p=s.unsuspend;s.unsuspend=null,p()}},(s.imgBytes>Th?50:800)+r);return s.unsuspend=l,function(){s.unsuspend=null,clearTimeout(d),clearTimeout(g)}}:null}function Pl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ul(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var ql=null;function Ul(s,r){s.stylesheets=null,s.unsuspend!==null&&(s.count++,ql=new Map,r.forEach(Px,s),ql=null,Pl.call(s))}function Px(s,r){if(!(r.state.loading&4)){var l=ql.get(s);if(l)var d=l.get(null);else{l=new Map,ql.set(s,l);for(var g=s.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<g.length;p++){var w=g[p];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(l.set(w.dataset.precedence,w),d=w)}d&&l.set(null,d)}g=r.instance,w=g.getAttribute("data-precedence"),p=l.get(w)||d,p===d&&l.set(null,g),l.set(w,g),this.count++,d=Pl.bind(this),g.addEventListener("load",d),g.addEventListener("error",d),p?p.parentNode.insertBefore(g,p.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(g,s.firstChild)),r.state.loading|=4}}var Uo={$$typeof:L,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function qx(s,r,l,d,g,p,w,A,k){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=bu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bu(0),this.hiddenUpdates=bu(null),this.identifierPrefix=d,this.onUncaughtError=g,this.onCaughtError=p,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function w_(s,r,l,d,g,p,w,A,k,$,F,K){return s=new qx(s,r,l,w,k,$,F,K,A),r=1,p===!0&&(r|=24),p=Gt(3,null,null,r),s.current=p,p.stateNode=s,r=id(),r.refCount++,s.pooledCache=r,r.refCount++,p.memoizedState={element:d,isDehydrated:l,cache:r},ad(p),s}function x_(s){return s?(s=Ws,s):Ws}function T_(s,r,l,d,g,p){g=x_(g),d.context===null?d.context=g:d.pendingContext=g,d=Ti(r),d.payload={element:l},p=p===void 0?null:p,p!==null&&(d.callback=p),l=Ei(s,d,r),l!==null&&($t(l,s,r),So(l,s,r))}function E_(s,r){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var l=s.retryLane;s.retryLane=l!==0&&l<r?l:r}}function Eh(s,r){E_(s,r),(s=s.alternate)&&E_(s,r)}function A_(s){if(s.tag===13||s.tag===31){var r=os(s,67108864);r!==null&&$t(r,s,67108864),Eh(s,67108864)}}function C_(s){if(s.tag===13||s.tag===31){var r=Jt();r=vu(r);var l=os(s,r);l!==null&&$t(l,s,r),Eh(s,r)}}var Vl=!0;function Ux(s,r,l,d){var g=P.T;P.T=null;var p=Z.p;try{Z.p=2,Ah(s,r,l,d)}finally{Z.p=p,P.T=g}}function Vx(s,r,l,d){var g=P.T;P.T=null;var p=Z.p;try{Z.p=8,Ah(s,r,l,d)}finally{Z.p=p,P.T=g}}function Ah(s,r,l,d){if(Vl){var g=Ch(d);if(g===null)hh(s,r,d,Fl,l),N_(s,d);else if(Gx(g,s,r,l,d))d.stopPropagation();else if(N_(s,d),r&4&&-1<Fx.indexOf(s)){for(;g!==null;){var p=Is(g);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var w=ts(p.pendingLanes);if(w!==0){var A=p;for(A.pendingLanes|=2,A.entangledLanes|=2;w;){var k=1<<31-At(w);A.entanglements[1]|=k,w&=~k}Rn(p),(ke&6)===0&&(Cl=Et()+500,$o(0))}}break;case 31:case 13:A=os(p,2),A!==null&&$t(A,p,2),Nl(),Eh(p,2)}if(p=Ch(d),p===null&&hh(s,r,d,Fl,l),p===g)break;g=p}g!==null&&d.stopPropagation()}else hh(s,r,d,null,l)}}function Ch(s){return s=Nu(s),kh(s)}var Fl=null;function kh(s){if(Fl=null,s=zs(s),s!==null){var r=a(s);if(r===null)s=null;else{var l=r.tag;if(l===13){if(s=c(r),s!==null)return s;s=null}else if(l===31){if(s=u(r),s!==null)return s;s=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;s=null}else r!==s&&(s=null)}}return Fl=s,null}function k_(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(pu()){case Ra:return 2;case eo:return 8;case mi:case mu:return 32;case ja:return 268435456;default:return 32}default:return 32}}var Nh=!1,Hi=null,$i=null,zi=null,Vo=new Map,Fo=new Map,Ii=[],Fx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function N_(s,r){switch(s){case"focusin":case"focusout":Hi=null;break;case"dragenter":case"dragleave":$i=null;break;case"mouseover":case"mouseout":zi=null;break;case"pointerover":case"pointerout":Vo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fo.delete(r.pointerId)}}function Go(s,r,l,d,g,p){return s===null||s.nativeEvent!==p?(s={blockedOn:r,domEventName:l,eventSystemFlags:d,nativeEvent:p,targetContainers:[g]},r!==null&&(r=Is(r),r!==null&&A_(r)),s):(s.eventSystemFlags|=d,r=s.targetContainers,g!==null&&r.indexOf(g)===-1&&r.push(g),s)}function Gx(s,r,l,d,g){switch(r){case"focusin":return Hi=Go(Hi,s,r,l,d,g),!0;case"dragenter":return $i=Go($i,s,r,l,d,g),!0;case"mouseover":return zi=Go(zi,s,r,l,d,g),!0;case"pointerover":var p=g.pointerId;return Vo.set(p,Go(Vo.get(p)||null,s,r,l,d,g)),!0;case"gotpointercapture":return p=g.pointerId,Fo.set(p,Go(Fo.get(p)||null,s,r,l,d,g)),!0}return!1}function M_(s){var r=zs(s.target);if(r!==null){var l=a(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){s.blockedOn=r,Vg(s.priority,function(){C_(l)});return}}else if(r===31){if(r=u(l),r!==null){s.blockedOn=r,Vg(s.priority,function(){C_(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){s.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Gl(s){if(s.blockedOn!==null)return!1;for(var r=s.targetContainers;0<r.length;){var l=Ch(s.nativeEvent);if(l===null){l=s.nativeEvent;var d=new l.constructor(l.type,l);ku=d,l.target.dispatchEvent(d),ku=null}else return r=Is(l),r!==null&&A_(r),s.blockedOn=l,!1;r.shift()}return!0}function D_(s,r,l){Gl(s)&&l.delete(r)}function Xx(){Nh=!1,Hi!==null&&Gl(Hi)&&(Hi=null),$i!==null&&Gl($i)&&($i=null),zi!==null&&Gl(zi)&&(zi=null),Vo.forEach(D_),Fo.forEach(D_)}function Xl(s,r){s.blockedOn===r&&(s.blockedOn=null,Nh||(Nh=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Xx)))}var Yl=null;function L_(s){Yl!==s&&(Yl=s,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Yl===s&&(Yl=null);for(var r=0;r<s.length;r+=3){var l=s[r],d=s[r+1],g=s[r+2];if(typeof d!="function"){if(kh(d||l)===null)continue;break}var p=Is(l);p!==null&&(s.splice(r,3),r-=3,Cd(p,{pending:!0,data:g,method:l.method,action:d},d,g))}}))}function vr(s){function r(k){return Xl(k,s)}Hi!==null&&Xl(Hi,s),$i!==null&&Xl($i,s),zi!==null&&Xl(zi,s),Vo.forEach(r),Fo.forEach(r);for(var l=0;l<Ii.length;l++){var d=Ii[l];d.blockedOn===s&&(d.blockedOn=null)}for(;0<Ii.length&&(l=Ii[0],l.blockedOn===null);)M_(l),l.blockedOn===null&&Ii.shift();if(l=(s.ownerDocument||s).$$reactFormReplay,l!=null)for(d=0;d<l.length;d+=3){var g=l[d],p=l[d+1],w=g[Dt]||null;if(typeof p=="function")w||L_(l);else if(w){var A=null;if(p&&p.hasAttribute("formAction")){if(g=p,w=p[Dt]||null)A=w.formAction;else if(kh(g)!==null)continue}else A=w.action;typeof A=="function"?l[d+1]=A:(l.splice(d,3),d-=3),L_(l)}}}function O_(){function s(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(w){return g=w})},focusReset:"manual",scroll:"manual"})}function r(){g!==null&&(g(),g=null),d||setTimeout(l,20)}function l(){if(!d&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,g=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){d=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),g!==null&&(g(),g=null)}}}function Mh(s){this._internalRoot=s}Kl.prototype.render=Mh.prototype.render=function(s){var r=this._internalRoot;if(r===null)throw Error(n(409));var l=r.current,d=Jt();T_(l,d,s,r,null,null)},Kl.prototype.unmount=Mh.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var r=s.containerInfo;T_(s.current,2,null,s,null,null),Nl(),r[$s]=null}};function Kl(s){this._internalRoot=s}Kl.prototype.unstable_scheduleHydration=function(s){if(s){var r=Ug();s={blockedOn:null,target:s,priority:r};for(var l=0;l<Ii.length&&r!==0&&r<Ii[l].priority;l++);Ii.splice(l,0,s),l===0&&M_(s)}};var R_=e.version;if(R_!=="19.2.1")throw Error(n(527,R_,"19.2.1"));Z.findDOMNode=function(s){var r=s._reactInternals;if(r===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=f(r),s=s!==null?y(s):null,s=s===null?null:s.stateNode,s};var Yx={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wl.isDisabled&&Wl.supportsFiber)try{Pn=Wl.inject(Yx),ht=Wl}catch{}}return Ko.createRoot=function(s,r){if(!o(s))throw Error(n(299));var l=!1,d="",g=Pm,p=qm,w=Um;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(g=r.onUncaughtError),r.onCaughtError!==void 0&&(p=r.onCaughtError),r.onRecoverableError!==void 0&&(w=r.onRecoverableError)),r=w_(s,1,!1,null,null,l,d,null,g,p,w,O_),s[$s]=r.current,dh(s),new Mh(r)},Ko.hydrateRoot=function(s,r,l){if(!o(s))throw Error(n(299));var d=!1,g="",p=Pm,w=qm,A=Um,k=null;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(p=l.onUncaughtError),l.onCaughtError!==void 0&&(w=l.onCaughtError),l.onRecoverableError!==void 0&&(A=l.onRecoverableError),l.formState!==void 0&&(k=l.formState)),r=w_(s,1,!0,r,l??null,d,g,k,p,w,A,O_),r.context=x_(null),l=r.current,d=Jt(),d=vu(d),g=Ti(d),g.callback=null,Ei(l,g,d),l=d,r.current.lanes=l,no(r,l),Rn(r),s[$s]=r.current,dh(s),new Kl(r)},Ko.version="19.2.1",Ko}var G_;function pT(){if(G_)return Oh.exports;G_=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),Oh.exports=gT(),Oh.exports}var e3=pT();const Uf=new Map([["APIRequestContext.fetch",{title:'{method} "{url}"'}],["APIRequestContext.fetchResponseBody",{title:"Get response body",group:"getter"}],["APIRequestContext.fetchLog",{internal:!0}],["APIRequestContext.storageState",{title:"Get storage state"}],["APIRequestContext.disposeAPIResponse",{internal:!0}],["APIRequestContext.dispose",{internal:!0}],["LocalUtils.zip",{internal:!0}],["LocalUtils.harOpen",{internal:!0}],["LocalUtils.harLookup",{internal:!0}],["LocalUtils.harClose",{internal:!0}],["LocalUtils.harUnzip",{internal:!0}],["LocalUtils.connect",{internal:!0}],["LocalUtils.tracingStarted",{internal:!0}],["LocalUtils.addStackToTracingNoReply",{internal:!0}],["LocalUtils.traceDiscarded",{internal:!0}],["LocalUtils.globToRegex",{internal:!0}],["Root.initialize",{internal:!0}],["Playwright.newRequest",{title:"Create request context"}],["DebugController.initialize",{internal:!0}],["DebugController.setReportStateChanged",{internal:!0}],["DebugController.setRecorderMode",{internal:!0}],["DebugController.highlight",{internal:!0}],["DebugController.hideHighlight",{internal:!0}],["DebugController.resume",{internal:!0}],["DebugController.kill",{internal:!0}],["SocksSupport.socksConnected",{internal:!0}],["SocksSupport.socksFailed",{internal:!0}],["SocksSupport.socksData",{internal:!0}],["SocksSupport.socksError",{internal:!0}],["SocksSupport.socksEnd",{internal:!0}],["BrowserType.launch",{title:"Launch browser"}],["BrowserType.launchPersistentContext",{title:"Launch persistent context"}],["BrowserType.connectOverCDP",{title:"Connect over CDP"}],["Browser.close",{title:"Close browser",pausesBeforeAction:!0}],["Browser.killForTests",{internal:!0}],["Browser.defaultUserAgentForTest",{internal:!0}],["Browser.newContext",{title:"Create context"}],["Browser.newContextForReuse",{internal:!0}],["Browser.disconnectFromReusedContext",{internal:!0}],["Browser.newBrowserCDPSession",{title:"Create CDP session",group:"configuration"}],["Browser.startTracing",{title:"Start browser tracing",group:"configuration"}],["Browser.stopTracing",{title:"Stop browser tracing",group:"configuration"}],["EventTarget.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Page.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Worker.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["PageAgent.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.addCookies",{title:"Add cookies",group:"configuration"}],["BrowserContext.addInitScript",{title:"Add init script",group:"configuration"}],["BrowserContext.clearCookies",{title:"Clear cookies",group:"configuration"}],["BrowserContext.clearPermissions",{title:"Clear permissions",group:"configuration"}],["BrowserContext.close",{title:"Close context",pausesBeforeAction:!0}],["BrowserContext.cookies",{title:"Get cookies",group:"getter"}],["BrowserContext.exposeBinding",{title:"Expose binding",group:"configuration"}],["BrowserContext.grantPermissions",{title:"Grant permissions",group:"configuration"}],["BrowserContext.newPage",{title:"Create page"}],["BrowserContext.registerSelectorEngine",{internal:!0}],["BrowserContext.setTestIdAttributeName",{internal:!0}],["BrowserContext.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["BrowserContext.setGeolocation",{title:"Set geolocation",group:"configuration"}],["BrowserContext.setHTTPCredentials",{title:"Set HTTP credentials",group:"configuration"}],["BrowserContext.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["BrowserContext.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["BrowserContext.setOffline",{title:"Set offline mode"}],["BrowserContext.storageState",{title:"Get storage state"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.exposeConsoleApi",{internal:!0}],["BrowserContext.newCDPSession",{title:"Create CDP session",group:"configuration"}],["BrowserContext.harStart",{internal:!0}],["BrowserContext.harExport",{internal:!0}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["Page.addInitScript",{title:"Add init script",group:"configuration"}],["Page.close",{title:"Close page",pausesBeforeAction:!0}],["Page.consoleMessages",{title:"Get console messages",group:"getter"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0,pausesBeforeAction:!0}],["Page.exposeBinding",{title:"Expose binding",group:"configuration"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.requestGC",{title:"Request garbage collection",group:"configuration"}],["Page.registerLocatorHandler",{title:"Register locator handler"}],["Page.resolveLocatorHandlerNoReply",{internal:!0}],["Page.unregisterLocatorHandler",{title:"Unregister locator handler"}],["Page.reload",{title:"Reload",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["Page.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["Page.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["Page.setViewportSize",{title:"Set viewport size",snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.pageErrors",{title:"Get page errors",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.requests",{title:"Get network requests",group:"getter"}],["Page.snapshotForAI",{internal:!0}],["Page.startJSCoverage",{title:"Start JS coverage",group:"configuration"}],["Page.stopJSCoverage",{title:"Stop JS coverage",group:"configuration"}],["Page.startCSSCoverage",{title:"Start CSS coverage",group:"configuration"}],["Page.stopCSSCoverage",{title:"Stop CSS coverage",group:"configuration"}],["Page.bringToFront",{title:"Bring to front"}],["Page.updateSubscription",{internal:!0}],["Page.agent",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",snapshot:!0,pausesBeforeAction:!0}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.content",{title:"Get content",snapshot:!0,pausesBeforeAction:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.frameElement",{title:"Get frame element",group:"getter"}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{title:"Highlight element",group:"configuration"}],["Frame.getAttribute",{title:'Get attribute "{name}"',snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0,pausesBeforeAction:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.setContent",{title:"Set content",snapshot:!0,pausesBeforeAction:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0,pausesBeforeAction:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0,pausesBeforeAction:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["Worker.updateSubscription",{internal:!0}],["JSHandle.dispose",{internal:!0}],["ElementHandle.dispose",{internal:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.getPropertyList",{title:"Get property list",group:"getter"}],["ElementHandle.getPropertyList",{title:"Get property list",group:"getter"}],["JSHandle.getProperty",{title:"Get JS property",group:"getter"}],["ElementHandle.getProperty",{title:"Get JS property",group:"getter"}],["JSHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.contentFrame",{title:"Get content frame",group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.getAttribute",{title:"Get attribute",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{title:"Abort request",group:"route"}],["Route.continue",{title:"Continue request",group:"route"}],["Route.fulfill",{title:"Fulfill request",group:"route"}],["WebSocketRoute.connect",{title:"Connect WebSocket to server",group:"route"}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.sendToServer",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{title:"Get response body",group:"getter"}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{title:"Start tracing",group:"configuration"}],["Tracing.tracingStartChunk",{title:"Start tracing",group:"configuration"}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{title:"Stop tracing",group:"configuration"}],["Tracing.tracingStop",{title:"Stop tracing",group:"configuration"}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["CDPSession.send",{title:"Send CDP command",group:"configuration"}],["CDPSession.detach",{title:"Detach CDP session",group:"configuration"}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{title:"Wait"}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{title:"Execute shell command",group:"configuration"}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{title:"Connect to Web View"}],["AndroidDevice.close",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}],["PageAgent.perform",{title:'Perform "{task}"'}],["PageAgent.expect",{title:'Expect "{expectation}"'}],["PageAgent.extract",{title:'Extract "{query}"'}],["PageAgent.dispose",{internal:!0}],["PageAgent.usage",{title:"Get agent usage",group:"configuration"}]]);function D0(i,e){var t;return(t=mT(i,e))==null?void 0:t.replaceAll(`
|
|
51
|
+
`,"\\n")}function mT(i,e){if(i)for(const t of e.split("|")){if(t==="url")try{const o=new URL(i[t]);return o.protocol==="data:"?o.protocol:o.protocol==="about:"?i[t]:o.pathname+o.search}catch{if(i[t]!==void 0)return i[t]}if(t==="timeNumber"&&i[t]!==void 0)return new Date(i[t]).toString();const n=yT(i,t);if(n!==void 0)return n}}function yT(i,e){const t=e.split(".");let n=i;for(const o of t){if(typeof n!="object"||n===null)return;n=n[o]}if(n!==void 0)return String(n)}function _T(i){var t;return(i.title??((t=Uf.get(i.type+"."+i.method))==null?void 0:t.title)??i.method).replace(/\{([^}]+)\}/g,(n,o)=>D0(i.params,o)??n)}function bT(i){var e;return(e=Uf.get(i.type+"."+i.method))==null?void 0:e.group}const la=Symbol("context"),L0=Symbol("nextInContext"),O0=Symbol("prevByEndTime"),R0=Symbol("nextByStartTime"),X_=Symbol("events");class t3{constructor(e,t){var o;t.forEach(a=>vT(a));const n=t.find(a=>a.origin==="library");this.traceUri=e,this.browserName=(n==null?void 0:n.browserName)||"",this.sdkLanguage=n==null?void 0:n.sdkLanguage,this.channel=n==null?void 0:n.channel,this.testIdAttributeName=n==null?void 0:n.testIdAttributeName,this.platform=(n==null?void 0:n.platform)||"",this.playwrightVersion=(o=t.find(a=>a.playwrightVersion))==null?void 0:o.playwrightVersion,this.title=(n==null?void 0:n.title)||"",this.options=(n==null?void 0:n.options)||{},this.actions=ST(t),this.pages=[].concat(...t.map(a=>a.pages)),this.wallTime=t.map(a=>a.wallTime).reduce((a,c)=>Math.min(a||Number.MAX_VALUE,c),Number.MAX_VALUE),this.startTime=t.map(a=>a.startTime).reduce((a,c)=>Math.min(a,c),Number.MAX_VALUE),this.endTime=t.map(a=>a.endTime).reduce((a,c)=>Math.max(a,c),Number.MIN_VALUE),this.events=[].concat(...t.map(a=>a.events)),this.stdio=[].concat(...t.map(a=>a.stdio)),this.errors=[].concat(...t.map(a=>a.errors)),this.hasSource=t.some(a=>a.hasSource),this.hasStepData=t.some(a=>a.origin==="testRunner"),this.resources=[...t.map(a=>a.resources)].flat(),this.attachments=this.actions.flatMap(a=>{var c;return((c=a.attachments)==null?void 0:c.map(u=>({...u,callId:a.callId,traceUri:e})))??[]}),this.visibleAttachments=this.attachments.filter(a=>!a.name.startsWith("_")),this.events.sort((a,c)=>a.time-c.time),this.resources.sort((a,c)=>a._monotonicTime-c._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=kT(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const a of this.actions)a.group=a.group??bT({type:a.class,method:a.method}),a.group&&this.actionCounters.set(a.group,1+(this.actionCounters.get(a.group)||0))}createRelativeUrl(e){const t=new URL("http://localhost/"+e);return t.searchParams.set("trace",this.traceUri),t.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const t=new Set(e);return this.actions.filter(n=>!n.group||t.has(n.group))}renderActionTree(e){const t=this.filteredActions(e??[]),{rootItem:n}=j0(t),o=[],a=(c,u)=>{const h=_T({...c.action,type:c.action.class});o.push(`${u}${h||c.id}`);for(const f of c.children)a(f,u+" ")};return n.children.forEach(c=>a(c,"")),o}_errorDescriptorsFromActions(){var t;const e=[];for(const n of this.actions||[])(t=n.error)!=null&&t.message&&e.push({action:n,stack:n.stack,message:n.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,t)=>({stack:e.stack,message:e.message}))}}function vT(i){for(const t of i.pages)t[la]=i;for(let t=0;t<i.actions.length;++t){const n=i.actions[t];n[la]=i}let e;for(let t=i.actions.length-1;t>=0;t--){const n=i.actions[t];n[L0]=e,n.class!=="Route"&&(e=n)}for(const t of i.events)t[la]=i;for(const t of i.resources)t[la]=i}function ST(i){const e=[],t=wT(i);e.push(...t),e.sort((n,o)=>o.parentId===n.callId?1:n.parentId===o.callId?-1:n.endTime-o.endTime);for(let n=1;n<e.length;++n)e[n][O0]=e[n-1];e.sort((n,o)=>o.parentId===n.callId?-1:n.parentId===o.callId?1:n.startTime-o.startTime);for(let n=0;n+1<e.length;++n)e[n][R0]=e[n+1];return e}let Y_=0;function wT(i){const e=new Map,t=i.filter(c=>c.origin==="library"),n=i.filter(c=>c.origin==="testRunner");if(!n.length||!t.length)return i.map(c=>c.actions.map(u=>({...u,context:c}))).flat();for(const c of t)for(const u of c.actions)e.set(u.stepId||`tmp-step@${++Y_}`,{...u,context:c});const o=TT(n,e);o&&xT(t,o);const a=new Map;for(const c of n)for(const u of c.actions){const h=u.stepId&&e.get(u.stepId);if(h){a.set(u.callId,h.callId),u.error&&(h.error=u.error),u.attachments&&(h.attachments=u.attachments),u.annotations&&(h.annotations=u.annotations),u.parentId&&(h.parentId=a.get(u.parentId)??u.parentId),u.group&&(h.group=u.group),h.startTime=u.startTime,h.endTime=u.endTime;continue}u.parentId&&(u.parentId=a.get(u.parentId)??u.parentId),e.set(u.stepId||`tmp-step@${++Y_}`,{...u,context:c})}return[...e.values()]}function xT(i,e){for(const t of i){t.startTime+=e,t.endTime+=e;for(const n of t.actions)n.startTime&&(n.startTime+=e),n.endTime&&(n.endTime+=e);for(const n of t.events)n.time+=e;for(const n of t.stdio)n.timestamp+=e;for(const n of t.pages)for(const o of n.screencastFrames)o.timestamp+=e;for(const n of t.resources)n._monotonicTime&&(n._monotonicTime+=e)}}function TT(i,e){for(const t of i)for(const n of t.actions){if(!n.startTime)continue;const o=n.stepId?e.get(n.stepId):void 0;if(o)return n.startTime-o.startTime}return 0}function j0(i){const e=new Map;for(const o of i)e.set(o.callId,{id:o.callId,parent:void 0,children:[],action:o});const t={action:{...NT},id:"",parent:void 0,children:[]};for(const o of e.values()){t.action.startTime=Math.min(t.action.startTime,o.action.startTime),t.action.endTime=Math.max(t.action.endTime,o.action.endTime);const a=o.action.parentId&&e.get(o.action.parentId)||t;a.children.push(o),o.parent=a}const n=o=>{for(const a of o.children)a.action.stack=a.action.stack??o.action.stack,n(a)};return n(t),{rootItem:t,itemMap:e}}function H0(i){return i[la]}function ET(i){return i[L0]}function K_(i){return i[O0]}function W_(i){return i[R0]}function AT(i){let e=0,t=0;for(const n of CT(i)){if(n.type==="console"){const o=n.messageType;o==="warning"?++t:o==="error"&&++e}n.type==="event"&&n.method==="pageError"&&++e}return{errors:e,warnings:t}}function CT(i){let e=i[X_];if(e)return e;const t=ET(i);return e=H0(i).events.filter(n=>n.time>=i.startTime&&(!t||n.time<t.startTime)),i[X_]=e,e}function kT(i,e){var n;const t=new Map;for(const o of i)for(const a of o.stack||[]){let c=t.get(a.file);c||(c={errors:[],content:void 0},t.set(a.file,c))}for(const o of e){const{action:a,stack:c,message:u}=o;!a||!c||(n=t.get(c[0].file))==null||n.errors.push({line:c[0].line||0,message:u})}return t}const NT={type:"action",callId:"",startTime:0,endTime:0,class:"",method:"",params:{},log:[],context:{origin:"library",startTime:0,endTime:0,browserName:"",wallTime:0,options:{},pages:[],resources:[],actions:[],events:[],stdio:[],errors:[],hasSource:!1,contextId:""}},MT=50,Cc=({sidebarSize:i,sidebarHidden:e=!1,sidebarIsFirst:t=!1,orientation:n="vertical",minSidebarSize:o=MT,settingName:a,sidebar:c,main:u})=>{const h=Math.max(o,i)*window.devicePixelRatio,[f,y]=pn(a?a+"."+n+":size":void 0,h),[m,_]=pn(a?a+"."+n+":size":void 0,h),[b,S]=q.useState(null),[v,x]=Ds();let E;n==="vertical"?(E=m/window.devicePixelRatio,v&&v.height<E&&(E=v.height-10)):(E=f/window.devicePixelRatio,v&&v.width<E&&(E=v.width-10)),document.body.style.userSelect=b?"none":"inherit";let C={};return n==="vertical"?t?C={top:b?0:E-4,bottom:b?0:void 0,height:b?"initial":8}:C={bottom:b?0:E-4,top:b?0:void 0,height:b?"initial":8}:t?C={left:b?0:E-4,right:b?0:void 0,width:b?"initial":8}:C={right:b?0:E-4,left:b?0:void 0,width:b?"initial":8},T.jsxs("div",{className:et("split-view",n,t&&"sidebar-first"),ref:x,children:[T.jsx("div",{className:"split-view-main",children:u}),!e&&T.jsx("div",{style:{flexBasis:E},className:"split-view-sidebar",children:c}),!e&&T.jsx("div",{style:C,className:"split-view-resizer",onMouseDown:L=>S({offset:n==="vertical"?L.clientY:L.clientX,size:E}),onMouseUp:()=>S(null),onMouseMove:L=>{if(!L.buttons)S(null);else if(b){const N=(n==="vertical"?L.clientY:L.clientX)-b.offset,V=t?b.size+N:b.size-N,B=L.target.parentElement.getBoundingClientRect(),O=Math.min(Math.max(o,V),(n==="vertical"?B.height:B.width)-o);n==="vertical"?_(O*window.devicePixelRatio):y(O*window.devicePixelRatio)}}})]})},ot=function(i,e,t){return i>=e&&i<=t};function zt(i){return ot(i,48,57)}function J_(i){return zt(i)||ot(i,65,70)||ot(i,97,102)}function DT(i){return ot(i,65,90)}function LT(i){return ot(i,97,122)}function OT(i){return DT(i)||LT(i)}function RT(i){return i>=128}function cc(i){return OT(i)||RT(i)||i===95}function Z_(i){return cc(i)||zt(i)||i===45}function jT(i){return ot(i,0,8)||i===11||ot(i,14,31)||i===127}function uc(i){return i===10}function oi(i){return uc(i)||i===9||i===32}const HT=1114111;class Vf extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function $T(i){const e=[];for(let t=0;t<i.length;t++){let n=i.charCodeAt(t);if(n===13&&i.charCodeAt(t+1)===10&&(n=10,t++),(n===13||n===12)&&(n=10),n===0&&(n=65533),ot(n,55296,56319)&&ot(i.charCodeAt(t+1),56320,57343)){const o=n-55296,a=i.charCodeAt(t+1)-56320;n=Math.pow(2,16)+o*Math.pow(2,10)+a,t++}e.push(n)}return e}function ut(i){if(i<=65535)return String.fromCharCode(i);i-=Math.pow(2,16);const e=Math.floor(i/Math.pow(2,10))+55296,t=i%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(t)}function $0(i){const e=$T(i);let t=-1;const n=[];let o;const a=function(Y){return Y>=e.length?-1:e[Y]},c=function(Y){if(Y===void 0&&(Y=1),Y>3)throw"Spec Error: no more than three codepoints of lookahead.";return a(t+Y)},u=function(Y){return Y===void 0&&(Y=1),t+=Y,o=a(t),!0},h=function(){return t-=1,!0},f=function(Y){return Y===void 0&&(Y=o),Y===-1},y=function(){if(m(),u(),oi(o)){for(;oi(c());)u();return new kc}else{if(o===34)return S();if(o===35)if(Z_(c())||E(c(1),c(2))){const Y=new W0("");return L(c(1),c(2),c(3))&&(Y.type="id"),Y.value=I(),Y}else return new St(o);else return o===36?c()===61?(u(),new PT):new St(o):o===39?S():o===40?new X0:o===41?new Ff:o===42?c()===61?(u(),new qT):new St(o):o===43?V()?(h(),_()):new St(o):o===44?new U0:o===45?V()?(h(),_()):c(1)===45&&c(2)===62?(u(2),new B0):R()?(h(),b()):new St(o):o===46?V()?(h(),_()):new St(o):o===58?new P0:o===59?new q0:o===60?c(1)===33&&c(2)===45&&c(3)===45?(u(3),new I0):new St(o):o===64?L(c(1),c(2),c(3))?new K0(I()):new St(o):o===91?new G0:o===92?C()?(h(),b()):new St(o):o===93?new bf:o===94?c()===61?(u(),new BT):new St(o):o===123?new V0:o===124?c()===61?(u(),new IT):c()===124?(u(),new Y0):new St(o):o===125?new F0:o===126?c()===61?(u(),new zT):new St(o):zt(o)?(h(),_()):cc(o)?(h(),b()):f()?new hc:new St(o)}},m=function(){for(;c(1)===47&&c(2)===42;)for(u(2);;)if(u(),o===42&&c()===47){u();break}else if(f())return},_=function(){const Y=B();if(L(c(1),c(2),c(3))){const W=new UT;return W.value=Y.value,W.repr=Y.repr,W.type=Y.type,W.unit=I(),W}else if(c()===37){u();const W=new Q0;return W.value=Y.value,W.repr=Y.repr,W}else{const W=new Z0;return W.value=Y.value,W.repr=Y.repr,W.type=Y.type,W}},b=function(){const Y=I();if(Y.toLowerCase()==="url"&&c()===40){for(u();oi(c(1))&&oi(c(2));)u();return c()===34||c()===39?new pa(Y):oi(c())&&(c(2)===34||c(2)===39)?new pa(Y):v()}else return c()===40?(u(),new pa(Y)):new Gf(Y)},S=function(Y){Y===void 0&&(Y=o);let W="";for(;u();){if(o===Y||f())return new Xf(W);if(uc(o))return h(),new z0;o===92?f(c())||(uc(c())?u():W+=ut(x())):W+=ut(o)}throw new Error("Internal error")},v=function(){const Y=new J0("");for(;oi(c());)u();if(f(c()))return Y;for(;u();){if(o===41||f())return Y;if(oi(o)){for(;oi(c());)u();return c()===41||f(c())?(u(),Y):(Q(),new dc)}else{if(o===34||o===39||o===40||jT(o))return Q(),new dc;if(o===92)if(C())Y.value+=ut(x());else return Q(),new dc;else Y.value+=ut(o)}}throw new Error("Internal error")},x=function(){if(u(),J_(o)){const Y=[o];for(let te=0;te<5&&J_(c());te++)u(),Y.push(o);oi(c())&&u();let W=parseInt(Y.map(function(te){return String.fromCharCode(te)}).join(""),16);return W>HT&&(W=65533),W}else return f()?65533:o},E=function(Y,W){return!(Y!==92||uc(W))},C=function(){return E(o,c())},L=function(Y,W,te){return Y===45?cc(W)||W===45||E(W,te):cc(Y)?!0:Y===92?E(Y,W):!1},R=function(){return L(o,c(1),c(2))},N=function(Y,W,te){return Y===43||Y===45?!!(zt(W)||W===46&&zt(te)):Y===46?!!zt(W):!!zt(Y)},V=function(){return N(o,c(1),c(2))},I=function(){let Y="";for(;u();)if(Z_(o))Y+=ut(o);else if(C())Y+=ut(x());else return h(),Y;throw new Error("Internal parse error")},B=function(){let Y="",W="integer";for((c()===43||c()===45)&&(u(),Y+=ut(o));zt(c());)u(),Y+=ut(o);if(c(1)===46&&zt(c(2)))for(u(),Y+=ut(o),u(),Y+=ut(o),W="number";zt(c());)u(),Y+=ut(o);const te=c(1),Ne=c(2),P=c(3);if((te===69||te===101)&&zt(Ne))for(u(),Y+=ut(o),u(),Y+=ut(o),W="number";zt(c());)u(),Y+=ut(o);else if((te===69||te===101)&&(Ne===43||Ne===45)&&zt(P))for(u(),Y+=ut(o),u(),Y+=ut(o),u(),Y+=ut(o),W="number";zt(c());)u(),Y+=ut(o);const Z=O(Y);return{type:W,value:Z,repr:Y}},O=function(Y){return+Y},Q=function(){for(;u();){if(o===41||f())return;C()&&x()}};let se=0;for(;!f(c());)if(n.push(y()),se++,se>e.length*2)throw new Error("I'm infinite-looping!");return n}class tt{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class z0 extends tt{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class dc extends tt{constructor(){super(...arguments),this.tokenType="BADURL"}}class kc extends tt{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class I0 extends tt{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class B0 extends tt{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class P0 extends tt{constructor(){super(...arguments),this.tokenType=":"}}class q0 extends tt{constructor(){super(...arguments),this.tokenType=";"}}class U0 extends tt{constructor(){super(...arguments),this.tokenType=","}}class qr extends tt{constructor(){super(...arguments),this.value="",this.mirror=""}}class V0 extends qr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class F0 extends qr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class G0 extends qr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class bf extends qr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class X0 extends qr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Ff extends qr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class zT extends tt{constructor(){super(...arguments),this.tokenType="~="}}class IT extends tt{constructor(){super(...arguments),this.tokenType="|="}}class BT extends tt{constructor(){super(...arguments),this.tokenType="^="}}class PT extends tt{constructor(){super(...arguments),this.tokenType="$="}}class qT extends tt{constructor(){super(...arguments),this.tokenType="*="}}class Y0 extends tt{constructor(){super(...arguments),this.tokenType="||"}}class hc extends tt{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class St extends tt{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=ut(e)}toString(){return"DELIM("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}toSource(){return this.value==="\\"?`\\
|
|
52
|
+
`:this.value}}class Ur extends tt{constructor(){super(...arguments),this.value=""}ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}}class Gf extends Ur{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return Na(this.value)}}class pa extends Ur{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return Na(this.value)+"("}}class K0 extends Ur{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+Na(this.value)}}class W0 extends Ur{constructor(e){super(),this.tokenType="HASH",this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+Na(this.value):"#"+VT(this.value)}}class Xf extends Ur{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+ev(this.value)+'"'}}class J0 extends Ur{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+ev(this.value)+'")'}}class Z0 extends tt{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}}class Q0 extends tt{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}}class UT extends tt{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){const e=this.repr;let t=Na(this.unit);return t[0].toLowerCase()==="e"&&(t[1]==="-"||ot(t.charCodeAt(1),48,57))&&(t="\\65 "+t.slice(1,t.length)),e+t}}function Na(i){i=""+i;let e="";const t=i.charCodeAt(0);for(let n=0;n<i.length;n++){const o=i.charCodeAt(n);if(o===0)throw new Vf("Invalid character: the input contains U+0000.");ot(o,1,31)||o===127||n===0&&ot(o,48,57)||n===1&&ot(o,48,57)&&t===45?e+="\\"+o.toString(16)+" ":o>=128||o===45||o===95||ot(o,48,57)||ot(o,65,90)||ot(o,97,122)?e+=i[n]:e+="\\"+i[n]}return e}function VT(i){i=""+i;let e="";for(let t=0;t<i.length;t++){const n=i.charCodeAt(t);if(n===0)throw new Vf("Invalid character: the input contains U+0000.");n>=128||n===45||n===95||ot(n,48,57)||ot(n,65,90)||ot(n,97,122)?e+=i[t]:e+="\\"+n.toString(16)+" "}return e}function ev(i){i=""+i;let e="";for(let t=0;t<i.length;t++){const n=i.charCodeAt(t);if(n===0)throw new Vf("Invalid character: the input contains U+0000.");ot(n,1,31)||n===127?e+="\\"+n.toString(16)+" ":n===34||n===92?e+="\\"+i[t]:e+=i[t]}return e}class It extends Error{}function FT(i,e){let t;try{t=$0(i),t[t.length-1]instanceof hc||t.push(new hc)}catch(O){const Q=O.message+` while parsing css selector "${i}". Did you mean to CSS.escape it?`,se=(O.stack||"").indexOf(O.message);throw se!==-1&&(O.stack=O.stack.substring(0,se)+Q+O.stack.substring(se+O.message.length)),O.message=Q,O}const n=t.find(O=>O instanceof K0||O instanceof z0||O instanceof dc||O instanceof Y0||O instanceof I0||O instanceof B0||O instanceof q0||O instanceof V0||O instanceof F0||O instanceof J0||O instanceof Q0);if(n)throw new It(`Unsupported token "${n.toSource()}" while parsing css selector "${i}". Did you mean to CSS.escape it?`);let o=0;const a=new Set;function c(){return new It(`Unexpected token "${t[o].toSource()}" while parsing css selector "${i}". Did you mean to CSS.escape it?`)}function u(){for(;t[o]instanceof kc;)o++}function h(O=o){return t[O]instanceof Gf}function f(O=o){return t[O]instanceof Xf}function y(O=o){return t[O]instanceof Z0}function m(O=o){return t[O]instanceof U0}function _(O=o){return t[O]instanceof X0}function b(O=o){return t[O]instanceof Ff}function S(O=o){return t[O]instanceof pa}function v(O=o){return t[O]instanceof St&&t[O].value==="*"}function x(O=o){return t[O]instanceof hc}function E(O=o){return t[O]instanceof St&&[">","+","~"].includes(t[O].value)}function C(O=o){return m(O)||b(O)||x(O)||E(O)||t[O]instanceof kc}function L(){const O=[R()];for(;u(),!!m();)o++,O.push(R());return O}function R(){return u(),y()||f()?t[o++].value:N()}function N(){const O={simples:[]};for(u(),E()?O.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):O.simples.push({selector:V(),combinator:""});;){if(u(),E())O.simples[O.simples.length-1].combinator=t[o++].value,u();else if(C())break;O.simples.push({combinator:"",selector:V()})}return O}function V(){let O="";const Q=[];for(;!C();)if(h()||v())O+=t[o++].toSource();else if(t[o]instanceof W0)O+=t[o++].toSource();else if(t[o]instanceof St&&t[o].value===".")if(o++,h())O+="."+t[o++].toSource();else throw c();else if(t[o]instanceof P0)if(o++,h())if(!e.has(t[o].value.toLowerCase()))O+=":"+t[o++].toSource();else{const se=t[o++].value.toLowerCase();Q.push({name:se,args:[]}),a.add(se)}else if(S()){const se=t[o++].value.toLowerCase();if(e.has(se)?(Q.push({name:se,args:L()}),a.add(se)):O+=`:${se}(${I()})`,u(),!b())throw c();o++}else throw c();else if(t[o]instanceof G0){for(O+="[",o++;!(t[o]instanceof bf)&&!x();)O+=t[o++].toSource();if(!(t[o]instanceof bf))throw c();O+="]",o++}else throw c();if(!O&&!Q.length)throw c();return{css:O||void 0,functions:Q}}function I(){let O="",Q=1;for(;!x()&&((_()||S())&&Q++,b()&&Q--,!!Q);)O+=t[o++].toSource();return O}const B=L();if(!x())throw c();if(B.some(O=>typeof O!="object"||!("simples"in O)))throw new It(`Error while parsing css selector "${i}". Did you mean to CSS.escape it?`);return{selector:B,names:Array.from(a)}}const vf=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),GT=new Set(["left-of","right-of","above","below","near"]),tv=new Set(["not","is","where","has","scope","light","visible","text","text-matches","text-is","has-text","above","below","right-of","left-of","near","nth-match"]);function Ma(i){const e=KT(i),t=[];for(const n of e.parts){if(n.name==="css"||n.name==="css:light"){n.name==="css:light"&&(n.body=":light("+n.body+")");const o=FT(n.body,tv);t.push({name:"css",body:o.selector,source:n.body});continue}if(vf.has(n.name)){let o,a;try{const f=JSON.parse("["+n.body+"]");if(!Array.isArray(f)||f.length<1||f.length>2||typeof f[0]!="string")throw new It(`Malformed selector: ${n.name}=`+n.body);if(o=f[0],f.length===2){if(typeof f[1]!="number"||!GT.has(n.name))throw new It(`Malformed selector: ${n.name}=`+n.body);a=f[1]}}catch{throw new It(`Malformed selector: ${n.name}=`+n.body)}const c={name:n.name,source:n.body,body:{parsed:Ma(o),distance:a}},u=[...c.body.parsed.parts].reverse().find(f=>f.name==="internal:control"&&f.body==="enter-frame"),h=u?c.body.parsed.parts.indexOf(u):-1;h!==-1&&XT(c.body.parsed.parts.slice(0,h+1),t.slice(0,h+1))&&c.body.parsed.parts.splice(0,h+1),t.push(c);continue}t.push({...n,source:n.body})}if(vf.has(t[0].name))throw new It(`"${t[0].name}" selector cannot be first`);return{capture:e.capture,parts:t}}function XT(i,e){return $n({parts:i})===$n({parts:e})}function $n(i,e){return typeof i=="string"?i:i.parts.map((t,n)=>{let o=!0;!e&&n!==i.capture&&(t.name==="css"||t.name==="xpath"&&t.source.startsWith("//")||t.source.startsWith(".."))&&(o=!1);const a=o?t.name+"=":"";return`${n===i.capture?"*":""}${a}${t.source}`}).join(" >> ")}function YT(i,e){const t=(n,o)=>{for(const a of n.parts)e(a,o),vf.has(a.name)&&t(a.body.parsed,!0)};t(i,!1)}function KT(i){let e=0,t,n=0;const o={parts:[]},a=()=>{const u=i.substring(n,e).trim(),h=u.indexOf("=");let f,y;h!==-1&&u.substring(0,h).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(f=u.substring(0,h).trim(),y=u.substring(h+1)):u.length>1&&u[0]==='"'&&u[u.length-1]==='"'||u.length>1&&u[0]==="'"&&u[u.length-1]==="'"?(f="text",y=u):/^\(*\/\//.test(u)||u.startsWith("..")?(f="xpath",y=u):(f="css",y=u);let m=!1;if(f[0]==="*"&&(m=!0,f=f.substring(1)),o.parts.push({name:f,body:y}),m){if(o.capture!==void 0)throw new It("Only one of the selectors can capture using * modifier");o.capture=o.parts.length-1}};if(!i.includes(">>"))return e=i.length,a(),o;const c=()=>{const h=i.substring(n,e).match(/^\s*text\s*=(.*)$/);return!!h&&!!h[1]};for(;e<i.length;){const u=i[e];u==="\\"&&e+1<i.length?e+=2:u===t?(t=void 0,e++):!t&&(u==='"'||u==="'"||u==="`")&&!c()?(t=u,e++):!t&&u===">"&&i[e+1]===">"?(a(),e+=2,n=e):e++}return a(),o}function ks(i,e){let t=0,n=i.length===0;const o=()=>i[t]||"",a=()=>{const x=o();return++t,n=t>=i.length,x},c=x=>{throw n?new It(`Unexpected end of selector while parsing selector \`${i}\``):new It(`Error while parsing selector \`${i}\` - unexpected symbol "${o()}" at position ${t}`+(x?" during "+x:""))};function u(){for(;!n&&/\s/.test(o());)a()}function h(x){return x>=""||x>="0"&&x<="9"||x>="A"&&x<="Z"||x>="a"&&x<="z"||x>="0"&&x<="9"||x==="_"||x==="-"}function f(){let x="";for(u();!n&&h(o());)x+=a();return x}function y(x){let E=a();for(E!==x&&c("parsing quoted string");!n&&o()!==x;)o()==="\\"&&a(),E+=a();return o()!==x&&c("parsing quoted string"),E+=a(),E}function m(){a()!=="/"&&c("parsing regular expression");let x="",E=!1;for(;!n;){if(o()==="\\")x+=a(),n&&c("parsing regular expression");else if(E&&o()==="]")E=!1;else if(!E&&o()==="[")E=!0;else if(!E&&o()==="/")break;x+=a()}a()!=="/"&&c("parsing regular expression");let C="";for(;!n&&o().match(/[dgimsuy]/);)C+=a();try{return new RegExp(x,C)}catch(L){throw new It(`Error while parsing selector \`${i}\`: ${L.message}`)}}function _(){let x="";return u(),o()==="'"||o()==='"'?x=y(o()).slice(1,-1):x=f(),x||c("parsing property path"),x}function b(){u();let x="";return n||(x+=a()),!n&&x!=="="&&(x+=a()),["=","*=","^=","$=","|=","~="].includes(x)||c("parsing operator"),x}function S(){a();const x=[];for(x.push(_()),u();o()===".";)a(),x.push(_()),u();if(o()==="]")return a(),{name:x.join("."),jsonPath:x,op:"<truthy>",value:null,caseSensitive:!1};const E=b();let C,L=!0;if(u(),o()==="/"){if(E!=="=")throw new It(`Error while parsing selector \`${i}\` - cannot use ${E} in attribute with regular expression`);C=m()}else if(o()==="'"||o()==='"')C=y(o()).slice(1,-1),u(),o()==="i"||o()==="I"?(L=!1,a()):(o()==="s"||o()==="S")&&(L=!0,a());else{for(C="";!n&&(h(o())||o()==="+"||o()===".");)C+=a();C==="true"?C=!0:C==="false"?C=!1:e||(C=+C,Number.isNaN(C)&&c("parsing attribute value"))}if(u(),o()!=="]"&&c("parsing attribute value"),a(),E!=="="&&typeof C!="string")throw new It(`Error while parsing selector \`${i}\` - cannot use ${E} in attribute with non-string matching value - ${C}`);return{name:x.join("."),jsonPath:x,op:E,value:C,caseSensitive:L}}const v={name:"",attributes:[]};for(v.name=f(),u();o()==="[";)v.attributes.push(S()),u();if(n||c(void 0),!v.name&&!v.attributes.length)throw new It(`Error while parsing selector \`${i}\` - selector cannot be empty`);return v}function Vc(i,e="'"){const t=JSON.stringify(i),n=t.substring(1,t.length-1).replace(/\\"/g,'"');if(e==="'")return e+n.replace(/[']/g,"\\'")+e;if(e==='"')return e+n.replace(/["]/g,'\\"')+e;if(e==="`")return e+n.replace(/[`]/g,"\\`")+e;throw new Error("Invalid escape char")}function Nc(i){return i.charAt(0).toUpperCase()+i.substring(1)}function nv(i){return i.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function qi(i){return`"${i.replace(/["\\]/g,e=>"\\"+e)}"`}let bs;function WT(){bs=new Map}function Mt(i){let e=bs==null?void 0:bs.get(i);return e===void 0&&(e=i.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),bs==null||bs.set(i,e)),e}function Fc(i){return i.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function iv(i){return i.unicode||i.unicodeSets?String(i):String(i).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Bt(i,e){return typeof i!="string"?iv(i):`${JSON.stringify(i)}${e?"s":"i"}`}function Pt(i,e){return typeof i!="string"?iv(i):`"${i.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function JT(i,e,t=""){if(i.length<=e)return i;const n=[...i];return n.length>e?n.slice(0,e-t.length).join("")+t:n.join("")}function Q_(i,e){return JT(i,e,"…")}function wa(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ZT(i,e){const t=i.length,n=e.length;let o=0,a=0;const c=Array(t+1).fill(null).map(()=>Array(n+1).fill(0));for(let u=1;u<=t;u++)for(let h=1;h<=n;h++)i[u-1]===e[h-1]&&(c[u][h]=c[u-1][h-1]+1,c[u][h]>o&&(o=c[u][h],a=u));return i.slice(a-o,a)}function QT(i,e){try{const t=Ma(e),n=eE(t);return n||ws(new rv[i],t,!1,1)[0]}catch{return e}}function eE(i){const e=i.parts[i.parts.length-1];if((e==null?void 0:e.name)==="internal:describe"){const t=JSON.parse(e.body);if(typeof t=="string")return t}}function Yi(i,e,t=!1){return sv(i,e,t,1)[0]}function sv(i,e,t=!1,n=20,o){try{return ws(new rv[i](o),Ma(e),t,n)}catch{return[e]}}function ws(i,e,t=!1,n=20){const o=[...e.parts],a=[];let c=t?"frame-locator":"page";for(let u=0;u<o.length;u++){const h=o[u],f=c;if(c="locator",h.name==="internal:describe")continue;if(h.name==="nth"){h.body==="0"?a.push([i.generateLocator(f,"first",""),i.generateLocator(f,"nth","0")]):h.body==="-1"?a.push([i.generateLocator(f,"last",""),i.generateLocator(f,"nth","-1")]):a.push([i.generateLocator(f,"nth",h.body)]);continue}if(h.name==="visible"){a.push([i.generateLocator(f,"visible",h.body),i.generateLocator(f,"default",`visible=${h.body}`)]);continue}if(h.name==="internal:text"){const{exact:S,text:v}=Wo(h.body);a.push([i.generateLocator(f,"text",v,{exact:S})]);continue}if(h.name==="internal:has-text"){const{exact:S,text:v}=Wo(h.body);if(!S){a.push([i.generateLocator(f,"has-text",v,{exact:S})]);continue}}if(h.name==="internal:has-not-text"){const{exact:S,text:v}=Wo(h.body);if(!S){a.push([i.generateLocator(f,"has-not-text",v,{exact:S})]);continue}}if(h.name==="internal:has"){const S=ws(i,h.body.parsed,!1,n);a.push(S.map(v=>i.generateLocator(f,"has",v)));continue}if(h.name==="internal:has-not"){const S=ws(i,h.body.parsed,!1,n);a.push(S.map(v=>i.generateLocator(f,"hasNot",v)));continue}if(h.name==="internal:and"){const S=ws(i,h.body.parsed,!1,n);a.push(S.map(v=>i.generateLocator(f,"and",v)));continue}if(h.name==="internal:or"){const S=ws(i,h.body.parsed,!1,n);a.push(S.map(v=>i.generateLocator(f,"or",v)));continue}if(h.name==="internal:chain"){const S=ws(i,h.body.parsed,!1,n);a.push(S.map(v=>i.generateLocator(f,"chain",v)));continue}if(h.name==="internal:label"){const{exact:S,text:v}=Wo(h.body);a.push([i.generateLocator(f,"label",v,{exact:S})]);continue}if(h.name==="internal:role"){const S=ks(h.body,!0),v={attrs:[]};for(const x of S.attributes)x.name==="name"?(v.exact=x.caseSensitive,v.name=x.value):(x.name==="level"&&typeof x.value=="string"&&(x.value=+x.value),v.attrs.push({name:x.name==="include-hidden"?"includeHidden":x.name,value:x.value}));a.push([i.generateLocator(f,"role",S.name,v)]);continue}if(h.name==="internal:testid"){const S=ks(h.body,!0),{value:v}=S.attributes[0];a.push([i.generateLocator(f,"test-id",v)]);continue}if(h.name==="internal:attr"){const S=ks(h.body,!0),{name:v,value:x,caseSensitive:E}=S.attributes[0],C=x,L=!!E;if(v==="placeholder"){a.push([i.generateLocator(f,"placeholder",C,{exact:L})]);continue}if(v==="alt"){a.push([i.generateLocator(f,"alt",C,{exact:L})]);continue}if(v==="title"){a.push([i.generateLocator(f,"title",C,{exact:L})]);continue}}if(h.name==="internal:control"&&h.body==="enter-frame"){const S=a[a.length-1],v=o[u-1],x=S.map(E=>i.chainLocators([E,i.generateLocator(f,"frame","")]));["xpath","css"].includes(v.name)&&x.push(i.generateLocator(f,"frame-locator",$n({parts:[v]})),i.generateLocator(f,"frame-locator",$n({parts:[v]},!0))),S.splice(0,S.length,...x),c="frame-locator";continue}const y=o[u+1],m=$n({parts:[h]}),_=i.generateLocator(f,"default",m);if(y&&["internal:has-text","internal:has-not-text"].includes(y.name)){const{exact:S,text:v}=Wo(y.body);if(!S){const x=i.generateLocator("locator",y.name==="internal:has-text"?"has-text":"has-not-text",v,{exact:S}),E={};y.name==="internal:has-text"?E.hasText=v:E.hasNotText=v;const C=i.generateLocator(f,"default",m,E);a.push([i.chainLocators([_,x]),C]),u++;continue}}let b;if(["xpath","css"].includes(h.name)){const S=$n({parts:[h]},!0);b=i.generateLocator(f,"default",S)}a.push([_,b].filter(Boolean))}return tE(i,a,n)}function tE(i,e,t){const n=e.map(()=>""),o=[],a=c=>{if(c===e.length)return o.push(i.chainLocators(n)),o.length<t;for(const u of e[c])if(n[c]=u,!a(c+1))return!1;return!0};return a(0),o}function Wo(i){let e=!1;const t=i.match(/^\/(.*)\/([igm]*)$/);return t?{text:new RegExp(t[1],t[2])}:(i.endsWith('"')?(i=JSON.parse(i),e=!0):i.endsWith('"s')?(i=JSON.parse(i.substring(0,i.length-1)),e=!0):i.endsWith('"i')&&(i=JSON.parse(i.substring(0,i.length-1)),e=!1),{exact:e,text:i})}class nE{constructor(e){this.preferredQuote=e}generateLocator(e,t,n,o={}){switch(t){case"default":return o.hasText!==void 0?`locator(${this.quote(n)}, { hasText: ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`locator(${this.quote(n)}, { hasNotText: ${this.toHasText(o.hasNotText)} })`:`locator(${this.quote(n)})`;case"frame-locator":return`frameLocator(${this.quote(n)})`;case"frame":return"contentFrame()";case"nth":return`nth(${n})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${n==="true"?"true":"false"} })`;case"role":const a=[];Ze(o.name)?a.push(`name: ${this.regexToSourceString(o.name)}`):typeof o.name=="string"&&(a.push(`name: ${this.quote(o.name)}`),o.exact&&a.push("exact: true"));for(const{name:u,value:h}of o.attrs)a.push(`${u}: ${typeof h=="string"?this.quote(h):h}`);const c=a.length?`, { ${a.join(", ")} }`:"";return`getByRole(${this.quote(n)}${c})`;case"has-text":return`filter({ hasText: ${this.toHasText(n)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(n)} })`;case"has":return`filter({ has: page.${n} })`;case"hasNot":return`filter({ hasNot: page.${n} })`;case"and":return`and(page.${n})`;case"or":return`or(page.${n})`;case"chain":return`locator(${n})`;case"test-id":return`getByTestId(${this.toTestIdValue(n)})`;case"text":return this.toCallWithExact("getByText",n,!!o.exact);case"alt":return this.toCallWithExact("getByAltText",n,!!o.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",n,!!o.exact);case"label":return this.toCallWithExact("getByLabel",n,!!o.exact);case"title":return this.toCallWithExact("getByTitle",n,!!o.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return Fc(String(e))}toCallWithExact(e,t,n){return Ze(t)?`${e}(${this.regexToSourceString(t)})`:n?`${e}(${this.quote(t)}, { exact: true })`:`${e}(${this.quote(t)})`}toHasText(e){return Ze(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return Ze(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return Vc(e,this.preferredQuote??"'")}}class iE{generateLocator(e,t,n,o={}){switch(t){case"default":return o.hasText!==void 0?`locator(${this.quote(n)}, has_text=${this.toHasText(o.hasText)})`:o.hasNotText!==void 0?`locator(${this.quote(n)}, has_not_text=${this.toHasText(o.hasNotText)})`:`locator(${this.quote(n)})`;case"frame-locator":return`frame_locator(${this.quote(n)})`;case"frame":return"content_frame";case"nth":return`nth(${n})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${n==="true"?"True":"False"})`;case"role":const a=[];Ze(o.name)?a.push(`name=${this.regexToString(o.name)}`):typeof o.name=="string"&&(a.push(`name=${this.quote(o.name)}`),o.exact&&a.push("exact=True"));for(const{name:u,value:h}of o.attrs){let f=typeof h=="string"?this.quote(h):h;typeof h=="boolean"&&(f=h?"True":"False"),a.push(`${nv(u)}=${f}`)}const c=a.length?`, ${a.join(", ")}`:"";return`get_by_role(${this.quote(n)}${c})`;case"has-text":return`filter(has_text=${this.toHasText(n)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(n)})`;case"has":return`filter(has=page.${n})`;case"hasNot":return`filter(has_not=page.${n})`;case"and":return`and_(page.${n})`;case"or":return`or_(page.${n})`;case"chain":return`locator(${n})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(n)})`;case"text":return this.toCallWithExact("get_by_text",n,!!o.exact);case"alt":return this.toCallWithExact("get_by_alt_text",n,!!o.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",n,!!o.exact);case"label":return this.toCallWithExact("get_by_label",n,!!o.exact);case"title":return this.toCallWithExact("get_by_title",n,!!o.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToString(e){const t=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${Fc(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${t})`}toCallWithExact(e,t,n){return Ze(t)?`${e}(${this.regexToString(t)})`:n?`${e}(${this.quote(t)}, exact=True)`:`${e}(${this.quote(t)})`}toHasText(e){return Ze(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return Ze(e)?this.regexToString(e):this.quote(e)}quote(e){return Vc(e,'"')}}class sE{generateLocator(e,t,n,o={}){let a;switch(e){case"page":a="Page";break;case"frame-locator":a="FrameLocator";break;case"locator":a="Locator";break}switch(t){case"default":return o.hasText!==void 0?`locator(${this.quote(n)}, new ${a}.LocatorOptions().setHasText(${this.toHasText(o.hasText)}))`:o.hasNotText!==void 0?`locator(${this.quote(n)}, new ${a}.LocatorOptions().setHasNotText(${this.toHasText(o.hasNotText)}))`:`locator(${this.quote(n)})`;case"frame-locator":return`frameLocator(${this.quote(n)})`;case"frame":return"contentFrame()";case"nth":return`nth(${n})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${a}.FilterOptions().setVisible(${n==="true"?"true":"false"}))`;case"role":const c=[];Ze(o.name)?c.push(`.setName(${this.regexToString(o.name)})`):typeof o.name=="string"&&(c.push(`.setName(${this.quote(o.name)})`),o.exact&&c.push(".setExact(true)"));for(const{name:h,value:f}of o.attrs)c.push(`.set${Nc(h)}(${typeof f=="string"?this.quote(f):f})`);const u=c.length?`, new ${a}.GetByRoleOptions()${c.join("")}`:"";return`getByRole(AriaRole.${nv(n).toUpperCase()}${u})`;case"has-text":return`filter(new ${a}.FilterOptions().setHasText(${this.toHasText(n)}))`;case"has-not-text":return`filter(new ${a}.FilterOptions().setHasNotText(${this.toHasText(n)}))`;case"has":return`filter(new ${a}.FilterOptions().setHas(page.${n}))`;case"hasNot":return`filter(new ${a}.FilterOptions().setHasNot(page.${n}))`;case"and":return`and(page.${n})`;case"or":return`or(page.${n})`;case"chain":return`locator(${n})`;case"test-id":return`getByTestId(${this.toTestIdValue(n)})`;case"text":return this.toCallWithExact(a,"getByText",n,!!o.exact);case"alt":return this.toCallWithExact(a,"getByAltText",n,!!o.exact);case"placeholder":return this.toCallWithExact(a,"getByPlaceholder",n,!!o.exact);case"label":return this.toCallWithExact(a,"getByLabel",n,!!o.exact);case"title":return this.toCallWithExact(a,"getByTitle",n,!!o.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToString(e){const t=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(Fc(e.source))}${t})`}toCallWithExact(e,t,n,o){return Ze(n)?`${t}(${this.regexToString(n)})`:o?`${t}(${this.quote(n)}, new ${e}.${Nc(t)}Options().setExact(true))`:`${t}(${this.quote(n)})`}toHasText(e){return Ze(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return Ze(e)?this.regexToString(e):this.quote(e)}quote(e){return Vc(e,'"')}}class rE{generateLocator(e,t,n,o={}){switch(t){case"default":return o.hasText!==void 0?`Locator(${this.quote(n)}, new() { ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`Locator(${this.quote(n)}, new() { ${this.toHasNotText(o.hasNotText)} })`:`Locator(${this.quote(n)})`;case"frame-locator":return`FrameLocator(${this.quote(n)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${n})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${n==="true"?"true":"false"} })`;case"role":const a=[];Ze(o.name)?a.push(`NameRegex = ${this.regexToString(o.name)}`):typeof o.name=="string"&&(a.push(`Name = ${this.quote(o.name)}`),o.exact&&a.push("Exact = true"));for(const{name:u,value:h}of o.attrs)a.push(`${Nc(u)} = ${typeof h=="string"?this.quote(h):h}`);const c=a.length?`, new() { ${a.join(", ")} }`:"";return`GetByRole(AriaRole.${Nc(n)}${c})`;case"has-text":return`Filter(new() { ${this.toHasText(n)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(n)} })`;case"has":return`Filter(new() { Has = Page.${n} })`;case"hasNot":return`Filter(new() { HasNot = Page.${n} })`;case"and":return`And(Page.${n})`;case"or":return`Or(Page.${n})`;case"chain":return`Locator(${n})`;case"test-id":return`GetByTestId(${this.toTestIdValue(n)})`;case"text":return this.toCallWithExact("GetByText",n,!!o.exact);case"alt":return this.toCallWithExact("GetByAltText",n,!!o.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",n,!!o.exact);case"label":return this.toCallWithExact("GetByLabel",n,!!o.exact);case"title":return this.toCallWithExact("GetByTitle",n,!!o.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToString(e){const t=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(Fc(e.source))}${t})`}toCallWithExact(e,t,n){return Ze(t)?`${e}(${this.regexToString(t)})`:n?`${e}(${this.quote(t)}, new() { Exact = true })`:`${e}(${this.quote(t)})`}toHasText(e){return Ze(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return Ze(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return Ze(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return Vc(e,'"')}}class oE{generateLocator(e,t,n,o={}){return JSON.stringify({kind:t,body:fc(n),options:aE(o)})}chainLocators(e){const t=e.map(n=>JSON.parse(n));for(let n=0;n<t.length-1;++n)t[n].next=t[n+1];return JSON.stringify(t[0])}}function fc(i){return Ze(i)?`/${i.source}/${i.flags}`:i}function aE(i){const e={...i};return Ze(e.name)&&(e.name=fc(e.name)),Ze(e.hasText)&&(e.hasText=fc(e.hasText)),Ze(e.hasNotText)&&(e.hasNotText=fc(e.hasNotText)),e}const rv={javascript:nE,python:iE,java:sE,csharp:rE,jsonl:oE};function Ze(i){return i instanceof RegExp}const eb=new Map;function lE({name:i,rootItem:e,render:t,title:n,icon:o,isError:a,isVisible:c,selectedItem:u,onAccepted:h,onSelected:f,onHighlighted:y,treeState:m,setTreeState:_,noItemsMessage:b,dataTestId:S,autoExpandDepth:v}){const x=q.useMemo(()=>cE(e,u,m.expandedItems,v||0,c),[e,u,m,v,c]),E=q.useRef(null),[C,L]=q.useState(),[R,N]=q.useState(!1);q.useEffect(()=>{y==null||y(C)},[y,C]),q.useEffect(()=>{const B=E.current;if(!B)return;const O=()=>{eb.set(i,B.scrollTop)};return B.addEventListener("scroll",O,{passive:!0}),()=>B.removeEventListener("scroll",O)},[i]),q.useEffect(()=>{E.current&&(E.current.scrollTop=eb.get(i)||0)},[i]);const V=q.useCallback(B=>{const{expanded:O}=x.get(B);if(O){for(let Q=u;Q;Q=Q.parent)if(Q===B){f==null||f(B);break}m.expandedItems.set(B.id,!1)}else m.expandedItems.set(B.id,!0);_({...m})},[x,u,f,m,_]),I=q.useCallback(B=>{const{expanded:O}=x.get(B),Q=[B];for(;Q.length;){const se=Q.pop();Q.push(...se.children),m.expandedItems.set(se.id,!O)}_({...m})},[x,m,_]);return T.jsx("div",{className:et("tree-view vbox",i+"-tree-view"),"data-testid":S||i+"-tree",children:T.jsxs("div",{className:et("tree-view-content"),role:x.size>0?"tree":void 0,tabIndex:0,onKeyDown:B=>{if(u&&B.key==="Enter"){h==null||h(u);return}if(B.key!=="ArrowDown"&&B.key!=="ArrowUp"&&B.key!=="ArrowLeft"&&B.key!=="ArrowRight")return;if(B.stopPropagation(),B.preventDefault(),u&&B.key==="ArrowLeft"){const{expanded:Q,parent:se}=x.get(u);Q?(m.expandedItems.set(u.id,!1),_({...m})):se&&(f==null||f(se));return}if(u&&B.key==="ArrowRight"){u.children.length&&(m.expandedItems.set(u.id,!0),_({...m}));return}let O=u;if(B.key==="ArrowDown"&&(u?O=x.get(u).next:x.size&&(O=[...x.keys()][0])),B.key==="ArrowUp"){if(u)O=x.get(u).prev;else if(x.size){const Q=[...x.keys()];O=Q[Q.length-1]}}y==null||y(void 0),O&&(N(!0),f==null||f(O)),L(void 0)},ref:E,children:[b&&x.size===0&&T.jsx("div",{className:"tree-view-empty",children:b}),e.children.map(B=>x.get(B)&&T.jsx(ov,{item:B,treeItems:x,selectedItem:u,onSelected:f,onAccepted:h,isError:a,toggleExpanded:V,toggleSubtree:I,highlightedItem:C,setHighlightedItem:L,render:t,icon:o,title:n,isKeyboardNavigation:R,setIsKeyboardNavigation:N},B.id))]})})}function ov({item:i,treeItems:e,selectedItem:t,onSelected:n,highlightedItem:o,setHighlightedItem:a,isError:c,onAccepted:u,toggleExpanded:h,toggleSubtree:f,render:y,title:m,icon:_,isKeyboardNavigation:b,setIsKeyboardNavigation:S}){const v=q.useId(),x=q.useRef(null);q.useEffect(()=>{t===i&&b&&x.current&&(C0(x.current),S(!1))},[i,t,b,S]);const E=e.get(i),C=E.depth,L=E.expanded;let R="codicon-blank";typeof L=="boolean"&&(R=L?"codicon-chevron-down":"codicon-chevron-right");const N=y(i),V=L&&i.children.length?i.children:[],I=m==null?void 0:m(i),B=(_==null?void 0:_(i))||"codicon-blank";return T.jsxs("div",{ref:x,role:"treeitem","aria-selected":i===t,"aria-expanded":L,"aria-controls":v,title:I,className:"vbox",style:{flex:"none"},children:[T.jsxs("div",{onDoubleClick:()=>u==null?void 0:u(i),className:et("tree-view-entry",t===i&&"selected",o===i&&"highlighted",(c==null?void 0:c(i))&&"error"),onClick:()=>n==null?void 0:n(i),onMouseEnter:()=>a(i),onMouseLeave:()=>a(void 0),children:[C?new Array(C).fill(0).map((O,Q)=>T.jsx("div",{className:"tree-view-indent"},"indent-"+Q)):void 0,T.jsx("div",{"aria-hidden":"true",className:"codicon "+R,style:{minWidth:16,marginRight:4},onDoubleClick:O=>{O.preventDefault(),O.stopPropagation()},onClick:O=>{O.stopPropagation(),O.preventDefault(),O.altKey?f(i):h(i)}}),_&&T.jsx("div",{className:"codicon "+B,style:{minWidth:16,marginRight:4},"aria-label":"["+B.replace("codicon","icon")+"]"}),typeof N=="string"?T.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:N}):N]}),!!V.length&&T.jsx("div",{id:v,role:"group",children:V.map(O=>e.get(O)&&T.jsx(ov,{item:O,treeItems:e,selectedItem:t,onSelected:n,onAccepted:u,isError:c,toggleExpanded:h,toggleSubtree:f,highlightedItem:o,setHighlightedItem:a,render:y,title:m,icon:_,isKeyboardNavigation:b,setIsKeyboardNavigation:S},O.id))})]})}function cE(i,e,t,n,o=()=>!0){if(!o(i))return new Map;const a=new Map,c=new Set;for(let f=e==null?void 0:e.parent;f;f=f.parent)c.add(f.id);let u=null;const h=(f,y)=>{for(const m of f.children){if(!o(m))continue;const _=c.has(m.id)||t.get(m.id),b=n>y&&a.size<25&&_!==!1,S=m.children.length?_??b:void 0,v={depth:y,expanded:S,parent:i===f?null:f,next:null,prev:u};u&&(a.get(u).next=m),u=m,a.set(m,v),S&&h(m,y+1)}};return h(i,0),a}const Vt=q.forwardRef(function({children:e,title:t="",icon:n,disabled:o=!1,toggled:a=!1,onClick:c=()=>{},style:u,testId:h,className:f,ariaLabel:y},m){return T.jsxs("button",{ref:m,className:et(f,"toolbar-button",n,a&&"toggled"),onMouseDown:tb,onClick:c,onDoubleClick:tb,title:t,disabled:!!o,style:u,"data-testid":h,"aria-label":y||t,children:[n&&T.jsx("span",{className:`codicon codicon-${n}`,style:e?{marginRight:5}:{}}),e]})}),tb=i=>{i.stopPropagation(),i.preventDefault()};function av(i){return i==="scheduled"?"codicon-clock":i==="running"?"codicon-loading":i==="failed"?"codicon-error":i==="passed"?"codicon-check":i==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function uE(i){return i==="scheduled"?"Pending":i==="running"?"Running":i==="failed"?"Failed":i==="passed"?"Passed":i==="skipped"?"Skipped":"Did not run"}const dE=lE,hE=({actions:i,selectedAction:e,selectedTime:t,setSelectedTime:n,treeState:o,setTreeState:a,sdkLanguage:c,onSelected:u,onHighlighted:h,revealConsole:f,revealActionAttachment:y,isLive:m})=>{const{rootItem:_,itemMap:b}=q.useMemo(()=>j0(i),[i]),{selectedItem:S}=q.useMemo(()=>({selectedItem:e?b.get(e.callId):void 0}),[b,e]),v=q.useCallback(N=>{var V;return!!((V=N.action.error)!=null&&V.message)},[]),x=q.useCallback(N=>n({minimum:N.action.startTime,maximum:N.action.endTime}),[n]),E=q.useCallback(N=>{var I;const V=!!y&&!!((I=N.action.attachments)!=null&&I.length);return Yf(N.action,{sdkLanguage:c,revealConsole:f,revealActionAttachment:()=>y==null?void 0:y(N.action.callId),isLive:m,showDuration:!0,showBadges:!0,showAttachments:V})},[m,f,y,c]),C=q.useCallback(N=>!t||!N.action||N.action.startTime<=t.maximum&&N.action.endTime>=t.minimum,[t]),L=q.useCallback(N=>{u==null||u(N.action)},[u]),R=q.useCallback(N=>{h==null||h(N==null?void 0:N.action)},[h]);return T.jsxs("div",{className:"vbox",children:[t&&T.jsxs("div",{className:"action-list-show-all",onClick:()=>n(void 0),children:[T.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),T.jsx(dE,{name:"actions",rootItem:_,treeState:o,setTreeState:a,selectedItem:S,onSelected:L,onHighlighted:R,onAccepted:x,isError:v,isVisible:C,render:E})]})},Yf=(i,e)=>{var x;const{sdkLanguage:t,revealConsole:n,revealActionAttachment:o,isLive:a,showDuration:c,showBadges:u,showAttachments:h}=e,{errors:f,warnings:y}=AT(i),m=i.params.selector?QT(t||"javascript",i.params.selector):void 0,_=i.class==="Test"&&i.method==="test.step"&&((x=i.annotations)==null?void 0:x.some(E=>E.type==="skip"));let b="";i.endTime?b=Nt(i.endTime-i.startTime):i.error?b="Timed out":a||(b="-");const{elements:S,title:v}=lv(i);return T.jsxs("div",{className:"action-title vbox",children:[T.jsxs("div",{className:"hbox",children:[T.jsx("span",{className:"action-title-method",title:v,children:S}),(c||u||h||_)&&T.jsx("div",{className:"spacer"}),h&&T.jsx(Vt,{icon:"attach",title:"Open Attachment",onClick:()=>o==null?void 0:o()}),c&&!_&&T.jsx("div",{className:"action-duration",children:b||T.jsx("span",{className:"codicon codicon-loading"})}),_&&T.jsx("span",{className:et("action-skipped","codicon",av("skipped")),title:"skipped"}),u&&T.jsxs("div",{className:"action-icons",onClick:()=>n==null?void 0:n(),children:[!!f&&T.jsxs("div",{className:"action-icon",children:[T.jsx("span",{className:"codicon codicon-error"}),T.jsx("span",{className:"action-icon-value",children:f})]}),!!y&&T.jsxs("div",{className:"action-icon",children:[T.jsx("span",{className:"codicon codicon-warning"}),T.jsx("span",{className:"action-icon-value",children:y})]})]})]}),m&&T.jsx("div",{className:"action-title-selector",title:m,children:m})]})};function lv(i){var u;let e=i.title??((u=Uf.get(i.class+"."+i.method))==null?void 0:u.title)??i.method;e=e.replace(/\n/g," ");const t=[],n=[];let o=0;const a=/\{([^}]+)\}/g;let c;for(;(c=a.exec(e))!==null;){const[h,f]=c,y=e.slice(o,c.index);t.push(y),n.push(y);const m=D0(i.params,f);m===void 0?(t.push(h),n.push(h)):c.index===0?(t.push(m),n.push(m)):(t.push(T.jsx("span",{className:"action-title-param",children:m},t.length)),n.push(m)),o=c.index+h.length}if(o<e.length){const h=e.slice(o);t.push(h),n.push(h)}return{elements:t,title:n.join("")}}const Kf=({value:i,description:e})=>{const[t,n]=q.useState("copy"),o=q.useCallback(()=>{(typeof i=="function"?i():Promise.resolve(i)).then(c=>{navigator.clipboard.writeText(c).then(()=>{n("check"),setTimeout(()=>{n("copy")},3e3)},()=>{n("close")})},()=>{n("close")})},[i]);return T.jsx(Vt,{title:e||"Copy",icon:t,onClick:o})},gc=({value:i,description:e,copiedDescription:t=e,style:n})=>{const[o,a]=q.useState(!1),c=q.useCallback(async()=>{const u=typeof i=="function"?await i():i;await navigator.clipboard.writeText(u),a(!0),setTimeout(()=>a(!1),3e3)},[i]);return T.jsx(Vt,{style:n,title:e,onClick:c,className:"copy-to-clipboard-text-button",children:o?t:e})},Ls=({text:i})=>T.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:i}),fE=({action:i,startTimeOffset:e,sdkLanguage:t})=>{const n=q.useMemo(()=>Object.keys((i==null?void 0:i.params)??{}).filter(u=>u!=="info"),[i]);if(!i)return T.jsx(Ls,{text:"No action selected"});const o=i.startTime-e,a=Nt(o),{title:c}=lv(i);return T.jsxs("div",{className:"call-tab",children:[T.jsx("div",{className:"call-line",children:c}),T.jsx("div",{className:"call-section",children:"Time"}),Jl({name:"start",type:"literal",text:a}),Jl({name:"duration",type:"literal",text:gE(i)}),!!n.length&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"call-section",children:"Parameters"}),n.map(u=>Jl(nb(i,u,i.params[u],t)))]}),!!i.result&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(i.result).map(u=>Jl(nb(i,u,i.result[u],t)))]})]})};function gE(i){return i.endTime?Nt(i.endTime-i.startTime):i.error?"Timed Out":"Running"}function Jl(i){let e=i.text.replace(/\n/g,"↵");return i.type==="string"&&(e=`"${e}"`),T.jsxs("div",{className:"call-line",children:[i.name,":",T.jsx("span",{className:et("call-value",i.type),title:i.text,children:e}),["literal","string","number","object","locator"].includes(i.type)&&T.jsx(Kf,{value:i.text})]},i.name)}function nb(i,e,t,n){const o=i.method.includes("eval")||i.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&o)&&(t=Mc(t.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&o||e==="received"&&i.method==="expect")&&(t=Mc(t,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:Yi(n||"javascript",i.params.selector),type:"locator",name:"locator"};const a=typeof t;return a!=="object"||t===null?{text:String(t),type:a,name:e}:t.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(t).slice(0,1e3),type:"object",name:e}}function Mc(i,e){if(i.n!==void 0)return i.n;if(i.s!==void 0)return i.s;if(i.b!==void 0)return i.b;if(i.v!==void 0){if(i.v==="undefined")return;if(i.v==="null")return null;if(i.v==="NaN")return NaN;if(i.v==="Infinity")return 1/0;if(i.v==="-Infinity")return-1/0;if(i.v==="-0")return-0}if(i.d!==void 0)return new Date(i.d);if(i.r!==void 0)return new RegExp(i.r.p,i.r.f);if(i.a!==void 0)return i.a.map(t=>Mc(t,e));if(i.o!==void 0){const t={};for(const{k:n,v:o}of i.o)t[n]=Mc(o,e);return t}return i.h!==void 0?e===void 0?"<object>":e[i.h]:"<object>"}const ib=new Map;function Gc({name:i,items:e=[],id:t,render:n,icon:o,isError:a,isWarning:c,isInfo:u,selectedItem:h,onAccepted:f,onSelected:y,onHighlighted:m,onIconClicked:_,noItemsMessage:b,dataTestId:S,notSelectable:v,ariaLabel:x}){const E=q.useRef(null),[C,L]=q.useState();return q.useEffect(()=>{m==null||m(C)},[m,C]),q.useEffect(()=>{const R=E.current;if(!R)return;const N=()=>{ib.set(i,R.scrollTop)};return R.addEventListener("scroll",N,{passive:!0}),()=>R.removeEventListener("scroll",N)},[i]),q.useEffect(()=>{E.current&&(E.current.scrollTop=ib.get(i)||0)},[i]),T.jsx("div",{className:et("list-view vbox",i+"-list-view"),role:e.length>0?"list":void 0,"aria-label":x,children:T.jsxs("div",{className:et("list-view-content",v&&"not-selectable"),tabIndex:0,onKeyDown:R=>{var B;if(h&&R.key==="Enter"){f==null||f(h,e.indexOf(h));return}if(R.key!=="ArrowDown"&&R.key!=="ArrowUp")return;R.stopPropagation(),R.preventDefault();const N=h?e.indexOf(h):-1;let V=N;R.key==="ArrowDown"&&(N===-1?V=0:V=Math.min(N+1,e.length-1)),R.key==="ArrowUp"&&(N===-1?V=e.length-1:V=Math.max(N-1,0));const I=(B=E.current)==null?void 0:B.children.item(V);C0(I||void 0),m==null||m(void 0),y==null||y(e[V],V),L(void 0)},ref:E,children:[b&&e.length===0&&T.jsx("div",{className:"list-view-empty",children:b}),e.map((R,N)=>{const V=n(R,N);return T.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(R,N),role:"listitem",className:et("list-view-entry",h===R&&"selected",!v&&C===R&&"highlighted",(a==null?void 0:a(R,N))&&"error",(c==null?void 0:c(R,N))&&"warning",(u==null?void 0:u(R,N))&&"info"),"aria-selected":h===R,onClick:()=>y==null?void 0:y(R,N),onMouseEnter:()=>L(R),onMouseLeave:()=>L(void 0),children:[o&&T.jsx("div",{className:"codicon "+(o(R,N)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:I=>{I.preventDefault(),I.stopPropagation()},onClick:I=>{I.stopPropagation(),I.preventDefault(),_==null||_(R,N)}}),typeof V=="string"?T.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:V}):V]},(t==null?void 0:t(R,N))||N)})]})})}const pE=Gc,mE=({action:i,isLive:e})=>{const t=q.useMemo(()=>{var c;if(!i||!i.log.length)return[];const n=i.log,o=i.context.wallTime-i.context.startTime,a=[];for(let u=0;u<n.length;++u){let h="";if(n[u].time!==-1){const f=(c=n[u])==null?void 0:c.time;u+1<n.length?h=Nt(n[u+1].time-f):i.endTime>0?h=Nt(i.endTime-f):e?h=Nt(Date.now()-o-f):h="-"}a.push({message:n[u].message,time:h})}return a},[i,e]);return t.length?T.jsx(pE,{name:"log",ariaLabel:"Log entries",items:t,render:n=>T.jsxs("div",{className:"log-list-item",children:[T.jsx("span",{className:"log-list-duration",children:n.time}),n.message]}),notSelectable:!0}):T.jsx(Ls,{text:"No log entries"})};function xa(i,e){const t=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,n=[];let o,a={},c=!1,u=e==null?void 0:e.fg,h=e==null?void 0:e.bg;for(;(o=t.exec(i))!==null;){const[,,f,,y]=o;if(f){const m=+f;switch(m){case 0:a={};break;case 1:a["font-weight"]="bold";break;case 2:a.opacity="0.8";break;case 3:a["font-style"]="italic";break;case 4:a["text-decoration"]="underline";break;case 7:c=!0;break;case 8:a.display="none";break;case 9:a["text-decoration"]="line-through";break;case 22:delete a["font-weight"],delete a["font-style"],delete a.opacity,delete a["text-decoration"];break;case 23:delete a["font-weight"],delete a["font-style"],delete a.opacity;break;case 24:delete a["text-decoration"];break;case 27:c=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:u=sb[m-30];break;case 39:u=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:h=sb[m-40];break;case 49:h=e==null?void 0:e.bg;break;case 53:a["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:u=rb[m-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:h=rb[m-100];break}}else if(y){const m={...a},_=c?h:u;_!==void 0&&(m.color=_);const b=c?u:h;b!==void 0&&(m["background-color"]=b),n.push(`<span style="${_E(m)}">${yE(y)}</span>`)}}return n.join("")}const sb={0:"var(--vscode-terminal-ansiBlack)",1:"var(--vscode-terminal-ansiRed)",2:"var(--vscode-terminal-ansiGreen)",3:"var(--vscode-terminal-ansiYellow)",4:"var(--vscode-terminal-ansiBlue)",5:"var(--vscode-terminal-ansiMagenta)",6:"var(--vscode-terminal-ansiCyan)",7:"var(--vscode-terminal-ansiWhite)"},rb={0:"var(--vscode-terminal-ansiBrightBlack)",1:"var(--vscode-terminal-ansiBrightRed)",2:"var(--vscode-terminal-ansiBrightGreen)",3:"var(--vscode-terminal-ansiBrightYellow)",4:"var(--vscode-terminal-ansiBrightBlue)",5:"var(--vscode-terminal-ansiBrightMagenta)",6:"var(--vscode-terminal-ansiBrightCyan)",7:"var(--vscode-terminal-ansiBrightWhite)"};function yE(i){return i.replace(/[&"<>]/g,e=>({"&":"&",'"':""","<":"<",">":">"})[e])}function _E(i){return Object.entries(i).map(([e,t])=>`${e}: ${t}`).join("; ")}const bE=({error:i})=>{const e=q.useMemo(()=>xa(i),[i]);return T.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},cv=({cursor:i,onPaneMouseMove:e,onPaneMouseUp:t,onPaneDoubleClick:n})=>(wt.useEffect(()=>{const o=document.createElement("div");return o.style.position="fixed",o.style.top="0",o.style.right="0",o.style.bottom="0",o.style.left="0",o.style.zIndex="9999",o.style.cursor=i,document.body.appendChild(o),e&&o.addEventListener("mousemove",e),t&&o.addEventListener("mouseup",t),n&&document.body.addEventListener("dblclick",n),()=>{e&&o.removeEventListener("mousemove",e),t&&o.removeEventListener("mouseup",t),n&&document.body.removeEventListener("dblclick",n),document.body.removeChild(o)}},[i,e,t,n]),T.jsx(T.Fragment,{})),vE={position:"absolute",top:0,right:0,bottom:0,left:0},uv=({orientation:i,offsets:e,setOffsets:t,resizerColor:n,resizerWidth:o,minColumnWidth:a})=>{const c=a||0,[u,h]=wt.useState(null),[f,y]=Ds(),m={position:"absolute",right:i==="horizontal"?void 0:0,bottom:i==="horizontal"?0:void 0,width:i==="horizontal"?7:void 0,height:i==="horizontal"?void 0:7,borderTopWidth:i==="horizontal"?void 0:(7-o)/2,borderRightWidth:i==="horizontal"?(7-o)/2:void 0,borderBottomWidth:i==="horizontal"?void 0:(7-o)/2,borderLeftWidth:i==="horizontal"?(7-o)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:i==="horizontal"?"ew-resize":"ns-resize"};return T.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-o)/2,zIndex:100,pointerEvents:"none"},ref:y,children:[!!u&&T.jsx(cv,{cursor:i==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>h(null),onPaneMouseMove:_=>{if(!_.buttons)h(null);else if(u){const b=i==="horizontal"?_.clientX-u.clientX:_.clientY-u.clientY,S=u.offset+b,v=u.index>0?e[u.index-1]:0,x=i==="horizontal"?f.width:f.height,E=Math.min(Math.max(v+c,S),x-c)-e[u.index];for(let C=u.index;C<e.length;++C)e[C]=e[C]+E;t([...e])}}}),e.map((_,b)=>T.jsx("div",{style:{...m,top:i==="horizontal"?0:_,left:i==="horizontal"?_:0,pointerEvents:"initial"},onMouseDown:S=>h({clientX:S.clientX,clientY:S.clientY,offset:_,index:b}),children:T.jsx("div",{style:{...vE,background:n}})},b))]})};async function $h(i){const e=new Image;return i&&(e.src=i,await new Promise((t,n)=>{e.onload=t,e.onerror=t})),e}const Sf={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
|
|
53
|
+
linear-gradient(-45deg, #80808020 25%, transparent 25%),
|
|
54
|
+
linear-gradient(45deg, transparent 75%, #80808020 75%),
|
|
55
|
+
linear-gradient(-45deg, transparent 75%, #80808020 75%)`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px",boxShadow:`rgb(0 0 0 / 10%) 0px 1.8px 1.9px,
|
|
56
|
+
rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
|
|
57
|
+
rgb(0 0 0 / 10%) 0px -2px 4px,
|
|
58
|
+
rgb(0 0 0 / 15%) 0px -6.1px 12px,
|
|
59
|
+
rgb(0 0 0 / 25%) 0px 6px 12px`},SE=({diff:i,noTargetBlank:e,hideDetails:t})=>{const[n,o]=q.useState(i.diff?"diff":"actual"),[a,c]=q.useState(!1),[u,h]=q.useState(null),[f,y]=q.useState("Expected"),[m,_]=q.useState(null),[b,S]=q.useState(null),[v,x]=Ds();q.useEffect(()=>{(async()=>{var O,Q,se,Y;h(await $h((O=i.expected)==null?void 0:O.attachment.path)),y(((Q=i.expected)==null?void 0:Q.title)||"Expected"),_(await $h((se=i.actual)==null?void 0:se.attachment.path)),S(await $h((Y=i.diff)==null?void 0:Y.attachment.path))})()},[i]);const E=u&&m&&b,C=E?Math.max(u.naturalWidth,m.naturalWidth,200):500,L=E?Math.max(u.naturalHeight,m.naturalHeight,200):500,R=Math.min(1,(v.width-30)/C),N=Math.min(1,(v.width-50)/C/2),V=C*R,I=L*R,B={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return T.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:x,children:E&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[i.diff&&T.jsx("div",{style:{...B,fontWeight:n==="diff"?600:"initial"},onClick:()=>o("diff"),children:"Diff"}),T.jsx("div",{style:{...B,fontWeight:n==="actual"?600:"initial"},onClick:()=>o("actual"),children:"Actual"}),T.jsx("div",{style:{...B,fontWeight:n==="expected"?600:"initial"},onClick:()=>o("expected"),children:f}),T.jsx("div",{style:{...B,fontWeight:n==="sxs"?600:"initial"},onClick:()=>o("sxs"),children:"Side by side"}),T.jsx("div",{style:{...B,fontWeight:n==="slider"?600:"initial"},onClick:()=>o("slider"),children:"Slider"})]}),T.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:I+60},children:[i.diff&&n==="diff"&&T.jsx(ai,{image:b,alt:"Diff",hideSize:t,canvasWidth:V,canvasHeight:I,scale:R}),i.diff&&n==="actual"&&T.jsx(ai,{image:m,alt:"Actual",hideSize:t,canvasWidth:V,canvasHeight:I,scale:R}),i.diff&&n==="expected"&&T.jsx(ai,{image:u,alt:f,hideSize:t,canvasWidth:V,canvasHeight:I,scale:R}),i.diff&&n==="slider"&&T.jsx(wE,{expectedImage:u,actualImage:m,hideSize:t,canvasWidth:V,canvasHeight:I,scale:R,expectedTitle:f}),i.diff&&n==="sxs"&&T.jsxs("div",{style:{display:"flex"},children:[T.jsx(ai,{image:u,title:f,hideSize:t,canvasWidth:N*C,canvasHeight:N*L,scale:N}),T.jsx(ai,{image:a?b:m,title:a?"Diff":"Actual",onClick:()=>c(!a),hideSize:t,canvasWidth:N*C,canvasHeight:N*L,scale:N})]}),!i.diff&&n==="actual"&&T.jsx(ai,{image:m,title:"Actual",hideSize:t,canvasWidth:V,canvasHeight:I,scale:R}),!i.diff&&n==="expected"&&T.jsx(ai,{image:u,title:f,hideSize:t,canvasWidth:V,canvasHeight:I,scale:R}),!i.diff&&n==="sxs"&&T.jsxs("div",{style:{display:"flex"},children:[T.jsx(ai,{image:u,title:f,canvasWidth:N*C,canvasHeight:N*L,scale:N}),T.jsx(ai,{image:m,title:"Actual",canvasWidth:N*C,canvasHeight:N*L,scale:N})]})]}),!t&&T.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[T.jsx("div",{children:i.diff&&T.jsx("a",{target:"_blank",href:i.diff.attachment.path,rel:"noreferrer",children:i.diff.attachment.name})}),T.jsx("div",{children:T.jsx("a",{target:e?"":"_blank",href:i.actual.attachment.path,rel:"noreferrer",children:i.actual.attachment.name})}),T.jsx("div",{children:T.jsx("a",{target:e?"":"_blank",href:i.expected.attachment.path,rel:"noreferrer",children:i.expected.attachment.name})})]})]})})},wE=({expectedImage:i,actualImage:e,canvasWidth:t,canvasHeight:n,scale:o,expectedTitle:a,hideSize:c})=>{const u={position:"absolute",top:0,left:0},[h,f]=q.useState(t/2),y=i.naturalWidth===e.naturalWidth&&i.naturalHeight===e.naturalHeight;return T.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&T.jsxs("div",{style:{margin:5},children:[!y&&T.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),T.jsx("span",{children:i.naturalWidth}),T.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),T.jsx("span",{children:i.naturalHeight}),!y&&T.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!y&&T.jsx("span",{children:e.naturalWidth}),!y&&T.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!y&&T.jsx("span",{children:e.naturalHeight})]}),T.jsxs("div",{style:{position:"relative",width:t,height:n,margin:15,...Sf},children:[T.jsx(uv,{orientation:"horizontal",offsets:[h],setOffsets:m=>f(m[0]),resizerColor:"#57606a80",resizerWidth:6}),T.jsx("img",{alt:a,style:{width:i.naturalWidth*o,height:i.naturalHeight*o},draggable:"false",src:i.src}),T.jsx("div",{style:{...u,bottom:0,overflow:"hidden",width:h,...Sf},children:T.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*o,height:e.naturalHeight*o},draggable:"false",src:e.src})})]})]})},ai=({image:i,title:e,alt:t,hideSize:n,canvasWidth:o,canvasHeight:a,scale:c,onClick:u})=>T.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!n&&T.jsxs("div",{style:{margin:5},children:[e&&T.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),T.jsx("span",{children:i.naturalWidth}),T.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),T.jsx("span",{children:i.naturalHeight})]}),T.jsx("div",{style:{display:"flex",flex:"none",width:o,height:a,margin:15,...Sf},children:T.jsx("img",{width:i.naturalWidth*c,height:i.naturalHeight*c,alt:e||t,style:{cursor:u?"pointer":"initial"},draggable:"false",src:i.src,onClick:u})})]}),xE="modulepreload",TE=function(i,e){return new URL(i,e).href},ob={},EE=function(e,t,n){let o=Promise.resolve();if(t&&t.length>0){let c=function(y){return Promise.all(y.map(m=>Promise.resolve(m).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};const u=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),f=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));o=c(t.map(y=>{if(y=TE(y,n),y in ob)return;ob[y]=!0;const m=y.endsWith(".css"),_=m?'[rel="stylesheet"]':"";if(!!n)for(let v=u.length-1;v>=0;v--){const x=u[v];if(x.href===y&&(!m||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${_}`))return;const S=document.createElement("link");if(S.rel=m?"stylesheet":xE,m||(S.as="script"),S.crossOrigin="",S.href=y,f&&S.setAttribute("nonce",f),document.head.appendChild(S),m)return new Promise((v,x)=>{S.addEventListener("load",v),S.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${y}`)))})}))}function a(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return o.then(c=>{for(const u of c||[])u.status==="rejected"&&a(u.reason);return e().catch(a)})},AE=20,zr=({text:i,highlighter:e,mimeType:t,linkify:n,readOnly:o,highlight:a,revealLine:c,lineNumbers:u,isFocused:h,focusOnChange:f,wrapLines:y,onChange:m,dataTestId:_,placeholder:b})=>{const[S,v]=Ds(),[x]=q.useState(EE(()=>import("./codeMirrorModule-BuhAdckO.js"),__vite__mapDeps([0,1]),import.meta.url).then(R=>R.default)),E=q.useRef(null),[C,L]=q.useState();return q.useEffect(()=>{(async()=>{var B,O;const R=await x;kE(R);const N=v.current;if(!N)return;const V=ME(e)||NE(t)||(n?"text/linkified":"");if(E.current&&V===E.current.cm.getOption("mode")&&!!o===E.current.cm.getOption("readOnly")&&u===E.current.cm.getOption("lineNumbers")&&y===E.current.cm.getOption("lineWrapping")&&b===E.current.cm.getOption("placeholder"))return;(O=(B=E.current)==null?void 0:B.cm)==null||O.getWrapperElement().remove();const I=R(N,{value:"",mode:V,readOnly:!!o,lineNumbers:u,lineWrapping:y,placeholder:b,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-F":"findPersistent","Cmd-F":"findPersistent"}});return E.current={cm:I},h&&I.focus(),L(I),I})()},[x,C,v,e,t,n,u,y,o,h,b]),q.useEffect(()=>{E.current&&E.current.cm.setSize(S.width,S.height)},[S]),q.useLayoutEffect(()=>{var V;if(!C)return;let R=!1;if(C.getValue()!==i&&(C.setValue(i),R=!0,f&&(C.execCommand("selectAll"),C.focus())),R||JSON.stringify(a)!==JSON.stringify(E.current.highlight)){for(const O of E.current.highlight||[])C.removeLineClass(O.line-1,"wrap");for(const O of a||[])C.addLineClass(O.line-1,"wrap",`source-line-${O.type}`);for(const O of E.current.widgets||[])C.removeLineWidget(O);for(const O of E.current.markers||[])O.clear();const I=[],B=[];for(const O of a||[]){if(O.type!=="subtle-error"&&O.type!=="error")continue;const Q=(V=E.current)==null?void 0:V.cm.getLine(O.line-1);if(Q){const se={};se.title=O.message||"",B.push(C.markText({line:O.line-1,ch:0},{line:O.line-1,ch:O.column||Q.length},{className:"source-line-error-underline",attributes:se}))}if(O.type==="error"){const se=document.createElement("div");se.innerHTML=xa(O.message||""),se.className="source-line-error-widget",I.push(C.addLineWidget(O.line,se,{above:!0,coverGutter:!1}))}}E.current.highlight=a,E.current.widgets=I,E.current.markers=B}typeof c=="number"&&E.current.cm.lineCount()>=c&&C.scrollIntoView({line:Math.max(0,c-1),ch:0},50);let N;return m&&(N=()=>m(C.getValue()),C.on("change",N)),()=>{N&&C.off("change",N)}},[C,i,a,c,f,m]),T.jsx("div",{"data-testid":_,className:"cm-wrapper",ref:v,onClick:CE})};function CE(i){var t;if(!(i.target instanceof HTMLElement))return;let e;i.target.classList.contains("cm-linkified")?e=i.target.textContent:i.target.classList.contains("cm-link")&&((t=i.target.nextElementSibling)!=null&&t.classList.contains("cm-url"))&&(e=i.target.nextElementSibling.textContent.slice(1,-1)),e&&(i.preventDefault(),i.stopPropagation(),window.open(e,"_blank"))}let ab=!1;function kE(i){ab||(ab=!0,i.defineSimpleMode("text/linkified",{start:[{regex:k0,token:"linkified"}]}))}function NE(i){if(i){if(i.includes("javascript")||i.includes("json"))return"javascript";if(i.includes("python"))return"python";if(i.includes("csharp"))return"text/x-csharp";if(i.includes("java"))return"text/x-java";if(i.includes("markdown"))return"markdown";if(i.includes("html")||i.includes("svg"))return"htmlmixed";if(i.includes("css"))return"css"}}function ME(i){if(i)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[i]}function DE(i){return!!i.match(/^(application\/json|application\/.*?\+json|text\/(x-)?json)(;\s*charset=.*)?$/)}function LE(i){return!!i.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const dv=({title:i,children:e,setExpanded:t,expanded:n,expandOnTitleClick:o,className:a})=>{const c=q.useId(),u=q.useId(),h=q.useCallback(()=>t(!n),[n,t]),f=T.jsx("div",{className:et("codicon",n?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:o?void 0:h});return T.jsxs("div",{className:et("expandable",n&&"expanded",a),children:[o?T.jsxs("div",{id:c,role:"button","aria-expanded":n,"aria-controls":u,className:"expandable-title",onClick:h,children:[f,i]}):T.jsxs("div",{className:"expandable-title",children:[f,i]}),n&&T.jsx("div",{id:u,"aria-labelledby":c,role:"region",className:"expandable-content",children:e})]})};function hv(i){const e=[];let t=0,n;for(;(n=k0.exec(i))!==null;){const a=i.substring(t,n.index);a&&e.push(a);const c=n[0];e.push(OE(c)),t=n.index+c.length}const o=i.substring(t);return o&&e.push(o),e}function OE(i){let e=i;return e.startsWith("www.")&&(e="https://"+e),T.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:i})}const fv=q.createContext(void 0),fi=()=>q.useContext(fv),RE=({attachment:i,reveal:e})=>{const t=fi(),[n,o]=q.useState(!1),[a,c]=q.useState(null),[u,h]=q.useState(null),[f,y]=rT(),m=q.useRef(null),_=LE(i.contentType),b=!!i.sha1||!!i.path;q.useEffect(()=>{var x;if(e)return(x=m.current)==null||x.scrollIntoView({behavior:"smooth"}),y()},[e,y]),q.useEffect(()=>{n&&a===null&&u===null&&(h("Loading ..."),fetch(Xc(t,i)).then(x=>x.text()).then(x=>{c(x),h(null)}).catch(x=>{h("Failed to load: "+x.message)}))},[t,n,a,u,i]);const S=q.useMemo(()=>{const x=a?a.split(`
|
|
60
|
+
`).length:0;return Math.min(Math.max(5,x),20)*AE},[a]),v=T.jsxs("span",{style:{marginLeft:5},ref:m,"aria-label":i.name,children:[T.jsx("span",{children:hv(i.name)}),b&&T.jsx("a",{style:{marginLeft:5},href:pc(t,i),children:"download"})]});return!_||!b?T.jsx("div",{style:{marginLeft:20},children:v}):T.jsxs("div",{className:et(f&&"yellow-flash"),children:[T.jsx(dv,{title:v,expanded:n,setExpanded:o,expandOnTitleClick:!0,children:u&&T.jsx("i",{children:u})}),n&&a!==null&&T.jsx("div",{className:"vbox",style:{height:S},children:T.jsx(zr,{text:a,readOnly:!0,mimeType:i.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},jE=({revealedAttachmentCallId:i})=>{const e=fi(),{diffMap:t,screenshots:n,attachments:o}=q.useMemo(()=>{const a=new Set((e==null?void 0:e.visibleAttachments)??[]),c=new Set,u=new Map;for(const h of a){if(!h.path&&!h.sha1)continue;const f=h.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(f){const y=f[1],m=f[2],_=u.get(y)||{expected:void 0,actual:void 0,diff:void 0};_[m]=h,u.set(y,_),a.delete(h)}else h.contentType.startsWith("image/")&&(c.add(h),a.delete(h))}return{diffMap:u,attachments:a,screenshots:c}},[e]);return!t.size&&!n.size&&!o.size?T.jsx(Ls,{text:"No attachments"}):T.jsxs("div",{className:"attachments-tab",children:[[...t.values()].map(({expected:a,actual:c,diff:u})=>T.jsxs(T.Fragment,{children:[a&&c&&T.jsx("div",{className:"attachments-section",children:"Image diff"}),a&&c&&T.jsx(SE,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...a,path:pc(e,a)},title:"Expected"},actual:{attachment:{...c,path:pc(e,c)}},diff:u?{attachment:{...u,path:pc(e,u)}}:void 0}})]})),n.size?T.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...n.values()].map((a,c)=>{const u=Xc(e,a);return T.jsxs("div",{className:"attachment-item",children:[T.jsx("div",{children:T.jsx("img",{draggable:"false",src:u})}),T.jsx("div",{children:T.jsx("a",{target:"_blank",href:u,rel:"noreferrer",children:a.name})})]},`screenshot-${c}`)}),o.size?T.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...o.values()].map((a,c)=>T.jsx("div",{className:"attachment-item",children:T.jsx(RE,{attachment:a,reveal:i&&a.callId===i.callId?i:void 0})},HE(a,c)))]})};function Xc(i,e){return i&&e.sha1?i.createRelativeUrl(`sha1/${e.sha1}`):`file?path=${encodeURIComponent(e.path)}`}function pc(i,e){let t=e.contentType?`&dn=${encodeURIComponent(e.name)}`:"";return e.contentType&&(t+=`&dct=${encodeURIComponent(e.contentType)}`),Xc(i,e)+t}function HE(i,e){return e+"-"+(i.sha1?"sha1-"+i.sha1:"path-"+i.path)}const $E=`
|
|
61
|
+
# Instructions
|
|
62
|
+
|
|
63
|
+
- Following Playwright test failed.
|
|
64
|
+
- Explain why, be concise, respect Playwright best practices.
|
|
65
|
+
- Provide a snippet of code with the fix, if possible.
|
|
66
|
+
`.trimStart();async function zE({testInfo:i,metadata:e,errorContext:t,errors:n,buildCodeFrame:o,stdout:a,stderr:c}){var m;const u=new Set(n.filter(_=>_.message&&!_.message.includes(`
|
|
67
|
+
`)).map(_=>_.message));for(const _ of n)for(const b of u.keys())(m=_.message)!=null&&m.includes(b)&&u.delete(b);const h=n.filter(_=>!(!_.message||!_.message.includes(`
|
|
68
|
+
`)&&!u.has(_.message)));if(!h.length)return;const f=[$E,"# Test info","",i];a&&f.push("","# Stdout","","```",mc(a),"```"),c&&f.push("","# Stderr","","```",mc(c),"```"),f.push("","# Error details");for(const _ of h)f.push("","```",mc(_.message||""),"```");t&&f.push(t);const y=await o(h[h.length-1]);return y&&f.push("","# Test source","","```ts",y,"```"),e!=null&&e.gitDiff&&f.push("","# Local changes","","```diff",e.gitDiff,"```"),f.join(`
|
|
69
|
+
`)}const IE=new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))","g");function mc(i){return i.replace(IE,"")}const BE=Gc,PE=({stack:i,setSelectedFrame:e,selectedFrame:t})=>{const n=i||[];return T.jsx(BE,{name:"stack-trace",ariaLabel:"Stack trace",items:n,selectedItem:n[t],render:o=>{const a=o.file[1]===":"?"\\":"/";return T.jsxs(T.Fragment,{children:[T.jsx("span",{className:"stack-trace-frame-function",children:o.function||"(anonymous)"}),T.jsx("span",{className:"stack-trace-frame-location",children:o.file.split(a).pop()}),T.jsx("span",{className:"stack-trace-frame-line",children:":"+o.line})]})},onSelected:o=>e(n.indexOf(o))})},Wf=({noShadow:i,children:e,noMinHeight:t,className:n,sidebarBackground:o,onClick:a})=>T.jsx("div",{className:et("toolbar",i&&"no-shadow",t&&"no-min-height",n,o&&"toolbar-sidebar-background"),onClick:a,children:e});function qE(i,e,t,n,o){const a=fi();return Ec(async()=>{var b,S,v,x;const c=i==null?void 0:i[e],u=c!=null&&c.file?c:o;if(!u)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const h=u.file;let f=t.get(h);f||(f={errors:((b=o==null?void 0:o.source)==null?void 0:b.errors)||[],content:(S=o==null?void 0:o.source)==null?void 0:S.content},t.set(h,f));const y=(u==null?void 0:u.line)||((v=f.errors[0])==null?void 0:v.line)||0,m=n&&h.startsWith(n)?h.substring(n.length+1):h,_=f.errors.map(E=>({type:"error",line:E.line,message:E.message}));if(_.push({line:y,type:"running"}),((x=o==null?void 0:o.source)==null?void 0:x.content)!==void 0)f.content=o.source.content;else if(f.content===void 0||u===o){const E=await gv(h);try{let C=a?await fetch(a.createRelativeUrl(`sha1/src@${E}.txt`)):void 0;(!C||C.status===404)&&(C=await fetch(`file?path=${encodeURIComponent(h)}`)),C.status>=400?f.content="":f.content=await C.text()}catch{f.content=`<Unable to read "${h}">`}}return{model:a,source:f,highlight:_,targetLine:y,fileName:m,location:u}},[i,e,n,o],{source:{errors:[],content:"Loading…"},highlight:[]})}const UE=({stack:i,sources:e,rootDir:t,fallbackLocation:n,stackFrameLocation:o,onOpenExternally:a})=>{const[c,u]=q.useState(),[h,f]=q.useState(0);q.useEffect(()=>{c!==i&&(u(i),f(0))},[i,c,u,f]);const{source:y,highlight:m,targetLine:_,fileName:b,location:S}=qE(i,h,e,t,n),v=q.useCallback(()=>{S&&(a?a(S):window.location.href=`vscode://file//${S.file}:${S.line}`)},[a,S]),x=((i==null?void 0:i.length)??0)>1,E=VE(b),C=E.endsWith(".md")?"markdown":"javascript";return T.jsx(Cc,{sidebarSize:200,orientation:o==="bottom"?"vertical":"horizontal",sidebarHidden:!x,main:T.jsxs("div",{className:"vbox","data-testid":"source-code",children:[b&&T.jsxs(Wf,{children:[T.jsx("div",{className:"source-tab-file-name",title:b,children:T.jsx("div",{children:E})}),T.jsx(Kf,{description:"Copy filename",value:E}),S&&T.jsx(Vt,{icon:"link-external",title:"Open in VS Code",onClick:v})]}),T.jsx(zr,{text:y.content||"",highlighter:C,highlight:m,revealLine:_,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:T.jsx(PE,{stack:i,selectedFrame:h,setSelectedFrame:f})})};async function gv(i){const e=new TextEncoder().encode(i),t=await crypto.subtle.digest("SHA-1",e),n=[],o=new DataView(t);for(let a=0;a<o.byteLength;a+=1){const c=o.getUint8(a).toString(16).padStart(2,"0");n.push(c)}return n.join("")}function VE(i){if(!i)return"";const e=i!=null&&i.includes("/")?"/":"\\";return(i==null?void 0:i.split(e).pop())??""}const FE=({prompt:i})=>T.jsx(gc,{value:i,description:"Copy prompt",copiedDescription:T.jsxs(T.Fragment,{children:["Copied ",T.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function GE(i){return q.useMemo(()=>{if(!i)return{errors:new Map};const e=new Map;for(const t of i.errorDescriptors)e.set(t.message,t);return{errors:e}},[i])}function XE({message:i,error:e,sdkLanguage:t,revealInSource:n}){var u;let o,a;const c=(u=e.stack)==null?void 0:u[0];return c&&(o=c.file.replace(/.*[/\\](.*)/,"$1")+":"+c.line,a=c.file+":"+c.line),T.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[T.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&Yf(e.action,{sdkLanguage:t}),o&&T.jsxs("div",{className:"action-location",children:["@ ",T.jsx("span",{title:a,onClick:()=>n(e),children:o})]})]}),T.jsx(bE,{error:i})]})}const YE=({errorsModel:i,sdkLanguage:e,revealInSource:t,wallTime:n,testRunMetadata:o})=>{const a=fi(),c=Ec(async()=>{const f=a==null?void 0:a.attachments.find(y=>y.name==="error-context");if(f)return await fetch(Xc(a,f)).then(y=>y.text())},[a],void 0),u=q.useCallback(async f=>{var b;const y=(b=f.stack)==null?void 0:b[0];if(!y)return;let m=a?await fetch(a.createRelativeUrl(`sha1/src@${await gv(y.file)}.txt`)):void 0;if((!m||m.status===404)&&(m=await fetch(`file?path=${encodeURIComponent(y.file)}`)),m.status>=400)return;const _=await m.text();return KE({source:_,message:mc(f.message).split(`
|
|
70
|
+
`)[0]||void 0,location:y,linesAbove:100,linesBelow:100})},[a]),h=Ec(()=>zE({testInfo:(a==null?void 0:a.title)??"",metadata:o,errorContext:c,errors:(a==null?void 0:a.errorDescriptors)??[],buildCodeFrame:u}),[c,o,a,u],void 0);return i.errors.size?T.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[T.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:h&&T.jsx(FE,{prompt:h})}),[...i.errors.entries()].map(([f,y])=>{const m=`error-${n}-${f}`;return T.jsx(XE,{message:f,error:y,revealInSource:t,sdkLanguage:e},m)})]}):T.jsx(Ls,{text:"No errors"})};function KE({source:i,message:e,location:t,linesAbove:n,linesBelow:o}){const a=i.split(`
|
|
71
|
+
`).slice(),c=Math.max(0,t.line-n-1),u=Math.min(a.length,t.line+o),h=a.slice(c,u),f=String(u).length,y=h.map((m,_)=>`${c+_+1===t.line?"> ":" "}${(c+_+1).toString().padEnd(f," ")} | ${m}`);return e&&y.splice(t.line-c,0,`${" ".repeat(f+2)} | ${" ".repeat(t.column-2)} ^ ${e}`),y.join(`
|
|
72
|
+
`)}const WE=Gc;function JE(i,e){const{entries:t}=q.useMemo(()=>{if(!i)return{entries:[]};const o=[];function a(u){var y,m,_,b,S,v;const h=o[o.length-1];h&&((y=u.browserMessage)==null?void 0:y.bodyString)===((m=h.browserMessage)==null?void 0:m.bodyString)&&((_=u.browserMessage)==null?void 0:_.location)===((b=h.browserMessage)==null?void 0:b.location)&&u.browserError===h.browserError&&((S=u.nodeMessage)==null?void 0:S.html)===((v=h.nodeMessage)==null?void 0:v.html)&&u.isError===h.isError&&u.isWarning===h.isWarning&&u.timestamp-h.timestamp<1e3?h.repeat++:o.push({...u,repeat:1})}const c=[...i.events,...i.stdio].sort((u,h)=>{const f="time"in u?u.time:u.timestamp,y="time"in h?h.time:h.timestamp;return f-y});for(const u of c){if(u.type==="console"){const h=u.args&&u.args.length?QE(u.args):pv(u.text),f=u.location.url,m=`${f?f.substring(f.lastIndexOf("/")+1):"<anonymous>"}:${u.location.lineNumber}`;a({browserMessage:{body:h,bodyString:u.text,location:m},isError:u.messageType==="error",isWarning:u.messageType==="warning",timestamp:u.time})}if(u.type==="event"&&u.method==="pageError"&&a({browserError:u.params.error,isError:!0,isWarning:!1,timestamp:u.time}),u.type==="stderr"||u.type==="stdout"){let h="";u.text&&(h=xa(u.text.trim())||""),u.base64&&(h=xa(atob(u.base64).trim())||""),a({nodeMessage:{html:h},isError:u.type==="stderr",isWarning:!1,timestamp:u.timestamp})}}return{entries:o}},[i]);return{entries:q.useMemo(()=>e?t.filter(o=>o.timestamp>=e.minimum&&o.timestamp<=e.maximum):t,[t,e])}}const ZE=({consoleModel:i,boundaries:e,onEntryHovered:t,onAccepted:n})=>i.entries.length?T.jsx("div",{className:"console-tab",children:T.jsx(WE,{name:"console",onAccepted:n,onHighlighted:o=>t==null?void 0:t(o?i.entries.indexOf(o):void 0),items:i.entries,isError:o=>o.isError,isWarning:o=>o.isWarning,render:o=>{const a=Nt(o.timestamp-e.minimum),c=T.jsx("span",{className:"console-time",children:a}),u=o.isError?"status-error":o.isWarning?"status-warning":"status-none",h=o.browserMessage||o.browserError?T.jsx("span",{className:et("codicon","codicon-browser",u),title:"Browser message"}):T.jsx("span",{className:et("codicon","codicon-file",u),title:"Runner message"});let f,y,m,_;const{browserMessage:b,browserError:S,nodeMessage:v}=o;if(b&&(f=b.location,y=b.body),S){const{error:x,value:E}=S;x?(y=x.message,_=x.stack):y=String(E)}return v&&(m=v.html),T.jsxs("div",{className:"console-line",children:[c,h,f&&T.jsx("span",{className:"console-location",children:f}),o.repeat>1&&T.jsx("span",{className:"console-repeat",children:o.repeat}),y&&T.jsx("span",{className:"console-line-message",children:y}),m&&T.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:m}}),_&&T.jsx("div",{className:"console-stack",children:_})]})}})}):T.jsx(Ls,{text:"No console entries"});function QE(i){if(i.length===1)return pv(i[0].preview);const e=typeof i[0].value=="string"&&i[0].value.includes("%"),t=e?i[0].value:"",n=e?i.slice(1):i;let o=0;const a=/%([%sdifoOc])/g;let c;const u=[];let h=[];u.push(T.jsx("span",{children:h},u.length+1));let f=0;for(;(c=a.exec(t))!==null;){const y=t.substring(f,c.index);h.push(T.jsx("span",{children:y},h.length+1)),f=c.index+2;const m=c[0][1];if(m==="%")h.push(T.jsx("span",{children:"%"},h.length+1));else if(m==="s"||m==="o"||m==="O"||m==="d"||m==="i"||m==="f"){const _=n[o++],b={};typeof(_==null?void 0:_.value)!="string"&&(b.color="var(--vscode-debugTokenExpression-number)"),h.push(T.jsx("span",{style:b,children:(_==null?void 0:_.preview)||""},h.length+1))}else if(m==="c"){h=[];const _=n[o++],b=_?eA(_.preview):{};u.push(T.jsx("span",{style:b,children:h},u.length+1))}}for(f<t.length&&h.push(T.jsx("span",{children:t.substring(f)},h.length+1));o<n.length;o++){const y=n[o],m={};h.length&&h.push(T.jsx("span",{children:" "},h.length+1)),typeof(y==null?void 0:y.value)!="string"&&(m.color="var(--vscode-debugTokenExpression-number)"),h.push(T.jsx("span",{style:m,children:(y==null?void 0:y.preview)||""},h.length+1))}return u}function pv(i){return[T.jsx("span",{dangerouslySetInnerHTML:{__html:xa(i.trim())}})]}function eA(i){try{const e={},t=i.split(";");for(const n of t){const o=n.trim();if(!o)continue;let[a,c]=o.split(":");if(a=a.trim(),c=c.trim(),!tA(a))continue;const u=a.replace(/-([a-z])/g,h=>h[1].toUpperCase());e[u]=c}return e}catch{return{}}}function tA(i){return["background","border","color","font","line","margin","padding","text"].some(t=>i.startsWith(t))}const wf=({tabs:i,selectedTab:e,setSelectedTab:t,leftToolbar:n,rightToolbar:o,dataTestId:a,mode:c})=>{const u=q.useId();return e||(e=i[0].id),c||(c="default"),T.jsx("div",{className:"tabbed-pane","data-testid":a,children:T.jsxs("div",{className:"vbox",children:[T.jsxs(Wf,{children:[n&&T.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...n]}),c==="default"&&T.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...i.map(h=>T.jsx(mv,{id:h.id,ariaControls:`${u}-${h.id}`,title:h.title,count:h.count,errorCount:h.errorCount,selected:e===h.id,onSelect:t},h.id))]}),c==="select"&&T.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:T.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:e,onChange:h=>{t==null||t(i[h.currentTarget.selectedIndex].id)},children:i.map(h=>{let f="";return h.count&&(f=` (${h.count})`),h.errorCount&&(f=` (${h.errorCount})`),T.jsxs("option",{value:h.id,role:"tab","aria-controls":`${u}-${h.id}`,children:[h.title,f]},h.id)})})}),o&&T.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...o]})]}),i.map(h=>{const f="tab-content tab-"+h.id;if(h.component)return T.jsx("div",{id:`${u}-${h.id}`,role:"tabpanel","aria-label":h.title,className:f,style:{display:e===h.id?"inherit":"none"},children:h.component},h.id);if(e===h.id)return T.jsx("div",{id:`${u}-${h.id}`,role:"tabpanel","aria-label":h.title,className:f,children:h.render()},h.id)})]})})},mv=({id:i,title:e,count:t,errorCount:n,selected:o,onSelect:a,ariaControls:c})=>T.jsxs("div",{className:et("tabbed-pane-tab",o&&"selected"),onClick:()=>a==null?void 0:a(i),role:"tab",title:e,"aria-controls":c,"aria-selected":o,children:[T.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!t&&T.jsx("div",{className:"tabbed-pane-tab-counter",children:t}),!!n&&T.jsx("div",{className:"tabbed-pane-tab-counter error",children:n})]});async function nA(i,e){const t=navigator.platform.includes("Win")?"win":"unix";let n=[];const o=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function a(_){return'^"'+_.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/[^ -~\r\n]/g," ").replace(/\r?\n|\r/g,`^
|
|
73
|
+
|
|
74
|
+
`)+'^"'}function c(_){function b(S){let x=S.charCodeAt(0).toString(16);for(;x.length<4;)x="0"+x;return"\\u"+x}return/[\0-\x1F\x7F-\x9F!]|\'/.test(_)?"$'"+_.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,b)+"'":"'"+_+"'"}const u=t==="win"?a:c;n.push(u(e.request.url).replace(/[[{}\]]/g,"\\$&"));let h="GET";const f=[],y=await yv(i,e);y&&(f.push("--data-raw "+u(y)),o.add("content-length"),h="POST"),e.request.method!==h&&n.push("-X "+u(e.request.method));const m=e.request.headers;for(let _=0;_<m.length;_++){const b=m[_],S=b.name.replace(/^:/,"");if(o.has(S.toLowerCase()))continue;const v=b.value;v.trim()?S.toLowerCase()==="cookie"?n.push("-b "+u(v)):n.push("-H "+u(S+": "+v)):n.push("-H "+u(S+";"))}return n=n.concat(f),"curl "+n.join(n.length>=3?t==="win"?` ^
|
|
75
|
+
`:` \\
|
|
76
|
+
`:" ")}async function iA(i,e,t=0){const n=new Set(["method","path","scheme","version","accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via","user-agent"]),o=new Set(["cookie","authorization"]),a=JSON.stringify(e.request.url),c=e.request.headers,u=c.reduce((v,x)=>{const E=x.name;return!n.has(E.toLowerCase())&&!E.includes(":")&&v.append(E,x.value),v},new Headers),h={};for(const v of u)h[v[0]]=v[1];const f=e.request.cookies.length||c.some(({name:v})=>o.has(v.toLowerCase()))?"include":"omit",y=c.find(({name:v})=>v.toLowerCase()==="referer"),m=y?y.value:void 0,_=await yv(i,e),b={headers:Object.keys(h).length?h:void 0,referrer:m,body:_,method:e.request.method,mode:"cors"};if(t===1){const v=c.find(E=>E.name.toLowerCase()==="cookie"),x={};delete b.mode,v&&(x.cookie=v.value),m&&(delete b.referrer,x.Referer=m),Object.keys(x).length&&(b.headers={...h,...x})}else b.credentials=f;const S=JSON.stringify(b,null,2);return`fetch(${a}, ${S});`}async function yv(i,e){var t,n;return i&&((t=e.request.postData)!=null&&t._sha1)?await fetch(i.createRelativeUrl(`sha1/${e.request.postData._sha1}`)).then(o=>o.text()):(n=e.request.postData)==null?void 0:n.text}class sA{generatePlaywrightRequestCall(e,t){let n=e.method.toLowerCase();const o=new URL(e.url),a=`${o.origin}${o.pathname}`,c={};["delete","get","head","post","put","patch"].includes(n)||(c.method=n,n="fetch"),o.searchParams.size&&(c.params=Object.fromEntries(o.searchParams.entries())),t&&(c.data=t),e.headers.length&&(c.headers=Object.fromEntries(e.headers.map(f=>[f.name,f.value])));const u=[`'${a}'`];return Object.keys(c).length>0&&u.push(this.prettyPrintObject(c)),`await page.request.${n}(${u.join(", ")});`}prettyPrintObject(e,t=2,n=0){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const u=" ".repeat(n*t),h=" ".repeat((n+1)*t);return`[
|
|
77
|
+
${e.map(y=>`${h}${this.prettyPrintObject(y,t,n+1)}`).join(`,
|
|
78
|
+
`)}
|
|
79
|
+
${u}]`}if(Object.keys(e).length===0)return"{}";const o=" ".repeat(n*t),a=" ".repeat((n+1)*t);return`{
|
|
80
|
+
${Object.entries(e).map(([u,h])=>{const f=this.prettyPrintObject(h,t,n+1),y=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(u)?u:this.stringLiteral(u);return`${a}${y}: ${f}`}).join(`,
|
|
81
|
+
`)}
|
|
82
|
+
${o}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
|
|
83
|
+
`)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class rA{generatePlaywrightRequestCall(e,t){const n=new URL(e.url),a=[`"${`${n.origin}${n.pathname}`}"`];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(a.push(`method="${c}"`),c="fetch"),n.searchParams.size&&a.push(`params=${this.prettyPrintObject(Object.fromEntries(n.searchParams.entries()))}`),t&&a.push(`data=${this.prettyPrintObject(t)}`),e.headers.length&&a.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(h=>[h.name,h.value])))}`);const u=a.length===1?a[0]:`
|
|
84
|
+
${a.map(h=>this.indent(h,2)).join(`,
|
|
85
|
+
`)}
|
|
86
|
+
`;return`await page.request.${c}(${u})`}indent(e,t){return e.split(`
|
|
87
|
+
`).map(n=>" ".repeat(t)+n).join(`
|
|
88
|
+
`)}prettyPrintObject(e,t=2,n=0){if(e===null||e===void 0)return"None";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"True":"False":String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const u=" ".repeat(n*t),h=" ".repeat((n+1)*t);return`[
|
|
89
|
+
${e.map(y=>`${h}${this.prettyPrintObject(y,t,n+1)}`).join(`,
|
|
90
|
+
`)}
|
|
91
|
+
${u}]`}if(Object.keys(e).length===0)return"{}";const o=" ".repeat(n*t),a=" ".repeat((n+1)*t);return`{
|
|
92
|
+
${Object.entries(e).map(([u,h])=>{const f=this.prettyPrintObject(h,t,n+1);return`${a}${this.stringLiteral(u)}: ${f}`}).join(`,
|
|
93
|
+
`)}
|
|
94
|
+
${o}}`}stringLiteral(e){return JSON.stringify(e)}}class oA{generatePlaywrightRequestCall(e,t){const n=new URL(e.url),o=`${n.origin}${n.pathname}`,a={},c=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(a.Method=u,u="fetch"),n.searchParams.size&&(a.Params=Object.fromEntries(n.searchParams.entries())),t&&(a.Data=t),e.headers.length&&(a.Headers=Object.fromEntries(e.headers.map(y=>[y.name,y.value])));const h=[`"${o}"`];return Object.keys(a).length>0&&h.push(this.prettyPrintObject(a)),`${c.join(`
|
|
95
|
+
`)}${c.length?`
|
|
96
|
+
`:""}await request.${this.toFunctionName(u)}(${h.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,t=2,n=0){if(e===null||e===void 0)return"null";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"true":"false":String(e);if(Array.isArray(e)){if(e.length===0)return"new object[] {}";const u=" ".repeat(n*t),h=" ".repeat((n+1)*t);return`new object[] {
|
|
97
|
+
${e.map(y=>`${h}${this.prettyPrintObject(y,t,n+1)}`).join(`,
|
|
98
|
+
`)}
|
|
99
|
+
${u}}`}if(Object.keys(e).length===0)return"new {}";const o=" ".repeat(n*t),a=" ".repeat((n+1)*t);return`new() {
|
|
100
|
+
${Object.entries(e).map(([u,h])=>{const f=this.prettyPrintObject(h,t,n+1),y=n===0?u:`[${this.stringLiteral(u)}]`;return`${a}${y} = ${f}`}).join(`,
|
|
101
|
+
`)}
|
|
102
|
+
${o}}`}stringLiteral(e){return JSON.stringify(e)}}class aA{generatePlaywrightRequestCall(e,t){const n=new URL(e.url),o=[`"${n.origin}${n.pathname}"`],a=[];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(a.push(`setMethod("${c}")`),c="fetch");for(const[u,h]of n.searchParams)a.push(`setQueryParam(${this.stringLiteral(u)}, ${this.stringLiteral(h)})`);t&&a.push(`setData(${this.stringLiteral(t)})`);for(const u of e.headers)a.push(`setHeader(${this.stringLiteral(u.name)}, ${this.stringLiteral(u.value)})`);return a.length>0&&o.push(`RequestOptions.create()
|
|
103
|
+
.${a.join(`
|
|
104
|
+
.`)}
|
|
105
|
+
`),`request.${c}(${o.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function lA(i){if(i==="javascript")return new sA;if(i==="python")return new rA;if(i==="csharp")return new oA;if(i==="java")return new aA;throw new Error("Unsupported language: "+i)}const cA=({resource:i,sdkLanguage:e,startTimeOffset:t,onClose:n})=>{const[o,a]=q.useState("headers"),c=fi(),u=Ec(async()=>{if(c&&i.request.postData){const h=i.request.headers.find(y=>y.name.toLowerCase()==="content-type"),f=h?h.value:"";if(i.request.postData._sha1){const y=await fetch(c.createRelativeUrl(`sha1/${i.request.postData._sha1}`));return{text:xf(await y.text(),f),mimeType:f}}else return{text:xf(i.request.postData.text,f),mimeType:f}}else return null},[i],null);return T.jsx(wf,{leftToolbar:[T.jsx(Vt,{icon:"close",title:"Close",onClick:n},"close")],rightToolbar:[T.jsx(uA,{requestBody:u,resource:i,sdkLanguage:e},"dropdown")],tabs:[{id:"headers",title:"Headers",render:()=>T.jsx(dA,{resource:i,startTimeOffset:t})},{id:"payload",title:"Payload",render:()=>T.jsx(hA,{resource:i,requestBody:u})},{id:"response",title:"Response",render:()=>T.jsx(fA,{resource:i})}],selectedTab:o,setSelectedTab:a})},uA=({resource:i,sdkLanguage:e,requestBody:t})=>{const n=fi(),o=T.jsxs(T.Fragment,{children:[T.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),a=async()=>lA(e).generatePlaywrightRequestCall(i.request,t==null?void 0:t.text);return T.jsxs("div",{className:"copy-request-dropdown",children:[T.jsxs(Vt,{className:"copy-request-dropdown-toggle",children:[T.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",T.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),T.jsxs("div",{className:"copy-request-dropdown-menu",children:[T.jsx(gc,{description:"Copy as cURL",copiedDescription:o,value:()=>nA(n,i)}),T.jsx(gc,{description:"Copy as Fetch",copiedDescription:o,value:()=>iA(n,i)}),T.jsx(gc,{description:"Copy as Playwright",copiedDescription:o,value:a})]})]})},ma=({title:i,data:e,showCount:t,children:n,className:o})=>{const[a,c]=pn(`trace-viewer-network-details-${i.replaceAll(" ","-")}`,!0);return T.jsxs(dv,{expanded:a,setExpanded:c,expandOnTitleClick:!0,title:T.jsxs("span",{className:"network-request-details-header",children:[i,t&&T.jsxs("span",{className:"network-request-details-header-count",children:[" × ",(e==null?void 0:e.length)??0]})]}),className:o,children:[e&&T.jsx("table",{className:"network-request-details-table",children:T.jsx("tbody",{children:e.map(({name:u,value:h},f)=>h!==null&&T.jsxs("tr",{children:[T.jsx("td",{children:u}),T.jsx("td",{children:h})]},f))})}),n]})},dA=({resource:i,startTimeOffset:e})=>{const t=q.useMemo(()=>Object.entries({URL:i.request.url,Method:i.request.method,"Status Code":i.response.status!==-1&&T.jsxs("span",{className:pA(i.response.status),children:[" ",i.response.status," ",i.response.statusText]}),Start:Nt(e),Duration:Nt(i.time)}).map(([n,o])=>({name:n,value:o})),[i,e]);return T.jsxs("div",{className:"vbox network-request-details-tab",children:[T.jsx(ma,{title:"General",data:t}),T.jsx(ma,{title:"Request Headers",showCount:!0,data:i.request.headers}),T.jsx(ma,{title:"Response Headers",showCount:!0,data:i.response.headers})]})},hA=({resource:i,requestBody:e})=>T.jsxs("div",{className:"vbox network-request-details-tab",children:[i.request.queryString.length===0&&!e&&T.jsx("em",{className:"network-request-no-payload",children:"No payload for this request."}),i.request.queryString.length>0&&T.jsx(ma,{title:"Query String Parameters",showCount:!0,data:i.request.queryString}),e&&T.jsx(ma,{title:"Request Body",className:"network-request-request-body",children:T.jsx(zr,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})})]}),fA=({resource:i})=>{const e=fi(),[t,n]=q.useState(null);return q.useEffect(()=>{(async()=>{if(e&&i.response.content._sha1){const a=i.response.content.mimeType.includes("image"),c=i.response.content.mimeType.includes("font"),u=await fetch(e.createRelativeUrl(`sha1/${i.response.content._sha1}`));if(a){const h=await u.blob(),f=new FileReader,y=new Promise(m=>f.onload=m);f.readAsDataURL(h),n({dataUrl:(await y).target.result})}else if(c){const h=await u.arrayBuffer();n({font:h})}else{const h=xf(await u.text(),i.response.content.mimeType);n({text:h,mimeType:i.response.content.mimeType})}}else n(null)})()},[i,e]),T.jsxs("div",{className:"vbox network-request-details-tab",children:[!i.response.content._sha1&&T.jsx("div",{children:"Response body is not available for this request."}),t&&t.font&&T.jsx(gA,{font:t.font}),t&&t.dataUrl&&T.jsx("div",{children:T.jsx("img",{draggable:"false",src:t.dataUrl})}),t&&t.text&&T.jsx(zr,{text:t.text,mimeType:t.mimeType,readOnly:!0,lineNumbers:!0})]})},gA=({font:i})=>{const[e,t]=q.useState(!1);return q.useEffect(()=>{let n;try{n=new FontFace("font-preview",i),n.status==="loaded"&&document.fonts.add(n),n.status==="error"&&t(!0)}catch{t(!0)}return()=>{document.fonts.delete(n)}},[i]),e?T.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):T.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",T.jsx("br",{}),"NOPQRSTUVWXYZ",T.jsx("br",{}),"abcdefghijklm",T.jsx("br",{}),"nopqrstuvwxyz",T.jsx("br",{}),"1234567890"]})};function pA(i){return i<300||i===304?"green-circle":i<400?"yellow-circle":"red-circle"}function xf(i,e){if(i===null)return"Loading...";const t=i;if(t==="")return"<Empty>";if(DE(e))try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(t):t}function mA(i){const[e,t]=q.useState([]);q.useEffect(()=>{const a=[];for(let c=0;c<i.columns.length-1;++c){const u=i.columns[c];a[c]=(a[c-1]||0)+i.columnWidths.get(u)}t(a)},[i.columns,i.columnWidths]);function n(a){const c=new Map(i.columnWidths.entries());for(let u=0;u<a.length;++u){const h=a[u]-(a[u-1]||0),f=i.columns[u];c.set(f,h)}i.setColumnWidths(c)}const o=q.useCallback(a=>{var c,u;(u=i.setSorting)==null||u.call(i,{by:a,negate:((c=i.sorting)==null?void 0:c.by)===a?!i.sorting.negate:!1})},[i]);return T.jsxs("div",{className:`grid-view ${i.name}-grid-view`,children:[T.jsx(uv,{orientation:"horizontal",offsets:e,setOffsets:n,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),T.jsxs("div",{className:"vbox",children:[T.jsx("div",{className:"grid-view-header",children:i.columns.map((a,c)=>T.jsxs("div",{className:"grid-view-header-cell "+yA(a,i.sorting),style:{width:c<i.columns.length-1?i.columnWidths.get(a):void 0},onClick:()=>i.setSorting&&o(a),children:[T.jsx("span",{className:"grid-view-header-cell-title",children:i.columnTitle(a)}),T.jsx("span",{className:"codicon codicon-triangle-up"}),T.jsx("span",{className:"codicon codicon-triangle-down"})]},i.columnTitle(a)))}),T.jsx(Gc,{name:i.name,items:i.items,ariaLabel:i.ariaLabel,id:i.id,render:(a,c)=>T.jsx(T.Fragment,{children:i.columns.map((u,h)=>{const{body:f,title:y}=i.render(a,u,c);return T.jsx("div",{className:`grid-view-cell grid-view-column-${String(u)}`,title:y,style:{width:h<i.columns.length-1?i.columnWidths.get(u):void 0},children:f},i.columnTitle(u))})}),icon:i.icon,isError:i.isError,isWarning:i.isWarning,isInfo:i.isInfo,selectedItem:i.selectedItem,onAccepted:i.onAccepted,onSelected:i.onSelected,onHighlighted:i.onHighlighted,onIconClicked:i.onIconClicked,noItemsMessage:i.noItemsMessage,dataTestId:i.dataTestId,notSelectable:i.notSelectable})]})]})}function yA(i,e){return i===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const _A=["Fetch","HTML","JS","CSS","Font","Image"],bA={searchValue:"",resourceTypes:new Set},vA=({filterState:i,onFilterStateChange:e})=>T.jsxs("div",{className:"network-filters",children:[T.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:i.searchValue,onChange:t=>e({...i,searchValue:t.target.value})}),T.jsxs("div",{className:"network-filters-resource-types",role:"tablist","aria-multiselectable":"true",children:[T.jsx("div",{title:"All",onClick:()=>e({...i,resourceTypes:new Set}),className:`network-filters-resource-type ${i.resourceTypes.size===0?"selected":""}`,children:"All"}),_A.map(t=>T.jsx("div",{title:t,onClick:n=>{let o;n.ctrlKey||n.metaKey?o=i.resourceTypes.symmetricDifference(new Set([t])):o=new Set([t]),e({...i,resourceTypes:o})},className:`network-filters-resource-type ${i.resourceTypes.has(t)?"selected":""}`,role:"tab","aria-selected":i.resourceTypes.has(t),children:t},t))]})]}),SA=mA;function wA(i,e){const t=q.useMemo(()=>((i==null?void 0:i.resources)||[]).filter(c=>e?!!c._monotonicTime&&c._monotonicTime>=e.minimum&&c._monotonicTime<=e.maximum:!0),[i,e]),n=q.useMemo(()=>new kA(i),[i]);return{resources:t,contextIdMap:n}}const xA=({boundaries:i,networkModel:e,onResourceHovered:t,sdkLanguage:n})=>{const[o,a]=q.useState(void 0),[c,u]=q.useState(void 0),[h,f]=q.useState(bA),y=q.useMemo(()=>c&&e.resources.includes(c.resource)?c:void 0,[c,e.resources]),{renderedEntries:m}=q.useMemo(()=>{const x=e.resources.map((E,C)=>NA(E,i,e.contextIdMap,C)).filter(RA(h));return o&&DA(x,o),{renderedEntries:x}},[e.resources,e.contextIdMap,h,o,i]),[_,b]=q.useState(()=>new Map(_v().map(x=>[x,EA(x)]))),S=q.useCallback(x=>{f(x),u(void 0)},[]);if(!e.resources.length)return T.jsx(Ls,{text:"No network calls"});const v=T.jsx(SA,{name:"network",ariaLabel:"Network requests",items:m,selectedItem:y,onSelected:x=>u(x),onHighlighted:x=>t==null?void 0:t(x==null?void 0:x.ordinal),columns:AA(!!y,m),columnTitle:TA,columnWidths:_,setColumnWidths:b,isError:x=>x.status.code>=400||x.status.code===-1,isInfo:x=>!!x.route,render:(x,E)=>CA(x,E),sorting:o,setSorting:a});return T.jsxs(T.Fragment,{children:[T.jsx(vA,{filterState:h,onFilterStateChange:S}),!y&&v,y&&T.jsx(Cc,{sidebarSize:_.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:T.jsx(cA,{resource:y.resource,sdkLanguage:n,startTimeOffset:y.start,onClose:()=>u(void 0)}),sidebar:v})]})},TA=i=>i==="contextId"?"Source":i==="name"?"Name":i==="method"?"Method":i==="status"?"Status":i==="contentType"?"Content Type":i==="duration"?"Duration":i==="size"?"Size":i==="start"?"Start":i==="route"?"Route":"",EA=i=>i==="name"?200:i==="method"||i==="status"?60:i==="contentType"?200:i==="contextId"?60:100;function AA(i,e){if(i){const n=["name"];return lb(e)&&n.unshift("contextId"),n}let t=_v();return lb(e)||(t=t.filter(n=>n!=="contextId")),t}function _v(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const CA=(i,e)=>e==="contextId"?{body:i.contextId,title:i.name.url}:e==="name"?{body:i.name.name,title:i.name.url}:e==="method"?{body:i.method}:e==="status"?{body:i.status.code>0?i.status.code:"",title:i.status.text}:e==="contentType"?{body:i.contentType}:e==="duration"?{body:Nt(i.duration)}:e==="size"?{body:nT(i.size)}:e==="start"?{body:Nt(i.start)}:e==="route"?{body:i.route}:{body:""};class kA{constructor(e){Xo(this,"_pagerefToShortId",new Map);Xo(this,"_contextToId",new Map);Xo(this,"_lastPageId",0);Xo(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let t=this._pagerefToShortId.get(e);return t||(++this._lastPageId,t="page#"+this._lastPageId,this._pagerefToShortId.set(e,t)),t}_apiRequestContextId(e){const t=H0(e);if(!t)return"";let n=this._contextToId.get(t);return n||(++this._lastApiRequestContextId,n="api#"+this._lastApiRequestContextId,this._contextToId.set(t,n)),n}}function lb(i){const e=new Set;for(const t of i)if(e.add(t.contextId),e.size>1)return!0;return!1}const NA=(i,e,t,n)=>{const o=MA(i);let a;try{const h=new URL(i.request.url);a=h.pathname.substring(h.pathname.lastIndexOf("/")+1),a||(a=h.host),h.search&&(a+=h.search)}catch{a=i.request.url}let c=i.response.content.mimeType;const u=c.match(/^(.*);\s*charset=.*$/);return u&&(c=u[1]),{ordinal:n,name:{name:a,url:i.request.url},method:i.request.method,status:{code:i.response.status,text:i.response.statusText},contentType:c,duration:i.time,size:i.response._transferSize>0?i.response._transferSize:i.response.bodySize,start:i._monotonicTime-e.minimum,route:o,resource:i,contextId:t.contextId(i)}};function MA(i){return i._wasAborted?"aborted":i._wasContinued?"continued":i._wasFulfilled?"fulfilled":i._apiRequest?"api":""}function DA(i,e){const t=LA(e==null?void 0:e.by);t&&i.sort(t),e.negate&&i.reverse()}function LA(i){if(i==="start")return(e,t)=>e.start-t.start;if(i==="duration")return(e,t)=>e.duration-t.duration;if(i==="status")return(e,t)=>e.status.code-t.status.code;if(i==="method")return(e,t)=>{const n=e.method,o=t.method;return n.localeCompare(o)};if(i==="size")return(e,t)=>e.size-t.size;if(i==="contentType")return(e,t)=>e.contentType.localeCompare(t.contentType);if(i==="name")return(e,t)=>e.name.name.localeCompare(t.name.name);if(i==="route")return(e,t)=>e.route.localeCompare(t.route);if(i==="contextId")return(e,t)=>e.contextId.localeCompare(t.contextId)}const OA={Fetch:i=>i==="application/json",HTML:i=>i==="text/html",CSS:i=>i==="text/css",JS:i=>i.includes("javascript"),Font:i=>i.includes("font"),Image:i=>i.includes("image")};function RA({searchValue:i,resourceTypes:e}){return t=>(e.size===0||Array.from(e).some(o=>OA[o](t.contentType)))&&t.name.url.toLowerCase().includes(i.toLowerCase())}function jA(i,e){if(i.role!==e.role||i.name!==e.name||!HA(i,e)||Dc(i)!==Dc(e))return!1;const t=Object.keys(i.props),n=Object.keys(e.props);return t.length===n.length&&t.every(o=>i.props[o]===e.props[o])}function Dc(i){return i.box.cursor==="pointer"}function HA(i,e){return i.active===e.active&&i.checked===e.checked&&i.disabled===e.disabled&&i.expanded===e.expanded&&i.selected===e.selected&&i.level===e.level&&i.pressed===e.pressed}function Jf(i,e,t={}){var _;const n=new i.LineCounter,o={keepSourceTokens:!0,lineCounter:n,...t},a=i.parseDocument(e,o),c=[],u=b=>[n.linePos(b[0]),n.linePos(b[1])],h=b=>{c.push({message:b.message,range:[n.linePos(b.pos[0]),n.linePos(b.pos[1])]})},f=(b,S)=>{for(const v of S.items){if(v instanceof i.Scalar&&typeof v.value=="string"){const C=Lc.parse(v,o,c);C&&(b.children=b.children||[],b.children.push(C));continue}if(v instanceof i.YAMLMap){y(b,v);continue}c.push({message:"Sequence items should be strings or maps",range:u(v.range||S.range)})}},y=(b,S)=>{for(const v of S.items){if(b.children=b.children||[],!(v.key instanceof i.Scalar&&typeof v.key.value=="string")){c.push({message:"Only string keys are supported",range:u(v.key.range||S.range)});continue}const E=v.key,C=v.value;if(E.value==="text"){if(!(C instanceof i.Scalar&&typeof C.value=="string")){c.push({message:"Text value should be a string",range:u(v.value.range||S.range)});continue}b.children.push({kind:"text",text:zh(C.value)});continue}if(E.value==="/children"){if(!(C instanceof i.Scalar&&typeof C.value=="string")||C.value!=="contain"&&C.value!=="equal"&&C.value!=="deep-equal"){c.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:u(v.value.range||S.range)});continue}b.containerMode=C.value;continue}if(E.value.startsWith("/")){if(!(C instanceof i.Scalar&&typeof C.value=="string")){c.push({message:"Property value should be a string",range:u(v.value.range||S.range)});continue}b.props=b.props??{},b.props[E.value.slice(1)]=zh(C.value);continue}const L=Lc.parse(E,o,c);if(!L)continue;if(C instanceof i.Scalar){const V=typeof C.value;if(V!=="string"&&V!=="number"&&V!=="boolean"){c.push({message:"Node value should be a string or a sequence",range:u(v.value.range||S.range)});continue}b.children.push({...L,children:[{kind:"text",text:zh(String(C.value))}]});continue}if(C instanceof i.YAMLSeq){b.children.push(L),f(L,C);continue}c.push({message:"Map values should be strings or sequences",range:u(v.value.range||S.range)})}},m={kind:"role",role:"fragment"};return a.errors.forEach(h),c.length?{errors:c,fragment:m}:(a.contents instanceof i.YAMLSeq||c.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:a.contents?u(a.contents.range):[{line:0,col:0},{line:0,col:0}]}),c.length?{errors:c,fragment:m}:(f(m,a.contents),c.length?{errors:c,fragment:$A}:((_=m.children)==null?void 0:_.length)===1&&(!m.containerMode||m.containerMode==="contain")?{fragment:m.children[0],errors:[]}:{fragment:m,errors:[]}))}const $A={kind:"role",role:"fragment"};function bv(i){return i.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function zh(i){return{raw:i,normalized:bv(i)}}class Lc{static parse(e,t,n){try{return new Lc(e.value)._parse()}catch(o){if(o instanceof cb){const a=t.prettyErrors===!1?o.message:o.message+`:
|
|
106
|
+
|
|
107
|
+
`+e.value+`
|
|
108
|
+
`+" ".repeat(o.pos)+`^
|
|
109
|
+
`;return n.push({message:a,range:[t.lineCounter.linePos(e.range[0]),t.lineCounter.linePos(e.range[0]+o.pos)]}),null}throw o}}constructor(e){this._input=e,this._pos=0,this._length=e.length}_peek(){return this._input[this._pos]||""}_next(){return this._pos<this._length?this._input[this._pos++]:null}_eof(){return this._pos>=this._length}_isWhitespace(){return!this._eof()&&/\s/.test(this._peek())}_skipWhitespace(){for(;this._isWhitespace();)this._pos++}_readIdentifier(e){this._eof()&&this._throwError(`Unexpected end of input when expecting ${e}`);const t=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(t,this._pos)}_readString(){let e="",t=!1;for(;!this._eof();){const n=this._next();if(t)e+=n,t=!1;else if(n==="\\")t=!0;else{if(n==='"')return e;e+=n}}this._throwError("Unterminated string")}_throwError(e,t=0){throw new cb(e,t||this._pos)}_readRegex(){let e="",t=!1,n=!1;for(;!this._eof();){const o=this._next();if(t)e+=o,t=!1;else if(o==="\\")t=!0,e+=o;else{if(o==="/"&&!n)return{pattern:e};o==="["?(n=!0,e+=o):o==="]"&&n?(e+=o,n=!1):e+=o}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),bv(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let t=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),t=this._pos;const n=this._readIdentifier("attribute");this._skipWhitespace();let o="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),t=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)o+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,n,o||"true",t)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const t=this._readStringOrRegex()||"",n={kind:"role",role:e,name:t};return this._readAttributes(n),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),n}_applyAttribute(e,t,n,o){if(t==="checked"){this._assert(n==="true"||n==="false"||n==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',o),e.checked=n==="true"?!0:n==="false"?!1:"mixed";return}if(t==="disabled"){this._assert(n==="true"||n==="false",'Value of "disabled" attribute must be a boolean',o),e.disabled=n==="true";return}if(t==="expanded"){this._assert(n==="true"||n==="false",'Value of "expanded" attribute must be a boolean',o),e.expanded=n==="true";return}if(t==="active"){this._assert(n==="true"||n==="false",'Value of "active" attribute must be a boolean',o),e.active=n==="true";return}if(t==="level"){this._assert(!isNaN(Number(n)),'Value of "level" attribute must be a number',o),e.level=Number(n);return}if(t==="pressed"){this._assert(n==="true"||n==="false"||n==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',o),e.pressed=n==="true"?!0:n==="false"?!1:"mixed";return}if(t==="selected"){this._assert(n==="true"||n==="false",'Value of "selected" attribute must be a boolean',o),e.selected=n==="true";return}this._assert(!1,`Unsupported attribute [${t}]`,o)}_assert(e,t,n){e||this._throwError(t||"Assertion error",n)}}class cb extends Error{constructor(e,t){super(e),this.pos=t}}function zA(i,e){var c,u;function t(h,f,y){let m=1,_=y+m;for(const b of h.children||[])typeof b=="string"?(m++,_++):(m+=t(b,f,_),_+=m);if(!["none","presentation","fragment","iframe","generic"].includes(h.role)&&h.name){let b=f.get(h.role);b||(b=new Map,f.set(h.role,b));const S=b.get(h.name),v=m*100-y;(!S||S.sizeAndPosition<v)&&b.set(h.name,{node:h,sizeAndPosition:v})}return m}const n=new Map;i&&t(i,n,0);const o=new Map;t(e,o,0);const a=[];for(const[h,f]of o)for(const[y,m]of f)((c=n.get(h))==null?void 0:c.get(y))||a.push(m);return a.sort((h,f)=>f.sizeAndPosition-h.sizeAndPosition),(u=a[0])==null?void 0:u.node}function IA(i){return vv(i)?"'"+i.replace(/'/g,"''")+"'":i}function Ih(i){return vv(i)?'"'+i.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
|
|
110
|
+
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':i}function vv(i){return!!(i.length===0||/^\s|\s$/.test(i)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(i)||/^-/.test(i)||/[\n:](\s|$)/.test(i)||/\s#/.test(i)||/[\n\r]/.test(i)||/^[&*\],?!>|@"'#%]/.test(i)||/[{}`]/.test(i)||/^\[/.test(i)||!isNaN(Number(i))||["y","n","yes","no","true","false","on","off","null"].includes(i.toLowerCase()))}let Sv={};function BA(i){Sv=i}function Ue(i,e){for(;e;){if(i.contains(e))return!0;e=xv(e)}return!1}function Ge(i){if(i.parentElement)return i.parentElement;if(i.parentNode&&i.parentNode.nodeType===11&&i.parentNode.host)return i.parentNode.host}function wv(i){let e=i;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function xv(i){for(;i.parentElement;)i=i.parentElement;return Ge(i)}function ca(i,e,t){for(;i;){const n=i.closest(e);if(t&&n!==t&&(n!=null&&n.contains(t)))return;if(n)return n;i=xv(i)}}function _n(i,e){const t=e==="::before"?Qf:e==="::after"?eg:Zf;if(t&&t.has(i))return t.get(i);const n=i.ownerDocument&&i.ownerDocument.defaultView?i.ownerDocument.defaultView.getComputedStyle(i,e):void 0;return t==null||t.set(i,n),n}function Tv(i,e){if(e=e??_n(i),!e)return!0;if(Element.prototype.checkVisibility&&Sv.browserNameForWorkarounds!=="webkit"){if(!i.checkVisibility())return!1}else{const t=i.closest("details,summary");if(t!==i&&(t==null?void 0:t.nodeName)==="DETAILS"&&!t.open)return!1}return e.visibility==="visible"}function Oc(i){const e=_n(i);if(!e)return{visible:!0,inline:!1};const t=e.cursor;if(e.display==="contents"){for(let o=i.firstChild;o;o=o.nextSibling){if(o.nodeType===1&&dt(o))return{visible:!0,inline:!1,cursor:t};if(o.nodeType===3&&Ev(o))return{visible:!0,inline:!0,cursor:t}}return{visible:!1,inline:!1,cursor:t}}if(!Tv(i,e))return{cursor:t,visible:!1,inline:!1};const n=i.getBoundingClientRect();return{cursor:t,visible:n.width>0&&n.height>0,inline:e.display==="inline"}}function dt(i){return Oc(i).visible}function Ev(i){const e=i.ownerDocument.createRange();e.selectNode(i);const t=e.getBoundingClientRect();return t.width>0&&t.height>0}function Qe(i){const e=i.tagName;return typeof e=="string"?e.toUpperCase():i instanceof HTMLFormElement?"FORM":i.tagName.toUpperCase()}let Zf,Qf,eg,Av=0;function tg(){++Av,Zf??(Zf=new Map),Qf??(Qf=new Map),eg??(eg=new Map)}function ng(){--Av||(Zf=void 0,Qf=void 0,eg=void 0)}function ub(i){return i.hasAttribute("aria-label")||i.hasAttribute("aria-labelledby")}const db="article:not([role]), aside:not([role]), main:not([role]), nav:not([role]), section:not([role]), [role=article], [role=complementary], [role=main], [role=navigation], [role=region]",PA=[["aria-atomic",void 0],["aria-busy",void 0],["aria-controls",void 0],["aria-current",void 0],["aria-describedby",void 0],["aria-details",void 0],["aria-dropeffect",void 0],["aria-flowto",void 0],["aria-grabbed",void 0],["aria-hidden",void 0],["aria-keyshortcuts",void 0],["aria-label",["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"]],["aria-labelledby",["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"]],["aria-live",void 0],["aria-owns",void 0],["aria-relevant",void 0],["aria-roledescription",["generic"]]];function Cv(i,e){return PA.some(([t,n])=>!(n!=null&&n.includes(e||""))&&i.hasAttribute(t))}function kv(i){return!Number.isNaN(Number(String(i.getAttribute("tabindex"))))}function qA(i){return!Iv(i)&&(UA(i)||kv(i))}function UA(i){const e=Qe(i);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?i.hasAttribute("href"):e==="INPUT"?!i.hidden:!1}const Bh={A:i=>i.hasAttribute("href")?"link":null,AREA:i=>i.hasAttribute("href")?"link":null,ARTICLE:()=>"article",ASIDE:()=>"complementary",BLOCKQUOTE:()=>"blockquote",BUTTON:()=>"button",CAPTION:()=>"caption",CODE:()=>"code",DATALIST:()=>"listbox",DD:()=>"definition",DEL:()=>"deletion",DETAILS:()=>"group",DFN:()=>"term",DIALOG:()=>"dialog",DT:()=>"term",EM:()=>"emphasis",FIELDSET:()=>"group",FIGURE:()=>"figure",FOOTER:i=>ca(i,db)?null:"contentinfo",FORM:i=>ub(i)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:i=>ca(i,db)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:i=>i.getAttribute("alt")===""&&!i.getAttribute("title")&&!Cv(i)&&!kv(i)?"presentation":"img",INPUT:i=>{const e=i.type.toLowerCase();if(e==="search")return i.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const t=Vr(i,i.getAttribute("list"))[0];return t&&Qe(t)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":rC[e]||"textbox"},INS:()=>"insertion",LI:()=>"listitem",MAIN:()=>"main",MARK:()=>"mark",MATH:()=>"math",MENU:()=>"list",METER:()=>"meter",NAV:()=>"navigation",OL:()=>"list",OPTGROUP:()=>"group",OPTION:()=>"option",OUTPUT:()=>"status",P:()=>"paragraph",PROGRESS:()=>"progressbar",SEARCH:()=>"search",SECTION:i=>ub(i)?"region":null,SELECT:i=>i.hasAttribute("multiple")||i.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:i=>{const e=ca(i,"table"),t=e?ig(e):"";return t==="grid"||t==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:i=>{const e=i.getAttribute("scope");if(e==="col"||e==="colgroup")return"columnheader";if(e==="row"||e==="rowgroup")return"rowheader";const t=i.nextElementSibling,n=i.previousElementSibling,o=i.parentElement&&Qe(i.parentElement)==="TR"?i.parentElement:void 0;if(!t&&!n){if(o){const a=ca(o,"table");if(a&&a.rows.length<=1)return null}return"columnheader"}return hb(t)&&hb(n)?"columnheader":fb(t)||fb(n)?"rowheader":"columnheader"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"};function hb(i){return!!i&&Qe(i)==="TH"}function fb(i){var e;return!i||Qe(i)!=="TD"?!1:!!((e=i.textContent)!=null&&e.trim()||i.children.length>0)}const VA={DD:["DL","DIV"],DIV:["DL"],DT:["DL","DIV"],LI:["OL","UL"],TBODY:["TABLE"],TD:["TR"],TFOOT:["TABLE"],TH:["TR"],THEAD:["TABLE"],TR:["THEAD","TBODY","TFOOT","TABLE"]};function gb(i){var n;const e=((n=Bh[Qe(i)])==null?void 0:n.call(Bh,i))||"";if(!e)return null;let t=i;for(;t;){const o=Ge(t),a=VA[Qe(t)];if(!a||!o||!a.includes(Qe(o)))break;const c=ig(o);if((c==="none"||c==="presentation")&&!Nv(o,c))return c;t=o}return e}const FA=["alert","alertdialog","application","article","banner","blockquote","button","caption","cell","checkbox","code","columnheader","combobox","complementary","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","grid","gridcell","group","heading","img","insertion","link","list","listbox","listitem","log","main","mark","marquee","math","meter","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","paragraph","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","strong","subscript","superscript","switch","tab","table","tablist","tabpanel","term","textbox","time","timer","toolbar","tooltip","tree","treegrid","treeitem"];function ig(i){return(i.getAttribute("role")||"").split(" ").map(t=>t.trim()).find(t=>FA.includes(t))||null}function Nv(i,e){return Cv(i,e)||qA(i)}function Pe(i){const e=ig(i);if(!e)return gb(i);if(e==="none"||e==="presentation"){const t=gb(i);if(Nv(i,t))return t}return e}function Mv(i){return i===null?void 0:i.toLowerCase()==="true"}function Dv(i){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Qe(i))}function gn(i){if(Dv(i))return!0;const e=_n(i),t=i.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!t){for(let o=i.firstChild;o;o=o.nextSibling)if(o.nodeType===1&&!gn(o)||o.nodeType===3&&Ev(o))return!1;return!0}return!(i.nodeName==="OPTION"&&!!i.closest("select"))&&!t&&!Tv(i,e)?!0:Lv(i)}function Lv(i){let e=Vi==null?void 0:Vi.get(i);if(e===void 0){if(e=!1,i.parentElement&&i.parentElement.shadowRoot&&!i.assignedSlot&&(e=!0),!e){const t=_n(i);e=!t||t.display==="none"||Mv(i.getAttribute("aria-hidden"))===!0}if(!e){const t=Ge(i);t&&(e=Lv(t))}Vi==null||Vi.set(i,e)}return e}function Vr(i,e){if(!e)return[];const t=wv(i);if(!t)return[];try{const n=e.split(" ").filter(a=>!!a),o=[];for(const a of n){const c=t.querySelector("#"+CSS.escape(a));c&&!o.includes(c)&&o.push(c)}return o}catch{return[]}}function li(i){return i.trim()}function ya(i){return i.split(" ").map(e=>e.replace(/\r\n/g,`
|
|
111
|
+
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function pb(i,e){const t=[...i.querySelectorAll(e)];for(const n of Vr(i,i.getAttribute("aria-owns")))n.matches(e)&&t.push(n),t.push(...n.querySelectorAll(e));return t}function _a(i,e){const t=e==="::before"?mg:e==="::after"?yg:pg;if(t!=null&&t.has(i))return t==null?void 0:t.get(i);const n=_n(i,e);let o;if(n){const a=n.content;a&&a!=="none"&&a!=="normal"&&n.display!=="none"&&n.visibility!=="hidden"&&(o=GA(i,a,!!e))}return e&&o!==void 0&&((n==null?void 0:n.display)||"inline")!=="inline"&&(o=" "+o+" "),t&&t.set(i,o),o}function GA(i,e,t){if(!(!e||e==="none"||e==="normal"))try{let n=$0(e).filter(u=>!(u instanceof kc));const o=n.findIndex(u=>u instanceof St&&u.value==="/");if(o!==-1)n=n.slice(o+1);else if(!t)return;const a=[];let c=0;for(;c<n.length;)if(n[c]instanceof Xf)a.push(n[c].value),c++;else if(c+2<n.length&&n[c]instanceof pa&&n[c].value==="attr"&&n[c+1]instanceof Gf&&n[c+2]instanceof Ff){const u=n[c+1].value;a.push(i.getAttribute(u)||""),c+=3}else return;return a.join("")}catch{}}function Ov(i){const e=i.getAttribute("aria-labelledby");if(e===null)return null;const t=Vr(i,e);return t.length?t:null}function XA(i,e){const t=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(i),n=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(i);return t||n}function di(i,e){const t=e?hg:dg;let n=t==null?void 0:t.get(i);return n===void 0&&(n="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(Pe(i)||"")||(n=ya(Cn(i,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),t==null||t.set(i,n)),n}function mb(i,e){const t=e?gg:fg;let n=t==null?void 0:t.get(i);if(n===void 0){if(n="",i.hasAttribute("aria-describedby")){const o=Vr(i,i.getAttribute("aria-describedby"));n=ya(o.map(a=>Cn(a,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:a,hidden:gn(a)}})).join(" "))}else i.hasAttribute("aria-description")?n=ya(i.getAttribute("aria-description")||""):n=ya(i.getAttribute("title")||"");t==null||t.set(i,n)}return n}function YA(i){const e=i.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function KA(i){if("validity"in i){const e=i.validity;return(e==null?void 0:e.valid)===!1}return!1}function WA(i){const e=kr;let t=kr==null?void 0:kr.get(i);if(t===void 0){t="";const n=YA(i)!=="false",o=KA(i);if(n||o){const a=i.getAttribute("aria-errormessage");t=Vr(i,a).map(h=>ya(Cn(h,{visitedElements:new Set,embeddedInDescribedBy:{element:h,hidden:gn(h)}}))).join(" ").trim()}e==null||e.set(i,t)}return t}function Cn(i,e){var h,f,y,m;if(e.visitedElements.has(i))return"";const t={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const _=!!((h=e.embeddedInLabelledBy)!=null&&h.hidden)||!!((f=e.embeddedInDescribedBy)!=null&&f.hidden)||!!((y=e.embeddedInNativeTextAlternative)!=null&&y.hidden)||!!((m=e.embeddedInLabel)!=null&&m.hidden);if(Dv(i)||!_&&gn(i))return e.visitedElements.add(i),""}const n=Ov(i);if(!e.embeddedInLabelledBy){const _=(n||[]).map(b=>Cn(b,{...e,embeddedInLabelledBy:{element:b,hidden:gn(b)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(_)return _}const o=Pe(i)||"",a=Qe(i);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const _=[...i.labels||[]].includes(i),b=(n||[]).includes(i);if(!_&&!b){if(o==="textbox")return e.visitedElements.add(i),a==="INPUT"||a==="TEXTAREA"?i.value:i.textContent||"";if(["combobox","listbox"].includes(o)){e.visitedElements.add(i);let S;if(a==="SELECT")S=[...i.selectedOptions],!S.length&&i.options.length&&S.push(i.options[0]);else{const v=o==="combobox"?pb(i,"*").find(x=>Pe(x)==="listbox"):i;S=v?pb(v,'[aria-selected="true"]').filter(x=>Pe(x)==="option"):[]}return!S.length&&a==="INPUT"?i.value:S.map(v=>Cn(v,t)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(o))return e.visitedElements.add(i),i.hasAttribute("aria-valuetext")?i.getAttribute("aria-valuetext")||"":i.hasAttribute("aria-valuenow")?i.getAttribute("aria-valuenow")||"":i.getAttribute("value")||"";if(["menu"].includes(o))return e.visitedElements.add(i),""}}const c=i.getAttribute("aria-label")||"";if(li(c))return e.visitedElements.add(i),c;if(!["presentation","none"].includes(o)){if(a==="INPUT"&&["button","submit","reset"].includes(i.type)){e.visitedElements.add(i);const _=i.value||"";return li(_)?_:i.type==="submit"?"Submit":i.type==="reset"?"Reset":i.getAttribute("title")||""}if(a==="INPUT"&&i.type==="file"){e.visitedElements.add(i);const _=i.labels||[];return _.length&&!e.embeddedInLabelledBy?Jo(_,e):"Choose File"}if(a==="INPUT"&&i.type==="image"){e.visitedElements.add(i);const _=i.labels||[];if(_.length&&!e.embeddedInLabelledBy)return Jo(_,e);const b=i.getAttribute("alt")||"";if(li(b))return b;const S=i.getAttribute("title")||"";return li(S)?S:"Submit"}if(!n&&a==="BUTTON"){e.visitedElements.add(i);const _=i.labels||[];if(_.length)return Jo(_,e)}if(!n&&a==="OUTPUT"){e.visitedElements.add(i);const _=i.labels||[];return _.length?Jo(_,e):i.getAttribute("title")||""}if(!n&&(a==="TEXTAREA"||a==="SELECT"||a==="INPUT")){e.visitedElements.add(i);const _=i.labels||[];if(_.length)return Jo(_,e);const b=a==="INPUT"&&["text","password","search","tel","email","url"].includes(i.type)||a==="TEXTAREA",S=i.getAttribute("placeholder")||"",v=i.getAttribute("title")||"";return!b||v?v:S}if(!n&&a==="FIELDSET"){e.visitedElements.add(i);for(let b=i.firstElementChild;b;b=b.nextElementSibling)if(Qe(b)==="LEGEND")return Cn(b,{...t,embeddedInNativeTextAlternative:{element:b,hidden:gn(b)}});return i.getAttribute("title")||""}if(!n&&a==="FIGURE"){e.visitedElements.add(i);for(let b=i.firstElementChild;b;b=b.nextElementSibling)if(Qe(b)==="FIGCAPTION")return Cn(b,{...t,embeddedInNativeTextAlternative:{element:b,hidden:gn(b)}});return i.getAttribute("title")||""}if(a==="IMG"){e.visitedElements.add(i);const _=i.getAttribute("alt")||"";return li(_)?_:i.getAttribute("title")||""}if(a==="TABLE"){e.visitedElements.add(i);for(let b=i.firstElementChild;b;b=b.nextElementSibling)if(Qe(b)==="CAPTION")return Cn(b,{...t,embeddedInNativeTextAlternative:{element:b,hidden:gn(b)}});const _=i.getAttribute("summary")||"";if(_)return _}if(a==="AREA"){e.visitedElements.add(i);const _=i.getAttribute("alt")||"";return li(_)?_:i.getAttribute("title")||""}if(a==="SVG"||i.ownerSVGElement){e.visitedElements.add(i);for(let _=i.firstElementChild;_;_=_.nextElementSibling)if(Qe(_)==="TITLE"&&_.ownerSVGElement)return Cn(_,{...t,embeddedInLabelledBy:{element:_,hidden:gn(_)}})}if(i.ownerSVGElement&&a==="A"){const _=i.getAttribute("xlink:title")||"";if(li(_))return e.visitedElements.add(i),_}}const u=a==="SUMMARY"&&!["presentation","none"].includes(o);if(XA(o,e.embeddedInTargetElement==="descendant")||u||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(i);const _=JA(i,t);if(e.embeddedInTargetElement==="self"?li(_):_)return _}if(!["presentation","none"].includes(o)||a==="IFRAME"){e.visitedElements.add(i);const _=i.getAttribute("title")||"";if(li(_))return _}return e.visitedElements.add(i),""}function JA(i,e){const t=[],n=(a,c)=>{var u;if(!(c&&a.assignedSlot))if(a.nodeType===1){const h=((u=_n(a))==null?void 0:u.display)||"inline";let f=Cn(a,e);(h!=="inline"||a.nodeName==="BR")&&(f=" "+f+" "),t.push(f)}else a.nodeType===3&&t.push(a.textContent||"")};t.push(_a(i,"::before")||"");const o=_a(i);if(o!==void 0)t.push(o);else{const a=i.nodeName==="SLOT"?i.assignedNodes():[];if(a.length)for(const c of a)n(c,!1);else{for(let c=i.firstChild;c;c=c.nextSibling)n(c,!0);if(i.shadowRoot)for(let c=i.shadowRoot.firstChild;c;c=c.nextSibling)n(c,!0);for(const c of Vr(i,i.getAttribute("aria-owns")))n(c,!0)}}return t.push(_a(i,"::after")||""),t.join("")}const sg=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function Rv(i){return Qe(i)==="OPTION"?i.selected:sg.includes(Pe(i)||"")?Mv(i.getAttribute("aria-selected"))===!0:!1}const rg=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function jv(i){const e=og(i,!0);return e==="error"?!1:e}function ZA(i){return og(i,!0)}function QA(i){return og(i,!1)}function og(i,e){const t=Qe(i);if(e&&t==="INPUT"&&i.indeterminate)return"mixed";if(t==="INPUT"&&["checkbox","radio"].includes(i.type))return i.checked;if(rg.includes(Pe(i)||"")){const n=i.getAttribute("aria-checked");return n==="true"?!0:e&&n==="mixed"?"mixed":!1}return"error"}const eC=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function tC(i){const e=Qe(i);return["INPUT","TEXTAREA","SELECT"].includes(e)?i.hasAttribute("readonly"):eC.includes(Pe(i)||"")?i.getAttribute("aria-readonly")==="true":i.isContentEditable?!1:"error"}const ag=["button"];function Hv(i){if(ag.includes(Pe(i)||"")){const e=i.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const lg=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function cg(i){if(Qe(i)==="DETAILS")return i.open;if(lg.includes(Pe(i)||"")){const e=i.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const ug=["heading","listitem","row","treeitem"];function $v(i){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Qe(i)];if(e)return e;if(ug.includes(Pe(i)||"")){const t=i.getAttribute("aria-level"),n=t===null?Number.NaN:Number(t);if(Number.isInteger(n)&&n>=1)return n}return 0}const zv=["application","button","composite","gridcell","group","input","link","menuitem","scrollbar","separator","tab","checkbox","columnheader","combobox","grid","listbox","menu","menubar","menuitemcheckbox","menuitemradio","option","radio","radiogroup","row","rowheader","searchbox","select","slider","spinbutton","switch","tablist","textbox","toolbar","tree","treegrid","treeitem"];function Rc(i){return Iv(i)||Bv(i)}function Iv(i){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(Qe(i))&&(i.hasAttribute("disabled")||nC(i)||iC(i))}function nC(i){return Qe(i)==="OPTION"&&!!i.closest("OPTGROUP[DISABLED]")}function iC(i){const e=i==null?void 0:i.closest("FIELDSET[DISABLED]");if(!e)return!1;const t=e.querySelector(":scope > LEGEND");return!t||!t.contains(i)}function Bv(i,e=!1){if(!i)return!1;if(e||zv.includes(Pe(i)||"")){const t=(i.getAttribute("aria-disabled")||"").toLowerCase();return t==="true"?!0:t==="false"?!1:Bv(Ge(i),!0)}return!1}function Jo(i,e){return[...i].map(t=>Cn(t,{...e,embeddedInLabel:{element:t,hidden:gn(t)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(t=>!!t).join(" ")}function sC(i){const e=_g;let t=i,n;const o=[];for(;t;t=Ge(t)){const a=e.get(t);if(a!==void 0){n=a;break}o.push(t);const c=_n(t);if(!c){n=!0;break}const u=c.pointerEvents;if(u){n=u!=="none";break}}n===void 0&&(n=!0);for(const a of o)e.set(a,n);return n}let dg,hg,fg,gg,kr,Vi,pg,mg,yg,_g,Pv=0;function Yc(){tg(),++Pv,dg??(dg=new Map),hg??(hg=new Map),fg??(fg=new Map),gg??(gg=new Map),kr??(kr=new Map),Vi??(Vi=new Map),pg??(pg=new Map),mg??(mg=new Map),yg??(yg=new Map),_g??(_g=new Map)}function Kc(){--Pv||(dg=void 0,hg=void 0,fg=void 0,gg=void 0,kr=void 0,Vi=void 0,pg=void 0,mg=void 0,yg=void 0,_g=void 0),ng()}const rC={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};let oC=0;function qv(i){return i.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:i.refPrefix,includeGenericRole:!0,renderActive:!i.doNotRenderActive,renderCursorPointer:!0}:i.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:i.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function ba(i,e){const t=qv(e),n=new Set,o={root:{role:"fragment",name:"",children:[],props:{},box:Oc(i),receivesPointerEvents:!0},elements:new Map,refs:new Map,iframeRefs:[]};Tf(o.root,i);const a=(u,h,f)=>{if(n.has(h))return;if(n.add(h),h.nodeType===Node.TEXT_NODE&&h.nodeValue){if(!f)return;const v=h.nodeValue;u.role!=="textbox"&&v&&u.children.push(h.nodeValue||"");return}if(h.nodeType!==Node.ELEMENT_NODE)return;const y=h,m=!gn(y);let _=m;if(t.visibility==="ariaOrVisible"&&(_=m||dt(y)),t.visibility==="ariaAndVisible"&&(_=m&&dt(y)),t.visibility==="aria"&&!_)return;const b=[];if(y.hasAttribute("aria-owns")){const v=y.getAttribute("aria-owns").split(/\s+/);for(const x of v){const E=i.ownerDocument.getElementById(x);E&&b.push(E)}}const S=_?lC(y,t):null;S&&(S.ref&&(o.elements.set(S.ref,y),o.refs.set(y,S.ref),S.role==="iframe"&&o.iframeRefs.push(S.ref)),u.children.push(S)),c(S||u,y,b,_)};function c(u,h,f,y){var S;const _=(((S=_n(h))==null?void 0:S.display)||"inline")!=="inline"||h.nodeName==="BR"?" ":"";_&&u.children.push(_),u.children.push(_a(h,"::before")||"");const b=h.nodeName==="SLOT"?h.assignedNodes():[];if(b.length)for(const v of b)a(u,v,y);else{for(let v=h.firstChild;v;v=v.nextSibling)v.assignedSlot||a(u,v,y);if(h.shadowRoot)for(let v=h.shadowRoot.firstChild;v;v=v.nextSibling)a(u,v,y)}for(const v of f)a(u,v,y);if(u.children.push(_a(h,"::after")||""),_&&u.children.push(_),u.children.length===1&&u.name===u.children[0]&&(u.children=[]),u.role==="link"&&h.hasAttribute("href")){const v=h.getAttribute("href");u.props.url=v}if(u.role==="textbox"&&h.hasAttribute("placeholder")&&h.getAttribute("placeholder")!==u.name){const v=h.getAttribute("placeholder");u.props.placeholder=v}}Yc();try{a(o.root,i,!0)}finally{Kc()}return uC(o.root),cC(o.root),o}function yb(i,e){if(e.refs==="none"||e.refs==="interactable"&&(!i.box.visible||!i.receivesPointerEvents))return;const t=vg(i);let n=t._ariaRef;(!n||n.role!==i.role||n.name!==i.name)&&(n={role:i.role,name:i.name,ref:(e.refPrefix??"")+"e"+ ++oC},t._ariaRef=n),i.ref=n.ref}function aC(i,e){const t=i.nodeName;if(t==="A"||t==="BUTTON"||e.cursor==="pointer")return!0;const n=i.getAttribute("tabindex");return n!==null&&Number(n)>=0}function lC(i,e){const t=i.ownerDocument.activeElement===i;if(i.nodeName==="IFRAME"){const f={role:"iframe",name:"",children:[],props:{},box:Oc(i),receivesPointerEvents:!0,active:t};return Tf(f,i),yb(f,e),f}const n=e.includeGenericRole?"generic":null,o=Pe(i)??n;if(!o||o==="presentation"||o==="none")return null;const a=Mt(di(i,!1)||""),c=sC(i),u=Oc(i);if(o==="generic"&&u.inline&&i.childNodes.length===1&&i.childNodes[0].nodeType===Node.TEXT_NODE&&!aC(i,u))return null;const h={role:o,name:a,children:[],props:{},box:u,receivesPointerEvents:c,active:t};return Tf(h,i),yb(h,e),rg.includes(o)&&(h.checked=jv(i)),zv.includes(o)&&(h.disabled=Rc(i)),lg.includes(o)&&(h.expanded=cg(i)),ug.includes(o)&&(h.level=$v(i)),ag.includes(o)&&(h.pressed=Hv(i)),sg.includes(o)&&(h.selected=Rv(i)),(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)&&i.type!=="checkbox"&&i.type!=="radio"&&i.type!=="file"&&(h.children=[i.value]),h}function cC(i){const e=t=>{const n=[];for(const a of t.children||[]){if(typeof a=="string"){n.push(a);continue}const c=e(a);n.push(...c)}return t.role==="generic"&&!t.name&&n.length<=1&&n.every(a=>typeof a!="string"&&!!a.ref)?n:(t.children=n,[t])};e(i)}function uC(i){const e=(n,o)=>{if(!n.length)return;const a=Mt(n.join(""));a&&o.push(a),n.length=0},t=n=>{const o=[],a=[];for(const c of n.children||[])typeof c=="string"?a.push(c):(e(a,o),t(c),o.push(c));e(a,o),n.children=o.length?o:[],n.children.length===1&&n.children[0]===n.name&&(n.children=[])};t(i)}function dC(i,e){return e?i?typeof e=="string"?i===e:!!i.match(new RegExp(e.pattern)):!1:!0}function _b(i,e){if(!(e!=null&&e.normalized))return!0;if(!i)return!1;if(i===e.normalized||i===e.raw)return!0;const t=hC(e);return t?!!i.match(t):!1}const Ph=Symbol("cachedRegex");function hC(i){if(i[Ph]!==void 0)return i[Ph];const{raw:e}=i,t=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let n;try{n=t?new RegExp(e.slice(1,-1)):null}catch{n=null}return i[Ph]=n,n}function fC(i,e){const t=ba(i,{mode:"expect"});return{matches:Uv(t.root,e,!1,!1),received:{raw:va(t,{mode:"expect"}),regex:va(t,{mode:"codegen"})}}}function gC(i,e){const t=ba(i,{mode:"expect"}).root;return Uv(t,e,!0,!1).map(o=>vg(o))}function bg(i,e,t){var n;return typeof i=="string"&&e.kind==="text"?_b(i,e.text):i===null||typeof i!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==i.role||e.checked!==void 0&&e.checked!==i.checked||e.disabled!==void 0&&e.disabled!==i.disabled||e.expanded!==void 0&&e.expanded!==i.expanded||e.level!==void 0&&e.level!==i.level||e.pressed!==void 0&&e.pressed!==i.pressed||e.selected!==void 0&&e.selected!==i.selected||!dC(i.name,e.name)||!_b(i.props.url,(n=e.props)==null?void 0:n.url)?!1:e.containerMode==="contain"?vb(i.children||[],e.children||[]):e.containerMode==="equal"?bb(i.children||[],e.children||[],!1):e.containerMode==="deep-equal"||t?bb(i.children||[],e.children||[],!0):vb(i.children||[],e.children||[])}function bb(i,e,t){if(e.length!==i.length)return!1;for(let n=0;n<e.length;++n)if(!bg(i[n],e[n],t))return!1;return!0}function vb(i,e){if(e.length>i.length)return!1;const t=i.slice(),n=e.slice();for(const o of n){let a=t.shift();for(;a&&!bg(a,o,!1);)a=t.shift();if(!a)return!1}return!0}function Uv(i,e,t,n){const o=[],a=(c,u)=>{if(bg(c,e,n)){const h=typeof c=="string"?u:c;return h&&o.push(h),!t}if(typeof c=="string")return!1;for(const h of c.children||[])if(a(h,c))return!0;return!1};return a(i,null),o}function Vv(i,e=new Map){i!=null&&i.ref&&e.set(i.ref,i);for(const t of(i==null?void 0:i.children)||[])typeof t!="string"&&Vv(t,e);return e}function pC(i,e){var a;const t=Vv(e==null?void 0:e.root),n=new Map,o=(c,u)=>{let h=c.children.length===(u==null?void 0:u.children.length)&&jA(c,u),f=h;for(let y=0;y<c.children.length;y++){const m=c.children[y],_=u==null?void 0:u.children[y];if(typeof m=="string")h&&(h=m===_),f&&(f=m===_);else{let b=typeof _!="string"?_:void 0;m.ref&&(b=t.get(m.ref));const S=o(m,b);(!b||!S&&!m.ref||b!==_)&&(f=!1),h&&(h=S&&b===_)}}return n.set(c,h?"same":f?"skip":"changed"),h};return o(i.root,t.get((a=e==null?void 0:e.root)==null?void 0:a.ref)),n}function mC(i,e){const t=[],n=o=>{const a=e.get(o);if(a!=="same")if(a==="skip")for(const c of o.children)typeof c!="string"&&n(c);else t.push(o)};for(const o of i)typeof o=="string"?t.push(o):n(o);return t}function va(i,e,t){const n=qv(e),o=[],a=n.renderStringsAsRegex?_C:()=>!0,c=n.renderStringsAsRegex?yC:b=>b;let u=i.root.role==="fragment"?i.root.children:[i.root];const h=pC(i,t);t&&(u=mC(u,h));const f=(b,S)=>{const v=Ih(c(b));v&&o.push(S+"- text: "+v)},y=(b,S)=>{let v=b.role;if(b.name&&b.name.length<=900){const x=c(b.name);if(x){const E=x.startsWith("/")&&x.endsWith("/")?x:JSON.stringify(x);v+=" "+E}}return b.checked==="mixed"&&(v+=" [checked=mixed]"),b.checked===!0&&(v+=" [checked]"),b.disabled&&(v+=" [disabled]"),b.expanded&&(v+=" [expanded]"),b.active&&n.renderActive&&(v+=" [active]"),b.level&&(v+=` [level=${b.level}]`),b.pressed==="mixed"&&(v+=" [pressed=mixed]"),b.pressed===!0&&(v+=" [pressed]"),b.selected===!0&&(v+=" [selected]"),b.ref&&(v+=` [ref=${b.ref}]`,S&&Dc(b)&&(v+=" [cursor=pointer]")),v},m=b=>(b==null?void 0:b.children.length)===1&&typeof b.children[0]=="string"&&!Object.keys(b.props).length?b.children[0]:void 0,_=(b,S,v)=>{if(h.get(b)==="same"&&b.ref){o.push(S+`- ref=${b.ref} [unchanged]`);return}const x=!!t&&!S,E=S+"- "+(x?"<changed> ":"")+IA(y(b,v)),C=m(b);if(!b.children.length&&!Object.keys(b.props).length)o.push(E);else if(C!==void 0)a(b,C)?o.push(E+": "+Ih(c(C))):o.push(E);else{o.push(E+":");for(const[N,V]of Object.entries(b.props))o.push(S+" - /"+N+": "+Ih(V));const L=S+" ",R=!!b.ref&&v&&Dc(b);for(const N of b.children)typeof N=="string"?f(a(b,N)?N:"",L):_(N,L,v&&!R)}};for(const b of u)typeof b=="string"?f(b,""):_(b,"",!!n.renderCursorPointer);return o.join(`
|
|
112
|
+
`)}function yC(i){const e=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let t="",n=0;const o=new RegExp(e.map(a=>"("+a.regex.source+")").join("|"),"g");return i.replace(o,(a,...c)=>{const u=c[c.length-2],h=c.slice(0,-2);t+=wa(i.slice(n,u));for(let f=0;f<h.length;f++)if(h[f]){const{replacement:y}=e[f];t+=y;break}return n=u+a.length,a}),t?(t+=wa(i.slice(n)),String(new RegExp(t))):i}function _C(i,e){if(!e.length)return!1;if(!i.name)return!0;if(i.name.length>e.length)return!1;const t=e.length<=200&&i.name.length<=200?ZT(e,i.name):"";let n=e;for(;t&&n.includes(t);)n=n.replace(t,"");return n.trim().length/e.length>.1}const Fv=Symbol("element");function vg(i){return i[Fv]}function Tf(i,e){i[Fv]=e}function bC(i,e){const t=zA(i,e);return t?vg(t):void 0}const Sb=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;z-index:10;font-size:13px}x-pw-dialog:not(.autosize){width:400px;min-height:150px;max-height:80vh;max-width:80vw;resize:both;overflow:hidden}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.record.toggled>x-div{clip-path:url(#icon-stop-circle)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.visual-snapshot>x-div{clip-path:url(#icon-snapshot)}x-pw-tool-item.table>x-div{clip-path:url(#icon-table)}x-pw-tool-item.file-upload>x-div{clip-path:url(#icon-file-upload)}x-pw-tool-item.customjson>x-div{clip-path:url(#icon-brackets)}x-pw-tool-item.assert-api-payload>x-div{clip-path:url(#icon-braces-dashes)}x-pw-tool-item.assert-api-payload.toggled>x-div{background-color:#1a73e8}x-pw-tool-item.customjson.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.customjson.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.modular>x-div{clip-path:url(#icon-list-tree);background-color:#3a3a3a}x-pw-tool-item.modular.toggled{background-color:transparent}x-pw-tool-item.modular.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.modular.toggled>x-div{background-color:#1a73e8}x-pw-tool-item.modular.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.modular.disabled.toggled>x-div{opacity:.8}@keyframes modular-pulse{0%{box-shadow:0 0 #1a73e866}70%{box-shadow:0 0 0 4px #1a73e800}to{box-shadow:0 0 #1a73e800}}x-pw-tool-item.modular.toggled{animation:modular-pulse 2s infinite}x-pw-tool-item.drag-record>x-div{clip-path:url(#icon-move)}x-pw-tool-item.gojs-link>x-div{clip-path:url(#icon-gojs-link)}x-pw-tool-item.area-select>x-div{clip-path:url(#icon-selection)}x-pw-tool-item.mouse-path>x-div{clip-path:url(#icon-sketch-tool);transform:scale(.16);transform-origin:0 0;width:100px!important;height:100px!important}x-pw-tool-item.mouse-path.toggled>x-div{background-color:#dc3545}x-pw-tool-item.sketch-tool>x-div{clip-path:url(#icon-sketch-tool);transform:scale(.16);transform-origin:0 0;width:100px!important;height:100px!important}x-pw-tool-item.sketch-tool.toggled>x-div{background-color:#dc3545}x-pw-tool-item.pointer-events>x-div{clip-path:url(#icon-layers)}x-pw-tool-item.pointer-events>x-div{clip-path:url(#icon-layers)}.pw-sketch-tool-cursor{cursor:pointer!important}.pw-deletion-trail{position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:2147483646}.pw-deletion-path{stroke:#dc354580;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;fill:none}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-item.succeeded>x-div{clip-path:url(#icon-pass);background-color:#388a34!important}x-pw-overlay{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}x-pw-action-list{flex:auto;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}x-pw-action-item{padding:6px 10px;cursor:pointer;overflow:hidden}x-pw-action-item:hover{background-color:#f2f2f2}x-pw-action-item:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}";class qh{constructor(e){this._renderedEntries=[],this._language="javascript",this._injectedScript=e;const t=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=t.createElement("x-pw-glass"),this._glassPaneElement.style.position="fixed",this._glassPaneElement.style.top="0",this._glassPaneElement.style.right="0",this._glassPaneElement.style.bottom="0",this._glassPaneElement.style.left="0",this._glassPaneElement.style.zIndex="2147483647",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent",this._actionPointElement=t.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const n=new this._injectedScript.window.CSSStyleSheet;n.replaceSync(Sb),this._glassPaneShadow.adoptedStyleSheets.push(n)}else{const n=this._injectedScript.document.createElement("style");n.textContent=Sb,this._glassPaneShadow.appendChild(n)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&(!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest);const t=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),n=Yi(this._language,$n(e)),o=t.length>1?"#f6b26b7f":"#6fa8dc7f";this.updateHighlight(t.map((a,c)=>{const u=t.length>1?` [${c+1} of ${t.length}]`:"";return{element:a,color:o,tooltipText:n+u}})),this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(()=>this.runHighlightOnRaf(e))}uninstall(){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),this._glassPaneElement.remove()}showActionPoint(e,t){this._actionPointElement.style.top=t+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,t;for(const n of this._renderedEntries)(e=n.highlightElement)==null||e.remove(),(t=n.tooltipElement)==null||t.remove();this._renderedEntries=[]}maskElements(e,t){this.updateHighlight(e.map(n=>({element:n,color:t})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const t of e){const n=this._createHighlightElement();this._glassPaneShadow.appendChild(n);let o;if(t.tooltipText){o=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(o),o.style.top="0",o.style.left="0",o.style.display="flex";const a=this._injectedScript.document.createElement("x-pw-tooltip-line");a.textContent=t.tooltipText,o.appendChild(a)}this._renderedEntries.push({targetElement:t.element,color:t.color,tooltipElement:o,highlightElement:n})}for(const t of this._renderedEntries){if(t.box=t.targetElement.getBoundingClientRect(),!t.tooltipElement)continue;const{anchorLeft:n,anchorTop:o}=this.tooltipPosition(t.box,t.tooltipElement);t.tooltipTop=o,t.tooltipLeft=n}for(const t of this._renderedEntries){t.tooltipElement&&(t.tooltipElement.style.top=t.tooltipTop+"px",t.tooltipElement.style.left=t.tooltipLeft+"px");const n=t.box;t.highlightElement.style.backgroundColor=t.color,t.highlightElement.style.left=n.x+"px",t.highlightElement.style.top=n.y+"px",t.highlightElement.style.width=n.width+"px",t.highlightElement.style.height=n.height+"px",t.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:n.x,y:n.y,width:n.width,height:n.height}))}}}firstBox(){var e;return(e=this._renderedEntries[0])==null?void 0:e.box}firstTooltipBox(){const e=this._renderedEntries[0];if(!(!e||!e.tooltipElement||e.tooltipLeft===void 0||e.tooltipTop===void 0))return{x:e.tooltipLeft,y:e.tooltipTop,left:e.tooltipLeft,top:e.tooltipTop,width:e.tooltipElement.offsetWidth,height:e.tooltipElement.offsetHeight,bottom:e.tooltipTop+e.tooltipElement.offsetHeight,right:e.tooltipLeft+e.tooltipElement.offsetWidth,toJSON:()=>{}}}tooltipPosition(e,t){const n=t.offsetWidth,o=t.offsetHeight,a=this._glassPaneElement.offsetWidth,c=this._glassPaneElement.offsetHeight;let u=Math.max(5,e.left);u+n>a-5&&(u=a-n-5);let h=Math.max(0,e.bottom)+5;return h+o>c-5&&(Math.max(0,e.top)>o+5?h=Math.max(0,e.top)-o-5:h=c-5-o),{anchorLeft:u,anchorTop:h}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let t=0;t<this._renderedEntries.length;++t){if(e[t].element!==this._renderedEntries[t].targetElement||e[t].color!==this._renderedEntries[t].color)return!1;const n=this._renderedEntries[t].box;if(!n)return!1;const o=e[t].element.getBoundingClientRect();if(o.top!==n.top||o.right!==n.right||o.bottom!==n.bottom||o.left!==n.left)return!1}return!0}_createHighlightElement(){return this._injectedScript.document.createElement("x-pw-highlight")}appendChild(e){this._glassPaneShadow.appendChild(e)}onGlassPaneClick(e){this._glassPaneElement.style.pointerEvents="auto",this._glassPaneElement.style.backgroundColor="rgba(0, 0, 0, 0.3)",this._glassPaneElement.addEventListener("click",e)}offGlassPaneClick(e){this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.backgroundColor="transparent",this._glassPaneElement.removeEventListener("click",e)}}function vC(i,e,t){const n=i.left-e.right;if(!(n<0||t!==void 0&&n>t))return n+Math.max(e.bottom-i.bottom,0)+Math.max(i.top-e.top,0)}function SC(i,e,t){const n=e.left-i.right;if(!(n<0||t!==void 0&&n>t))return n+Math.max(e.bottom-i.bottom,0)+Math.max(i.top-e.top,0)}function wC(i,e,t){const n=e.top-i.bottom;if(!(n<0||t!==void 0&&n>t))return n+Math.max(i.left-e.left,0)+Math.max(e.right-i.right,0)}function xC(i,e,t){const n=i.top-e.bottom;if(!(n<0||t!==void 0&&n>t))return n+Math.max(i.left-e.left,0)+Math.max(e.right-i.right,0)}function TC(i,e,t){const n=t===void 0?50:t;let o=0;return i.left-e.right>=0&&(o+=i.left-e.right),e.left-i.right>=0&&(o+=e.left-i.right),e.top-i.bottom>=0&&(o+=e.top-i.bottom),i.top-e.bottom>=0&&(o+=i.top-e.bottom),o>n?void 0:o}const EC=["left-of","right-of","above","below","near"];function Gv(i,e,t,n){const o=e.getBoundingClientRect(),a={"left-of":SC,"right-of":vC,above:wC,below:xC,near:TC}[i];let c;for(const u of t){if(u===e)continue;const h=a(o,u.getBoundingClientRect(),n);h!==void 0&&(c===void 0||h<c)&&(c=h)}return c}function Xv(i,e){for(const t of e.jsonPath)i!=null&&(i=i[t]);return Yv(i,e)}function Yv(i,e){const t=typeof i=="string"&&!e.caseSensitive?i.toUpperCase():i,n=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!t:e.op==="="?n instanceof RegExp?typeof t=="string"&&!!t.match(n):t===n:typeof t!="string"||typeof n!="string"?!1:e.op==="*="?t.includes(n):e.op==="^="?t.startsWith(n):e.op==="$="?t.endsWith(n):e.op==="|="?t===n||t.startsWith(n+"-"):e.op==="~="?t.split(" ").includes(n):!1}function Sg(i){const e=i.ownerDocument;return i.nodeName==="SCRIPT"||i.nodeName==="NOSCRIPT"||i.nodeName==="STYLE"||e.head&&e.head.contains(i)}function Ut(i,e){let t=i.get(e);if(t===void 0){if(t={full:"",normalized:"",immediate:[]},!Sg(e)){let n="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))t={full:e.value,normalized:Mt(e.value),immediate:[e.value]};else{for(let o=e.firstChild;o;o=o.nextSibling)if(o.nodeType===Node.TEXT_NODE)t.full+=o.nodeValue||"",n+=o.nodeValue||"";else{if(o.nodeType===Node.COMMENT_NODE)continue;n&&t.immediate.push(n),n="",o.nodeType===Node.ELEMENT_NODE&&(t.full+=Ut(i,o).full)}n&&t.immediate.push(n),e.shadowRoot&&(t.full+=Ut(i,e.shadowRoot).full),t.full&&(t.normalized=Mt(t.full))}}i.set(e,t)}return t}function Wc(i,e,t){if(Sg(e)||!t(Ut(i,e)))return"none";for(let n=e.firstChild;n;n=n.nextSibling)if(n.nodeType===Node.ELEMENT_NODE&&t(Ut(i,n)))return"selfAndChildren";return e.shadowRoot&&t(Ut(i,e.shadowRoot))?"selfAndChildren":"self"}function Kv(i,e){const t=Ov(e);if(t)return t.map(a=>Ut(i,a));const n=e.getAttribute("aria-label");if(n!==null&&n.trim())return[{full:n,normalized:Mt(n),immediate:[n]}];const o=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||o){const a=e.labels;if(a)return[...a].map(c=>Ut(i,c))}return[]}function wb(i){return i.displayName||i.name||"Anonymous"}function AC(i){if(i.type)switch(typeof i.type){case"function":return wb(i.type);case"string":return i.type;case"object":return i.type.displayName||(i.type.render?wb(i.type.render):"")}if(i._currentElement){const e=i._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function CC(i){var e;return i.key??((e=i._currentElement)==null?void 0:e.key)}function kC(i){if(i.child){const t=[];for(let n=i.child;n;n=n.sibling)t.push(n);return t}if(!i._currentElement)return[];const e=t=>{var o;const n=(o=t._currentElement)==null?void 0:o.type;return typeof n=="function"||typeof n=="string"};if(i._renderedComponent){const t=i._renderedComponent;return e(t)?[t]:[]}return i._renderedChildren?[...Object.values(i._renderedChildren)].filter(e):[]}function NC(i){var n;const e=i.memoizedProps||((n=i._currentElement)==null?void 0:n.props);if(!e||typeof e=="string")return e;const t={...e};return delete t.children,t}function Wv(i){var n;const e={key:CC(i),name:AC(i),children:kC(i).map(Wv),rootElements:[],props:NC(i)},t=i.stateNode||i._hostNode||((n=i._renderedComponent)==null?void 0:n._hostNode);if(t instanceof Element)e.rootElements.push(t);else for(const o of e.children)e.rootElements.push(...o.rootElements);return e}function Jv(i,e,t=[]){e(i)&&t.push(i);for(const n of i.children)Jv(n,e,t);return t}function Zv(i,e=[]){const n=(i.ownerDocument||i).createTreeWalker(i,NodeFilter.SHOW_ELEMENT);do{const o=n.currentNode,a=o,c=Object.keys(a).find(h=>h.startsWith("__reactContainer")&&a[h]!==null);if(c)e.push(a[c].stateNode.current);else{const h="_reactRootContainer";a.hasOwnProperty(h)&&a[h]!==null&&e.push(a[h]._internalRoot.current)}if(o instanceof Element&&o.hasAttribute("data-reactroot"))for(const h of Object.keys(o))(h.startsWith("__reactInternalInstance")||h.startsWith("__reactFiber"))&&e.push(o[h]);const u=o instanceof Element?o.shadowRoot:null;u&&Zv(u,e)}while(n.nextNode());return e}const MC=()=>({queryAll(i,e){const{name:t,attributes:n}=ks(e,!1),c=Zv(i.ownerDocument||i).map(h=>Wv(h)).map(h=>Jv(h,f=>{const y=f.props??{};if(f.key!==void 0&&(y.key=f.key),t&&f.name!==t||f.rootElements.some(m=>!Ue(i,m)))return!1;for(const m of n)if(!Xv(y,m))return!1;return!0})).flat(),u=new Set;for(const h of c)for(const f of h.rootElements)u.add(f);return[...u]}}),Qv=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];Qv.sort();function Zo(i,e,t){if(!e.includes(t))throw new Error(`"${i}" attribute is only supported for roles: ${e.slice().sort().map(n=>`"${n}"`).join(", ")}`)}function Sr(i,e){if(i.op!=="<truthy>"&&!e.includes(i.value))throw new Error(`"${i.name}" must be one of ${e.map(t=>JSON.stringify(t)).join(", ")}`)}function wr(i,e){if(!e.includes(i.op))throw new Error(`"${i.name}" does not support "${i.op}" matcher`)}function DC(i,e){const t={role:e};for(const n of i)switch(n.name){case"checked":{Zo(n.name,rg,e),Sr(n,[!0,!1,"mixed"]),wr(n,["<truthy>","="]),t.checked=n.op==="<truthy>"?!0:n.value;break}case"pressed":{Zo(n.name,ag,e),Sr(n,[!0,!1,"mixed"]),wr(n,["<truthy>","="]),t.pressed=n.op==="<truthy>"?!0:n.value;break}case"selected":{Zo(n.name,sg,e),Sr(n,[!0,!1]),wr(n,["<truthy>","="]),t.selected=n.op==="<truthy>"?!0:n.value;break}case"expanded":{Zo(n.name,lg,e),Sr(n,[!0,!1]),wr(n,["<truthy>","="]),t.expanded=n.op==="<truthy>"?!0:n.value;break}case"level":{if(Zo(n.name,ug,e),typeof n.value=="string"&&(n.value=+n.value),n.op!=="="||typeof n.value!="number"||Number.isNaN(n.value))throw new Error('"level" attribute must be compared to a number');t.level=n.value;break}case"disabled":{Sr(n,[!0,!1]),wr(n,["<truthy>","="]),t.disabled=n.op==="<truthy>"?!0:n.value;break}case"name":{if(n.op==="<truthy>")throw new Error('"name" attribute must have a value');if(typeof n.value!="string"&&!(n.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');t.name=n.value,t.nameOp=n.op,t.exact=n.caseSensitive;break}case"include-hidden":{Sr(n,[!0,!1]),wr(n,["<truthy>","="]),t.includeHidden=n.op==="<truthy>"?!0:n.value;break}default:throw new Error(`Unknown attribute "${n.name}", must be one of ${Qv.map(o=>`"${o}"`).join(", ")}.`)}return t}function LC(i,e,t){const n=[],o=c=>{if(Pe(c)===e.role&&!(e.selected!==void 0&&Rv(c)!==e.selected)&&!(e.checked!==void 0&&jv(c)!==e.checked)&&!(e.pressed!==void 0&&Hv(c)!==e.pressed)&&!(e.expanded!==void 0&&cg(c)!==e.expanded)&&!(e.level!==void 0&&$v(c)!==e.level)&&!(e.disabled!==void 0&&Rc(c)!==e.disabled)&&!(!e.includeHidden&&gn(c))){if(e.name!==void 0){const u=Mt(di(c,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=Mt(e.name)),t&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!Yv(u,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}n.push(c)}},a=c=>{const u=[];c.shadowRoot&&u.push(c.shadowRoot);for(const h of c.querySelectorAll("*"))o(h),h.shadowRoot&&u.push(h.shadowRoot);u.forEach(a)};return a(i),n}function xb(i){return{queryAll:(e,t)=>{const n=ks(t,!0),o=n.name.toLowerCase();if(!o)throw new Error("Role must not be empty");const a=DC(n.attributes,o);Yc();try{return LC(e,a,i)}finally{Kc()}}}}class OC{constructor(){this._retainCacheCounter=0,this._cacheText=new Map,this._cacheQueryCSS=new Map,this._cacheMatches=new Map,this._cacheQuery=new Map,this._cacheMatchesSimple=new Map,this._cacheMatchesParents=new Map,this._cacheCallMatches=new Map,this._cacheCallQuery=new Map,this._cacheQuerySimple=new Map,this._engines=new Map,this._engines.set("not",HC),this._engines.set("is",ua),this._engines.set("where",ua),this._engines.set("has",RC),this._engines.set("scope",jC),this._engines.set("light",$C),this._engines.set("visible",zC),this._engines.set("text",IC),this._engines.set("text-is",BC),this._engines.set("text-matches",PC),this._engines.set("has-text",qC),this._engines.set("right-of",Qo("right-of")),this._engines.set("left-of",Qo("left-of")),this._engines.set("above",Qo("above")),this._engines.set("below",Qo("below")),this._engines.set("near",Qo("near")),this._engines.set("nth-match",UC);const e=[...this._engines.keys()];e.sort();const t=[...tv];if(t.sort(),e.join("|")!==t.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${t.join("|")}`)}begin(){++this._retainCacheCounter}end(){--this._retainCacheCounter,this._retainCacheCounter||(this._cacheQueryCSS.clear(),this._cacheMatches.clear(),this._cacheQuery.clear(),this._cacheMatchesSimple.clear(),this._cacheMatchesParents.clear(),this._cacheCallMatches.clear(),this._cacheCallQuery.clear(),this._cacheQuerySimple.clear(),this._cacheText.clear())}_cached(e,t,n,o){e.has(t)||e.set(t,[]);const a=e.get(t),c=a.find(h=>n.every((f,y)=>h.rest[y]===f));if(c)return c.result;const u=o();return a.push({rest:n,result:u}),u}_checkSelector(e){if(!(typeof e=="object"&&e&&(Array.isArray(e)||"simples"in e&&e.simples.length)))throw new Error(`Malformed selector "${e}"`);return e}matches(e,t,n){const o=this._checkSelector(t);this.begin();try{return this._cached(this._cacheMatches,e,[o,n.scope,n.pierceShadow,n.originalScope],()=>Array.isArray(o)?this._matchesEngine(ua,e,o,n):(this._hasScopeClause(o)&&(n=this._expandContextForScopeMatching(n)),this._matchesSimple(e,o.simples[o.simples.length-1].selector,n)?this._matchesParents(e,o,o.simples.length-2,n):!1))}finally{this.end()}}query(e,t){const n=this._checkSelector(t);this.begin();try{return this._cached(this._cacheQuery,n,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(n))return this._queryEngine(ua,e,n);this._hasScopeClause(n)&&(e=this._expandContextForScopeMatching(e));const o=this._scoreMap;this._scoreMap=new Map;let a=this._querySimple(e,n.simples[n.simples.length-1].selector);return a=a.filter(c=>this._matchesParents(c,n,n.simples.length-2,e)),this._scoreMap.size&&a.sort((c,u)=>{const h=this._scoreMap.get(c),f=this._scoreMap.get(u);return h===f?0:h===void 0?1:f===void 0?-1:h-f}),this._scoreMap=o,a})}finally{this.end()}}_markScore(e,t){this._scoreMap&&this._scoreMap.set(e,t)}_hasScopeClause(e){return e.simples.some(t=>t.selector.functions.some(n=>n.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const t=Ge(e.scope);return t?{...e,scope:t,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,t,n){return this._cached(this._cacheMatchesSimple,e,[t,n.scope,n.pierceShadow,n.originalScope],()=>{if(e===n.scope||t.css&&!this._matchesCSS(e,t.css))return!1;for(const o of t.functions)if(!this._matchesEngine(this._getEngine(o.name),e,o.args,n))return!1;return!0})}_querySimple(e,t){return t.functions.length?this._cached(this._cacheQuerySimple,t,[e.scope,e.pierceShadow,e.originalScope],()=>{let n=t.css;const o=t.functions;n==="*"&&o.length&&(n=void 0);let a,c=-1;n!==void 0?a=this._queryCSS(e,n):(c=o.findIndex(u=>this._getEngine(u.name).query!==void 0),c===-1&&(c=0),a=this._queryEngine(this._getEngine(o[c].name),e,o[c].args));for(let u=0;u<o.length;u++){if(u===c)continue;const h=this._getEngine(o[u].name);h.matches!==void 0&&(a=a.filter(f=>this._matchesEngine(h,f,o[u].args,e)))}for(let u=0;u<o.length;u++){if(u===c)continue;const h=this._getEngine(o[u].name);h.matches===void 0&&(a=a.filter(f=>this._matchesEngine(h,f,o[u].args,e)))}return a}):this._queryCSS(e,t.css||"*")}_matchesParents(e,t,n,o){return n<0?!0:this._cached(this._cacheMatchesParents,e,[t,n,o.scope,o.pierceShadow,o.originalScope],()=>{const{selector:a,combinator:c}=t.simples[n];if(c===">"){const u=Zl(e,o);return!u||!this._matchesSimple(u,a,o)?!1:this._matchesParents(u,t,n-1,o)}if(c==="+"){const u=Uh(e,o);return!u||!this._matchesSimple(u,a,o)?!1:this._matchesParents(u,t,n-1,o)}if(c===""){let u=Zl(e,o);for(;u;){if(this._matchesSimple(u,a,o)){if(this._matchesParents(u,t,n-1,o))return!0;if(t.simples[n-1].combinator==="")break}u=Zl(u,o)}return!1}if(c==="~"){let u=Uh(e,o);for(;u;){if(this._matchesSimple(u,a,o)){if(this._matchesParents(u,t,n-1,o))return!0;if(t.simples[n-1].combinator==="~")break}u=Uh(u,o)}return!1}if(c===">="){let u=e;for(;u;){if(this._matchesSimple(u,a,o)){if(this._matchesParents(u,t,n-1,o))return!0;if(t.simples[n-1].combinator==="")break}u=Zl(u,o)}return!1}throw new Error(`Unsupported combinator "${c}"`)})}_matchesEngine(e,t,n,o){if(e.matches)return this._callMatches(e,t,n,o);if(e.query)return this._callQuery(e,n,o).includes(t);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,t,n){if(e.query)return this._callQuery(e,n,t);if(e.matches)return this._queryCSS(t,"*").filter(o=>this._callMatches(e,o,n,t));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,t,n,o){return this._cached(this._cacheCallMatches,t,[e,o.scope,o.pierceShadow,o.originalScope,...n],()=>e.matches(t,n,o,this))}_callQuery(e,t,n){return this._cached(this._cacheCallQuery,e,[n.scope,n.pierceShadow,n.originalScope,...t],()=>e.query(n,t,this))}_matchesCSS(e,t){return e.matches(t)}_queryCSS(e,t){return this._cached(this._cacheQueryCSS,t,[e.scope,e.pierceShadow,e.originalScope],()=>{let n=[];function o(a){if(n=n.concat([...a.querySelectorAll(t)]),!!e.pierceShadow){a.shadowRoot&&o(a.shadowRoot);for(const c of a.querySelectorAll("*"))c.shadowRoot&&o(c.shadowRoot)}}return o(e.scope),n})}_getEngine(e){const t=this._engines.get(e);if(!t)throw new Error(`Unknown selector engine "${e}"`);return t}}const ua={matches(i,e,t,n){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(o=>n.matches(i,o,t))},query(i,e,t){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let n=[];for(const o of e)n=n.concat(t.query(i,o));return e.length===1?n:eS(n)}},RC={matches(i,e,t,n){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return n.query({...t,scope:i},e).length>0}},jC={matches(i,e,t,n){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const o=t.originalScope||t.scope;return o.nodeType===9?i===o.documentElement:i===o},query(i,e,t){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const n=i.originalScope||i.scope;if(n.nodeType===9){const o=n.documentElement;return o?[o]:[]}return n.nodeType===1?[n]:[]}},HC={matches(i,e,t,n){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!n.matches(i,e,t)}},$C={query(i,e,t){return t.query({...i,pierceShadow:!1},e)},matches(i,e,t,n){return n.matches(i,e,{...t,pierceShadow:!1})}},zC={matches(i,e,t,n){if(e.length)throw new Error('"visible" engine expects no arguments');return dt(i)}},IC={matches(i,e,t,n){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const o=Mt(e[0]).toLowerCase(),a=c=>c.normalized.toLowerCase().includes(o);return Wc(n._cacheText,i,a)==="self"}},BC={matches(i,e,t,n){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const o=Mt(e[0]),a=c=>!o&&!c.immediate.length?!0:c.immediate.some(u=>Mt(u)===o);return Wc(n._cacheText,i,a)!=="none"}},PC={matches(i,e,t,n){if(e.length===0||typeof e[0]!="string"||e.length>2||e.length===2&&typeof e[1]!="string")throw new Error('"text-matches" engine expects a regexp body and optional regexp flags');const o=new RegExp(e[0],e.length===2?e[1]:void 0),a=c=>o.test(c.full);return Wc(n._cacheText,i,a)==="self"}},qC={matches(i,e,t,n){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(Sg(i))return!1;const o=Mt(e[0]).toLowerCase();return(c=>c.normalized.toLowerCase().includes(o))(Ut(n._cacheText,i))}};function Qo(i){return{matches(e,t,n,o){const a=t.length&&typeof t[t.length-1]=="number"?t[t.length-1]:void 0,c=a===void 0?t:t.slice(0,t.length-1);if(t.length<1+(a===void 0?0:1))throw new Error(`"${i}" engine expects a selector list and optional maximum distance in pixels`);const u=o.query(n,c),h=Gv(i,e,u,a);return h===void 0?!1:(o._markScore(e,h),!0)}}}const UC={query(i,e,t){let n=e[e.length-1];if(e.length<2)throw new Error('"nth-match" engine expects non-empty selector list and an index argument');if(typeof n!="number"||n<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const o=ua.query(i,e.slice(0,e.length-1),t);return n--,n<o.length?[o[n]]:[]}};function Zl(i,e){if(i!==e.scope)return e.pierceShadow?Ge(i):i.parentElement||void 0}function Uh(i,e){if(i!==e.scope)return i.previousElementSibling||void 0}function eS(i){const e=new Map,t=[],n=[];function o(c){let u=e.get(c);if(u)return u;const h=Ge(c);return h?o(h).children.push(c):t.push(c),u={children:[],taken:!1},e.set(c,u),u}for(const c of i)o(c).taken=!0;function a(c){const u=e.get(c);if(u.taken&&n.push(c),u.children.length>1){const h=new Set(u.children);u.children=[];let f=c.firstElementChild;for(;f&&u.children.length<h.size;)h.has(f)&&u.children.push(f),f=f.nextElementSibling;for(f=c.shadowRoot?c.shadowRoot.firstElementChild:null;f&&u.children.length<h.size;)h.has(f)&&u.children.push(f),f=f.nextElementSibling}u.children.forEach(a)}return t.forEach(a),n}const Tb="(?:jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|jun(?:e)?|jul(?:y)?|aug(?:ust)?|sep(?:t(?:ember)?)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)",wg=new RegExp(["\\d{4}[-/]\\d{1,2}[-/]\\d{1,2}(?:[\\sT,]\\d{1,2}:\\d{1,2}(?::\\d{1,2})?)?",`\\b${Tb}\\b\\.?\\s+\\d{1,2}(?:,?\\s*\\d{4})?\\b`,`\\b\\d{1,2}\\s+${Tb}\\b\\.?(?:\\s+\\d{4}\\b)?(?!\\s*\\d)`,"\\b(?:today|yesterday|tomorrow|just now)\\b(?!['’])","\\b(?:a few|an?|\\d+)\\s+(?:second|minute|hour|day|week|month|year)s?\\s+ago\\b"].join("|"),"i");function jc(i){return wg.test(i)}const VC=/\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?/,Eb=new RegExp(wg.source,"iy"),Ab=/[\s,;:·|\-–—)]+/y;function tS(i){let e=0;for(;;){Eb.lastIndex=e;const a=Eb.exec(i);if(!a)break;Ab.lastIndex=e+a[0].length;const c=Ab.exec(i);if(!c||(e=e+a[0].length+c[0].length,e>=i.length))return null}const t=e?i.substring(e):i,n=wg.exec(t);return n?t.substring(0,n.index).replace(/[\s,;:·|\-–—(]+$/,"").trim()||null:e&&t.trim()||null}function Cb(i){if(VC.test(i)){const e=i.replace(/[\s,]*\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?\s*$/,"").replace(/^\s*\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?[\s,]+/,"").trim();if(e.length>0&&e.length<i.length)return!0}return tS(i)!==null}const FC=["en","ja","zh","ko","de","fr","es","it","pt","nl","ru","pl","sv"],GC=864e5,XC=17674848e5,YC=[17684352e5,17711136e5,17735328e5,17762112e5,17788032e5,17814816e5,17840736e5,1786752e6,17894304e5,17920224e5,17947008e5,17972928e5],Vh=new Map;function Fh(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\\\./g,"\\.?").replace(/\s+/g,"\\s+")}function KC(i,e){var m,_;const t=e.join(","),n=(m=Vh.get(t))==null?void 0:m.find(b=>b.intl===i);if(n)return n.words;const o=new Set,a=new Set,c=new Set,u=new Set;for(const b of e)try{const S=new i.RelativeTimeFormat(b,{numeric:"auto"});for(const v of[-1,0,1])u.add(S.format(v,"day").toLowerCase());for(const v of["long","short","narrow"]){const x=new i.RelativeTimeFormat(b,{numeric:"always",style:v});for(const E of["second","minute","hour","day","week","month","year"])for(const C of[-1,-2,-5,1,2,5]){const L=Math.abs(C)===1&&v==="long";o.add(Fh(x.format(C,E)).replace(/\d+/g,L?"(?:\\d+|\\p{L}+)":"\\d+"))}}for(const v of["long","short"]){const x=new i.DateTimeFormat(b,{weekday:v,timeZone:"UTC"});for(let E=4;E<11;E++)c.add(Fh(x.format(XC+(E-4)*GC).replace(/\.$/,"")))}for(const v of["long","short"]){const x=new i.DateTimeFormat(b,{month:v,timeZone:"UTC"});for(let E=0;E<12;E++){const C=x.format(YC[E]).replace(/\.$/,"");new RegExp("^\\p{L}{3,}$","u").test(C)&&a.add(Fh(C))}}}catch{}const h=b=>`(?<!\\p{L})(?:${b})(?!\\p{L})`,f=h([...a].join("|")||"(?!)"),y={monthDay:new RegExp(`${f}\\.?\\s*\\d{1,2}(?!\\d)|(?<!\\d)\\d{1,2}(?:er|\\.|º)?\\s+(?:de\\s+)?${f}`,"iu"),relative:new RegExp(h([...o].join("|")||"(?!)"),"iu"),dayWords:u,weekday:new RegExp(`^${h([...c].join("|")||"(?!)")}\\.?$`,"iu"),currencies:new Set(((_=i.supportedValuesOf)==null?void 0:_.call(i,"currency"))??[])};return Vh.set(t,[...Vh.get(t)??[],{intl:i,words:y}]),y}function Gh(i,e){const t=i.replace(/\s+/g," ").trim();if(!t)return!1;if(jc(t.replace(/\d{4}[-/]\d{1,2}[-/]\d{1,2}(?=[-/.]?\d)/g,""))||/\b\d{1,2}:\d{2}\b/.test(t)||new RegExp("(?<![\\d./-])(?:\\d{4}[/-]\\d{1,2}[/-]\\d{1,2}|\\d{1,2}[./-]\\d{1,2}[./-]\\d{4}|\\d{1,2}\\/\\d{1,2}\\/\\d{2})(?![\\d]|[./-]\\d)").test(t)||/\d{4}\s*[年년]\s*\d{1,2}\s*[月월]|\d{1,2}\s*[月월]\s*\d{1,2}\s*[日일]/.test(t))return!0;const n=KC(e.intl,[...e.locales??[],...FC].filter(Boolean));if(n.monthDay.test(t)&&new RegExp("(?<!\\d)\\d{4}(?!\\d)").test(t)||n.relative.test(t)||n.dayWords.has(t.toLowerCase())||n.weekday.test(t))return!0;const o=c=>c&&n.currencies.has(c)?c:null,a=t.replace(new RegExp("^(?:\\p{Sc}|[A-Z]{1,2}\\$)\\s*","u"),"").replace(/^([A-Z]{3})(?=[\s\d])\s*/u,(c,u)=>o(u)?"":c).replace(new RegExp("\\s*\\p{Sc}$","u"),"").replace(/\s([A-Z]{3})$/u,(c,u)=>o(u)?"":c).replace(new RegExp("(?<=\\d)[\\p{sc=Han}\\p{sc=Hangul}]$","u"),"");return/^[+\-−]?(?:\d{1,3}(?:[.,\s'’]\d{3})+|\d+)(?:[.,]\d+)?\s*%?$/.test(a)?a!==t||/%$/.test(a)||/^[+\-−]?\d{1,3}(?:[.,\s'’]\d{3})+/.test(a):!1}const WC=new Set(["button","link","menuitem","menuitemcheckbox","menuitemradio"]),JC=new Set(["cell","gridcell","columnheader","rowheader"]),ZC="button, input, a[href], area[href], [role]",QC='button, a[href], input[type="button"], input[type="submit"], input[type="reset"], input[type="image"]',Ta="button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link],[role=option],[role=menuitem],[role=tab],[role=treeitem]",e2="button:not([role]),a:not([role]),[role=button],[role=link]";function Ea(i){return i.matches(QC)||WC.has(Pe(i)??"")}function nS(i){const e=i.getAttribute("aria-haspopup");return e!==null&&e!=="false"||i.hasAttribute("aria-expanded")}function Xh(i){return Ea(i)||nS(i)}function t2(i){return i.localName==="td"||i.localName==="th"||JC.has(Pe(i)??"")}function yc(i){for(let e=i;e;e=Ge(e))if(Ea(e))return e}function kb(i){return[...i.querySelectorAll(ZC)].filter(Ea)}function iS(i,e){const t=ca(i,Ta,e);if(!(t!=null&&t.matches(e2)&&[...t.querySelectorAll(Ta)].some(dt)))return t}function sS(i,e){var t;for(let n=i;n&&n!==e;n=n.parentElement){if(n.matches(Ta))return n;if(n.nodeName==="LABEL")return n.control??n;if(n.getAttribute("aria-hidden")==="true"){const o=[...((t=n.parentElement)==null?void 0:t.children)??[]].filter(c=>c!==n&&c.matches(Ta)),a=o.find(c=>c===e.control)??o[0];if(a)return a}}}function rS(i,e){return i===e.control||i.contains(e.control)}function Nb(i,e,t){var u;if(t(i))return!1;const n=i.getBoundingClientRect(),o=i.getRootNode(),a=(u=o.elementFromPoint)==null?void 0:u.call(o,n.left+n.width/2,n.top+n.height/2),c=a&&e.contains(a)?sS(a,e):void 0;return!c||rS(c,e)}function n2(i){var e;return[...((e=i==null?void 0:i.parentElement)==null?void 0:e.children)??[]].find(t=>t!==i&&t.getAttribute("aria-hidden")==="true"&&dt(t))}function i2(i,e,t,n){if(!e||t.parentElement!==e.parentElement)return;const o=n(e);if(!o)return;const a=!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING),c=`${o} >> xpath=${a?"following":"preceding"}-sibling::*[@aria-hidden="true"][1]`;try{const u=i.querySelectorAll(i.parseSelector(c),e.ownerDocument);return u.length===1&&u[0]===t?c:void 0}catch{return}}const oS=10,Fr=oS/2,Mb=1,s2=2,r2=10,o2=50,aS=100,lS=120,cS=140,uS=160,_c=180,dS=200,Db=250,a2=lS+Fr,l2=cS+Fr,Lb=aS+Fr,c2=uS+Fr,u2=_c+Fr,d2=dS+Fr,h2=300,Yh=500,f2=505,hS=510,g2=515,Kh=520,fS=530,p2=9e6,Hc=1e4,m2=1e7,Ob=Hc+100,y2=1e3;function _2(i,e,t,n,o){const a=iS(e,o.root);if(a&&dt(a))return a;const c=20,u=[],h=o.root??e.ownerDocument,f=`${Ta},[id$="Button"],[id$="button"]`,y=h.querySelectorAll(f);for(const m of y){if(!dt(m))continue;const _=m.getBoundingClientRect(),b=_.left+_.width/2,S=_.top+_.height/2,v=Math.sqrt(Math.pow(t-b,2)+Math.pow(n-S,2));v<=c&&u.push({element:m,distance:v})}return u.length===0?null:(u.sort((m,_)=>m.distance-_.distance),u[0].element)}function Rb(i,e,t){var o;i._evaluator.begin();const n={allowText:new Map,disallowText:new Map};Yc(),tg();try{let a=[];if(t.forTextExpect){let h=da(i,e.ownerDocument.documentElement,t);for(let f=e;f;f=Ge(f)){const y=Ui(n,i,f,{...t,noText:!0});if(!y)continue;if(vs(y)<=y2){h=y;break}}a=[ha(h)]}else{const h=e.nodeName==="LABEL"?e:e.closest("label");let f=!1,y;const m=e.matches("iframe,frame");if(!m&&(h!=null&&h.control)&&!e.isContentEditable)if(!jb(i,h.control))e=h.control;else{f=!0;const _=(o=e.closest("svg"))==null?void 0:o.parentElement;_&&h.contains(_)&&dt(_)&&(e=_);const b=e.closest('[aria-hidden="true"]'),S=sS(e,h);if(S&&!rS(S,h))f=!1;else{const v=e===h||b&&h.contains(b),x=b2(h),E=[...v?[]:[e],...x?[x]:[],h],C=R=>jb(i,R),L=E.find(R=>Nb(R,h,C));if(L)e=L;else{const R=b&&h.contains(b)?b:n2(h.control),N=V=>{const I=Ui(n,i,V,t);return I?ha(I):void 0};y=R&&Nb(R,h,C)?i2(i,h.control,R,N):void 0,!y&&v&&(e=h)}}}if(!m&&!f&&!e.matches("input,textarea,select")&&!e.isContentEditable){const _=t.__clickX,b=t.__clickY;let S=!1;if(_!==void 0&&b!==void 0){const v=_2(i,e,_,b,t);v&&(e=v,S=!0)}else{const v=iS(e,t.root);v&&dt(v)&&(e=v,S=!0)}if(!S){const v=e.closest("svg");if(v&&(v.hasAttribute(t.testIdAttributeName)||v.hasAttribute("aria-label")))e=v;else{const x=v==null?void 0:v.parentElement;x&&dt(x)&&(e=x)}}}if(y)a=[y];else if(t.multiple){const _=Ui(n,i,e,t),b=Ui(n,i,e,{...t,noText:!0});let S=[_,b];if(n.allowText.clear(),n.disallowText.clear(),_&&Wh(_)&&S.push(Ui(n,i,e,{...t,noCSSId:!0})),b&&Wh(b)&&S.push(Ui(n,i,e,{...t,noText:!0,noCSSId:!0})),S=S.filter(Boolean),!S.length){const v=da(i,e,t);S.push(v),Wh(v)&&S.push(da(i,e,{...t,noCSSId:!0}))}a=[...new Set(S.map(v=>ha(v)))]}else{const _=Ui(n,i,e,t)||da(i,e,t);a=[ha(_)]}}const c=a[0],u=i.parseSelector(c);return{selector:c,selectors:a,elements:i.querySelectorAll(u,t.root??e.ownerDocument)}}finally{ng(),Kc(),i._evaluator.end()}}function jb(i,e){try{const t=e.getBoundingClientRect(),n=t.left+t.width/2,o=t.top+t.height/2,a=e.ownerDocument.defaultView;return a&&(n>=a.innerWidth||o>=a.innerHeight)?!1:i.expectHitTarget({x:n,y:o},e)!=="done"}catch{return!1}}function b2(i){const e=i.control,t=e?di(e,!1).trim().toLowerCase():"";let n=null,o=null,a=0;for(const c of i.children){if(e&&(c===e||c.contains(e))||c.closest('[aria-hidden="true"]')||c.nodeName==="SCRIPT"||c.nodeName==="STYLE")continue;const u=(c.textContent??"").trim();if(!u||!dt(c))continue;const h=u.toLowerCase();t&&t.includes(h)&&h.length>a&&(o=c,a=h.length),n||(n=c)}return o??n}function Ui(i,e,t,n){if(n.root&&!Ue(n.root,t))throw new Error("Target element must belong to the root's subtree");if(t===n.root)return[{engine:"css",selector:":scope",score:1}];if(t.ownerDocument.documentElement===t)return[{engine:"css",selector:"html",score:1}];let o=null;const a=u=>{(!o||vs(u)<vs(o))&&(o=u)},c=[];if(!n.noText)for(const u of E2(e,t,!n.isRecursive))c.push({candidate:u,isTextCandidate:!0});for(const u of T2(e,t,n))n.omitInternalEngines&&u.engine.startsWith("internal:")||c.push({candidate:[u],isTextCandidate:!1});c.sort((u,h)=>vs(u.candidate)-vs(h.candidate));for(const{candidate:u,isTextCandidate:h}of c){const f=e.querySelectorAll(e.parseSelector(ha(u)),n.root??t.ownerDocument);if(!f.includes(t))continue;if(f.length===1){a(u);break}const y=new Set(["div","span","a","p","section","article","main","aside","header","footer","nav","ul","ol","li"]);if(u.length===1&&u[0].engine==="css"&&y.has(u[0].selector.toLowerCase())&&f.length>1)continue;const _=f.indexOf(t);if(!(_>5)&&(a([...u,{engine:"nth",selector:String(_),score:Hc}]),!n.isRecursive))for(let b=Ge(t);b&&b!==n.root;b=Ge(b)){const S=f.filter(N=>Ue(b,N)&&N!==b),v=S.indexOf(t);if(S.length>5||v===-1||v===_&&S.length>1)continue;const x=S.length===1?u:[...u,{engine:"nth",selector:String(v),score:Hc}];if(o&&vs([{engine:"",selector:"",score:1},...x])>=vs(o))continue;const C=!!n.noText||h,L=C?i.disallowText:i.allowText;let R=L.get(b);R===void 0&&(R=Ui(i,e,b,{...n,isRecursive:!0,noText:C})||da(e,b,n),L.set(b,R)),R&&a([...R,...x])}}return o}function v2(i){const e=Pe(i);return e==="dialog"||e==="alertdialog"?!0:i.getAttribute("aria-modal")==="true"}function S2(i){return!!(/^react-aria\d+/.test(i)||/^mui-\d+/.test(i)||/^(mat|cdk)-[a-z]+-\d+$/.test(i)||i.includes(":")||/«[rR][0-9a-z]*»|(^|[-_])_[rR]_[0-9a-zA-Z]+_/.test(i))}function Ef(i,e){return!!(pS(e)||S2(e)||v2(i)&&/[a-zA-Z]\d{3,}$/.test(e)||/[-_]\d{5,}$/.test(e))}function w2(i,e){const t=e.match(/^([A-Za-z][A-Za-z_-]{3,})(\d+)$/);if(!t)return!1;const n=t[1],o=i.ownerDocument;if(!o)return!1;const a=new RegExp(`^${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\d+$`);let c;try{c=`[id^="${window.CSS&&window.CSS.escape?window.CSS.escape(n):n}"]`}catch{c=`[id^="${n}"]`}const u=o.querySelectorAll(c);for(const h of u){const f=h.id;if(f!==e&&a.test(f))return!0}return!1}function x2(i){return!!(/\d{2,}[_-][a-zA-Z]/.test(i)||/[-_]\d+$/.test(i)||/^react-aria\d+/.test(i)||/^(mui|mat|cdk)-\d+/.test(i)||/^\d+$/.test(i)||/\d{4,}/.test(i)||/[a-zA-Z]\d{3,}$/.test(i)||i.includes(":"))}function T2(i,e,t){const n=[];{for(const y of["data-testid","data-test-id","data-test"])y!==t.testIdAttributeName&&e.getAttribute(y)&&n.push({engine:"css",selector:`[${y}=${qi(e.getAttribute(y))}]`,score:s2});if(!t.noCSSId){const y=e.getAttribute("id");y&&!Ef(e,y)&&n.push({engine:"css",selector:gS(y),score:Yh})}const c=/--(?:highlight|hover|active|focus|focused|selected|disabled|open|closed|expanded|collapsed|checked|pressed|dragging|visible|hidden)\b/i;for(const y of e.classList)y.indexOf("__")>0&&!pS(y)&&!c.test(y)&&n.push({engine:"css",selector:`${An(e)}.${mS(y)}`,score:f2});const u=new Set(["div","span","a","p","section","article","main","aside","header","footer","nav","ul","ol","li"]),h=e.nodeName.toLowerCase(),f=u.has(h);if(n.push({engine:"css",selector:An(e),score:f?p2:fS}),f){const y=e.querySelectorAll("input[name], input[id], textarea[name], textarea[id], select[name], select[id], button[name], button[id]");for(const m of y){let _="",b="";const S=m.getAttribute("name");if(S)_="name",b=S;else{const x=m.getAttribute("id");x&&!Ef(m,x)&&!w2(m,x)&&(_="id",b=x)}if(!_)continue;const v=m.nodeName.toLowerCase();n.push({engine:"css",selector:`${An(e)}:has(${v}[${_}=${qi(b)}])`,score:g2});break}}}if(e.nodeName==="IFRAME"){for(const u of["name","title"])e.getAttribute(u)&&n.push({engine:"css",selector:`${An(e)}[${u}=${qi(e.getAttribute(u))}]`,score:r2});const c=e.id;if(c&&x2(c)){const u=n.findIndex(f=>f.score===Yh);u!==-1&&n.splice(u,1);const h=e.getAttribute("src");if(h){const f=h.trim();if(f&&!/^(data|blob|javascript|about):/i.test(f)){const m=f.split(/[?#]/,1)[0].split("/").filter(Boolean),_=m[m.length-1];_&&n.push({engine:"css",selector:`iframe[src*=${qi(_)}]`,score:Yh})}}}return e.getAttribute(t.testIdAttributeName)&&n.push({engine:"css",selector:`[${t.testIdAttributeName}=${qi(e.getAttribute(t.testIdAttributeName))}]`,score:Mb}),Af([n]),n}if(e.getAttribute(t.testIdAttributeName)){const u=`"${e.getAttribute(t.testIdAttributeName).replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"`;n.push({engine:"internal:testid",selector:`[${t.testIdAttributeName}=${u}]`,score:Mb})}if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e;if(c.placeholder){n.push({engine:"internal:attr",selector:`[placeholder=${Pt(c.placeholder,!0)}]`,score:a2});for(const u of Nr(c.placeholder))n.push({engine:"internal:attr",selector:`[placeholder=${Pt(u.text,!1)}]`,score:lS-u.scoreBonus})}}const o=Kv(i._evaluator._cacheText,e);for(const c of o){const u=c.normalized;n.push({engine:"internal:label",selector:Bt(u,!0),score:l2});for(const h of Nr(u))n.push({engine:"internal:label",selector:Bt(h.text,!1),score:cS-h.scoreBonus})}const a=Pe(e);return a&&!["none","presentation"].includes(a)&&n.push({engine:"internal:role",selector:a,score:hS}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&n.push({engine:"css",selector:`${An(e)}[name=${qi(e.getAttribute("name"))}]`,score:Kh}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&n.push({engine:"css",selector:`${An(e)}[type=${qi(e.getAttribute("type"))}]`,score:Kh}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&n.push({engine:"css",selector:An(e),score:Kh+1}),Af([n]),n}function E2(i,e,t){if(e.nodeName==="SELECT")return[];const n=[],o=e.getAttribute("title");if(o){n.push([{engine:"internal:attr",selector:`[title=${Pt(o,!0)}]`,score:d2}]);for(const f of Nr(o))n.push([{engine:"internal:attr",selector:`[title=${Pt(f.text,!1)}]`,score:dS-f.scoreBonus}])}const a=e.getAttribute("alt");if(a&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){n.push([{engine:"internal:attr",selector:`[alt=${Pt(a,!0)}]`,score:c2}]);for(const f of Nr(a))n.push([{engine:"internal:attr",selector:`[alt=${Pt(f.text,!1)}]`,score:uS-f.scoreBonus}])}const c=Ut(i._evaluator._cacheText,e).normalized,u=c?Nr(c):[];if(c){const f=Cb(c)?Ob:0;if(t){c.length<=80&&n.push([{engine:"internal:text",selector:Bt(c,!0),score:u2+f}]);for(const m of u)n.push([{engine:"internal:text",selector:Bt(m.text,!1),score:_c-m.scoreBonus}])}const y={engine:"css",selector:An(e),score:fS};for(const m of u)n.push([y,{engine:"internal:has-text",selector:Bt(m.text,!1),score:_c-m.scoreBonus}]);if(t&&c.length<=80){const m=new RegExp("^"+wa(c)+"$");n.push([y,{engine:"internal:has-text",selector:Bt(m,!1),score:Db+f}])}}const h=Pe(e);if(h&&!["none","presentation"].includes(h)){const f=di(e,!1);if(f&&!f.match(new RegExp("^\\p{Co}+$","u"))){const y=Cb(f)?Lb+Ob:Lb,m={engine:"internal:role",selector:`${h}[name=${Pt(f,!0)}]`,score:y};n.push([m]);for(const _ of Nr(f))n.push([{engine:"internal:role",selector:`${h}[name=${Pt(_.text,!1)}]`,score:aS-_.scoreBonus}])}else{const y={engine:"internal:role",selector:`${h}`,score:hS};for(const m of u)n.push([y,{engine:"internal:has-text",selector:Bt(m.text,!1),score:_c-m.scoreBonus}]);if(t&&c.length<=80){const m=new RegExp("^"+wa(c)+"$");n.push([y,{engine:"internal:has-text",selector:Bt(m,!1),score:Db}])}}}return Af(n),n}function gS(i){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(i)?"#"+i:`[id=${qi(i)}]`}function Wh(i){return i.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function da(i,e,t){const n=t.root??e.ownerDocument,o=[];function a(u){const h=o.slice();u&&h.unshift(u);const f=h.join(" > "),y=i.parseSelector(f);return i.querySelector(y,n,!1)===e?f:void 0}function c(u){const h={engine:"css",selector:u,score:m2},f=i.parseSelector(u),y=i.querySelectorAll(f,n);if(y.length===1)return[h];const m={engine:"nth",selector:String(y.indexOf(e)),score:Hc};return[h,m]}for(let u=e;u&&u!==n;u=Ge(u)){let h="";if(u.id&&!t.noCSSId&&!Ef(u,u.id)){const m=gS(u.id),_=a(m);if(_)return c(_);h=m}const f=u.parentNode,y=[...u.classList].map(mS);for(let m=0;m<y.length;++m){const _="."+y.slice(0,m+1).join("."),b=a(_);if(b)return c(b);!h&&f&&f.querySelectorAll(_).length===1&&(h=_)}if(f){const m=[...f.children],_=u.nodeName,S=m.filter(x=>x.nodeName===_).indexOf(u)===0?An(u):`${An(u)}:nth-child(${1+m.indexOf(u)})`,v=a(S);if(v)return c(v);h||(h=S)}else h||(h=An(u));o.unshift(h)}return c(a())}function Af(i){for(const e of i)for(const t of e)t.score>o2&&t.score<h2&&(t.score+=Math.min(oS,t.selector.length/10|0))}function ha(i){const e=[];let t="";for(const{engine:n,selector:o}of i)e.length&&(t!=="css"||n!=="css"||o.startsWith(":nth-match("))&&e.push(">>"),t=n,n==="css"?e.push(o):e.push(`${n}=${o}`);return e.join(" ")}function vs(i){let e=0;for(let t=0;t<i.length;t++)e+=i[t].score*(i.length-t);return e}function pS(i){if(/^\d+$/.test(i)||/^.+__search_[a-zA-Z0-9]{4,}$/.test(i))return!0;let e,t=0;for(let n=0;n<i.length;++n){const o=i[n];let a;if(!(o==="-"||o==="_")){if(o>="a"&&o<="z"?a="lower":o>="A"&&o<="Z"?a="upper":o>="0"&&o<="9"?a="digit":a="other",a==="lower"&&e==="upper"){e=a;continue}e&&e!==a&&++t,e=a}}return t>=i.length/4}function ea(i,e){if(i.length<=e)return i;i=i.substring(0,e);const t=i.match(/^(.*)\b(.+?)$/);return t?t[1].trimEnd():""}function Nr(i){let e=[];const t=/^\s*\d{4}[-/]\d{1,2}[-/]\d{1,2}/.test(i),n=/\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?\s*$/.test(i);{const a=i.match(/^([\d.,]+)[^.,\w]/),c=a?a[1].length:0;if(c&&!t){const u=ea(i.substring(c).trimStart(),80);jc(u)||e.push({text:u,scoreBonus:u.length<=30?2:1})}}{const a=i.match(/[^.,\w]([\d.,]+)$/),c=a?a[1].length:0;if(c&&!n){const u=ea(i.substring(0,i.length-c).trimEnd(),80);jc(u)||e.push({text:u,scoreBonus:u.length<=30?2:1})}}let o=!1;{const a=tS(i);if(a){const c=ea(a,80);e.push({text:c,scoreBonus:c.length<=30?2:1}),o=!0}}return o||(i.length<=30?e.push({text:i,scoreBonus:0}):(e.push({text:ea(i,80),scoreBonus:0}),e.push({text:ea(i,30),scoreBonus:1}))),e=e.filter(a=>a.text),e.length||e.push({text:i.substring(0,80),scoreBonus:0}),e}function An(i){return i.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function mS(i){let e="";for(let t=0;t<i.length;t++)e+=A2(i,t);return e}function A2(i,e){const t=i.charCodeAt(e);return t===0?"�":t>=1&&t<=31||t>=48&&t<=57&&(e===0||e===1&&i.charCodeAt(0)===45)?"\\"+t.toString(16)+" ":e===0&&t===45&&i.length===1?"\\"+i.charAt(e):t>=128||t===45||t===95||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?i.charAt(e):"\\"+i.charAt(e)}function yS(i,e){const t=i.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let n=t.substring(t.lastIndexOf("/")+1);return n.endsWith(e)&&(n=n.substring(0,n.length-e.length)),n}function C2(i,e){return e?e.toUpperCase():""}const k2=/(?:^|[-_/])(\w)/g,_S=i=>i&&i.replace(k2,C2);function N2(i){function e(y){const m=y.name||y._componentTag||y.__playwright_guessedName;if(m)return m;const _=y.__file;if(_)return _S(yS(_,".vue"))}function t(y,m){return y.type.__playwright_guessedName=m,m}function n(y){var _,b,S,v;const m=e(y.type||{});if(m)return m;if(y.root===y)return"Root";for(const x in(b=(_=y.parent)==null?void 0:_.type)==null?void 0:b.components)if(((S=y.parent)==null?void 0:S.type.components[x])===y.type)return t(y,x);for(const x in(v=y.appContext)==null?void 0:v.components)if(y.appContext.components[x]===y.type)return t(y,x);return"Anonymous Component"}function o(y){return y._isBeingDestroyed||y.isUnmounted}function a(y){return y.subTree.type.toString()==="Symbol(Fragment)"}function c(y){const m=[];return y.component&&m.push(y.component),y.suspense&&m.push(...c(y.suspense.activeBranch)),Array.isArray(y.children)&&y.children.forEach(_=>{_.component?m.push(_.component):m.push(...c(_))}),m.filter(_=>{var b;return!o(_)&&!((b=_.type.devtools)!=null&&b.hide)})}function u(y){return a(y)?h(y.subTree):[y.subTree.el]}function h(y){if(!y.children)return[];const m=[];for(let _=0,b=y.children.length;_<b;_++){const S=y.children[_];S.component?m.push(...u(S.component)):S.el&&m.push(S.el)}return m}function f(y){return{name:n(y),children:c(y.subTree).map(f),rootElements:u(y),props:y.props}}return f(i)}function M2(i){function e(a){const c=a.displayName||a.name||a._componentTag;if(c)return c;const u=a.__file;if(u)return _S(yS(u,".vue"))}function t(a){const c=e(a.$options||a.fnOptions||{});return c||(a.$root===a?"Root":"Anonymous Component")}function n(a){return a.$children?a.$children:Array.isArray(a.subTree.children)?a.subTree.children.filter(c=>!!c.component).map(c=>c.component):[]}function o(a){return{name:t(a),children:n(a).map(o),rootElements:[a.$el],props:a._props}}return o(i)}function bS(i,e,t=[]){e(i)&&t.push(i);for(const n of i.children)bS(n,e,t);return t}function vS(i,e=[]){const n=(i.ownerDocument||i).createTreeWalker(i,NodeFilter.SHOW_ELEMENT),o=new Set;do{const a=n.currentNode;a.__vue__&&o.add(a.__vue__.$root),a.__vue_app__&&a._vnode&&a._vnode.component&&e.push({root:a._vnode.component,version:3});const c=a instanceof Element?a.shadowRoot:null;c&&vS(c,e)}while(n.nextNode());for(const a of o)e.push({version:2,root:a});return e}const D2=()=>({queryAll(i,e){const t=i.ownerDocument||i,{name:n,attributes:o}=ks(e,!1),u=vS(t).map(f=>f.version===3?N2(f.root):M2(f.root)).map(f=>bS(f,y=>{if(n&&y.name!==n||y.rootElements.some(m=>!Ue(i,m)))return!1;for(const m of o)if(!Xv(y.props,m))return!1;return!0})).flat(),h=new Set;for(const f of u)for(const y of f.rootElements)h.add(y);return[...h]}}),Hb={queryAll(i,e){e.startsWith("/")&&i.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const t=[],n=i.ownerDocument||i;if(!n)return t;const o=n.evaluate(e,i,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let a=o.iterateNext();a;a=o.iterateNext())a.nodeType===Node.ELEMENT_NODE&&t.push(a);return t}};function xg(i,e,t){return`internal:attr=[${i}=${Pt(e,(t==null?void 0:t.exact)||!1)}]`}function L2(i,e){return`internal:testid=[${i}=${Pt(e,!0)}]`}function O2(i,e){return"internal:label="+Bt(i,!!(e!=null&&e.exact))}function R2(i,e){return xg("alt",i,e)}function j2(i,e){return xg("title",i,e)}function H2(i,e){return xg("placeholder",i,e)}function $2(i,e){return"internal:text="+Bt(i,!!(e!=null&&e.exact))}function z2(i,e={}){const t=[];return e.checked!==void 0&&t.push(["checked",String(e.checked)]),e.disabled!==void 0&&t.push(["disabled",String(e.disabled)]),e.selected!==void 0&&t.push(["selected",String(e.selected)]),e.expanded!==void 0&&t.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&t.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&t.push(["level",String(e.level)]),e.name!==void 0&&t.push(["name",Pt(e.name,!!e.exact)]),e.pressed!==void 0&&t.push(["pressed",String(e.pressed)]),`internal:role=${i}${t.map(([n,o])=>`[${n}=${o}]`).join("")}`}const ta=Symbol("selector"),I2=class fa{constructor(e,t,n){if(n!=null&&n.hasText&&(t+=` >> internal:has-text=${Bt(n.hasText,!1)}`),n!=null&&n.hasNotText&&(t+=` >> internal:has-not-text=${Bt(n.hasNotText,!1)}`),n!=null&&n.has&&(t+=" >> internal:has="+JSON.stringify(n.has[ta])),n!=null&&n.hasNot&&(t+=" >> internal:has-not="+JSON.stringify(n.hasNot[ta])),(n==null?void 0:n.visible)!==void 0&&(t+=` >> visible=${n.visible?"true":"false"}`),this[ta]=t,t){const c=e.parseSelector(t);this.element=e.querySelector(c,e.document,!1),this.elements=e.querySelectorAll(c,e.document)}const o=t,a=this;a.locator=(c,u)=>new fa(e,o?o+" >> "+c:c,u),a.getByTestId=c=>a.locator(L2(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),c)),a.getByAltText=(c,u)=>a.locator(R2(c,u)),a.getByLabel=(c,u)=>a.locator(O2(c,u)),a.getByPlaceholder=(c,u)=>a.locator(H2(c,u)),a.getByText=(c,u)=>a.locator($2(c,u)),a.getByTitle=(c,u)=>a.locator(j2(c,u)),a.getByRole=(c,u={})=>a.locator(z2(c,u)),a.filter=c=>new fa(e,t,c),a.first=()=>a.locator("nth=0"),a.last=()=>a.locator("nth=-1"),a.nth=c=>a.locator(`nth=${c}`),a.and=c=>new fa(e,o+" >> internal:and="+JSON.stringify(c[ta])),a.or=c=>new fa(e,o+" >> internal:or="+JSON.stringify(c[ta]))}};let B2=I2;class P2{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,t)=>this._querySelector(e,!!t),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,t)=>this._generateLocator(e,t),ariaSnapshot:(e,t)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,t||{mode:"expect"}),resume:()=>this._resume(),...new B2(this._injectedScript,"")},delete this._injectedScript.window.playwright.filter,delete this._injectedScript.window.playwright.first,delete this._injectedScript.window.playwright.last,delete this._injectedScript.window.playwright.nth,delete this._injectedScript.window.playwright.and,delete this._injectedScript.window.playwright.or)}_querySelector(e,t){if(typeof e!="string")throw new Error("Usage: playwright.query('Playwright >> selector').");const n=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(n,this._injectedScript.document,t)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const t=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(t,this._injectedScript.document)}_inspect(e){if(typeof e!="string")throw new Error("Usage: playwright.inspect('Playwright >> selector').");this._injectedScript.window.inspect(this._querySelector(e,!1))}_selector(e){if(!(e instanceof Element))throw new Error("Usage: playwright.selector(element).");return this._injectedScript.generateSelectorSimple(e)}_generateLocator(e,t){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const n=this._injectedScript.generateSelectorSimple(e);return Yi(t||"javascript",n)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function q2(i){try{return i instanceof RegExp||Object.prototype.toString.call(i)==="[object RegExp]"}catch{return!1}}function U2(i){try{return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}catch{return!1}}function V2(i){try{return i instanceof URL||Object.prototype.toString.call(i)==="[object URL]"}catch{return!1}}function F2(i){var e;try{return i instanceof Error||i&&((e=Object.getPrototypeOf(i))==null?void 0:e.name)==="Error"}catch{return!1}}function G2(i,e){try{return i instanceof e||Object.prototype.toString.call(i)===`[object ${e.name}]`}catch{return!1}}const SS={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function X2(i){if("toBase64"in i)return i.toBase64();const e=Array.from(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map(t=>String.fromCharCode(t)).join("");return btoa(e)}function Y2(i,e){const t=atob(i),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return new e(n.buffer)}function Cf(i,e=[],t=new Map){if(!Object.is(i,void 0)){if(typeof i=="object"&&i){if("ref"in i)return t.get(i.ref);if("v"in i)return i.v==="undefined"?void 0:i.v==="null"?null:i.v==="NaN"?NaN:i.v==="Infinity"?1/0:i.v==="-Infinity"?-1/0:i.v==="-0"?-0:void 0;if("d"in i)return new Date(i.d);if("u"in i)return new URL(i.u);if("bi"in i)return BigInt(i.bi);if("e"in i){const n=new Error(i.e.m);return n.name=i.e.n,n.stack=i.e.s,n}if("r"in i)return new RegExp(i.r.p,i.r.f);if("a"in i){const n=[];t.set(i.id,n);for(const o of i.a)n.push(Cf(o,e,t));return n}if("o"in i){const n={};t.set(i.id,n);for(const{k:o,v:a}of i.o)o!=="__proto__"&&(n[o]=Cf(a,e,t));return n}if("h"in i)return e[i.h];if("ta"in i)return Y2(i.ta.b,SS[i.ta.k])}return i}}function K2(i,e){return kf(i,e,{visited:new Map,lastId:0})}function kf(i,e,t){if(i&&typeof i=="object"){if(typeof globalThis.Window=="function"&&i instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&i instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&i instanceof globalThis.Node)return"ref: <Node>"}return wS(i,e,t)}function wS(i,e,t){var a;const n=e(i);if("fallThrough"in n)i=n.fallThrough;else return n;if(typeof i=="symbol")return{v:"undefined"};if(Object.is(i,void 0))return{v:"undefined"};if(Object.is(i,null))return{v:"null"};if(Object.is(i,NaN))return{v:"NaN"};if(Object.is(i,1/0))return{v:"Infinity"};if(Object.is(i,-1/0))return{v:"-Infinity"};if(Object.is(i,-0))return{v:"-0"};if(typeof i=="boolean"||typeof i=="number"||typeof i=="string")return i;if(typeof i=="bigint")return{bi:i.toString()};if(F2(i)){let c;return(a=i.stack)!=null&&a.startsWith(i.name+": "+i.message)?c=i.stack:c=`${i.name}: ${i.message}
|
|
113
|
+
${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(U2(i))return{d:i.toJSON()};if(V2(i))return{u:i.toJSON()};if(q2(i))return{r:{p:i.source,f:i.flags}};for(const[c,u]of Object.entries(SS))if(G2(i,u))return{ta:{b:X2(i),k:c}};const o=t.visited.get(i);if(o)return{ref:o};if(Array.isArray(i)){const c=[],u=++t.lastId;t.visited.set(i,u);for(let h=0;h<i.length;++h)c.push(kf(i[h],e,t));return{a:c,id:u}}if(typeof i=="object"){const c=[],u=++t.lastId;t.visited.set(i,u);for(const f of Object.keys(i)){let y;try{y=i[f]}catch{continue}f==="toJSON"&&typeof y=="function"?c.push({k:f,v:{o:[],id:0}}):c.push({k:f,v:kf(y,e,t)})}let h;try{c.length===0&&i.toJSON&&typeof i.toJSON=="function"&&(h={value:i.toJSON()})}catch{}return h?wS(h.value,e,t):{o:c,id:u}}}class W2{constructor(e,t){var n,o,a,c,u,h,f,y;this.global=e,this.isUnderTest=t,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(n=e.setTimeout)==null?void 0:n.bind(e),clearTimeout:(o=e.clearTimeout)==null?void 0:o.bind(e),setInterval:(a=e.setInterval)==null?void 0:a.bind(e),clearInterval:(c=e.clearInterval)==null?void 0:c.bind(e),requestAnimationFrame:(u=e.requestAnimationFrame)==null?void 0:u.bind(e),cancelAnimationFrame:(h=e.cancelAnimationFrame)==null?void 0:h.bind(e),requestIdleCallback:(f=e.requestIdleCallback)==null?void 0:f.bind(e),cancelIdleCallback:(y=e.cancelIdleCallback)==null?void 0:y.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,t,n,o,...a){const c=a.slice(0,o),u=a.slice(o),h=[];for(let y=0;y<c.length;y++)h[y]=Cf(c[y],u);let f=this.global.eval(n);return e===!0?f=f(...h):e===!1?f=f:typeof f=="function"&&(f=f(...h)),t?this._promiseAwareJsonValueNoThrow(f):f}jsonValue(e,t){if(t!==void 0)return K2(t,n=>({fallThrough:n}))}_promiseAwareJsonValueNoThrow(e){const t=n=>{try{return this.jsonValue(!0,n)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const n=await e;return t(n)})():t(e)}}class xS{constructor(e,t){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this._lastAriaSnapshotForTrack=new Map,this.utils={asLocator:Yi,cacheNormalizedWhitespaces:WT,elementText:Ut,getAriaExpanded:cg,getAriaRole:Pe,getElementAccessibleDescription:mb,getElementAccessibleName:di,isElementVisible:dt,isInsideScope:Ue,normalizeWhiteSpace:Mt,parseAriaSnapshot:Jf,generateAriaTree:ba,findNewElement:bC,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=t.isUnderTest,this.utils.builtins=new W2(e,t.isUnderTest).builtins,this._sdkLanguage=t.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=t.testIdAttributeName,this._evaluator=new OC,this.consoleApi=new P2(this),this.onGlobalListenersRemoved=new Set,this._autoClosingTags=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]),this._booleanAttributes=new Set(["checked","selected","disabled","readonly","multiple"]),this._eventTypes=new Map([["auxclick","mouse"],["click","mouse"],["dblclick","mouse"],["mousedown","mouse"],["mouseeenter","mouse"],["mouseleave","mouse"],["mousemove","mouse"],["mouseout","mouse"],["mouseover","mouse"],["mouseup","mouse"],["mouseleave","mouse"],["mousewheel","mouse"],["keydown","keyboard"],["keyup","keyboard"],["keypress","keyboard"],["textInput","keyboard"],["touchstart","touch"],["touchmove","touch"],["touchend","touch"],["touchcancel","touch"],["pointerover","pointer"],["pointerout","pointer"],["pointerenter","pointer"],["pointerleave","pointer"],["pointerdown","pointer"],["pointerup","pointer"],["pointermove","pointer"],["pointercancel","pointer"],["gotpointercapture","pointer"],["lostpointercapture","pointer"],["focus","focus"],["blur","focus"],["drag","drag"],["dragstart","drag"],["dragend","drag"],["dragover","drag"],["dragenter","drag"],["dragleave","drag"],["dragexit","drag"],["drop","drag"],["wheel","wheel"],["deviceorientation","deviceorientation"],["deviceorientationabsolute","deviceorientation"],["devicemotion","devicemotion"]]),this._hoverHitTargetInterceptorEvents=new Set(["mousemove"]),this._tapHitTargetInterceptorEvents=new Set(["pointerdown","pointerup","touchstart","touchend","touchcancel"]),this._mouseHitTargetInterceptorEvents=new Set(["mousedown","mouseup","pointerdown","pointerup","click","auxclick","dblclick","contextmenu"]),this._allHitTargetInterceptorEvents=new Set([...this._hoverHitTargetInterceptorEvents,...this._tapHitTargetInterceptorEvents,...this._mouseHitTargetInterceptorEvents]),this._engines=new Map,this._engines.set("xpath",Hb),this._engines.set("xpath:light",Hb),this._engines.set("_react",MC()),this._engines.set("_vue",D2()),this._engines.set("role",xb(!1)),this._engines.set("text",this._createTextEngine(!0,!1)),this._engines.set("text:light",this._createTextEngine(!1,!1)),this._engines.set("id",this._createAttributeEngine("id",!0)),this._engines.set("id:light",this._createAttributeEngine("id",!1)),this._engines.set("data-testid",this._createAttributeEngine("data-testid",!0)),this._engines.set("data-testid:light",this._createAttributeEngine("data-testid",!1)),this._engines.set("data-test-id",this._createAttributeEngine("data-test-id",!0)),this._engines.set("data-test-id:light",this._createAttributeEngine("data-test-id",!1)),this._engines.set("data-test",this._createAttributeEngine("data-test",!0)),this._engines.set("data-test:light",this._createAttributeEngine("data-test",!1)),this._engines.set("css",this._createCSSEngine()),this._engines.set("nth",{queryAll:()=>[]}),this._engines.set("visible",this._createVisibleEngine()),this._engines.set("internal:control",this._createControlEngine()),this._engines.set("internal:has",this._createHasEngine()),this._engines.set("internal:has-not",this._createHasNotEngine()),this._engines.set("internal:and",{queryAll:()=>[]}),this._engines.set("internal:or",{queryAll:()=>[]}),this._engines.set("internal:chain",this._createInternalChainEngine()),this._engines.set("internal:label",this._createInternalLabelEngine()),this._engines.set("internal:text",this._createTextEngine(!0,!0)),this._engines.set("internal:has-text",this._createInternalHasTextEngine()),this._engines.set("internal:has-not-text",this._createInternalHasNotTextEngine()),this._engines.set("internal:attr",this._createNamedAttributeEngine()),this._engines.set("internal:testid",this._createNamedAttributeEngine()),this._engines.set("internal:role",xb(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:n,source:o}of t.customEngines)this._engines.set(n,this.eval(o));this._stableRafCount=t.stableRafCount,this._browserName=t.browserName,this._isUtilityWorld=!!t.isUtilityWorld,BA({browserNameForWorkarounds:t.browserName}),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),this.isUnderTest&&(this.window.__injectedScript=this)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){const t=Ma(e);return YT(t,n=>{if(!this._engines.has(n.name))throw this.createStacklessError(`Unknown engine "${n.name}" while parsing selector ${e}`)}),t}generateSelector(e,t){return Rb(this,e,t)}generateSelectorSimple(e,t){return Rb(this,e,{...t,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,t,n){const o=this.querySelectorAll(e,t);if(n&&o.length>1)throw this.strictModeViolationError(e,o);return this.checkDeprecatedSelectorUsage(e,o),o[0]}_queryNth(e,t){const n=[...e];let o=+t.body;return o===-1&&(o=n.length-1),new Set(n.slice(o,o+1))}_queryLayoutSelector(e,t,n){const o=t.name,a=t.body,c=[],u=this.querySelectorAll(a.parsed,n);for(const h of e){const f=Gv(o,h,u,a.distance);f!==void 0&&c.push({element:h,score:f})}return c.sort((h,f)=>h.score-f.score),new Set(c.map(h=>h.element))}ariaSnapshot(e,t){return this.incrementalAriaSnapshot(e,t).full}incrementalAriaSnapshot(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const n=ba(e,t),o=va(n,t);let a;if(t.track){const c=this._lastAriaSnapshotForTrack.get(t.track);c&&(a=va(n,t,c)),this._lastAriaSnapshotForTrack.set(t.track,n)}return this._lastAriaSnapshotForQuery=n,{full:o,incremental:a,iframeRefs:n.iframeRefs}}ariaSnapshotForRecorder(){const e=ba(this.document.body,{mode:"ai"});return{ariaSnapshot:va(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,t){return gC(e.documentElement,t)}querySelectorAll(e,t){if(e.capture!==void 0){if(e.parts.some(o=>o.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const n={parts:e.parts.slice(0,e.capture+1)};if(e.capture<e.parts.length-1){const o={parts:e.parts.slice(e.capture+1)},a={name:"internal:has",body:{parsed:o},source:$n(o)};n.parts.push(a)}return this.querySelectorAll(n,t)}if(!t.querySelectorAll)throw this.createStacklessError("Node is not queryable.");if(e.capture!==void 0)throw this.createStacklessError("Internal error: there should not be a capture in the selector.");if(t.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[t];this._evaluator.begin();try{let n=new Set([t]);for(const o of e.parts)if(o.name==="nth")n=this._queryNth(n,o);else if(o.name==="internal:and"){const a=this.querySelectorAll(o.body.parsed,t);n=new Set(a.filter(c=>n.has(c)))}else if(o.name==="internal:or"){const a=this.querySelectorAll(o.body.parsed,t);n=new Set(eS(new Set([...n,...a])))}else if(EC.includes(o.name))n=this._queryLayoutSelector(n,o,t);else{const a=new Set;for(const c of n){const u=this._queryEngineAll(o,c);for(const h of u)a.add(h)}n=a}return[...n]}finally{this._evaluator.end()}}_queryEngineAll(e,t){const n=this._engines.get(e.name).queryAll(t,e.body);for(const o of n)if(!("nodeName"in o))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(o)}`);return n}_createAttributeEngine(e,t){const n=o=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(o)}]`,functions:[]},combinator:""}]}];return{queryAll:(o,a)=>this._evaluator.query({scope:o,pierceShadow:t},n(a))}}_createCSSEngine(){return{queryAll:(e,t)=>this._evaluator.query({scope:e,pierceShadow:!0},t)}}_createTextEngine(e,t){return{queryAll:(o,a)=>{const{matcher:c,kind:u}=ec(a,t),h=[];let f=null;const y=_=>{if(u==="lax"&&f&&f.contains(_))return!1;const b=Wc(this._evaluator._cacheText,_,c);b==="none"&&(f=_),(b==="self"||b==="selfAndChildren"&&u==="strict"&&!t)&&h.push(_)};o.nodeType===Node.ELEMENT_NODE&&y(o);const m=this._evaluator._queryCSS({scope:o,pierceShadow:e},"*");for(const _ of m)y(_);return h}}}_createInternalHasTextEngine(){return{queryAll:(e,t)=>{if(e.nodeType!==1)return[];const n=e,o=Ut(this._evaluator._cacheText,n),{matcher:a}=ec(t,!0);return a(o)?[n]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,t)=>{if(e.nodeType!==1)return[];const n=e,o=Ut(this._evaluator._cacheText,n),{matcher:a}=ec(t,!0);return a(o)?[]:[n]}}}_createInternalLabelEngine(){return{queryAll:(e,t)=>{const{matcher:n}=ec(t,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(a=>Kv(this._evaluator._cacheText,a).some(c=>n(c)))}}}_createNamedAttributeEngine(){return{queryAll:(t,n)=>{const o=ks(n,!0);if(o.name||o.attributes.length!==1)throw new Error("Malformed attribute selector: "+n);const{name:a,value:c,caseSensitive:u}=o.attributes[0],h=u?null:c.toLowerCase();let f;return c instanceof RegExp?f=m=>!!m.match(c):u?f=m=>m===c:f=m=>m.toLowerCase().includes(h),this._evaluator._queryCSS({scope:t,pierceShadow:!0},`[${a}]`).filter(m=>f(m.getAttribute(a)))}}}_createDescribeEngine(){return{queryAll:t=>t.nodeType!==1?[]:[t]}}_createControlEngine(){return{queryAll(e,t){if(t==="enter-frame")return[];if(t==="return-empty")return[];if(t==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${t}`)}}}_createHasEngine(){return{queryAll:(t,n)=>t.nodeType!==1?[]:!!this.querySelector(n.parsed,t,!1)?[t]:[]}}_createHasNotEngine(){return{queryAll:(t,n)=>t.nodeType!==1?[]:!!this.querySelector(n.parsed,t,!1)?[]:[t]}}_createVisibleEngine(){return{queryAll:(t,n)=>{if(t.nodeType!==1)return[];const o=n==="true";return dt(t)===o?[t]:[]}}}_createInternalChainEngine(){return{queryAll:(t,n)=>this.querySelectorAll(n.parsed,t)}}extend(e,t){const n=this.window.eval(`
|
|
114
|
+
(() => {
|
|
115
|
+
const module = {};
|
|
116
|
+
${e}
|
|
117
|
+
return module.exports.default();
|
|
118
|
+
})()`);return new n(this,t)}async viewportRatio(e){return await new Promise(t=>{const n=new IntersectionObserver(o=>{t(o[0].intersectionRatio),n.disconnect()});n.observe(e),this.utils.builtins.requestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const t=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(t.borderLeftWidth||"",10),top:parseInt(t.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const t=e.ownerDocument.defaultView;for(let o=e;o;o=Ge(o))if(t.getComputedStyle(o).transform!=="none")return"transformed";const n=t.getComputedStyle(e);return{left:parseInt(n.borderLeftWidth||"",10)+parseInt(n.paddingLeft||"",10),top:parseInt(n.borderTopWidth||"",10)+parseInt(n.paddingTop||"",10)}}retarget(e,t){let n=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!n)return null;if(t==="none")return n;if(!n.matches("input, textarea, select")&&!n.isContentEditable&&(t==="button-link"?n=n.closest("button, [role=button], a, [role=link]")||n:n=n.closest("button, [role=button], [role=checkbox], [role=radio]")||n),t==="follow-label"&&!n.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!n.isContentEditable){const o=n.closest("label");o&&o.control&&(n=o.control)}return n}async checkElementStates(e,t){if(t.includes("stable")){const n=await this._checkElementIsStable(e);if(n===!1)return{missingState:"stable"};if(n==="error:notconnected")return"error:notconnected"}for(const n of t)if(n!=="stable"){const o=this.elementState(e,n);if(o.received==="error:notconnected")return"error:notconnected";if(!o.matches)return{missingState:n}}}async _checkElementIsStable(e){const t=Symbol("continuePolling");let n,o=0,a=0;const c=()=>{const m=this.retarget(e,"no-follow-label");if(!m)return"error:notconnected";const _=this.utils.builtins.performance.now();if(this._stableRafCount>1&&_-a<15)return t;a=_;const b=m.getBoundingClientRect(),S={x:b.top,y:b.left,width:b.width,height:b.height};if(n){if(!(S.x===n.x&&S.y===n.y&&S.width===n.width&&S.height===n.height))return!1;if(++o>=this._stableRafCount)return!0}return n=S,t};let u,h;const f=new Promise((m,_)=>{u=m,h=_}),y=()=>{try{const m=c();m!==t?u(m):this.utils.builtins.requestAnimationFrame(y)}catch(m){h(m)}};return this.utils.builtins.requestAnimationFrame(y),f}_createAriaRefEngine(){return{queryAll:(t,n)=>{var a,c;const o=(c=(a=this._lastAriaSnapshotForQuery)==null?void 0:a.elements)==null?void 0:c.get(n);return o&&o.isConnected?[o]:[]}}}elementState(e,t){const n=this.retarget(e,["visible","hidden"].includes(t)?"none":"follow-label");if(!n||!n.isConnected)return t==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(t==="visible"||t==="hidden"){const o=dt(n);return{matches:t==="visible"?o:!o,received:o?"visible":"hidden"}}if(t==="disabled"||t==="enabled"){const o=Rc(n);return{matches:t==="disabled"?o:!o,received:o?"disabled":"enabled"}}if(t==="editable"){const o=Rc(n),a=tC(n);if(a==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!o&&!a,received:o?"disabled":a?"readOnly":"editable"}}if(t==="checked"||t==="unchecked"){const o=t==="checked",a=QA(n);if(a==="error")throw this.createStacklessError("Not a checkbox or radio button");const c=n.nodeName==="INPUT"&&n.type==="radio";return{matches:o===a,received:a?"checked":"unchecked",isRadio:c}}if(t==="indeterminate"){const o=ZA(n);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:o==="mixed",received:o===!0?"checked":o===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${t}"`)}selectOptions(e,t){const n=this.retarget(e,"follow-label");if(!n)return"error:notconnected";if(n.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const o=n,a=[...o.options],c=[];let u=t.slice();for(let h=0;h<a.length;h++){const f=a[h],y=m=>{if(m instanceof Node)return f===m;let _=!0;return m.valueOrLabel!==void 0&&(_=_&&(m.valueOrLabel===f.value||m.valueOrLabel===f.label)),m.value!==void 0&&(_=_&&m.value===f.value),m.label!==void 0&&(_=_&&m.label===f.label),m.index!==void 0&&(_=_&&m.index===h),_};if(u.some(y)){if(!this.elementState(f,"enabled").matches)return"error:optionnotenabled";if(c.push(f),o.multiple)u=u.filter(m=>!y(m));else{u=[];break}}}return u.length?"error:optionsnotfound":(o.value=void 0,c.forEach(h=>h.selected=!0),o.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),o.dispatchEvent(new Event("change",{bubbles:!0})),c.map(h=>h.value))}fill(e,t){const n=this.retarget(e,"follow-label");if(!n)return"error:notconnected";if(n.nodeName.toLowerCase()==="input"){const o=n,a=o.type.toLowerCase(),c=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(a)&&!c.has(a))throw this.createStacklessError(`Input of type "${a}" cannot be filled`);if(a==="number"&&(t=t.trim(),isNaN(Number(t))))throw this.createStacklessError("Cannot type text into input[type=number]");if(a==="color"&&(t=t.toLowerCase()),c.has(a)){if(t=t.trim(),o.focus(),o.value=t,o.value!==t)throw this.createStacklessError("Malformed value");return n.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),n.dispatchEvent(new Event("change",{bubbles:!0})),"done"}}else if(n.nodeName.toLowerCase()!=="textarea"){if(!n.isContentEditable)throw this.createStacklessError("Element is not an <input>, <textarea> or [contenteditable] element")}return this.selectText(n),"needsinput"}selectText(e){const t=this.retarget(e,"follow-label");if(!t)return"error:notconnected";if(t.nodeName.toLowerCase()==="input"){const a=t;return a.select(),a.focus(),"done"}if(t.nodeName.toLowerCase()==="textarea"){const a=t;return a.selectionStart=0,a.selectionEnd=a.value.length,a.focus(),"done"}const n=t.ownerDocument.createRange();n.selectNodeContents(t);const o=t.ownerDocument.defaultView.getSelection();return o&&(o.removeAllRanges(),o.addRange(n)),t.focus(),"done"}_activelyFocused(e){const t=e.getRootNode().activeElement,n=t===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:t,isFocused:n}}focusNode(e,t){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:n,isFocused:o}=this._activelyFocused(e);if(e.isContentEditable&&!o&&n&&n.blur&&n.blur(),e.focus(),e.focus(),t&&!o&&e.nodeName.toLowerCase()==="input")try{e.setSelectionRange(0,0)}catch{}return"done"}blurNode(e){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");return e.blur(),"done"}setInputFiles(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"Node is not of type HTMLElement";const n=e;if(n.nodeName!=="INPUT")return"Not an <input> element";const o=n;if((o.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const c=t.map(h=>{const f=Uint8Array.from(atob(h.buffer),y=>y.charCodeAt(0));return new File([f],h.name,{type:h.mimeType,lastModified:h.lastModifiedMs})}),u=new DataTransfer;for(const h of c)u.items.add(h);o.files=u.files,o.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),o.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,t){const n=[];let o=t;for(;o;){const y=wv(o);if(!y||(n.push(y),y.nodeType===9))break;o=y.host}let a;for(let y=n.length-1;y>=0;y--){const m=n[y],_=m.elementsFromPoint(e.x,e.y),b=m.elementFromPoint(e.x,e.y);if(b&&_[0]&&Ge(b)===_[0]){const v=this.window.getComputedStyle(b);(v==null?void 0:v.display)==="contents"&&_.unshift(b)}_[0]&&_[0].shadowRoot===m&&_[1]===b&&_.shift();const S=_[0];if(!S||(a=S,y&&S!==n[y-1].host))break}const c=[];for(;a&&a!==t;)c.push(a),a=a.assignedSlot??Ge(a);if(a===t)return"done";const u=this.previewNode(c[0]||this.document.documentElement);let h,f=t;for(;f;){const y=c.indexOf(f);if(y!==-1){y>1&&(h=this.previewNode(c[y-1]));break}f=Ge(f)}return h?{hitTargetDescription:`${u} from ${h} subtree`}:{hitTargetDescription:u}}setupHitTargetInterceptor(e,t,n,o){const a=this.retarget(e,"button-link");if(!a||!a.isConnected)return"error:notconnected";if(n){const y=this.expectHitTarget(n,a);if(y!=="done")return y.hitTargetDescription}if(t==="drag")return{stop:()=>"done"};const c={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[t];let u;const h=y=>{if(!c.has(y.type)||!y.isTrusted)return;const m=this.window.TouchEvent&&y instanceof this.window.TouchEvent?y.touches[0]:y;u===void 0&&m&&(u=this.expectHitTarget({x:m.clientX,y:m.clientY},a)),(o||u!=="done"&&u!==void 0)&&(y.preventDefault(),y.stopPropagation(),y.stopImmediatePropagation())},f=()=>(this._hitTargetInterceptor===h&&(this._hitTargetInterceptor=void 0),u||"done");return this._hitTargetInterceptor=h,{stop:f}}dispatchEvent(e,t,n){var c,u,h;let o;const a={bubbles:!0,cancelable:!0,composed:!0,...n};switch(this._eventTypes.get(t)){case"mouse":o=new MouseEvent(t,a);break;case"keyboard":o=new KeyboardEvent(t,a);break;case"touch":{if(this._browserName==="webkit"){const f=m=>{var S,v;if(m instanceof Touch)return m;let _=m.pageX;_===void 0&&m.clientX!==void 0&&(_=m.clientX+(((S=this.document.scrollingElement)==null?void 0:S.scrollLeft)||0));let b=m.pageY;return b===void 0&&m.clientY!==void 0&&(b=m.clientY+(((v=this.document.scrollingElement)==null?void 0:v.scrollTop)||0)),this.document.createTouch(this.window,m.target??e,m.identifier,_,b,m.screenX,m.screenY,m.radiusX,m.radiusY,m.rotationAngle,m.force)},y=m=>m instanceof TouchList||!m?m:this.document.createTouchList(...m.map(f));a.target??(a.target=e),a.touches=y(a.touches),a.targetTouches=y(a.targetTouches),a.changedTouches=y(a.changedTouches),o=new TouchEvent(t,a)}else a.target??(a.target=e),a.touches=(c=a.touches)==null?void 0:c.map(f=>f instanceof Touch?f:new Touch({...f,target:f.target??e})),a.targetTouches=(u=a.targetTouches)==null?void 0:u.map(f=>f instanceof Touch?f:new Touch({...f,target:f.target??e})),a.changedTouches=(h=a.changedTouches)==null?void 0:h.map(f=>f instanceof Touch?f:new Touch({...f,target:f.target??e})),o=new TouchEvent(t,a);break}case"pointer":o=new PointerEvent(t,a);break;case"focus":o=new FocusEvent(t,a);break;case"drag":o=new DragEvent(t,a);break;case"wheel":o=new WheelEvent(t,a);break;case"deviceorientation":try{o=new DeviceOrientationEvent(t,a)}catch{const{bubbles:f,cancelable:y,alpha:m,beta:_,gamma:b,absolute:S}=a;o=this.document.createEvent("DeviceOrientationEvent"),o.initDeviceOrientationEvent(t,f,y,m,_,b,S)}break;case"devicemotion":try{o=new DeviceMotionEvent(t,a)}catch{const{bubbles:f,cancelable:y,acceleration:m,accelerationIncludingGravity:_,rotationRate:b,interval:S}=a;o=this.document.createEvent("DeviceMotionEvent"),o.initDeviceMotionEvent(t,f,y,m,_,b,S)}break;default:o=new Event(t,a);break}e.dispatchEvent(o)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return Ql(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return Ql(`<${e.nodeName.toLowerCase()} />`);const t=e,n=[];for(let h=0;h<t.attributes.length;h++){const{name:f,value:y}=t.attributes[h];f!=="style"&&(!y&&this._booleanAttributes.has(f)?n.push(` ${f}`):n.push(` ${f}="${y}"`))}n.sort((h,f)=>h.length-f.length);const o=Q_(n.join(""),500);if(this._autoClosingTags.has(t.nodeName))return Ql(`<${t.nodeName.toLowerCase()}${o}/>`);const a=t.childNodes;let c=!1;if(a.length<=5){c=!0;for(let h=0;h<a.length;h++)c=c&&a[h].nodeType===Node.TEXT_NODE}const u=c?t.textContent||"":a.length?"…":"";return Ql(`<${t.nodeName.toLowerCase()}${o}>${Q_(u,50)}</${t.nodeName.toLowerCase()}>`)}_generateSelectors(e){this._evaluator.begin(),Yc(),tg();try{const t=this._isUtilityWorld&&this._browserName==="firefox"?2:10;return e.slice(0,t).map(o=>({preview:this.previewNode(o),selector:this.generateSelectorSimple(o)})).map((o,a)=>`${a+1}) ${o.preview} aka ${Yi(this._sdkLanguage,o.selector)}`)}finally{ng(),Kc(),this._evaluator.end()}}strictModeViolationError(e,t){const n=this._generateSelectors(t).map(o=>`
|
|
119
|
+
`+o);return n.length<t.length&&n.push(`
|
|
120
|
+
...`),this.createStacklessError(`strict mode violation: ${Yi(this._sdkLanguage,$n(e))} resolved to ${t.length} elements:${n.join("")}
|
|
121
|
+
`)}checkDeprecatedSelectorUsage(e,t){const n=new Set(["_react","_vue","xpath:light","text:light","id:light","data-testid:light","data-test-id:light","data-test:light"]);if(!t.length)return;const o=e.parts.find(c=>n.has(c.name));if(!o)return;const a=this._generateSelectors(t).map(c=>`
|
|
122
|
+
`+c);throw a.length<t.length&&a.push(`
|
|
123
|
+
...`),this.createStacklessError(`"${o.name}" selector is not supported: ${Yi(this._sdkLanguage,$n(e))} resolved to ${t.length} element${t.length===1?"":"s"}:${a.join("")}
|
|
124
|
+
`)}createStacklessError(e){if(this._browserName==="firefox"){const n=new Error("Error: "+e);return n.stack="",n}const t=new Error(e);return delete t.stack,t}createHighlight(){return new qh(this)}maskSelectors(e,t){this._highlight&&this.hideHighlight(),this._highlight=new qh(this),this._highlight.install();const n=[];for(const o of e)n.push(this.querySelectorAll(o,this.document.documentElement));this._highlight.maskElements(n.flat(),t)}highlight(e){this._highlight||(this._highlight=new qh(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,t){var c,u;((c=this._markedElements)==null?void 0:c.callId)!==t&&(this._markedElements=void 0);const n=((u=this._markedElements)==null?void 0:u.elements)||new Set,o=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:t,composed:!0});for(const h of n)e.has(h)||h.dispatchEvent(o);const a=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:t,composed:!0});for(const h of e)n.has(h)||h.dispatchEvent(a);this._markedElements={callId:t,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let t=!1;const n=()=>t=!0;this.window.addEventListener(e,n),new MutationObserver(o=>{if(o.some(c=>Array.from(c.addedNodes).includes(this.document.documentElement))&&(t=!1,this.window.dispatchEvent(new CustomEvent(e)),!t)){this.window.addEventListener(e,n);for(const c of this.onGlobalListenersRemoved)c()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=n=>{var o;return(o=this._hitTargetInterceptor)==null?void 0:o.call(this,n)},t=()=>{for(const n of this._allHitTargetInterceptorEvents)this.window.addEventListener(n,e,{capture:!0,passive:!1})};t(),this.onGlobalListenersRemoved.add(t)}async expect(e,t,n){var a,c;if(t.expression==="to.have.count"||t.expression.endsWith(".array"))return this.expectArray(n,t);if(!e){if(!t.isNot&&t.expression==="to.be.hidden")return{matches:!0};if(t.isNot&&t.expression==="to.be.visible")return{matches:!1};if(!t.isNot&&t.expression==="to.be.detached")return{matches:!0};if(t.isNot&&t.expression==="to.be.attached")return{matches:!1};if(t.isNot&&t.expression==="to.be.in.viewport")return{matches:!1};if(t.expression==="to.have.title"&&((a=t==null?void 0:t.expectedText)!=null&&a[0])){const u=new xr(t.expectedText[0]),h=this.document.title;return{received:h,matches:u.matches(h)}}if(t.expression==="to.have.url"&&((c=t==null?void 0:t.expectedText)!=null&&c[0])){const u=new xr(t.expectedText[0]),h=this.document.location.href;return{received:h,matches:u.matches(h)}}return{matches:t.isNot,missingReceived:!0}}return await this.expectSingleElement(e,t)}async expectSingleElement(e,t){var o;const n=t.expression;{let a;if(n==="to.have.attribute"){const c=e.hasAttribute(t.expressionArg);a={matches:c,received:c?"attribute present":"attribute not present"}}else if(n==="to.be.checked"){const{checked:c,indeterminate:u}=t.expectedValue;if(u){if(c!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");a=this.elementState(e,"indeterminate")}else a=this.elementState(e,c===!1?"unchecked":"checked")}else if(n==="to.be.disabled")a=this.elementState(e,"disabled");else if(n==="to.be.editable")a=this.elementState(e,"editable");else if(n==="to.be.readonly")a=this.elementState(e,"editable"),a.matches=!a.matches;else if(n==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e.value;a={matches:!c,received:c?"notEmpty":"empty"}}else{const c=(o=e.textContent)==null?void 0:o.trim();a={matches:!c,received:c?"notEmpty":"empty"}}else if(n==="to.be.enabled")a=this.elementState(e,"enabled");else if(n==="to.be.focused"){const c=this._activelyFocused(e).isFocused;a={matches:c,received:c?"focused":"inactive"}}else n==="to.be.hidden"?a=this.elementState(e,"hidden"):n==="to.be.visible"?a=this.elementState(e,"visible"):n==="to.be.attached"?a={matches:!0,received:"attached"}:n==="to.be.detached"&&(a={matches:!1,received:"attached"});if(a){if(a.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return a}}if(n==="to.have.property"){let a=e;const c=t.expressionArg.split(".");for(let f=0;f<c.length-1;f++){if(typeof a!="object"||!(c[f]in a))return{received:void 0,matches:!1};a=a[c[f]]}const u=a[c[c.length-1]],h=Nf(u,t.expectedValue);return{received:u,matches:h}}if(n==="to.be.in.viewport"){const a=await this.viewportRatio(e);return{received:`viewport ratio ${a}`,matches:a>0&&a>(t.expectedNumber??0)-1e-9}}if(n==="to.have.values"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="SELECT"||!e.multiple)throw this.createStacklessError("Not a select element with a multiple attribute");const a=[...e.selectedOptions].map(c=>c.value);return a.length!==t.expectedText.length?{received:a,matches:!1}:{received:a,matches:a.map((c,u)=>new xr(t.expectedText[u]).matches(c)).every(Boolean)}}if(n==="to.match.aria"){const a=fC(e,t.expectedValue);return{received:a.received,matches:!!a.matches.length}}{let a;if(n==="to.have.attribute.value"){const c=e.getAttribute(t.expressionArg);if(c===null)return{received:null,matches:!1};a=c}else if(["to.have.class","to.contain.class"].includes(n)){if(!t.expectedText)throw this.createStacklessError("Expected text is not provided for "+n);return{received:e.classList.toString(),matches:new xr(t.expectedText[0]).matchesClassList(this,e.classList,n==="to.contain.class")}}else if(n==="to.have.css")a=this.window.getComputedStyle(e).getPropertyValue(t.expressionArg);else if(n==="to.have.id")a=e.id;else if(n==="to.have.text")a=t.useInnerText?e.innerText:Ut(new Map,e).full;else if(n==="to.have.accessible.name")a=di(e,!1);else if(n==="to.have.accessible.description")a=mb(e,!1);else if(n==="to.have.accessible.error.message")a=WA(e);else if(n==="to.have.role")a=Pe(e)||"";else if(n==="to.have.value"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"&&e.nodeName!=="SELECT")throw this.createStacklessError("Not an input element");a=e.value}if(a!==void 0&&t.expectedText){const c=new xr(t.expectedText[0]);return{received:a,matches:c.matches(a)}}}throw this.createStacklessError("Unknown expect matcher: "+n)}expectArray(e,t){const n=t.expression;if(n==="to.have.count"){const h=e.length,f=h===t.expectedNumber;return{received:h,matches:f}}if(!t.expectedText)throw this.createStacklessError("Expected text is not provided for "+n);if(["to.have.class.array","to.contain.class.array"].includes(n)){const h=e.map(m=>m.classList),f=h.map(String);if(h.length!==t.expectedText.length)return{received:f,matches:!1};const y=this._matchSequentially(t.expectedText,h,(m,_)=>m.matchesClassList(this,_,n==="to.contain.class.array"));return{received:f,matches:y}}if(!["to.contain.text.array","to.have.text.array"].includes(n))throw this.createStacklessError("Unknown expect matcher: "+n);const o=e.map(h=>t.useInnerText?h.innerText:Ut(new Map,h).full),a=n!=="to.contain.text.array";if(!(o.length===t.expectedText.length||!a))return{received:o,matches:!1};const u=this._matchSequentially(t.expectedText,o,(h,f)=>h.matches(f));return{received:o,matches:u}}_matchSequentially(e,t,n){const o=e.map(u=>new xr(u));let a=0,c=0;for(;a<o.length&&c<t.length;)n(o[a],t[c])&&++a,++c;return a===o.length}}function Ql(i){return i.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function J2(i){if(i=i.substring(1,i.length-1),!i.includes("\\"))return i;const e=[];let t=0;for(;t<i.length;)i[t]==="\\"&&t+1<i.length&&t++,e.push(i[t++]);return e.join("")}function ec(i,e){if(i[0]==="/"&&i.lastIndexOf("/")>0){const o=i.lastIndexOf("/"),a=new RegExp(i.substring(1,o),i.substring(o+1));return{matcher:c=>a.test(c.full),kind:"regex"}}const t=e?JSON.parse.bind(JSON):J2;let n=!1;return i.length>1&&i[0]==='"'&&i[i.length-1]==='"'?(i=t(i),n=!0):e&&i.length>1&&i[0]==='"'&&i[i.length-2]==='"'&&i[i.length-1]==="i"?(i=t(i.substring(0,i.length-1)),n=!1):e&&i.length>1&&i[0]==='"'&&i[i.length-2]==='"'&&i[i.length-1]==="s"?(i=t(i.substring(0,i.length-1)),n=!0):i.length>1&&i[0]==="'"&&i[i.length-1]==="'"&&(i=t(i),n=!0),i=Mt(i),n?e?{kind:"strict",matcher:a=>a.normalized===i}:{matcher:a=>!i&&!a.immediate.length?!0:a.immediate.some(c=>Mt(c)===i),kind:"strict"}:(i=i.toLowerCase(),{kind:"lax",matcher:o=>o.normalized.toLowerCase().includes(i)})}class xr{constructor(e){if(this._normalizeWhiteSpace=e.normalizeWhiteSpace,this._ignoreCase=e.ignoreCase,this._string=e.matchSubstring?void 0:this.normalize(e.string),this._substring=e.matchSubstring?this.normalize(e.string):void 0,e.regexSource){const t=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&t.delete("i"),e.ignoreCase===!0&&t.add("i"),this._regex=new RegExp(e.regexSource,[...t].join(""))}}matches(e){return this._regex||(e=this.normalize(e)),this._string!==void 0?e===this._string:this._substring!==void 0?e.includes(this._substring):this._regex?!!this._regex.test(e):!1}matchesClassList(e,t,n){if(n){if(this._regex)throw e.createStacklessError("Partial matching does not support regular expressions. Please provide a string value.");return this._string.split(/\s+/g).filter(Boolean).every(o=>t.contains(o))}return this.matches(t.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=Mt(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function Nf(i,e){if(i===e)return!0;if(i&&e&&typeof i=="object"&&typeof e=="object"){if(i.constructor!==e.constructor)return!1;if(Array.isArray(i)){if(i.length!==e.length)return!1;for(let n=0;n<i.length;++n)if(!Nf(i[n],e[n]))return!1;return!0}if(i instanceof RegExp)return i.source===e.source&&i.flags===e.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===e.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===e.toString();const t=Object.keys(i);if(t.length!==Object.keys(e).length)return!1;for(let n=0;n<t.length;++n)if(!e.hasOwnProperty(t[n]))return!1;for(const n of t)if(!Nf(i[n],e[n]))return!1;return!0}return typeof i=="number"&&typeof e=="number"?isNaN(i)&&isNaN(e):!1}const Z2={tagName:"svg",children:[{tagName:"defs",children:[{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gripper"},children:[{tagName:"path",attrs:{d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-circle-large-filled"},children:[{tagName:"path",attrs:{d:"M8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674 7.157 7.157 0 0 1-2.516 2.509 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-stop-circle"},children:[{tagName:"path",attrs:{d:"M6 6h4v4H6z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-inspect"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 3l1-1h12l1 1v6h-1V3H2v8h5v1H2l-1-1V3zm14.707 9.707L9 6v9.414l2.707-2.707h4zM10 13V8.414l3.293 3.293h-2L10 13z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-whole-word"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 11H1V13H15V11H16V14H15H1H0V11Z"}},{tagName:"path",attrs:{d:"M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z"}},{tagName:"path",attrs:{d:"M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-eye"},children:[{tagName:"path",attrs:{d:"M7.99993 6.00316C9.47266 6.00316 10.6666 7.19708 10.6666 8.66981C10.6666 10.1426 9.47266 11.3365 7.99993 11.3365C6.52715 11.3365 5.33324 10.1426 5.33324 8.66981C5.33324 7.19708 6.52715 6.00316 7.99993 6.00316ZM7.99993 7.00315C7.07946 7.00315 6.33324 7.74935 6.33324 8.66981C6.33324 9.59028 7.07946 10.3365 7.99993 10.3365C8.9204 10.3365 9.6666 9.59028 9.6666 8.66981C9.6666 7.74935 8.9204 7.00315 7.99993 7.00315ZM7.99993 3.66675C11.0756 3.66675 13.7307 5.76675 14.4673 8.70968C14.5344 8.97755 14.3716 9.24908 14.1037 9.31615C13.8358 9.38315 13.5643 9.22041 13.4973 8.95248C12.8713 6.45205 10.6141 4.66675 7.99993 4.66675C5.38454 4.66675 3.12664 6.45359 2.50182 8.95555C2.43491 9.22341 2.16348 9.38635 1.89557 9.31948C1.62766 9.25255 1.46471 8.98115 1.53162 8.71321C2.26701 5.76856 4.9229 3.66675 7.99993 3.66675Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-symbol-constant"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 6h8v1H4V6zm8 3H4v1h8V9z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 4l1-1h12l1 1v8l-1 1H2l-1-1V4zm1 0v8h12V4H2z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-check"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1",id:"icon-location-pin"},children:[{tagName:"path",attrs:{d:`
|
|
125
|
+
M8 1
|
|
126
|
+
C5.243 1 3 3.243 3 6
|
|
127
|
+
C3 9 8 14 8 14
|
|
128
|
+
C8 14 13 9 13 6
|
|
129
|
+
C13 3.243 10.757 1 8 1
|
|
130
|
+
Z
|
|
131
|
+
M6 6
|
|
132
|
+
A2 2 0 1 1 10 6
|
|
133
|
+
A2 2 0 1 1 6 6
|
|
134
|
+
Z
|
|
135
|
+
`}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-layers"},children:[{tagName:"path",attrs:{d:"M8 2L2 5v1l6 3 6-3V5L8 2zm0 1.18L11.82 5 8 6.82 4.18 5 8 3.18zM2 7.13V8l6 3 6-3v-.87L8 10.2 2 7.13zM2 10.13V11l6 3 6-3v-.87L8 13.2 2 10.13z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-list-tree"},children:[{tagName:"path",attrs:{d:"M2 3.5C2 3.22386 2.22386 3 2.5 3H13.5C13.7761 3 14 3.22386 14 3.5C14 3.77614 13.7761 4 13.5 4H6V6H13.5C13.7761 6 14 6.22386 14 6.5C14 6.77614 13.7761 7 13.5 7H6V9H13.5C13.7761 9 14 9.22386 14 9.5C14 9.77614 13.7761 10 13.5 10H6V12H13.5C13.7761 12 14 12.2239 14 12.5C14 12.7761 13.7761 13 13.5 13H5.5C5.22386 13 5 12.7761 5 12.5V4H2.5C2.22386 4 2 3.77614 2 3.5Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-brackets"},children:[{tagName:"path",attrs:{d:"M4.5 2H2v12h2.5v-1H3V3h1.5V2zm7 0H14v12h-2.5v-1H13V3h-1.5V2zM6 5h4v1H6V5zm0 3h4v1H6V8zm0 3h4v1H6v-1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-braces"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 3.5C3 2.67 3.67 2 4.5 2H5v1h-.5c-.28 0-.5.22-.5.5v3c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5v3c0 .28.22.5.5.5H5v1h-.5C3.67 14 3 13.33 3 12.5v-3c0-.28-.22-.5-.5-.5H2V8h.5c.28 0 .5-.22.5-.5v-3zm10 0C13 2.67 12.33 2 11.5 2H11v1h.5c.28 0 .5.22.5.5v3c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5v3c0 .28-.22.5-.5.5H11v1h.5c.83 0 1.5-.67 1.5-1.5v-3c0-.28.22-.5.5-.5H14V8h-.5c-.28 0-.5-.22-.5-.5v-3z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-braces-dashes"},children:[{tagName:"path",attrs:{d:"M3 3.5C3 2.67 3.67 2 4.5 2H5v1h-.5c-.28 0-.5.22-.5.5v3c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5v3c0 .28.22.5.5.5H5v1h-.5C3.67 14 3 13.33 3 12.5v-3c0-.28-.22-.5-.5-.5H2V8h.5c.28 0 .5-.22.5-.5v-3zm10 0C13 2.67 12.33 2 11.5 2H11v1h.5c.28 0 .5.22.5.5v3c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5v3c0 .28-.22.5-.5.5H11v1h.5c.83 0 1.5-.67 1.5-1.5v-3c0-.28.22-.5.5-.5H14V8h-.5c-.28 0-.5-.22-.5-.5v-3zM6 5h4v1H6V5zm0 3h4v1H6V8zm0 3h4v1H6v-1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-close"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-pass"},children:[{tagName:"path",attrs:{d:"M6.27 10.87h.71l4.56-4.56-.71-.71-4.2 4.21-1.92-1.92L4 8.6l2.27 2.27z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gist"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.57 1.14l3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13l.5-.5h7.72l.35.14zM10 5h3l-3-3v3zM3 2v12h10V6H9.5L9 5.5V2H3zm2.062 7.533l1.817-1.828L6.17 7 4 9.179v.707l2.171 2.174.707-.707-1.816-1.82zM8.8 7.714l.7-.709 2.189 2.175v.709L9.5 12.062l-.705-.709 1.831-1.82L8.8 7.714z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-snapshot"},children:[{tagName:"path",attrs:{d:"M2 1.5l.5-.5h7.72l.35.14 3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13zm1 .5v12h10V6H9.5L9 5.5V2H3zm7 0v3h3l-3-3z"}},{tagName:"path",attrs:{fill:"none",stroke:"currentColor","stroke-width":"0.8",transform:"rotate(7 8 8.7)",d:"M 10 5.2 C 8 5.2, 6 5.7, 6 7.2 C 6 8.7, 7.5 8.7, 8 8.7 C 8.5 8.7, 10 8.7, 10 10.2 C 10 11.7, 8 12.2, 6 12.2"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-move"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.5 2.5V5.5H7.5V2.5L6.20711 3.79289L5.5 3.08579L8 0.585786L10.5 3.08579L9.79289 3.79289L8.5 2.5ZM7.5 10.5V13.5L6.20711 12.2071L5.5 12.9142L8 15.4142L10.5 12.9142L9.79289 12.2071L8.5 13.5V10.5H7.5ZM10.5 8.5H13.5L12.2071 9.79289L12.9142 10.5L15.4142 8L12.9142 5.5L12.2071 6.20711L13.5 7.5H10.5V8.5ZM5.5 7.5H2.5L3.79289 6.20711L3.08579 5.5L0.585786 8L3.08579 10.5L3.79289 9.79289L2.5 8.5H5.5V7.5Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-selection"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 1H3V2H2V3H1V1ZM4 1H6V2H4V1ZM7 1H9V2H7V1ZM10 1H12V2H10V1ZM13 1H15V3H14V2H13V1ZM14 4H15V6H14V4ZM14 7H15V9H14V7ZM14 10H15V12H14V10ZM13 13V14H14V15H13H12V14H13V13H14V12H15V13V15H13ZM10 14H12V15H10V14ZM7 14H9V15H7V14ZM4 14H6V15H4V14ZM1 13H2V14H3V15H1V13ZM1 10H2V12H1V10ZM1 7H2V9H1V7ZM1 4H2V6H1V4Z"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-table"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd",d:"M2 3h12v10H2V3zm1 1v8h10V4H3z"}},{tagName:"rect",attrs:{x:"2",y:"6.33",width:"12",height:"1"}},{tagName:"rect",attrs:{x:"2",y:"9.67",width:"12",height:"1"}},{tagName:"rect",attrs:{x:"5.67",y:"3",width:"1",height:"10"}},{tagName:"rect",attrs:{x:"9.33",y:"3",width:"1",height:"10"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-file-upload"},children:[{tagName:"path",attrs:{d:"M14.5 3H7.71l-.85-.85L6.51 2h-5l-.5.5v11l.5.5h13l.5-.5v-10L14.5 3zm-.51 8.49V13h-12V7h4.49l.35-.15.86-.86H14v1.5l.001 4zm0-6.49h-6.5l-.35.15-.86.86H2v-3h4.29l.85.85.36.15H14l-.01.99z"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-eraser"},children:[{tagName:"path",attrs:{d:"M 13.54 2.70 L 11.30 0.46 C 10.68 -0.15 9.68 -0.15 9.06 0.46 L 3.34 6.18 L 1.46 8.07 C 0.85 8.68 0.85 9.68 1.46 10.30 L 3.70 12.54 C 4.01 12.84 4.41 13 4.82 13 C 5.22 13 5.63 12.84 5.93 12.54 L 7.82 10.66 L 8.26 10.21 L 13.54 4.93 C 13.84 4.64 14 4.24 14 3.82 C 14 3.39 13.84 3.00 13.54 2.70 Z M 7.37 10.21 L 5.49 12.09 C 5.12 12.46 4.51 12.46 4.15 12.09 L 1.91 9.85 C 1.54 9.48 1.54 8.88 1.91 8.51 L 3.79 6.63 L 7.37 10.21 Z M 13.09 4.49 L 7.82 9.76 L 6.03 7.97 L 4.24 6.18 L 9.51 0.91 C 9.88 0.54 10.48 0.54 10.85 0.91 L 13.09 3.15 C 13.27 3.33 13.37 3.56 13.37 3.82 C 13.37 4.07 13.27 4.31 13.09 4.49 Z"}},{tagName:"rect",attrs:{x:"1",y:"13.2",width:"12",height:"1.6"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 100 100",fill:"currentColor",id:"icon-sketch-tool"},children:[{tagName:"path",attrs:{d:"m37.68 70.594c-0.36328 0.75781-0.66406 1.5508-0.89063 2.3594-0.41406 1.4727-0.58984 3.0195-0.51562 4.5742 0.042968 0.95312-0.58984 1.7852-1.4766 2.0195l-21.281 5.707c-1.0664 0.28516-2.1602-0.34766-2.4453-1.4141-0.09375-0.35156-0.085937-0.70703 0-1.0312l5.7031-21.285c0.25781-0.96094 1.1719-1.5703 2.1289-1.4727 1.5195 0.0625 3.0273-0.11719 4.4688-0.51953 0.80859-0.22656 1.5977-0.52734 2.3594-0.89453-0.64453-0.78516-0.60156-1.9453 0.13281-2.6797l3.7227-3.7227c0.70703-0.70703 1.8086-0.77344 2.5898-0.20312l35.953-35.953c-0.57031-0.78125-0.50391-1.8828 0.20312-2.5898l3.7227-3.7227c0.70703-0.70703 1.8086-0.77344 2.5898-0.20312l6.5039-6.5039c0.78125-0.78125 2.0469-0.78125 2.8281 0l9.2891 9.2891c0.78125 0.78125 0.78125 2.0469 0 2.8281l-6.5039 6.5039c0.57031 0.78125 0.5 1.8828-0.20312 2.5859l-0.49219 0.49219 2.875 2.875c0.78125 0.78125 0.78125 2.0469 0 2.8281l-16.711 16.711c-0.78125 0.78125-2.0469 0.78125-2.8281 0s-0.78125-2.0469 0-2.8281l15.297-15.297-1.4609-1.4609-0.40234 0.40234c-0.70703 0.70703-1.8047 0.77344-2.5859 0.20312l-35.953 35.953c0.56641 0.78125 0.5 1.8828-0.20312 2.5859l-3.7227 3.7227c-0.73438 0.73438-1.8945 0.77734-2.6797 0.13281zm-9.0078-8.9961c-1.3281 0.76562-2.75 1.3594-4.2266 1.7734-1.3711 0.37891-2.7812 0.60547-4.2109 0.66406l-3.375 12.598 5.2109-5.2109c-0.18359-0.51562-0.27734-1.0547-0.27734-1.5938 0-1.1992 0.46094-2.4023 1.3789-3.3203 0.91406-0.91406 2.1211-1.375 3.3203-1.375 1.1953 0 2.3945 0.46094 3.3125 1.375 0.92187 0.92578 1.3828 2.1289 1.3828 3.3203 0 1.1406-0.41797 2.2852-1.25 3.1836-0.88672 0.96875-2.1328 1.5117-3.4453 1.5117-0.53906 0-1.0742-0.09375-1.5898-0.28125l-5.2148 5.2148 12.598-3.375c0.058594-1.4336 0.28516-2.8477 0.66406-4.2109 0.41406-1.4766 1.0078-2.8984 1.7734-4.2266l-6.0508-6.0508zm11.168 3.7227-8.8438-8.8438-0.89453 0.89453 8.8438 8.8438zm37.645-52.945 6.4609 6.4609 5.0742-5.0742-6.4609-6.4609zm-0.089844 13.012-6.4609-6.4609-35.871 35.871 6.4609 6.4609zm4.6367-2.8086-8.293-8.293c-0.12109-0.054687-0.23828-0.125-0.34766-0.20312l-0.82422 0.82422 8.8438 8.8438 0.82031-0.82031c-0.082031-0.10938-0.14844-0.23047-0.20312-0.35156zm-75.164 68.324c-0.83984-0.71094-0.94531-1.9727-0.23438-2.8125 0.71094-0.83984 1.9727-0.94531 2.8125-0.23438 11.77 10.004 24.934 4.5469 38.125-0.91797 14.867-6.1602 29.77-12.34 43.941 0.98828 0.80078 0.75391 0.83984 2.0195 0.085937 2.8203-0.75391 0.80078-2.0195 0.83984-2.8203 0.085937-12.289-11.559-26-5.875-39.676-0.20703-14.32 5.9336-28.609 11.855-42.234 0.27734zm19.625-20.375c0.23437 0 0.37891-0.09375 0.53906-0.24609 0.10156-0.125 0.15625-0.28516 0.15625-0.44922 0-0.18359-0.066406-0.36328-0.19922-0.49609-0.13281-0.13281-0.3125-0.19922-0.49609-0.19922-0.17969 0-0.35938 0.070312-0.49219 0.20312-0.13281 0.13281-0.20312 0.31641-0.20312 0.49219 0 0.17969 0.070313 0.35938 0.20312 0.49219 0.13281 0.13672 0.30078 0.20312 0.49219 0.20312z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gojs-link"},children:[{tagName:"path",attrs:{d:"M 0.75 3.5 A 1.75 1.75 0 1 0 4.25 3.5 A 1.75 1.75 0 1 0 0.75 3.5 Z"}},{tagName:"path",attrs:{d:"M 4.25 2.75 L 9.5 2.75 L 9.5 11.75 L 13 11.75 L 13 13.25 L 8 13.25 L 8 4.25 L 4.25 4.25 Z"}},{tagName:"path",attrs:{d:"M 13 11 L 15.5 12.5 L 13 14 Z"}}]}]}]},TS="[Scoping]",Mf="http://www.w3.org/2000/svg",Jh="Positional selector (nth)";function Zh(i){return/(^|>> )nth=\d+/.test(i)}function Q2(i,e){for(let t=i;t&&t!==e;t=t.parentElement)if(t.matches("h1,h2,h3,h4,h5,h6,[role=heading]")||[...t.classList].some(n=>/(^|[-_])(title|heading)([-_]|$)/i.test(n)||/[a-z](Title|Heading)([A-Z_-]|$)/.test(n)))return!0;return!1}function $b(i){return i.split(" >> ").filter(e=>!/^nth=\d+$/.test(e)).join(" >> ")}const Qh=50,ek=4;function zb(i,e){return i.namespaceURI===Mf||tk(i,e)}function tk(i,e){const t=ES(e);if(!t||!i.contains(t))return!1;if(i.matches("button, a, input, select, [role=button], [role=link], [role=checkbox], [role=radio], [role=menuitem], [role=tab], [role=option], [role=switch]"))return!0;if((i.textContent||"").trim())return!1;for(let n=t.parentElement;n;n=n.parentElement){if(n.children.length!==1)return!1;if(n===i)return!0}return!1}const Df=new WeakMap,$c=new WeakMap;let fn;function Lf(i){for(const e of i){if(e.type==="childList"){for(const o of e.addedNodes)if(o.nodeType===Node.ELEMENT_NODE)for(const a of[o,...o.querySelectorAll("[class]")])Df.has(a)||Df.set(a,new Set(a.classList));continue}const t=e.target,n=new Set((e.oldValue??"").split(/\s+/));for(const o of t.classList){if(n.has(o))continue;let a=$c.get(t);a||$c.set(t,a=new Set),a.add(o)}}}function nk(i,e){if(!e){fn&&Lf(fn.takeRecords()),fn==null||fn.disconnect(),fn=void 0;return}fn||(fn=new MutationObserver(Lf),fn.observe(i,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class"],attributeOldValue:!0}))}function ES(i){if(i.namespaceURI!==Mf)return null;let e=i;for(let t=i;t&&t.namespaceURI===Mf;t=t.parentElement)t.nodeName.toLowerCase()==="svg"&&(e=t);return e.nodeName.toLowerCase()==="svg"?e:null}function ik(i,e){var n,o;if(!dt(i))return!0;const t=i.ownerDocument.defaultView;for(let a=i;a&&a!==e;a=a.parentElement){const c=_n(a);if(!c||c.display==="contents")continue;const u=a.getBoundingClientRect();if(u.width<=1&&u.height<=1)return!0;const h=c.clip.match(/rect\(\s*(-?[\d.]+)px,?\s*(-?[\d.]+)px,?\s*(-?[\d.]+)px,?\s*(-?[\d.]+)px\s*\)/);if(h&&+h[2]-+h[4]<=1&&+h[3]-+h[1]<=1)return!0;const f=(n=c.clipPath.match(/^inset\(([^)]*)\)/))==null?void 0:n[1].split(/\s+round\s+/)[0].trim().split(/\s+/);if(f){const[_,b=_,S=_,v=b]=f,x=(E,C)=>E.endsWith("%")?parseFloat(E)*C/100:parseFloat(E)||0;if(u.height-x(_,u.height)-x(S,u.height)<=1||u.width-x(v,u.width)-x(b,u.width)<=1)return!0}let y=a.parentElement;for(;y&&!/(auto|scroll|hidden|clip)/.test(((o=_n(y))==null?void 0:o.overflow)??"");)y=y.parentElement;const m=y?y.getBoundingClientRect():{left:-((t==null?void 0:t.scrollX)??0),top:-((t==null?void 0:t.scrollY)??0)};if(u.right-m.left+(y?y.scrollLeft:0)<=0||u.bottom-m.top+(y?y.scrollTop:0)<=0)return!0}return!1}function Jc(){try{if(typeof window<"u"&&window.__SKYRAMP_DEBUG__||typeof localStorage<"u"&&localStorage.getItem("SKYRAMP_DEBUG")==="true")return!0}catch{}return!1}function J(...i){Jc()&&console.log(TS,...i)}function sk(i){Jc()&&console.group(`${TS} ${i}`)}function Tn(){Jc()&&console.groupEnd()}function ef(i){Jc()&&console.table(i)}const Ib=[/card/i,/item/i,/tile/i,/cell/i,/row(?!s)/i,/entry/i,/result/i,/post/i,/product/i,/option/i],rk=50,ok=8,ak="h1,h2,h3,h4,h5,h6,[role=heading]",lk=new Set(["region","group","table","grid","form","dialog","tabpanel"]),ck=i=>/(^|[-_])(head|header|heading|title)([-_]|$)/i.test(i)||/[a-z](Head|Header|Heading|Title)([A-Z_-]|$)/.test(i),Of=[/^col-/i,/^row$/i,/^container/i,/^px-/i,/^py-/i,/^mx-/i,/^my-/i,/^m-/i,/^p-/i,/^d-/i,/^flex/i,/^grid$/i,/^text-/i,/^bg-/i,/^border/i,/^rounded/i,/^shadow/i,/^w-/i,/^h-/i,/^css-/i,/^styled-/i,/^sc-/i,/^emotion-/i,/^MuiGrid/i,/^MuiBox/i,/--[a-f0-9]{16,}$/i,/__[a-f0-9]{16,}$/i,/_[a-f0-9]{16,}$/i,/^app-[a-z0-9]+$/i,/^e[a-z0-9]{6,}\d+$/i,/^jsx-/i,/^[A-Za-z][A-Za-z0-9-]*_[A-Za-z0-9-]+__(?=[A-Za-z0-9_-]*\d)[A-Za-z0-9_-]{5}$/,/^[a-zA-Z]+-(?=[a-z0-9]*\d[a-z0-9]*\d)[a-z0-9]{5,}$/,/^(active|open|collapsed|selected|in|show)$/];function Bb(i){return Of.some(e=>e.test(i))}class AS{constructor(e){this._injectedScript=e,J("ScopingHandler initialized (with CSS class pattern support)")}applyScopingHook(e,t,n){const o=this._scope(e,t,n);if(o&&n.length===1){const a=this._verifySelector(o.selector),[c]=a.elements;if(!a.valid||!(c===n[0]||c.contains(n[0])||n[0].contains(c)))return J("Scoped selector does not resolve to the original element alone, keeping original"),null}return o}_scope(e,t,n){e=ES(e)??e,sk(`Analyzing: ${t}`);const o=this._needsScoping(e,t,n);if(J("Needs scoping:",o.needed,"| Reason:",o.reason),!o.needed){const v=this._tryStableIdSelector(e,t);return v?(J("Preferring stable ID selector:",v.selector),Tn(),v):(Tn(),null)}const a=this._tryStableIdSelector(e,t);if(a)return J("Using stable ID selector:",a.selector),Tn(),a;const c=this._tryLinkSelector(e,t);if(c)return J("Using link selector:",c.selector),Tn(),c;const u=this._findContainer(e);if(!u){if(J("No container found"),this._hasDynamicSelector(t)){const x=this._generateAlternativeSelector(e,t);if(x)return J("Using alternative selector:",x.selector),Tn(),x}const v=this._anchorToAncestor(e,null,"",t,n,!1);if(Tn(),v){J("Using section-anchored selector:",v);const x=this._verifySelector(v);return{selector:v,container:null,elements:x.elements,strategy:"alternative",description:v,containerSelector:"",containerIndex:-1,relativeSelector:"",usesTextFilter:!0}}return null}J("Container:",u.selector);const h=this._getContainerIndex(u.element,u.selector);if(h===null)return J("Cannot determine container index"),Tn(),null;J("Container index:",h);const f=this._generateRelativeSelector(u.element,e);if(!f)return J("No relative selector found"),Tn(),null;J("Relative selector:",f);const y=this._isFormContainer(u.selector);let m,_=!1;if(y)m=`${u.selector} >> ${f}`,J("Using form container selector (no nth):",m);else{const v=o.reason!==Jh,x=this._anchorToAncestor(e,u,f,t,n,v);if(x)m=x,_=!0,J("Using anchored selector:",m);else{if(o.reason===Jh||this._isStableOriginal(u.element,t,n))return J("No content anchor and the original is no worse than nth, keeping original"),Tn(),null;m=`${u.selector} >> nth=${h} >> ${f}`,J("Using nth-based selector:",m)}}const b=this._verifySelector(m);if(J("Verification:",b.valid?"PASS":"FAIL","| Matches:",b.count),!b.valid)if(y&&b.count>=1)J("Form container verification relaxed - using selector despite multiple matches");else return J("Verification failed, using original"),Tn(),null;const S={selector:m,container:u.element,elements:b.elements,strategy:"nth",description:y?`${u.selector} >> ${f}`:`${u.selector}.nth(${h}) >> ${f}`,containerSelector:u.selector,containerIndex:h,relativeSelector:f,isFormContainer:y,usesTextFilter:_};return ef({Original:t,Scoped:m,Container:u.selector,Index:h,Relative:f}),Tn(),S}_needsScoping(e,t,n){if(J("Input match set:",{selector:t,count:n.length}),n.length>1)return{needed:!0,reason:`Non-unique: ${n.length} elements`};if(this._hasDynamicSelector(t))return{needed:!0,reason:"Dynamic selector needs replacement"};const o=this._hasStateDependentName(e,t);if(o.isStateDependent)return{needed:!0,reason:o.reason};const a=["gridcell","row","listitem","option","treeitem","menuitem","cell"],c=e.getAttribute("role");if(c&&a.includes(c)){const h=this._findRepeatingContainer(e);if(h)return{needed:!0,reason:`Repeating role "${c}" inside container: ${h.selector}`}}const u=e.tagName==="TD"?e:e.closest("td");if(u){const h=u.closest("tr");if(h){const f=h.parentElement;if(f&&(f.tagName==="TBODY"||f.tagName==="TABLE")){const y=f.querySelectorAll(":scope > tr");if(y.length>1)return{needed:!0,reason:`Element inside <td> in <tr> with ${y.length} sibling rows`}}}}return Zh(t)?{needed:!0,reason:Jh}:{needed:!1,reason:"Selector is unique and not in repeating context"}}_isDynamicId(e,t){if(/^react-aria\d+/.test(e)||/^mui-\d+/.test(e)||/^(mat|cdk)-[a-z]+-\d+$/.test(e)||/[-_]\d+$/.test(e)||/\d{2,}[_-][a-zA-Z]/.test(e)||/^\d+$/.test(e)||/\d{4,}$/.test(e)||/[-_][0-9a-f]{6,}$/i.test(e))return!0;const n=e.match(/^(.*?)[-_]([0-9a-f]{3,5})$/i);if(n&&(/[0-9]/.test(n[2])||n[2].length>=4&&(t!=null&&t.includes(n[1].toLowerCase()))))return!0;const o=e.match(/^(.*?[a-zA-Z])([0-9]+)$/);return!!(o&&(o[2].length>=3||t!=null&&t.includes(o[1].toLowerCase()))||e.includes(":")||/«r[0-9a-z]*»|(^|[-_])_?r_[0-9a-z]+_/.test(e)||/^.+__search_[a-zA-Z0-9]{4,}$/.test(e))}_tryStableIdSelector(e,t){const n=e.id;if(!n||!t.startsWith("internal:role="))return null;const o=[e.localName,Pe(e)].filter(u=>!!u);if(this._isDynamicId(n,o))return J("Skipping dynamic ID:",n),null;const a=`#${CSS.escape(n)}`,c=this._verifySelector(a);return!c.valid||c.count!==1?(J("ID selector not unique:",a,"matches:",c.count),null):{selector:a,container:null,elements:c.elements,strategy:"alternative",description:"Stable ID preferred over role selector",containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0}}_hasDynamicSelector(e){if(J("_hasDynamicSelector checking:",e),/react-aria\d+/.test(e))return J("MATCHED: React-Aria dynamic ID"),!0;if(/__search_[a-zA-Z0-9]{4,}/.test(e))return J("MATCHED: Vue Tables dynamic search ID"),!0;if(/#[a-zA-Z_-]*\d+/.test(e))return J("MATCHED: Dynamic ID with numeric suffix (CSS)"),!0;if(/internal:attr=\[id="[a-zA-Z_-]*\d+"\]/.test(e))return J("MATCHED: Dynamic ID with numeric suffix (internal:attr)"),!0;if(/\[id="[a-zA-Z_-]*\d+"\]/.test(e))return J("MATCHED: Dynamic ID with numeric suffix (attribute selector)"),!0;if(/\[id="[^"]*\d{2,}[_-][a-zA-Z][^"]*"\]/.test(e))return J("MATCHED: Dynamic ID with mid-string counter (attribute selector)"),!0;if(/internal:attr=\[id="[^"]*\d{2,}[_-][a-zA-Z][^"]*"\]/.test(e))return J("MATCHED: Dynamic ID with mid-string counter (internal:attr)"),!0;if(/\.(app-[a-z0-9]+|e[a-z0-9]{6,}[0-9]+)/.test(e))return J("MATCHED: CSS-in-JS generated class (Emotion)"),!0;if([...e.replace(/"(?:[^"\\]|\\.)*"/g,'""').matchAll(/\.((?:\\.|[\w-])+)/g)].some(([,o])=>Bb(o)))return J("MATCHED: class that does not identify the element"),!0;const t=(e.match(/>/g)||[]).length;return t>=4?(J("MATCHED: Long CSS path with",t,"child combinators"),!0):/:nth-child\(\d+\)/.test(e)?(J("MATCHED: Contains :nth-child() pattern"),!0):/\[data-testid="[^"]*[-_]\d+"\]/.test(e)||/\[data-test-id="[^"]*[-_]\d+"\]/.test(e)?(J("MATCHED: TestId with numeric suffix (attribute selector)"),!0):/getByTestId\(['"][^'"]*[-_]\d+['"]\)/.test(e)?(J("MATCHED: TestId with numeric suffix (getByTestId)"),!0):/internal:testid=.*[-_]\d+/.test(e)?(J("MATCHED: TestId with numeric suffix (internal:testid)"),!0):/\[name="\d+"[is]?\]/.test(e)||/internal:text="\d+"[is]?/.test(e)?(J("MATCHED: All-numeric text content in selector"),!0):/\[name="[^"]*\d{8,}[^"]*"/.test(e)||/internal:text="[^"]*\d{8,}[^"]*"/.test(e)?(J("MATCHED: Long digit sequence in text content (timestamp/generated)"),!0):/(?:\[name|internal:text)="\/?\d{1,2}\/\d{1,2}"/.test(e)?(J("MATCHED: Partial date pattern in text content"),!0):[...e.matchAll(/(?:\[name|internal:text)="([^"]*)"/g)].map(o=>o[1]).some(o=>this._hasVolatileText(o))?(J("MATCHED: Month-name date in text content (volatile)"),!0):(J("No dynamic patterns found"),!1)}_hasStateDependentName(e,t){const n=t.match(/internal:role=(\w+)\[name=["'](.+?)["'][is]?\]/);if(!n)return{isStateDependent:!1,reason:"Not a role selector with name"};const o=n[1],a=n[2];if(!a||a.length<3)return{isStateDependent:!1,reason:"Name too short"};J("Checking state-dependent name:",{role:o,name:a});const c=this._getSiblingAccessibleNames(e,o);if(c.length===0)return J("No siblings found for state check"),{isStateDependent:!1,reason:"No siblings with same role"};J("Sibling names:",c);for(const u of c)if(u.length>=3&&a.length>u.length&&a.toLowerCase().includes(u.toLowerCase()))return J("State-dependent name detected:",a,"contains",u),{isStateDependent:!0,reason:`Name "${a}" contains sibling name "${u}" - likely hover-dependent`};return{isStateDependent:!1,reason:"Name is unique among siblings"}}_getSiblingAccessibleNames(e,t){const n=[],o=new Set;try{const a=["ul","ol","nav",'[role="list"]','[role="navigation"]','[role="menu"]','[role="tablist"]','[role="grid"]','[role="row"]'];let c=e.parentElement,u=e.ownerDocument.body,h=0;for(;c&&h<5;){const m=c.tagName.toLowerCase(),_=c.getAttribute("role");if(a.some(b=>{var S;if(b.startsWith("[role=")){const v=(S=b.match(/\[role="(.+)"\]/))==null?void 0:S[1];return _===v}return m===b})){u=c;break}c=c.parentElement,h++}J("Sibling search scope:",u.tagName,u.className);const f=`[role="${t}"]`,y=u.querySelectorAll(f);for(const m of y){if(m===e)continue;const _=this._getAccessibleName(m);_&&_.length>=2&&!o.has(_.toLowerCase())&&(o.add(_.toLowerCase()),n.push(_))}}catch(a){J("Error getting sibling names:",a)}return n}_findRepeatingContainer(e){const t=[/^grid[-_]?view[-_]?item$/i,/^gridcell$/i,/^list[-_]?item$/i,/^row[-_]?item$/i,/^item$/i,/^card$/i,/^tile$/i],n=[/^gridview$/i,/^grid[-_]?view$/i,/^listview$/i,/^list[-_]?view$/i,/^container$/i,/^wrapper$/i,/^content$/i,/^main$/i];let o=e.parentElement;for(;o&&o!==e.ownerDocument.body;){if(zb(o,e)){o=o.parentElement;continue}const a=this._getTestId(o);if(a&&!n.some(f=>f.test(a))&&t.some(f=>f.test(a))){const f=this._buildTestIdSelector(o,a);if(o.ownerDocument.querySelectorAll(f).length>1)return{element:o,selector:f}}const c=o.getAttribute("role");if(c&&["row","gridcell","listitem","option","treeitem","menuitem"].includes(c)){const f=`[role=${this._quoteCSSAttributeValue(c)}]`;if(o.ownerDocument.querySelectorAll(f).length>1)return{element:o,selector:f}}const u=this._getComponentName(o);if(u&&this._isRepeatingComponentName(u.name)){const f=`[${u.attr}=${this._quoteCSSAttributeValue(u.name)}]`;try{const y=o.ownerDocument.querySelectorAll(f);if(y.length>1&&y.length<100)return J("Found component container:",u.name,"via",u.attr,"with",y.length,"siblings"),{element:o,selector:f}}catch{}}const h=this._findRepeatingContainerByClass(o);if(h)return h;o=o.parentElement}return null}_findRepeatingContainerByClass(e){const t=Array.from(e.classList);for(const n of t)if(!Of.some(o=>o.test(n))&&Ib.some(o=>o.test(n))){const o=`.${this._escapeCSS(n)}`;try{const a=e.ownerDocument.querySelectorAll(o);if(a.length>1&&a.length<100){const c=e.tagName.toLowerCase();return J("Found CSS class container:",n,"with",a.length,"siblings, using tag:",c),{element:e,selector:c}}}catch{continue}}return null}_escapeCSS(e){return zc(e)}_quoteCSSAttributeValue(e){return CS(e)}_getTestId(e){return e.getAttribute("data-testid")||e.getAttribute("data-test-id")}_buildTestIdSelector(e,t){return e.getAttribute("data-testid")===t?`[data-testid=${this._quoteCSSAttributeValue(t)}]`:`[data-test-id=${this._quoteCSSAttributeValue(t)}]`}_getComponentName(e){const t=["data-component","data-sentry-component","data-react-component"];for(const n of t){const o=e.getAttribute(n);if(o)return{name:o,attr:n}}return null}_isRepeatingComponentName(e){return[/Card$/i,/Item$/i,/Link$/i,/Row$/i,/Tile$/i,/Option$/i,/Entry$/i].some(n=>n.test(e))}_findContainer(e){var h;const t=[/^grid[-_]?view[-_]?item$/i,/^gridcell$/i,/^list[-_]?item$/i,/^row[-_]?item$/i,/^item$/i,/^card$/i,/^tile$/i],n=[/[-_]input$/i,/[-_]field$/i,/[-_]btn$/i,/[-_]button$/i,/[-_]control$/i,/^input[-_]/i,/^field[-_]/i],o=[/^gridview$/i,/^grid[-_]?view$/i,/^listview$/i,/^list[-_]?view$/i,/^container$/i,/^wrapper$/i,/^content$/i,/^main$/i];let a=e.parentElement,c=null,u=null;for(;a&&a!==e.ownerDocument.body;){if(zb(a,e)){a=a.parentElement;continue}const f=this._getTestId(a);if(f){if(o.some(b=>b.test(f))){a=a.parentElement;continue}const _=this._isFragileTestId(f);if(!_&&t.some(b=>b.test(f)))return{element:a,selector:this._buildTestIdSelector(a,f)};if(!_&&n.some(b=>b.test(f)))return J("Found form container by testid pattern:",f),{element:a,selector:this._buildTestIdSelector(a,f)};!c&&!_&&(c={element:a,selector:this._buildTestIdSelector(a,f)})}const y=a.getAttribute("role");if(y&&["row","gridcell","listitem","option","treeitem","menuitem"].includes(y)&&(c||(c={element:a,selector:`[role=${this._quoteCSSAttributeValue(y)}]`})),a.tagName==="TR"){const _=a.parentElement;_&&(_.tagName==="TBODY"||_.tagName==="TABLE")&&_.querySelectorAll(":scope > tr").length>1&&!c&&(c={element:a,selector:"tr"})}const m=this._getComponentName(a);if(m&&this._isRepeatingComponentName(m.name)&&((h=a.parentElement)==null?void 0:h.getAttribute(m.attr))!==m.name){let _=`[${m.attr}=${this._quoteCSSAttributeValue(m.name)}]`;const b=`${_}:not(${_} *)`;a.querySelector(_)&&a.matches(b)&&(_=b);try{const S=a.ownerDocument.querySelectorAll(_);if(S.length>1&&S.length<100)return J("Found component container:",m.name,"via",m.attr,"with",S.length,"siblings"),{element:a,selector:_}}catch{}}if(!u){const _=this._findRepeatingContainerByClass(a);_&&(u=_)}a=a.parentElement}return c||u}_isFormContainer(e){const n=[/-input"\]$/i,/-field"\]$/i,/-btn"\]$/i,/-button"\]$/i,/-control"\]$/i,/\[data-test-?id="input-/i,/\[data-test-?id="field-/i].some(o=>o.test(e));return J("_isFormContainer:",e,"=",n),n}_getContainerIndex(e,t){try{const n=e.ownerDocument.querySelectorAll(t),o=Array.from(n).indexOf(e);return o!==-1?o:null}catch{return null}}_anchorToAncestor(e,t,n,o,a,c){const u=this._mayReanchor(o,a,c);if(t){for(const y of this._getItemFilters(t.element,t.selector,c,u,$b(o)))if(this._resolvesTo(y,t.element))return`${y} >> ${n}`;const f=this._enclosingRow(t.element);if(f){const y=this._getRowRelativeSelector(f,e);for(const m of y?this._getRowFilters(f):[])if(this._resolvesTo(m,f))return`${m} >> ${y}`}}if(!this._mayReanchor(o,a,!1))return null;const h=a.find(f=>f===e||f.contains(e))??e;return this._anchorToSection(h,$b(o),t==null?void 0:t.element)}_mayReanchor(e,t,n){return n||t.length>1||Zh(e)}_resolvesTo(e,t){const n=this._verifySelector(e);return n.valid&&n.elements[0]===t}_isRowContainer(e){return e.getAttribute("role")==="row"||e.tagName==="TR"}*_getItemFilters(e,t,n,o,a){if(this._isRowContainer(e))for(const _ of e.querySelectorAll("a")){const b=this._clean(_.textContent);this._isAnchorText(b,!0)&&(yield`${t} >> internal:has=${JSON.stringify(`internal:role=link[name="${this._escapeTextFilter(b)}"s]`)}`)}const c=this._getTextSources(e),u=!this._isRowContainer(e);if(n){const _=c.find(b=>b.use!=="columns"&&b.text.length!==3&&this._isAnchorText(b.text,b.allowDynamic));if(_&&u&&this._hasVolatileText(_.text)){yield*this._datedCardTitle(e,t,c,_);return}_&&(yield`${t} >> ${this._looseFilter(_.text)}`)}if(!o)return;const h=[t],f=t===e.tagName.toLowerCase()?this._getItemClass(e):null;f&&h.push(`${t}.${this._escapeCSS(f)}`);const y=[...this._getColumnFilters(e,c),...c.filter(_=>!_.el&&this._isAnchorText(_.text,_.allowDynamic)).map(_=>[_.text])],m=_=>_.matches(t)&&(!f||_.classList.contains(f));for(const _ of y){if(u&&!this._textMayName(e,a,_,m))return;for(const b of[_.map(S=>this._exactFilter(S)),_.map(S=>this._looseFilter(S))])for(const S of h)yield[S,...b].join(" >> ")}}*_datedCardTitle(e,t,n,o){var h;const a=t===e.tagName.toLowerCase()?this._getItemClass(e):null,c=Array.from(((h=e.parentElement)==null?void 0:h.children)??[]).filter(f=>f!==e&&f.matches(t)&&(!a||f.classList.contains(a))).slice(0,Qh),u=c.map(f=>this._clean(f.textContent).toLowerCase());for(const f of n.slice(n.indexOf(o)+1)){if(f.use==="columns"||!f.el||f.text.length===3||!this._isAnchorText(f.text,f.allowDynamic)||this._hasVolatileText(f.text)||new RegExp("\\p{Nd}","u").test(f.text)||!Q2(f.el,e)||u.some(m=>m.includes(f.text.toLowerCase())))continue;const y=this._getColumnValues(f,e,c);if(!(y.length<2||new Set(y).size!==y.length)){yield`${t} >> ${this._looseFilter(f.text)}`,a&&(yield`${t}.${this._escapeCSS(a)} >> ${this._looseFilter(f.text)}`);return}}}_textMayName(e,t,n,o){if(n.some(c=>new RegExp("\\p{Nd}","u").test(c)))return!1;const a=this._verifySelector(t).elements;for(let c=e.previousElementSibling;c;c=c.previousElementSibling)if(o(c)&&!a.some(u=>c.contains(u)))return!0;return!1}_kindClasses(e){Lf((fn==null?void 0:fn.takeRecords())??[]);const t=Df.get(e),n=$c.get(e);return[...e.classList].filter(o=>!Bb(o)&&!new RegExp("\\p{Nd}|(^|[-_])(first|last|odd|even)$","iu").test(o)&&!(n!=null&&n.has(o))&&(t?t.has(o):[...e.ownerDocument.getElementsByClassName(o)].some(a=>{var c;return!a.contains(e)&&!e.contains(a)&&!((c=$c.get(a))!=null&&c.has(o))})))}_exactFilter(e){return`internal:has=${JSON.stringify(`internal:text="${this._escapeTextFilter(e)}"s`)}`}_looseFilter(e){return`internal:has-text="${this._escapeTextFilter(e)}"i`}_getColumnFilters(e,t){var h;const n=Array.from(((h=e.parentElement)==null?void 0:h.children)??[]).filter(f=>f!==e&&f.tagName===e.tagName).slice(0,Qh),o=[],a=new Set;for(const f of t){if(f.use==="legacy"||!f.el||a.has(f.text)||!this._isAnchorText(f.text,f.allowDynamic))continue;a.add(f.text);const y=this._getColumnValues(f,e,n);y.length<2||ik(f.el,e)||this._isControlLabel(f.el,e)||this._isDataColumn(y)||o.push({text:f.text,el:f.el,pass:f.allowDynamic&&this._isDynamic(f.text)?1:0,all:new Set(y).size===y.length})}o.sort((f,y)=>f.pass-y.pass||Number(y.all)-Number(f.all)||(f.el===y.el?0:f.el.compareDocumentPosition(y.el)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1));const c=Math.max(1,Math.min(2,o.filter(f=>f.all&&!f.pass).length)),u=[];for(let f=c;f<=Math.min(o.length,ek);f++)u.push(o.slice(0,f).map(y=>y.text));return u}_isControlLabel(e,t){const n=yc(e);return!!n&&n!==t&&t.contains(n)}_isDataColumn(e){const t=this._volatileOptions();if(e.filter(o=>Gh(o,t)).length*2>e.length)return!0;const n=e.map(o=>{var a;return(a=o.match(new RegExp("^[+\\-−]?\\d[\\d.,]*\\s*(\\p{L}[\\p{L} ]*)$","u")))==null?void 0:a[1].toLowerCase()});return n.every(o=>o&&o===n[0])}_isStableOriginal(e,t,n){var u;if(n.length!==1||Zh(t)||this._hasDynamicSelector(t)||n[0]!==e&&n[0].contains(e))return!1;const o=Array.from(((u=e.parentElement)==null?void 0:u.children)??[]).filter(h=>h!==e&&h.tagName===e.tagName).slice(0,Qh),a=h=>di(h,!1);return!Array.from(e.querySelectorAll('button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"]')).map(h=>{const f=a(h),y=this._getColumnValues({el:h,text:f,kind:"full",allowDynamic:!0,use:"columns"},e,o,a);return f&&!(y.length>1&&new Set(y).size===1)?f:""}).filter(Boolean).some(h=>new RegExp(`(?<![\\p{L}\\p{N}])${wa(h)}(?![\\p{L}\\p{N}])`,"iu").test(t))}_getItemClass(e){const t=n=>(o=>o>1&&o<100)(e.ownerDocument.querySelectorAll(`.${this._escapeCSS(n)}`).length);return Array.from(e.classList).find(n=>!Of.some(o=>o.test(n))&&Ib.some(o=>o.test(n))&&t(n))??null}_getColumnValues(e,t,n,o){const a=[];for(let u=e.el;u!==t&&u.parentElement;u=u.parentElement)a.unshift({index:Array.from(u.parentElement.children).indexOf(u),count:u.parentElement.children.length});const c=[e.text];for(const u of n){let h=u;for(const y of a)h=h&&h.children.length===y.count?h.children[y.index]:void 0;const f=h&&this._clean(o?o(h):e.kind==="full"?h.textContent:this._getDirectTextContent(h));f&&c.push(f)}return c}_clean(e){return(e||"").replace(/\s+/g," ").trim()}_isAnchorText(e,t){return e.length<2||e.length>100||this._isGenericText(e)||e.includes(">>")?!1:t||!this._isDynamic(e)}_isStableName(e){return!!e&&this._isAnchorText(e,!1)&&!Gh(e,this._volatileOptions())}_volatileOptions(){return{intl:this._injectedScript.utils.builtins.Intl,locales:[...navigator.languages||[],this._injectedScript.document.documentElement.lang]}}_getTextSources(e){const t=[],n=(o,a,c,u,h="both")=>t.push({el:o,text:this._clean(a),kind:c,allowDynamic:u,use:h});if(this._isRowContainer(e)){for(const c of[!1,!0]){for(const u of e.querySelectorAll("a"))n(u,u.textContent,"full",c);for(const u of e.querySelectorAll('[role="cell"], [role="gridcell"], td'))n(u,this._getDirectTextContent(u),"direct",c);for(const u of e.querySelectorAll("*"))n(u,this._getDirectTextContent(u),"direct",c,"columns")}const o=e.querySelector("[data-testid], [data-test-id]"),a=o&&this._getTestId(o);a&&!this._isDynamic(a)&&!/^(item|row|cell|grid)/i.test(a)&&n(null,a,"aria",!0);for(const c of this._labelledCellTexts(e))n(null,c,"aria",!0);return t}n(e,this._getDirectTextContent(e),"direct",!0),n(null,e.getAttribute("aria-label"),"aria",!0);for(const o of e.querySelectorAll("span, div, p, h1, h2, h3, h4, h5, h6"))n(o,this._getDirectTextContent(o),"direct",!0);for(const o of e.querySelectorAll("[aria-label]"))n(null,o.getAttribute("aria-label"),"aria",!0);n(e,e.textContent,"full",!0,"legacy");for(const o of e.querySelectorAll("*"))n(o,this._getDirectTextContent(o),"direct",!0,"columns");return t}_labelledCellTexts(e){const t=[];for(const a of e.querySelectorAll('[role="cell"], [role="gridcell"], td'))t.push({el:a,text:this._clean(a.textContent)});for(const a of e.querySelectorAll("*"))t.push({el:a,text:this._clean(this._getDirectTextContent(a))});const n=new Set,o=this._volatileOptions();for(const a of e.querySelectorAll("[aria-label]")){const c=this._clean(a.getAttribute("aria-label"));for(const{el:u,text:h}of t)!(a.contains(u)||u.contains(a)&&u.matches('[role="cell"], [role="gridcell"], td'))&&!n.has(h)&&this._isAnchorText(h,!0)&&uk(c,h)&&!Gh(h,o)&&n.add(h)}return[...n].sort((a,c)=>c.length-a.length)}_enclosingRow(e){for(let t=e.parentElement;t&&t!==e.ownerDocument.body;t=t.parentElement)if(t.getAttribute("role")==="row"||t.tagName==="TR")return t;return null}_getRowRelativeSelector(e,t){const n=this._getRole(t);if(n){const o=`internal:role=${n}`;try{if(this._injectedScript.querySelectorAll(this._injectedScript.parseSelector(o),e).length===1)return o}catch{}}return this._generateRelativeSelector(e,t)||null}_getRowFilters(e){var u,h;const t=[];let n=e.getAttribute("aria-label");const o=e.getAttribute("aria-labelledby");if(!n&&o&&(n=((h=(u=e.ownerDocument.getElementById(o))==null?void 0:u.textContent)==null?void 0:h.trim())||null),this._isStableName(n))for(const f of["s","i"])t.push(`internal:role=row[name=${this._quoteCSSAttributeValue(n)}${f}]`);const a=e.querySelector('[role="rowheader"], th'),c=a&&this._getAccessibleName(a);if(this._isStableName(c)){const f=e.tagName==="TR"?"tr":'[role="row"]';for(const y of["s","i"])t.push(`${f} >> internal:has=${JSON.stringify(`internal:role=rowheader[name=${this._quoteCSSAttributeValue(c)}${y}]`)}`)}return t}_getDirectTextContent(e){let t="";for(const n of e.childNodes)n.nodeType===Node.TEXT_NODE&&(t+=n.textContent||"");return t.trim()}_isGenericText(e){return[/^(edit|delete|view|open|close|save|cancel|submit|ok|yes|no)$/i,/^(item|row|cell|column|header|footer)$/i,/^(loading|please wait|\.\.\.|…)$/i,/^\d{1,5}$/,/^[\s\-_]+$/].some(n=>n.test(e))}_escapeTextFilter(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}_generateRelativeSelector(e,t){var y;if(e===t||!e.contains(t))return"";if(J("_generateRelativeSelector for:",t.tagName,t.className),["svg","path","circle","rect","line","polygon","polyline","ellipse","g","use"].includes(t.tagName.toLowerCase())){J("Target is SVG or SVG child, walking up to find clickable ancestor");const m=this._findClickableAncestor(e,t);m&&(J("Found clickable ancestor:",m.tagName,m.className),t=m)}const o=this._getTestId(t);if(o&&!this._isFragileTestId(o))return this._buildTestIdSelector(t,o);const a=this._getRole(t),c=t.getAttribute("aria-label");if(a&&c){const _=t.getAttribute("role")?`[role=${this._quoteCSSAttributeValue(a)}][aria-label=${this._quoteCSSAttributeValue(c)}]`:`internal:role=${a}[name=${this._quoteCSSAttributeValue(c)}i]`;try{const b=this._injectedScript.parseSelector(_),S=this._injectedScript.querySelectorAll(b,e);if(S.length===1)return J("Strategy 2: role+aria-label ->",_),_;J("Strategy 2: not unique in container, matches:",S.length)}catch{J("Strategy 2: selector parse failed for",_)}}if(a){const m=`[role=${this._quoteCSSAttributeValue(a)}]`;if(e.querySelectorAll(m).length===1)return m}if(c){const m=`[aria-label=${this._quoteCSSAttributeValue(c)}]`;if(e.querySelectorAll(m).length===1)return m}if(a==="button"||a==="link"||a==="cell"||a==="gridcell"||a==="columnheader"||a==="rowheader"){const m=this._getAccessibleName(t);if(m&&m.length>=2&&m.length<=50&&!this._isGenericText(m)&&!this._isDynamic(m)){const _=`internal:role=${a}[name=${this._quoteCSSAttributeValue(m)}i]`;try{const b=this._injectedScript.parseSelector(_),S=this._injectedScript.querySelectorAll(b,e);if(S.length===1)return J("Strategy 4b: role with accessible name ->",_),_;J("Strategy 4b: not unique in container, matches:",S.length)}catch{J("Strategy 4b: selector parse failed")}}}if(t.tagName==="INPUT"){const m=e.querySelectorAll("input");if(J("Input strategy: found",m.length,"inputs in container"),m.length===1)return J("Using input selector (single input in container)"),"input";const _=t.type||"text",b=`input[type=${this._quoteCSSAttributeValue(_)}]`;return e.querySelectorAll(b).length===1?(J("Using input[type] selector"),b):(J("Multiple inputs found, using input anyway for form container"),"input")}if(e.tagName==="TR"){const m=t.tagName==="TD"?t:t.closest("td");if(m&&e.contains(m)){const _=t!==m?t.closest("a, button, input, select, textarea"):null;if(_&&m.contains(_))J("Strategy 5b: skipping, target is inside interactive element:",_.tagName);else{const S=e.querySelectorAll(":scope > td"),v=Array.from(S).indexOf(m);if(v>=0){const x=m.querySelectorAll("svg");return x.length===1&&!(m.textContent||"").trim()&&(t===x[0]||t.contains(x[0]))?(J("Strategy 5b: lone icon in table cell ->",`td >> nth=${v} >> svg`),`td >> nth=${v} >> svg`):(J("Strategy 5b: table cell column index ->",`td >> nth=${v}`),`td >> nth=${v}`)}}}}const u=t.tagName.toLowerCase();if(e.querySelectorAll(u).length===1)return u;const h=Array.from(t.classList);for(const m of h){if(/^(css|styled|sc|emotion|mui)-/.test(m)||/^Mui[A-Z]/.test(m)||this._hasHashedSegment(m)||m.length<3)continue;const _=`.${this._escapeCSS(m)}`;if(e.querySelectorAll(_).length===1)return _}const f=(y=t.textContent)==null?void 0:y.trim();if(f&&f.length>=2&&f.length<=100){const m=f.replace(/\s+/g," ");if(!this._isGenericText(m)){const _=`internal:text="${this._escapeTextFilter(m)}"i`;try{const b=this._injectedScript.parseSelector(_),S=this._injectedScript.querySelectorAll(b,e);if(S.length===1)return J("Strategy 8: text content filter ->",_),_;J("Strategy 8: text not unique in container, matches:",S.length)}catch{J("Strategy 8: selector parse failed")}}}return""}_findClickableAncestor(e,t){let n=t.parentElement;const o=["img","presentation","none","graphics-symbol"];for(;n&&n!==e&&e.contains(n);){const a=n.getAttribute("data-testid")||n.getAttribute("data-test-id"),c=n.getAttribute("role"),u=c&&!o.includes(c),h=n.getAttribute("aria-label"),f=["BUTTON","A","INPUT","SELECT"].includes(n.tagName),y=n.hasAttribute("onclick")||n.hasAttribute("data-click");if(a||u||h&&f||f||y)return J("_findClickableAncestor found:",n.tagName,"testid:",a,"role:",c,"isClickable:",f),n;n=n.parentElement}return null}_hasVolatileText(e){return jc(e)}_isFragileTestId(e){return this._isDynamic(e)||this._isDynamicId(e)}_hasHashedSegment(e){return e.split(/[-_]+/).some(t=>/^[0-9a-f]{3,}$/i.test(t)&&/[0-9]/.test(t)&&/[a-f]/i.test(t))}_isDynamic(e){if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/[-_][0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e))return!0;const t=e.match(/[-_]([0-9a-f]{8,})$/i);return!!(t&&/[0-9]/.test(t[1])||/^\d{6,}$/.test(e)||/^\d{10,13}$/.test(e))}_getRole(e){var a;const t=e.getAttribute("role");if(t)return t;const n=e.tagName.toLowerCase(),o={button:"button",a:"link",select:"combobox",textarea:"textbox",img:"img",tr:"row",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading"};if(n==="input"){const c=((a=e.type)==null?void 0:a.toLowerCase())||"text";return{checkbox:"checkbox",radio:"radio",button:"button",submit:"button"}[c]||"textbox"}if(n==="td"){const c=e.closest("table"),u=c==null?void 0:c.getAttribute("role");return u==="grid"||u==="treegrid"?"gridcell":"cell"}return n==="th"?Pe(e):o[n]||null}_anchorToSection(e,t,n){var u;const o=(u=e.closest("tr,li"))==null?void 0:u.parentElement;let a=!0,c=0;for(let h=(n??e).parentElement;h&&h!==this._injectedScript.document.body&&c++<ok;h=h.parentElement){const f=this._getSectionFilter(h,e,t);if(!f)continue;if(!f.filter)return null;const y=`${f.filter} >> ${t}`,m=this._verifySelector(y).elements,_=m.indexOf(e);if(_<0)return null;if(m.length===1)return y;if(a&&o&&m.every(b=>{var S;return((S=b.closest("tr,li"))==null?void 0:S.parentElement)===o}))return`${y} >> nth=${_}`;a=!1}return null}_getSectionFilter(e,t,n){let o;const a=()=>{if(!o){const E=e.tagName.toLowerCase(),C=this._kindClasses(e).map(L=>"."+zc(L));o=[...new Set([E+C.slice(0,1).join(""),E+C.join("")])].filter(L=>this._injectedScript.document.querySelectorAll(L).length<=rk)}return o},c=()=>this._stableIdFilter(e)??a().find(E=>this._resolvesTo(E,e)),[u]=this._kindClasses(e),h=E=>E.tagName===e.tagName&&(u?E.classList.contains(u):!this._kindClasses(E).length),f=Pe(e);if(f&&lk.has(f)){const E=di(e,!1);if(this._isStableName(E)){const C=c()??(this._textMayName(e,n,[E],h)?`internal:role=${f}[name=${this._quoteCSSAttributeValue(E)}s]`:null);if(!C)return{filter:null};if(this._resolvesTo(C,e))return{filter:C}}}const y=[...e.children].find(E=>E.contains(t)),m=E=>!!y&&E!==y&&!!(E.compareDocumentPosition(y)&Node.DOCUMENT_POSITION_FOLLOWING);let _=null,b="";const S=[...e.children].find(E=>Pe(E)==="heading"&&m(E));if(S)b=di(S,!1),_=`internal:role=heading[name=${this._quoteCSSAttributeValue(b)}s]`;else{const E=e.firstElementChild;E&&m(E)&&(/^(HEADER|LEGEND|CAPTION)$/.test(E.tagName)||[...E.classList].some(ck))&&(b=this._clean(E.textContent),_=`internal:text=${JSON.stringify(b)}s`)}if(!_||!this._isStableName(b)||[...e.querySelectorAll(ak)].filter(E=>E!==S&&this._clean(E.textContent)===b).length)return null;const x=c();if(x||!this._textMayName(e,n,[b],h))return{filter:x??null};for(const E of a()){const C=`${E} >> internal:has=${JSON.stringify(_)}`;if(this._resolvesTo(C,e))return{filter:C}}return null}_stableIdFilter(e){for(const t of["data-testid","data-test-id","id"]){const n=e.getAttribute(t),o=n&&!/[\p{Nd}:]/u.test(n)?`[${t}=${this._quoteCSSAttributeValue(n)}]`:null;if(o&&this._resolvesTo(o,e))return o}return null}_verifySelector(e){try{const t=this._injectedScript.parseSelector(e),n=this._injectedScript.querySelectorAll(t,this._injectedScript.document);return{valid:n.length===1,count:n.length,elements:Array.from(n)}}catch{return{valid:!1,count:0,elements:[]}}}_generateAlternativeSelector(e,t){var u;J("_generateAlternativeSelector for:",e.tagName,"original:",t);const n=e.tagName.toUpperCase();let o=null;if(n==="INPUT"||n==="TEXTAREA"||n==="SELECT"){const h=e.getAttribute("name");h&&!this._isDynamic(h)&&(o=`${n.toLowerCase()}[name=${this._quoteCSSAttributeValue(h)}]`,J("Alternative strategy 1: name attribute ->",o))}if(!o){const h=e.getAttribute("aria-label");h&&h.length>=2&&h.length<=100&&(o=`[aria-label=${this._quoteCSSAttributeValue(h)}]`,J("Alternative strategy 2: aria-label ->",o))}if(!o&&(n==="INPUT"||n==="TEXTAREA")){const h=e.placeholder;h&&h.length>=2&&h.length<=100&&(o=`${n.toLowerCase()}[placeholder=${this._quoteCSSAttributeValue(h)}]`,J("Alternative strategy 3: placeholder ->",o))}if(!o&&n==="INPUT"){const h=e.type||"text";if(["email","password","tel","url","search","number","date","time","datetime-local","month","week","color","file"].includes(h)){const y=`input[type=${this._quoteCSSAttributeValue(h)}]`;this._verifySelector(y).valid&&(o=y,J("Alternative strategy 4: unique input type ->",o))}}if(!o&&(n==="BUTTON"||n==="INPUT"&&e.type==="submit")){const h=(u=e.textContent)==null?void 0:u.trim();h&&h.length>=2&&h.length<=50&&!this._isGenericText(h)&&(o=`internal:role=button[name=${this._quoteCSSAttributeValue(h)}i]`,J("Alternative strategy 5: button text ->",o))}if(!o){const h=this._getRole(e),f=h?this._getAccessibleName(e):null;h&&f&&f.length>=2&&f.length<=50&&!this._isGenericText(f)&&!this._isDynamic(f)&&(o=`internal:role=${h}[name=${this._quoteCSSAttributeValue(f)}i]`,J("Alternative strategy 5b: role+name ->",o))}if(!o){const h=e.getAttribute("title");h&&h.length>=2&&h.length<=100&&(o=`[title=${this._quoteCSSAttributeValue(h)}]`,J("Alternative strategy 6: title ->",o))}if(!o)return J("No alternative selector found"),null;const a=this._verifySelector(o);if(J("Alternative verification:",a.valid?"PASS":"FAIL","| Matches:",a.count),!a.valid)if(a.count>1&&n){const h=`${n.toLowerCase()}${o.startsWith("[")?o:" "+o}`;if(this._verifySelector(h).valid)o=h,J("Made unique by adding tag:",o);else return J("Alternative selector not unique, rejecting"),null}else return J("Alternative selector not unique, rejecting"),null;const c={selector:o,container:null,elements:a.elements,strategy:"alternative",description:`Alternative selector for dynamic ID: ${t} -> ${o}`,containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0};return ef({"Original (unstable)":t,"Alternative (stable)":o,Strategy:"alternative",Reason:"Dynamic ID without container"}),c}_tryLinkSelector(e,t){J("_tryLinkSelector checking:",e.tagName);const n=this._findLinkElement(e);if(!n)return J("No link element found"),null;J("Found link element:",n.tagName,"href:",n.getAttribute("href"));let o=null;const a=n.getAttribute("href");if(a&&this._isStableHref(a)){const h=`a[href=${this._quoteCSSAttributeValue(a)}]`,f=this._verifySelector(h);f.valid?(o=h,J("Strategy 7: href selector ->",o)):J("Strategy 7: href not unique, matches:",f.count)}if(!o){const h=this._getAccessibleName(n);if(h&&h.length>=2&&h.length<=50){const f=`internal:role=link[name=${this._quoteCSSAttributeValue(h)}i]`,y=this._verifySelector(f);if(y.valid)o=f,J("Strategy 8: role=link with name ->",o);else if(J("Strategy 8: role=link not unique, matches:",y.count),y.count>1){const m=`internal:role=link[name=${this._quoteCSSAttributeValue(h)}]`;this._verifySelector(m).valid&&(o=m,J("Strategy 8b: role=link with exact name ->",o))}}}if(!o)return J("No suitable link selector found"),null;const c=this._verifySelector(o),u={selector:o,container:null,elements:c.elements,strategy:"alternative",description:`Link selector: ${t} -> ${o}`,containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0};return ef({Original:t,"Link selector":o,Strategy:"link-based (7/8)",Element:n.tagName}),u}_findLinkElement(e){let t=e,n=0;const o=3;for(;t&&n<=o;){if(t.tagName==="A")return t;t.getAttribute("role"),t=t.parentElement,n++}return null}_isStableHref(e){return!(!e||e==="#"||e.startsWith("javascript:")||this._isDynamic(e)||/[a-f0-9]{32,}/i.test(e)||/\/\d{6,}(\/|$)/.test(e))}_getAccessibleName(e){var a,c;const t=e.getAttribute("aria-label");if(t&&t.trim())return t.trim();const n=e.getAttribute("aria-labelledby");if(n){const u=e.ownerDocument.getElementById(n);if(u){const h=(a=u.textContent)==null?void 0:a.trim();if(h)return h}}const o=(c=e.textContent)==null?void 0:c.trim();return o&&o.length<=100?o.replace(/\s+/g," "):null}}function zc(i){return typeof CSS<"u"&&CSS.escape?CSS.escape(i):i.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function CS(i){return`"${i.replace(/["\\]/g,e=>"\\"+e)}"`}function Ns(i,e,t,n){const a=new AS(i).applyScopingHook(e,t,n);return a&&e.nodeName==="CANVAS"&&!Ts(i,a.selector,e)?null:a}function Ts(i,e,t){try{const n=i.querySelectorAll(i.parseSelector(e),t.ownerDocument);return n.length===1&&n[0]===t}catch{return!1}}const tc=/(?![\p{Script=Han}\p{scx=Hiragana}\p{scx=Katakana}\p{Script=Thai}\p{Script=Lao}\p{Script=Khmer}\p{Script=Myanmar}])[\p{L}\p{M}\p{N}]/u;function uk(i,e){if(!e)return!1;const t=[...e];for(let n=i.indexOf(e);n>=0;n=i.indexOf(e,n+1)){const o=[...i.slice(0,n)].pop()??"",a=[...i.slice(n+e.length)][0]??"";if(!(tc.test(t[0])&&tc.test(o))&&!(tc.test(t[t.length-1])&&tc.test(a)))return!0}return!1}class dk{constructor(e){this._enabled=!1,this._savedButtonRoles=new Map,this._hiddenDuplicateButtons=[],this._document=e}get enabled(){return this._enabled}toggle(){this._enabled=!this._enabled,this._enabled?this._enableNestedElementAccess():this._disableNestedElementAccess()}_enableNestedElementAccess(){this._document.querySelectorAll('[role="button"]').forEach(t=>{const n=t.getAttribute("role");t.children.length>0&&n&&(this._savedButtonRoles.set(t,n),t.removeAttribute("role"),t.querySelectorAll("button").forEach(a=>{this._createDuplicateButton(a,t)}))})}_disableNestedElementAccess(){this._savedButtonRoles.forEach((e,t)=>{t.setAttribute("role",e)}),this._savedButtonRoles.clear(),this._hiddenDuplicateButtons.forEach(e=>{e.remove()}),this._hiddenDuplicateButtons=[]}_createDuplicateButton(e,t){var u;const n=e.getAttribute("aria-label"),o=(u=e.textContent)==null?void 0:u.trim();if(!(n||o))return;const c=this._document.createElement("button");c.textContent=(o||"")+" dup",n&&c.setAttribute("aria-label",n+" dup"),c.style.cssText="position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; pointer-events: none !important;",c.setAttribute("tabindex","-1"),c.setAttribute("data-pw-nested-button-duplicate","true"),c.disabled=!0,t.appendChild(c),this._hiddenDuplicateButtons.push(c)}handleNestedClick(e,t,n,o){let a=null;if(t.elements&&t.elements.length>0&&(a=t.elements[0]),!(a&&e!==a&&a.contains(e)))return this._isInsideButtonWrapperWithNativeInput(e)?{targetSelector:t.selector,shouldAutoDisable:!0}:null;const u=a.getAttribute("role");if(u!=="checkbox"&&u!=="radio"&&!this._isInsideButtonWrapperWithNativeInput(a))return null;const h=n.generateSelector(e,{testIdAttributeName:o});let f;if(h.selector===t.selector){const y=this._buildChildSelector(e,a,o);if(!y)return null;f=`${t.selector} >> ${y}`}else{const y=t.selector,m=h.selector;y&&m&&!m.startsWith(y)&&!m.includes(">>")?f=`${y} >> ${m}`:f=m}return{targetSelector:f,shouldAutoDisable:!0}}_buildChildSelector(e,t,n){const o=u=>u.tagName.toLowerCase()==="svg",a=u=>{const h=u.tagName.toLowerCase();return h==="path"||h==="g"||h==="circle"||h==="rect"||h==="polygon"||h==="line"||h==="polyline"||h==="ellipse"};let c=e;if(a(e)){let u=e.parentElement;for(;u&&u!==t;){if(o(u)&&u.classList.length>0&&Array.from(u.classList).some(f=>f.includes("chevron")||f.includes("icon")||f.includes("expandable"))){c=u;break}if(!o(u)&&!a(u)&&u.classList.length>0){c=u;break}u=u.parentElement}}else if(o(e)&&e.classList.length===0){let u=e.parentElement;for(;u&&u!==t;){if(u.classList.length>0){c=u;break}u=u.parentElement}}if(c.hasAttribute(n)){const u=c.getAttribute(n)||"";return`[${n}=${CS(u)}]`}if(c.classList.length>0){const u=Array.from(c.classList),h=u.filter(f=>f.includes("expand")||f.includes("chevron")||f.includes("badge")||f.includes("checkmark")||f.includes("heading")||f.includes("status")||f.includes("icon")||f.includes("button")||f.includes("title"));if(h.length>0){const f=h.find(y=>y.includes("chevron")||y.includes("checkmark")||y.includes("badge"))||h[0];return"."+zc(f)}else if(u.length>0)return"."+zc(u[0])}return c.tagName.toLowerCase()}_isInsideButtonWrapperWithNativeInput(e){let t=e;for(;t;){if(this._savedButtonRoles.has(t))return!!t.querySelector('input[type="checkbox"], input[type="radio"]');t=t.parentElement}return!1}cleanup(){this._enabled&&(this._disableNestedElementAccess(),this._enabled=!1)}}class Ir{constructor(e){this._pdfDoc=null,this._canvasElements=[],this._thumbnailElements=[],this._isRendering=!1,this._toolbar=null,this._sidebar=null,this._mainContent=null,this._currentPage=1,this._pageDisplay=null,this._zoomDisplay=null,this._currentZoom=1,this._rotation=0,this._pdfDataUrl="",this._filename="Document.pdf",this._moreMenuElement=null,this._moreMenuCleanup=null,this._twoPageView=!1,this._annotationsVisible=!0,this._container=e}static async loadPdfJs(){if(window.pdfjsLib)return;console.log("[PDF.js] Loading PDF.js library from CDN...");const e=document.createElement("script");return e.src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js",new Promise((t,n)=>{e.onload=()=>{if(!window.pdfjsLib){n(new Error("PDF.js loaded but pdfjsLib not available"));return}window.pdfjsLib.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js",console.log("[PDF.js] ✅ PDF.js library loaded successfully"),t()},e.onerror=()=>n(new Error("Failed to load PDF.js from CDN")),document.head.appendChild(e)})}async renderPdf(e){const{pdfDataUrl:t,filename:n,onReady:o,onError:a}=e;try{this._pdfDataUrl=t,this._filename=n||"Document.pdf",await Ir.loadPdfJs(),console.log("[PDF.js] Rendering PDF..."),this._isRendering=!0;const c=window.pdfjsLib.getDocument(t);this._pdfDoc=await c.promise,console.log(`[PDF.js] PDF loaded: ${this._pdfDoc.numPages} pages`),document.documentElement&&(document.documentElement.style.height="auto"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.width="100%",document.body.style.height="auto",document.body.style.overflow="auto"),this._container.innerHTML="",this._canvasElements=[],this._thumbnailElements=[],this._container.style.cssText=`
|
|
136
|
+
width: 100%;
|
|
137
|
+
min-height: 100vh;
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
background-color: #525252;
|
|
141
|
+
margin: 0;
|
|
142
|
+
padding: 0;
|
|
143
|
+
`,this._toolbar=document.createElement("div"),this._toolbar.style.cssText=`
|
|
144
|
+
width: 100%;
|
|
145
|
+
height: 56px;
|
|
146
|
+
background-color: #4a4a4a;
|
|
147
|
+
color: #e8eaed;
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
justify-content: space-between;
|
|
151
|
+
padding: 0 8px;
|
|
152
|
+
box-sizing: border-box;
|
|
153
|
+
font-family: 'Roboto', Arial, sans-serif;
|
|
154
|
+
font-size: 14px;
|
|
155
|
+
flex-shrink: 0;
|
|
156
|
+
border-bottom: 1px solid #2a2a2a;
|
|
157
|
+
position: sticky;
|
|
158
|
+
top: 0;
|
|
159
|
+
z-index: 10;
|
|
160
|
+
`;const u=document.createElement("div");u.style.cssText="display: flex; align-items: center; gap: 12px;";const h=this._createToolbarButton("≡","Menu",()=>{if(this._sidebar){const Q=this._sidebar.style.display==="none";this._sidebar.style.display=Q?"block":"none"}});h.style.fontSize="24px",u.appendChild(h);const f=document.createElement("div");f.textContent=n||"Document.pdf",f.style.cssText=`
|
|
161
|
+
color: #e8eaed;
|
|
162
|
+
font-size: 14px;
|
|
163
|
+
font-weight: 400;
|
|
164
|
+
margin-left: 4px;
|
|
165
|
+
`,u.appendChild(f);const y=document.createElement("div");y.style.cssText="display: flex; align-items: center; gap: 12px;";const m=document.createElement("div");m.style.cssText="display: flex; align-items: center; gap: 8px;";const _=document.createElement("span");_.textContent=`1 / ${this._pdfDoc.numPages}`,_.style.cssText="color: #e8eaed; font-size: 13px; min-width: 50px; text-align: center;",m.appendChild(_),y.appendChild(m);const b=document.createElement("div");b.style.cssText="width: 1px; height: 24px; background-color: #5f5f5f;",y.appendChild(b);const S=document.createElement("div");S.style.cssText="display: flex; align-items: center; gap: 8px;";const v=this._createToolbarButton("−","Zoom out",()=>{this._zoom(this._currentZoom-.1)});S.appendChild(v);const x=document.createElement("span");x.textContent="100%",x.style.cssText="color: #e8eaed; font-size: 13px; min-width: 45px; text-align: center; cursor: pointer;",x.title="Reset zoom to 100%",x.addEventListener("click",()=>{this._zoom(1)}),S.appendChild(x);const E=this._createToolbarButton("+","Zoom in",()=>{this._zoom(this._currentZoom+.1)});S.appendChild(E),y.appendChild(S);const C=document.createElement("div");C.style.cssText="width: 1px; height: 24px; background-color: #5f5f5f;",y.appendChild(C);const L=this._createToolbarButton("⊡","Fit to page",()=>{this._fitToPage()});L.style.fontSize="18px",y.appendChild(L);const R=this._createToolbarButton("↻","Rotate clockwise",()=>{this._rotate()});R.style.fontSize="18px",y.appendChild(R);const N=document.createElement("div");N.style.cssText="display: flex; align-items: center; gap: 8px;";const V=this._createToolbarButton("⬇","Download",()=>{this._download()});V.style.fontSize="18px",N.appendChild(V);const I=this._createToolbarButton("🖨","Print",()=>{this._print()});I.style.fontSize="16px",N.appendChild(I);let B;B=this._createToolbarButton("⋮","More options",()=>{this._toggleMoreMenu(B)}),B.style.fontSize="20px",N.appendChild(B),this._toolbar.appendChild(u),this._toolbar.appendChild(y),this._toolbar.appendChild(N),this._pageDisplay=_,this._zoomDisplay=x;const O=document.createElement("div");O.style.cssText=`
|
|
166
|
+
width: 100%;
|
|
167
|
+
flex: 1;
|
|
168
|
+
display: flex;
|
|
169
|
+
`,this._sidebar=document.createElement("div"),this._sidebar.style.cssText=`
|
|
170
|
+
width: 294px;
|
|
171
|
+
height: calc(100vh - 56px);
|
|
172
|
+
overflow-y: auto;
|
|
173
|
+
overflow-x: hidden;
|
|
174
|
+
background-color: #3f3f3f;
|
|
175
|
+
border-right: 1px solid #2a2a2a;
|
|
176
|
+
padding: 20px 35px 20px 70px;
|
|
177
|
+
box-sizing: border-box;
|
|
178
|
+
flex-shrink: 0;
|
|
179
|
+
position: sticky;
|
|
180
|
+
top: 56px;
|
|
181
|
+
align-self: flex-start;
|
|
182
|
+
`,this._mainContent=document.createElement("div"),this._mainContent.style.cssText=`
|
|
183
|
+
flex: 1;
|
|
184
|
+
overflow: visible;
|
|
185
|
+
background-color: #525252;
|
|
186
|
+
position: relative;
|
|
187
|
+
padding: 0;
|
|
188
|
+
box-sizing: border-box;
|
|
189
|
+
`,this._container.appendChild(this._toolbar),O.appendChild(this._sidebar),O.appendChild(this._mainContent),this._container.appendChild(O);for(let Q=1;Q<=this._pdfDoc.numPages;Q++)await this._renderPage(Q),await this._renderThumbnail(Q);this._setupScrollSync(),this._isRendering=!1,console.log("[PDF.js] ✅ All pages rendered successfully"),o&&o()}catch(c){this._isRendering=!1,console.error("[PDF.js] ❌ Failed to render PDF:",c),a&&a(c)}}static _injectTextLayerCss(){if(document.getElementById("pw-pdf-text-layer-styles"))return;const e=document.createElement("style");e.id="pw-pdf-text-layer-styles",e.textContent=`
|
|
190
|
+
div[data-pw-pdf-text-layer] {
|
|
191
|
+
line-height: 1;
|
|
192
|
+
-webkit-text-size-adjust: none;
|
|
193
|
+
-moz-text-size-adjust: none;
|
|
194
|
+
text-size-adjust: none;
|
|
195
|
+
forced-color-adjust: none;
|
|
196
|
+
transform-origin: 0 0;
|
|
197
|
+
}
|
|
198
|
+
div[data-pw-pdf-text-layer] :is(span, br) {
|
|
199
|
+
color: transparent;
|
|
200
|
+
position: absolute;
|
|
201
|
+
white-space: pre;
|
|
202
|
+
cursor: text;
|
|
203
|
+
transform-origin: 0% 0%;
|
|
204
|
+
pointer-events: none;
|
|
205
|
+
}
|
|
206
|
+
div[data-pw-pdf-text-layer] span.markedContent {
|
|
207
|
+
top: 0;
|
|
208
|
+
height: 0;
|
|
209
|
+
}
|
|
210
|
+
`,document.head.appendChild(e)}async _renderPage(e){if(!this._mainContent)return;const t=await this._pdfDoc.getPage(e),n=t.getViewport({scale:1}),o=this._mainContent.clientWidth||800;let a,c;this._twoPageView?(a=(o/2-32)*.95/n.width*this._currentZoom,c="16px auto"):(a=(o-80)*.89/n.width*this._currentZoom,c="16px 20px 16px 80px");const u=t.getViewport({scale:a}),h=document.createElement("div");h.setAttribute("data-page-number",e.toString()),h.style.cssText=`
|
|
211
|
+
position: relative;
|
|
212
|
+
margin: ${c};
|
|
213
|
+
background: white;
|
|
214
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
215
|
+
width: ${u.width}px;
|
|
216
|
+
height: ${u.height}px;
|
|
217
|
+
box-sizing: border-box;
|
|
218
|
+
`;const f=document.createElement("canvas");f.width=u.width,f.height=u.height,f.style.cssText=`
|
|
219
|
+
display: block;
|
|
220
|
+
width: 100%;
|
|
221
|
+
height: 100%;
|
|
222
|
+
`,h.appendChild(f),this._mainContent.appendChild(h),this._canvasElements.push(f);const y=f.getContext("2d");if(!y)throw new Error("Failed to get canvas 2D context");const m={canvasContext:y,viewport:u};await t.render(m).promise;try{Ir._injectTextLayerCss();const _=await t.getTextContent(),b=document.createElement("div");b.setAttribute("data-pw-pdf-text-layer",e.toString()),b.style.cssText=`
|
|
223
|
+
position: absolute;
|
|
224
|
+
top: 0;
|
|
225
|
+
left: 0;
|
|
226
|
+
width: ${u.width}px;
|
|
227
|
+
height: ${u.height}px;
|
|
228
|
+
overflow: hidden;
|
|
229
|
+
opacity: 0;
|
|
230
|
+
`,b.style.setProperty("--scale-factor",String(a)),h.appendChild(b),await window.pdfjsLib.renderTextLayer({textContentSource:_,container:b,viewport:u,textDivs:[]}).promise}catch(_){console.warn(`[PDF.js] Text layer render failed for page ${e}:`,_)}console.log(`[PDF.js] Rendered page ${e}/${this._pdfDoc.numPages}`)}async _renderThumbnail(e){if(!this._sidebar)return;const t=await this._pdfDoc.getPage(e),a=118/t.getViewport({scale:1}).width,c=t.getViewport({scale:a}),u=document.createElement("div");u.setAttribute("data-page-number",e.toString()),u.style.cssText=`
|
|
231
|
+
margin: 18px auto;
|
|
232
|
+
background: white;
|
|
233
|
+
cursor: pointer;
|
|
234
|
+
border: 3px solid transparent;
|
|
235
|
+
box-sizing: border-box;
|
|
236
|
+
transition: border-color 0.15s;
|
|
237
|
+
width: fit-content;
|
|
238
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
239
|
+
`,e===1&&(u.style.borderColor="#1a73e8");const h=document.createElement("canvas");h.width=c.width,h.height=c.height,h.style.cssText="display: block; width: 100%; height: auto;";const f=document.createElement("div");f.textContent=e.toString(),f.style.cssText=`
|
|
240
|
+
text-align: center;
|
|
241
|
+
color: #dadce0;
|
|
242
|
+
font-size: 13px;
|
|
243
|
+
padding: 5px;
|
|
244
|
+
background: #3f3f3f;
|
|
245
|
+
font-family: 'Roboto', Arial, sans-serif;
|
|
246
|
+
`,u.appendChild(h),u.appendChild(f),this._sidebar.appendChild(u),this._thumbnailElements.push(u),u.addEventListener("click",()=>{this._scrollToPage(e)});const y=h.getContext("2d");y&&await t.render({canvasContext:y,viewport:c}).promise}_scrollToPage(e){if(!this._mainContent)return;const t=this._mainContent.querySelector(`[data-page-number="${e}"]`);if(t){const n=t.getBoundingClientRect();window.scrollBy({top:n.top-56,behavior:"smooth"}),this._updateCurrentPage(e)}}_updateCurrentPage(e){this._currentPage!==e&&(this._thumbnailElements[this._currentPage-1]&&(this._thumbnailElements[this._currentPage-1].style.borderColor="transparent"),this._thumbnailElements[e-1]&&(this._thumbnailElements[e-1].style.borderColor="#1a73e8"),this._currentPage=e,this._pageDisplay&&(this._pageDisplay.textContent=`${e} / ${this._pdfDoc.numPages}`))}_createToolbarButton(e,t,n){const o=document.createElement("button");return o.textContent=e,o.title=t,o.style.cssText=`
|
|
247
|
+
background: transparent;
|
|
248
|
+
border: none;
|
|
249
|
+
color: #e8eaed;
|
|
250
|
+
cursor: pointer;
|
|
251
|
+
padding: 6px 8px;
|
|
252
|
+
border-radius: 4px;
|
|
253
|
+
font-size: 16px;
|
|
254
|
+
line-height: 1;
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
justify-content: center;
|
|
258
|
+
min-width: 32px;
|
|
259
|
+
height: 32px;
|
|
260
|
+
transition: background-color 0.2s;
|
|
261
|
+
`,o.addEventListener("mouseenter",()=>{o.style.backgroundColor="rgba(255, 255, 255, 0.1)"}),o.addEventListener("mouseleave",()=>{o.style.backgroundColor="transparent"}),o.addEventListener("click",a=>{a.preventDefault(),n()}),o}async _zoom(e){if(!this._pdfDoc||!this._mainContent){console.warn("[PDF.js] Cannot zoom: PDF not loaded");return}this._currentZoom=Math.max(.25,Math.min(4,e)),this._zoomDisplay&&(this._zoomDisplay.textContent=`${Math.round(this._currentZoom*100)}%`),console.log(`[PDF.js] Zooming to ${Math.round(this._currentZoom*100)}%...`),await this._rerenderPages(),console.log("[PDF.js] ✅ Zoom complete")}async _rerenderPages(){if(!this._pdfDoc||!this._mainContent)return;const e=window.scrollY/(document.body.scrollHeight||1);this._twoPageView?this._mainContent.style.cssText=`
|
|
262
|
+
flex: 1;
|
|
263
|
+
overflow: visible;
|
|
264
|
+
background-color: #525252;
|
|
265
|
+
position: relative;
|
|
266
|
+
padding: 0;
|
|
267
|
+
box-sizing: border-box;
|
|
268
|
+
display: grid;
|
|
269
|
+
grid-template-columns: 1fr 1fr;
|
|
270
|
+
align-items: start;
|
|
271
|
+
`:this._mainContent.style.cssText=`
|
|
272
|
+
flex: 1;
|
|
273
|
+
overflow: visible;
|
|
274
|
+
background-color: #525252;
|
|
275
|
+
position: relative;
|
|
276
|
+
padding: 0;
|
|
277
|
+
box-sizing: border-box;
|
|
278
|
+
`,this._mainContent.innerHTML="",this._canvasElements=[];for(let t=1;t<=this._pdfDoc.numPages;t++)await this._renderPage(t);setTimeout(()=>{window.scrollTo(0,e*document.body.scrollHeight)},100)}_fitToPage(){this._mainContent&&(this._zoom(1),console.log("[PDF.js] Fit to page"))}_rotate(){var t;this._rotation=(this._rotation+90)%360;const e=(t=this._mainContent)==null?void 0:t.querySelectorAll("[data-page-number]");e&&e.forEach(n=>{n.style.transform=`rotate(${this._rotation}deg)`}),console.log(`[PDF.js] Rotated to ${this._rotation} degrees`)}_download(){if(!this._pdfDataUrl){console.error("[PDF.js] No PDF data URL available for download");return}const e=document.createElement("a");e.href=this._pdfDataUrl,e.download=this._filename,e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e),console.log(`[PDF.js] Downloaded: ${this._filename}`)}_print(){if(!this._canvasElements.length){console.error("[PDF.js] No pages rendered to print");return}const e=window.open("","_blank");if(!e){console.warn("[PDF.js] Print window blocked by browser");return}const t=e.document;t.write(`<!DOCTYPE html><html><head>
|
|
279
|
+
<title>${this._filename}</title>
|
|
280
|
+
<style>
|
|
281
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
282
|
+
body { background: white; }
|
|
283
|
+
img { display: block; width: 100%; page-break-after: always; page-break-inside: avoid; }
|
|
284
|
+
img:last-child { page-break-after: avoid; }
|
|
285
|
+
</style>
|
|
286
|
+
</head><body>`);for(const n of this._canvasElements){const o=n.toDataURL("image/png");t.write(`<img src="${o}">`)}t.write("</body></html>"),t.close(),e.onload=()=>{e.print(),e.close()},setTimeout(()=>{e.closed||(e.print(),e.close())},1500),console.log("[PDF.js] Print window opened")}_toggleMoreMenu(e){if(this._moreMenuElement){this._closeMoreMenu();return}const t=document.createElement("div");this._moreMenuElement=t,t.style.cssText=`
|
|
287
|
+
position: fixed;
|
|
288
|
+
background: #202124;
|
|
289
|
+
border-radius: 4px;
|
|
290
|
+
box-shadow: 0 2px 10px rgba(0,0,0,0.6);
|
|
291
|
+
z-index: 2147483648;
|
|
292
|
+
min-width: 220px;
|
|
293
|
+
padding: 4px 0;
|
|
294
|
+
font-family: 'Roboto', Arial, sans-serif;
|
|
295
|
+
font-size: 14px;
|
|
296
|
+
color: #e8eaed;
|
|
297
|
+
`;const n=e.getBoundingClientRect();t.style.top=`${n.bottom+4}px`,t.style.right=`${window.innerWidth-n.right}px`;const o=(u,h,f)=>{const y=document.createElement("div");if(y.style.cssText=`
|
|
298
|
+
padding: 10px 16px 10px 44px;
|
|
299
|
+
cursor: pointer;
|
|
300
|
+
position: relative;
|
|
301
|
+
white-space: nowrap;
|
|
302
|
+
`,h!==null){const _=document.createElement("span");_.textContent=h?"✓":"",_.style.cssText=`
|
|
303
|
+
position: absolute;
|
|
304
|
+
left: 16px;
|
|
305
|
+
top: 50%;
|
|
306
|
+
transform: translateY(-50%);
|
|
307
|
+
font-size: 14px;
|
|
308
|
+
`,y.appendChild(_)}const m=document.createElement("span");return m.textContent=u,y.appendChild(m),y.addEventListener("mouseenter",()=>{y.style.backgroundColor="rgba(255,255,255,0.1)"}),y.addEventListener("mouseleave",()=>{y.style.backgroundColor="transparent"}),y.addEventListener("click",()=>{this._closeMoreMenu(),f()}),t.appendChild(y),y},a=()=>{const u=document.createElement("div");u.style.cssText="height: 1px; background: rgba(255,255,255,0.15); margin: 4px 0;",t.appendChild(u)};o("Two page view",this._twoPageView,()=>{this._twoPageView=!this._twoPageView,this._rerenderPages()}),o("Annotations",this._annotationsVisible,()=>{this._annotationsVisible=!this._annotationsVisible,console.log(`[PDF.js] Annotations ${this._annotationsVisible?"shown":"hidden"}`)}),a(),o("Present",null,()=>{this._present()}),o("Document properties",null,()=>{this._showDocumentProperties()});const c=u=>{!t.contains(u.target)&&u.target!==e&&this._closeMoreMenu()};setTimeout(()=>{document.addEventListener("mousedown",c,!0),this._moreMenuCleanup=()=>document.removeEventListener("mousedown",c,!0)},0),document.body.appendChild(t)}_closeMoreMenu(){this._moreMenuElement&&(this._moreMenuElement.remove(),this._moreMenuElement=null),this._moreMenuCleanup&&(this._moreMenuCleanup(),this._moreMenuCleanup=null)}_present(){console.log("[PDF.js] Present: not yet implemented")}async _showDocumentProperties(){if(!this._pdfDoc)return;let e={};try{e=(await this._pdfDoc.getMetadata()).info||{}}catch{}let t="-";if(this._pdfDataUrl)try{const _=this._pdfDataUrl.split(",")[1];if(_){const b=Math.ceil(_.length*3/4);t=b>=1024*1024?`${(b/(1024*1024)).toFixed(1)} MB`:`${(b/1024).toFixed(1)} KB`}}catch{}const n=_=>{if(!_)return"-";const b=_.match(/^D:(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/);if(!b)return _;const S=new Date(`${b[1]}-${b[2]}-${b[3]}T${b[4]}:${b[5]}:${b[6]}`);return isNaN(S.getTime())?_:S.toLocaleString()};let o="-";try{const b=(await this._pdfDoc.getPage(1)).getViewport({scale:1}),S=(b.width/72).toFixed(2),v=(b.height/72).toFixed(2),x=b.width>b.height?"landscape":"portrait";o=`${S} × ${v} in (${x})`}catch{}const a=[[["File name:",this._filename],["File size:",t]],[["Title:",e.Title||"-"],["Author:",e.Author||"-"],["Subject:",e.Subject||"-"],["Keywords:",e.Keywords||"-"],["Created:",n(e.CreationDate||"")],["Modified:",n(e.ModDate||"")],["Application:",e.Creator||"-"]],[["PDF producer:",e.Producer||"-"],["PDF version:",e.PDFFormatVersion||"-"],["Page count:",`${this._pdfDoc.numPages}`],["Page size:",o]],[["Fast web view:","No"]]],c=document.createElement("div");c.style.cssText=`
|
|
309
|
+
position: fixed;
|
|
310
|
+
top: 0; left: 0; right: 0; bottom: 0;
|
|
311
|
+
background: rgba(0,0,0,0.5);
|
|
312
|
+
z-index: 2147483649;
|
|
313
|
+
display: flex;
|
|
314
|
+
align-items: center;
|
|
315
|
+
justify-content: center;
|
|
316
|
+
`;const u=document.createElement("div");u.style.cssText=`
|
|
317
|
+
background: #3c4043;
|
|
318
|
+
border-radius: 12px;
|
|
319
|
+
padding: 24px 24px 16px;
|
|
320
|
+
min-width: 380px;
|
|
321
|
+
max-width: 500px;
|
|
322
|
+
color: #e8eaed;
|
|
323
|
+
font-family: 'Roboto', Arial, sans-serif;
|
|
324
|
+
box-shadow: 0 4px 20px rgba(0,0,0,0.5);
|
|
325
|
+
`;const h=document.createElement("h3");h.textContent="Document properties",h.style.cssText="margin: 0 0 16px; font-size: 18px; font-weight: 500;",u.appendChild(h);const f=(_,b)=>{const S=document.createElement("div");S.style.cssText="display: flex; padding: 7px 0; font-size: 13px;";const v=document.createElement("span");v.textContent=_,v.style.cssText="min-width: 140px; flex-shrink: 0;";const x=document.createElement("span");x.textContent=b,x.style.wordBreak="break-all",S.appendChild(v),S.appendChild(x),u.appendChild(S)},y=()=>{const _=document.createElement("div");_.style.cssText="height: 1px; background: rgba(255,255,255,0.15); margin: 6px 0;",u.appendChild(_)};for(let _=0;_<a.length;_++){for(const[b,S]of a[_])f(b,S);_<a.length-1&&y()}const m=document.createElement("button");m.textContent="Close",m.style.cssText=`
|
|
326
|
+
display: block;
|
|
327
|
+
margin: 20px 0 0 auto;
|
|
328
|
+
padding: 10px 28px;
|
|
329
|
+
background: #8ab4f8;
|
|
330
|
+
border: none;
|
|
331
|
+
border-radius: 24px;
|
|
332
|
+
color: #202124;
|
|
333
|
+
font-size: 14px;
|
|
334
|
+
font-weight: 500;
|
|
335
|
+
cursor: pointer;
|
|
336
|
+
font-family: 'Roboto', Arial, sans-serif;
|
|
337
|
+
`,m.addEventListener("click",()=>c.remove()),u.appendChild(m),c.appendChild(u),c.addEventListener("click",_=>{_.target===c&&c.remove()}),document.body.appendChild(c),console.log("[PDF.js] Document properties dialog opened")}_setupScrollSync(){this._mainContent&&window.addEventListener("scroll",()=>{if(!this._mainContent)return;const e=this._mainContent.querySelectorAll("[data-page-number]"),t=56;for(let n=0;n<e.length;n++){const o=e[n],a=o.getBoundingClientRect();if(a.top<=t+100&&a.bottom>t){const c=parseInt(o.getAttribute("data-page-number")||"1");this._updateCurrentPage(c);break}}},{passive:!0})}cleanup(){this._pdfDoc&&(this._pdfDoc.destroy(),this._pdfDoc=null),this._closeMoreMenu(),this._canvasElements=[],this._thumbnailElements=[],this._toolbar=null,this._sidebar=null,this._mainContent=null,this._currentPage=1,this._container.innerHTML=""}}class Pb{static async fetchPdfViaBackend(e){try{if(console.log("[PW-PDF-VIEWER] Fetching PDF via Playwright backend:",e.substring(0,100)),!window.__pw_recorderFetchPdf)throw new Error("__pw_recorderFetchPdf binding not available");const t=await window.__pw_recorderFetchPdf(e);if(!t)throw new Error("Backend returned null (fetch failed)");return console.log("[PW-PDF-VIEWER] ✅ Successfully fetched PDF via backend:",t.substring(0,100)),t}catch(t){return console.error("[PW-PDF-VIEWER] ❌ Failed to fetch PDF via backend:",t),null}}static async renderPdfWithPdfJs(e){const{pdfUrl:t,containerElement:n,onSuccess:o,onError:a}=e;try{console.log("[PW-PDF-VIEWER] Starting PDF render process...");const c=await this.fetchPdfViaBackend(t);if(!c)throw new Error("Failed to fetch PDF from backend");console.log("[PW-PDF-VIEWER] ✅ PDF fetched, initializing PDF.js viewer...");let u="Document.pdf";try{const y=new URL(t).pathname,m=y.lastIndexOf("/");m!==-1&&(u=y.substring(m+1),u=decodeURIComponent(u))}catch(f){console.warn("[PW-PDF-VIEWER] Failed to extract filename from URL:",f)}return await new Ir(n).renderPdf({pdfDataUrl:c,filename:u,onReady:()=>{console.log("[PW-PDF-VIEWER] ✅ PDF rendered successfully!"),o&&o()},onError:f=>{console.error("[PW-PDF-VIEWER] ❌ PDF.js render error:",f),a&&a(f)}}),!0}catch(c){return console.error("[PW-PDF-VIEWER] ❌ Failed to render PDF:",c),a&&a(c),!1}}}class hk{constructor(e){this._pdfEmbeds=new Map,this._pdfPageReplaced=!1,this._mutationObserver=null,this._recorder=e}install(){console.log("[PDF-Tool] Installing PDF viewer tool..."),this._detectAndReplacePdfEmbeds(),this._setupAutomaticPdfDetection()}uninstall(){console.log("[PDF-Tool] Uninstalling PDF viewer tool..."),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null)}cleanup(){console.log("[PDF-Tool] Cleaning up PDF viewer tool...");for(const[,e]of this._pdfEmbeds.entries())e.viewer.cleanup();this._pdfEmbeds.clear(),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null)}isWithinPdfViewer(e){if(!e)return!1;let t=e;for(;t;){if(this._pdfEmbeds.has(t)||t.hasAttribute&&t.hasAttribute("data-pw-pdf-viewer")||t.id==="pw-pdf-viewer-container")return!0;t=t.parentNode}return!1}_setupAutomaticPdfDetection(){console.log("[PDF-Tool] Setting up automatic PDF detection..."),this._mutationObserver=new MutationObserver(e=>{for(const t of e)if(t.type==="childList"&&t.addedNodes.length>0){setTimeout(()=>{this._detectAndReplacePdfEmbeds()},100);break}}),this._mutationObserver.observe(this._recorder.document,{childList:!0,subtree:!0}),console.log("[PDF-Tool] ✅ Automatic PDF detection active")}async _detectAndReplacePdfEmbeds(){if(console.log("[PDF-Tool] Scanning for PDF embeds..."),this._pdfPageReplaced){console.log("[PDF-Tool] PDF page already replaced, skipping detection");return}if(this._isCurrentPagePdf()){console.log("[PDF-Tool] Current page is a PDF document, replacing with PDF.js viewer..."),await this._replacePdfPage();return}const t=this._recorder.document.querySelectorAll('embed[type="application/pdf"], iframe[src*=".pdf"]');if(t.length===0){console.log("[PDF-Tool] No PDF embeds found");return}console.log(`[PDF-Tool] Found ${t.length} PDF embed(s)`);for(const n of t)await this._replacePdfEmbed(n)}_isCurrentPagePdf(){const e=window.location.href,t=this._recorder.document;return e.toLowerCase().endsWith(".pdf")?(console.log("[PDF-Tool] URL ends with .pdf:",e),!0):t.querySelector('embed[type="application/pdf"]')&&t.body.children.length===1?(console.log("[PDF-Tool] Found full-page PDF embed"),!0):e.includes("s3.amazonaws.com")||e.includes(".s3.")?(console.log("[PDF-Tool] S3 URL detected, likely a PDF:",e),!0):!1}async _replacePdfPage(){try{this._pdfPageReplaced=!0;const e=window.location.href;console.log("[PDF-Tool] Replacing full-page PDF with PDF.js viewer:",e.substring(0,100));const t=this._recorder.document;t.body.innerHTML="";const n=t.createElement("div");n.setAttribute("data-pw-pdf-viewer","true"),n.id="pw-pdf-viewer-container",n.style.cssText=`
|
|
338
|
+
position: fixed;
|
|
339
|
+
top: 0;
|
|
340
|
+
left: 0;
|
|
341
|
+
width: 100%;
|
|
342
|
+
height: 100%;
|
|
343
|
+
z-index: 2147483647;
|
|
344
|
+
background: #525252;
|
|
345
|
+
`,t.body.appendChild(n);const o=new Ir(n);await Pb.renderPdfWithPdfJs({pdfUrl:e,containerElement:n,onSuccess:()=>{console.log("[PDF-Tool] ✅ Full-page PDF replaced with PDF.js viewer")},onError:c=>{console.error("[PDF-Tool] ❌ Failed to render full-page PDF:",c)}})||console.error("[PDF-Tool] Failed to render full-page PDF")}catch(e){console.error("[PDF-Tool] Error replacing full-page PDF:",e)}}async _replacePdfEmbed(e){try{if(this._pdfEmbeds.has(e)){console.log("[PDF-Tool] PDF embed already replaced, skipping...");return}let t=e.getAttribute("src");if(!t||t==="about:blank"){if(console.log('[PDF-Tool] Embed has src="about:blank", using page URL as PDF URL...'),t=window.location.href,!t.includes(".pdf")){console.log("[PDF-Tool] Page URL does not appear to be a PDF, skipping");return}console.log("[PDF-Tool] Using page URL as PDF:",t.substring(0,100))}console.log("[PDF-Tool] Replacing PDF embed with PDF.js viewer:",t.substring(0,100));const n=this._recorder.document.createElement("div");n.setAttribute("data-pw-pdf-viewer","true"),n.style.cssText=`
|
|
346
|
+
position: absolute;
|
|
347
|
+
top: ${e.offsetTop}px;
|
|
348
|
+
left: ${e.offsetLeft}px;
|
|
349
|
+
width: ${e.offsetWidth||800}px;
|
|
350
|
+
height: ${e.offsetHeight||600}px;
|
|
351
|
+
z-index: 2147483647;
|
|
352
|
+
background: #525252;
|
|
353
|
+
`;const o=e.parentNode;if(!o)return;o.insertBefore(n,e),e.style.display="none";const a=new Ir(n);this._pdfEmbeds.set(e,{originalParent:o,viewer:a,container:n}),await Pb.renderPdfWithPdfJs({pdfUrl:t,containerElement:n,onSuccess:()=>{console.log("[PDF-Tool] ✅ PDF embed replaced successfully")},onError:c=>{console.error("[PDF-Tool] ❌ Failed to render PDF:",c),e.style.display="",n.parentNode&&n.parentNode.removeChild(n),this._pdfEmbeds.delete(e)}})}catch(t){console.error("[PDF-Tool] Error replacing PDF embed:",t)}}}const qb=30;class fk{constructor(e,t,n){this.position={x:0,y:0},this.modifiers=0,this._deltaX=0,this._deltaY=0,this._deltaZ=0,this._scrollStart=new Map,this._prevented=!1,this.startTime=e,this._scrollingElement=t,this._setTimeout=n}add(e,t,n){this._deltaX+=e.deltaX,this._deltaY+=e.deltaY,this._deltaZ+=e.deltaZ,this.position=t,this.modifiers=n;for(const o of this._scrollChain(e.composedPath()))this._scrollStart.has(o)||this._scrollStart.set(o,{left:o.scrollLeft,top:o.scrollTop});this._setTimeout(()=>{e.defaultPrevented&&(this._prevented=!0)},0)}get domDelta(){return{deltaX:this._deltaX,deltaY:this._deltaY,deltaZ:this._deltaZ}}isNoise(){const e=this._measure();return Math.max(Math.abs(this._deltaX),Math.abs(e.deltaX))<qb&&Math.max(Math.abs(this._deltaY),Math.abs(e.deltaY))<qb}recordedDelta(){const e=this._measure();return!this._prevented&&e.moved?{deltaX:Math.round(e.deltaX*10)/10,deltaY:Math.round(e.deltaY*10)/10,deltaZ:0,source:"measured",skippedScrollers:e.skipped}:{...this.domDelta,source:this._prevented?"prevented":"unscrolled",skippedScrollers:e.skipped}}_scrollChain(e){var n;const t=[];for(const o of e){if(o.nodeType!==1||o===this._scrollingElement)continue;const a=o,c=(n=a.ownerDocument.defaultView)==null?void 0:n.getComputedStyle(a);if(!c)continue;const u=a.scrollHeight>a.clientHeight&&/^(auto|scroll|overlay)$/.test(c.overflowY);(a.scrollWidth>a.clientWidth&&/^(auto|scroll|overlay)$/.test(c.overflowX)||u)&&t.push(a)}return this._scrollingElement&&t.push(this._scrollingElement),t}_measure(){let e=0,t=0,n=0;for(const[o,a]of this._scrollStart){if(!o.isConnected||!o.getClientRects().length){n++;continue}e+=o.scrollLeft-a.left,t+=o.scrollTop-a.top}return{deltaX:e,deltaY:t,moved:Math.abs(e)>=1||Math.abs(t)>=1,skipped:n}}}function ci(i,e,t,n){return i.addEventListener(e,t,n),()=>{i.removeEventListener(e,t,n)}}function gk(i){for(const e of i)e();i.splice(0,i.length)}function pt(i){return i.injectedScript.utils.builtins.Date.now().toString()}const hn=class hn{constructor(e){this._dragState=null,this._listeners=[],this._lastClickTime=0,this._pendingClick=null,this._clickContext=null,this._lastMousePosition=null,this._lastWheelScreen=null,this._wheelToggleTimeout=null,this._isWheelSequence=!1,this._wheelSequenceRecorded=!1,this._wheelChunk=null,this._wheelDebounceTimeout=null,this._pdfViewerTool=null,this._goJSAlwaysOnRemovers=[],this._recorder=e}cursor(){return"grab"}install(){this._arm(),this._checkAndActivatePdfViewer(),this._hookGoJSDiagramsAlwaysOn()}uninstall(){this._cancelPendingClick(),this._clearWheelTimers(),this._flushWheelAction(),this._endWheelSequence(),this._dragState&&this._dragState.source&&this._dragState.target&&this._capture();for(const e of this._goJSAlwaysOnRemovers)e();this._goJSAlwaysOnRemovers=[],delete this._recorder.document.__skyrampGoJSHooked,this._disarm()}cleanup(){this._cancelPendingClick(),this._clearWheelTimers(),this._flushWheelAction(),this._endWheelSequence(),this._dragState&&this._dragState.source&&this._dragState.target&&this._capture(),this._listeners.length>0&&(this._disarm(),this._arm())}onDblClick(e){var c;const t=(c=this._pendingClick)==null?void 0:c.click;this._cancelPendingClick();const n=e.target;if(!n||this._isPlaywrightElement(n))return;e.preventDefault();const o=t??this._positionClick(e),a=o&&this._settledClick(o);if(!a){this._deactivate();return}try{const u={name:"click",selector:a.selector,button:"left",modifiers:0,clickCount:2,position:a.position,signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(u),this._deactivate()}catch(u){console.error("[PW-RECORDER] Error recording position-based double-click:",u),this._deactivate()}}_positionClick(e){const t=this._bodyRelativePosition(e),n=this._clickContext;return this._clickContext=null,n&&n.element.isConnected?{selector:n.selector,position:n.offset,context:n.element,bodyPosition:t}:t?{selector:"body",position:t,bodyPosition:t}:null}_settledClick(e){return!e.context||Ts(this._recorder.injectedScript,e.selector,e.context)?e:e.bodyPosition?{selector:"body",position:e.bodyPosition}:null}_contextAt(e,t){var c;const n=this._recorder.document;let o=n.elementFromPoint(e,t);for(;o!=null&&o.shadowRoot;){const u=o.shadowRoot.elementFromPoint(e,t);if(!u||u===o)break;o=u}if(!o||this._isPlaywrightElement(o))return null;const a=u=>u===n.body||u===n.documentElement;for(let u=o;u&&!a(u);u=Ge(u)){const h=(c=_n(u))==null?void 0:c.position,f=Ge(u),y=!!f&&!a(f)&&(f.scrollTop!==0||f.scrollLeft!==0)&&this._isScrollContainer(f);if(h!=="fixed"&&h!=="sticky"&&!y)continue;const m=this._stableSelector(u);return m?{element:u,selector:m,offset:this._elementOffset(u,e,t).offset}:null}return null}_stableSelector(e){try{const{selector:t}=this._scopedLikeClick(e,this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName||"data-testid"})),n=/^\s*(#[\w-]+|\[(id|data-testid)="[^"]*"\]|internal:testid=.*)\s*$/;return t.split(">>").every(o=>n.test(o))&&Ts(this._recorder.injectedScript,t,e)?t:null}catch(t){return console.warn("[PW-RECORDER] No selector for the click context; recording the click on body",t),null}}_isScrollContainer(e){const t=_n(e),n=o=>o==="auto"||o==="scroll"||o==="overlay";return n(t==null?void 0:t.overflowY)&&e.scrollHeight>e.clientHeight||n(t==null?void 0:t.overflowX)&&e.scrollWidth>e.clientWidth}_elementOffset(e,t,n){const o=e.getBoundingClientRect(),a=this._recorder.injectedScript.getElementBorderWidth(e),c=(f,y)=>Math.max(0,Math.min(Math.round(f),Math.floor(y)-1)),u=t-o.left,h=n-o.top;return{offset:{x:c(u,o.width)-a.left,y:c(h,o.height)-a.top},centered:Math.abs(u-o.width/2)<5&&Math.abs(h-o.height/2)<5}}_sample(e,t,n){return{x:t,y:n,...this._elementOffset(e,t,n)}}_bodyRelativePosition(e){const t=this._recorder.document.body;if(!t)return null;const n=t.getBoundingClientRect(),o=this._recorder.injectedScript.getElementBorderWidth(t);return{x:Math.round(e.clientX-n.left-o.left),y:Math.round(e.clientY-n.top-o.top)}}_endWheelSequence(){this._isWheelSequence=!1,this._wheelSequenceRecorded=!1,this._lastWheelScreen=null}beforeArmedTyping(e){const t=this._pendingClick;if(t){if(e.contains(t.target)){this._deactivate();return}this._cancelPendingClick(),t.record()}}_cancelPendingClick(){this._pendingClick&&(this._recorder.injectedScript.utils.builtins.clearTimeout(this._pendingClick.timeout),this._pendingClick=null)}_clearWheelTimers(){const e=this._recorder.injectedScript.utils.builtins;this._wheelToggleTimeout&&(e.clearTimeout(this._wheelToggleTimeout),this._wheelToggleTimeout=null),this._wheelDebounceTimeout&&(e.clearTimeout(this._wheelDebounceTimeout),this._wheelDebounceTimeout=null)}_flushWheelAction(){const e=this._wheelChunk;if(!e)return;if(this._wheelChunk=null,!this._wheelSequenceRecorded&&e.isNoise()){console.log("[PW-RECORDER] Suppressing Magic Mouse noise wheel:",{...e.domDelta,accumulatedFor:Date.now()-e.startTime+"ms"});return}const t=e.recordedDelta();try{const n={name:"mouse.wheel",position:e.position,deltaX:t.deltaX,deltaY:t.deltaY,deltaZ:t.deltaZ,modifiers:e.modifiers,signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(n),this._wheelSequenceRecorded=!0,console.log("[PW-RECORDER] Flushed accumulated wheel action:",{...t,domDelta:e.domDelta,accumulatedFor:Date.now()-e.startTime+"ms"})}catch(n){console.error("[PW-RECORDER] Error flushing wheel action:",n)}}_arm(){var y;this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1},(y=this._recorder.injectedScript.document.body)==null||y.setAttribute("data-pw-cursor","grab");const e=m=>{const _=m;if(this._dragState){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);b&&!this._isPlaywrightElement(b)&&(this._dragState.source=this._selectDraggableAncestor(b),this._dragState.sourcePoint=this._sample(this._dragState.source,_.clientX,_.clientY))}},t=m=>{const _=m;if(this._dragState&&this._dragState.source){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);if(b&&!this._isPlaywrightElement(b)){const S=this._selectDroppableAncestor(b);S!==this._dragState.source&&(this._dragState.target=S,this._dragState.targetPoint=this._sample(this._dragState.target,_.clientX,_.clientY))}}},n=m=>{const _=m;if(this._wheelChunk&&(this._wheelDebounceTimeout&&(this._recorder.injectedScript.utils.builtins.clearTimeout(this._wheelDebounceTimeout),this._wheelDebounceTimeout=null),this._flushWheelAction()),this._clickContext=this._contextAt(_.clientX,_.clientY),this._dragState&&(this._dragState.source=null,this._dragState.target=null,this._dragState.sourcePoint=null,this._dragState.targetPoint=null,this._dragState.isCanvas=!1,this._dragState.isGoJS=!1,this._dragState.isReactFlow=!1,this._dragState.isSlider=!1,this._dragState.dropDetected=!1,this._dragState.startTime=Date.now()),this._dragState){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);if(b&&!this._isPlaywrightElement(b))if(this._isReactFlowElement(b)){this._dragState.isReactFlow=!0;let S=b;for(;S&&!S.classList.contains("react-flow");)S=S.parentElement;this._dragState.source=S||b,this._dragState.sourcePoint=this._sample(this._dragState.source,_.clientX,_.clientY)}else if(this._isGoJSElement(b))this._dragState.isGoJS=!0,this._dragState.source=b,this._dragState.sourcePoint=this._sample(this._dragState.source,_.clientX,_.clientY);else if(this._isCanvasElement(b))this._dragState.isCanvas=!0,this._dragState.source=b,this._dragState.sourcePoint=this._sample(this._dragState.source,_.clientX,_.clientY);else{const S=this._selectDraggableAncestor(b);if(S!==b)this._dragState.source=S,this._dragState.sourcePoint=this._sample(this._dragState.source,_.clientX,_.clientY);else{const v=this._findSliderThumb(b);v?(this._dragState.isSlider=!0,this._dragState.source=v,this._dragState.sourcePoint=this._sample(this._dragState.source,_.clientX,_.clientY)):(this._dragState.source=b,this._dragState.sourcePoint=this._sample(this._dragState.source,_.clientX,_.clientY))}}}},o=m=>{const _=m;if(this._dragState&&this._dragState.source&&_.buttons===1){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);if(b&&!this._isPlaywrightElement(b)){if(this._dragState.isReactFlow&&this._isReactFlowElement(b))this._dragState.target=this._dragState.source,this._dragState.targetPoint=this._sample(this._dragState.target,_.clientX,_.clientY);else if(this._dragState.isGoJS&&this._isCanvasElement(b))this._dragState.target=b,this._dragState.targetPoint=this._sample(this._dragState.target,_.clientX,_.clientY);else if(this._dragState.isCanvas&&this._isCanvasElement(b))this._dragState.target=b,this._dragState.targetPoint=this._sample(this._dragState.target,_.clientX,_.clientY);else if(this._dragState.isSlider)this._dragState.target=this._dragState.source,this._dragState.targetPoint=this._sample(this._dragState.target,_.clientX,_.clientY);else if(!this._dragState.isCanvas&&!this._dragState.isReactFlow&&!this._dragState.isSlider){const S=this._selectDroppableAncestor(b);S!==this._dragState.source?(this._dragState.target=S,this._dragState.targetPoint=this._sample(this._dragState.target,_.clientX,_.clientY)):b!==this._dragState.source&&(this._dragState.target=b,this._dragState.targetPoint=this._sample(this._dragState.target,_.clientX,_.clientY))}}}},a=m=>{const _=m;if(this._dragState&&this._dragState.source&&this._dragState.sourcePoint)if(this._dragState.target)this._getSourceColumn(this._dragState.source),this._dragState.target,this._capture();else{const b=Math.sqrt(Math.pow(_.clientX-this._dragState.sourcePoint.x,2)+Math.pow(_.clientY-this._dragState.sourcePoint.y,2));if(b>=5){this._deactivate();return}if(b<5){if(_.button===2)return;this._cancelPendingClick();const S=this._positionClick(_);if(!S){this._deactivate();return}const v=()=>{this._pendingClick=null;const E=this._settledClick(S);if(!E){this._deactivate();return}try{const C={name:"click",selector:E.selector,button:"left",modifiers:0,clickCount:1,position:E.position,signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(C),this._deactivate()}catch(C){console.error("[PW-RECORDER] Error recording position-based click:",C),this._deactivate()}},x=this._recorder.injectedScript.utils.builtins.setTimeout(v,300);this._pendingClick={timeout:x,click:S,target:_.composedPath()[0],record:v}}}else console.log("[PW-RECORDER] PointerUp - no valid drag state")},c=m=>{const _=m;if(this._dragState&&this._dragState.source){if(this._dragState.dropDetected=!0,!this._dragState.target){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);b&&!this._isPlaywrightElement(b)&&(this._dragState.target=this._selectDroppableAncestor(b),this._dragState.targetPoint=this._sample(this._dragState.target,_.clientX,_.clientY))}this._dragState.target?(this._getSourceColumn(this._dragState.source),this._dragState.target,this._capture()):this._deactivate()}else this._deactivate()},u=m=>{var b;const _=m;if(this._dragState&&this._dragState.source){if(this._dragState.dropDetected){if(!this._dragState.target){const S=this._recorder.document.elementFromPoint(_.clientX,_.clientY);S&&!this._isPlaywrightElement(S)&&(this._dragState.target=this._selectDroppableAncestor(S),this._dragState.targetPoint=this._sample(this._dragState.target,_.clientX,_.clientY))}this._dragState.target&&(this._getSourceColumn(this._dragState.source),this._dragState.target,this._capture())}else{const S=(b=_.dataTransfer)==null?void 0:b.dropEffect;if(S&&S!=="none"){this._deactivate();return}console.log("[PW-RECORDER] Drag cancelled (no drop event), not recording")}this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}},h=m=>{var x;const _=m,b=_.target;if(!b||this._isPlaywrightElement(b)||this._isGoJSElement(b))return;const S=((x=this._pdfViewerTool)==null?void 0:x.isWithinPdfViewer(b))||!1;_.ctrlKey&&!S&&m.preventDefault();let v=0;_.altKey&&(v|=1),_.ctrlKey&&(v|=2),_.metaKey&&(v|=4),_.shiftKey&&(v|=8);try{const E={x:Math.round(_.clientX),y:Math.round(_.clientY)},C=Date.now();if(this._wheelChunk&&C-this._wheelChunk.startTime>hn.WHEEL_MAX_ACCUMULATION_MS&&this._flushWheelAction(),!this._isWheelSequence){this._isWheelSequence=!0;const I={name:"comment",text:"Mouse scrolling block",signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(I);const B={name:"waitForTimeout",duration:hn.WHEEL_SCROLL_TIMEOUT_MS,signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(B)}const L={x:Math.round(_.screenX),y:Math.round(_.screenY)},R=!this._lastWheelScreen||this._lastWheelScreen.x!==L.x||this._lastWheelScreen.y!==L.y;if(this._lastWheelScreen=L,R&&(!this._lastMousePosition||this._lastMousePosition.x!==E.x||this._lastMousePosition.y!==E.y)){const I={name:"mouse.move",position:E,signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(I),this._lastMousePosition=E}const N=this._recorder.injectedScript.utils.builtins;this._wheelChunk||(this._wheelChunk=new fk(C,this._recorder.document.scrollingElement,N.setTimeout));const V=this._wheelChunk;this._wheelDebounceTimeout&&N.clearTimeout(this._wheelDebounceTimeout),this._wheelDebounceTimeout=N.setTimeout(()=>{this._wheelDebounceTimeout=null,this._flushWheelAction()},hn.WHEEL_DEBOUNCE_MS),this._wheelToggleTimeout&&N.clearTimeout(this._wheelToggleTimeout),this._wheelToggleTimeout=N.setTimeout(()=>{this._deactivate()},hn.WHEEL_TOOL_DISABLE_MS),V.add(_,E,v)}catch(E){console.error("[PW-RECORDER] Error recording wheel event:",E)}},f=m=>{const _=m,b=_.target;if(!b||this._isPlaywrightElement(b))return;m.preventDefault();const S=this._positionClick(_),v=S&&this._settledClick(S);if(!v){this._deactivate();return}try{this._lastMousePosition={x:Math.round(_.clientX),y:Math.round(_.clientY)};const x={name:"click",selector:v.selector,button:"right",modifiers:0,clickCount:1,position:v.position,signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(x),this._deactivate()}catch(x){console.error("[PW-RECORDER] Error recording right-click:",x),this._deactivate()}};this._listeners=[ci(this._recorder.document,"dragstart",e,!0),ci(this._recorder.document,"dragover",t,!0),ci(this._recorder.document,"drop",c,!0),ci(this._recorder.document,"dragend",u,!0),ci(this._recorder.document,"pointerdown",n,!0),ci(this._recorder.document,"pointermove",o,!0),ci(this._recorder.document,"pointerup",a,!0),ci(this._recorder.document,"wheel",h,{passive:!1,capture:!0}),ci(this._recorder.document,"contextmenu",f,!0)]}_disarm(){gk(this._listeners),this._listeners=[],this._dragState=null}_deactivate(){this._cancelPendingClick(),this._clearWheelTimers(),this._endWheelSequence(),this._wheelChunk=null,this._disarm(),this._recorder.state.mode==="recordingDrag"&&this._recorder.setMode("recording")}_checkAndActivatePdfViewer(){const e=this._recorder.document;if(window.__pwPdfViewerInstalled){console.log("[DD-Tool] PDF viewer already installed, skipping");return}const t=e.querySelector('embed[type="application/pdf"], iframe[src*=".pdf"]'),n=window.location.href.toLowerCase().endsWith(".pdf")||window.location.href.includes("s3.amazonaws.com")||window.location.href.includes(".s3.");(t||n)&&(console.log("[DD-Tool] PDF detected, activating PDF viewer tool..."),this._pdfViewerTool=new hk(this._recorder),this._pdfViewerTool.install(),window.__pwPdfViewerInstalled=!0,console.log("[DD-Tool] ✅ PDF viewer tool activated (permanent)"))}_getActualPageElement(e){for(const t of e){const n=t;if(n&&n.nodeType===Node.ELEMENT_NODE&&!this._isPlaywrightElement(n))return n}return null}_isPlaywrightElement(e){var a;const t=((a=e.nodeName)==null?void 0:a.toLowerCase())||"",n=e.id||"";return t.startsWith("x-pw-")||n==="x-pw-glass"||e.classList.contains("playwright-overlay")||e.hasAttribute("data-playwright")}_isCanvasElement(e){var t;return((t=e.tagName)==null?void 0:t.toLowerCase())==="canvas"}_isGoJSElement(e){var n,o;if(((n=e.tagName)==null?void 0:n.toLowerCase())!=="canvas")return!1;const t=(o=e.ownerDocument)==null?void 0:o.defaultView;return!!(t!=null&&t.myDiagram||t!=null&&t.myPalette)}_findGoJSContainer(e){var o,a,c;const t=(o=e.ownerDocument)==null?void 0:o.defaultView;if(!((c=(a=t==null?void 0:t.go)==null?void 0:a.Diagram)!=null&&c.fromDiv))return null;let n=e.parentElement;for(;n&&n!==e.ownerDocument.body;){const u=t.go.Diagram.fromDiv(n);if(u){const h=!!(t.go.Palette&&u instanceof t.go.Palette);let f;if(n.id)f=`#${n.id}`;else if(n.getAttribute("data-testid"))f=`[data-testid="${n.getAttribute("data-testid")}"]`;else{const y=n.parentElement;if(y){const m=Array.from(y.children).indexOf(n)+1;f=`${n.tagName.toLowerCase()}:nth-child(${m})`}else f=n.tagName.toLowerCase()}return{diagram:u,isPalette:h,containerSelector:f}}n=n.parentElement}return null}_buildSelectorFromEl(e){if(e.id)return`#${e.id}`;if(e.getAttribute("data-testid"))return`[data-testid="${e.getAttribute("data-testid")}"]`;const t=e.parentElement;if(t){const n=Array.from(t.children).indexOf(e)+1;return`${e.tagName.toLowerCase()}:nth-child(${n})`}return e.tagName.toLowerCase()}_emitGoJSNodeAdd(e,t,n,o,a,c,u){let h,f,y,m,_,b=1/0;e.nodes.each(v=>{if(!(v!=null&&v.data))return;const x=String(v.data.key??"");if(!x||x===a)return;const E=v.location.x-c,C=v.location.y-u,L=Math.sqrt(E*E+C*C);L<b&&(b=L,h=x,f=Math.round(c-v.location.x),y=Math.round(u-v.location.y),m=Math.round(v.location.x),_=Math.round(v.location.y))});const S={name:"diagramNodeAdd",diagramType:"gojs",sourcePanelSelector:t,targetPanelSelector:n,sourceIsPalette:!0,targetIsPalette:!1,sourceCategory:o,sourceKey:a,targetDocX:Math.round(c),targetDocY:Math.round(u),anchorKey:h,anchorOffsetX:f,anchorOffsetY:y,anchorDocX:m,anchorDocY:_,signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(S),this._deactivate()}_emitGoJSLinkAdd(e,t,n,o,a){const c={name:"diagramLinkAdd",diagramType:"gojs",panelSelector:a,fromKey:e,toKey:t,fromPort:n,toPort:o,signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(c),this._deactivate()}_hookGoJSDiagramsAlwaysOn(){var a,c;const e=this._recorder.document;if(e.__skyrampGoJSHooked)return;const t=e.defaultView;if(!((c=(a=t==null?void 0:t.go)==null?void 0:a.Diagram)!=null&&c.fromDiv))return;const n=Array.from(e.querySelectorAll("canvas"));if(!n.length)return;const o=new Set;for(const u of n){let h=u.parentElement;for(;h&&h!==e.body;){const f=t.go.Diagram.fromDiv(h);if(f){if(!!!(t.go.Palette&&f instanceof t.go.Palette)&&!o.has(f)){o.add(f);const m=this._buildSelectorFromEl(h),_=S=>{e.__skyrampGojsLinkToolActive||S.subject.each(v=>{if(!(v!=null&&v.data)||v.data.from!==void 0)return;const x=String(v.data.category??""),E=String(v.data.key??""),C=v.location;let L="";try{const R=Array.from(e.querySelectorAll("canvas"));for(const N of R){let V=N.parentElement;for(;V&&V!==e.body;){const I=t.go.Diagram.fromDiv(V);if(I&&t.go.Palette&&I instanceof t.go.Palette){L=this._buildSelectorFromEl(V);break}V=V.parentElement}if(L)break}}catch{}setTimeout(()=>{const R=v.location??C;this._emitGoJSNodeAdd(f,L,m,x,E,(R==null?void 0:R.x)??0,(R==null?void 0:R.y)??0)},0)})},b=S=>{if(e.__skyrampGojsLinkToolActive)return;const v=S.subject;if(!(v!=null&&v.data))return;const x=String(v.data.from??""),E=String(v.data.to??"");!x||!E||this._emitGoJSLinkAdd(x,E,String(v.data.fromPort??""),String(v.data.toPort??""),m)};f.addDiagramListener("ExternalObjectsDropped",_),f.addDiagramListener("LinkDrawn",b),this._goJSAlwaysOnRemovers.push(()=>{try{f.removeDiagramListener("ExternalObjectsDropped",_),f.removeDiagramListener("LinkDrawn",b)}catch{}})}break}h=h.parentElement}}o.size>0&&(e.__skyrampGoJSHooked=!0,console.log("[DragDropTool] always-on GoJS listeners registered on",o.size,"diagram(s)"))}_captureGoJSDrag(){var e,t,n,o,a;if(!(!((e=this._dragState)!=null&&e.source)||!((t=this._dragState)!=null&&t.target)||!((n=this._dragState)!=null&&n.sourcePoint)||!((o=this._dragState)!=null&&o.targetPoint))){try{const c=this._dragState.source,u=this._dragState.target,h=(a=c.ownerDocument)==null?void 0:a.defaultView,f=this._findGoJSContainer(c),y=this._findGoJSContainer(u),m=(f==null?void 0:f.containerSelector)??"",_=(y==null?void 0:y.containerSelector)??"",b=(f==null?void 0:f.isPalette)??!1,S=(y==null?void 0:y.isPalette)??!1;let v="",x="";const E=f==null?void 0:f.diagram;if(E&&(h!=null&&h.go)){const I=c.getBoundingClientRect(),B=this._dragState.sourcePoint.x-I.left,O=this._dragState.sourcePoint.y-I.top;try{const Q=E.transformViewToDoc(new h.go.Point(B,O)),se=E.findPartAt(Q,!1);se!=null&&se.data&&(v=se.data.category??"",x=String(se.data.key??""))}catch{}}let C=0,L=0;const R=y==null?void 0:y.diagram;if(R&&(h!=null&&h.go)){const I=u.getBoundingClientRect(),B=this._dragState.targetPoint.x-I.left,O=this._dragState.targetPoint.y-I.top;try{const Q=R.transformViewToDoc(new h.go.Point(B,O));C=Math.round(Q.x),L=Math.round(Q.y)}catch{}}if(!b&&x===""){this._deactivate();return}const N=c.ownerDocument;if(b&&N.__skyrampGoJSHooked){this._deactivate();return}const V={name:"diagramNodeAdd",diagramType:"gojs",sourcePanelSelector:m,targetPanelSelector:_,sourceIsPalette:b,targetIsPalette:S,sourceCategory:v,sourceKey:x,targetDocX:C,targetDocY:L,signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(V),this._deactivate()}catch(c){console.error("[PW-RECORDER] Error capturing GoJS drag:",c),this._captureCanvasDrag();return}this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}}_isReactFlowElement(e){let t=e;for(;t;){const n=Array.from(t.classList||[]);if(n.includes("react-flow")||n.includes("react-flow__pane")||n.includes("react-flow__viewport"))return!0;t=t.parentElement}return!1}_scopedLikeClick(e,t){var o;const n=this._recorder.injectedScript;try{const a=t.elements??n.querySelectorAll(n.parseSelector(t.selector),e.ownerDocument),c=(o=Ns(n,e,t.selector,a))==null?void 0:o.selector;if(c&&c!==t.selector&&Ts(n,c,e))return{selector:c}}catch(a){console.warn("[PW-RECORDER] drag selector scoping failed; keeping generated selector",t.selector,a)}return{selector:t.selector}}_getSelectorSafeElement(e){var n;let t=e;for(;t;){if((n=t.tagName)==null||n.toLowerCase(),t.namespaceURI==="http://www.w3.org/1999/xhtml")return t;if(t.namespaceURI==="http://www.w3.org/2000/svg"){t=t.parentElement;continue}if(t.hasAttribute("data-testid")||t.hasAttribute("data-item-id")||t.hasAttribute("data-column-id")||t.hasAttribute("draggable"))return t;t=t.parentElement}return e}_isSliderThumb(e){var n,o;const t=typeof e.className=="string"?e.className:((n=e.className)==null?void 0:n.baseVal)||"";return t.includes("MuiSlider-mark")||t.includes("MuiSlider-markLabel")||t.includes("slider-label")||t.includes("slider-mark")?!1:!!(t.includes("MuiSlider-thumb")||e.querySelector('input[type="range"]')||((o=e.tagName)==null?void 0:o.toLowerCase())==="input"&&e.type==="range"||t.includes("slider-thumb")||t.includes("rc-slider-handle")||t.includes("noUi-handle")||e.hasAttribute("role")&&e.getAttribute("role")==="slider")}_findSliderThumb(e){return this._isSliderThumb(e)?e:e.parentElement&&this._isSliderThumb(e.parentElement)?e.parentElement:null}_findSliderRoot(e){var n,o;let t=e;for(let a=0;a<5&&t;a++){const c=typeof t.className=="string"?t.className:((n=t.className)==null?void 0:n.baseVal)||"";if((((o=t.tagName)==null?void 0:o.toLowerCase())||"")==="input"&&t.type==="range"||c.includes("MuiSlider-root")||c.includes("rc-slider")||c.includes("noUi-target")||c.includes("slider-container")||t.hasAttribute("role")&&t.getAttribute("role")==="slider")return t;t=t.parentElement}return null}_shouldIgnoreForSlider(e){var o,a;const t=typeof e.className=="string"?e.className:((o=e.className)==null?void 0:o.baseVal)||"",n=((a=e.tagName)==null?void 0:a.toLowerCase())||"";return!!(t.includes("MuiSlider-markLabel")||t.includes("MuiSlider-mark")||t.includes("MuiSlider-valueLabel")||t.includes("slider-label")||(n==="span"||n==="div")&&!t.includes("MuiSlider-thumb")&&!t.includes("slider-thumb"))}_selectDraggableAncestor(e){var a;const t=["[data-item-id]",'[draggable="true"]',"[data-draggable]",'[role="listitem"]',".draggable",'[data-testid*="drag"]'];let n=e;const o=(a=n.tagName)==null?void 0:a.toLowerCase();(o==="button"||o==="input"||o==="select"||o==="textarea"||o==="a")&&(n=n.parentElement);for(let c=0;c<5&&n;c++){if(n.hasAttribute("data-item-id")||t.some(u=>{var h;return(h=n==null?void 0:n.matches)==null?void 0:h.call(n,u)}))return n;n=n.parentElement}return e}_getSourceColumn(e){const t=e.getAttribute("data-source-column");if(t){const o=this._recorder.document.querySelector(`[data-column-id="${t}"]`);if(o)return o}let n=e;for(let o=0;o<10&&n;o++){if(n.hasAttribute("data-column-id"))return n;n=n.parentElement}return null}_selectDroppableAncestor(e){let t=e;(t.hasAttribute("data-item-id")||t.hasAttribute("draggable"))&&(t=t.parentElement);for(let o=0;o<8&&t;o++){if(t.hasAttribute("data-column-id"))return t;if(t.hasAttribute("data-droppable")&&t.hasAttribute("data-testid")){const a=t.getAttribute("data-testid");if(a&&a.startsWith("column-"))return t}if(t.hasAttribute("data-drop-target-for-element")&&t.hasAttribute("data-testid")){const a=t.getAttribute("data-testid");if(a&&a.startsWith("calendar-cell-"))return t}t=t.parentElement}t=e,(t.hasAttribute("data-item-id")||t.hasAttribute("draggable"))&&(t=t.parentElement);const n=["[data-droppable]","[data-drop-target-for-element]",'[role="list"]','[role="listbox"]','[role="grid"]',".droppable",".drop-zone","[data-drop-zone]",".vue-grid-layout",".react-grid-layout","[data-rbd-droppable-id]","[data-sortable]"];for(let o=0;o<8&&t;o++){if(n.some(a=>{var c;return(c=t==null?void 0:t.matches)==null?void 0:c.call(t,a)}))return t;t=t.parentElement}t=e,(t.hasAttribute("data-item-id")||t.hasAttribute("draggable"))&&(t=t.parentElement);for(let o=0;o<8&&t;o++){if(t.querySelectorAll(':scope > [draggable="true"]').length>=2)return t;t=t.parentElement}return e}_stableIdSelector(e){const t=e.getAttribute("id");return!t||!/^[a-zA-Z]/.test(t)||/\s/.test(t)||!t.split(/[-_]/).every(n=>n.length>0&&/^[a-zA-Z]+$/.test(n))?null:{selector:`#${t}`}}_stableContainerClassSelector(e){const t=["vue-grid-layout","react-grid-layout"];for(const n of t)if(e.classList.contains(n))return{selector:`.${n}`};return null}_extractSourceLabel(e){const t=e.getAttribute("aria-label");if(t&&t.trim())return t.trim().slice(0,80);const o=(e.innerText||e.textContent||"").trim().replace(/\s+/g," ");if(o)return o.slice(0,80);const a=e.getAttribute("title");return a&&a.trim()?a.trim().slice(0,80):""}_capture(){if(!this._dragState||!this._dragState.source||!this._dragState.target||this._dragState.captured)return;if(this._dragState.captured=!0,this._dragState.isReactFlow){this._captureReactFlowDrag();return}if(this._dragState.isGoJS){this._captureGoJSDrag();return}if(this._dragState.isCanvas){this._captureCanvasDrag();return}if(this._dragState.isSlider){this._captureSliderDrag();return}const e=this._getSourceColumn(this._dragState.source),t=this._dragState.target.hasAttribute("data-column-id")?this._dragState.target:this._getSourceColumn(this._dragState.target);e&&t&&(e.getAttribute("data-column-id"),t.getAttribute("data-column-id"));try{const n=this._dragState.source.getAttribute("data-testid")||this._dragState.source.getAttribute("data-item-id"),o=this._dragState.target.getAttribute("data-testid")||this._dragState.target.getAttribute("data-column-id");let a,c;const u=S=>{const v=this._getSelectorSafeElement(S);return this._stableIdSelector(v)??this._stableContainerClassSelector(v)??this._scopedLikeClick(v,this._recorder.injectedScript.generateSelector(v,{testIdAttributeName:this._recorder.state.testIdAttributeName||"data-testid"}))},h=(S,v)=>{const x=`[data-testid="${v}"]`;return Ts(this._recorder.injectedScript,x,S)?{selector:x}:u(S)};n&&o?(a=h(this._dragState.source,n),c=h(this._dragState.target,o)):(a=u(this._dragState.source),c=u(this._dragState.target));const{sourcePoint:f,targetPoint:y}=this._dragState,m=Date.now()-this._dragState.startTime,_={name:"dragTo",selector:a.selector,target:c.selector,signals:[],timestamp:pt(this._recorder)};f&&!f.centered&&(_.sourcePosition=f.offset),y&&!y.centered&&(_.targetPosition=y.offset),m>500&&(_.duration=m);const b=this._extractSourceLabel(this._dragState.source);b&&(_.sourceLabel=b),this._recorder.recordAction(_),this._deactivate()}catch(n){console.error("[PW-RECORDER] Error generating selectors:",n);try{const o=this._dragState.source.getAttribute("data-testid")||this._dragState.source.getAttribute("data-item-id"),a=this._dragState.target.getAttribute("data-testid")||this._dragState.target.getAttribute("data-column-id");if(o&&a){const c={name:"dragTo",selector:`[data-testid="${o}"]`,target:`[data-testid="${a}"]`,signals:[],timestamp:pt(this._recorder)},u=this._extractSourceLabel(this._dragState.source);u&&(c.sourceLabel=u),this._recorder.recordAction(c)}}catch(o){console.error("[PW-RECORDER] Fallback also failed:",o)}this._deactivate()}this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}_roundPosition(e){return{x:Math.round(e.x),y:Math.round(e.y)}}_recordMouseDragActions(e,t,n=10){const o={name:"mouse.move",position:this._roundPosition(e),signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(o);const a={name:"mouse.down",signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(a);const c={name:"mouse.move",position:this._roundPosition(t),steps:n,signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(c);const u={name:"mouse.up",signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(u)}_captureReactFlowDrag(){if(!(!this._dragState||!this._dragState.source||!this._dragState.target)){try{const t=this._dragState.source.getBoundingClientRect(),n=this._dragState.sourcePoint?{x:this._dragState.sourcePoint.x,y:this._dragState.sourcePoint.y}:{x:t.left+t.width/2,y:t.top+t.height/2},o=this._dragState.targetPoint?{x:this._dragState.targetPoint.x,y:this._dragState.targetPoint.y}:{x:t.left+t.width/2,y:t.top+t.height/2};this._recordMouseDragActions(n,o,10)}catch(e){console.error("[PW-RECORDER] Error capturing React Flow drag:",e)}this._deactivate(),this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}}_captureCanvasDrag(){if(!(!this._dragState||!this._dragState.source||!this._dragState.target)){try{const e=this._dragState.source,t=this._scopedLikeClick(e,this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName||"data-testid"})),n=(h,f)=>h?(f===e?h:this._elementOffset(e,h.x,h.y)).offset:{x:e.getBoundingClientRect().width/2,y:e.getBoundingClientRect().height/2},o=n(this._dragState.sourcePoint,e),a=n(this._dragState.targetPoint,this._dragState.target),c=Date.now()-this._dragState.startTime,u={name:"dragTo",selector:t.selector,target:t.selector,sourcePosition:{x:Math.round(o.x),y:Math.round(o.y)},targetPosition:{x:Math.round(a.x),y:Math.round(a.y)},signals:[],timestamp:pt(this._recorder)};c>500&&(u.duration=c),this._recorder.recordAction(u)}catch(e){console.error("[PW-RECORDER] Error capturing canvas drag:",e)}this._deactivate(),this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}}_captureSliderDrag(){if(!(!this._dragState||!this._dragState.source||!this._dragState.sourcePoint||!this._dragState.targetPoint)){try{const e={x:Math.round(this._dragState.sourcePoint.x),y:Math.round(this._dragState.sourcePoint.y)},t={x:Math.round(this._dragState.targetPoint.x),y:Math.round(this._dragState.targetPoint.y)},n=t.x-e.x,o=t.y-e.y,a=Math.sqrt(n*n+o*o),c=Math.max(1,Math.floor(a/hn.PIXELS_PER_STEP)),u=this._dragState.source;let h="",f="";Math.abs(n)>Math.abs(o)?f=n>0?"right":"left":f=o>0?"down":"up";const y=(b,S=new Set)=>{if(S.has(b))return null;S.add(b);const v=b.getAttribute("aria-valuenow"),x=b.getAttribute("aria-valuemin"),E=b.getAttribute("aria-valuemax");if(v)return{value:v,min:x||void 0,max:E||void 0};if(b instanceof HTMLInputElement&&b.type==="range")return{value:b.value,min:b.min||void 0,max:b.max||void 0};const C=Array.from(b.children);for(const L of C)if(!S.has(L)&&(L instanceof HTMLInputElement&&L.type==="range"||L.hasAttribute("aria-valuenow"))){const R=y(L,S);if(R)return R}if(b.parentElement){const L=Array.from(b.parentElement.children);for(const R of L)if(R!==b&&!S.has(R)&&(R instanceof HTMLInputElement&&R.type==="range"||R.hasAttribute("aria-valuenow"))){const N=y(R,S);if(N)return N}if(!S.has(b.parentElement)){const R=b.parentElement.getAttribute("aria-valuenow");if(R)return{value:R,min:b.parentElement.getAttribute("aria-valuemin")||void 0,max:b.parentElement.getAttribute("aria-valuemax")||void 0}}}return null},m=y(u);if(m&&m.value){const b=m.min&&m.max?` (range: ${m.min} to ${m.max})`:"";h=` to value ${m.value}${b}`}const _={name:"comment",text:`Moving slider ${f}${h}`,signals:[],timestamp:pt(this._recorder)};this._recorder.recordAction(_),this._recordMouseDragActions(e,t,c)}catch(e){console.error("[PW-RECORDER] Error capturing slider drag:",e)}this._deactivate(),this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}}};hn.PIXELS_PER_STEP=5,hn.WHEEL_DEBOUNCE_MS=500,hn.WHEEL_MAX_ACCUMULATION_MS=1e3,hn.WHEEL_TOOL_DISABLE_MS=1e3,hn.WHEEL_SCROLL_TIMEOUT_MS=3e3;let Rf=hn;function Ub(i){return i.injectedScript.utils.builtins.Date.now().toString()}class pk{constructor(e){this._diagramEntries=[],this._recorder=e}cursor(){return"crosshair"}install(){console.log("[GoJSLinkTool] install() — document:",this._recorder.document.URL),this._recorder.document.__skyrampGojsLinkToolActive=!0,this._diagramEntries=[];const e=Array.from(this._recorder.document.querySelectorAll("canvas"));console.log("[GoJSLinkTool] found canvases:",e.length);for(const t of e){const n=this._hookDiagram(t);n&&(this._diagramEntries.push(n),console.log("[GoJSLinkTool] hooked diagram, panelSelector:",n.panelSelector))}console.log("[GoJSLinkTool] hooked",this._diagramEntries.length,"diagram(s)")}onKeyDown(e){e.key==="Escape"&&(this._recorder.setMode("recording"),e.preventDefault(),e.stopPropagation())}uninstall(){var e;console.log("[GoJSLinkTool] uninstall() — document:",this._recorder.document.URL),delete this._recorder.document.__skyrampGojsLinkToolActive;for(const t of this._diagramEntries)try{t.diagram.allowMove=t.prevAllowMove;const n=(e=t.diagram.toolManager)==null?void 0:e.linkingTool;n&&(n.isEnabled=t.prevLinkingEnabled),t.diagram.removeDiagramListener("LinkDrawn",t.linkDrawnHandler),t.diagram.removeDiagramListener("ExternalObjectsDropped",t.externalDropHandler),console.log("[GoJSLinkTool] restored diagram, panelSelector:",t.panelSelector)}catch(n){console.log("[GoJSLinkTool] error restoring diagram:",n)}this._diagramEntries=[]}_hookDiagram(e){var o,a,c,u;const t=(o=e.ownerDocument)==null?void 0:o.defaultView;if(!((c=(a=t==null?void 0:t.go)==null?void 0:a.Diagram)!=null&&c.fromDiv))return null;let n=e.parentElement;for(;n&&n!==e.ownerDocument.body;){const h=t.go.Diagram.fromDiv(n);if(h){const f=this._buildSelector(n),y=h.allowMove;h.allowMove=!1;const m=(u=h.toolManager)==null?void 0:u.linkingTool,_=(m==null?void 0:m.isEnabled)??!0;m&&(m.isEnabled=!0,(m.portGravity??0)<10&&(m.portGravity=10));const b=v=>{const x=v.subject;if(!(x!=null&&x.data))return;const E=String(x.data.from??""),C=String(x.data.to??"");!E||!C||(console.log("[GoJSLinkTool] LinkDrawn from:",E,"to:",C),this._emitDiagramLinkAdd(E,C,String(x.data.fromPort??""),String(x.data.toPort??""),f))};h.addDiagramListener("LinkDrawn",b);const S=v=>{v.subject.each(x=>{if(!(x!=null&&x.data)||x.data.from!==void 0)return;const E=String(x.data.category??""),C=String(x.data.key??""),L=x.location;console.log("[GoJSLinkTool] ExternalObjectsDropped category:",E,"key:",C,"loc:",L==null?void 0:L.x,L==null?void 0:L.y),setTimeout(()=>{var R,N;this._emitDiagramNodeAdd(h,f,E,C,((R=x.location)==null?void 0:R.x)??(L==null?void 0:L.x)??0,((N=x.location)==null?void 0:N.y)??(L==null?void 0:L.y)??0)},0)})};return h.addDiagramListener("ExternalObjectsDropped",S),{diagram:h,panelSelector:f,prevAllowMove:y,prevLinkingEnabled:_,linkDrawnHandler:b,externalDropHandler:S}}n=n.parentElement}return null}_emitDiagramLinkAdd(e,t,n,o,a){var u;const c={name:"diagramLinkAdd",diagramType:"gojs",panelSelector:a,fromKey:e,toKey:t,fromPort:n,toPort:o,signals:[],timestamp:Ub(this._recorder)};this._recorder.recordAction(c),(u=this._recorder.overlay)==null||u.flashToolSucceeded("recordingGoJSLink")}_emitDiagramNodeAdd(e,t,n,o,a,c){var x;const u=this._diagramEntries.find(E=>{var C,L,R;try{const N=(L=(C=E.diagram.div)==null?void 0:C.ownerDocument)==null?void 0:L.defaultView;return((R=N==null?void 0:N.go)==null?void 0:R.Palette)&&E.diagram instanceof N.go.Palette}catch{return!1}}),h=(u==null?void 0:u.panelSelector)??"";let f,y,m,_,b,S=1/0;e.nodes.each(E=>{if(!(E!=null&&E.data))return;const C=String(E.data.key??"");if(!C||C===o)return;const L=E.location.x-a,R=E.location.y-c,N=Math.sqrt(L*L+R*R);N<S&&(S=N,f=C,y=Math.round(a-E.location.x),m=Math.round(c-E.location.y),_=Math.round(E.location.x),b=Math.round(E.location.y))});const v={name:"diagramNodeAdd",diagramType:"gojs",sourcePanelSelector:h,targetPanelSelector:t,sourceIsPalette:!0,targetIsPalette:!1,sourceCategory:n,sourceKey:o,targetDocX:Math.round(a),targetDocY:Math.round(c),anchorKey:f,anchorOffsetX:y,anchorOffsetY:m,anchorDocX:_,anchorDocY:b,signals:[],timestamp:Ub(this._recorder)};this._recorder.recordAction(v),(x=this._recorder.overlay)==null||x.flashToolSucceeded("recordingGoJSLink")}_buildSelector(e){if(e.id)return`#${e.id}`;if(e.getAttribute("data-testid"))return`[data-testid="${e.getAttribute("data-testid")}"]`;const t=e.parentElement;if(t){const n=Array.from(t.children).indexOf(e)+1;return`${e.tagName.toLowerCase()}:nth-child(${n})`}return e.tagName.toLowerCase()}}function mk(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function Vb(i){return i.injectedScript.utils.builtins.Date.now().toString()}class yk{constructor(e){this._triggerElement=null,this._triggerSelector=null,this._input=null,this._pendingFiles=[],this._helperOverlay=null,this._recorder=e}cursor(){return"pointer"}install(){const e=this._recorder.injectedScript.window;e.__pwRecorderFileChooserArmed=t=>{if(!(t.input&&t.triggerElement===t.input)){if(this._triggerElement=t.triggerElement,this._input=t.input,this._triggerSelector=t.triggerSelector||null,!this._triggerSelector&&t.triggerElement)try{this._triggerSelector=this._recorder.injectedScript.generateSelector(t.triggerElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1}).selector}catch(n){console.warn("[FileUploadTool] arm-time selector fallback failed:",n)}this._showHelperOverlay("File chooser opening... Please select a file")}},e.__pwRecorderFileChooserResolved=t=>{var n;if(!(t.input&&!this._triggerElement))if(this._pendingFiles=t.files,this._hideHelperOverlay(),this._triggerElement&&t.files.length>0){const o=t.files.map(c=>c.name);let a=this._triggerSelector;if(!a)try{a=this._recorder.injectedScript.generateSelector(this._triggerElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1}).selector}catch(c){console.warn("[FileUploadTool] resolved-time selector generation failed:",c)}if(a){const c={name:"fileChooser",selector:a,files:o,signals:[],timestamp:Vb(this._recorder)};this._recorder.recordAction(c),this._recorder.setMode("recording"),(n=this._recorder.overlay)==null||n.flashToolSucceeded("fileUpload")}else console.warn("[FileUploadTool] no selector available for trigger element; action not recorded")}else console.warn("[FileUploadTool] Missing trigger element or no files selected")},this._showHelperOverlay("Click a button to upload a file")}uninstall(){const e=this._recorder.injectedScript.window;e.__pwRecorderFileChooserArmed=void 0,e.__pwRecorderFileChooserResolved=void 0,this._hideHelperOverlay(),this._triggerElement=null,this._triggerSelector=null,this._input=null,this._pendingFiles=[]}onClick(e){const t=this._getRecordActionTool();!t||!t.onClick||t.onClick(e)}onInput(e){var n;const t=this._recorder.deepEventTarget(e);if(t.nodeName==="INPUT"&&t.type.toLowerCase()==="file"){if(this._triggerElement)return;const o=t,a=this._recorder.injectedScript.generateSelector(o,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});this._recorder.recordAction({name:"setInputFiles",selector:a.selector,signals:[],files:[...o.files||[]].map(c=>c.name),timestamp:Vb(this._recorder)}),this._recorder.setMode("recording"),(n=this._recorder.overlay)==null||n.flashToolSucceeded("fileUpload")}else{const o=this._getRecordActionTool();o&&o.onInput&&o.onInput(e)}}onKeyDown(e){if(e.key==="Escape"){mk(e),this._recorder.setMode("recording");return}const t=this._getRecordActionTool();t&&t.onKeyDown&&t.onKeyDown(e)}onKeyUp(e){const t=this._getRecordActionTool();t&&t.onKeyUp&&t.onKeyUp(e)}onPointerDown(e){const t=this._getRecordActionTool();t&&t.onPointerDown&&t.onPointerDown(e)}onPointerUp(e){const t=this._getRecordActionTool();t&&t.onPointerUp&&t.onPointerUp(e)}onPointerMove(e){const t=this._getRecordActionTool();t&&t.onPointerMove&&t.onPointerMove(e)}onMouseMove(e){const t=this._getRecordActionTool();t&&t.onMouseMove&&t.onMouseMove(e)}onMouseDown(e){const t=this._getRecordActionTool();t&&t.onMouseDown&&t.onMouseDown(e)}onMouseUp(e){const t=this._getRecordActionTool();t&&t.onMouseUp&&t.onMouseUp(e)}onMouseLeave(e){const t=this._getRecordActionTool();t&&t.onMouseLeave&&t.onMouseLeave(e)}onFocus(e){const t=this._getRecordActionTool();t&&t.onFocus&&t.onFocus(e)}_getRecordActionTool(){var e;return((e=this._recorder._tools)==null?void 0:e.recording)||null}_showHelperOverlay(e){this._hideHelperOverlay();const t=this._recorder.document.createElement("div");t.style.cssText=`
|
|
354
|
+
position: fixed;
|
|
355
|
+
top: 20px;
|
|
356
|
+
left: 50%;
|
|
357
|
+
transform: translateX(-50%);
|
|
358
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
359
|
+
color: white;
|
|
360
|
+
padding: 12px 24px;
|
|
361
|
+
border-radius: 8px;
|
|
362
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
363
|
+
z-index: 2147483645;
|
|
364
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
365
|
+
font-size: 14px;
|
|
366
|
+
font-weight: 500;
|
|
367
|
+
pointer-events: none;
|
|
368
|
+
animation: pw-slide-down 0.3s ease-out;
|
|
369
|
+
`,t.textContent=`📎 ${e}`;const n=this._recorder.document.createElement("style");n.textContent=`
|
|
370
|
+
@keyframes pw-slide-down {
|
|
371
|
+
from {
|
|
372
|
+
opacity: 0;
|
|
373
|
+
transform: translateX(-50%) translateY(-20px);
|
|
374
|
+
}
|
|
375
|
+
to {
|
|
376
|
+
opacity: 1;
|
|
377
|
+
transform: translateX(-50%) translateY(0);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
`,this._recorder.document.head.appendChild(n),this._recorder.document.body.appendChild(t),this._helperOverlay=t}_hideHelperOverlay(){this._helperOverlay&&(this._helperOverlay.remove(),this._helperOverlay=null)}}function Fb(i,e,t,n){return i.addEventListener(e,t,n),()=>{i.removeEventListener(e,t,n)}}function _k(i,e){const t=i.injectedScript.window,n=i.document;let o=null,a=null,c=0;const u=new WeakSet;e.push(Fb(n,"click",S=>{var E;const v=S,x=i.deepEventTarget(v);if(v.isTrusted&&!(x.nodeName==="INPUT"&&x.type.toLowerCase()==="file")){o=x,c=Date.now();try{a=i.injectedScript.generateSelector(x,{testIdAttributeName:(E=i.state)==null?void 0:E.testIdAttributeName,multiple:!1}).selector}catch(C){console.warn("[PW-FileUpload] click-capture selector generation failed:",C),a=null}}},!0));const h=S=>{if(u.has(S)||S.type!=="file")return;u.add(S);const v=S.click;S.click=function(){return t.__pwRecorderFileChooserArmed&&t.__pwRecorderFileChooserArmed({triggerElement:o,triggerSelector:a,input:this,timestamp:c}),v.apply(this,arguments)},Fb(S,"change",()=>{const x=Array.from(S.files||[]).map(E=>({name:E.name,size:E.size,type:E.type,lastModified:E.lastModified}));t.__pwRecorderFileChooserResolved&&x.length>0&&t.__pwRecorderFileChooserResolved({files:x,input:S})},!0)},f=HTMLInputElement.prototype.click;HTMLInputElement.prototype.click=function(){return this.type==="file"&&(h(this),t.__pwRecorderFileChooserArmed&&t.__pwRecorderFileChooserArmed({triggerElement:o,triggerSelector:a,input:this,timestamp:c})),f.apply(this,arguments)};const y=Document.prototype.createElement;Document.prototype.createElement=function(S,v){const x=y.call(this,S,v);return x instanceof HTMLInputElement&&x.type==="file"&&h(x),x};const m=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"type");if(m&&m.set){const S=m.set;Object.defineProperty(HTMLInputElement.prototype,"type",{...m,set(v){const x=S.call(this,v);return String(v).toLowerCase()==="file"&&h(this),x}})}if("showOpenFilePicker"in t){const S=t.showOpenFilePicker;t.showOpenFilePicker=async function(...v){t.__pwRecorderFileChooserArmed&&t.__pwRecorderFileChooserArmed({triggerElement:o,triggerSelector:a,input:null,timestamp:c});const x=await S.apply(this,v),E=[];try{for(const C of x){const L=await C.getFile();E.push({name:L.name,size:L.size,type:L.type,lastModified:L.lastModified})}}catch(C){console.warn("[PW-FileUpload] Failed to extract file metadata from handles:",C);for(const L of x)E.push({name:L.name||"unknown"})}return t.__pwRecorderFileChooserResolved&&E.length>0&&t.__pwRecorderFileChooserResolved({files:E,input:null}),x}}n.querySelectorAll('input[type="file"]').forEach(S=>{h(S)});const b=new MutationObserver(S=>{for(const v of S)for(const x of v.addedNodes)x instanceof HTMLInputElement&&x.type==="file"&&h(x),x instanceof Element&&x.querySelectorAll('input[type="file"]').forEach(C=>{h(C)})});b.observe(n,{childList:!0,subtree:!0}),e.push(()=>{b.disconnect()})}function na(i){return i.injectedScript.utils.builtins.Date.now().toString()}class bk{constructor(e){this._isDeleting=!1,this._viewportPath=[],this._lastPointTime=0,this.POINT_THROTTLE_MS=33,this.MIN_DISTANCE=5,this._recorder=e}cursor(){return"pointer"}install(){var e;(e=this._recorder.injectedScript.document.body)==null||e.classList.add("pw-sketch-tool-cursor"),this._createOverlayCanvas()}uninstall(){var e;(e=this._recorder.injectedScript.document.body)==null||e.classList.remove("pw-sketch-tool-cursor"),this._removeOverlayCanvas(),this._isDeleting=!1,this._viewportPath=[]}onPointerDown(e){if(e.button!==0)return;const t=this._recorder.deepEventTarget(e);return this._isDeleting=!0,this._viewportPath=[],this._addPoint(e),this._clearOverlayPath(),this._dispatchRealMouseEvent("mousedown",e,t),!0}onPointerMove(e){if(!this._isDeleting)return;const t=this._recorder.deepEventTarget(e);this._dispatchRealMouseEvent("mousemove",e,t);const n=this._recorder.injectedScript.utils.builtins.Date.now();if(!(n-this._lastPointTime<this.POINT_THROTTLE_MS)&&this._viewportPath.length>0){const o=this._viewportPath[this._viewportPath.length-1];Math.hypot(e.clientX-o.x,e.clientY-o.y)>=this.MIN_DISTANCE&&(this._addPoint(e),this._lastPointTime=n,this._updateOverlayPath())}}onPointerUp(e){var n;if(!this._isDeleting)return;const t=this._recorder.deepEventTarget(e);this._dispatchRealMouseEvent("mouseup",e,t),this._isDeleting=!1,this._viewportPath.length>1&&(this._addPoint(e),this._recordSketchToolAsMouseActions(),(n=this._recorder.overlay)==null||n.flashToolSucceeded("recordingSketchTool")),this._clearOverlayPath(),this._viewportPath=[]}onMouseDown(e){}onMouseUp(e){}onClick(e){}_addPoint(e){this._viewportPath.push({x:Math.round(e.clientX),y:Math.round(e.clientY)})}_recordSketchToolAsMouseActions(){const e=this._optimizePath(this._viewportPath);if(e.length===0)return;const t={name:"comment",text:`Sketch tool with ${e.length} path points`,signals:[],timestamp:na(this._recorder)};this._recorder.recordAction(t);const o={name:"mouse.move",position:e[0],signals:[],timestamp:na(this._recorder)};this._recorder.recordAction(o);const a={name:"mouse.down",signals:[],timestamp:na(this._recorder)};this._recorder.recordAction(a);for(let u=1;u<e.length;u++){const h=e[u],f=e[u-1],y=h.x-f.x,m=h.y-f.y,_=Math.sqrt(y*y+m*m),b=Math.max(1,Math.floor(_/5)),S={name:"mouse.move",position:h,steps:b,signals:[],timestamp:na(this._recorder)};this._recorder.recordAction(S)}const c={name:"mouse.up",signals:[],timestamp:na(this._recorder)};this._recorder.recordAction(c)}_optimizePath(e){if(e.length<5)return e;const t=this._douglasPeucker(e,2);return t.length<5?this._douglasPeuckerWithMinPoints(e,5):t}_douglasPeucker(e,t){if(e.length<=2)return e;let n=0,o=0;for(let a=1;a<e.length-1;a++){const c=this._perpendicularDistance(e[a],e[0],e[e.length-1]);c>n&&(n=c,o=a)}if(n>t){const a=this._douglasPeucker(e.slice(0,o+1),t),c=this._douglasPeucker(e.slice(o),t);return[...a.slice(0,-1),...c]}else return[e[0],e[e.length-1]]}_douglasPeuckerWithMinPoints(e,t){if(e.length<=t)return e;let n=10,o=this._douglasPeucker(e,n),a=10,c=0;for(;a-c>.1&&o.length!==t;)n=(a+c)/2,o=this._douglasPeucker(e,n),o.length<t?a=n:o.length>t&&(c=n);return o.length<t&&(o=this._sampleEvenly(e,t)),o}_sampleEvenly(e,t){if(e.length<=t)return e;const n=[e[0]],o=(e.length-1)/(t-1);for(let a=1;a<t-1;a++){const c=Math.round(a*o);n.push(e[c])}return n.push(e[e.length-1]),n}_perpendicularDistance(e,t,n){const o=n.x-t.x,a=n.y-t.y;if(o===0&&a===0)return Math.hypot(e.x-t.x,e.y-t.y);const c=Math.hypot(o,a);return Math.abs(a*e.x-o*e.y+n.x*t.y-n.y*t.x)/c}_createOverlayCanvas(){const e=this._recorder.injectedScript.document;this._overlayCanvas=e.createElementNS("http://www.w3.org/2000/svg","svg"),this._overlayCanvas.classList.add("pw-deletion-trail"),this._overlayCanvas.style.position="fixed",this._overlayCanvas.style.top="0",this._overlayCanvas.style.left="0",this._overlayCanvas.style.width="100%",this._overlayCanvas.style.height="100%",this._overlayCanvas.style.pointerEvents="none",this._overlayCanvas.style.zIndex="2147483646",this._overlayPath=e.createElementNS("http://www.w3.org/2000/svg","path"),this._overlayPath.classList.add("pw-deletion-path"),this._overlayPath.setAttribute("stroke","rgba(220, 53, 69, 0.5)"),this._overlayPath.setAttribute("stroke-width","20"),this._overlayPath.setAttribute("stroke-linecap","round"),this._overlayPath.setAttribute("stroke-linejoin","round"),this._overlayPath.setAttribute("fill","none"),this._overlayCanvas.appendChild(this._overlayPath),e.body&&e.body.appendChild(this._overlayCanvas)}_removeOverlayCanvas(){this._overlayCanvas&&(this._overlayCanvas.remove(),this._overlayCanvas=void 0,this._overlayPath=void 0)}_updateOverlayPath(){if(!this._overlayPath||this._viewportPath.length<2)return;const e=this._viewportPath.reduce((t,n,o)=>`${t} ${o===0?"M":"L"}${n.x},${n.y}`,"");this._overlayPath.setAttribute("d",e)}_clearOverlayPath(){this._overlayPath&&this._overlayPath.setAttribute("d","")}_dispatchRealMouseEvent(e,t,n){const o=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:this._recorder.injectedScript.window,detail:t.detail,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons,relatedTarget:t.relatedTarget});n.dispatchEvent(o)}}function jn(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function vk(i){return i.injectedScript.utils.builtins.Date.now().toString()}class Sk{constructor(e){this._hoveredTable=null,this._highlightModel=null,this._captured=!1,this._recorder=e}cursor(){return"crosshair"}install(){var e;(e=this._recorder.injectedScript.document.body)==null||e.setAttribute("data-pw-cursor","crosshair"),this._captured=!1}uninstall(){this._hoveredTable=null,this._highlightModel=null,this._captured=!1,this._recorder.clearHighlight()}onKeyDown(e){this._captured||e.key==="Escape"&&(jn(e),this._hoveredTable=null,this._highlightModel=null,this._recorder.clearHighlight(),this._recorder.setMode("recording"))}onMouseMove(e){if(this._captured)return;jn(e);const t=this._findTableFromEvent(e);t!==this._hoveredTable&&(this._hoveredTable=t,this._updateHighlight(t))}onMouseEnter(e){this._captured||jn(e)}onMouseLeave(e){if(this._captured)return;jn(e);const t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredTable=null,this._highlightModel=null,this._recorder.clearHighlight())}onClick(e){if(!this._captured){if(e.button!==0){jn(e);return}this._hoveredTable&&(jn(e),this._captureTableSnapshot(this._hoveredTable))}}onPointerDown(e){this._captured||jn(e)}onPointerUp(e){this._captured||jn(e)}onMouseDown(e){this._captured||jn(e)}onMouseUp(e){this._captured||jn(e)}_findTableFromEvent(e){let t=this._recorder.deepEventTarget(e);for(;t;){if(t.tagName==="TABLE")return t;t=t.parentElement}return null}_updateHighlight(e){if(!e){this._recorder.clearHighlight();return}const t=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});this._highlightModel={selector:t.selector,elements:t.elements,tooltipText:"Click to assert table cell",color:"#4CAF5080"},this._recorder.updateHighlight(this._highlightModel,!0)}_captureTableSnapshot(e){var a;const t=this._extractTableData(e),o={name:"tableSnapshot",selector:this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}).selector,tableData:t,signals:[],timestamp:vk(this._recorder)};this._recorder.recordAction(o),this._captured=!0,this._recorder.clearHighlight(),this._recorder.setMode("recording"),(a=this._recorder.overlay)==null||a.flashToolSucceeded("recordingTableSnapshot")}_extractTableData(e){const t={headers:[],rows:[],metadata:{rowCount:0,columnCount:0,hasHeaders:!1,captureTime:new Date().toISOString()}},n=e.querySelector("thead");if(n){const c=n.querySelector("tr");c&&(t.headers=Array.from(c.querySelectorAll("th, td")).map(u=>this._getCellText(u)),t.metadata.hasHeaders=!0)}const a=(e.querySelector("tbody")||e).querySelectorAll("tr");return t.rows=Array.from(a).map(c=>Array.from(c.querySelectorAll("th, td")).map(u=>({text:this._getCellText(u),isHeader:u.tagName==="TH"}))),t.metadata.rowCount=t.rows.length,t.metadata.columnCount=Math.max(t.headers.length,...t.rows.map(c=>c.length)),t}_getCellText(e){var t;return((t=e.innerText)==null?void 0:t.trim())||""}}function wk(i){return i.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function xk(i){const e=i.rowKey;if(e&&e.value){const t=wk(e.value);return`tr:has(${`${e.tag}:nth-child(${e.colIndex+1}):is(:text-is("${t}"), :has(:text-is("${t}")))`})`}return`tr:nth-child(${i.rowIndex+1})`}function Tk(i){const e=xk(i),t=`${i.cellTag}:nth-child(${i.colIndex+1})`,n=`tbody ${e} ${t}`;let o=i.tablePrefix?`${i.tablePrefix} ${n}`:n;return i.isInput&&(o+=" input"),o}function Ek(i){return i.injectedScript.utils.builtins.Date.now().toString()}class Ak{constructor(e){this._highlightedCell=null,this._cellHighlight=null,this._assertModal=null,this._recorder=e}cursor(){return"pointer"}install(){var e;(e=this._recorder.injectedScript.document.body)==null||e.setAttribute("data-pw-cursor","pointer")}ownsEventTarget(e){var t;return!!((t=this._assertModal)!=null&&t.contains(e))}uninstall(){this._removeHighlight(),this._removeModal()}cleanup(){this.uninstall()}onPointerMove(e){const t=this._getCellUnderPointer(e);t&&t!==this._highlightedCell?(this._highlightedCell=t,this._showCellHighlight(t,!0)):!t&&this._highlightedCell&&(this._removeHighlight(),this._highlightedCell=null)}onPointerDown(e){const t=this._getCellUnderPointer(e);t&&(e.preventDefault(),e.stopPropagation(),this._showCellHighlight(t,!1),this._showAssertModal(t))}_getCellUnderPointer(e){const t=e.target;return this._isTableCell(t)?t:t.closest("td, th")}_isTableCell(e){if(!e)return!1;const t=e.tagName.toLowerCase();return t==="td"||t==="th"}_findTable(e){return e.closest("table")}_getCellPosition(e){const t=e.closest("tr"),n=this._findTable(e);if(!t||!n)return{row:0,col:0};const o=n.querySelector("tbody"),c=(o?Array.from(o.querySelectorAll("tr")):Array.from(n.querySelectorAll("tr"))).indexOf(t),h=Array.from(t.querySelectorAll("td, th")).indexOf(e);return{row:c,col:h}}_getRowKey(e,t){const n=Array.from(t.querySelectorAll("td, th")),o=_=>{var b;return((b=_.innerText)==null?void 0:b.trim())||""},a=_=>/^\d+$/.test(_);let c=n.findIndex(_=>o(_)!==""&&!a(o(_)));if(c===-1&&(c=n.findIndex(_=>o(_)!=="")),c===-1)return null;const u=n[c],h=o(u),f=e.querySelector("tbody");return(f?Array.from(f.querySelectorAll("tr")):Array.from(e.querySelectorAll("tr"))).filter(_=>{const b=Array.from(_.querySelectorAll("td, th"))[c];return b&&o(b)===h}).length!==1?null:{tag:u.tagName.toLowerCase(),colIndex:c,value:h}}_showCellHighlight(e,t){this._removeHighlight();const n=this._recorder.injectedScript.document,o=e.getBoundingClientRect();if(this._cellHighlight=n.createElement("div"),this._cellHighlight.style.cssText=`
|
|
381
|
+
position: fixed;
|
|
382
|
+
left: ${o.left}px;
|
|
383
|
+
top: ${o.top}px;
|
|
384
|
+
width: ${o.width}px;
|
|
385
|
+
height: ${o.height}px;
|
|
386
|
+
outline: 2px ${t?"dashed":"solid"} #4285f4;
|
|
387
|
+
outline-offset: -2px;
|
|
388
|
+
background-color: rgba(66, 133, 244, ${t?.05:.15});
|
|
389
|
+
pointer-events: none;
|
|
390
|
+
z-index: 2147483646;
|
|
391
|
+
transition: all 0.15s ease;
|
|
392
|
+
`,!t){const a=n.createElement("div");a.textContent="✓",a.style.cssText=`
|
|
393
|
+
position: absolute;
|
|
394
|
+
top: 2px;
|
|
395
|
+
right: 2px;
|
|
396
|
+
font-size: 14px;
|
|
397
|
+
color: #4285f4;
|
|
398
|
+
font-weight: bold;
|
|
399
|
+
`,this._cellHighlight.appendChild(a)}n.body.appendChild(this._cellHighlight)}_removeHighlight(){this._cellHighlight&&(this._cellHighlight.remove(),this._cellHighlight=null)}_showAssertModal(e){var S;this._removeModal();const t=this._recorder.injectedScript.document;let n="";const o=e.querySelector("input");o?n=o.value||"":n=((S=e.innerText)==null?void 0:S.trim())||"";const a=this._getCellPosition(e),c=t.createElement("div");c.style.cssText=`
|
|
400
|
+
position: fixed;
|
|
401
|
+
top: 0;
|
|
402
|
+
left: 0;
|
|
403
|
+
width: 100%;
|
|
404
|
+
height: 100%;
|
|
405
|
+
background: rgba(0, 0, 0, 0.5);
|
|
406
|
+
z-index: 2147483646;
|
|
407
|
+
display: flex;
|
|
408
|
+
align-items: center;
|
|
409
|
+
justify-content: center;
|
|
410
|
+
`;const u=t.createElement("div");u.style.cssText=`
|
|
411
|
+
background: white;
|
|
412
|
+
border-radius: 8px;
|
|
413
|
+
padding: 24px;
|
|
414
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
|
415
|
+
max-width: 500px;
|
|
416
|
+
min-width: 400px;
|
|
417
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
418
|
+
`,u.innerHTML=`
|
|
419
|
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;">
|
|
420
|
+
<h3 style="margin: 0; font-size: 18px; font-weight: 600; color: #202124;">Assert Cell Value</h3>
|
|
421
|
+
<button id="pw-modal-close" style="border: none; background: none; font-size: 24px; cursor: pointer; color: #5f6368; padding: 0; width: 24px; height: 24px; line-height: 24px;">×</button>
|
|
422
|
+
</div>
|
|
423
|
+
<div style="margin-bottom: 16px;">
|
|
424
|
+
<div style="font-size: 13px; color: #5f6368; margin-bottom: 4px;">Cell: Row ${a.row+1}, Column ${a.col+1}</div>
|
|
425
|
+
<div style="font-size: 13px; color: #5f6368; margin-bottom: 12px;">Current Value: "${n}"</div>
|
|
426
|
+
</div>
|
|
427
|
+
<div style="margin-bottom: 16px;">
|
|
428
|
+
<label style="display: block; font-size: 14px; font-weight: 500; color: #202124; margin-bottom: 8px;">Expected Value:</label>
|
|
429
|
+
<input
|
|
430
|
+
id="pw-expected-value"
|
|
431
|
+
type="text"
|
|
432
|
+
value="${n.replace(/"/g,""")}"
|
|
433
|
+
style="width: 100%; padding: 10px 12px; border: 1px solid #dadce0; border-radius: 4px; font-size: 14px; box-sizing: border-box;"
|
|
434
|
+
placeholder="Enter expected text..."
|
|
435
|
+
/>
|
|
436
|
+
</div>
|
|
437
|
+
<div style="display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px;">
|
|
438
|
+
<button id="pw-modal-cancel" style="padding: 8px 16px; border: 1px solid #dadce0; background: white; color: #1a73e8; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500;">Cancel</button>
|
|
439
|
+
<button id="pw-modal-confirm" style="padding: 8px 16px; border: none; background: #1a73e8; color: white; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500;">Add Assertion</button>
|
|
440
|
+
</div>
|
|
441
|
+
`,c.appendChild(u),t.body.appendChild(c),this._assertModal=c;const h=u.querySelector("#pw-expected-value");h==null||h.focus(),h==null||h.select();const f=u.querySelector("#pw-modal-close"),y=u.querySelector("#pw-modal-cancel"),m=u.querySelector("#pw-modal-confirm"),_=()=>{this._removeModal(),this._removeHighlight(),this._recorder.setMode("recording")},b=()=>{const v=(h==null?void 0:h.value)||n;this._generateAssertion(e,v),_()};f==null||f.addEventListener("click",_),y==null||y.addEventListener("click",_),m==null||m.addEventListener("click",b),h==null||h.addEventListener("keydown",v=>{v.key==="Enter"?(v.preventDefault(),b()):v.key==="Escape"&&(v.preventDefault(),_())}),c.addEventListener("click",v=>{v.target===c&&_()})}_removeModal(){this._assertModal&&(this._assertModal.remove(),this._assertModal=null)}_generateAssertion(e,t){var S;const n=this._findTable(e);if(!n){console.log("[TableAssertTool] No table found for cell");return}const o=this._getCellPosition(e);console.log("[TableAssertTool] Cell position:",o);const c=!!e.querySelector("input"),u=n.getAttribute(`data-${this._recorder.state.testIdAttributeName}`)||n.getAttribute("data-testid"),h=n.id;let f="";u?f=`[data-testid="${u}"]`:h&&(f=`#${h}`);const y=e.closest("tr"),m=y?this._getRowKey(n,y):null,_=Tk({tablePrefix:f,cellTag:e.tagName.toLowerCase(),colIndex:o.col,rowIndex:o.row,rowKey:m,isInput:c});console.log("[TableAssertTool] Generated selector:",_,"isInput:",c,"rowKey:",m==null?void 0:m.value);const b={name:"assertTableCell",selector:_,text:t,position:o,isInput:c,signals:[],timestamp:Ek(this._recorder)};console.log("[TableAssertTool] Recording action:",b),this._recorder.recordAction(b),(S=this._recorder.overlay)==null||S.flashToolSucceeded("assertingTableCell")}}const Ck=new Set(["canvas","img","video"]),tf={snapshot:"#9c7fe480"};function ia(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function sa(i){return i.injectedScript.utils.builtins.Date.now().toString()}function nc(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}class Gi{constructor(e){this._glassOverlay=null,this._marquee=null,this._dragStart=null,this._dragCurrent=null,this._isDragging=!1,this._hoverHighlight=null,this._listeners=[],this._syntheticHighlightEl=null,this.DOUBLE_TOGGLE_TIMEOUT=1500,this.DRAG_THRESHOLD=8,this.VIEWPORT_THRESHOLD=.8,this._recorder=e}static async getNextCounter(e,t){try{if(typeof e.injectedScript.window.__pw_recorderIncrementCounter=="function")return await e.injectedScript.window.__pw_recorderIncrementCounter(t)}catch(n){console.error("Failed to get counter from server:",n)}return Date.now()%1e3}cursor(){return this._isDragging?"crosshair":"pointer"}install(){var e;this._createGlassOverlay(),(e=this._recorder.injectedScript.document.body)==null||e.setAttribute("data-pw-cursor","pointer")}uninstall(){var e;this._removeGlassOverlay(),this._removeMarquee(),this._cleanup(),(e=this._recorder.injectedScript.document.body)==null||e.removeAttribute("data-pw-cursor")}cleanup(){this._cleanup()}_cleanup(){this._listeners.forEach(e=>e()),this._listeners=[],this._hoverHighlight&&this._recorder&&(this._recorder.updateHighlight(null,!1),this._hoverHighlight=null),this._cleanupSyntheticHighlight(),this._dragStart=null,this._dragCurrent=null,this._isDragging=!1}_cleanupSyntheticHighlight(){this._syntheticHighlightEl&&(this._syntheticHighlightEl.remove(),this._syntheticHighlightEl=null)}onKeyDown(e){e.key==="Escape"&&(ia(e),this._cancelSnapshot())}_createGlassOverlay(){const e=this._recorder.injectedScript.document;this._glassOverlay=e.createElement("x-pw-glass"),this._glassOverlay.style.cssText=`
|
|
442
|
+
position: fixed !important;
|
|
443
|
+
top: 0 !important;
|
|
444
|
+
left: 0 !important;
|
|
445
|
+
right: 0 !important;
|
|
446
|
+
bottom: 0 !important;
|
|
447
|
+
z-index: 2147483646 !important;
|
|
448
|
+
background: rgba(0, 120, 215, 0.05) !important;
|
|
449
|
+
cursor: pointer !important;
|
|
450
|
+
pointer-events: auto !important;
|
|
451
|
+
`,this._listeners.push(nc(this._glassOverlay,"pointerdown",t=>this._onGlassPointerDown(t),!0)),this._listeners.push(nc(this._glassOverlay,"pointermove",t=>this._onGlassPointerMove(t),!0)),this._listeners.push(nc(this._glassOverlay,"pointerup",t=>this._onGlassPointerUp(t),!0)),this._listeners.push(nc(this._glassOverlay,"click",t=>ia(t),!0)),e.body&&e.body.appendChild(this._glassOverlay)}_removeGlassOverlay(){this._glassOverlay&&(this._glassOverlay.remove(),this._glassOverlay=null)}_createMarquee(){if(this._marquee)return;const e=this._recorder.injectedScript.document;this._marquee=e.createElement("x-pw-marquee"),this._marquee.style.cssText=`
|
|
452
|
+
position: fixed !important;
|
|
453
|
+
border: 2px dashed #0078d7 !important;
|
|
454
|
+
background: rgba(0, 120, 215, 0.1) !important;
|
|
455
|
+
z-index: 2147483647 !important;
|
|
456
|
+
pointer-events: none !important;
|
|
457
|
+
`,e.body.appendChild(this._marquee)}_updateMarquee(){if(!this._marquee||!this._dragStart||!this._dragCurrent)return;const e=Math.min(this._dragStart.x,this._dragCurrent.x),t=Math.min(this._dragStart.y,this._dragCurrent.y),n=Math.max(this._dragStart.x,this._dragCurrent.x),o=Math.max(this._dragStart.y,this._dragCurrent.y);this._marquee.style.left=e+"px",this._marquee.style.top=t+"px",this._marquee.style.width=n-e+"px",this._marquee.style.height=o-t+"px"}_removeMarquee(){this._marquee&&(this._marquee.remove(),this._marquee=null)}_onGlassPointerDown(e){ia(e),this._dragStart={x:e.clientX,y:e.clientY},this._dragCurrent=this._dragStart}_onGlassPointerMove(e){if(ia(e),!this._dragStart){this._updateHoverHighlight(e);return}this._dragCurrent={x:e.clientX,y:e.clientY},Math.hypot(this._dragCurrent.x-this._dragStart.x,this._dragCurrent.y-this._dragStart.y)>=this.DRAG_THRESHOLD&&!this._isDragging&&(this._isDragging=!0,this._createMarquee(),this._glassOverlay&&(this._glassOverlay.style.cursor="crosshair")),this._isDragging?this._updateMarquee():this._updateHoverHighlight(e)}async _onGlassPointerUp(e){ia(e),this._isDragging?await this._captureRegionSnapshot():this._dragStart&&await this._captureClickSnapshot(e),this._recorder.setMode("recording")}_updateHoverHighlight(e){var a,c,u,h;if(!this._recorder)return;this._glassOverlay&&(this._glassOverlay.style.display="none");const t=this._recorder.document.elementFromPoint(e.clientX,e.clientY);if(this._glassOverlay&&(this._glassOverlay.style.display=""),!t)return;if(((a=t.tagName)==null?void 0:a.toLowerCase())==="iframe"){const f=t;try{const y=f.getBoundingClientRect(),m=f.contentDocument;if(m){const _=[{iframe:f,selector:this._generateStableSelector(f)}],b=e.clientX-y.left,S=e.clientY-y.top,v=this._findGoJSDiagramRecursive(_,m,b,S,y.left,y.top);if(v){const E=v.containerEl.getBoundingClientRect(),C=v.accOffsetX+E.left,L=v.accOffsetY+E.top;if(this._syntheticHighlightEl){const I=this._syntheticHighlightEl.style;if(I.left===`${C}px`&&I.top===`${L}px`)return}this._cleanupSyntheticHighlight();const R=this._recorder.document,N=R.createElement("x-pw-gojs-highlight");N.style.cssText=["position: fixed","pointer-events: none","z-index: -1",`left: ${C}px`,`top: ${L}px`,`width: ${E.width}px`,`height: ${E.height}px`].join(" !important; ")+" !important;",(c=R.body)==null||c.appendChild(N),this._syntheticHighlightEl=N;const V=this._recorder.injectedScript.generateSelector(f,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:V.selector,elements:[N],color:tf.snapshot,tooltipText:"GoJS diagram (iframe)"},this._recorder.updateHighlight(this._hoverHighlight,!0);return}const x=this._findElementInIframeRecursive(_,m,b,S,y.left,y.top);if(x){const E=x.element.getBoundingClientRect(),C=x.accOffsetX+E.left,L=x.accOffsetY+E.top;if(this._syntheticHighlightEl){const I=this._syntheticHighlightEl.style;if(I.left===`${C}px`&&I.top===`${L}px`)return}this._cleanupSyntheticHighlight();const R=this._recorder.document,N=R.createElement("x-pw-gojs-highlight");N.style.cssText=["position: fixed","pointer-events: none","z-index: -1",`left: ${C}px`,`top: ${L}px`,`width: ${E.width}px`,`height: ${E.height}px`].join(" !important; ")+" !important;",(u=R.body)==null||u.appendChild(N),this._syntheticHighlightEl=N;const V=this._generateStableSelector(x.element);this._hoverHighlight={selector:V,elements:[N],color:tf.snapshot,tooltipText:"Element (iframe)"},this._recorder.updateHighlight(this._hoverHighlight,!0);return}}}catch{}this._cleanupSyntheticHighlight()}else this._cleanupSyntheticHighlight();const n=this._resolvePdfTarget(t)||t;if(((h=this._hoverHighlight)==null?void 0:h.elements[0])===n)return;const o=this._recorder.injectedScript.generateSelector(n,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:o.selector,elements:o.elements,color:tf.snapshot},this._recorder.updateHighlight(this._hoverHighlight,!0)}async _captureClickSnapshot(e){var y;const t=this._glassOverlay&&this._glassOverlay.style.display!=="none";this._glassOverlay&&(this._glassOverlay.style.display="none");const n=this._recorder.document.elementFromPoint(e.clientX,e.clientY);if(this._glassOverlay&&t&&(this._glassOverlay.style.display=""),!n)return;if(((y=n.tagName)==null?void 0:y.toLowerCase())==="iframe"){const m=n;try{const _=m.getBoundingClientRect(),b=m.contentDocument;if(b){const S=[{iframe:m,selector:this._generateStableSelector(m)}],v=e.clientX-_.left,x=e.clientY-_.top,E=this._findGoJSDiagramRecursive(S,b,v,x,_.left,_.top);if(E){await this._captureGoJsDiagramSnapshot(E.iframeChain,E.diagramSelector);return}const C=this._findElementInIframeRecursive(S,b,v,x,_.left,_.top);if(C){await this._captureIframeElementSnapshot(C.iframeChain,C.element);return}}}catch{}await this._captureElementSnapshot(m);return}const o=e.altKey,c=e.shiftKey&&n.parentElement?n.parentElement:n,h=this._resolvePdfTarget(c)||c;o||!this._isExplicitlyScopedTarget(h)&&this._shouldCapturePageSnapshot(h)?await this._capturePageSnapshot():await this._captureElementSnapshot(h)}_resolvePdfTarget(e){const t=e.closest("[data-page-number]");return t||null}_isExplicitlyScopedTarget(e){return e.matches("[data-page-number]")||Ck.has(e.tagName.toLowerCase())}_shouldCapturePageSnapshot(e,t){var h;const n=(h=e.tagName)==null?void 0:h.toLowerCase();if(n==="html"||n==="body")return!0;const o=t??this._recorder.injectedScript.window,a=e.getBoundingClientRect(),c=o.innerWidth*o.innerHeight;return a.width*a.height>=c*this.VIEWPORT_THRESHOLD}_buildSelectorFromEl(e){if(e.id)return`#${e.id}`;const t=e.getAttribute("data-testid");if(t)return`[data-testid="${t}"]`;const n=e.parentElement;if(n){const o=Array.from(n.children).indexOf(e)+1;return`${e.tagName.toLowerCase()}:nth-child(${o})`}return e.tagName.toLowerCase()}_findGoJSDiagramRecursive(e,t,n,o,a,c){var _,b,S;const u=t.querySelector("x-pw-glass");u&&(u.style.display="none");let h=null;try{h=t.elementFromPoint(n,o)}catch{return u&&(u.style.display=""),null}if(u&&(u.style.display=""),!h)return null;if(((_=h.tagName)==null?void 0:_.toLowerCase())==="iframe"){const v=h;try{const x=v.contentDocument;if(!x)return null;const E=v.getBoundingClientRect();return this._findGoJSDiagramRecursive([...e,{iframe:v,selector:this._generateStableSelector(v)}],x,n-E.left,o-E.top,a+E.left,c+E.top)}catch{return null}}const f=t.defaultView;if(!((S=(b=f==null?void 0:f.go)==null?void 0:b.Diagram)!=null&&S.fromDiv))return null;const y=t.body;let m=h;for(;m&&m!==y;){if(f.go.Diagram.fromDiv(m))return{containerEl:m,diagramSelector:this._buildSelectorFromEl(m),iframeChain:e,accOffsetX:a,accOffsetY:c};m=m.parentElement}return null}_findElementInIframeRecursive(e,t,n,o,a,c){var f;const u=t.querySelector("x-pw-glass");u&&(u.style.display="none");let h=null;try{h=t.elementFromPoint(n,o)}catch{return u&&(u.style.display=""),null}if(u&&(u.style.display=""),!h)return null;if(((f=h.tagName)==null?void 0:f.toLowerCase())==="iframe"){const y=h;try{const m=y.contentDocument;if(!m)return null;const _=y.getBoundingClientRect();return this._findElementInIframeRecursive([...e,{iframe:y,selector:this._generateStableSelector(y)}],m,n-_.left,o-_.top,a+_.left,c+_.top)}catch{return null}}return{element:h,iframeChain:e,document:t,accOffsetX:a,accOffsetY:c}}_generateStableSelector(e){var t;try{const n=(t=e.ownerDocument)==null?void 0:t.defaultView;if(n!=null&&n.__pw_recorderGenerateSelector){const o=n.__pw_recorderGenerateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});if(o!=null&&o.selector)return o.selector}}catch{}return this._buildSelectorFromEl(e)}async _captureIframeElementSnapshot(e,t){var u;const n=this._generateStableSelector(t),o=await Gi.getNextCounter(this._recorder,"element"),a=`el-${String(o).padStart(3,"0")}.png`,c={name:"visualSnapshot",snapshotType:"element",iframeSelectors:e.map(h=>h.selector),selector:n,filename:a,signals:[],timestamp:sa(this._recorder)};this._recorder.recordAction(c),(u=this._recorder.overlay)==null||u.flashToolSucceeded("assertingVSnapshot")}async _captureGoJsDiagramSnapshot(e,t){var c;const n=await Gi.getNextCounter(this._recorder,"element"),o=`gojs-${String(n).padStart(3,"0")}.png`,a={name:"visualSnapshot",snapshotType:"gojsDiagram",iframeSelectors:e.map(u=>u.selector),diagramSelector:t,filename:o,signals:[],timestamp:sa(this._recorder)};this._recorder.recordAction(a),(c=this._recorder.overlay)==null||c.flashToolSucceeded("assertingVSnapshot")}async _capturePageSnapshot(){var o;const e=await Gi.getNextCounter(this._recorder,"page"),n={name:"visualSnapshot",snapshotType:"page",filename:`page-${String(e).padStart(3,"0")}.png`,fullPage:!0,signals:[],timestamp:sa(this._recorder)};this._recorder.recordAction(n),(o=this._recorder.overlay)==null||o.flashToolSucceeded("assertingVSnapshot")}async _captureElementSnapshot(e){var c;const t=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}),n=await Gi.getNextCounter(this._recorder,"element"),o=`el-${String(n).padStart(3,"0")}.png`,a={name:"visualSnapshot",snapshotType:"element",selector:t.selector,filename:o,signals:[],timestamp:sa(this._recorder)};this._recorder.recordAction(a),(c=this._recorder.overlay)==null||c.flashToolSucceeded("assertingVSnapshot")}async _captureRegionSnapshot(){var m;if(!this._dragStart||!this._dragCurrent)return;const e=Math.min(this._dragStart.x,this._dragCurrent.x),t=Math.min(this._dragStart.y,this._dragCurrent.y),n=Math.max(this._dragStart.x,this._dragCurrent.x),o=Math.max(this._dragStart.y,this._dragCurrent.y),a=this._recorder.injectedScript.window.scrollX||this._recorder.injectedScript.window.pageXOffset,c=this._recorder.injectedScript.window.scrollY||this._recorder.injectedScript.window.pageYOffset,u={x:Math.round(e+a),y:Math.round(t+c),width:Math.round(n-e),height:Math.round(o-t)},h=await Gi.getNextCounter(this._recorder,"region"),f=`region-${String(h).padStart(3,"0")}.png`,y={name:"visualSnapshot",snapshotType:"region",clip:u,filename:f,signals:[],timestamp:sa(this._recorder)};this._recorder.recordAction(y),(m=this._recorder.overlay)==null||m.flashToolSucceeded("assertingVSnapshot")}_cancelSnapshot(){this._recorder.setMode("recording")}}function kk(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function Gb(i){return i.injectedScript.utils.builtins.Date.now().toString()}function nf(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function Nk(i){for(const e of i)e();i.splice(0,i.length)}class Mk{constructor(e){this._selectionState=null,this._overlay=null,this._feedbackTooltip=null,this._listeners=[],this._recorder=e,this._initializeConfig()}_initializeConfig(){const e=this._recorder.injectedScript.window;e.__playwrightAreaSelectionConfig||(e.__playwrightAreaSelectionConfig={minDragDistance:3,showFeedback:!0,feedbackDuration:2e3,overlayColor:"#0ea5e9",overlayOpacity:.1,overlayBorderStyle:"dashed",overlayBorderWidth:2},console.log("[AreaSelectionTool] Configuration available at window.__playwrightAreaSelectionConfig"),console.log("[AreaSelectionTool] Adjust minDragDistance (default: 3px) in DevTools to fine-tune sensitivity"))}_getConfig(){return this._recorder.injectedScript.window.__playwrightAreaSelectionConfig}cursor(){return"crosshair"}install(){this._arm()}uninstall(){this._disarm(),this._removeOverlay(),this._removeFeedbackTooltip()}cleanup(){this._selectionState&&(this._disarm(),this._removeOverlay(),this._removeFeedbackTooltip())}onKeyDown(e){e.key==="Escape"&&(kk(e),this._removeOverlay(),this._recorder.setMode("recording"))}_arm(){var o;this._selectionState={startPoint:null,endPoint:null,targetCanvas:null,isSelecting:!1},(o=this._recorder.injectedScript.document.body)==null||o.setAttribute("data-pw-cursor","crosshair"),this._createOverlay();const e=a=>{var f;const c=a;if(!this._selectionState)return;const u=c.target;if(this._isInteractiveElement(u)){console.log("[AreaSelectionTool] Ignoring click on interactive element:",u.tagName,(f=u.textContent)==null?void 0:f.substring(0,30));return}this._selectionState.startPoint={x:c.clientX,y:c.clientY};const h=this._detectCanvasAtPoint({x:c.clientX,y:c.clientY});h?(this._selectionState.targetCanvas=h,this._startCanvasRect=h.getBoundingClientRect()):this._selectionState.targetCanvas=null,this._selectionState.isSelecting=!0},t=a=>{const c=a;this._selectionState&&this._selectionState.isSelecting&&this._selectionState.startPoint&&(this._selectionState.endPoint={x:c.clientX,y:c.clientY},this._updateOverlay(this._selectionState.startPoint,this._selectionState.endPoint))},n=a=>{const c=a;if(this._selectionState&&this._selectionState.isSelecting&&(this._selectionState.endPoint={x:c.clientX,y:c.clientY},this._selectionState.isSelecting=!1,this._selectionState.startPoint&&this._selectionState.endPoint)){const u=this._calculateDistance(this._selectionState.startPoint,this._selectionState.endPoint),f=this._getConfig().minDragDistance;u>=f?(console.log("[AreaSelectionTool] ✓ Capturing area selection, drag distance:",u.toFixed(1),"px (threshold:",f,"px)"),this._showSuccessFeedback(u),this._capture(),this._selectionState.startPoint=null,this._selectionState.endPoint=null,this._selectionState.targetCanvas=null,this._removeOverlay()):(console.warn("[AreaSelectionTool] ✗ Drag too small:",u.toFixed(1),"px (need ≥",f,"px) - staying active for retry"),this._showFailureFeedback(u,f),this._selectionState.startPoint=null,this._selectionState.endPoint=null,this._selectionState.targetCanvas=null,this._removeOverlay())}};this._listeners.push(nf(this._recorder.document,"pointerdown",e,!1),nf(this._recorder.document,"pointermove",t,!1),nf(this._recorder.document,"pointerup",n,!1))}_disarm(){Nk(this._listeners),this._listeners=[],this._selectionState=null}_createOverlay(){const e=this._getConfig();this._overlay=this._recorder.document.createElement("div");const t=(n,o)=>{const a=parseInt(n.slice(1,3),16),c=parseInt(n.slice(3,5),16),u=parseInt(n.slice(5,7),16);return`rgba(${a}, ${c}, ${u}, ${o})`};this._overlay.style.cssText=`
|
|
458
|
+
position: fixed;
|
|
459
|
+
border: ${e.overlayBorderWidth}px ${e.overlayBorderStyle} ${e.overlayColor};
|
|
460
|
+
background: ${t(e.overlayColor,e.overlayOpacity)};
|
|
461
|
+
pointer-events: none;
|
|
462
|
+
z-index: 2147483646;
|
|
463
|
+
display: none;
|
|
464
|
+
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
|
|
465
|
+
transition: opacity 0.15s ease-in-out;
|
|
466
|
+
`,this._recorder.document.body.appendChild(this._overlay)}_updateOverlay(e,t){if(!this._overlay)return;const n=Math.min(e.x,t.x),o=Math.min(e.y,t.y),a=Math.abs(t.x-e.x),c=Math.abs(t.y-e.y);this._overlay.style.left=`${n}px`,this._overlay.style.top=`${o}px`,this._overlay.style.width=`${a}px`,this._overlay.style.height=`${c}px`,this._overlay.style.display="block"}_removeOverlay(){this._overlay&&this._overlay.parentElement&&(this._overlay.parentElement.removeChild(this._overlay),this._overlay=null)}_detectCanvasAtPoint(e){const t=this._recorder.document.elementFromPoint(e.x,e.y);return(t==null?void 0:t.tagName)==="CANVAS"?t:null}_detectCanvasContext(e){const t=this._recorder.document.elementFromPoint(e.x,e.y);if((t==null?void 0:t.tagName)==="CANVAS"){const n=t,o=n.getBoundingClientRect();return{canvas:n,rect:o}}return null}_canvasBackingStore(e,t,n,o){const a=e.getBoundingClientRect();if(!a.width||!a.height)return;const c=e.width/a.width,u=e.height/a.height,h=(f,y)=>({x:Math.round((f.x-y.left)*c),y:Math.round((f.y-y.top)*u)});return{start:h(t,o??a),end:h(n,a),canvasWidth:e.width,canvasHeight:e.height,displayWidth:a.width,displayHeight:a.height}}_isInteractiveElement(e){var n;if(!e)return!1;let t=e;for(;t&&t!==this._recorder.document.body;){const o=(n=t.tagName)==null?void 0:n.toLowerCase();if(["button","a","input","select","textarea","label"].includes(o))return!0;const a=t.getAttribute("role");if(a&&["button","link","menuitem","tab","checkbox","radio","switch","textbox"].includes(a)||t.hasAttribute("onclick"))return!0;t=t.parentElement}return!1}_calculateDistance(e,t){const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)}_showSuccessFeedback(e){const t=this._getConfig();t.showFeedback&&this._showFeedbackTooltip(`✓ Selection captured (${e.toFixed(1)}px)`,"#10b981",t.feedbackDuration)}_showFailureFeedback(e,t){const n=this._getConfig();n.showFeedback&&this._showFeedbackTooltip(`✗ Drag too small: ${e.toFixed(1)}px (need ≥${t}px)`,"#ef4444",n.feedbackDuration)}_showFeedbackTooltip(e,t,n){this._removeFeedbackTooltip(),this._feedbackTooltip=this._recorder.document.createElement("div"),this._feedbackTooltip.textContent=e,this._feedbackTooltip.style.cssText=`
|
|
467
|
+
position: fixed;
|
|
468
|
+
top: 20px;
|
|
469
|
+
left: 50%;
|
|
470
|
+
transform: translateX(-50%);
|
|
471
|
+
background: ${t};
|
|
472
|
+
color: white;
|
|
473
|
+
padding: 12px 24px;
|
|
474
|
+
border-radius: 6px;
|
|
475
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
476
|
+
font-size: 14px;
|
|
477
|
+
font-weight: 500;
|
|
478
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
479
|
+
z-index: 2147483647;
|
|
480
|
+
pointer-events: none;
|
|
481
|
+
animation: pwSlideIn 0.3s ease-out;
|
|
482
|
+
`;const o=this._recorder.document.createElement("style");o.textContent=`
|
|
483
|
+
@keyframes pwSlideIn {
|
|
484
|
+
from {
|
|
485
|
+
opacity: 0;
|
|
486
|
+
transform: translateX(-50%) translateY(-10px);
|
|
487
|
+
}
|
|
488
|
+
to {
|
|
489
|
+
opacity: 1;
|
|
490
|
+
transform: translateX(-50%) translateY(0);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
@keyframes pwSlideOut {
|
|
494
|
+
from {
|
|
495
|
+
opacity: 1;
|
|
496
|
+
transform: translateX(-50%) translateY(0);
|
|
497
|
+
}
|
|
498
|
+
to {
|
|
499
|
+
opacity: 0;
|
|
500
|
+
transform: translateX(-50%) translateY(-10px);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
`,this._recorder.document.head.appendChild(o),this._recorder.document.body.appendChild(this._feedbackTooltip),setTimeout(()=>{this._feedbackTooltip&&(this._feedbackTooltip.style.animation="pwSlideOut 0.3s ease-in",setTimeout(()=>this._removeFeedbackTooltip(),300))},n)}_removeFeedbackTooltip(){this._feedbackTooltip&&this._feedbackTooltip.parentElement&&(this._feedbackTooltip.parentElement.removeChild(this._feedbackTooltip),this._feedbackTooltip=null)}_getElementsInRect(e){const t=[],n=this._recorder.document.querySelectorAll("*");for(const o of n){const a=o.getBoundingClientRect();if(!(a.right<e.left||a.left>e.right||a.bottom<e.top||a.top>e.bottom)){const c=o.tagName.toLowerCase();(["button","a","input","select","textarea"].includes(c)||o.hasAttribute("role")||o.hasAttribute("data-testid"))&&t.push(o)}}return t}_capture(){var y,m;const e=this._selectionState.startPoint,t=this._selectionState.endPoint,n=Math.min(e.x,t.x),o=Math.min(e.y,t.y),a=Math.abs(t.x-e.x),c=Math.abs(t.y-e.y),u=new DOMRect(n,o,a,c);let h;const f=this._selectionState.targetCanvas||((y=this._detectCanvasContext({x:n+a/2,y:o+c/2}))==null?void 0:y.canvas);if(f){const _=this._recorder.injectedScript.generateSelector(f,{testIdAttributeName:this._recorder.state.testIdAttributeName});h={name:"selectArea",type:"canvas",startPoint:e,endPoint:t,canvasSelector:_.selector,canvasBackingStore:this._canvasBackingStore(f,e,t,this._selectionState.targetCanvas===f?this._startCanvasRect:void 0),signals:[],timestamp:Gb(this._recorder)}}else{const _=this._getElementsInRect(u),b=_.map(S=>this._recorder.injectedScript.generateSelector(S,{testIdAttributeName:this._recorder.state.testIdAttributeName}).selector);h={name:"selectArea",type:_.length>0?"dom":"hybrid",startPoint:e,endPoint:t,selectors:b.length>0?b:void 0,signals:[],timestamp:Gb(this._recorder)}}this._recorder.recordAction(h),this._recorder.setMode("recording"),(m=this._recorder.overlay)==null||m.flashToolSucceeded("recordingArea")}}function Dk(i){return i.injectedScript.utils.builtins.Date.now().toString()}class Lk{constructor(e){this._actionSequenceCounter=0,this._recorder=e}cursor(){return"default"}install(){this._captureDomSnapshot()}uninstall(){}cleanup(){}_captureDomSnapshot(){const t={name:"domSnapshot",snapshotData:this._serializeDom(),signals:[],timestamp:Dk(this._recorder)};this._recorder.recordAction(t),this._recorder.setMode("recording")}_serializeDom(){const e=this._recorder.document,t=this._recorder.injectedScript.window;return{url:e.location.href,timestamp:Date.now(),viewport:{width:t.innerWidth,height:t.innerHeight},dom:this._buildDomTree(e.documentElement),metadata:{actionSequence:this._actionSequenceCounter++,sessionId:`rec-${Date.now()}`}}}_buildDomTree(e,t=0){var c,u;if(t>50)return null;const n=e.tagName.toLowerCase();if(n.startsWith("x-pw-"))return null;const o={tag:n,attributes:this._getAttributes(e)};if(e.childNodes.length===0||e.childNodes.length===1&&((c=e.firstChild)==null?void 0:c.nodeType)===3){const h=(u=e.textContent)==null?void 0:u.trim();h&&(o.text=h)}if(e instanceof HTMLInputElement?(o.value=e.value,o.checked=e.checked,o.type=e.type):e instanceof HTMLTextAreaElement?o.value=e.value:e instanceof HTMLSelectElement&&(o.value=e.value,o.selectedOptions=Array.from(e.selectedOptions).map(h=>h.value)),e.shadowRoot){const h=Array.from(e.shadowRoot.children).map(f=>this._buildDomTree(f,t+1)).filter(Boolean);h.length>0&&(o.shadowRoot=h)}const a=Array.from(e.children).map(h=>this._buildDomTree(h,t+1)).filter(Boolean);return a.length>0&&(o.children=a),o}_getAttributes(e){const t={},n=["id","class","name","type","role","aria-label","aria-describedby","aria-labelledby","data-testid","data-test-id","data-test","placeholder","title","alt","href","src","value","for","action","method"];for(const o of n){const a=e.getAttribute(o);a&&(t[o]=a)}return t}}const Ok=1e3,Rk=9999;function jk(){try{if(document.querySelector("#modal-root dialog, #modal-root .modal_root")){const e=`
|
|
504
|
+
(() => {
|
|
505
|
+
const S = (window.__pwHideModal__ ||= {});
|
|
506
|
+
const MIN_BLOCKING_Z_INDEX = ${Ok};
|
|
507
|
+
const MIN_HIGH_PRIORITY_Z_INDEX = ${Rk};
|
|
508
|
+
|
|
509
|
+
// Find ALL dialogs in the modal (main modal + any dropdowns)
|
|
510
|
+
const dialogs = Array.from(document.querySelectorAll('#modal-root dialog, #modal-root .modal_root'));
|
|
511
|
+
if (!dialogs.length) return console.warn('No modal dialogs found.');
|
|
512
|
+
|
|
513
|
+
if (S.hidden) return console.log('Already hidden.');
|
|
514
|
+
|
|
515
|
+
// Remember initial state for ALL dialogs
|
|
516
|
+
S.dialogs = dialogs.map(dlg => ({
|
|
517
|
+
element: dlg,
|
|
518
|
+
wasModal: typeof HTMLDialogElement !== 'undefined'
|
|
519
|
+
&& dlg instanceof HTMLDialogElement
|
|
520
|
+
&& dlg.matches(':modal')
|
|
521
|
+
}));
|
|
522
|
+
|
|
523
|
+
// Prevent the app from reacting to close/cancel while we hide all dialogs
|
|
524
|
+
S.stopper = e => e.stopImmediatePropagation();
|
|
525
|
+
S.dialogs.forEach(({ element }) => {
|
|
526
|
+
element.addEventListener('close', S.stopper, true);
|
|
527
|
+
element.addEventListener('cancel', S.stopper, true);
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
// Release the top layer without letting the app know for ALL dialogs
|
|
531
|
+
S.dialogs.forEach(({ element, wasModal }) => {
|
|
532
|
+
try {
|
|
533
|
+
if (wasModal && typeof element.close === 'function') element.close('pw-temp-hide');
|
|
534
|
+
else element.removeAttribute('open');
|
|
535
|
+
} catch {}
|
|
536
|
+
});
|
|
537
|
+
|
|
538
|
+
// Visually/interaction-wise hide the whole modal container
|
|
539
|
+
const root = document.getElementById('modal-root') || S.dialogs[0]?.element.closest('#modal-root') || S.dialogs[0]?.element;
|
|
540
|
+
S.root = root;
|
|
541
|
+
S.prevVis = root.style.visibility;
|
|
542
|
+
S.prevPE = root.style.pointerEvents;
|
|
543
|
+
root.style.visibility = 'hidden';
|
|
544
|
+
root.style.pointerEvents = 'none';
|
|
545
|
+
|
|
546
|
+
// Common "page lock" cleanups (store and undo later)
|
|
547
|
+
S.bodyOverflow = document.body.style.overflow;
|
|
548
|
+
document.body.style.overflow = '';
|
|
549
|
+
|
|
550
|
+
S.inertEls = Array.from(document.querySelectorAll('[inert]'));
|
|
551
|
+
S.inertEls.forEach(el => el.removeAttribute('inert'));
|
|
552
|
+
|
|
553
|
+
S.ariaHidden = [];
|
|
554
|
+
Array.from(document.body.children).forEach(el => {
|
|
555
|
+
if (el === root) return;
|
|
556
|
+
const v = el.getAttribute('aria-hidden');
|
|
557
|
+
if (v !== null) { S.ariaHidden.push([el, v]); el.removeAttribute('aria-hidden'); }
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
// Find and neutralize ALL blocking elements, especially dropdown-related overlays
|
|
561
|
+
S.tempPeNone = [];
|
|
562
|
+
|
|
563
|
+
// Check multiple points across the screen for blocking elements
|
|
564
|
+
const testPoints = [
|
|
565
|
+
[innerWidth/2, innerHeight/2], // center
|
|
566
|
+
[innerWidth/4, innerHeight/4], // top-left
|
|
567
|
+
[3*innerWidth/4, innerHeight/4], // top-right
|
|
568
|
+
[innerWidth/4, 3*innerHeight/4], // bottom-left
|
|
569
|
+
[3*innerWidth/4, 3*innerHeight/4], // bottom-right
|
|
570
|
+
[innerWidth/2, innerHeight/4], // top-center
|
|
571
|
+
[innerWidth/2, 3*innerHeight/4], // bottom-center
|
|
572
|
+
];
|
|
573
|
+
|
|
574
|
+
testPoints.forEach(([x, y]) => {
|
|
575
|
+
const probe = document.elementFromPoint(x, y);
|
|
576
|
+
if (probe && probe !== root && !root.contains(probe) &&
|
|
577
|
+
!probe.tagName?.toLowerCase().startsWith('x-pw-') &&
|
|
578
|
+
probe.id !== 'x-pw-glass' &&
|
|
579
|
+
!S.tempPeNone.includes(probe)) {
|
|
580
|
+
|
|
581
|
+
const cs = getComputedStyle(probe);
|
|
582
|
+
const isBlocking = (
|
|
583
|
+
// Original full-screen check
|
|
584
|
+
(cs.position === 'fixed' &&
|
|
585
|
+
cs.top === '0px' && cs.left === '0px' && cs.right === '0px' && cs.bottom === '0px') ||
|
|
586
|
+
// Dropdown overlay patterns
|
|
587
|
+
(cs.position === 'fixed' && parseInt(cs.zIndex) > MIN_BLOCKING_Z_INDEX) ||
|
|
588
|
+
(cs.position === 'absolute' && parseInt(cs.zIndex) > MIN_BLOCKING_Z_INDEX) ||
|
|
589
|
+
// Common backdrop patterns
|
|
590
|
+
(cs.position === 'fixed' && cs.inset === '0px') ||
|
|
591
|
+
// Elements that cover significant area
|
|
592
|
+
(cs.position === 'fixed' && cs.width && cs.height &&
|
|
593
|
+
parseInt(cs.width) > innerWidth/2 && parseInt(cs.height) > innerHeight/2)
|
|
594
|
+
);
|
|
595
|
+
|
|
596
|
+
if (isBlocking) {
|
|
597
|
+
S.tempPeNone.push(probe);
|
|
598
|
+
probe.style.pointerEvents = 'none';
|
|
599
|
+
console.log('Disabled blocking element at', x, y, ':', probe, 'z-index:', cs.zIndex);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
|
|
604
|
+
// Also scan for high z-index elements that might be blocking
|
|
605
|
+
const highZElements = Array.from(document.querySelectorAll('*')).filter(el => {
|
|
606
|
+
if (el === root || root.contains(el) ||
|
|
607
|
+
el.tagName?.toLowerCase().startsWith('x-pw-') ||
|
|
608
|
+
S.tempPeNone.includes(el)) return false;
|
|
609
|
+
|
|
610
|
+
const cs = getComputedStyle(el);
|
|
611
|
+
return cs.zIndex && parseInt(cs.zIndex) > MIN_HIGH_PRIORITY_Z_INDEX;
|
|
612
|
+
});
|
|
613
|
+
|
|
614
|
+
highZElements.forEach(el => {
|
|
615
|
+
S.tempPeNone.push(el);
|
|
616
|
+
el.style.pointerEvents = 'none';
|
|
617
|
+
console.log('Disabled high z-index element:', el, 'z-index:', getComputedStyle(el).zIndex);
|
|
618
|
+
});
|
|
619
|
+
|
|
620
|
+
S.hidden = true;
|
|
621
|
+
console.log('✅ Modal hidden automatically for text assertion.');
|
|
622
|
+
})();
|
|
623
|
+
`;new Function(e)()}}catch(i){console.warn("Failed to auto-hide modal for assertion:",i)}}function Hk(){try{const i=`
|
|
624
|
+
(() => {
|
|
625
|
+
const S = window.__pwHideModal__;
|
|
626
|
+
if (!S?.hidden) return console.warn('Nothing to restore.');
|
|
627
|
+
|
|
628
|
+
const { dialogs, root } = S;
|
|
629
|
+
if (!dialogs?.length || !root || !document.contains(root)) {
|
|
630
|
+
return console.warn('Modal root/dialogs no longer in DOM (app removed it).');
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
// Make container visible/clickable again
|
|
634
|
+
root.style.visibility = S.prevVis ?? '';
|
|
635
|
+
root.style.pointerEvents = S.prevPE ?? '';
|
|
636
|
+
|
|
637
|
+
// Bring ALL dialogs back into the top layer (if they were modal)
|
|
638
|
+
dialogs.forEach(({ element, wasModal }) => {
|
|
639
|
+
try {
|
|
640
|
+
if (wasModal && typeof element.showModal === 'function') element.showModal();
|
|
641
|
+
else element.setAttribute('open', '');
|
|
642
|
+
} catch (e) {
|
|
643
|
+
// Fallback: at least show it
|
|
644
|
+
element.setAttribute('open', '');
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
// Re-apply page locks as they were
|
|
649
|
+
if (S.bodyOverflow !== undefined) document.body.style.overflow = S.bodyOverflow;
|
|
650
|
+
(S.inertEls || []).forEach(el => el.setAttribute('inert', ''));
|
|
651
|
+
(S.ariaHidden || []).forEach(([el, v]) => el.setAttribute('aria-hidden', v));
|
|
652
|
+
(S.tempPeNone || []).forEach(el => el.style.removeProperty('pointer-events'));
|
|
653
|
+
|
|
654
|
+
// Allow the app to receive close/cancel in the future for ALL dialogs
|
|
655
|
+
if (S.stopper) {
|
|
656
|
+
dialogs.forEach(({ element }) => {
|
|
657
|
+
element.removeEventListener('close', S.stopper, true);
|
|
658
|
+
element.removeEventListener('cancel', S.stopper, true);
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
S.hidden = false;
|
|
663
|
+
console.log('✅ Modal restored automatically after text assertion.');
|
|
664
|
+
})();
|
|
665
|
+
`;new Function(i)()}catch(i){console.warn("Failed to auto-show modal after assertion:",i)}}function ic(...i){typeof window<"u"&&window.__SKYRAMP_DEBUG__&&console.log("[ModalHandler]",...i)}function Xb(i){const e=i.getAttribute("data-testid");if(e)return`dialog[data-testid="${e}"]`;if(i.id)return`#${i.id}`;const t=i.getAttribute("aria-label");if(t)return`dialog[aria-label="${t}"]`;const n=i.tagName.toLowerCase(),o=i.className;return typeof o=="string"&&o.trim()?`${n}.${o.trim().split(/\s+/).join(".")}`:n}class $k{constructor(e){this._observer=null,this._enabled=!1,this._activeModal=null,this._document=e}setOnModalOpen(e){this._onModalOpen=e}setOnModalClose(e){this._onModalClose=e}isModalOpen(){return this._activeModal!==null}enable(){this._enabled||(this._enabled=!0,this._observer=new MutationObserver(e=>this._handleMutations(e)),this._observer.observe(this._document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["open","aria-modal","class"]}),this._checkExistingModals(),ic("Enabled — watching for modal lifecycle events"))}disable(){this._enabled&&(this._enabled=!1,this._observer&&(this._observer.disconnect(),this._observer=null),this._activeModal=null,ic("Disabled"))}_checkExistingModals(){const e=this._document.querySelector("dialog[open]");if(e){this._emitOpen(e);return}const t=this._document.querySelector('[aria-modal="true"]');if(t){this._emitOpen(t);return}const n=this._document.querySelector(".cds--modal.is-visible");if(n){this._emitOpen(n);return}}_handleMutations(e){var t,n,o;if(this._enabled)for(const a of e){if(a.type==="attributes"){const c=a.target;if(a.attributeName==="open"&&c.tagName==="DIALOG"){c.hasAttribute("open")?this._emitOpen(c):this._emitClose(c);continue}if(a.attributeName==="aria-modal"){c.getAttribute("aria-modal")==="true"?this._emitOpen(c):this._activeModal===c&&this._emitClose(c);continue}if(a.attributeName==="class"&&((t=c.classList)!=null&&t.contains("cds--modal"))){c.classList.contains("is-visible")?this._emitOpen(c):this._activeModal===c&&this._emitClose(c);continue}}if(a.type==="childList"){for(const c of a.addedNodes)c instanceof Element&&(c.tagName==="DIALOG"&&c.hasAttribute("open")?this._emitOpen(c):((n=c.getAttribute)==null?void 0:n.call(c,"aria-modal"))==="true"?this._emitOpen(c):(o=c.classList)!=null&&o.contains("cds--modal")&&c.classList.contains("is-visible")&&this._emitOpen(c));if(this._activeModal)for(const c of a.removedNodes)(c===this._activeModal||c instanceof Element&&c.contains(this._activeModal))&&this._emitClose(this._activeModal)}}}_emitOpen(e){var n;if(this._activeModal===e)return;this._activeModal=e;const t=Xb(e);ic("Modal opened:",t),(n=this._onModalOpen)==null||n.call(this,{selector:t})}_emitClose(e){var n;if(this._activeModal!==e)return;const t=Xb(e);this._activeModal=null,ic("Modal closed:",t),(n=this._onModalClose)==null||n.call(this,{selector:t})}}function zk(...i){typeof window<"u"&&window.__SKYRAMP_DEBUG__&&console.log("[IframeHandler]",...i)}function Ik(i){return!!(/\d{2,}[_-][a-zA-Z]/.test(i)||/[-_]\d+$/.test(i)||/^react-aria\d+/.test(i)||/^(mui|mat|cdk)-\d+/.test(i)||/^\d+$/.test(i)||/\d{4,}/.test(i)||i.includes(":"))}function Yb(i){if(i.title)return`iframe[title="${i.title}"]`;if(i.name)return`iframe[name="${i.name}"]`;if(i.id&&!Ik(i.id))return`#${i.id}`;if(i.src){try{const e=new URL(i.src);if((e.protocol==="http:"||e.protocol==="https:")&&e.pathname&&e.pathname!=="/")return`iframe[src*="${e.pathname}"]`}catch{}return`iframe[src="${i.src}"]`}return i.id?`#${i.id}`:"iframe"}class Bk{constructor(e){this._observer=null,this._enabled=!1,this._trackedIframes=new WeakSet,this._document=e}setOnIframeLoad(e){this._onIframeLoad=e}enable(){this._enabled||(this._enabled=!0,this._observer=new MutationObserver(e=>this._handleMutations(e)),this._observer.observe(this._document,{childList:!0,subtree:!0}),this._trackExistingIframes(),console.log("[IframeHandler] Enabled — watching for iframe load events"))}disable(){this._enabled&&(this._enabled=!1,this._observer&&(this._observer.disconnect(),this._observer=null),zk("Disabled"))}_trackExistingIframes(){for(const e of this._document.querySelectorAll("iframe"))this._trackIframe(e)}_handleMutations(e){if(this._enabled){for(const t of e)if(t.type==="childList"){for(const n of t.addedNodes)if(n instanceof HTMLIFrameElement&&this._trackIframe(n),n instanceof Element)for(const o of n.querySelectorAll("iframe"))this._trackIframe(o)}}}_trackIframe(e){var t,n;if(!this._trackedIframes.has(e)){this._trackedIframes.add(e),e.addEventListener("load",()=>{var a;if(!this._enabled)return;const o=Yb(e);console.log("[IframeHandler] Iframe loaded:",o),(a=this._onIframeLoad)==null||a.call(this,{selector:o})},{once:!0});try{if(((t=e.contentDocument)==null?void 0:t.readyState)==="complete"){const o=Yb(e);console.log("[IframeHandler] Iframe already loaded:",o),(n=this._onIframeLoad)==null||n.call(this,{selector:o})}}catch{}}}}function Ic(i,e,t){let n=i.elementFromPoint(e,t)??void 0;for(;n!=null&&n.shadowRoot;){const o=n.shadowRoot.elementFromPoint(e,t);if(!o||o===n)break;n=o}return n}const Pk='h1, h2, h3, h4, h5, h6, [role="heading"], a[href], [role="link"], label, img[alt], [aria-label], [data-testid], [data-test-id], [data-test], [title]',Kb={childList:!0,subtree:!0,attributes:!0,attributeFilter:["href","role","type"]},Wb=1e3,qk=500,Jb=50,Uk=1e3,bc=700,Vk=450,Fk=[0,Vk,bc+200],Gk=5,Zb=2,Xk=1e3,Qb=.9,Yk=80,Kk=300,Wk=24,e0=400,t0=200,Jk=60,n0=30,Zk=3,Qk=50;class eN{constructor(e){this._enabled=!1,this._mutationObserver=null,this._intersectionObserver=null,this._listeners=[],this._sampled=new WeakSet,this._inserted=new WeakMap,this._watchedShadowRoots=new WeakSet,this._awaitedDefinitions=new Set,this._pending=new Set,this._frameScheduled=!1,this._candidates=new Map,this._recheck=new Set,this._recheckAll=!1,this._recheckScheduled=!1,this._hovered=new Map,this._preHover=new WeakMap,this._left=new Map,this._actions=[],this._testIdAttributeName="data-testid",this._pointedEntries=[],this._injectedScript=e,this._document=e.document,this._scoping=new AS(e),this._clock=e.isUnderTest?e.window:e.utils.builtins}enable(){const e=this._document.documentElement;if(this._enabled||!e)return;this._enabled=!0;const t=this._injectedScript.window;this._intersectionObserver=new t.IntersectionObserver(o=>{for(const a of o)a.isIntersecting&&this._queue(a.target)},{threshold:[0,.25,.5,.75,1]}),this._mutationObserver=new t.MutationObserver(o=>{for(const a of o){if(a.type==="attributes"){const c=a.target;Ea(c)&&this._queue(c);continue}for(const c of a.addedNodes)c.nodeType===1&&this._queueSubtree(c,!0)}}),this._mutationObserver.observe(e,Kb);const n=(o,a)=>{t.addEventListener(o,a,!0),this._listeners.push(()=>t.removeEventListener(o,a,!0))};n("mousemove",o=>{this._confirmFirstEntry(o),this._pointer={x:o.clientX,y:o.clientY}}),n("pointerdown",o=>{const a=o.composedPath()[0];this._pointerDown=(a==null?void 0:a.nodeType)===1?{element:a,x:o.clientX,y:o.clientY,time:this._now()}:void 0}),n("pointerover",o=>this._onMouseOver(o)),n("mouseover",o=>this._onMouseOver(o)),n("mouseout",o=>{o.relatedTarget||this._setHoverChain([],!0)});for(const o of["transitionend","transitioncancel","animationend"])n(o,()=>this._scheduleRecheck("all"));this._queueSubtree(e,!1)}disable(){var e,t;if(this._enabled){this._enabled=!1,(e=this._mutationObserver)==null||e.disconnect(),this._mutationObserver=null,(t=this._intersectionObserver)==null||t.disconnect(),this._intersectionObserver=null;for(const n of this._listeners)n();this._listeners=[],this._watchedShadowRoots=new WeakSet,this._awaitedDefinitions.clear(),this._pending.clear(),this._frameScheduled=!1,this._sampled=new WeakSet,this._inserted=new WeakMap,this._candidates.clear(),this._recheck.clear(),this._recheckAll=!1,this._hovered.clear(),this._pointerDown=void 0,this._pointedEntries=[],this._preHover=new WeakMap,this._left.clear(),this._pointer=void 0,this._firstEntry=void 0,this._actions=[]}}noteUserAction(e){const t=this._now(),n=this._actions[this._actions.length-1];if(e&&n&&n.path[0]===e)n.last=t;else{const o=[];for(let a=e;a;a=Ge(a))o.push(a);this._actions.push({first:t,last:t,path:o}),this._actions.length>t0&&this._actions.shift()}this._scheduleRecheck("all")}hoverStepsFor(e,t,n){var u;const o=yc(e),a=o&&this._timeline(o);if(!o||!a)return[];const c=((u=this._parse(t))==null?void 0:u.some(h=>h.name==="nth"))??!1;return this._testIdAttributeName=n,this._hoverSteps(o,o,a,c,0)??[]}_timeline(e){const t=this._candidates.get(e);if(!t)return;const n=this._observe(e);return n?[...t,{...n,hidden:!1,cover:void 0,hiddenAncestors:void 0}]:t}_preHoverChange(e){const t=this._preHover.get(e);if(!t)return;const n=s0(e),o={text:t.text!==n.text,ariaLabel:t.ariaLabel!==n.ariaLabel,className:t.className!==n.className,title:t.title!==n.title,before:t};return o.text||o.ariaLabel||o.className||o.title?o:void 0}selectorForBothStates(e,t,n){const o=this._preHoverChange(e),a=this._parse(t);if(!o||!a||!r0(a,o))return;const c=a.length>1?t.slice(0,t.lastIndexOf(" >> ")):"",u=[];for(const S of[n,"data-testid","data-test-id","data-test"]){const v=e.getAttribute(S);v&&u.push(S===n?`internal:testid=[${S}=${JSON.stringify(v)}s]`:`[${S}=${JSON.stringify(v)}]`)}e.id&&u.push(`[id=${JSON.stringify(e.id)}]`);const h=Pe(e),f=e.getAttribute("aria-label");h&&f&&!o.ariaLabel&&u.push(`internal:role=${h}[name=${JSON.stringify(f)}s]`);const y=a[a.length-1],m=a0(y),_=o.ariaLabel?o.before.ariaLabel:o.before.text;let b;if(m&&_&&ra(_)!==ra(m)){const S=`/^\\s*(?:${o0(_.trim())}|${o0(m.trim())})\\s*$/i`,v=y.name==="internal:role"?y.source.replace(/\[name=("(?:[^"\\]|\\.)*"[is]?)\]/,`[name=${S}]`):S;b=`${y.name}=${v}`,u.push(b)}for(const S of u)for(const v of c?[S,`${c} >> ${S}`]:[S])if(!this._scoping._hasDynamicSelector(v)&&Ts(this._injectedScript,v,e))return v;if(b){const S=c?`${c} >> ${b}`:b,v=this._matches(S).indexOf(e);if(v>=0&&Ts(this._injectedScript,`${S} >> nth=${v}`,e))return`${S} >> nth=${v}`}}_matches(e){try{return this._injectedScript.querySelectorAll(this._injectedScript.parseSelector(e),this._document)}catch{return[]}}_hoverSteps(e,t,n,o,a){const c=this._trigger(e,t,n);if(!c)return;const u=this._stableHoverTarget(c,e,o);return u?a+1>=Zk?[u]:[...this._hoverSteps(e,u.trigger,n,o,a+1)??[],u]:void 0}_trigger(e,t,n){const o=v=>{var x;return t===e?v.hidden:!!((x=v.hiddenAncestors)!=null&&x.includes(t))};let a=n.length;for(;a>0&&!o(n[a-1]);)a--;if(a===0||a===n.length)return;const c=n[a-1],u=n[a],h=[...u.left].filter(([v,x])=>!u.hovered.has(v)&&c.hovered.has(v)&&u.time-x<bc),f=new Map([...u.hovered,...h.map(([v])=>[v,c.hovered.get(v)])]),y=[...f].filter(([v,x])=>{var E;return x>=c.time-Wb&&this._canTrigger(v,t)&&!((E=c.hiddenAncestors)!=null&&E.includes(v))}),m=y.filter(([v])=>Ue(v,t)),_=m.length?m:y;let b=_.filter(([v])=>!c.hovered.has(v)).map(([v])=>v);b.length||(b=_.map(([v])=>v));for(const v of n.slice(a+1)){if(o(v))continue;const x=b.filter(C=>v.hovered.has(C)),E=[...v.hovered.keys()].some(C=>Ue(C,t)&&!b.some(L=>Ue(C,L)));x.length?b=x:E||(b=b.filter(C=>v.time-(v.left.get(C)??-1/0)<bc))}if(!b.length)return;const S=Math.min(c.time,...b.map(v=>f.get(v)));if(!this._actions.some(v=>v.first<=u.time&&v.last>=S&&!v.path.includes(e))&&!(t===e&&c.cover&&!b.some(v=>Ue(v,c.cover))))return{trigger:b,hiddenAt:c.time,enteredAt:Math.min(...b.map(v=>f.get(v)))}}_wasHiddenAt(e,t){var c;const n=yc(e),o=n&&this._candidates.get(n);if(!o)return!1;const a=o.filter(u=>u.time<=t+Gk);return!!((c=a[a.length-1])!=null&&c.hidden)}_insertedSince(e,t){const n=yc(e);return!!n&&(this._inserted.get(n)??-1/0)>=t}_canTrigger(e,t){if(e===t||Ue(t,e)||e===this._document.body||e===this._document.documentElement)return!1;const n=e.getBoundingClientRect(),o=this._injectedScript.window;return!(n.width>=o.innerWidth*Qb&&n.height>=o.innerHeight*Qb)}_stableHoverTarget({trigger:e,hiddenAt:t,enteredAt:n},o,a){const c=[...e].sort((f,y)=>Ue(y,f)?-1:1),u=c.findIndex(i0);u>=0&&c.splice(u+1);const h=new Set;for(const f of c){const y=[...f.querySelectorAll(Pk),...this._textLeaves(f)].filter(m=>!Ue(m,o)&&!Ue(o,m)).slice(0,n0);for(const m of[f,...y]){if(h.has(m)||(h.add(m),!dt(m)||this._wasHiddenAt(m,t)||this._insertedSince(m,n)))continue;const _=sf(m.getBoundingClientRect()),b=Ic(this._document,_.x,_.y);if(!b||!Ue(f,b)||!Ue(m,b))continue;const S=this._stableSelector(m,o,a);if(S)return{selector:S,trigger:f}}}}_textLeaves(e){var o;const t=[],n=this._document.createTreeWalker(e,4);for(let a=n.nextNode();a&&t.length<n0;a=n.nextNode()){const c=((o=a.nodeValue)==null?void 0:o.trim())??"",u=a.parentElement;c&&c.length<=Yk&&u&&u!==e&&!t.includes(u)&&t.push(u)}return t}_stableSelector(e,t,n){let o;try{o=this._injectedScript.generateSelector(e,{testIdAttributeName:this._testIdAttributeName}).selector}catch{return}if(!o||!this._isStableSelector(o,t,n))return;const a=this._preHoverChange(e);return a&&r0(this._parse(o),a)?void 0:o}_isStableSelector(e,t,n){const o=this._parse(e);if(!o||this._scoping._hasDynamicSelector(e))return!1;for(let a=0;a<o.length;a++){const c=o[a];if(c.name==="nth"){if(!n)return!1;continue}if(c.name==="css"){const h=c.source;if(/:(nth-|first-|last-|only-)/.test(h)||!/[#.[]/.test(h))return!1;continue}const u=a0(c);if(u&&!this._isOwnText(o.slice(0,a+1),c.name,u,t))return!1}return!0}_isOwnText(e,t,n,o){let a;try{a=this._injectedScript.querySelectorAll({parts:e},this._document)[0]}catch{return!1}if(!a)return!1;const c=Ue(a,o);if(c&&t!=="internal:has-text")return!1;const u=ra(n),h=this._document.createTreeWalker(a,4);for(let f=h.nextNode();f;f=h.nextNode())if(ra(f.nodeValue??"").includes(u)&&!Ue(o,f.parentElement??void 0))return!0;return!c&&!ra(a.textContent??"").includes(u)}_parse(e){try{return this._injectedScript.parseSelector(e).parts}catch{return}}_onMouseOver(e){const t=!this._pointer,n=!t&&!tN(this._pointer,e);this._pointer={x:e.clientX,y:e.clientY};const o=e.composedPath()[0],a=[];for(let c=(o==null?void 0:o.nodeType)===1?o:void 0;c;c=Ge(c))a.push(c);t?this._firstEntry={x:e.clientX,y:e.clientY,time:this._now(),chain:a}:this._firstEntry&&(this._firstEntry.x!==e.clientX||this._firstEntry.y!==e.clientY)&&(this._firstEntry=void 0),this._setHoverChain(a,n)}_confirmFirstEntry(e){const t=this._firstEntry;if(this._firstEntry=void 0,!t||t.x!==e.clientX||t.y!==e.clientY)return;const n=t.chain.filter(o=>this._hovered.get(o)===-1/0);if(n.length){for(const o of n)this._hovered.set(o,t.time);for(const o of this._candidates.keys())n.some(a=>a!==o&&Ue(a,o))&&this._recheck.add(o);this._scheduleRecheck()}}_setHoverChain(e,t){var c;const n=this._now(),o=new Set(e),a=[];t&&e.some(u=>!this._hovered.has(u)&&(Xh(u)||i0(u)))&&(this._pointedEntries.push(n),this._pointedEntries.length>t0&&this._pointedEntries.shift());for(const u of this._hovered.keys())o.has(u)||(this._hovered.delete(u),this._preHover.delete(u),this._left.set(u,n),a.push(u),this._sampleControlsInside(u));for(const u of e)this._hovered.has(u)||(this._hovered.set(u,t?n:-1/0),this._preHover.set(u,s0(u)),a.push(u));if(a.length){for(const[u,h]of this._left)(n-h>bc||o.has(u))&&this._left.delete(u);for(const u of this._candidates.keys())a.some(h=>h!==u&&Ue(h,u))&&this._recheck.add(u);if(a.some(u=>Xh(u))){let u=a.some(nS)?1/0:Qk;for(const[h,f]of[...this._candidates].reverse()){if(u<=0)break;(c=f[f.length-1])!=null&&c.hidden&&!this._recheck.has(h)&&(this._recheck.add(h),u--)}}this._scheduleRecheck()}}_sampleControlsInside(e){if(e===this._document.body||e===this._document.documentElement)return;const t=kb(e);if(!(t.length>Jk))for(const n of t)this._candidates.has(n)||this._recheck.add(n)}_scheduleRecheck(e){e&&(this._recheckAll=!0),!(this._recheckScheduled||!this._enabled)&&(this._recheckScheduled=!0,this._clock.requestAnimationFrame(()=>{this._recheckScheduled=!1;const t=this._recheckAll?[...this._candidates.keys(),...this._recheck]:[...this._recheck];this._recheckAll=!1,this._recheck.clear(),this._recheckNow(t);for(const n of Fk.slice(1))this._clock.setTimeout(()=>this._recheckNow(t),n)}))}_recheckNow(e){if(this._enabled)for(const t of e)try{this._record(t)}catch(n){this._log("recheck failed",t,n)}}_record(e,t=this._observe(e)){if(!t)return;let n=this._candidates.get(e);if(!n){if(!t.hidden)return;n=[],this._addCandidate(e,n)}const o=n[n.length-1];o&&o.hidden===t.hidden&&nN(o.hovered,t.hovered)&&iN(o.hiddenAncestors,t.hiddenAncestors)&&n.pop(),n.push(t),n.length>Wk&&n.shift()}_addCandidate(e,t){if(this._candidates.size>=e0){for(const n of this._candidates.keys())n.isConnected||this._candidates.delete(n);this._candidates.size>=e0&&this._candidates.delete(this._candidates.keys().next().value)}this._candidates.set(e,t)}_observe(e){if(!e.isConnected)return;const t=c=>c!==e&&(Ue(c,e)||!Ue(e,c)&&Xh(c)),n=new Map([...this._hovered].filter(([c])=>t(c))),o=new Map([...this._left].filter(([c])=>t(c))),a={time:this._now(),hidden:!1,hovered:n,left:o};if(!dt(e))a.hidden=!0;else{const c=e.getBoundingClientRect();if(!this._inViewport(c))return;const u=sf(c);this._injectedScript.expectHitTarget(u,e)!=="done"&&(a.hidden=!0,a.cover=Ic(this._document,u.x,u.y))}if(a.hidden){a.hiddenAncestors=[];for(let c=Ge(e);c&&c!==this._document.body;c=Ge(c))dt(c)||a.hiddenAncestors.push(c)}return a}_queueSubtree(e,t){Ea(e)&&this._queue(e,t),e.matches(":not(:defined)")&&this._awaitDefinition(e.localName),e.shadowRoot&&this._watchShadowRoot(e.shadowRoot,t),this._queueScope(e,t)}_queueScope(e,t){for(const n of kb(e))this._queue(n,t);for(const n of e.querySelectorAll("*"))n.shadowRoot&&this._watchShadowRoot(n.shadowRoot,t);for(const n of e.querySelectorAll(":not(:defined)"))this._awaitDefinition(n.localName)}_awaitDefinition(e){const t=this._injectedScript.window.customElements;!t||this._awaitedDefinitions.has(e)||(this._awaitedDefinitions.add(e),t.whenDefined(e).then(()=>{const n=this._document.documentElement;this._enabled&&n&&this._queueSubtree(n,!1)}).catch(()=>{}))}_watchShadowRoot(e,t){var n;this._watchedShadowRoots.has(e)||(this._watchedShadowRoots.add(e),(n=this._mutationObserver)==null||n.observe(e,Kb),this._queueScope(e,t))}_queue(e,t=!1){this._sampled.has(e)||(t&&!this._inserted.has(e)&&this._inserted.set(e,this._now()),this._pending.add(e),!this._frameScheduled&&(this._frameScheduled=!0,this._clock.requestAnimationFrame(()=>this._flush())))}_flush(){if(this._frameScheduled=!1,!this._enabled)return;const e=[...this._pending];this._pending.clear();for(const t of e)if(!(!t.isConnected||this._sampled.has(t)))try{this._sample(t)}catch(n){this._log("sampling failed",t,n)}}_log(...e){this._injectedScript.window.__SKYRAMP_DEBUG__&&console.log("[HoverRevealTracker]",...e)}_sample(e){var h,f;const t=this._observe(e);if(!t){e.isConnected&&((h=this._intersectionObserver)==null||h.observe(e));return}this._sampled.add(e),(f=this._intersectionObserver)==null||f.unobserve(e);const n=this._inserted.get(e);if(t.hidden||n===void 0){this._record(e,t);return}const o=this._lastActionTime(),a=([y,m])=>this._renderedByEntry(m,n,o,!Ue(y,e));if(![...t.hovered].some(a))return;const c=new Map([...t.hovered].filter(y=>!a(y))),u=[{time:t.time,hidden:!0,hovered:c,hiddenAncestors:[],left:new Map},t];this._addCandidate(e,u)}_renderedByEntry(e,t,n,o){return e>t||e<=n?!1:e>=t-Jb?!0:(t-n>=Uk||this._pointedEntries.some(c=>c>=e&&c<=t+Jb))&&e>=t-(o?Wb:qk)}_lastActionTime(){var e;return((e=this._actions[this._actions.length-1])==null?void 0:e.last)??-1/0}pressedAt(e,t){const n=this._pointerDown;if(n&&Math.abs(n.x-e)<=Zb&&Math.abs(n.y-t)<=Zb&&this._now()-n.time<Xk)return n.element}_inViewport(e){const{x:t,y:n}=sf(e),o=this._injectedScript.window;return t>=0&&n>=0&&t<o.innerWidth&&n<o.innerHeight}_now(){return this._clock.performance.now()}}function tN(i,e){return Math.floor(i.x)===Math.floor(e.clientX)&&Math.floor(i.y)===Math.floor(e.clientY)}function i0(i){var e;if(t2(i))return!1;for(let t=(e=i.parentElement)==null?void 0:e.firstElementChild;t;t=t.nextElementSibling)if(t!==i&&t.localName===i.localName)return!0;return!1}function sf(i){return{x:i.left+i.width/2,y:i.top+i.height/2}}function nN(i,e){if(i.size!==e.size)return!1;for(const[t,n]of i)if(e.get(t)!==n)return!1;return!0}function s0(i){const e=i.textContent??"";return{text:e.length<=Kk?e.replace(/\s+/g," ").trim():void 0,ariaLabel:i.getAttribute("aria-label"),className:i.getAttribute("class")??"",title:i.getAttribute("title")}}function r0(i,e){const t=e.text||e.ariaLabel||e.title;return i.some(n=>n.name==="css"?e.className&&n.source.includes(".")||e.ariaLabel&&n.source.includes("aria-label")||e.title&&n.source.includes("title"):n.name==="internal:role"?t&&n.source.includes("[name="):n.name==="internal:text"||n.name==="internal:has-text"||n.name==="text"||n.name==="internal:label"?t:n.name==="internal:attr"?e.ariaLabel&&n.source.includes("aria-label")||e.title&&n.source.includes("title"):!1)}function o0(i){return i.replace(/[.*+?^${}()|[\]\\/]/g,"\\$&")}function iN(i,e){return((i==null?void 0:i.length)??0)===((e==null?void 0:e.length)??0)&&(i??[]).every((t,n)=>e[n]===t)}function ra(i){return i.replace(/\s+/g," ").trim().toLowerCase()}function a0(i){var e;if(i.name==="internal:text"||i.name==="internal:has-text"||i.name==="text")return l0(i.source);if(i.name==="internal:role")return l0(((e=/\[name=("(?:[^"\\]|\\.)*"[is]?)\]/.exec(i.source))==null?void 0:e[1])??"")}function l0(i){const e=/^"((?:[^"\\]|\\.)*)"[is]?$/.exec(i.trim());return e?JSON.parse(`"${e[1]}"`):void 0}const mn={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f",snapshot:"#9c7fe480"};function sN(i,e,t){const n=i.generateSelector(e,{testIdAttributeName:t});let o=n.selector,a;const c=Ns(i,e,n.selector,n.elements);return c&&(o=c.selector,!c.isFormContainer&&!c.usesTextFilter&&(a={container:c.containerSelector,index:c.containerIndex,relative:c.relativeSelector})),{selector:o,scoped:a}}class rf{}const rN={recordingDrag:!0,recordingGoJSLink:!0,recordingArea:!0,recordingSketchTool:!0,recordingTableSnapshot:!0,assertingVSnapshot:!0,assertingTableCell:!0,recordingFileUpload:!1,recordingDomSnapshot:!1,recording:!1,assertingText:!1,assertingVisibility:!1,assertingValue:!1,assertingSnapshot:!1,inspecting:!1,"recording-inspecting":!1,none:!1,standby:!1,replaying:!1};class of{constructor(e,t){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=t}cursor(){return"pointer"}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){var t;Be(e),e.button===0&&(t=this._hoveredModel)!=null&&t.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){Be(e)}onPointerUp(e){Be(e)}onMouseDown(e){Be(e)}onMouseUp(e){Be(e)}onMouseMove(e){var o;Be(e);let t=this._recorder.deepEventTarget(e);if(t.isConnected||(t=null),this._hoveredElement===t)return;this._hoveredElement=t;let n=null;if(this._hoveredElement){const a=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1}),c=Ns(this._recorder.injectedScript,this._hoveredElement,a.selector,a.elements),u=c?c.selector:a.selector,h=c?c.elements:a.elements;n={selector:u,elements:h,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,u),color:this._assertVisibility?mn.assert:mn.single}}((o=this._hoveredModel)==null?void 0:o.selector)!==(n==null?void 0:n.selector)&&(this._hoveredModel=n,this._recorder.updateHighlight(n,!0))}onMouseEnter(e){Be(e)}onMouseLeave(e){Be(e);const t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){Be(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){Be(e)}onScroll(e){this._reset(!1)}_commit(e,t){var n;this._assertVisibility?(this._recorder.recordAction({name:"assertVisible",selector:e,signals:[],timestamp:be(this._recorder)}),this._recorder.setMode("recording"),(n=this._recorder.overlay)==null||n.flashToolSucceeded("assertingVisibility")):this._recorder.elementPicked(e,t)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class c0{constructor(e){this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._observer=null,this._recorder=e,this._performingActions=new Set,this._dialog=new kS(e)}cursor(){return"pointer"}_installObserverIfNeeded(){var e;this._observer||(e=this._recorder.injectedScript.document)!=null&&e.body&&(this._observer=new MutationObserver(t=>{if(this._hoveredElement)for(const n of t)for(const o of n.removedNodes)(o===this._hoveredElement||o.contains(this._hoveredElement))&&this._resetHoveredModel()}),this._observer.observe(this._recorder.injectedScript.document.body,{childList:!0,subtree:!0}))}uninstall(){var e;this._cancelFillReread(),(e=this._observer)==null||e.disconnect(),this._observer=null,this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._dialog.close()}onClick(e){var h;if(this._lastClickX=e.clientX,this._lastClickY=e.clientY,this._dialog.isShowing()){e.button===2&&e.type==="auxclick"&&Be(e);return}if(Dr(this._hoveredElement)||this._shouldIgnoreMouseEvent(e))return;const t=this._recorder.deepEventTarget(e),n=this._findFileInput(t);if(n){if(!this._activeModel){const f=((h=this._hoveredModel)==null?void 0:h.selector)??this._recorder.injectedScript.generateSelector(n,{testIdAttributeName:this._recorder.state.testIdAttributeName}).selector;this._activeModel=this._hoveredModel??{selector:f,elements:[n],color:"#dc6f6f7f"}}return}if(this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel))return;if(e.button===2&&e.type==="auxclick"){this._showActionListDialog(this._hoveredModel,e);return}const o=xs(this._recorder.deepEventTarget(e));if(o&&e.detail===1){this._performAction({name:o.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[],timestamp:be(this._recorder)});return}this._cancelPendingClickAction();let a=this._hoveredModel.selector,c=!1;if(this._recorder.pointerEventsOverrideEnabled){const f=this._recorder.deepEventTarget(e),y=this._recorder._nestedElementHandler.handleNestedClick(f,this._hoveredModel,this._recorder.injectedScript,this._recorder.state.testIdAttributeName);y&&(a=y.targetSelector,c=y.shouldAutoDisable)}let u;try{u=window!==window.top}catch{u=!0}if(e.detail===1){const f={name:"click",selector:a,position:Mr(e),signals:[],button:vc(e),modifiers:Xi(e),clickCount:e.detail,expanded:this._recorder.expandedStateOf(a),timestamp:be(this._recorder)};this._pendingClickAction={action:f,autoDisableNestedTool:c,timeout:u?0:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)},u&&this._commitPendingClickAction()}}recordNativeKeyDown(e){var o,a;if(this._dialog.isShowing()||!this._shouldGenerateKeyPressFor(e))return;const t=this._recorder.deepEventTarget(e);if(((o=this._activeModel)==null?void 0:o.elements[0])!==t&&this._onFocus(!1),((a=this._activeModel)==null?void 0:a.elements[0])!==t)return;const n=e.key===" "?xs(t):null;if(n&&e.detail===0){this._recordAction({name:n.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[],timestamp:be(this._recorder)});return}this._recordAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:Xi(e),timestamp:be(this._recorder)})}isPerformingAction(){return this._performingActions.size>0}recordNativeClick(e){const t=this._recorder.deepEventTarget(e);if(this._shouldIgnoreMouseEvent(e)||Dr(t)||this._findFileInput(t))return;let{selector:n,elements:o}=this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName});const a=Ns(this._recorder.injectedScript,t,n,o);a&&(n=a.selector);const c=xs(t);if(c){this._recordAction({name:c.checked?"check":"uncheck",selector:n,signals:[],timestamp:be(this._recorder)});return}this._recordAction({name:"click",selector:n,position:Mr(e),signals:[],button:vc(e),modifiers:Xi(e),clickCount:e.detail,timestamp:be(this._recorder)})}onDblClick(e){this._dialog.isShowing()||Dr(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:Mr(e),signals:[],button:vc(e),modifiers:Xi(e),clickCount:e.detail,expanded:this._recorder.expandedStateOf(this._hoveredModel.selector),timestamp:be(this._recorder)}),this._recorder.pointerEventsOverrideEnabled&&this._recorder.togglePointerEventsOverride())}_commitPendingClickAction(){this._pendingClickAction&&(this._performAction(this._pendingClickAction.action),this._pendingClickAction.autoDisableNestedTool&&this._recorder.pointerEventsOverrideEnabled&&this._recorder.togglePointerEventsOverride()),this._cancelPendingClickAction()}_cancelPendingClickAction(){this._pendingClickAction&&this._recorder.injectedScript.utils.builtins.clearTimeout(this._pendingClickAction.timeout),this._pendingClickAction=void 0}onContextMenu(e){if(this._dialog.isShowing()){Be(e);return}this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||this._showActionListDialog(this._hoveredModel,e)}onPointerDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onPointerUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||(this._consumeWhenAboutToPerform(e),this._activeModel=this._hoveredModel)}onMouseUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseMove(e){if(this._pointer={x:e.clientX,y:e.clientY},this._dialog.isShowing())return;const t=this._recorder.deepEventTarget(e);this._hoveredElement!==t&&(this._hoveredElement=t,this._updateModelForHoveredElement())}onMouseLeave(e){if(this._dialog.isShowing())return;const t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredElement=null,this._updateModelForHoveredElement())}onFocus(e){this._dialog.isShowing()||this._onFocus(e.isTrusted)}onInput(e){var n,o,a;if(this._dialog.isShowing())return;const t=this._recorder.deepEventTarget(e);if(t.nodeName==="INPUT"&&t.type.toLowerCase()==="file"){const c=((n=this._activeModel)==null?void 0:n.selector)??this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName}).selector,u=[...t.files||[]],h=u.map(b=>b.name),f=t.webkitdirectory===!0,y=u.map(b=>b.webkitRelativePath||""),m=(a=(o=this._activeModel)==null?void 0:o.elements)==null?void 0:a[0];if(!(!m||m===t)){this._recordAction({name:"fileChooser",selector:c,signals:[],files:h,webkitdirectory:f,relativePaths:y,timestamp:be(this._recorder)});return}this._recordAction({name:"setInputFiles",selector:c,signals:[],files:h,webkitdirectory:f,relativePaths:y,timestamp:be(this._recorder)});return}if(Dr(t)){this._recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:t.value,timestamp:be(this._recorder)});return}if(["INPUT","TEXTAREA"].includes(t.nodeName)||t.isContentEditable){if(t.nodeName==="INPUT"&&["checkbox","radio"].includes(t.type.toLowerCase())||this._consumedDueWrongTarget(e))return;const c={name:"fill",selector:this._activeModel.selector,signals:[],text:t.isContentEditable?t.innerText:t.value,isPassword:MS(t)?!0:void 0,timestamp:be(this._recorder)};this._recordAction(c);const u=t.isContentEditable?[...t.querySelectorAll('[contenteditable="false"]')]:[];u.length&&(this._fillReread=this._recorder.injectedScript.utils.builtins.setTimeout(()=>{this._fillReread=void 0,t.isConnected&&u.some(h=>!t.contains(h))&&t.innerText!==c.text&&this._recordAction({...c,text:t.innerText})},0))}if(t.nodeName==="SELECT"){const c=t;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...c.selectedOptions].map(u=>u.value),signals:[],timestamp:be(this._recorder)})}}onKeyDown(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(this._actionInProgress(e)){this._expectProgrammaticKeyUp=!0;return}if(!this._consumedDueWrongTarget(e)){if(e.key===" "){const t=xs(this._recorder.deepEventTarget(e));if(t&&e.detail===0){this._performAction({name:t.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[],timestamp:be(this._recorder)});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:Xi(e),timestamp:be(this._recorder)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){Be(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,t){Be(t);const n=Mr(t),o=[{title:"Click",cb:()=>this._performAction({name:"click",selector:e.selector,position:n,signals:[],button:"left",modifiers:0,clickCount:1,expanded:this._recorder.expandedStateOf(e.selector),timestamp:be(this._recorder)})},{title:"Right click",cb:()=>this._performAction({name:"click",selector:e.selector,position:n,signals:[],button:"right",modifiers:0,clickCount:1,expanded:this._recorder.expandedStateOf(e.selector),timestamp:be(this._recorder)})},{title:"Double click",cb:()=>this._performAction({name:"click",selector:e.selector,position:n,signals:[],button:"left",modifiers:0,clickCount:2,expanded:this._recorder.expandedStateOf(e.selector),timestamp:be(this._recorder)})},{title:"Hover",cb:()=>this._performAction({name:"hover",selector:e.selector,position:n,signals:[],timestamp:be(this._recorder)})},{title:"Pick locator",cb:()=>this._recorder.elementPicked(e.selector,e)}],a=this._recorder.document.createElement("x-pw-action-list");a.setAttribute("role","list"),a.setAttribute("aria-label","Choose action");for(const f of o){const y=this._recorder.document.createElement("x-pw-action-item");y.setAttribute("role","listitem"),y.textContent=f.title,y.setAttribute("aria-label",f.title),y.addEventListener("click",()=>{this._dialog.close(),f.cb()}),a.appendChild(y)}const c=this._dialog.show({label:"Choose action",body:a,autosize:!0}),u=this._recorder.highlight.firstTooltipBox()||e.elements[0].getBoundingClientRect(),h=this._recorder.highlight.tooltipPosition(u,c);this._dialog.moveTo(h.anchorTop,h.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const t=NS(this._recorder.document);if(t===this._recorder.document.body)return;const n=t?this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;let o=n==null?void 0:n.selector,a=n==null?void 0:n.elements;if(t&&n){const c=Ns(this._recorder.injectedScript,t,n.selector,n.elements);c&&(o=c.selector,a=c.elements)}this._activeModel=n&&o?{...n,selector:o,elements:a,color:mn.action}:null,e&&(this._hoveredElement=t,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const t=this._recorder.deepEventTarget(e),n=t.nodeName;return!!(n==="SELECT"||n==="OPTION"||n==="INPUT"&&["date","range"].includes(t.type))}_actionInProgress(e){const t=e instanceof KeyboardEvent,n=e instanceof MouseEvent||e instanceof PointerEvent;for(const o of this._performingActions)if(t&&o.name==="press"&&e.key===o.key||n&&(o.name==="click"||o.name==="hover"||o.name==="check"||o.name==="uncheck"))return!0;return Be(e),!1}_consumedDueToNoModel(e,t){return t?!1:(Be(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(Be(e),!0)}_findFileInput(e){if(e.nodeName==="INPUT"&&e.type.toLowerCase()==="file")return e;if(e.nodeName==="LABEL"){const n=e.htmlFor;if(n){const o=e.ownerDocument.getElementById(n);if(o&&o.nodeName==="INPUT"&&o.type.toLowerCase()==="file")return o}}const t=e.querySelector('input[type="file"]');return t||null}_consumeWhenAboutToPerform(e){this._performingActions.size||Be(e)}_recordAction(e){this._cancelFillReread(),this._recorder.recordAction(e)}_cancelFillReread(){this._fillReread!==void 0&&this._recorder.injectedScript.utils.builtins.clearTimeout(this._fillReread),this._fillReread=void 0}_performAction(e){this._cancelFillReread(),this._recorder.updateHighlight(null,!1),this._performingActions.add(e);const t=this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1),this._refreshHoverUnderPointer()});this._recorder.injectedScript.isUnderTest&&t.then(()=>{console.error("Action performed for test: "+JSON.stringify({hovered:this._hoveredModel?this._hoveredModel.selector:null,active:this._activeModel?this._activeModel.selector:null}))})}_shouldGenerateKeyPressFor(e){if(typeof e.key!="string"||e.key==="Enter"&&(this._recorder.deepEventTarget(e).nodeName==="TEXTAREA"||this._recorder.deepEventTarget(e).isContentEditable)||["Backspace","Delete","AltGraph"].includes(e.key)||e.key==="@"&&e.code==="KeyL")return!1;if(navigator.platform.includes("Mac")){if(e.key==="v"&&e.metaKey)return!1}else if(e.key==="v"&&e.ctrlKey||e.key==="Insert"&&e.shiftKey)return!1;if(["Shift","Control","Meta","Alt","Process"].includes(e.key))return!1;const t=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!t?!!xs(this._recorder.deepEventTarget(e)):!0}_refreshHoverUnderPointer(){var t,n;if(!this._pointer||this._performingActions.size||this._dialog.isShowing())return;if(!((t=this._hoveredElement)!=null&&t.isConnected)){this._updateModelForHoveredElement();return}const e=Ic(this._recorder.document,this._pointer.x,this._pointer.y);!e||e.nodeName==="X-PW-GLASS"||(n=this._recorder.overlay)!=null&&n.contains(e)||(this._hoveredElement=e,this._updateModelForHoveredElement())}_updateModelForHoveredElement(){if(this._installObserverIfNeeded(),this._performingActions.size)return;if(!this._hoveredElement||!this._hoveredElement.isConnected){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!0);return}let{selector:e,elements:t}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});const n=Ns(this._recorder.injectedScript,this._hoveredElement,e,t);n&&(e=n.selector,t=n.elements),!(this._hoveredModel&&this._hoveredModel.selector===e)&&(this._hoveredModel=e?{selector:e,elements:t,color:mn.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class oN{constructor(e){this._recorder=e}install(){this._recorder.clearHighlight()}uninstall(){}onClick(e){const t=this._recorder.deepEventTarget(e);if(Dr(t)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const n=xs(t),{ariaSnapshot:o,selector:a,ref:c,scoped:u}=this._ariaSnapshot(t);if(n&&e.detail===1){this._recorder.recordAction({name:n.checked?"check":"uncheck",selector:a,ref:c,scoped:u,signals:[],ariaSnapshot:o,timestamp:be(this._recorder)});return}this._recorder.recordAction({name:"click",selector:a,ref:c,scoped:u,ariaSnapshot:o,position:Mr(e),signals:[],button:vc(e),modifiers:Xi(e),clickCount:e.detail,timestamp:be(this._recorder)})}onContextMenu(e){const t=this._recorder.deepEventTarget(e),{ariaSnapshot:n,selector:o,ref:a,scoped:c}=this._ariaSnapshot(t);this._recorder.recordAction({name:"click",selector:o,ref:a,scoped:c,ariaSnapshot:n,position:Mr(e),signals:[],button:"right",modifiers:Xi(e),clickCount:1,timestamp:be(this._recorder)})}onInput(e){const t=this._recorder.deepEventTarget(e),{ariaSnapshot:n,selector:o,ref:a,scoped:c}=this._ariaSnapshot(t);if(Dr(t)){this._recorder.recordAction({name:"fill",selector:o,ref:a,scoped:c,ariaSnapshot:n,signals:[],text:t.value,timestamp:be(this._recorder)});return}if(["INPUT","TEXTAREA"].includes(t.nodeName)||t.isContentEditable){if(t.nodeName==="INPUT"&&["checkbox","radio"].includes(t.type.toLowerCase()))return;this._recorder.recordAction({name:"fill",ref:a,selector:o,scoped:c,ariaSnapshot:n,signals:[],text:t.isContentEditable?t.innerText:t.value,isPassword:MS(t)?!0:void 0,timestamp:be(this._recorder)});return}if(t.nodeName==="SELECT"){const u=t;this._recorder.recordAction({name:"select",selector:o,ref:a,scoped:c,ariaSnapshot:n,options:[...u.selectedOptions].map(h=>h.value),signals:[],timestamp:be(this._recorder)});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const t=this._recorder.deepEventTarget(e),{ariaSnapshot:n,selector:o,ref:a,scoped:c}=this._ariaSnapshot(t);if(e.key===" "){const u=xs(t);if(u&&e.detail===0){this._recorder.recordAction({name:u.checked?"uncheck":"check",selector:o,ref:a,scoped:c,ariaSnapshot:n,signals:[],timestamp:be(this._recorder)});return}}this._recorder.recordAction({name:"press",selector:o,ref:a,scoped:c,ariaSnapshot:n,signals:[],key:e.key,modifiers:Xi(e),timestamp:be(this._recorder)})}_shouldIgnoreMouseEvent(e){const t=this._recorder.deepEventTarget(e),n=t.nodeName;return!!(n==="SELECT"||n==="OPTION"||n==="INPUT"&&["date","range"].includes(t.type))}_shouldGenerateKeyPressFor(e){if(typeof e.key!="string"||e.key==="Enter"&&(this._recorder.deepEventTarget(e).nodeName==="TEXTAREA"||this._recorder.deepEventTarget(e).isContentEditable)||["Backspace","Delete","AltGraph"].includes(e.key)||e.key==="@"&&e.code==="KeyL")return!1;if(navigator.platform.includes("Mac")){if(e.key==="v"&&e.metaKey)return!1}else if(e.key==="v"&&e.ctrlKey||e.key==="Insert"&&e.shiftKey)return!1;if(["Shift","Control","Meta","Alt","Process"].includes(e.key))return!1;const t=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!t?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"||e.isContentEditable)}_ariaSnapshot(e){const{ariaSnapshot:t,refs:n}=this._recorder.injectedScript.ariaSnapshotForRecorder(),o=e?n.get(e):void 0;let a,c;if(e){const u=sN(this._recorder.injectedScript,e,this._recorder.state.testIdAttributeName);a=u.selector,c=u.scoped}return{ariaSnapshot:t,selector:a,ref:o,scoped:c}}}class af{constructor(e,t){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=t,this._dialog=new kS(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){Be(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const t=this._recorder.deepEventTarget(e);this._elementHasValue(t)?e.preventDefault():Be(e)}onPointerDown(e){Be(e)}onPointerUp(e){var n;const t=(n=this._hoverHighlight)==null?void 0:n.elements[0];this._kind==="value"&&t&&(t.nodeName==="INPUT"||t.nodeName==="SELECT")&&t.disabled&&this._commitAssertValue()}onMouseMove(e){var n;if(this._dialog.isShowing())return;const t=this._recorder.deepEventTarget(e);if(((n=this._hoverHighlight)==null?void 0:n.elements[0])!==t){if(this._kind==="text"||this._kind==="snapshot")this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,t).full?{elements:[t],selector:"",color:mn.assert}:null;else if(this._elementHasValue(t)){const o=this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:o.selector,elements:o.elements,color:mn.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),Be(e)}onScroll(e){this._recorder.updateHighlight(this._hoverHighlight,!1)}_elementHasValue(e){return e.nodeName==="TEXTAREA"||e.nodeName==="SELECT"||e.nodeName==="INPUT"&&!["button","image","reset","submit"].includes(e.type)}_generateAction(){var t;this._textCache.clear();const e=(t=this._hoverHighlight)==null?void 0:t.elements[0];if(!e)return null;if(this._kind==="value"){if(!this._elementHasValue(e))return null;const{selector:n}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName==="INPUT"&&["checkbox","radio"].includes(e.type.toLowerCase())?{name:"assertChecked",selector:n,signals:[],checked:!e.checked,timestamp:be(this._recorder)}:{name:"assertValue",selector:n,signals:[],value:e.value,timestamp:be(this._recorder)}}else if(this._kind==="snapshot"){const n=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:n.selector,elements:n.elements,color:mn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"codegen"}),timestamp:be(this._recorder)}}else{const n=e.closest("td"),o=n&&n.closest("tr");let a=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!o});const c=Ns(this._recorder.injectedScript,e,a.selector,a.elements);return c&&(a={selector:c.selector,selectors:[c.selector],elements:c.elements}),this._hoverHighlight={selector:a.selector,elements:a.elements,color:mn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertText",selector:this._hoverHighlight.selector,signals:[],text:this._recorder.injectedScript.utils.elementText(this._textCache,e).normalized,substring:!0,timestamp:be(this._recorder)}}}_renderValue(e){return(e==null?void 0:e.name)==="assertText"?this._recorder.injectedScript.utils.normalizeWhiteSpace(e.text):(e==null?void 0:e.name)==="assertChecked"?String(e.checked):(e==null?void 0:e.name)==="assertValue"?e.value:(e==null?void 0:e.name)==="assertSnapshot"?e.ariaSnapshot:""}_commit(){!this._action||!this._dialog.isShowing()||(this._dialog.close(),this._recorder.recordAction(this._action),this._recorder.setMode("recording"),Hk())}_showDialog(){var e,t,n,o;(e=this._hoverHighlight)!=null&&e.elements[0]&&(jk(),this._action=this._generateAction(),((t=this._action)==null?void 0:t.name)==="assertText"?this._showTextDialog(this._action):((n=this._action)==null?void 0:n.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(o=this._recorder.overlay)==null||o.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const t=this._recorder.document.createElement("textarea");t.setAttribute("spellcheck","false"),t.value=this._renderValue(e),t.classList.add("text-editor");const n=()=>{var m;const u=this._recorder.injectedScript.utils.normalizeWhiteSpace(t.value),h=(m=this._hoverHighlight)==null?void 0:m.elements[0];if(!h)return;e.text=u;const f=this._recorder.injectedScript.utils.elementText(this._textCache,h).normalized,y=u&&f.includes(u);t.classList.toggle("does-not-match",!y)};t.addEventListener("input",n);const a=this._dialog.show({label:"Assert that element contains text",body:t,onCommit:()=>this._commit()}),c=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),a);this._dialog.moveTo(c.anchorTop,c.anchorLeft),t.focus()}_commitAssertValue(){var t;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(t=this._recorder.overlay)==null||t.flashToolSucceeded("assertingValue"))}}class aN{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._snapshotToggleTime=null,this._recorder=e;const t=this._recorder.document;this._overlayElement=t.createElement("x-pw-overlay");const n=t.createElement("x-pw-tools-list");this._overlayElement.appendChild(n),this._dragHandle=t.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(t.createElement("x-div")),n.appendChild(this._dragHandle),this._recordToggle=this._recorder.document.createElement("x-pw-tool-item"),this._recordToggle.title="Record",this._recordToggle.classList.add("record"),this._recordToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._recordToggle),this._pickLocatorToggle=this._recorder.document.createElement("x-pw-tool-item"),this._pickLocatorToggle.title="Pick locator",this._pickLocatorToggle.classList.add("pick-locator"),this._pickLocatorToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._pickLocatorToggle),this._modularityToggle=this._recorder.document.createElement("x-pw-tool-item"),this._modularityToggle.title="Mark block",this._modularityToggle.classList.add("modular"),this._modularityToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._modularityToggle),this._assertApiPayloadToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertApiPayloadToggle.title="Assert API Request",this._assertApiPayloadToggle.classList.add("assert-api-payload"),this._assertApiPayloadToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._assertApiPayloadToggle),this._fileUploadToggle=this._recorder.document.createElement("x-pw-tool-item"),this._fileUploadToggle.title="Upload file",this._fileUploadToggle.classList.add("file-upload"),this._fileUploadToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._fileUploadToggle),this._dragRecordToggle=this._recorder.document.createElement("x-pw-tool-item"),this._dragRecordToggle.title="Drag and drop",this._dragRecordToggle.classList.add("drag-record"),this._dragRecordToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._dragRecordToggle),this._areaSelectToggle=this._recorder.document.createElement("x-pw-tool-item"),this._areaSelectToggle.title="Select area",this._areaSelectToggle.classList.add("area-select"),this._areaSelectToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._areaSelectToggle),this._sketchToolToggle=this._recorder.document.createElement("x-pw-tool-item"),this._sketchToolToggle.title="Sketch Tool",this._sketchToolToggle.classList.add("sketch-tool"),this._sketchToolToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._sketchToolToggle),this._gojsLinkToggle=this._recorder.document.createElement("x-pw-tool-item"),this._gojsLinkToggle.title="GoJS Link (click source node, then target node)",this._gojsLinkToggle.classList.add("gojs-link"),this._gojsLinkToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._gojsLinkToggle),this._pointerEventsToggle=this._recorder.document.createElement("x-pw-tool-item"),this._pointerEventsToggle.title="Nested element selection",this._pointerEventsToggle.classList.add("pointer-events"),this._pointerEventsToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._pointerEventsToggle),this._assertVisibilityToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertVisibilityToggle.title="Assert visibility",this._assertVisibilityToggle.classList.add("visibility"),this._assertVisibilityToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._assertVisibilityToggle),this._assertTextToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertTextToggle.title="Assert text",this._assertTextToggle.classList.add("text"),this._assertTextToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._assertTextToggle),this._assertValuesToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertValuesToggle.title="Assert value",this._assertValuesToggle.classList.add("value"),this._assertValuesToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._assertValuesToggle),this._tableSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._tableSnapshotToggle.title="Assert table cell",this._tableSnapshotToggle.classList.add("table"),this._tableSnapshotToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._tableSnapshotToggle),this._assertVSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertVSnapshotToggle.title="Snapshot: Double-toggle for page, Click for element, Drag for region",this._assertVSnapshotToggle.classList.add("visual-snapshot"),this._assertVSnapshotToggle.appendChild(this._recorder.document.createElement("x-div")),n.appendChild(this._assertVSnapshotToggle),this._assertSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._jsonMarkerButton=this._recorder.document.createElement("x-pw-tool-item"),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){DS(this._listeners),this._listeners=[he(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),he(this._recordToggle,"click",()=>{this._recordToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="none"||this._recorder.state.mode==="standby"||this._recorder.state.mode==="inspecting"?"recording":"standby")}),he(this._pickLocatorToggle,"click",()=>{if(this._pickLocatorToggle.classList.contains("disabled"))return;const e={inspecting:"standby",none:"inspecting",standby:"inspecting",recording:"recording-inspecting","recording-inspecting":"recording",assertingText:"recording-inspecting",assertingVisibility:"recording-inspecting",assertingValue:"recording-inspecting",assertingSnapshot:"recording-inspecting",assertingVSnapshot:"recording-inspecting",assertingTableCell:"recording-inspecting",recordingDrag:"recording",recordingGoJSLink:"recording",recordingArea:"recording",recordingFileUpload:"recording",recordingTableSnapshot:"recording",recordingDomSnapshot:"recording",recordingSketchTool:"recording"};this._recorder.setMode(e[this._recorder.state.mode])}),he(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),he(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),he(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),he(this._assertSnapshotToggle,"click",()=>{this._assertSnapshotToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingSnapshot"?"recording":"assertingSnapshot")}),he(this._assertVSnapshotToggle,"click",()=>{if(this._assertVSnapshotToggle.classList.contains("disabled"))return;if(this._recorder.state.mode==="assertingVSnapshot"){const n=Date.now();this._snapshotToggleTime&&n-this._snapshotToggleTime<1500&&Gi.getNextCounter(this._recorder,"page").then(o=>{const a={name:"visualSnapshot",snapshotType:"page",filename:`page-${String(o).padStart(3,"0")}.png`,fullPage:!0,signals:[],timestamp:be(this._recorder)};this._recorder.recordAction(a),this.flashToolSucceeded("assertingVSnapshot")}),this._snapshotToggleTime=null,this._recorder.setMode("recording")}else this._snapshotToggleTime=Date.now(),this._recorder.setMode("assertingVSnapshot")}),he(this._tableSnapshotToggle,"click",()=>{this._tableSnapshotToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingTableCell"?"recording":"assertingTableCell")}),he(this._fileUploadToggle,"click",()=>{this._fileUploadToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="recordingFileUpload"?"recording":"recordingFileUpload")}),he(this._pointerEventsToggle,"click",()=>{this._recorder.togglePointerEventsOverride()}),he(this._modularityToggle,"click",()=>{if(this._modularityToggle.classList.contains("disabled"))return;this._recorder.modularityToggled=!this._recorder.modularityToggled;let e="endBlock";this._recorder.modularityToggled&&(e="beginBlock");const t={name:e,timestamp:be(this._recorder),sequence:Math.floor(Math.random()*1e6),signals:[]};this._recorder.recordAction(t)}),he(this._assertApiPayloadToggle,"click",()=>{if(this._assertApiPayloadToggle.classList.contains("disabled"))return;const e={name:"assertApiRequest",timestamp:be(this._recorder),signals:[]};this._recorder.recordAction(e),this._assertApiPayloadToggle.classList.add("toggled"),setTimeout(()=>this._assertApiPayloadToggle.classList.remove("toggled"),1500)}),he(this._dragRecordToggle,"click",()=>{this._dragRecordToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="recordingDrag"?"recording":"recordingDrag")}),he(this._areaSelectToggle,"click",()=>{this._recorder.state.mode==="recordingArea"?this._recorder.setMode("recording"):this._recorder.setMode("recordingArea")}),he(this._sketchToolToggle,"click",()=>{this._sketchToolToggle.classList.contains("disabled")||(this._recorder.state.mode==="recordingSketchTool"?this._recorder.setMode("recording"):this._recorder.setMode("recordingSketchTool"))}),he(this._gojsLinkToggle,"click",()=>{if(!this._gojsLinkToggle.classList.contains("disabled")){const e=this._recorder.state.mode;this._recorder.setMode(e==="recordingGoJSLink"?"recording":"recordingGoJSLink")}})]}install(){this._recorder.highlight.appendChild(this._overlayElement),this._refreshListeners(),this._updateVisualPosition();const e=t=>{const n=t.target;n&&(n===this._dragHandle||this._dragHandle.contains(n))&&(t.type==="mousedown"||t.type==="mousemove"||t.type==="mouseup"||t.type==="pointerdown"||t.type==="pointermove"||t.type==="pointerup")||(t.stopPropagation(),t.preventDefault())};this._listeners.push(he(this._overlayElement,"mousedown",e,!1),he(this._overlayElement,"mouseup",e,!1),he(this._overlayElement,"mousemove",e,!1),he(this._overlayElement,"pointerdown",e,!1),he(this._overlayElement,"pointerup",e,!1),he(this._overlayElement,"pointermove",e,!1),he(this._overlayElement,"click",e,!1),he(this._overlayElement,"dblclick",e,!1),he(this._overlayElement,"contextmenu",e,!1),he(this._overlayElement,"focus",e,!1),he(this._overlayElement,"blur",e,!1))}contains(e){return this._recorder.injectedScript.utils.isInsideScope(this._overlayElement,e)}setUIState(e){const t=e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="assertingVSnapshot"||e.mode==="assertingTableCell"||e.mode==="recording-inspecting"||e.mode==="recordingDrag"||e.mode==="recordingGoJSLink"||e.mode==="recordingArea"||e.mode==="recordingFileUpload"||e.mode==="recordingSketchTool";this._recordToggle.classList.toggle("toggled",t),this._recordToggle.title=t?"Stop Recording":"Start Recording",this._pickLocatorToggle.classList.toggle("toggled",e.mode==="inspecting"||e.mode==="recording-inspecting"),this._pickLocatorToggle.classList.toggle("disabled",e.mode==="recordingArea"),this._assertVisibilityToggle.classList.toggle("toggled",e.mode==="assertingVisibility"),this._assertVisibilityToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertTextToggle.classList.toggle("toggled",e.mode==="assertingText"),this._assertTextToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertValuesToggle.classList.toggle("toggled",e.mode==="assertingValue"),this._assertValuesToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertSnapshotToggle.classList.toggle("toggled",e.mode==="assertingSnapshot"),this._assertSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertVSnapshotToggle.classList.toggle("toggled",e.mode==="assertingVSnapshot"),this._assertVSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._tableSnapshotToggle.classList.toggle("toggled",e.mode==="assertingTableCell"),this._tableSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._fileUploadToggle.classList.toggle("toggled",e.mode==="recordingFileUpload"),this._fileUploadToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._modularityToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertApiPayloadToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._dragRecordToggle.classList.toggle("toggled",e.mode==="recordingDrag"),this._dragRecordToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._areaSelectToggle.classList.toggle("toggled",e.mode==="recordingArea"),this._areaSelectToggle.classList.toggle("disabled",e.mode==="none"),this._sketchToolToggle.classList.toggle("toggled",e.mode==="recordingSketchTool"),this._sketchToolToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._gojsLinkToggle.classList.toggle("toggled",e.mode==="recordingGoJSLink"),this._gojsLinkToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this.updateToolbar(),this._offsetX!==e.overlay.offsetX&&(this._offsetX=e.overlay.offsetX,this._updateVisualPosition()),e.mode==="none"?this._hideOverlay():this._showOverlay()}updateToolbar(){this._pointerEventsToggle.classList.toggle("toggled",this._recorder.pointerEventsOverrideEnabled)}flashToolSucceeded(e){let t;e==="assertingVisibility"?t=this._assertVisibilityToggle:e==="assertingSnapshot"?t=this._assertSnapshotToggle:e==="assertingVSnapshot"?t=this._assertVSnapshotToggle:e==="assertingTableCell"?t=this._tableSnapshotToggle:e==="fileUpload"?t=this._fileUploadToggle:e==="recordingArea"?t=this._areaSelectToggle:e==="recordingTableSnapshot"?t=this._tableSnapshotToggle:e==="recordingSketchTool"?t=this._sketchToolToggle:t=this._assertValuesToggle,t.classList.add("succeeded"),this._recorder.injectedScript.utils.builtins.setTimeout(()=>t.classList.remove("succeeded"),2e3)}_hideOverlay(){this._overlayElement.setAttribute("hidden","true")}_showOverlay(){this._overlayElement.hasAttribute("hidden")&&(this._overlayElement.removeAttribute("hidden"),this._updateVisualPosition())}_updateVisualPosition(){this._measure=this._overlayElement.getBoundingClientRect(),this._overlayElement.style.left=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2+this._offsetX+"px"}onMouseMove(e){if(!e.buttons)return this._dragState=void 0,!1;if(this._dragState){this._offsetX=this._dragState.offsetX+e.clientX-this._dragState.dragStart.x;const t=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-t,Math.min(t,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),Be(e),!0}return!1}onMouseUp(e){return this._dragState?(Be(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,Be(e),!0):!1}onDblClick(e){return!1}updateModularityToggleState(e){this._modularityToggle.classList.toggle("toggled",e)}}class lN{constructor(e,t){var n,o;this._listeners=[],this._recordedActionCount=0,this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.state={mode:"none",testIdAttributeName:"data-testid",language:"javascript",overlay:{offsetX:0},modularityToggled:!1},this._delegate={},this._modularityToggled=!1,this.document=e.document,this.injectedScript=e,this.highlight=e.createHighlight(),this._nestedElementHandler=new dk(this.document),this._modalHandler=new $k(this.document),this._modalHandler.setOnModalOpen(({selector:a})=>{this.recordAction({name:"modalOpen",selector:a,signals:[],timestamp:be(this)})}),this._modalHandler.setOnModalClose(({selector:a})=>{this.recordAction({name:"modalClose",selector:a,signals:[],timestamp:be(this)})}),(t==null?void 0:t.recorderMode)!=="api"&&(this._hoverRevealTracker=new eN(e)),this._iframeHandler=new Bk(this.document),this._iframeHandler.setOnIframeLoad(({selector:a})=>{this.recordAction({name:"iframeLoad",selector:a,signals:[],timestamp:be(this)})}),this._tools={none:new rf,standby:new rf,inspecting:new of(this,!1),recording:(t==null?void 0:t.recorderMode)==="api"?new oN(this):new c0(this),"recording-inspecting":new of(this,!1),assertingText:new af(this,"text"),assertingVisibility:new of(this,!0),assertingValue:new af(this,"value"),assertingSnapshot:new af(this,"snapshot"),assertingVSnapshot:new Gi(this),assertingTableCell:new Ak(this),recordingDrag:new Rf(this),recordingGoJSLink:new pk(this),recordingArea:new Mk(this),recordingFileUpload:new yk(this),recordingTableSnapshot:new Sk(this),recordingDomSnapshot:new Lk(this),recordingSketchTool:new bk(this),replaying:new rf},this._currentTool=this._tools.none,(o=(n=this._currentTool).install)==null||o.call(n),e.window.top===e.window&&(t==null?void 0:t.recorderMode)!=="api"&&(this.overlay=new aN(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
|
|
666
|
+
body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
|
|
667
|
+
body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
|
|
668
|
+
body[data-pw-cursor=crosshair] *, body[data-pw-cursor=crosshair] *::after { cursor: crosshair !important; }
|
|
669
|
+
body[data-pw-cursor=grab] *, body[data-pw-cursor=grab] *::after { cursor: grab !important; }
|
|
670
|
+
`),this.installListeners(),this._installFileUploadHooks(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&(console.error("Recorder script ready for test"),e.window.__pw_recorderToggleNestedElements=()=>{this.togglePointerEventsOverride()}),e.consoleApi.install()}get modularityToggled(){return this._modularityToggled}set modularityToggled(e){this._modularityToggled=e;try{typeof window.__pw_recorderSetModularityToggled=="function"?window.__pw_recorderSetModularityToggled(e):console.warn("Modularity toggle binding not available yet, state may be out of sync")}catch(t){console.error("Failed to set modularity toggle on server:",t)}}get pointerEventsOverrideEnabled(){return this._nestedElementHandler.enabled}togglePointerEventsOverride(){var e;this._nestedElementHandler.toggle(),(e=this.overlay)==null||e.updateToolbar()}installListeners(){var n,o;DS(this._listeners),this._listeners=[he(this.document,"click",a=>this._onClick(a),!0),he(this.document,"auxclick",a=>this._onClick(a),!0),he(this.document,"dblclick",a=>this._onDblClick(a),!0),he(this.document,"contextmenu",a=>this._onContextMenu(a),!0),he(this.document,"dragstart",a=>this._onDragStart(a),!0),he(this.document,"input",a=>this._onInput(a),!0),he(this.document,"keydown",a=>this._onKeyDown(a),!0),he(this.document,"keyup",a=>this._onKeyUp(a),!0),he(this.document,"pointerdown",a=>this._onPointerDown(a),!0),he(this.document,"pointermove",a=>this._onPointerMove(a),!0),he(this.document,"pointerup",a=>this._onPointerUp(a),!0),he(this.document,"mousedown",a=>this._onMouseDown(a),!0),he(this.document,"mouseup",a=>this._onMouseUp(a),!0),he(this.document,"mousemove",a=>this._onMouseMove(a),!0),he(this.document,"mouseleave",a=>this._onMouseLeave(a),!0),he(this.document,"mouseenter",a=>this._onMouseEnter(a),!0),he(this.document,"focus",a=>this._onFocus(a),!0),he(this.document,"scroll",a=>this._onScroll(a),!0)],this.highlight.install();let e;const t=()=>{if(this.highlight.install(),this.overlay){const a=this.overlay._overlayElement,c=this.highlight._glassPaneElement,u=c&&c.isConnected,h=a&&!a.isConnected;u&&h&&this.overlay.install()}e=this.injectedScript.utils.builtins.setTimeout(t,500)};if(e=this.injectedScript.utils.builtins.setTimeout(t,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(LS(this.document,Z2)),this.overlay){const a=this.highlight._glassPaneElement;a&&a.isConnected&&this.overlay.install()}(o=(n=this._currentTool)==null?void 0:n.install)==null||o.call(n),this.document.adoptedStyleSheets.push(this._stylesheet)}_installFileUploadHooks(){_k(this,this._listeners)}_switchCurrentTool(){var a,c,u,h,f,y,m;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(c=(a=this._currentTool).uninstall)==null||c.call(a),this.clearHighlight(),this._currentTool=e,(h=(u=this._currentTool).install)==null||h.call(u);const t=NS(this.document);let n;this.state.mode==="recording"?n=this._currentTool:this._armedUserInputTarget(t)&&(n=this._armedRecordTool()),n&&t&&t!==this.document.body&&t!==this.document.documentElement&&((f=n.onFocus)==null||f.call(n,new FocusEvent("focus")));const o=(y=e.cursor)==null?void 0:y.call(e);o&&((m=this.injectedScript.document.body)==null||m.setAttribute("data-pw-cursor",o))}setUIState(e,t){var a,c,u,h;this._delegate=t,nk(this.document,e.mode!=="none"&&e.mode!=="standby"&&e.mode!=="inspecting"&&e.mode!=="replaying"),e.actionPoint&&this.state.actionPoint&&e.actionPoint.x===this.state.actionPoint.x&&e.actionPoint.y===this.state.actionPoint.y||!e.actionPoint&&!this.state.actionPoint||(e.actionPoint?this.highlight.showActionPoint(e.actionPoint.x,e.actionPoint.y):this.highlight.hideActionPoint()),e.modularityToggled!==this._modularityToggled&&(this._modularityToggled=e.modularityToggled,(a=this.overlay)==null||a.updateModularityToggleState(this._modularityToggled)),this.state=e,this.highlight.setLanguage(e.language),this._switchCurrentTool(),(c=this.overlay)==null||c.setUIState(e),e.mode==="recording"?(this._modalHandler.enable(),this._iframeHandler.enable()):(this._modalHandler.disable(),this._iframeHandler.disable()),e.mode==="recording"||e.mode==="recordingDrag"?(u=this._hoverRevealTracker)==null||u.enable():(h=this._hoverRevealTracker)==null||h.disable();let n="noop";if(e.actionSelector!==this._lastHighlightedSelector){const f=e.actionSelector?dN(this.injectedScript,e.language,e.actionSelector,this.document):null;n=f!=null&&f.length?f:"clear",this._lastHighlightedSelector=f!=null&&f.length?e.actionSelector:void 0}const o=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==o){const f=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(f.length){const y=f.length>1?mn.multiple:mn.single;n=f.map(m=>({element:m,color:y})),this._lastHighlightedAriaTemplateJSON=o}else this._lastHighlightedSelector||(n="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}n==="clear"?this.highlight.clearHighlight():n!=="noop"&&this.highlight.updateHighlight(n)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var n,o,a;if(!e.isTrusted||(n=this.overlay)!=null&&n.onClick(e)||this._ignoreOverlayEvent(e))return;const t=e.defaultPrevented;(a=(o=this._currentTool).onClick)==null||a.call(o,e),this._recordClickLetThrough(e,t)}_onDblClick(e){var t,n,o;e.isTrusted&&((t=this.overlay)!=null&&t.onDblClick(e)||this._ignoreOverlayEvent(e)||(o=(n=this._currentTool).onDblClick)==null||o.call(n,e))}_onContextMenu(e){var t,n;e.isTrusted&&((n=(t=this._currentTool).onContextMenu)==null||n.call(t,e))}_onDragStart(e){var t,n;e.isTrusted&&(this._ignoreOverlayEvent(e)||(n=(t=this._currentTool).onDragStart)==null||n.call(t,e))}_onPointerDown(e){var t,n;e.isTrusted&&(this._ignoreOverlayEvent(e)||((n=(t=this._currentTool).onPointerDown)==null||n.call(t,e),this._armedPointerDown=this._armedRecordTool()&&e.button===0?{target:this.deepEventTarget(e),actionCount:this._recordedActionCount}:void 0))}_onPointerUp(e){var t,n;e.isTrusted&&(this._ignoreOverlayEvent(e)||(n=(t=this._currentTool).onPointerUp)==null||n.call(t,e))}_onPointerMove(e){var t,n;e.isTrusted&&(this._ignoreOverlayEvent(e)||(n=(t=this._currentTool).onPointerMove)==null||n.call(t,e))}_onMouseDown(e){var t,n;e.isTrusted&&(this._ignoreOverlayEvent(e)||(n=(t=this._currentTool).onMouseDown)==null||n.call(t,e))}_onMouseUp(e){var t,n,o;e.isTrusted&&((t=this.overlay)!=null&&t.onMouseUp(e)||this._ignoreOverlayEvent(e)||(o=(n=this._currentTool).onMouseUp)==null||o.call(n,e))}_onMouseMove(e){var t,n,o;e.isTrusted&&((t=this.overlay)!=null&&t.onMouseMove(e)||this._ignoreOverlayEvent(e)||(o=(n=this._currentTool).onMouseMove)==null||o.call(n,e))}_onMouseEnter(e){var t,n;e.isTrusted&&(this._ignoreOverlayEvent(e)||(n=(t=this._currentTool).onMouseEnter)==null||n.call(t,e))}_onMouseLeave(e){var t,n;e.isTrusted&&(this._ignoreOverlayEvent(e)||(n=(t=this._currentTool).onMouseLeave)==null||n.call(t,e))}_onFocus(e){var t,n,o,a;this._ignoreOverlayEvent(e)||((n=(t=this._currentTool).onFocus)==null||n.call(t,e),this._armedUserInputTarget(this.deepEventTarget(e))&&((a=(o=this._armedRecordTool())==null?void 0:o.onFocus)==null||a.call(o,e)))}_onScroll(e){var t,n;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(n=(t=this._currentTool).onScroll)==null||n.call(t,e))}_onInput(e){var n,o,a,c,u,h;if(!e.isTrusted||this._ignoreOverlayEvent(e))return;(o=(n=this._currentTool).onInput)==null||o.call(n,e);const t=this.deepEventTarget(e);uN(t)&&this._armedUserInputTarget(t)&&((c=(a=this._currentTool).beforeArmedTyping)==null||c.call(a,t),(h=(u=this._armedRecordTool())==null?void 0:u.onInput)==null||h.call(u,e))}_onKeyDown(e){var n,o;if(!e.isTrusted||this._ignoreOverlayEvent(e))return;const t=e.defaultPrevented;(o=(n=this._currentTool).onKeyDown)==null||o.call(n,e),this._forwardKey(e,t)}_onKeyUp(e){var t,n;e.isTrusted&&(this._ignoreOverlayEvent(e)||(n=(t=this._currentTool).onKeyUp)==null||n.call(t,e))}_armedRecordTool(){const e=this._tools.recording;return rN[this.state.mode]&&e instanceof c0?e:void 0}_armedUserInputTarget(e){var t,n;return!!this._armedRecordTool()&&!cN(e)&&!((n=(t=this._currentTool).ownsEventTarget)!=null&&n.call(t,e))}_forwardKey(e,t){if(e.defaultPrevented&&!t)return;const n=this._armedRecordTool();n&&this._armedUserInputTarget(this.deepEventTarget(e))&&n.recordNativeKeyDown(e)}_recordClickLetThrough(e,t){const n=this._armedPointerDown;this._armedPointerDown=void 0;const o=this._armedRecordTool();if(!o||!n||e.button!==0||e.detail>1||this.state.mode==="recordingDrag"||e.defaultPrevented&&!t||this._recordedActionCount!==n.actionCount||o.isPerformingAction())return;const a=this.deepEventTarget(e);a!==n.target||!this._armedUserInputTarget(a)||o.recordNativeClick(e)}updateHighlight(e,t){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,t)}_updateHighlight(e,t){var o,a;let n=e==null?void 0:e.tooltipText;n===void 0&&(e!=null&&e.selector)&&(n=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(c=>({element:c,color:e.color,tooltipText:n}))):this.highlight.clearHighlight(),t&&((a=(o=this._delegate).highlightUpdated)==null||a.call(o))}_ignoreOverlayEvent(e){return e.composedPath().some(t=>(t.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var t;for(const n of e.composedPath())if(!((t=this.overlay)!=null&&t.contains(n)))return n;return e.composedPath()[0]}setMode(e){var t,n;(n=(t=this._delegate).setMode)==null||n.call(t,e)}_captureAutoExpectSnapshot(){const e=this.injectedScript.document.documentElement;return e?this.injectedScript.utils.generateAriaTree(e,{mode:"autoexpect"}):void 0}async performAction(e){var n,o,a;this._decorateUserAction(e);const t=this._hoverRevealTracker&&"selector"in e&&e.selector?this._resolveActionTarget(e.selector):void 0;await((o=(n=this._delegate).performAction)==null?void 0:o.call(n,e).catch(()=>{})),(a=this._hoverRevealTracker)==null||a.noteUserAction(t)}_decorateUserAction(e){var c,u,h;const t=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),hN(e)||!this._lastActionAutoexpectSnapshot)return;const n=this.injectedScript.utils.findNewElement(t==null?void 0:t.root,(c=this._lastActionAutoexpectSnapshot)==null?void 0:c.root);if(!("preconditionSelector"in e)||e.preconditionSelector===void 0){const f=e;f.preconditionSelector=n?this.injectedScript.generateSelector(n,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,"selector"in e&&f.preconditionSelector===f.selector&&(f.preconditionSelector=void 0)}const o=e.name==="click"?this._clickTarget(e):void 0,a=(u=this._lastUserHoverTarget)!=null&&u.isConnected?this._lastUserHoverTarget:void 0;if(this._lastUserHoverTarget=e.name==="hover"?this._resolveActionTarget(e.selector):void 0,o!=null&&o.isConnected&&this._hoverRevealTracker){const f=this._hoverRevealTracker.selectorForBothStates(o,e.selector,this.state.testIdAttributeName);f&&(e.selector=f),this._maybeEmitHoverRevealBeforeClick(e,o,a)}(h=this._hoverRevealTracker)==null||h.noteUserAction("selector"in e&&e.selector?this._resolveActionTarget(e.selector):void 0)}_maybeEmitHoverRevealBeforeClick(e,t,n){if(!this._hoverRevealTracker||n&&Ue(n,t))return!1;const o=this._hoverRevealTracker.hoverStepsFor(t,e.selector,this.state.testIdAttributeName);if(!o.length)return!1;if(n&&o.some(c=>Ue(c.trigger,n)))return!0;const a=parseInt(e.timestamp,10);return o.forEach(({selector:c},u)=>{const h={name:"hover",selector:c,signals:[],timestamp:Number.isFinite(a)?(a-o.length+u).toString():e.timestamp};this._delegate.recordAction&&this._delegate.recordAction(h).catch(()=>{})}),!0}expandedStateOf(e){const t=this._resolveActionTarget(e);return t?this.injectedScript.utils.getAriaExpanded(t):void 0}_clickTarget(e){var c;const t=this._resolveActionTarget(e.selector);if(!t||!e.position||t!==this.document.body&&t!==this.document.documentElement)return t;const n=t.getBoundingClientRect(),o=n.left+e.position.x,a=n.top+e.position.y;return((c=this._hoverRevealTracker)==null?void 0:c.pressedAt(o,a))??Ic(this.document,o,a)??t}_resolveActionTarget(e){try{return this.injectedScript.querySelectorAll(this.injectedScript.parseSelector(e),this.document)[0]}catch{return}}recordAction(e){++this._recordedActionCount,this._decorateUserAction(e),this._delegate.recordAction?this._delegate.recordAction(e):console.warn("[Recorder] No delegate.recordAction available!")}setOverlayState(e){var t,n;(n=(t=this._delegate).setOverlayState)==null||n.call(t,e)}elementPicked(e,t){var o,a;const n=this.injectedScript.ariaSnapshot(t.elements[0],{mode:"expect"});(a=(o=this._delegate).elementPicked)==null||a.call(o,{selector:e,ariaSnapshot:n})}}let kS=class{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const t=this._recorder.document.createElement("x-pw-tool-item");t.title="Accept",t.classList.add("accept"),t.appendChild(this._recorder.document.createElement("x-div")),t.addEventListener("click",()=>{var S;return(S=e.onCommit)==null?void 0:S.call(e)});const n=this._recorder.document.createElement("x-pw-tool-item");n.title="Close",n.classList.add("cancel"),n.appendChild(this._recorder.document.createElement("x-div")),n.addEventListener("click",()=>{var S;this.close(),(S=e.onCancel)==null||S.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),e.autosize&&this._dialogElement.classList.add("autosize"),this._keyboardListener=S=>{var v;if(S.key==="Escape"){this.close(),(v=e.onCancel)==null||v.call(e);return}if(e.onCommit&&S.key==="Enter"&&(S.ctrlKey||S.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=S=>{var v;this._dialogElement&&S.target instanceof Node&&this._dialogElement.contains(S.target)||(this.close(),(v=e.onCancel)==null||v.call(e))},this._dialogElement.addEventListener("click",S=>S.stopPropagation());const o=this._recorder.document.createElement("x-pw-tools-list"),a=this._recorder.document.createElement("label");a.textContent=e.label,o.appendChild(a),o.appendChild(this._recorder.document.createElement("x-spacer")),e.onCommit&&o.appendChild(t),o.appendChild(n),this._dialogElement.appendChild(o);const c=this._recorder.document.createElement("x-pw-dialog-body");c.appendChild(e.body),this._dialogElement.appendChild(c),o.style.cursor="move";let u=0,h=0,f=0,y=0;const m=S=>{this._dialogElement&&(this._dialogElement.style.top=f+S.clientY-h+"px",this._dialogElement.style.left=y+S.clientX-u+"px")},_=()=>{this._recorder.document.removeEventListener("mousemove",m,!0),this._recorder.document.removeEventListener("mouseup",_,!0)};o.addEventListener("mousedown",S=>{S.target.closest("x-pw-tool-item")||(u=S.clientX,h=S.clientY,f=parseInt(this._dialogElement.style.top)||0,y=parseInt(this._dialogElement.style.left)||0,this._recorder.document.addEventListener("mousemove",m,!0),this._recorder.document.addEventListener("mouseup",_,!0),S.stopPropagation(),S.preventDefault())},!1);const b=S=>{S.stopPropagation()};return this._dialogElement.addEventListener("mousedown",b,!1),this._dialogElement.addEventListener("mouseup",b,!1),this._dialogElement.addEventListener("pointerdown",b,!1),this._dialogElement.addEventListener("pointerup",b,!1),this._dialogElement.addEventListener("click",b,!1),this._dialogElement.addEventListener("dblclick",b,!1),c.addEventListener("click",b,!1),this._recorder.highlight.appendChild(this._dialogElement),this._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.addEventListener("keydown",this._keyboardListener,!0),this._dialogElement}moveTo(e,t){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=t+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}};function NS(i){let e=i.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function Xi(i){return(i.altKey?1:0)|(i.ctrlKey?2:0)|(i.metaKey?4:0)|(i.shiftKey?8:0)}function vc(i){switch(i.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function Mr(i){if(i.target.nodeName==="CANVAS")return{x:i.offsetX,y:i.offsetY}}function Be(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function xs(i){if(!i||i.nodeName!=="INPUT")return null;const e=i;return["checkbox","radio"].includes(e.type)?e:null}function Dr(i){return!i||i.nodeName!=="INPUT"?!1:i.type.toLowerCase()==="range"}function cN(i){return!i||i===i.ownerDocument.body||i===i.ownerDocument.documentElement?!0:!!i.closest("canvas, embed, object, [data-pw-pdf-viewer], [data-pw-pdf-text-layer]")}function uN(i){return i?i.nodeName==="TEXTAREA"||i.nodeName==="SELECT"||i.isContentEditable?!0:i.nodeName!=="INPUT"?!1:!["checkbox","radio","range","file","button","submit","reset","image"].includes(i.type.toLowerCase()):!1}function MS(i){return!i||i.nodeName!=="INPUT"?!1:i.type.toLowerCase()==="password"}function he(i,e,t,n){return i.addEventListener(e,t,n),()=>{i.removeEventListener(e,t,n)}}function DS(i){for(const e of i)e();i.splice(0,i.length)}function dN(i,e,t,n){try{const o=i.parseSelector(t),a=i.querySelectorAll(o,n),c=a.length>1?mn.multiple:mn.single,u=i.utils.asLocator(e,t);return a.map((h,f)=>{const y=a.length>1?` [${f+1} of ${a.length}]`:"";return{element:h,color:c,tooltipText:u+y}})}catch{return[]}}function LS(i,{tagName:e,attrs:t,children:n}){const o=i.createElementNS("http://www.w3.org/2000/svg",e);if(t)for(const[a,c]of Object.entries(t))o.setAttribute(a,c);if(n)for(const a of n)o.appendChild(LS(i,a));return o}function hN(i){return i.name.startsWith("assert")}function be(i){return i.injectedScript.utils.builtins.Date.now().toString()}function fN(i,e){i=i.replace(/AriaRole\s*\.\s*([\w]+)/g,(a,c)=>c.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(a,c,u)=>`${c}(${u.toLowerCase()}`);const t=[];let n="";for(let a=0;a<i.length;++a){const c=i[a];if(c!=='"'&&c!=="'"&&c!=="`"&&c!=="/"){n+=c;continue}const u=i[a-1]==="r"||i[a]==="/";++a;let h="";for(;a<i.length;){if(i[a]==="\\"){u?(i[a+1]!==c&&(h+=i[a]),++a,h+=i[a]):(++a,i[a]==="n"?h+=`
|
|
671
|
+
`:i[a]==="r"?h+="\r":i[a]==="t"?h+=" ":h+=i[a]),++a;continue}if(i[a]!==c){h+=i[a++];continue}break}t.push({quote:c,text:h}),n+=(c==="/"?"r":"")+"$"+t.length}n=n.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/\bpage\./g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",").replace(/,\)/g,")");const o=t.map(a=>a.quote).filter(a=>"'\"`".includes(a))[0];return{selector:OS(n,t,e),preferredQuote:o}}function u0(i){return[...i.matchAll(/\$\d+/g)].length}function d0(i,e){return i.replace(/\$(\d+)/g,(t,n)=>`$${n-e}`)}function OS(i,e,t){for(;;){const o=i.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!o)break;const a=o.index+o[0].length;let c=0,u=a;for(;u<i.length&&(i[u]==="("?c++:i[u]===")"&&c--,!(c<0));u++);let h=i.substring(0,a),f=0;["sethas(","sethasnot("].includes(o[1])&&(f=1,h=h.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const y=u0(i.substring(0,a)),m=d0(i.substring(a,u),y),_=u0(m),b=e.slice(y,y+_),S=JSON.stringify(OS(m,b,t));i=h.replace(/=$/,"2=")+`$${y+1}`+d0(i.substring(u+f),_-1);const v=e.slice(0,y),x=e.slice(y+_);e=v.concat([{quote:'"',text:S}]).concat(x)}i=i.replace(/\,set([\w]+)\(([^)]+)\)/g,(o,a,c)=>","+a.toLowerCase()+"="+c.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${t}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?visible=true\)/g,"visible=true").replace(/filter\(,?visible=false\)/g,"visible=false").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const n=i.split(".");for(let o=0;o<n.length-1;o++)if(n[o]==="internal:control=enter-frame"&&n[o+1].startsWith("nth=")){const[a]=n.splice(o,1);n.splice(o+1,0,a)}return n.map(o=>!o.startsWith("internal:")||o==="internal:control"?o.replace(/\$(\d+)/g,(a,c)=>e[+c-1].text):(o=o.includes("[")?o.replace(/\]/,"")+"]":o,o=o.replace(/(?:r)\$(\d+)(i)?/g,(a,c,u)=>{const h=e[+c-1];return o.startsWith("internal:attr")||o.startsWith("internal:testid")||o.startsWith("internal:role")?Pt(new RegExp(h.text),!1)+(u||""):Bt(new RegExp(h.text,u),!1)}).replace(/\$(\d+)(i|s)?/g,(a,c,u)=>{const h=e[+c-1];return o.startsWith("internal:has=")||o.startsWith("internal:has-not=")?h.text:o.startsWith("internal:testid")?Pt(h.text,!0):o.startsWith("internal:attr")||o.startsWith("internal:role")?Pt(h.text,u==="s"):Bt(h.text,u==="s")}),o)).join(" >> ")}function gN(i,e,t){try{return pN(i,e,t)}catch{return""}}function pN(i,e,t){try{return Ma(e),e}catch{}const{selector:n,preferredQuote:o}=fN(e,t),a=sv(i,n,void 0,void 0,o),c=h0(i,e);return a.some(u=>h0(i,u)===c)?n:""}function h0(i,e){return e=e.replace(/\s/g,""),i==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const mN=({url:i})=>T.jsxs("div",{className:"browser-frame-header",children:[T.jsxs("div",{className:"browser-traffic-lights",children:[T.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),T.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),T.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),T.jsxs("div",{className:"browser-frame-address-bar",title:i||"about:blank",children:[T.jsx("span",{className:"browser-frame-address",children:i||"about:blank"}),i&&T.jsx(Kf,{value:i})]}),T.jsx("div",{style:{marginLeft:"auto"},children:T.jsxs("div",{children:[T.jsx("span",{className:"browser-frame-menu-bar"}),T.jsx("span",{className:"browser-frame-menu-bar"}),T.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),Tg=Symbol.for("yaml.alias"),jf=Symbol.for("yaml.document"),Ki=Symbol.for("yaml.map"),RS=Symbol.for("yaml.pair"),In=Symbol.for("yaml.scalar"),Gr=Symbol.for("yaml.seq"),bn=Symbol.for("yaml.node.type"),Ji=i=>!!i&&typeof i=="object"&&i[bn]===Tg,Os=i=>!!i&&typeof i=="object"&&i[bn]===jf,Xr=i=>!!i&&typeof i=="object"&&i[bn]===Ki,Ve=i=>!!i&&typeof i=="object"&&i[bn]===RS,He=i=>!!i&&typeof i=="object"&&i[bn]===In,Yr=i=>!!i&&typeof i=="object"&&i[bn]===Gr;function Fe(i){if(i&&typeof i=="object")switch(i[bn]){case Ki:case Gr:return!0}return!1}function Xe(i){if(i&&typeof i=="object")switch(i[bn]){case Tg:case Ki:case In:case Gr:return!0}return!1}const jS=i=>(He(i)||Fe(i))&&!!i.anchor,qt=Symbol("break visit"),HS=Symbol("skip children"),zn=Symbol("remove node");function Rs(i,e){const t=$S(e);Os(i)?Lr(null,i.contents,t,Object.freeze([i]))===zn&&(i.contents=null):Lr(null,i,t,Object.freeze([]))}Rs.BREAK=qt;Rs.SKIP=HS;Rs.REMOVE=zn;function Lr(i,e,t,n){const o=zS(i,e,t,n);if(Xe(o)||Ve(o))return IS(i,n,o),Lr(i,o,t,n);if(typeof o!="symbol"){if(Fe(e)){n=Object.freeze(n.concat(e));for(let a=0;a<e.items.length;++a){const c=Lr(a,e.items[a],t,n);if(typeof c=="number")a=c-1;else{if(c===qt)return qt;c===zn&&(e.items.splice(a,1),a-=1)}}}else if(Ve(e)){n=Object.freeze(n.concat(e));const a=Lr("key",e.key,t,n);if(a===qt)return qt;a===zn&&(e.key=null);const c=Lr("value",e.value,t,n);if(c===qt)return qt;c===zn&&(e.value=null)}}return o}async function Zc(i,e){const t=$S(e);Os(i)?await Or(null,i.contents,t,Object.freeze([i]))===zn&&(i.contents=null):await Or(null,i,t,Object.freeze([]))}Zc.BREAK=qt;Zc.SKIP=HS;Zc.REMOVE=zn;async function Or(i,e,t,n){const o=await zS(i,e,t,n);if(Xe(o)||Ve(o))return IS(i,n,o),Or(i,o,t,n);if(typeof o!="symbol"){if(Fe(e)){n=Object.freeze(n.concat(e));for(let a=0;a<e.items.length;++a){const c=await Or(a,e.items[a],t,n);if(typeof c=="number")a=c-1;else{if(c===qt)return qt;c===zn&&(e.items.splice(a,1),a-=1)}}}else if(Ve(e)){n=Object.freeze(n.concat(e));const a=await Or("key",e.key,t,n);if(a===qt)return qt;a===zn&&(e.key=null);const c=await Or("value",e.value,t,n);if(c===qt)return qt;c===zn&&(e.value=null)}}return o}function $S(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function zS(i,e,t,n){var o,a,c,u,h;if(typeof t=="function")return t(i,e,n);if(Xr(e))return(o=t.Map)==null?void 0:o.call(t,i,e,n);if(Yr(e))return(a=t.Seq)==null?void 0:a.call(t,i,e,n);if(Ve(e))return(c=t.Pair)==null?void 0:c.call(t,i,e,n);if(He(e))return(u=t.Scalar)==null?void 0:u.call(t,i,e,n);if(Ji(e))return(h=t.Alias)==null?void 0:h.call(t,i,e,n)}function IS(i,e,t){const n=e[e.length-1];if(Fe(n))n.items[i]=t;else if(Ve(n))i==="key"?n.key=t:n.value=t;else if(Os(n))n.contents=t;else{const o=Ji(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const yN={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},_N=i=>i.replace(/[!,[\]{}]/g,e=>yN[e]);class kt{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},kt.defaultYaml,e),this.tags=Object.assign({},kt.defaultTags,t)}clone(){const e=new kt(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new kt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:kt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},kt.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:kt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},kt.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),o=n.shift();switch(o){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[a,c]=n;return this.tags[a]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[a]=n;if(a==="1.1"||a==="1.2")return this.yaml.version=a,!0;{const c=/^\d+\.\d+$/.test(a);return t(6,`Unsupported YAML version ${a}`,c),!1}}default:return t(0,`Unknown directive ${o}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const c=e.slice(2,-1);return c==="!"||c==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),c)}const[,n,o]=e.match(/^(.*!)([^!]*)$/s);o||t(`The ${e} tag has no suffix`);const a=this.tags[n];if(a)try{return a+decodeURIComponent(o)}catch(c){return t(String(c)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+_N(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let o;if(e&&n.length>0&&Xe(e.contents)){const a={};Rs(e.contents,(c,u)=>{Xe(u)&&u.tag&&(a[u.tag]=!0)}),o=Object.keys(a)}else o=[];for(const[a,c]of n)a==="!!"&&c==="tag:yaml.org,2002:"||(!e||o.some(u=>u.startsWith(c)))&&t.push(`%TAG ${a} ${c}`);return t.join(`
|
|
672
|
+
`)}}kt.defaultYaml={explicit:!1,version:"1.2"};kt.defaultTags={"!!":"tag:yaml.org,2002:"};function BS(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(t)}return!0}function PS(i){const e=new Set;return Rs(i,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function qS(i,e){for(let t=1;;++t){const n=`${i}${t}`;if(!e.has(n))return n}}function bN(i,e){const t=[],n=new Map;let o=null;return{onAnchor:a=>{t.push(a),o??(o=PS(i));const c=qS(e,o);return o.add(c),c},setAnchors:()=>{for(const a of t){const c=n.get(a);if(typeof c=="object"&&c.anchor&&(He(c.node)||Fe(c.node)))c.node.anchor=c.anchor;else{const u=new Error("Failed to resolve repeated object (this should not happen)");throw u.source=a,u}}},sourceObjects:n}}function Rr(i,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let o=0,a=n.length;o<a;++o){const c=n[o],u=Rr(i,n,String(o),c);u===void 0?delete n[o]:u!==c&&(n[o]=u)}else if(n instanceof Map)for(const o of Array.from(n.keys())){const a=n.get(o),c=Rr(i,n,o,a);c===void 0?n.delete(o):c!==a&&n.set(o,c)}else if(n instanceof Set)for(const o of Array.from(n)){const a=Rr(i,n,o,o);a===void 0?n.delete(o):a!==o&&(n.delete(o),n.add(a))}else for(const[o,a]of Object.entries(n)){const c=Rr(i,n,o,a);c===void 0?delete n[o]:c!==a&&(n[o]=c)}return i.call(e,t,n)}function yn(i,e,t){if(Array.isArray(i))return i.map((n,o)=>yn(n,String(o),t));if(i&&typeof i.toJSON=="function"){if(!t||!jS(i))return i.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(i,n),t.onCreate=a=>{n.res=a,delete t.onCreate};const o=i.toJSON(e,t);return t.onCreate&&t.onCreate(o),o}return typeof i=="bigint"&&!(t!=null&&t.keep)?Number(i):i}class Eg{constructor(e){Object.defineProperty(this,bn,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:o,reviver:a}={}){if(!Os(e))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},u=yn(this,"",c);if(typeof o=="function")for(const{count:h,res:f}of c.anchors.values())o(f,h);return typeof a=="function"?Rr(a,{"":u},"",u):u}}class Qc extends Eg{constructor(e){super(Tg),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let n;t!=null&&t.aliasResolveCache?n=t.aliasResolveCache:(n=[],Rs(e,{Node:(a,c)=>{(Ji(c)||jS(c))&&n.push(c)}}),t&&(t.aliasResolveCache=n));let o;for(const a of n){if(a===this)break;a.anchor===this.source&&(o=a)}return o}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:o,maxAliasCount:a}=t,c=this.resolve(o,t);if(!c){const h=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(h)}let u=n.get(c);if(u||(yn(c,null,t),u=n.get(c)),(u==null?void 0:u.res)===void 0){const h="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(h)}if(a>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=Sc(o,c,n)),u.count*u.aliasCount>a)){const h="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(h)}return u.res}toString(e,t,n){const o=`*${this.source}`;if(e){if(BS(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(a)}if(e.implicitKey)return`${o} `}return o}}function Sc(i,e,t){if(Ji(e)){const n=e.resolve(i),o=t&&n&&t.get(n);return o?o.count*o.aliasCount:0}else if(Fe(e)){let n=0;for(const o of e.items){const a=Sc(i,o,t);a>n&&(n=a)}return n}else if(Ve(e)){const n=Sc(i,e.key,t),o=Sc(i,e.value,t);return Math.max(n,o)}return 1}const US=i=>!i||typeof i!="function"&&typeof i!="object";class ge extends Eg{constructor(e){super(In),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:yn(this.value,e,t)}toString(){return String(this.value)}}ge.BLOCK_FOLDED="BLOCK_FOLDED";ge.BLOCK_LITERAL="BLOCK_LITERAL";ge.PLAIN="PLAIN";ge.QUOTE_DOUBLE="QUOTE_DOUBLE";ge.QUOTE_SINGLE="QUOTE_SINGLE";const vN="tag:yaml.org,2002:";function SN(i,e,t){if(e){const n=t.filter(a=>a.tag===e),o=n.find(a=>!a.format)??n[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return t.find(n=>{var o;return((o=n.identify)==null?void 0:o.call(n,i))&&!n.format})}function Aa(i,e,t){var m,_,b;if(Os(i)&&(i=i.contents),Xe(i))return i;if(Ve(i)){const S=(_=(m=t.schema[Ki]).createNode)==null?void 0:_.call(m,t.schema,null,t);return S.items.push(i),S}(i instanceof String||i instanceof Number||i instanceof Boolean||typeof BigInt<"u"&&i instanceof BigInt)&&(i=i.valueOf());const{aliasDuplicateObjects:n,onAnchor:o,onTagObj:a,schema:c,sourceObjects:u}=t;let h;if(n&&i&&typeof i=="object"){if(h=u.get(i),h)return h.anchor??(h.anchor=o(i)),new Qc(h.anchor);h={anchor:null,node:null},u.set(i,h)}e!=null&&e.startsWith("!!")&&(e=vN+e.slice(2));let f=SN(i,e,c.tags);if(!f){if(i&&typeof i.toJSON=="function"&&(i=i.toJSON()),!i||typeof i!="object"){const S=new ge(i);return h&&(h.node=S),S}f=i instanceof Map?c[Ki]:Symbol.iterator in Object(i)?c[Gr]:c[Ki]}a&&(a(f),delete t.onTagObj);const y=f!=null&&f.createNode?f.createNode(t.schema,i,t):typeof((b=f==null?void 0:f.nodeClass)==null?void 0:b.from)=="function"?f.nodeClass.from(t.schema,i,t):new ge(i);return e?y.tag=e:f.default||(y.tag=f.tag),h&&(h.node=y),y}function Bc(i,e,t){let n=t;for(let o=e.length-1;o>=0;--o){const a=e[o];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){const c=[];c[a]=n,n=c}else n=new Map([[a,n]])}return Aa(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:i,sourceObjects:new Map})}const ga=i=>i==null||typeof i=="object"&&!!i[Symbol.iterator]().next().done;class VS extends Eg{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>Xe(n)||Ve(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(ga(e))this.add(t);else{const[n,...o]=e,a=this.get(n,!0);if(Fe(a))a.addIn(o,t);else if(a===void 0&&this.schema)this.set(n,Bc(this.schema,o,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const o=this.get(t,!0);if(Fe(o))return o.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...o]=e,a=this.get(n,!0);return o.length===0?!t&&He(a)?a.value:a:Fe(a)?a.getIn(o,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Ve(t))return!1;const n=t.value;return n==null||e&&He(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const o=this.get(t,!0);return Fe(o)?o.hasIn(n):!1}setIn(e,t){const[n,...o]=e;if(o.length===0)this.set(n,t);else{const a=this.get(n,!0);if(Fe(a))a.setIn(o,t);else if(a===void 0&&this.schema)this.set(n,Bc(this.schema,o,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}}const wN=i=>i.replace(/^(?!$)(?: $)?/gm,"#");function ui(i,e){return/^\n+$/.test(i)?i.substring(1):e?i.replace(/^(?! *$)/gm,e):i}const Es=(i,e,t)=>i.endsWith(`
|
|
673
|
+
`)?ui(t,e):t.includes(`
|
|
674
|
+
`)?`
|
|
675
|
+
`+ui(t,e):(i.endsWith(" ")?"":" ")+t,FS="flow",Hf="block",wc="quoted";function eu(i,e,t="flow",{indentAtStart:n,lineWidth:o=80,minContentWidth:a=20,onFold:c,onOverflow:u}={}){if(!o||o<0)return i;o<a&&(a=0);const h=Math.max(1+a,1+o-e.length);if(i.length<=h)return i;const f=[],y={};let m=o-e.length;typeof n=="number"&&(n>o-Math.max(2,a)?f.push(0):m=o-n);let _,b,S=!1,v=-1,x=-1,E=-1;t===Hf&&(v=f0(i,v,e.length),v!==-1&&(m=v+h));for(let L;L=i[v+=1];){if(t===wc&&L==="\\"){switch(x=v,i[v+1]){case"x":v+=3;break;case"u":v+=5;break;case"U":v+=9;break;default:v+=1}E=v}if(L===`
|
|
676
|
+
`)t===Hf&&(v=f0(i,v,e.length)),m=v+e.length+h,_=void 0;else{if(L===" "&&b&&b!==" "&&b!==`
|
|
677
|
+
`&&b!==" "){const R=i[v+1];R&&R!==" "&&R!==`
|
|
678
|
+
`&&R!==" "&&(_=v)}if(v>=m)if(_)f.push(_),m=_+h,_=void 0;else if(t===wc){for(;b===" "||b===" ";)b=L,L=i[v+=1],S=!0;const R=v>E+1?v-2:x-1;if(y[R])return i;f.push(R),y[R]=!0,m=R+h,_=void 0}else S=!0}b=L}if(S&&u&&u(),f.length===0)return i;c&&c();let C=i.slice(0,f[0]);for(let L=0;L<f.length;++L){const R=f[L],N=f[L+1]||i.length;R===0?C=`
|
|
679
|
+
${e}${i.slice(0,N)}`:(t===wc&&y[R]&&(C+=`${i[R]}\\`),C+=`
|
|
680
|
+
${e}${i.slice(R+1,N)}`)}return C}function f0(i,e,t){let n=e,o=e+1,a=i[o];for(;a===" "||a===" ";)if(e<o+t)a=i[++e];else{do a=i[++e];while(a&&a!==`
|
|
681
|
+
`);n=e,o=e+1,a=i[o]}return n}const tu=(i,e)=>({indentAtStart:e?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),nu=i=>/^(%|---|\.\.\.)/m.test(i);function xN(i,e,t){if(!e||e<0)return!1;const n=e-t,o=i.length;if(o<=n)return!1;for(let a=0,c=0;a<o;++a)if(i[a]===`
|
|
682
|
+
`){if(a-c>n)return!0;if(c=a+1,o-c<=n)return!1}return!0}function Sa(i,e){const t=JSON.stringify(i);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:n}=e,o=e.options.doubleQuotedMinMultiLineLength,a=e.indent||(nu(i)?" ":"");let c="",u=0;for(let h=0,f=t[h];f;f=t[++h])if(f===" "&&t[h+1]==="\\"&&t[h+2]==="n"&&(c+=t.slice(u,h)+"\\ ",h+=1,u=h,f="\\"),f==="\\")switch(t[h+1]){case"u":{c+=t.slice(u,h);const y=t.substr(h+2,4);switch(y){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:y.substr(0,2)==="00"?c+="\\x"+y.substr(2):c+=t.substr(h,6)}h+=5,u=h+1}break;case"n":if(n||t[h+2]==='"'||t.length<o)h+=1;else{for(c+=t.slice(u,h)+`
|
|
683
|
+
|
|
684
|
+
`;t[h+2]==="\\"&&t[h+3]==="n"&&t[h+4]!=='"';)c+=`
|
|
685
|
+
`,h+=2;c+=a,t[h+2]===" "&&(c+="\\"),h+=1,u=h+1}break;default:h+=1}return c=u?c+t.slice(u):t,n?c:eu(c,a,wc,tu(e,!1))}function $f(i,e){if(e.options.singleQuote===!1||e.implicitKey&&i.includes(`
|
|
686
|
+
`)||/[ \t]\n|\n[ \t]/.test(i))return Sa(i,e);const t=e.indent||(nu(i)?" ":""),n="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
687
|
+
${t}`)+"'";return e.implicitKey?n:eu(n,t,FS,tu(e,!1))}function jr(i,e){const{singleQuote:t}=e.options;let n;if(t===!1)n=Sa;else{const o=i.includes('"'),a=i.includes("'");o&&!a?n=$f:a&&!o?n=Sa:n=t?$f:Sa}return n(i,e)}let zf;try{zf=new RegExp(`(^|(?<!
|
|
688
|
+
))
|
|
689
|
+
+(?!
|
|
690
|
+
|$)`,"g")}catch{zf=/\n+(?!\n|$)/g}function xc({comment:i,type:e,value:t},n,o,a){const{blockQuote:c,commentString:u,lineWidth:h}=n.options;if(!c||/\n[\t ]+$/.test(t))return jr(t,n);const f=n.indent||(n.forceBlockIndent||nu(t)?" ":""),y=c==="literal"?!0:c==="folded"||e===ge.BLOCK_FOLDED?!1:e===ge.BLOCK_LITERAL?!0:!xN(t,h,f.length);if(!t)return y?`|
|
|
691
|
+
`:`>
|
|
692
|
+
`;let m,_;for(_=t.length;_>0;--_){const N=t[_-1];if(N!==`
|
|
693
|
+
`&&N!==" "&&N!==" ")break}let b=t.substring(_);const S=b.indexOf(`
|
|
694
|
+
`);S===-1?m="-":t===b||S!==b.length-1?(m="+",a&&a()):m="",b&&(t=t.slice(0,-b.length),b[b.length-1]===`
|
|
695
|
+
`&&(b=b.slice(0,-1)),b=b.replace(zf,`$&${f}`));let v=!1,x,E=-1;for(x=0;x<t.length;++x){const N=t[x];if(N===" ")v=!0;else if(N===`
|
|
696
|
+
`)E=x;else break}let C=t.substring(0,E<x?E+1:x);C&&(t=t.substring(C.length),C=C.replace(/\n+/g,`$&${f}`));let R=(v?f?"2":"1":"")+m;if(i&&(R+=" "+u(i.replace(/ ?[\r\n]+/g," ")),o&&o()),!y){const N=t.replace(/\n+/g,`
|
|
697
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${f}`);let V=!1;const I=tu(n,!0);c!=="folded"&&e!==ge.BLOCK_FOLDED&&(I.onOverflow=()=>{V=!0});const B=eu(`${C}${N}${b}`,f,Hf,I);if(!V)return`>${R}
|
|
698
|
+
${f}${B}`}return t=t.replace(/\n+/g,`$&${f}`),`|${R}
|
|
699
|
+
${f}${C}${t}${b}`}function TN(i,e,t,n){const{type:o,value:a}=i,{actualString:c,implicitKey:u,indent:h,indentStep:f,inFlow:y}=e;if(u&&a.includes(`
|
|
700
|
+
`)||y&&/[[\]{},]/.test(a))return jr(a,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return u||y||!a.includes(`
|
|
701
|
+
`)?jr(a,e):xc(i,e,t,n);if(!u&&!y&&o!==ge.PLAIN&&a.includes(`
|
|
702
|
+
`))return xc(i,e,t,n);if(nu(a)){if(h==="")return e.forceBlockIndent=!0,xc(i,e,t,n);if(u&&h===f)return jr(a,e)}const m=a.replace(/\n+/g,`$&
|
|
703
|
+
${h}`);if(c){const _=v=>{var x;return v.default&&v.tag!=="tag:yaml.org,2002:str"&&((x=v.test)==null?void 0:x.test(m))},{compat:b,tags:S}=e.doc.schema;if(S.some(_)||b!=null&&b.some(_))return jr(a,e)}return u?m:eu(m,h,FS,tu(e,!1))}function Da(i,e,t,n){const{implicitKey:o,inFlow:a}=e,c=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)});let{type:u}=i;u!==ge.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(u=ge.QUOTE_DOUBLE);const h=y=>{switch(y){case ge.BLOCK_FOLDED:case ge.BLOCK_LITERAL:return o||a?jr(c.value,e):xc(c,e,t,n);case ge.QUOTE_DOUBLE:return Sa(c.value,e);case ge.QUOTE_SINGLE:return $f(c.value,e);case ge.PLAIN:return TN(c,e,t,n);default:return null}};let f=h(u);if(f===null){const{defaultKeyType:y,defaultStringType:m}=e.options,_=o&&y||m;if(f=h(_),f===null)throw new Error(`Unsupported default string type ${_}`)}return f}function GS(i,e){const t=Object.assign({blockQuote:!0,commentString:wN,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,e);let n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:i,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function EN(i,e){var o;if(e.tag){const a=i.filter(c=>c.tag===e.tag);if(a.length>0)return a.find(c=>c.format===e.format)??a[0]}let t,n;if(He(e)){n=e.value;let a=i.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,n)});if(a.length>1){const c=a.filter(u=>u.test);c.length>0&&(a=c)}t=a.find(c=>c.format===e.format)??a.find(c=>!c.format)}else n=e,t=i.find(a=>a.nodeClass&&n instanceof a.nodeClass);if(!t){const a=((o=n==null?void 0:n.constructor)==null?void 0:o.name)??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${a} value`)}return t}function AN(i,e,{anchors:t,doc:n}){if(!n.directives)return"";const o=[],a=(He(i)||Fe(i))&&i.anchor;a&&BS(a)&&(t.add(a),o.push(`&${a}`));const c=i.tag??(e.default?null:e.tag);return c&&o.push(n.directives.tagString(c)),o.join(" ")}function Br(i,e,t,n){var h;if(Ve(i))return i.toString(e,t,n);if(Ji(i)){if(e.doc.directives)return i.toString(e);if((h=e.resolvedAliases)!=null&&h.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(i):e.resolvedAliases=new Set([i]),i=i.resolve(e.doc)}let o;const a=Xe(i)?i:e.doc.createNode(i,{onTagObj:f=>o=f});o??(o=EN(e.doc.schema.tags,a));const c=AN(a,o,e);c.length>0&&(e.indentAtStart=(e.indentAtStart??0)+c.length+1);const u=typeof o.stringify=="function"?o.stringify(a,e,t,n):He(a)?Da(a,e,t,n):a.toString(e,t,n);return c?He(a)||u[0]==="{"||u[0]==="["?`${c} ${u}`:`${c}
|
|
704
|
+
${e.indent}${u}`:u}function CN({key:i,value:e},t,n,o){const{allNullValues:a,doc:c,indent:u,indentStep:h,options:{commentString:f,indentSeq:y,simpleKeys:m}}=t;let _=Xe(i)&&i.comment||null;if(m){if(_)throw new Error("With simple keys, key nodes cannot have comments");if(Fe(i)||!Xe(i)&&typeof i=="object"){const I="With simple keys, collection cannot be used as a key value";throw new Error(I)}}let b=!m&&(!i||_&&e==null&&!t.inFlow||Fe(i)||(He(i)?i.type===ge.BLOCK_FOLDED||i.type===ge.BLOCK_LITERAL:typeof i=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!b&&(m||!a),indent:u+h});let S=!1,v=!1,x=Br(i,t,()=>S=!0,()=>v=!0);if(!b&&!t.inFlow&&x.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");b=!0}if(t.inFlow){if(a||e==null)return S&&n&&n(),x===""?"?":b?`? ${x}`:x}else if(a&&!m||e==null&&b)return x=`? ${x}`,_&&!S?x+=Es(x,t.indent,f(_)):v&&o&&o(),x;S&&(_=null),b?(_&&(x+=Es(x,t.indent,f(_))),x=`? ${x}
|
|
705
|
+
${u}:`):(x=`${x}:`,_&&(x+=Es(x,t.indent,f(_))));let E,C,L;Xe(e)?(E=!!e.spaceBefore,C=e.commentBefore,L=e.comment):(E=!1,C=null,L=null,e&&typeof e=="object"&&(e=c.createNode(e))),t.implicitKey=!1,!b&&!_&&He(e)&&(t.indentAtStart=x.length+1),v=!1,!y&&h.length>=2&&!t.inFlow&&!b&&Yr(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let R=!1;const N=Br(e,t,()=>R=!0,()=>v=!0);let V=" ";if(_||E||C){if(V=E?`
|
|
706
|
+
`:"",C){const I=f(C);V+=`
|
|
707
|
+
${ui(I,t.indent)}`}N===""&&!t.inFlow?V===`
|
|
708
|
+
`&&L&&(V=`
|
|
709
|
+
|
|
710
|
+
`):V+=`
|
|
711
|
+
${t.indent}`}else if(!b&&Fe(e)){const I=N[0],B=N.indexOf(`
|
|
712
|
+
`),O=B!==-1,Q=t.inFlow??e.flow??e.items.length===0;if(O||!Q){let se=!1;if(O&&(I==="&"||I==="!")){let Y=N.indexOf(" ");I==="&"&&Y!==-1&&Y<B&&N[Y+1]==="!"&&(Y=N.indexOf(" ",Y+1)),(Y===-1||B<Y)&&(se=!0)}se||(V=`
|
|
713
|
+
${t.indent}`)}}else(N===""||N[0]===`
|
|
714
|
+
`)&&(V="");return x+=V+N,t.inFlow?R&&n&&n():L&&!R?x+=Es(x,t.indent,f(L)):v&&o&&o(),x}function XS(i,e){(i==="debug"||i==="warn")&&console.warn(e)}const sc="<<",hi={identify:i=>i===sc||typeof i=="symbol"&&i.description===sc,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ge(Symbol(sc)),{addToJSMap:YS}),stringify:()=>sc},kN=(i,e)=>(hi.identify(e)||He(e)&&(!e.type||e.type===ge.PLAIN)&&hi.identify(e.value))&&(i==null?void 0:i.doc.schema.tags.some(t=>t.tag===hi.tag&&t.default));function YS(i,e,t){if(t=i&&Ji(t)?t.resolve(i.doc):t,Yr(t))for(const n of t.items)lf(i,e,n);else if(Array.isArray(t))for(const n of t)lf(i,e,n);else lf(i,e,t)}function lf(i,e,t){const n=i&&Ji(t)?t.resolve(i.doc):t;if(!Xr(n))throw new Error("Merge sources must be maps or map aliases");const o=n.toJSON(null,i,Map);for(const[a,c]of o)e instanceof Map?e.has(a)||e.set(a,c):e instanceof Set?e.add(a):Object.prototype.hasOwnProperty.call(e,a)||Object.defineProperty(e,a,{value:c,writable:!0,enumerable:!0,configurable:!0});return e}function KS(i,e,{key:t,value:n}){if(Xe(t)&&t.addToJSMap)t.addToJSMap(i,e,n);else if(kN(i,t))YS(i,e,n);else{const o=yn(t,"",i);if(e instanceof Map)e.set(o,yn(n,o,i));else if(e instanceof Set)e.add(o);else{const a=NN(t,o,i),c=yn(n,a,i);a in e?Object.defineProperty(e,a,{value:c,writable:!0,enumerable:!0,configurable:!0}):e[a]=c}}return e}function NN(i,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(Xe(i)&&(t!=null&&t.doc)){const n=GS(t.doc,{});n.anchors=new Set;for(const a of t.anchors.keys())n.anchors.add(a.anchor);n.inFlow=!0,n.inStringifyKey=!0;const o=i.toString(n);if(!t.mapKeyWarned){let a=JSON.stringify(o);a.length>40&&(a=a.substring(0,36)+'..."'),XS(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${a}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return o}return JSON.stringify(e)}function Ag(i,e,t){const n=Aa(i,void 0,t),o=Aa(e,void 0,t);return new Tt(n,o)}class Tt{constructor(e,t=null){Object.defineProperty(this,bn,{value:RS}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return Xe(t)&&(t=t.clone(e)),Xe(n)&&(n=n.clone(e)),new Tt(t,n)}toJSON(e,t){const n=t!=null&&t.mapAsMap?new Map:{};return KS(t,n,this)}toString(e,t,n){return e!=null&&e.doc?CN(this,e,t,n):JSON.stringify(this)}}function WS(i,e,t){return(e.inFlow??i.flow?DN:MN)(i,e,t)}function MN({comment:i,items:e},t,{blockItemPrefix:n,flowChars:o,itemIndent:a,onChompKeep:c,onComment:u}){const{indent:h,options:{commentString:f}}=t,y=Object.assign({},t,{indent:a,type:null});let m=!1;const _=[];for(let S=0;S<e.length;++S){const v=e[S];let x=null;if(Xe(v))!m&&v.spaceBefore&&_.push(""),Pc(t,_,v.commentBefore,m),v.comment&&(x=v.comment);else if(Ve(v)){const C=Xe(v.key)?v.key:null;C&&(!m&&C.spaceBefore&&_.push(""),Pc(t,_,C.commentBefore,m))}m=!1;let E=Br(v,y,()=>x=null,()=>m=!0);x&&(E+=Es(E,a,f(x))),m&&x&&(m=!1),_.push(n+E)}let b;if(_.length===0)b=o.start+o.end;else{b=_[0];for(let S=1;S<_.length;++S){const v=_[S];b+=v?`
|
|
715
|
+
${h}${v}`:`
|
|
716
|
+
`}}return i?(b+=`
|
|
717
|
+
`+ui(f(i),h),u&&u()):m&&c&&c(),b}function DN({items:i},e,{flowChars:t,itemIndent:n}){const{indent:o,indentStep:a,flowCollectionPadding:c,options:{commentString:u}}=e;n+=a;const h=Object.assign({},e,{indent:n,inFlow:!0,type:null});let f=!1,y=0;const m=[];for(let S=0;S<i.length;++S){const v=i[S];let x=null;if(Xe(v))v.spaceBefore&&m.push(""),Pc(e,m,v.commentBefore,!1),v.comment&&(x=v.comment);else if(Ve(v)){const C=Xe(v.key)?v.key:null;C&&(C.spaceBefore&&m.push(""),Pc(e,m,C.commentBefore,!1),C.comment&&(f=!0));const L=Xe(v.value)?v.value:null;L?(L.comment&&(x=L.comment),L.commentBefore&&(f=!0)):v.value==null&&(C!=null&&C.comment)&&(x=C.comment)}x&&(f=!0);let E=Br(v,h,()=>x=null);f||(f=m.length>y||E.includes(`
|
|
718
|
+
`)),S<i.length-1?E+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(f||(f=m.reduce((C,L)=>C+L.length+2,2)+(E.length+2)>e.options.lineWidth)),f&&(E+=",")),x&&(E+=Es(E,n,u(x))),m.push(E),y=m.length}const{start:_,end:b}=t;if(m.length===0)return _+b;if(!f){const S=m.reduce((v,x)=>v+x.length+2,2);f=e.options.lineWidth>0&&S>e.options.lineWidth}if(f){let S=_;for(const v of m)S+=v?`
|
|
719
|
+
${a}${o}${v}`:`
|
|
720
|
+
`;return`${S}
|
|
721
|
+
${o}${b}`}else return`${_}${c}${m.join(" ")}${c}${b}`}function Pc({indent:i,options:{commentString:e}},t,n,o){if(n&&o&&(n=n.replace(/^\n+/,"")),n){const a=ui(e(n),i);t.push(a.trimStart())}}function As(i,e){const t=He(e)?e.value:e;for(const n of i)if(Ve(n)&&(n.key===e||n.key===t||He(n.key)&&n.key.value===t))return n}class Zt extends VS{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Ki,e),this.items=[]}static from(e,t,n){const{keepUndefined:o,replacer:a}=n,c=new this(e),u=(h,f)=>{if(typeof a=="function")f=a.call(t,h,f);else if(Array.isArray(a)&&!a.includes(h))return;(f!==void 0||o)&&c.items.push(Ag(h,f,n))};if(t instanceof Map)for(const[h,f]of t)u(h,f);else if(t&&typeof t=="object")for(const h of Object.keys(t))u(h,t[h]);return typeof e.sortMapEntries=="function"&&c.items.sort(e.sortMapEntries),c}add(e,t){var c;let n;Ve(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Tt(e,e==null?void 0:e.value):n=new Tt(e.key,e.value);const o=As(this.items,n.key),a=(c=this.schema)==null?void 0:c.sortMapEntries;if(o){if(!t)throw new Error(`Key ${n.key} already set`);He(o.value)&&US(n.value)?o.value.value=n.value:o.value=n.value}else if(a){const u=this.items.findIndex(h=>a(n,h)<0);u===-1?this.items.push(n):this.items.splice(u,0,n)}else this.items.push(n)}delete(e){const t=As(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const n=As(this.items,e),o=n==null?void 0:n.value;return(!t&&He(o)?o.value:o)??void 0}has(e){return!!As(this.items,e)}set(e,t){this.add(new Tt(e,t),!0)}toJSON(e,t,n){const o=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(o);for(const a of this.items)KS(t,o,a);return o}toString(e,t,n){if(!e)return JSON.stringify(this);for(const o of this.items)if(!Ve(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),WS(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}const Kr={collection:"map",default:!0,nodeClass:Zt,tag:"tag:yaml.org,2002:map",resolve(i,e){return Xr(i)||e("Expected a mapping for this tag"),i},createNode:(i,e,t)=>Zt.from(i,e,t)};class Wi extends VS{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Gr,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=rc(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=rc(e);if(typeof n!="number")return;const o=this.items[n];return!t&&He(o)?o.value:o}has(e){const t=rc(e);return typeof t=="number"&&t<this.items.length}set(e,t){const n=rc(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[n];He(o)&&US(t)?o.value=t:this.items[n]=t}toJSON(e,t){const n=[];t!=null&&t.onCreate&&t.onCreate(n);let o=0;for(const a of this.items)n.push(yn(a,String(o++),t));return n}toString(e,t,n){return e?WS(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){const{replacer:o}=n,a=new this(e);if(t&&Symbol.iterator in Object(t)){let c=0;for(let u of t){if(typeof o=="function"){const h=t instanceof Set?u:String(c++);u=o.call(t,h,u)}a.items.push(Aa(u,void 0,n))}}return a}}function rc(i){let e=He(i)?i.value:i;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Wr={collection:"seq",default:!0,nodeClass:Wi,tag:"tag:yaml.org,2002:seq",resolve(i,e){return Yr(i)||e("Expected a sequence for this tag"),i},createNode:(i,e,t)=>Wi.from(i,e,t)},iu={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,e,t,n){return e=Object.assign({actualString:!0},e),Da(i,e,t,n)}},su={identify:i=>i==null,createNode:()=>new ge(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ge(null),stringify:({source:i},e)=>typeof i=="string"&&su.test.test(i)?i:e.options.nullStr},Cg={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new ge(i[0]==="t"||i[0]==="T"),stringify({source:i,value:e},t){if(i&&Cg.test.test(i)){const n=i[0]==="t"||i[0]==="T";if(e===n)return i}return e?t.options.trueStr:t.options.falseStr}};function kn({format:i,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);const o=typeof n=="number"?n:Number(n);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let a=Object.is(n,-0)?"-0":JSON.stringify(n);if(!i&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(a)){let c=a.indexOf(".");c<0&&(c=a.length,a+=".");let u=e-(a.length-c-1);for(;u-- >0;)a+="0"}return a}const JS={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:kn},ZS={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i),stringify(i){const e=Number(i.value);return isFinite(e)?e.toExponential():kn(i)}},QS={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(i){const e=new ge(parseFloat(i)),t=i.indexOf(".");return t!==-1&&i[i.length-1]==="0"&&(e.minFractionDigits=i.length-t-1),e},stringify:kn},ru=i=>typeof i=="bigint"||Number.isInteger(i),kg=(i,e,t,{intAsBigInt:n})=>n?BigInt(i):parseInt(i.substring(e),t);function ew(i,e,t){const{value:n}=i;return ru(n)&&n>=0?t+n.toString(e):kn(i)}const tw={identify:i=>ru(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(i,e,t)=>kg(i,2,8,t),stringify:i=>ew(i,8,"0o")},nw={identify:ru,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(i,e,t)=>kg(i,0,10,t),stringify:kn},iw={identify:i=>ru(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(i,e,t)=>kg(i,2,16,t),stringify:i=>ew(i,16,"0x")},LN=[Kr,Wr,iu,su,Cg,tw,nw,iw,JS,ZS,QS];function g0(i){return typeof i=="bigint"||Number.isInteger(i)}const oc=({value:i})=>JSON.stringify(i),ON=[{identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify:oc},{identify:i=>i==null,createNode:()=>new ge(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:oc},{identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:i=>i==="true",stringify:oc},{identify:g0,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(i,e,{intAsBigInt:t})=>t?BigInt(i):parseInt(i,10),stringify:({value:i})=>g0(i)?i.toString():JSON.stringify(i)},{identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:i=>parseFloat(i),stringify:oc}],RN={default:!0,tag:"",test:/^/,resolve(i,e){return e(`Unresolved plain scalar ${JSON.stringify(i)}`),i}},jN=[Kr,Wr].concat(ON,RN),Ng={identify:i=>i instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(i,e){if(typeof atob=="function"){const t=atob(i.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let o=0;o<t.length;++o)n[o]=t.charCodeAt(o);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),i},stringify({comment:i,type:e,value:t},n,o,a){if(!t)return"";const c=t;let u;if(typeof btoa=="function"){let h="";for(let f=0;f<c.length;++f)h+=String.fromCharCode(c[f]);u=btoa(h)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=ge.BLOCK_LITERAL),e!==ge.QUOTE_DOUBLE){const h=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),f=Math.ceil(u.length/h),y=new Array(f);for(let m=0,_=0;m<f;++m,_+=h)y[m]=u.substr(_,h);u=y.join(e===ge.BLOCK_LITERAL?`
|
|
722
|
+
`:" ")}return Da({comment:i,type:e,value:u},n,o,a)}};function sw(i,e){if(Yr(i))for(let t=0;t<i.items.length;++t){let n=i.items[t];if(!Ve(n)){if(Xr(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");const o=n.items[0]||new Tt(new ge(null));if(n.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${n.commentBefore}
|
|
723
|
+
${o.key.commentBefore}`:n.commentBefore),n.comment){const a=o.value??o.key;a.comment=a.comment?`${n.comment}
|
|
724
|
+
${a.comment}`:n.comment}n=o}i.items[t]=Ve(n)?n:new Tt(n)}}else e("Expected a sequence for this tag");return i}function rw(i,e,t){const{replacer:n}=t,o=new Wi(i);o.tag="tag:yaml.org,2002:pairs";let a=0;if(e&&Symbol.iterator in Object(e))for(let c of e){typeof n=="function"&&(c=n.call(e,String(a++),c));let u,h;if(Array.isArray(c))if(c.length===2)u=c[0],h=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const f=Object.keys(c);if(f.length===1)u=f[0],h=c[u];else throw new TypeError(`Expected tuple with one key, not ${f.length} keys`)}else u=c;o.items.push(Ag(u,h,t))}return o}const Mg={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:sw,createNode:rw};class Hr extends Wi{constructor(){super(),this.add=Zt.prototype.add.bind(this),this.delete=Zt.prototype.delete.bind(this),this.get=Zt.prototype.get.bind(this),this.has=Zt.prototype.has.bind(this),this.set=Zt.prototype.set.bind(this),this.tag=Hr.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(const o of this.items){let a,c;if(Ve(o)?(a=yn(o.key,"",t),c=yn(o.value,a,t)):a=yn(o,"",t),n.has(a))throw new Error("Ordered maps must not include duplicate keys");n.set(a,c)}return n}static from(e,t,n){const o=rw(e,t,n),a=new this;return a.items=o.items,a}}Hr.tag="tag:yaml.org,2002:omap";const Dg={collection:"seq",identify:i=>i instanceof Map,nodeClass:Hr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,e){const t=sw(i,e),n=[];for(const{key:o}of t.items)He(o)&&(n.includes(o.value)?e(`Ordered maps must not include duplicate keys: ${o.value}`):n.push(o.value));return Object.assign(new Hr,t)},createNode:(i,e,t)=>Hr.from(i,e,t)};function ow({value:i,source:e},t){return e&&(i?aw:lw).test.test(e)?e:i?t.options.trueStr:t.options.falseStr}const aw={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ge(!0),stringify:ow},lw={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ge(!1),stringify:ow},HN={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:kn},$N={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){const e=Number(i.value);return isFinite(e)?e.toExponential():kn(i)}},zN={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){const e=new ge(parseFloat(i.replace(/_/g,""))),t=i.indexOf(".");if(t!==-1){const n=i.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:kn},La=i=>typeof i=="bigint"||Number.isInteger(i);function ou(i,e,t,{intAsBigInt:n}){const o=i[0];if((o==="-"||o==="+")&&(e+=1),i=i.substring(e).replace(/_/g,""),n){switch(t){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}const c=BigInt(i);return o==="-"?BigInt(-1)*c:c}const a=parseInt(i,t);return o==="-"?-1*a:a}function Lg(i,e,t){const{value:n}=i;if(La(n)){const o=n.toString(e);return n<0?"-"+t+o.substr(1):t+o}return kn(i)}const IN={identify:La,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,e,t)=>ou(i,2,2,t),stringify:i=>Lg(i,2,"0b")},BN={identify:La,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,e,t)=>ou(i,1,8,t),stringify:i=>Lg(i,8,"0")},PN={identify:La,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,e,t)=>ou(i,0,10,t),stringify:kn},qN={identify:La,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,e,t)=>ou(i,2,16,t),stringify:i=>Lg(i,16,"0x")};class $r extends Zt{constructor(e){super(e),this.tag=$r.tag}add(e){let t;Ve(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Tt(e.key,null):t=new Tt(e,null),As(this.items,t.key)||this.items.push(t)}get(e,t){const n=As(this.items,e);return!t&&Ve(n)?He(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=As(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Tt(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:o}=n,a=new this(e);if(t&&Symbol.iterator in Object(t))for(let c of t)typeof o=="function"&&(c=o.call(t,c,c)),a.items.push(Ag(c,null,n));return a}}$r.tag="tag:yaml.org,2002:set";const Og={collection:"map",identify:i=>i instanceof Set,nodeClass:$r,default:!1,tag:"tag:yaml.org,2002:set",createNode:(i,e,t)=>$r.from(i,e,t),resolve(i,e){if(Xr(i)){if(i.hasAllNullValues(!0))return Object.assign(new $r,i);e("Set items must all have null values")}else e("Expected a mapping for this tag");return i}};function Rg(i,e){const t=i[0],n=t==="-"||t==="+"?i.substring(1):i,o=c=>e?BigInt(c):Number(c),a=n.replace(/_/g,"").split(":").reduce((c,u)=>c*o(60)+o(u),o(0));return t==="-"?o(-1)*a:a}function cw(i){let{value:e}=i,t=c=>c;if(typeof e=="bigint")t=c=>BigInt(c);else if(isNaN(e)||!isFinite(e))return kn(i);let n="";e<0&&(n="-",e*=t(-1));const o=t(60),a=[e%o];return e<60?a.unshift(0):(e=(e-a[0])/o,a.unshift(e%o),e>=60&&(e=(e-a[0])/o,a.unshift(e))),n+a.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const uw={identify:i=>typeof i=="bigint"||Number.isInteger(i),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(i,e,{intAsBigInt:t})=>Rg(i,t),stringify:cw},dw={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:i=>Rg(i,!1),stringify:cw},au={identify:i=>i instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(i){const e=i.match(au.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,n,o,a,c,u]=e.map(Number),h=e[7]?Number((e[7]+"00").substr(1,3)):0;let f=Date.UTC(t,n-1,o,a||0,c||0,u||0,h);const y=e[8];if(y&&y!=="Z"){let m=Rg(y,!1);Math.abs(m)<30&&(m*=60),f-=6e4*m}return new Date(f)},stringify:({value:i})=>(i==null?void 0:i.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},p0=[Kr,Wr,iu,su,aw,lw,IN,BN,PN,qN,HN,$N,zN,Ng,hi,Dg,Mg,Og,uw,dw,au],m0=new Map([["core",LN],["failsafe",[Kr,Wr,iu]],["json",jN],["yaml11",p0],["yaml-1.1",p0]]),y0={binary:Ng,bool:Cg,float:QS,floatExp:ZS,floatNaN:JS,floatTime:dw,int:nw,intHex:iw,intOct:tw,intTime:uw,map:Kr,merge:hi,null:su,omap:Dg,pairs:Mg,seq:Wr,set:Og,timestamp:au},UN={"tag:yaml.org,2002:binary":Ng,"tag:yaml.org,2002:merge":hi,"tag:yaml.org,2002:omap":Dg,"tag:yaml.org,2002:pairs":Mg,"tag:yaml.org,2002:set":Og,"tag:yaml.org,2002:timestamp":au};function cf(i,e,t){const n=m0.get(e);if(n&&!i)return t&&!n.includes(hi)?n.concat(hi):n.slice();let o=n;if(!o)if(Array.isArray(i))o=[];else{const a=Array.from(m0.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${a} or define customTags array`)}if(Array.isArray(i))for(const a of i)o=o.concat(a);else typeof i=="function"&&(o=i(o.slice()));return t&&(o=o.concat(hi)),o.reduce((a,c)=>{const u=typeof c=="string"?y0[c]:c;if(!u){const h=JSON.stringify(c),f=Object.keys(y0).map(y=>JSON.stringify(y)).join(", ");throw new Error(`Unknown custom tag ${h}; use one of ${f}`)}return a.includes(u)||a.push(u),a},[])}const VN=(i,e)=>i.key<e.key?-1:i.key>e.key?1:0;class lu{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:o,schema:a,sortMapEntries:c,toStringDefaults:u}){this.compat=Array.isArray(e)?cf(e,"compat"):e?cf(null,e):null,this.name=typeof a=="string"&&a||"core",this.knownTags=o?UN:{},this.tags=cf(t,this.name,n),this.toStringOptions=u??null,Object.defineProperty(this,Ki,{value:Kr}),Object.defineProperty(this,In,{value:iu}),Object.defineProperty(this,Gr,{value:Wr}),this.sortMapEntries=typeof c=="function"?c:c===!0?VN:null}clone(){const e=Object.create(lu.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function FN(i,e){var h;const t=[];let n=e.directives===!0;if(e.directives!==!1&&i.directives){const f=i.directives.toString(i);f?(t.push(f),n=!0):i.directives.docStart&&(n=!0)}n&&t.push("---");const o=GS(i,e),{commentString:a}=o.options;if(i.commentBefore){t.length!==1&&t.unshift("");const f=a(i.commentBefore);t.unshift(ui(f,""))}let c=!1,u=null;if(i.contents){if(Xe(i.contents)){if(i.contents.spaceBefore&&n&&t.push(""),i.contents.commentBefore){const m=a(i.contents.commentBefore);t.push(ui(m,""))}o.forceBlockIndent=!!i.comment,u=i.contents.comment}const f=u?void 0:()=>c=!0;let y=Br(i.contents,o,()=>u=null,f);u&&(y+=Es(y,"",a(u))),(y[0]==="|"||y[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${y}`:t.push(y)}else t.push(Br(i.contents,o));if((h=i.directives)!=null&&h.docEnd)if(i.comment){const f=a(i.comment);f.includes(`
|
|
725
|
+
`)?(t.push("..."),t.push(ui(f,""))):t.push(`... ${f}`)}else t.push("...");else{let f=i.comment;f&&c&&(f=f.replace(/^\n+/,"")),f&&((!c||u)&&t[t.length-1]!==""&&t.push(""),t.push(ui(a(f),"")))}return t.join(`
|
|
726
|
+
`)+`
|
|
727
|
+
`}let cu=class hw{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,bn,{value:jf});let o=null;typeof t=="function"||Array.isArray(t)?o=t:n===void 0&&t&&(n=t,t=void 0);const a=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=a;let{version:c}=a;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new kt({version:c}),this.setSchema(c,n),this.contents=e===void 0?null:this.createNode(e,o,n)}clone(){const e=Object.create(hw.prototype,{[bn]:{value:jf}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Xe(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Tr(this.contents)&&this.contents.add(e)}addIn(e,t){Tr(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=PS(this);e.anchor=!t||n.has(t)?qS(t||"a",n):t}return new Qc(e.anchor)}createNode(e,t,n){let o;if(typeof t=="function")e=t.call({"":e},"",e),o=t;else if(Array.isArray(t)){const x=C=>typeof C=="number"||C instanceof String||C instanceof Number,E=t.filter(x).map(String);E.length>0&&(t=t.concat(E)),o=t}else n===void 0&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:a,anchorPrefix:c,flow:u,keepUndefined:h,onTagObj:f,tag:y}=n??{},{onAnchor:m,setAnchors:_,sourceObjects:b}=bN(this,c||"a"),S={aliasDuplicateObjects:a??!0,keepUndefined:h??!1,onAnchor:m,onTagObj:f,replacer:o,schema:this.schema,sourceObjects:b},v=Aa(e,y,S);return u&&Fe(v)&&(v.flow=!0),_(),v}createPair(e,t,n={}){const o=this.createNode(e,null,n),a=this.createNode(t,null,n);return new Tt(o,a)}delete(e){return Tr(this.contents)?this.contents.delete(e):!1}deleteIn(e){return ga(e)?this.contents==null?!1:(this.contents=null,!0):Tr(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Fe(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return ga(e)?!t&&He(this.contents)?this.contents.value:this.contents:Fe(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Fe(this.contents)?this.contents.has(e):!1}hasIn(e){return ga(e)?this.contents!==void 0:Fe(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Bc(this.schema,[e],t):Tr(this.contents)&&this.contents.set(e,t)}setIn(e,t){ga(e)?this.contents=t:this.contents==null?this.contents=Bc(this.schema,Array.from(e),t):Tr(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new kt({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new kt({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const o=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new lu(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:o,onAnchor:a,reviver:c}={}){const u={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},h=yn(this.contents,t??"",u);if(typeof a=="function")for(const{count:f,res:y}of u.anchors.values())a(y,f);return typeof c=="function"?Rr(c,{"":h},"",h):h}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return FN(this,e)}};function Tr(i){if(Fe(i))return!0;throw new Error("Expected a YAML collection as document contents")}class jg extends Error{constructor(e,t,n,o){super(),this.name=e,this.code=n,this.message=o,this.pos=t}}class Cs extends jg{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class fw extends jg{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const qc=(i,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(u=>e.linePos(u));const{line:n,col:o}=t.linePos[0];t.message+=` at line ${n}, column ${o}`;let a=o-1,c=i.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(a>=60&&c.length>80){const u=Math.min(a-39,c.length-79);c="…"+c.substring(u),a-=u-1}if(c.length>80&&(c=c.substring(0,79)+"…"),n>1&&/^ *$/.test(c.substring(0,a))){let u=i.substring(e.lineStarts[n-2],e.lineStarts[n-1]);u.length>80&&(u=u.substring(0,79)+`…
|
|
728
|
+
`),c=u+c}if(/[^ ]/.test(c)){let u=1;const h=t.linePos[1];(h==null?void 0:h.line)===n&&h.col>o&&(u=Math.max(1,Math.min(h.col-o,80-a)));const f=" ".repeat(a)+"^".repeat(u);t.message+=`:
|
|
729
|
+
|
|
730
|
+
${c}
|
|
731
|
+
${f}
|
|
732
|
+
`}};function Pr(i,{flow:e,indicator:t,next:n,offset:o,onError:a,parentIndent:c,startOnNewline:u}){let h=!1,f=u,y=u,m="",_="",b=!1,S=!1,v=null,x=null,E=null,C=null,L=null,R=null,N=null;for(const B of i)switch(S&&(B.type!=="space"&&B.type!=="newline"&&B.type!=="comma"&&a(B.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S=!1),v&&(f&&B.type!=="comment"&&B.type!=="newline"&&a(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),v=null),B.type){case"space":!e&&(t!=="doc-start"||(n==null?void 0:n.type)!=="flow-collection")&&B.source.includes(" ")&&(v=B),y=!0;break;case"comment":{y||a(B,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const O=B.source.substring(1)||" ";m?m+=_+O:m=O,_="",f=!1;break}case"newline":f?m?m+=B.source:(!R||t!=="seq-item-ind")&&(h=!0):_+=B.source,f=!0,b=!0,(x||E)&&(C=B),y=!0;break;case"anchor":x&&a(B,"MULTIPLE_ANCHORS","A node can have at most one anchor"),B.source.endsWith(":")&&a(B.offset+B.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),x=B,N??(N=B.offset),f=!1,y=!1,S=!0;break;case"tag":{E&&a(B,"MULTIPLE_TAGS","A node can have at most one tag"),E=B,N??(N=B.offset),f=!1,y=!1,S=!0;break}case t:(x||E)&&a(B,"BAD_PROP_ORDER",`Anchors and tags must be after the ${B.source} indicator`),R&&a(B,"UNEXPECTED_TOKEN",`Unexpected ${B.source} in ${e??"collection"}`),R=B,f=t==="seq-item-ind"||t==="explicit-key-ind",y=!1;break;case"comma":if(e){L&&a(B,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),L=B,f=!1,y=!1;break}default:a(B,"UNEXPECTED_TOKEN",`Unexpected ${B.type} token`),f=!1,y=!1}const V=i[i.length-1],I=V?V.offset+V.source.length:o;return S&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&a(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),v&&(f&&v.indent<=c||(n==null?void 0:n.type)==="block-map"||(n==null?void 0:n.type)==="block-seq")&&a(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:L,found:R,spaceBefore:h,comment:m,hasNewline:b,anchor:x,tag:E,newlineAfterProp:C,end:I,start:N??I}}function Ca(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
|
|
733
|
+
`))return!0;if(i.end){for(const e of i.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of i.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(Ca(e.key)||Ca(e.value))return!0}return!1;default:return!0}}function If(i,e,t){if((e==null?void 0:e.type)==="flow-collection"){const n=e.end[0];n.indent===i&&(n.source==="]"||n.source==="}")&&Ca(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function gw(i,e,t){const{uniqueKeys:n}=i.options;if(n===!1)return!1;const o=typeof n=="function"?n:(a,c)=>a===c||He(a)&&He(c)&&a.value===c.value;return e.some(a=>o(a.key,t))}const _0="All mapping items must start at the same column";function GN({composeNode:i,composeEmptyNode:e},t,n,o,a){var y;const c=(a==null?void 0:a.nodeClass)??Zt,u=new c(t.schema);t.atRoot&&(t.atRoot=!1);let h=n.offset,f=null;for(const m of n.items){const{start:_,key:b,sep:S,value:v}=m,x=Pr(_,{indicator:"explicit-key-ind",next:b??(S==null?void 0:S[0]),offset:h,onError:o,parentIndent:n.indent,startOnNewline:!0}),E=!x.found;if(E){if(b&&(b.type==="block-seq"?o(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in b&&b.indent!==n.indent&&o(h,"BAD_INDENT",_0)),!x.anchor&&!x.tag&&!S){f=x.end,x.comment&&(u.comment?u.comment+=`
|
|
734
|
+
`+x.comment:u.comment=x.comment);continue}(x.newlineAfterProp||Ca(b))&&o(b??_[_.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((y=x.found)==null?void 0:y.indent)!==n.indent&&o(h,"BAD_INDENT",_0);t.atKey=!0;const C=x.end,L=b?i(t,b,x,o):e(t,C,_,null,x,o);t.schema.compat&&If(n.indent,b,o),t.atKey=!1,gw(t,u.items,L)&&o(C,"DUPLICATE_KEY","Map keys must be unique");const R=Pr(S??[],{indicator:"map-value-ind",next:v,offset:L.range[2],onError:o,parentIndent:n.indent,startOnNewline:!b||b.type==="block-scalar"});if(h=R.end,R.found){E&&((v==null?void 0:v.type)==="block-map"&&!R.hasNewline&&o(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&x.start<R.found.offset-1024&&o(L.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const N=v?i(t,v,R,o):e(t,h,S,null,R,o);t.schema.compat&&If(n.indent,v,o),h=N.range[2];const V=new Tt(L,N);t.options.keepSourceTokens&&(V.srcToken=m),u.items.push(V)}else{E&&o(L.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),R.comment&&(L.comment?L.comment+=`
|
|
735
|
+
`+R.comment:L.comment=R.comment);const N=new Tt(L);t.options.keepSourceTokens&&(N.srcToken=m),u.items.push(N)}}return f&&f<h&&o(f,"IMPOSSIBLE","Map comment with trailing content"),u.range=[n.offset,h,f??h],u}function XN({composeNode:i,composeEmptyNode:e},t,n,o,a){const c=(a==null?void 0:a.nodeClass)??Wi,u=new c(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let h=n.offset,f=null;for(const{start:y,value:m}of n.items){const _=Pr(y,{indicator:"seq-item-ind",next:m,offset:h,onError:o,parentIndent:n.indent,startOnNewline:!0});if(!_.found)if(_.anchor||_.tag||m)(m==null?void 0:m.type)==="block-seq"?o(_.end,"BAD_INDENT","All sequence items must start at the same column"):o(h,"MISSING_CHAR","Sequence item without - indicator");else{f=_.end,_.comment&&(u.comment=_.comment);continue}const b=m?i(t,m,_,o):e(t,_.end,y,null,_,o);t.schema.compat&&If(n.indent,m,o),h=b.range[2],u.items.push(b)}return u.range=[n.offset,h,f??h],u}function Oa(i,e,t,n){let o="";if(i){let a=!1,c="";for(const u of i){const{source:h,type:f}=u;switch(f){case"space":a=!0;break;case"comment":{t&&!a&&n(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const y=h.substring(1)||" ";o?o+=c+y:o=y,c="";break}case"newline":o&&(c+=h),a=!0;break;default:n(u,"UNEXPECTED_TOKEN",`Unexpected ${f} at node end`)}e+=h.length}}return{comment:o,offset:e}}const uf="Block collections are not allowed within flow collections",df=i=>i&&(i.type==="block-map"||i.type==="block-seq");function YN({composeNode:i,composeEmptyNode:e},t,n,o,a){var x;const c=n.start.source==="{",u=c?"flow map":"flow sequence",h=(a==null?void 0:a.nodeClass)??(c?Zt:Wi),f=new h(t.schema);f.flow=!0;const y=t.atRoot;y&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let m=n.offset+n.start.source.length;for(let E=0;E<n.items.length;++E){const C=n.items[E],{start:L,key:R,sep:N,value:V}=C,I=Pr(L,{flow:u,indicator:"explicit-key-ind",next:R??(N==null?void 0:N[0]),offset:m,onError:o,parentIndent:n.indent,startOnNewline:!1});if(!I.found){if(!I.anchor&&!I.tag&&!N&&!V){E===0&&I.comma?o(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`):E<n.items.length-1&&o(I.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${u}`),I.comment&&(f.comment?f.comment+=`
|
|
736
|
+
`+I.comment:f.comment=I.comment),m=I.end;continue}!c&&t.options.strict&&Ca(R)&&o(R,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(E===0)I.comma&&o(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`);else if(I.comma||o(I.start,"MISSING_CHAR",`Missing , between ${u} items`),I.comment){let B="";e:for(const O of L)switch(O.type){case"comma":case"space":break;case"comment":B=O.source.substring(1);break e;default:break e}if(B){let O=f.items[f.items.length-1];Ve(O)&&(O=O.value??O.key),O.comment?O.comment+=`
|
|
737
|
+
`+B:O.comment=B,I.comment=I.comment.substring(B.length+1)}}if(!c&&!N&&!I.found){const B=V?i(t,V,I,o):e(t,I.end,N,null,I,o);f.items.push(B),m=B.range[2],df(V)&&o(B.range,"BLOCK_IN_FLOW",uf)}else{t.atKey=!0;const B=I.end,O=R?i(t,R,I,o):e(t,B,L,null,I,o);df(R)&&o(O.range,"BLOCK_IN_FLOW",uf),t.atKey=!1;const Q=Pr(N??[],{flow:u,indicator:"map-value-ind",next:V,offset:O.range[2],onError:o,parentIndent:n.indent,startOnNewline:!1});if(Q.found){if(!c&&!I.found&&t.options.strict){if(N)for(const W of N){if(W===Q.found)break;if(W.type==="newline"){o(W,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}I.start<Q.found.offset-1024&&o(Q.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else V&&("source"in V&&((x=V.source)==null?void 0:x[0])===":"?o(V,"MISSING_CHAR",`Missing space after : in ${u}`):o(Q.start,"MISSING_CHAR",`Missing , or : between ${u} items`));const se=V?i(t,V,Q,o):Q.found?e(t,Q.end,N,null,Q,o):null;se?df(V)&&o(se.range,"BLOCK_IN_FLOW",uf):Q.comment&&(O.comment?O.comment+=`
|
|
738
|
+
`+Q.comment:O.comment=Q.comment);const Y=new Tt(O,se);if(t.options.keepSourceTokens&&(Y.srcToken=C),c){const W=f;gw(t,W.items,O)&&o(B,"DUPLICATE_KEY","Map keys must be unique"),W.items.push(Y)}else{const W=new Zt(t.schema);W.flow=!0,W.items.push(Y);const te=(se??O).range;W.range=[O.range[0],te[1],te[2]],f.items.push(W)}m=se?se.range[2]:Q.end}}const _=c?"}":"]",[b,...S]=n.end;let v=m;if((b==null?void 0:b.source)===_)v=b.offset+b.source.length;else{const E=u[0].toUpperCase()+u.substring(1),C=y?`${E} must end with a ${_}`:`${E} in block collection must be sufficiently indented and end with a ${_}`;o(m,y?"MISSING_CHAR":"BAD_INDENT",C),b&&b.source.length!==1&&S.unshift(b)}if(S.length>0){const E=Oa(S,v,t.options.strict,o);E.comment&&(f.comment?f.comment+=`
|
|
739
|
+
`+E.comment:f.comment=E.comment),f.range=[n.offset,v,E.offset]}else f.range=[n.offset,v,v];return f}function hf(i,e,t,n,o,a){const c=t.type==="block-map"?GN(i,e,t,n,a):t.type==="block-seq"?XN(i,e,t,n,a):YN(i,e,t,n,a),u=c.constructor;return o==="!"||o===u.tagName?(c.tag=u.tagName,c):(o&&(c.tag=o),c)}function KN(i,e,t,n,o){var _;const a=n.tag,c=a?e.directives.tagName(a.source,b=>o(a,"TAG_RESOLVE_FAILED",b)):null;if(t.type==="block-seq"){const{anchor:b,newlineAfterProp:S}=n,v=b&&a?b.offset>a.offset?b:a:b??a;v&&(!S||S.offset<v.offset)&&o(v,"MISSING_CHAR","Missing newline after block sequence props")}const u=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!a||!c||c==="!"||c===Zt.tagName&&u==="map"||c===Wi.tagName&&u==="seq")return hf(i,e,t,o,c);let h=e.schema.tags.find(b=>b.tag===c&&b.collection===u);if(!h){const b=e.schema.knownTags[c];if((b==null?void 0:b.collection)===u)e.schema.tags.push(Object.assign({},b,{default:!1})),h=b;else return b?o(a,"BAD_COLLECTION_TYPE",`${b.tag} used for ${u} collection, but expects ${b.collection??"scalar"}`,!0):o(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),hf(i,e,t,o,c)}const f=hf(i,e,t,o,c,h),y=((_=h.resolve)==null?void 0:_.call(h,f,b=>o(a,"TAG_RESOLVE_FAILED",b),e.options))??f,m=Xe(y)?y:new ge(y);return m.range=f.range,m.tag=c,h!=null&&h.format&&(m.format=h.format),m}function pw(i,e,t){const n=e.offset,o=WN(e,i.options.strict,t);if(!o)return{value:"",type:null,comment:"",range:[n,n,n]};const a=o.mode===">"?ge.BLOCK_FOLDED:ge.BLOCK_LITERAL,c=e.source?JN(e.source):[];let u=c.length;for(let v=c.length-1;v>=0;--v){const x=c[v][1];if(x===""||x==="\r")u=v;else break}if(u===0){const v=o.chomp==="+"&&c.length>0?`
|
|
740
|
+
`.repeat(Math.max(1,c.length-1)):"";let x=n+o.length;return e.source&&(x+=e.source.length),{value:v,type:a,comment:o.comment,range:[n,x,x]}}let h=e.indent+o.indent,f=e.offset+o.length,y=0;for(let v=0;v<u;++v){const[x,E]=c[v];if(E===""||E==="\r")o.indent===0&&x.length>h&&(h=x.length);else{x.length<h&&t(f+x.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),o.indent===0&&(h=x.length),y=v,h===0&&!i.atRoot&&t(f,"BAD_INDENT","Block scalar values in collections must be indented");break}f+=x.length+E.length+1}for(let v=c.length-1;v>=u;--v)c[v][0].length>h&&(u=v+1);let m="",_="",b=!1;for(let v=0;v<y;++v)m+=c[v][0].slice(h)+`
|
|
741
|
+
`;for(let v=y;v<u;++v){let[x,E]=c[v];f+=x.length+E.length+1;const C=E[E.length-1]==="\r";if(C&&(E=E.slice(0,-1)),E&&x.length<h){const R=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;t(f-E.length-(C?2:1),"BAD_INDENT",R),x=""}a===ge.BLOCK_LITERAL?(m+=_+x.slice(h)+E,_=`
|
|
742
|
+
`):x.length>h||E[0]===" "?(_===" "?_=`
|
|
743
|
+
`:!b&&_===`
|
|
744
|
+
`&&(_=`
|
|
745
|
+
|
|
746
|
+
`),m+=_+x.slice(h)+E,_=`
|
|
747
|
+
`,b=!0):E===""?_===`
|
|
748
|
+
`?m+=`
|
|
749
|
+
`:_=`
|
|
750
|
+
`:(m+=_+E,_=" ",b=!1)}switch(o.chomp){case"-":break;case"+":for(let v=u;v<c.length;++v)m+=`
|
|
751
|
+
`+c[v][0].slice(h);m[m.length-1]!==`
|
|
752
|
+
`&&(m+=`
|
|
753
|
+
`);break;default:m+=`
|
|
754
|
+
`}const S=n+o.length+e.source.length;return{value:m,type:a,comment:o.comment,range:[n,S,S]}}function WN({offset:i,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=e[0],a=o[0];let c=0,u="",h=-1;for(let _=1;_<o.length;++_){const b=o[_];if(!u&&(b==="-"||b==="+"))u=b;else{const S=Number(b);!c&&S?c=S:h===-1&&(h=i+_)}}h!==-1&&n(h,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let f=!1,y="",m=o.length;for(let _=1;_<e.length;++_){const b=e[_];switch(b.type){case"space":f=!0;case"newline":m+=b.source.length;break;case"comment":t&&!f&&n(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),m+=b.source.length,y=b.source.substring(1);break;case"error":n(b,"UNEXPECTED_TOKEN",b.message),m+=b.source.length;break;default:{const S=`Unexpected token in block scalar header: ${b.type}`;n(b,"UNEXPECTED_TOKEN",S);const v=b.source;v&&typeof v=="string"&&(m+=v.length)}}}return{mode:a,indent:c,chomp:u,comment:y,length:m}}function JN(i){const e=i.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),a=[n!=null&&n[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let c=1;c<e.length;c+=2)a.push([e[c],e[c+1]]);return a}function mw(i,e,t){const{offset:n,type:o,source:a,end:c}=i;let u,h;const f=(_,b,S)=>t(n+_,b,S);switch(o){case"scalar":u=ge.PLAIN,h=ZN(a,f);break;case"single-quoted-scalar":u=ge.QUOTE_SINGLE,h=QN(a,f);break;case"double-quoted-scalar":u=ge.QUOTE_DOUBLE,h=eM(a,f);break;default:return t(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[n,n+a.length,n+a.length]}}const y=n+a.length,m=Oa(c,y,e,t);return{value:h,type:u,comment:m.comment,range:[n,y,m.offset]}}function ZN(i,e){let t="";switch(i[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${i[0]}`;break}case"@":case"`":{t=`reserved character ${i[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),yw(i)}function QN(i,e){return(i[i.length-1]!=="'"||i.length===1)&&e(i.length,"MISSING_CHAR","Missing closing 'quote"),yw(i.slice(1,-1)).replace(/''/g,"'")}function yw(i){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
755
|
+
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
756
|
+
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(i);if(!n)return i;let o=n[1],a=" ",c=e.lastIndex;for(t.lastIndex=c;n=t.exec(i);)n[1]===""?a===`
|
|
757
|
+
`?o+=a:a=`
|
|
758
|
+
`:(o+=a+n[1],a=" "),c=t.lastIndex;const u=/[ \t]*(.*)/sy;return u.lastIndex=c,n=u.exec(i),o+a+((n==null?void 0:n[1])??"")}function eM(i,e){let t="";for(let n=1;n<i.length-1;++n){const o=i[n];if(!(o==="\r"&&i[n+1]===`
|
|
759
|
+
`))if(o===`
|
|
760
|
+
`){const{fold:a,offset:c}=tM(i,n);t+=a,n=c}else if(o==="\\"){let a=i[++n];const c=nM[a];if(c)t+=c;else if(a===`
|
|
761
|
+
`)for(a=i[n+1];a===" "||a===" ";)a=i[++n+1];else if(a==="\r"&&i[n+1]===`
|
|
762
|
+
`)for(a=i[++n+1];a===" "||a===" ";)a=i[++n+1];else if(a==="x"||a==="u"||a==="U"){const u={x:2,u:4,U:8}[a];t+=iM(i,n+1,u,e),n+=u}else{const u=i.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),t+=u}}else if(o===" "||o===" "){const a=n;let c=i[n+1];for(;c===" "||c===" ";)c=i[++n+1];c!==`
|
|
763
|
+
`&&!(c==="\r"&&i[n+2]===`
|
|
764
|
+
`)&&(t+=n>a?i.slice(a,n+1):o)}else t+=o}return(i[i.length-1]!=='"'||i.length===1)&&e(i.length,"MISSING_CHAR",'Missing closing "quote'),t}function tM(i,e){let t="",n=i[e+1];for(;(n===" "||n===" "||n===`
|
|
765
|
+
`||n==="\r")&&!(n==="\r"&&i[e+2]!==`
|
|
766
|
+
`);)n===`
|
|
767
|
+
`&&(t+=`
|
|
768
|
+
`),e+=1,n=i[e+1];return t||(t=" "),{fold:t,offset:e}}const nM={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
769
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function iM(i,e,t,n){const o=i.substr(e,t),c=o.length===t&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(c)){const u=i.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),u}return String.fromCodePoint(c)}function _w(i,e,t,n){const{value:o,type:a,comment:c,range:u}=e.type==="block-scalar"?pw(i,e,n):mw(e,i.options.strict,n),h=t?i.directives.tagName(t.source,m=>n(t,"TAG_RESOLVE_FAILED",m)):null;let f;i.options.stringKeys&&i.atKey?f=i.schema[In]:h?f=sM(i.schema,o,h,t,n):e.type==="scalar"?f=rM(i,o,e,n):f=i.schema[In];let y;try{const m=f.resolve(o,_=>n(t??e,"TAG_RESOLVE_FAILED",_),i.options);y=He(m)?m:new ge(m)}catch(m){const _=m instanceof Error?m.message:String(m);n(t??e,"TAG_RESOLVE_FAILED",_),y=new ge(o)}return y.range=u,y.source=o,a&&(y.type=a),h&&(y.tag=h),f.format&&(y.format=f.format),c&&(y.comment=c),y}function sM(i,e,t,n,o){var u;if(t==="!")return i[In];const a=[];for(const h of i.tags)if(!h.collection&&h.tag===t)if(h.default&&h.test)a.push(h);else return h;for(const h of a)if((u=h.test)!=null&&u.test(e))return h;const c=i.knownTags[t];return c&&!c.collection?(i.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(o(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),i[In])}function rM({atKey:i,directives:e,schema:t},n,o,a){const c=t.tags.find(u=>{var h;return(u.default===!0||i&&u.default==="key")&&((h=u.test)==null?void 0:h.test(n))})||t[In];if(t.compat){const u=t.compat.find(h=>{var f;return h.default&&((f=h.test)==null?void 0:f.test(n))})??t[In];if(c.tag!==u.tag){const h=e.tagString(c.tag),f=e.tagString(u.tag),y=`Value may be parsed as either ${h} or ${f}`;a(o,"TAG_RESOLVE_FAILED",y,!0)}}return c}function oM(i,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let o=e[n];switch(o.type){case"space":case"comment":case"newline":i-=o.source.length;continue}for(o=e[++n];(o==null?void 0:o.type)==="space";)i+=o.source.length,o=e[++n];break}}return i}const aM={composeNode:bw,composeEmptyNode:Hg};function bw(i,e,t,n){const o=i.atKey,{spaceBefore:a,comment:c,anchor:u,tag:h}=t;let f,y=!0;switch(e.type){case"alias":f=lM(i,e,n),(u||h)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":f=_w(i,e,h,n),u&&(f.anchor=u.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{f=KN(aM,i,e,t,n),u&&(f.anchor=u.source.substring(1))}catch(m){const _=m instanceof Error?m.message:String(m);n(e,"RESOURCE_EXHAUSTION",_)}break;default:{const m=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",m),y=!1}}return f??(f=Hg(i,e.offset,void 0,null,t,n)),u&&f.anchor===""&&n(u,"BAD_ALIAS","Anchor cannot be an empty string"),o&&i.options.stringKeys&&(!He(f)||typeof f.value!="string"||f.tag&&f.tag!=="tag:yaml.org,2002:str")&&n(h??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),a&&(f.spaceBefore=!0),c&&(e.type==="scalar"&&e.source===""?f.comment=c:f.commentBefore=c),i.options.keepSourceTokens&&y&&(f.srcToken=e),f}function Hg(i,e,t,n,{spaceBefore:o,comment:a,anchor:c,tag:u,end:h},f){const y={type:"scalar",offset:oM(e,t,n),indent:-1,source:""},m=_w(i,y,u,f);return c&&(m.anchor=c.source.substring(1),m.anchor===""&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(m.spaceBefore=!0),a&&(m.comment=a,m.range[2]=h),m}function lM({options:i},{offset:e,source:t,end:n},o){const a=new Qc(t.substring(1));a.source===""&&o(e,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&o(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=e+t.length,u=Oa(n,c,i.strict,o);return a.range=[e,c,u.offset],u.comment&&(a.comment=u.comment),a}function cM(i,e,{offset:t,start:n,value:o,end:a},c){const u=Object.assign({_directives:e},i),h=new cu(void 0,u),f={atKey:!1,atRoot:!0,directives:h.directives,options:h.options,schema:h.schema},y=Pr(n,{indicator:"doc-start",next:o??(a==null?void 0:a[0]),offset:t,onError:c,parentIndent:0,startOnNewline:!0});y.found&&(h.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!y.hasNewline&&c(y.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),h.contents=o?bw(f,o,y,c):Hg(f,y.end,n,null,y,c);const m=h.contents.range[2],_=Oa(a,m,!1,c);return _.comment&&(h.comment=_.comment),h.range=[t,m,_.offset],h}function oa(i){if(typeof i=="number")return[i,i+1];if(Array.isArray(i))return i.length===2?i:[i[0],i[1]];const{offset:e,source:t}=i;return[e,e+(typeof t=="string"?t.length:1)]}function b0(i){var o;let e="",t=!1,n=!1;for(let a=0;a<i.length;++a){const c=i[a];switch(c[0]){case"#":e+=(e===""?"":n?`
|
|
770
|
+
|
|
771
|
+
`:`
|
|
772
|
+
`)+(c.substring(1)||" "),t=!0,n=!1;break;case"%":((o=i[a+1])==null?void 0:o[0])!=="#"&&(a+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}class $g{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,o,a)=>{const c=oa(t);a?this.warnings.push(new fw(c,n,o)):this.errors.push(new Cs(c,n,o))},this.directives=new kt({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:o}=b0(this.prelude);if(n){const a=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
773
|
+
${n}`:n;else if(o||e.directives.docStart||!a)e.commentBefore=n;else if(Fe(a)&&!a.flow&&a.items.length>0){let c=a.items[0];Ve(c)&&(c=c.key);const u=c.commentBefore;c.commentBefore=u?`${n}
|
|
774
|
+
${u}`:n}else{const c=a.commentBefore;a.commentBefore=c?`${n}
|
|
775
|
+
${c}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:b0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const o of e)yield*this.next(o);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,o)=>{const a=oa(e);a[0]+=t,this.onError(a,"BAD_DIRECTIVE",n,o)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=cM(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Cs(oa(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const n="Unexpected doc-end without preceding document";this.errors.push(new Cs(oa(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;const t=Oa(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const n=this.doc.comment;this.doc.comment=n?`${n}
|
|
776
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Cs(oa(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const n=Object.assign({_directives:this.directives},this.options),o=new cu(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,t,t],this.decorate(o,!1),yield o}}}function uM(i,e=!0,t){if(i){const n=(o,a,c)=>{const u=typeof o=="number"?o:Array.isArray(o)?o[0]:o.offset;if(t)t(u,a,c);else throw new Cs([u,u+1],a,c)};switch(i.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return mw(i,e,n);case"block-scalar":return pw({options:{strict:e}},i,n)}}return null}function dM(i,e){const{implicitKey:t=!1,indent:n,inFlow:o=!1,offset:a=-1,type:c="PLAIN"}=e,u=Da({type:c,value:i},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),h=e.end??[{type:"newline",offset:-1,indent:n,source:`
|
|
777
|
+
`}];switch(u[0]){case"|":case">":{const f=u.indexOf(`
|
|
778
|
+
`),y=u.substring(0,f),m=u.substring(f+1)+`
|
|
779
|
+
`,_=[{type:"block-scalar-header",offset:a,indent:n,source:y}];return vw(_,h)||_.push({type:"newline",offset:-1,indent:n,source:`
|
|
780
|
+
`}),{type:"block-scalar",offset:a,indent:n,props:_,source:m}}case'"':return{type:"double-quoted-scalar",offset:a,indent:n,source:u,end:h};case"'":return{type:"single-quoted-scalar",offset:a,indent:n,source:u,end:h};default:return{type:"scalar",offset:a,indent:n,source:u,end:h}}}function hM(i,e,t={}){let{afterKey:n=!1,implicitKey:o=!1,inFlow:a=!1,type:c}=t,u="indent"in i?i.indent:null;if(n&&typeof u=="number"&&(u+=2),!c)switch(i.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const f=i.props[0];if(f.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=f.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const h=Da({type:c,value:e},{implicitKey:o||u===null,indent:u!==null&&u>0?" ".repeat(u):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(h[0]){case"|":case">":fM(i,h);break;case'"':ff(i,h,"double-quoted-scalar");break;case"'":ff(i,h,"single-quoted-scalar");break;default:ff(i,h,"scalar")}}function fM(i,e){const t=e.indexOf(`
|
|
781
|
+
`),n=e.substring(0,t),o=e.substring(t+1)+`
|
|
782
|
+
`;if(i.type==="block-scalar"){const a=i.props[0];if(a.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a.source=n,i.source=o}else{const{offset:a}=i,c="indent"in i?i.indent:-1,u=[{type:"block-scalar-header",offset:a,indent:c,source:n}];vw(u,"end"in i?i.end:void 0)||u.push({type:"newline",offset:-1,indent:c,source:`
|
|
783
|
+
`});for(const h of Object.keys(i))h!=="type"&&h!=="offset"&&delete i[h];Object.assign(i,{type:"block-scalar",indent:c,props:u,source:o})}}function vw(i,e){if(e)for(const t of e)switch(t.type){case"space":case"comment":i.push(t);break;case"newline":return i.push(t),!0}return!1}function ff(i,e,t){switch(i.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":i.type=t,i.source=e;break;case"block-scalar":{const n=i.props.slice(1);let o=e.length;i.props[0].type==="block-scalar-header"&&(o-=i.props[0].source.length);for(const a of n)a.offset+=o;delete i.props,Object.assign(i,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{const o={type:"newline",offset:i.offset+e.length,indent:i.indent,source:`
|
|
784
|
+
`};delete i.items,Object.assign(i,{type:t,source:e,end:[o]});break}default:{const n="indent"in i?i.indent:-1,o="end"in i&&Array.isArray(i.end)?i.end.filter(a=>a.type==="space"||a.type==="comment"||a.type==="newline"):[];for(const a of Object.keys(i))a!=="type"&&a!=="offset"&&delete i[a];Object.assign(i,{type:t,indent:n,source:e,end:o})}}}const gM=i=>"type"in i?Uc(i):Tc(i);function Uc(i){switch(i.type){case"block-scalar":{let e="";for(const t of i.props)e+=Uc(t);return e+i.source}case"block-map":case"block-seq":{let e="";for(const t of i.items)e+=Tc(t);return e}case"flow-collection":{let e=i.start.source;for(const t of i.items)e+=Tc(t);for(const t of i.end)e+=t.source;return e}case"document":{let e=Tc(i);if(i.end)for(const t of i.end)e+=t.source;return e}default:{let e=i.source;if("end"in i&&i.end)for(const t of i.end)e+=t.source;return e}}}function Tc({start:i,key:e,sep:t,value:n}){let o="";for(const a of i)o+=a.source;if(e&&(o+=Uc(e)),t)for(const a of t)o+=a.source;return n&&(o+=Uc(n)),o}const Bf=Symbol("break visit"),pM=Symbol("skip children"),Sw=Symbol("remove item");function Ms(i,e){"type"in i&&i.type==="document"&&(i={start:i.start,value:i.value}),ww(Object.freeze([]),i,e)}Ms.BREAK=Bf;Ms.SKIP=pM;Ms.REMOVE=Sw;Ms.itemAtPath=(i,e)=>{let t=i;for(const[n,o]of e){const a=t==null?void 0:t[n];if(a&&"items"in a)t=a.items[o];else return}return t};Ms.parentCollection=(i,e)=>{const t=Ms.itemAtPath(i,e.slice(0,-1)),n=e[e.length-1][0],o=t==null?void 0:t[n];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function ww(i,e,t){let n=t(e,i);if(typeof n=="symbol")return n;for(const o of["key","value"]){const a=e[o];if(a&&"items"in a){for(let c=0;c<a.items.length;++c){const u=ww(Object.freeze(i.concat([[o,c]])),a.items[c],t);if(typeof u=="number")c=u-1;else{if(u===Bf)return Bf;u===Sw&&(a.items.splice(c,1),c-=1)}}typeof n=="function"&&o==="key"&&(n=n(e,i))}}return typeof n=="function"?n(e,i):n}const uu="\uFEFF",du="",hu="",ka="",mM=i=>!!i&&"items"in i,yM=i=>!!i&&(i.type==="scalar"||i.type==="single-quoted-scalar"||i.type==="double-quoted-scalar"||i.type==="block-scalar");function _M(i){switch(i){case uu:return"<BOM>";case du:return"<DOC>";case hu:return"<FLOW_END>";case ka:return"<SCALAR>";default:return JSON.stringify(i)}}function xw(i){switch(i){case uu:return"byte-order-mark";case du:return"doc-mode";case hu:return"flow-error-end";case ka:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
785
|
+
`:case`\r
|
|
786
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(i[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const bM=Object.freeze(Object.defineProperty({__proto__:null,BOM:uu,DOCUMENT:du,FLOW_END:hu,SCALAR:ka,createScalarToken:dM,isCollection:mM,isScalar:yM,prettyToken:_M,resolveAsScalar:uM,setScalarValue:hM,stringify:gM,tokenType:xw,visit:Ms},Symbol.toStringTag,{value:"Module"}));function En(i){switch(i){case void 0:case" ":case`
|
|
787
|
+
`:case"\r":case" ":return!0;default:return!1}}const v0=new Set("0123456789ABCDEFabcdef"),vM=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ac=new Set(",[]{}"),SM=new Set(` ,[]{}
|
|
788
|
+
\r `),gf=i=>!i||SM.has(i);class Tw{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
789
|
+
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
790
|
+
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){const o=this.buffer[n+e+1];if(o===`
|
|
791
|
+
`||!o&&!this.atEnd)return e+n+1}return t===`
|
|
792
|
+
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){const n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&En(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
793
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===uu&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){const a=e[n-1];if(a===" "||a===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){const a=e[t-1];if(a===" "||a===" ")t-=1;else break}const o=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield du,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const t=this.peek(3);if((t==="---"||t==="...")&&En(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!En(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&En(t)){const n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(gf),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&o[0]!=="#"||n===0&&(o.startsWith("---")||o.startsWith("..."))&&En(o[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield hu,yield*this.parseLineStart();let a=0;for(;o[a]===",";)a+=yield*this.pushCount(1),a+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(a+=yield*this.pushIndicators(),o[a]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-a),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(gf),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||En(c)||c===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let a=0;for(;this.buffer[t-1-a]==="\\";)a+=1;if(a%2===0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let o=n.indexOf(`
|
|
794
|
+
`,this.pos);if(o!==-1){for(;o!==-1;){const a=this.continueScalar(o+1);if(a===-1)break;o=n.indexOf(`
|
|
795
|
+
`,a)}o!==-1&&(t=o-(n[o-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>En(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let a=this.pos;n=this.buffer[a];++a)switch(n){case" ":t+=1;break;case`
|
|
796
|
+
`:e=a,t=0;break;case"\r":{const c=this.buffer[a+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
|
|
797
|
+
`)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const a=this.continueScalar(e+1);if(a===-1)break;e=this.buffer.indexOf(`
|
|
798
|
+
`,a)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let o=e+1;for(n=this.buffer[o];n===" ";)n=this.buffer[++o];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
|
|
799
|
+
`;)n=this.buffer[++o];e=o-1}else if(!this.blockScalarKeep)do{let a=e-1,c=this.buffer[a];c==="\r"&&(c=this.buffer[--a]);const u=a;for(;c===" ";)c=this.buffer[--a];if(c===`
|
|
800
|
+
`&&a>=this.pos&&a+1+t>u)e=a;else break}while(!0);return yield ka,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,n=this.pos-1,o;for(;o=this.buffer[++n];)if(o===":"){const a=this.buffer[n+1];if(En(a)||e&&ac.has(a))break;t=n}else if(En(o)){let a=this.buffer[n+1];if(o==="\r"&&(a===`
|
|
801
|
+
`?(n+=1,o=`
|
|
802
|
+
`,a=this.buffer[n+1]):t=n),a==="#"||e&&ac.has(a))break;if(o===`
|
|
803
|
+
`){const c=this.continueScalar(n+1);if(c===-1)break;n=Math.max(n,c-2)}}else{if(e&&ac.has(o))break;t=n}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield ka,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(gf))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(En(t)||e&&ac.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!En(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(vM.has(t))t=this.buffer[++e];else if(t==="%"&&v0.has(this.buffer[e+1])&&v0.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
|
|
804
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
805
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");const o=t-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=t),o}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class Ew{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const a=t+n>>1;this.lineStarts[a]<e?t=a+1:n=a}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const o=this.lineStarts[t-1];return{line:t,col:e-o+1}}}}function Fi(i,e){for(let t=0;t<i.length;++t)if(i[t].type===e)return!0;return!1}function S0(i){for(let e=0;e<i.length;++e)switch(i[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Aw(i){switch(i==null?void 0:i.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function lc(i){switch(i.type){case"document":return i.start;case"block-map":{const e=i.items[i.items.length-1];return e.sep??e.start}case"block-seq":return i.items[i.items.length-1].start;default:return[]}}function Er(i){var t;if(i.length===0)return[];let e=i.length;e:for(;--e>=0;)switch(i[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=i[++e])==null?void 0:t.type)==="space";);return i.splice(e,i.length)}function w0(i){if(i.start.type==="flow-seq-start")for(const e of i.items)e.sep&&!e.value&&!Fi(e.start,"explicit-key-ind")&&!Fi(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Aw(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class zg{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Tw,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=xw(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(e==null?void 0:e.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&w0(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{const o=n.items[n.items.length-1];if(o.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=t;else{Object.assign(o,{key:t,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=n.items[n.items.length-1];o.value?n.items.push({start:[],value:t}):o.value=t;break}case"flow-collection":{const o=n.items[n.items.length-1];!o||o.value?n.items.push({start:[],key:t,sep:[]}):o.sep?o.value=t:Object.assign(o,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const o=t.items[t.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&S0(o.start)===-1&&(t.indent===0||o.start.every(a=>a.type!=="comment"||a.indent<t.indent))&&(n.type==="document"?n.end=o.start:n.items.push({start:o.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{S0(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const t=lc(this.peek(2)),n=Er(t);let o;e.end?(o=e.end,o.push(this.sourceToken),delete e.end):o=[this.sourceToken];const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
|
|
806
|
+
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
807
|
+
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var n;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const o="end"in t.value?t.value.end:void 0,a=Array.isArray(o)?o[o.length-1]:void 0;(a==null?void 0:a.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const o=e.items[e.items.length-2],a=(n=o==null?void 0:o.value)==null?void 0:n.end;if(Array.isArray(a)){Array.prototype.push.apply(a,t.start),a.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const o=!this.onKeyLine&&this.indent===e.indent,a=o&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(a&&t.sep&&!t.value){const u=[];for(let h=0;h<t.sep.length;++h){const f=t.sep[h];switch(f.type){case"newline":u.push(h);break;case"space":break;case"comment":f.indent>e.indent&&(u.length=0);break;default:u.length=0}}u.length>=2&&(c=t.sep.splice(u[1]))}switch(this.type){case"anchor":case"tag":a||t.value?(c.push(this.sourceToken),e.items.push({start:c}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):a||t.value?(c.push(this.sourceToken),e.items.push({start:c,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Fi(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(Aw(t.key)&&!Fi(t.sep,"newline")){const u=Er(t.start),h=t.key,f=t.sep;f.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:h,sep:f}]})}else c.length>0?t.sep=t.sep.concat(c,this.sourceToken):t.sep.push(this.sourceToken);else if(Fi(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const u=Er(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||a?e.items.push({start:c,key:null,sep:[this.sourceToken]}):Fi(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const u=this.flowScalar(this.type);a||t.value?(e.items.push({start:c,key:u,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(u):(Object.assign(t,{key:u,sep:[]}),this.onKeyLine=!0);return}default:{const u=this.startBlockValue(e);if(u){if(u.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Fi(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else o&&e.items.push({start:c});this.stack.push(u);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var n;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const o="end"in t.value?t.value.end:void 0,a=Array.isArray(o)?o[o.length-1]:void 0;(a==null?void 0:a.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const o=e.items[e.items.length-2],a=(n=o==null?void 0:o.value)==null?void 0:n.end;if(Array.isArray(a)){Array.prototype.push.apply(a,t.start),a.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Fi(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const o=this.startBlockValue(e);if(o){this.stack.push(o);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while((n==null?void 0:n.type)==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:o,sep:[]}):t.sep?this.stack.push(o):Object.assign(t,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){const o=lc(n),a=Er(o);w0(e);const c=e.end.splice(1,e.end.length);c.push(this.sourceToken);const u={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:a,key:e,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
808
|
+
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
809
|
+
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=lc(e),n=Er(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=lc(e),n=Er(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Cw(i){const e=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||e&&new Ew||null,prettyErrors:e}}function wM(i,e={}){const{lineCounter:t,prettyErrors:n}=Cw(e),o=new zg(t==null?void 0:t.addNewLine),a=new $g(e),c=Array.from(a.compose(o.parse(i)));if(n&&t)for(const u of c)u.errors.forEach(qc(i,t)),u.warnings.forEach(qc(i,t));return c.length>0?c:Object.assign([],{empty:!0},a.streamInfo())}function kw(i,e={}){const{lineCounter:t,prettyErrors:n}=Cw(e),o=new zg(t==null?void 0:t.addNewLine),a=new $g(e);let c=null;for(const u of a.compose(o.parse(i),!0,i.length))if(!c)c=u;else if(c.options.logLevel!=="silent"){c.errors.push(new Cs(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(c.errors.forEach(qc(i,t)),c.warnings.forEach(qc(i,t))),c}function xM(i,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);const o=kw(i,t);if(!o)return null;if(o.warnings.forEach(a=>XS(o.options.logLevel,a)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:n},t))}function TM(i,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const o=Math.round(t);t=o<1?void 0:o>8?{indent:8}:{indent:o}}if(i===void 0){const{keepUndefined:o}=t??e??{};if(!o)return}return Os(i)&&!n?i.toString(t):new cu(i,n,t).toString(t)}const Nw=Object.freeze(Object.defineProperty({__proto__:null,Alias:Qc,CST:bM,Composer:$g,Document:cu,Lexer:Tw,LineCounter:Ew,Pair:Tt,Parser:zg,Scalar:ge,Schema:lu,YAMLError:jg,YAMLMap:Zt,YAMLParseError:Cs,YAMLSeq:Wi,YAMLWarning:fw,isAlias:Ji,isCollection:Fe,isDocument:Os,isMap:Xr,isNode:Xe,isPair:Ve,isScalar:He,isSeq:Yr,parse:xM,parseAllDocuments:wM,parseDocument:kw,stringify:TM,visit:Rs,visitAsync:Zc},Symbol.toStringTag,{value:"Module"})),EM=({action:i,model:e,sdkLanguage:t,testIdAttributeName:n,isInspecting:o,setIsInspecting:a,highlightedElement:c,setHighlightedElement:u})=>{const[h,f]=q.useState("action"),[y]=pn("shouldPopulateCanvasFromScreenshot",!1),m=q.useMemo(()=>NM(i),[i]),{snapshotInfoUrl:_,snapshotUrl:b,popoutUrl:S}=q.useMemo(()=>{const x=m[h];return e&&x?MM(e.traceUri,x,y):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[m,h,y,e]),v=q.useMemo(()=>_!==void 0?{snapshotInfoUrl:_,snapshotUrl:b,popoutUrl:S}:void 0,[_,b,S]);return T.jsxs("div",{className:"snapshot-tab vbox",children:[T.jsxs(Wf,{children:[T.jsx(Vt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:o,onClick:()=>a(!o)}),T.jsx("div",{className:"hbox",style:{height:"100%"},role:"tablist",children:["action","before","after"].map(x=>T.jsx(mv,{id:x,title:kM(x),selected:h===x,onSelect:()=>f(x)},x))}),T.jsx("div",{style:{flex:"auto"}}),T.jsx(Vt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(v!=null&&v.popoutUrl),onClick:()=>{const x=window.open((v==null?void 0:v.popoutUrl)||"","_blank");x==null||x.addEventListener("DOMContentLoaded",()=>{new xS(x,{isUnderTest:Dw,sdkLanguage:t,testIdAttributeName:n,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),T.jsx(AM,{snapshotUrls:v,sdkLanguage:t,testIdAttributeName:n,isInspecting:o,setIsInspecting:a,highlightedElement:c,setHighlightedElement:u})]})},AM=({snapshotUrls:i,sdkLanguage:e,testIdAttributeName:t,isInspecting:n,setIsInspecting:o,highlightedElement:a,setHighlightedElement:c})=>{const u=q.useRef(null),h=q.useRef(null),[f,y]=q.useState({viewport:Lw,url:""}),m=q.useRef({iteration:0,visibleIframe:0});return q.useEffect(()=>{(async()=>{const _=m.current.iteration+1,b=1-m.current.visibleIframe;m.current.iteration=_;const S=await DM(i==null?void 0:i.snapshotInfoUrl);if(m.current.iteration!==_)return;const v=[u,h][b].current;if(v){let x=()=>{};const E=new Promise(C=>x=C);try{v.addEventListener("load",x),v.addEventListener("error",x);const C=(i==null?void 0:i.snapshotUrl)||LM;v.contentWindow?v.contentWindow.location.replace(C):v.src=C,await E}catch{}finally{v.removeEventListener("load",x),v.removeEventListener("error",x)}}m.current.iteration===_&&(m.current.visibleIframe=b,y(S))})()},[i]),T.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:_=>{_.key==="Escape"&&n&&o(!1)},children:[T.jsx(x0,{isInspecting:n,sdkLanguage:e,testIdAttributeName:t,highlightedElement:a,setHighlightedElement:c,iframe:u.current,iteration:m.current.iteration}),T.jsx(x0,{isInspecting:n,sdkLanguage:e,testIdAttributeName:t,highlightedElement:a,setHighlightedElement:c,iframe:h.current,iteration:m.current.iteration}),T.jsx(CM,{snapshotInfo:f,children:T.jsxs("div",{className:"snapshot-switcher",children:[T.jsx("iframe",{ref:u,name:"snapshot",title:"DOM Snapshot",className:et(m.current.visibleIframe===0&&"snapshot-visible")}),T.jsx("iframe",{ref:h,name:"snapshot",title:"DOM Snapshot",className:et(m.current.visibleIframe===1&&"snapshot-visible")})]})})]})},CM=({snapshotInfo:i,children:e})=>{const[t,n]=Ds(),o=40,a={width:i.viewport.width,height:i.viewport.height},c={width:Math.max(a.width,480),height:Math.max(a.height+o,320)},u=Math.min(t.width/c.width,t.height/c.height,1),h={x:(t.width-c.width)/2,y:(t.height-c.height)/2};return T.jsx("div",{ref:n,className:"snapshot-wrapper",children:T.jsxs("div",{className:"snapshot-container",style:{width:c.width+"px",height:c.height+"px",transform:`translate(${h.x}px, ${h.y}px) scale(${u})`},children:[T.jsx(mN,{url:i.url}),T.jsx("div",{className:"snapshot-browser-body",children:T.jsx("div",{style:{width:a.width+"px",height:a.height+"px"},children:e})})]})})};function kM(i){return i==="before"?"Before":i==="after"?"After":i==="action"?"Action":i}const x0=({iframe:i,isInspecting:e,sdkLanguage:t,testIdAttributeName:n,highlightedElement:o,setHighlightedElement:a,iteration:c})=>(q.useEffect(()=>{const u=o.lastEdited==="ariaSnapshot"?o.ariaSnapshot:void 0,h=o.lastEdited==="locator"?o.locator:void 0,f=!!u||!!h||e,y=[],m=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{Mw(y,f,t,n,m,"",i==null?void 0:i.contentWindow)}catch{}const _=u?Jf(Nw,u):void 0,b=h?gN(t,h,n):void 0;for(const{recorder:S,frameSelector:v}of y){const x=b!=null&&b.startsWith(v)?b.substring(v.length).trim():void 0,E=(_==null?void 0:_.errors.length)===0?_.fragment:void 0;S.setUIState({mode:e?"inspecting":"none",actionSelector:x,ariaTemplate:E,language:t,testIdAttributeName:n,overlay:{offsetX:0}},{async elementPicked(C){a({locator:Yi(t,v+C.selector),ariaSnapshot:C.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const C of y)C.recorder!==S&&C.recorder.clearHighlight()}})}},[i,e,o,a,t,n,c]),T.jsx(T.Fragment,{}));function Mw(i,e,t,n,o,a,c){if(!c)return;const u=c;if(!u._recorder&&e){const h=new xS(c,{isUnderTest:o,sdkLanguage:t,testIdAttributeName:n,stableRafCount:1,browserName:"chromium",customEngines:[]}),f=new lN(h);u._injectedScript=h,u._recorder={recorder:f,frameSelector:a},o&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(f)))}u._recorder&&i.push(u._recorder);for(let h=0;h<c.frames.length;++h){const f=c.frames[h],y=f.frameElement?u._injectedScript.generateSelectorSimple(f.frameElement,{omitInternalEngines:!0,testIdAttributeName:n})+" >> internal:control=enter-frame >> ":"";Mw(i,e,t,n,o,a+y,f)}}const aa=(i,e,t=!1)=>{if(!i)return;const n=i[e];if(n){if(!i.pageId){console.error("snapshot action must have a pageId");return}return{action:i,snapshotName:n,pageId:i.pageId,point:i.point,hasInputTarget:t}}};function NM(i){if(!i)return{};let e=aa(i,"beforeSnapshot");if(!e){for(let o=K_(i);o;o=K_(o))if(o.endTime<=i.startTime&&o.afterSnapshot){e=aa(o,"afterSnapshot");break}}let t=aa(i,"afterSnapshot");if(!t){let o;for(let a=W_(i);a&&a.startTime<=i.endTime;a=W_(a))a.endTime>i.endTime||!a.afterSnapshot||o&&o.endTime>a.endTime||(o=a);o?t=aa(o,"afterSnapshot"):t=e}const n=aa(i,"inputSnapshot",!0)??t;return n&&(n.point=i.point),{action:n,before:e,after:t}}const Dw=new URLSearchParams(window.location.search).has("isUnderTest");function MM(i,e,t){const n=new URLSearchParams;n.set("trace",i),n.set("name",e.snapshotName),Dw&&n.set("isUnderTest","true"),e.point&&(n.set("pointX",String(e.point.x)),n.set("pointY",String(e.point.y)),e.hasInputTarget&&n.set("hasInputTarget","1")),t&&n.set("shouldPopulateCanvasFromScreenshot","1");const o=new URL(`snapshot/${e.pageId}?${n.toString()}`,window.location.href).toString(),a=new URL(`snapshotInfo/${e.pageId}?${n.toString()}`,window.location.href).toString(),c=new URLSearchParams;c.set("r",o),c.set("trace",i);const u=new URL(`snapshot.html?${c.toString()}`,window.location.href).toString();return{snapshotInfoUrl:a,snapshotUrl:o,popoutUrl:u}}async function DM(i){const e={url:"",viewport:Lw,timestamp:void 0,wallTime:void 0};if(i){const n=await(await fetch(i)).json();n.error||(e.url=n.url,e.viewport=n.viewport,e.timestamp=n.timestamp,e.wallTime=n.wallTime)}return e}const Lw={width:1280,height:720},LM='data:text/html,<body style="background: #ddd"></body>',Ow={width:200,height:45},Cr=2.5,OM=Ow.height+Cr*2,RM=({boundaries:i,previewPoint:e})=>{var y,m;const t=fi(),[n,o]=Ds(),a=q.useRef(null);let c=0;if(a.current&&e){const _=a.current.getBoundingClientRect();c=(e.clientY-_.top+a.current.scrollTop)/OM|0}const u=(m=(y=t==null?void 0:t.pages)==null?void 0:y[c])==null?void 0:m.screencastFrames;let h,f;if(e!==void 0&&u&&u.length){const _=i.minimum+(i.maximum-i.minimum)*e.x/n.width;h=u[E0(u,_,Rw)-1];const b={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};f=h?jw({width:h.width,height:h.height},b):void 0}return T.jsxs("div",{className:"film-strip",ref:o,children:[T.jsx("div",{className:"film-strip-lanes",ref:a,children:t==null?void 0:t.pages.map((_,b)=>_.screencastFrames.length?T.jsx(jM,{boundaries:i,page:_,width:n.width},b):null)}),t&&(e==null?void 0:e.x)!==void 0&&T.jsxs("div",{className:"film-strip-hover",style:{top:n.bottom+5,left:Math.min(e.x,n.width-(f?f.width:0)-10)},children:[e.action&&T.jsx("div",{className:"film-strip-hover-title",children:Yf(e.action,e)}),h&&f&&T.jsx("div",{style:{width:f.width,height:f.height},children:T.jsx("img",{src:t.createRelativeUrl(`sha1/${h.sha1}`),width:f.width,height:f.height})})]})]})},jM=({boundaries:i,page:e,width:t})=>{const n=fi(),o={width:0,height:0},a=e.screencastFrames;for(const x of a)o.width=Math.max(o.width,x.width),o.height=Math.max(o.height,x.height);const c=jw(o,Ow),u=a[0].timestamp,h=a[a.length-1].timestamp,f=i.maximum-i.minimum,y=(u-i.minimum)/f*t,m=(i.maximum-h)/f*t,b=(h-u)/f*t/(c.width+2*Cr)|0,S=(h-u)/b,v=[];for(let x=0;u&&S&&x<b;++x){const E=u+S*x,C=E0(a,E,Rw)-1;v.push(T.jsx("div",{className:"film-strip-frame",style:{width:c.width,height:c.height,backgroundImage:`url(${n==null?void 0:n.createRelativeUrl("sha1/"+a[C].sha1)})`,backgroundSize:`${c.width}px ${c.height}px`,margin:Cr,marginRight:Cr}},x))}return v.push(T.jsx("div",{className:"film-strip-frame",style:{width:c.width,height:c.height,backgroundImage:`url(${n==null?void 0:n.createRelativeUrl("sha1/"+a[a.length-1].sha1)})`,backgroundSize:`${c.width}px ${c.height}px`,margin:Cr,marginRight:Cr}},v.length)),T.jsx("div",{className:"film-strip-lane",style:{marginLeft:y+"px",marginRight:m+"px"},children:v})};function Rw(i,e){return i-e.timestamp}function jw(i,e){const t=Math.max(i.width/e.width,i.height/e.height);return{width:i.width/t|0,height:i.height/t|0}}const HM=({model:i,boundaries:e,consoleEntries:t,networkResources:n,onSelected:o,highlightedAction:a,highlightedResourceOrdinal:c,highlightedConsoleEntryOrdinal:u,selectedTime:h,setSelectedTime:f,sdkLanguage:y})=>{const[m,_]=Ds(),[b,S]=q.useState(),[v,x]=q.useState(),[E]=pn("actionsFilter",[]),{offsets:C,curtainLeft:L,curtainRight:R}=q.useMemo(()=>{let W=h||e;if(b&&b.startX!==b.endX){const Z=Hn(m.width,e,b.startX),oe=Hn(m.width,e,b.endX);W={minimum:Math.min(Z,oe),maximum:Math.max(Z,oe)}}const te=dn(m.width,e,W.minimum),P=dn(m.width,e,e.maximum)-dn(m.width,e,W.maximum);return{offsets:$M(m.width,e),curtainLeft:te,curtainRight:P}},[h,e,b,m]),N=q.useMemo(()=>i==null?void 0:i.filteredActions(E),[i,E]),V=q.useMemo(()=>{const W=[];for(const te of N||[])W.push({action:te,leftTime:te.startTime,rightTime:te.endTime||e.maximum,leftPosition:dn(m.width,e,te.startTime),rightPosition:dn(m.width,e,te.endTime||e.maximum),active:!1,error:!!te.error});for(const te of(i==null?void 0:i.resources)||[]){const Ne=te._monotonicTime,P=te._monotonicTime+te.time;W.push({resource:te,leftTime:Ne,rightTime:P,leftPosition:dn(m.width,e,Ne),rightPosition:dn(m.width,e,P),active:!1,error:!1})}for(const te of t||[])W.push({consoleMessage:te,leftTime:te.timestamp,rightTime:te.timestamp,leftPosition:dn(m.width,e,te.timestamp),rightPosition:dn(m.width,e,te.timestamp),active:!1,error:te.isError});return W},[i,N,t,e,m]);q.useMemo(()=>{for(const W of V)a?W.active=W.action===a:c!==void 0?W.active=W.resource===(n==null?void 0:n[c]):u!==void 0?W.active=W.consoleMessage===(t==null?void 0:t[u]):W.active=!1},[V,a,c,u,t,n]);const I=q.useCallback(W=>{if(x(void 0),!_.current)return;const te=W.clientX-_.current.getBoundingClientRect().left,Ne=Hn(m.width,e,te),P=h?dn(m.width,e,h.minimum):0,Z=h?dn(m.width,e,h.maximum):0;h&&Math.abs(te-P)<10?S({startX:Z,endX:te,type:"resize"}):h&&Math.abs(te-Z)<10?S({startX:P,endX:te,type:"resize"}):h&&Ne>h.minimum&&Ne<h.maximum&&W.clientY-_.current.getBoundingClientRect().top<20?S({startX:P,endX:Z,pivot:te,type:"move"}):S({startX:te,endX:te,type:"resize"})},[e,m,_,h]),B=q.useCallback(W=>{if(!_.current)return;const te=W.clientX-_.current.getBoundingClientRect().left,Ne=Hn(m.width,e,te),P=N==null?void 0:N.findLast(Te=>Te.startTime<=Ne);if(!W.buttons){S(void 0);return}if(P&&o(P),!b)return;let Z=b;if(b.type==="resize")Z={...b,endX:te};else{const Te=te-b.pivot;let M=b.startX+Te,G=b.endX+Te;M<0&&(M=0,G=M+(b.endX-b.startX)),G>m.width&&(G=m.width,M=G-(b.endX-b.startX)),Z={...b,startX:M,endX:G,pivot:te}}S(Z);const oe=Hn(m.width,e,Z.startX),xe=Hn(m.width,e,Z.endX);oe!==xe&&f({minimum:Math.min(oe,xe),maximum:Math.max(oe,xe)})},[e,b,m,N,o,_,f]),O=q.useCallback(()=>{if(x(void 0),!!b){if(b.startX!==b.endX){const W=Hn(m.width,e,b.startX),te=Hn(m.width,e,b.endX);f({minimum:Math.min(W,te),maximum:Math.max(W,te)})}else{const W=Hn(m.width,e,b.startX),te=N==null?void 0:N.findLast(Ne=>Ne.startTime<=W);te&&o(te),f(void 0)}S(void 0)}},[e,b,m,N,f,o]),Q=q.useCallback(W=>{if(!_.current)return;const te=W.clientX-_.current.getBoundingClientRect().left,Ne=Hn(m.width,e,te),P=N==null?void 0:N.findLast(Z=>Z.startTime<=Ne);x({x:te,clientY:W.clientY,action:P,sdkLanguage:y})},[e,m,N,_,y]),se=q.useCallback(()=>{x(void 0)},[]),Y=q.useCallback(()=>{f(void 0)},[f]);return T.jsxs("div",{className:"timeline-view-container",children:[!!b&&T.jsx(cv,{cursor:(b==null?void 0:b.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:O,onPaneMouseMove:B,onPaneDoubleClick:Y}),T.jsxs("div",{ref:_,className:"timeline-view",onMouseDown:I,onMouseMove:Q,onMouseLeave:se,children:[T.jsx("div",{className:"timeline-grid",children:C.map((W,te)=>T.jsx("div",{className:"timeline-divider",style:{left:W.position+"px"},children:T.jsx("div",{className:"timeline-time",children:Nt(W.time-e.minimum)})},te))}),T.jsx("div",{style:{height:8}}),T.jsx(RM,{boundaries:e,previewPoint:v}),T.jsx("div",{className:"timeline-bars",children:V.filter(W=>!W.action||W.action.class!=="Test").map((W,te)=>T.jsx("div",{className:et("timeline-bar",W.action&&"action",W.resource&&"network",W.consoleMessage&&"console-message",W.active&&"active",W.error&&"error"),style:{left:W.leftPosition,width:Math.max(5,W.rightPosition-W.leftPosition),top:zM(W),bottom:0}},te))}),T.jsx("div",{className:"timeline-marker",style:{display:v!==void 0?"block":"none",left:((v==null?void 0:v.x)||0)+"px"}}),h&&T.jsxs("div",{className:"timeline-window",children:[T.jsx("div",{className:"timeline-window-curtain left",style:{width:L}}),T.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),T.jsx("div",{className:"timeline-window-center",children:T.jsx("div",{className:"timeline-window-drag"})}),T.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),T.jsx("div",{className:"timeline-window-curtain right",style:{width:R}})]})]})]})};function $M(i,e){let n=i/64;const o=e.maximum-e.minimum,a=i/o;let c=o/n;const u=Math.ceil(Math.log(c)/Math.LN10);c=Math.pow(10,u),c*a>=320&&(c=c/5),c*a>=128&&(c=c/2);const h=e.minimum;let f=e.maximum;f+=64/a,n=Math.ceil((f-h)/c),c||(n=0);const y=[];for(let m=0;m<n;++m){const _=h+c*m;y.push({position:dn(i,e,_),time:_})}return y}function dn(i,e,t){return(t-e.minimum)/(e.maximum-e.minimum)*i}function Hn(i,e,t){return t/i*(e.maximum-e.minimum)+e.minimum}function zM(i){return i.resource?25:20}const IM=({model:i})=>{var t,n;if(!i)return T.jsx(T.Fragment,{});const e=i.wallTime!==void 0?new Date(i.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return T.jsxs("div",{style:{flex:"auto",display:"block",overflow:"hidden auto"},children:[T.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&T.jsxs("div",{className:"call-line",children:["start time:",T.jsx("span",{className:"call-value datetime",title:e,children:e})]}),T.jsxs("div",{className:"call-line",children:["duration:",T.jsx("span",{className:"call-value number",title:Nt(i.endTime-i.startTime),children:Nt(i.endTime-i.startTime)})]}),T.jsx("div",{className:"call-section",children:"Browser"}),T.jsxs("div",{className:"call-line",children:["engine:",T.jsx("span",{className:"call-value string",title:i.browserName,children:i.browserName})]}),i.channel&&T.jsxs("div",{className:"call-line",children:["channel:",T.jsx("span",{className:"call-value string",title:i.channel,children:i.channel})]}),i.platform&&T.jsxs("div",{className:"call-line",children:["platform:",T.jsx("span",{className:"call-value string",title:i.platform,children:i.platform})]}),i.playwrightVersion&&T.jsxs("div",{className:"call-line",children:["playwright version:",T.jsx("span",{className:"call-value string",title:i.playwrightVersion,children:i.playwrightVersion})]}),i.options.userAgent&&T.jsxs("div",{className:"call-line",children:["user agent:",T.jsx("span",{className:"call-value datetime",title:i.options.userAgent,children:i.options.userAgent})]}),i.options.baseURL&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),T.jsxs("div",{className:"call-line",children:["baseURL:",T.jsx("a",{className:"call-value string",href:i.options.baseURL,title:i.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:i.options.baseURL})]})]}),T.jsx("div",{className:"call-section",children:"Viewport"}),i.options.viewport&&T.jsxs("div",{className:"call-line",children:["width:",T.jsx("span",{className:"call-value number",title:String(!!((t=i.options.viewport)!=null&&t.width)),children:i.options.viewport.width})]}),i.options.viewport&&T.jsxs("div",{className:"call-line",children:["height:",T.jsx("span",{className:"call-value number",title:String(!!((n=i.options.viewport)!=null&&n.height)),children:i.options.viewport.height})]}),T.jsxs("div",{className:"call-line",children:["is mobile:",T.jsx("span",{className:"call-value boolean",title:String(!!i.options.isMobile),children:String(!!i.options.isMobile)})]}),i.options.deviceScaleFactor&&T.jsxs("div",{className:"call-line",children:["device scale:",T.jsx("span",{className:"call-value number",title:String(i.options.deviceScaleFactor),children:String(i.options.deviceScaleFactor)})]}),T.jsx("div",{className:"call-section",children:"Counts"}),T.jsxs("div",{className:"call-line",children:["pages:",T.jsx("span",{className:"call-value number",children:i.pages.length})]}),T.jsxs("div",{className:"call-line",children:["actions:",T.jsx("span",{className:"call-value number",children:i.actions.length})]}),T.jsxs("div",{className:"call-line",children:["events:",T.jsx("span",{className:"call-value number",children:i.events.length})]})]})},BM=({annotations:i})=>i.length?T.jsx("div",{className:"annotations-tab",children:i.map((e,t)=>T.jsxs("div",{className:"annotation-item",children:[T.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&T.jsxs("span",{children:[": ",hv(e.description)]})]},`annotation-${t}`))}):T.jsx(Ls,{text:"No annotations"}),PM=({sdkLanguage:i,isInspecting:e,setIsInspecting:t,highlightedElement:n,setHighlightedElement:o})=>{const[a,c]=q.useState(),u=q.useCallback(h=>{const{errors:f}=Jf(Nw,h,{prettyErrors:!1}),y=f.map(m=>({message:m.message,line:m.range[1].line,column:m.range[1].col,type:"subtle-error"}));c(y),o({...n,ariaSnapshot:h,lastEdited:"ariaSnapshot"}),t(!1)},[n,o,t]);return T.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[T.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[T.jsx("div",{children:"Locator"}),T.jsx(Vt,{style:{margin:"0 4px"},title:"Pick locator",icon:"target",toggled:e,onClick:()=>t(!e)}),T.jsx("div",{style:{flex:"auto"}}),T.jsx(Vt,{icon:"files",title:"Copy locator",onClick:()=>{I_(n.locator||"")}})]}),T.jsx("div",{style:{height:50},children:T.jsx(zr,{text:n.locator||"",highlighter:i,isFocused:!0,wrapLines:!0,onChange:h=>{o({...n,locator:h,lastEdited:"locator"}),t(!1)}})}),T.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[T.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),T.jsx(Vt,{icon:"files",title:"Copy snapshot",onClick:()=>{I_(n.ariaSnapshot||"")}})]}),T.jsx("div",{style:{height:150},children:T.jsx(zr,{text:n.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:a,onChange:u})})]})},qM=({className:i,style:e,open:t,isModal:n,minWidth:o,verticalOffset:a,requestClose:c,anchor:u,dataTestId:h,children:f})=>{const y=q.useRef(null),[m,_]=q.useState(0),[b]=pf(y),[S,v]=pf(u),x=u?UM(b,S,a):void 0;return q.useEffect(()=>{const E=L=>{!y.current||!(L.target instanceof Node)||y.current.contains(L.target)||c==null||c()},C=L=>{L.key==="Escape"&&(c==null||c())};return t?(document.addEventListener("mousedown",E),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("keydown",C)}):()=>{}},[t,c]),q.useLayoutEffect(()=>v(),[t,v]),q.useEffect(()=>{const E=()=>_(C=>C+1);return window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)}},[]),q.useLayoutEffect(()=>{y.current&&(t?n?y.current.showModal():y.current.show():y.current.close())},[t,n]),T.jsx("dialog",{ref:y,style:{position:"fixed",margin:x?0:void 0,zIndex:110,top:x==null?void 0:x.top,left:x==null?void 0:x.left,minWidth:o||0,...e},className:i,"data-testid":h,children:f})};function UM(i,e,t=4,n=4){let o=Math.max(n,e.left);o+i.width>window.innerWidth-n&&(o=window.innerWidth-i.width-n);let a=Math.max(0,e.bottom)+t;return a+i.height>window.innerHeight-t&&(Math.max(0,e.top)>i.height+t?a=Math.max(0,e.top)-i.height-t:a=window.innerHeight-t-i.height),{left:o,top:a}}const VM=({title:i,icon:e,buttonChildren:t,anchorRef:n,dialogDataTestId:o,children:a})=>{const c=q.useRef(null),u=n??c,[h,f]=q.useState(!1);return T.jsxs(T.Fragment,{children:[T.jsx(Vt,{ref:c,icon:e,title:i,onClick:()=>f(y=>!y),children:t}),T.jsx(qM,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:h,verticalOffset:8,requestClose:()=>f(!1),anchor:u,dataTestId:o,children:a})]})},Hw=({settings:i})=>T.jsx("div",{className:"vbox settings-view",children:i.map(e=>{const t=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return T.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:FM(e,t)},e.name)})}),FM=(i,e)=>{switch(i.type){case"check":return T.jsxs(T.Fragment,{children:[T.jsx("input",{type:"checkbox",id:e,checked:i.value,onChange:()=>i.set(!i.value)}),T.jsxs("label",{htmlFor:e,children:[i.name,!!i.count&&T.jsx("span",{className:"setting-counter",children:i.count})]})]});case"select":return T.jsxs(T.Fragment,{children:[T.jsxs("label",{htmlFor:e,children:[i.name,":",!!i.count&&T.jsx("span",{className:"setting-counter",children:i.count})]}),T.jsx("select",{id:e,value:i.value,onChange:t=>i.set(t.target.value),children:i.options.map(t=>T.jsx("option",{value:t.value,children:t.label},t.value))})]});default:return null}},i3=i=>{var t;const e=YM((t=i.model)==null?void 0:t.traceUri);return T.jsx(fv.Provider,{value:i.model,children:T.jsx(GM,{partition:e,...i})})},GM=i=>{var Ha;const{partition:e,model:t,showSourcesFirst:n,rootDir:o,fallbackLocation:a,isLive:c,hideTimeline:u,status:h,annotations:f,inert:y,onOpenExternally:m,revealSource:_,testRunMetadata:b}=i,[S,v]=pn("navigatorTab","actions"),[x,E]=pn("propertiesTab",n?"source":"call"),[C,L]=pn("propertiesSidebarLocation","bottom"),[R]=pn("actionsFilter",[]),[N,V]=Pi("selectedCallId"),[I,B]=Pi("selectedTime"),[O,Q]=Pi("highlightedCallId"),[se,Y]=Pi("revealedErrorKey"),[W,te]=Pi("highlightedConsoleMessageOrdinal"),[Ne,P]=Pi("revealedAttachmentCallId"),[Z,oe]=Pi("highlightedResourceOrdinal"),[xe,Te]=Pi("treeState",{expandedItems:new Map});iT(e);const[M,G]=q.useState({lastEdited:"none"}),[ee,ne]=q.useState(!1),de=q.useCallback(ue=>{V(ue==null?void 0:ue.callId),Y(void 0)},[V,Y]),ae=q.useMemo(()=>t==null?void 0:t.filteredActions(R),[t,R]),Ee=((t==null?void 0:t.actions.length)??0)-((ae==null?void 0:ae.length)??0),at=q.useMemo(()=>ae==null?void 0:ae.find(ue=>ue.callId===O),[ae,O]),$e=q.useCallback(ue=>{Q(ue==null?void 0:ue.callId)},[Q]),Zi=q.useMemo(()=>(t==null?void 0:t.sources)||new Map,[t]);q.useEffect(()=>{B(void 0),Y(void 0)},[t,B,Y]);const Bn=q.useMemo(()=>{if(N){const Mn=ae==null?void 0:ae.find(Qt=>Qt.callId===N);if(Mn)return Mn}const ue=t==null?void 0:t.failedAction();if(ue)return ue;if(ae!=null&&ae.length){let Mn=ae.length-1;for(let Qt=0;Qt<ae.length;++Qt)if(ae[Qt].title==="After Hooks"&&Qt){Mn=Qt-1;break}return ae[Mn]}},[t,ae,N]),vn=q.useMemo(()=>at||Bn,[Bn,at]),Jr=q.useCallback(ue=>{de(ue),$e(void 0)},[de,$e]),lt=q.useCallback(ue=>{E(ue),ue!=="inspector"&&ne(!1)},[E]),js=q.useCallback(ue=>{!ee&&ue&<("inspector"),ne(ue)},[ne,lt,ee]),Zr=q.useCallback(ue=>{G(ue),lt("inspector")},[lt]),fu=q.useCallback(ue=>{lt("attachments"),P({callId:ue})},[lt,P]);q.useEffect(()=>{_&<("source")},[_,lt]);const Hs=JE(t,I),Qi=wA(t,I),gi=GE(t),Qr=q.useMemo(()=>{var ue;return se!==void 0?(ue=gi.errors.get(se))==null?void 0:ue.stack:vn==null?void 0:vn.stack},[vn,se,gi]),pi=(t==null?void 0:t.sdkLanguage)||"javascript",gu={id:"inspector",title:"Locator",render:()=>T.jsx(PM,{sdkLanguage:pi,isInspecting:ee,setIsInspecting:js,highlightedElement:M,setHighlightedElement:G})},Et={id:"call",title:"Call",render:()=>T.jsx(fE,{action:vn,startTimeOffset:(t==null?void 0:t.startTime)??0,sdkLanguage:pi})},pu={id:"log",title:"Log",render:()=>T.jsx(mE,{action:vn,isLive:c})},Ra={id:"errors",title:"Errors",errorCount:gi.errors.size,render:()=>T.jsx(YE,{errorsModel:gi,testRunMetadata:b,sdkLanguage:pi,revealInSource:ue=>{ue.action?de(ue.action):Y(ue.message),lt("source")},wallTime:(t==null?void 0:t.wallTime)??0})};let eo;!Bn&&a&&(eo=(Ha=a.source)==null?void 0:Ha.errors.length);const mi={id:"source",title:"Source",errorCount:eo,render:()=>T.jsx(UE,{stack:Qr,sources:Zi,rootDir:o,stackFrameLocation:C==="bottom"?"right":"bottom",fallbackLocation:a,onOpenExternally:m})},mu={id:"console",title:"Console",count:Hs.entries.length,render:()=>T.jsx(ZE,{consoleModel:Hs,boundaries:Pn,selectedTime:I,onAccepted:ue=>B({minimum:ue.timestamp,maximum:ue.timestamp}),onEntryHovered:te})},ja={id:"network",title:"Network",count:Qi.resources.length,render:()=>T.jsx(xA,{boundaries:Pn,networkModel:Qi,onResourceHovered:oe,sdkLanguage:(t==null?void 0:t.sdkLanguage)??"javascript"})},yu={id:"attachments",title:"Attachments",count:t==null?void 0:t.visibleAttachments.length,render:()=>T.jsx(jE,{revealedAttachmentCallId:Ne})},es=[gu,Et,pu,Ra,mu,ja,mi,yu];if(f!==void 0){const ue={id:"annotations",title:"Annotations",count:f.length,render:()=>T.jsx(BM,{annotations:f})};es.push(ue)}if(n){const ue=es.indexOf(mi);es.splice(ue,1),es.splice(1,0,mi)}const{boundaries:Pn}=q.useMemo(()=>{const ue={minimum:(t==null?void 0:t.startTime)||0,maximum:(t==null?void 0:t.endTime)||3e4};return ue.minimum>ue.maximum&&(ue.minimum=0,ue.maximum=3e4),ue.maximum+=(ue.maximum-ue.minimum)/20,{boundaries:ue}},[t]);let ht=0;!c&&t&&t.endTime>=0?ht=t.endTime-t.startTime:t&&t.wallTime&&(ht=Date.now()-t.wallTime);const Nn={id:"actions",title:"Actions",component:T.jsxs("div",{className:"vbox",children:[h&&T.jsxs("div",{className:"workbench-run-status","data-testid":"workbench-run-status",children:[T.jsx("span",{className:et("codicon",av(h))}),T.jsx("div",{children:uE(h)}),T.jsx("div",{className:"spacer"}),T.jsx("div",{className:"workbench-run-duration",children:ht?Nt(ht):""})]}),T.jsx(hE,{sdkLanguage:pi,actions:ae||[],selectedAction:t?Bn:void 0,selectedTime:I,setSelectedTime:B,treeState:xe,setTreeState:Te,onSelected:Jr,onHighlighted:$e,revealActionAttachment:fu,revealConsole:()=>lt("console"),isLive:c})]})},At={id:"metadata",title:"Metadata",component:T.jsx(IM,{model:t})},_u=S==="actions"&&T.jsx(XM,{counters:t==null?void 0:t.actionCounters,hiddenActionsCount:Ee});return T.jsxs("div",{className:"vbox workbench",...y?{inert:!0}:{},children:[!u&&T.jsx(HM,{model:t,consoleEntries:Hs.entries,networkResources:Qi.resources,boundaries:Pn,highlightedAction:at,highlightedResourceOrdinal:Z,highlightedConsoleEntryOrdinal:W,onSelected:Jr,sdkLanguage:pi,selectedTime:I,setSelectedTime:B}),T.jsx(Cc,{sidebarSize:250,orientation:C==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:T.jsx(Cc,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:T.jsx(EM,{action:vn,model:t,sdkLanguage:pi,testIdAttributeName:(t==null?void 0:t.testIdAttributeName)||"data-testid",isInspecting:ee,setIsInspecting:js,highlightedElement:M,setHighlightedElement:Zr}),sidebar:T.jsx(wf,{tabs:[Nn,At],rightToolbar:[_u],selectedTab:S,setSelectedTab:v})}),sidebar:T.jsx(wf,{tabs:es,selectedTab:x,setSelectedTab:lt,rightToolbar:[C==="bottom"?T.jsx(Vt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{L("right")}}):T.jsx(Vt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{L("bottom")}})],mode:C==="bottom"?"default":"select"})})]})},XM=({counters:i,hiddenActionsCount:e})=>{const[t,n]=pn("actionsFilter",[]),o=q.useRef(null),a=T.jsxs(T.Fragment,{children:[e>0&&T.jsxs("span",{className:"workbench-actions-hidden-count",title:e+" actions hidden by filters",children:[e," hidden"]}),T.jsx("span",{ref:o,className:"codicon codicon-filter"})]});return T.jsx(VM,{title:"Filter actions",dialogDataTestId:"actions-filter-dialog",buttonChildren:a,anchorRef:o,children:T.jsx(Hw,{settings:[{type:"check",value:t.includes("getter"),set:c=>n(c?[...t,"getter"]:t.filter(u=>u!=="getter")),name:"Getters",count:i==null?void 0:i.get("getter")},{type:"check",value:t.includes("route"),set:c=>n(c?[...t,"route"]:t.filter(u=>u!=="route")),name:"Network routes",count:i==null?void 0:i.get("route")},{type:"check",value:t.includes("configuration"),set:c=>n(c?[...t,"configuration"]:t.filter(u=>u!=="configuration")),name:"Configuration",count:i==null?void 0:i.get("configuration")}]})})};function YM(i){if(!i)return"default";const e=new URL(i,"http://localhost");return e.searchParams.delete("timestamp"),e.toString()}var T0;(i=>{function e(t){for(const n of t.splice(0))n.dispose()}i.disposeAll=e})(T0||(T0={}));class Ar{constructor(){this._listeners=new Set,this.event=(e,t)=>{this._listeners.add(e);let n=!1;const o=this,a={dispose(){n||(n=!0,o._listeners.delete(e))}};return t&&t.push(a),a}}fire(e){const t=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const n of this._listeners)this._deliveryQueue.push({listener:n,event:e});if(t){for(let n=0;n<this._deliveryQueue.length;n++){const{listener:o,event:a}=this._deliveryQueue[n];o.call(null,a)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class KM extends Error{constructor(){super("Test server connection closed")}}class s3{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",t=>e(t.data.toString()))}onopen(e){this._ws.addEventListener("open",e)}onerror(e){this._ws.addEventListener("error",e)}onclose(e){this._ws.addEventListener("close",e)}send(e){this._ws.send(e)}close(){this._ws.close()}}class r3{constructor(e){this._onCloseEmitter=new Ar,this._onReportEmitter=new Ar,this._onStdioEmitter=new Ar,this._onTestFilesChangedEmitter=new Ar,this._onLoadTraceRequestedEmitter=new Ar,this._onTestPausedEmitter=new Ar,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this.onTestPaused=this._onTestPausedEmitter.event,this._transport=e,this._transport.onmessage(n=>{const o=JSON.parse(n),{id:a,result:c,error:u,method:h,params:f}=o;if(a){const y=this._callbacks.get(a);if(!y)return;this._callbacks.delete(a),u?y.reject(new Error(u)):y.resolve(c)}else this._dispatchEvent(h,f)});const t=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((n,o)=>{this._transport.onopen(n),this._transport.onerror(o)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(t);for(const n of this._callbacks.values())n.reject(new KM);this._callbacks.clear()})}isClosed(){return this._isClosed}async _sendMessage(e,t){const n=globalThis.__logForTest;n==null||n({method:e,params:t}),await this._connectedPromise;const o=++this._lastId,a={id:o,method:e,params:t};return this._transport.send(JSON.stringify(a)),new Promise((c,u)=>{this._callbacks.set(o,{resolve:c,reject:u})})}_sendMessageNoReply(e,t){this._sendMessage(e,t).catch(()=>{})}_dispatchEvent(e,t){e==="report"?this._onReportEmitter.fire(t):e==="stdio"?this._onStdioEmitter.fire(t):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(t):e==="loadTraceRequested"?this._onLoadTraceRequestedEmitter.fire(t):e==="testPaused"&&this._onTestPausedEmitter.fire(t)}async initialize(e){await this._sendMessage("initialize",e)}async ping(e){await this._sendMessage("ping",e)}async pingNoReply(e){this._sendMessageNoReply("ping",e)}async watch(e){await this._sendMessage("watch",e)}watchNoReply(e){this._sendMessageNoReply("watch",e)}async open(e){await this._sendMessage("open",e)}openNoReply(e){this._sendMessageNoReply("open",e)}async resizeTerminal(e){await this._sendMessage("resizeTerminal",e)}resizeTerminalNoReply(e){this._sendMessageNoReply("resizeTerminal",e)}async checkBrowsers(e){return await this._sendMessage("checkBrowsers",e)}async installBrowsers(e){await this._sendMessage("installBrowsers",e)}async runGlobalSetup(e){return await this._sendMessage("runGlobalSetup",e)}async runGlobalTeardown(e){return await this._sendMessage("runGlobalTeardown",e)}async startDevServer(e){return await this._sendMessage("startDevServer",e)}async stopDevServer(e){return await this._sendMessage("stopDevServer",e)}async clearCache(e){return await this._sendMessage("clearCache",e)}async listFiles(e){return await this._sendMessage("listFiles",e)}async listTests(e){return await this._sendMessage("listTests",e)}async runTests(e){return await this._sendMessage("runTests",e)}async findRelatedTestFiles(e){return await this._sendMessage("findRelatedTestFiles",e)}async stopTests(e){await this._sendMessage("stopTests",e)}stopTestsNoReply(e){this._sendMessageNoReply("stopTests",e)}async closeGracefully(e){await this._sendMessage("closeGracefully",e)}close(){try{this._transport.close()}catch{}}}const o3=({location:i})=>{const[e,t]=pn("shouldPopulateCanvasFromScreenshot",!1),[n,o]=cT(),[a,c]=pn("mergeFiles",!1);return T.jsx(Hw,{settings:[{type:"select",value:n,set:o,name:"Theme",options:aT},...i==="ui-mode"?[{type:"check",value:a,set:c,name:"Merge files"}]:[],{type:"check",value:e,set:t,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{VM as D,dv as E,wt as R,Cc as S,t3 as T,s3 as W,EE as _,r3 as a,o3 as b,i3 as c,qM as d,JM as e,e3 as f,lT as g,ZM as h,QM as i,T as j,et as k,lE as l,Nt as m,Wf as n,Vt as o,pn as p,Hw as q,q as r,Ss as s,av as t,Ds as u,Zx as v};
|