@smoothdeploy/playwright-core 1.57.1 → 1.58.1-beta-1770452953000
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.
Potentially problematic release.
This version of @smoothdeploy/playwright-core might be problematic. Click here for more details.
- package/ThirdPartyNotices.txt +3223 -308
- package/browsers.json +21 -22
- package/lib/cli/program.js +4 -5
- package/lib/client/api.js +3 -0
- package/lib/client/browser.js +3 -5
- package/lib/client/browserContext.js +35 -0
- package/lib/client/browserType.js +4 -3
- package/lib/client/channelOwner.js +4 -3
- package/lib/client/clientInstrumentation.js +10 -0
- package/lib/client/connection.js +4 -0
- package/lib/client/elementHandle.js +3 -0
- package/lib/client/events.js +3 -0
- package/lib/client/fetch.js +3 -4
- package/lib/client/frame.js +1 -0
- package/lib/client/page.js +28 -1
- package/lib/client/pageAgent.js +64 -0
- package/lib/client/platform.js +3 -0
- package/lib/generated/injectedScriptSource.js +1 -1
- package/lib/generated/pollingRecorderSource.js +1 -1
- package/lib/mcpBundle.js +84 -0
- package/lib/mcpBundleImpl/index.js +147 -0
- package/lib/protocol/serializers.js +5 -0
- package/lib/protocol/validator.js +92 -3
- package/lib/remote/playwrightServer.js +1 -2
- package/lib/server/agent/actionRunner.js +335 -0
- package/lib/server/agent/actions.js +128 -0
- package/lib/server/agent/codegen.js +111 -0
- package/lib/server/agent/context.js +150 -0
- package/lib/server/agent/expectTools.js +156 -0
- package/lib/server/agent/pageAgent.js +204 -0
- package/lib/server/agent/performTools.js +262 -0
- package/lib/server/agent/tool.js +109 -0
- package/lib/server/artifact.js +1 -1
- package/lib/server/bidi/bidiBrowser.js +56 -12
- package/lib/server/bidi/bidiChromium.js +6 -11
- package/lib/server/bidi/bidiConnection.js +1 -0
- package/lib/server/bidi/bidiDeserializer.js +116 -0
- package/lib/server/bidi/bidiExecutionContext.js +75 -29
- package/lib/server/bidi/bidiFirefox.js +6 -8
- package/lib/server/bidi/bidiNetworkManager.js +1 -1
- package/lib/server/bidi/bidiPage.js +39 -28
- package/lib/server/bidi/third_party/bidiProtocolCore.js +1 -0
- package/lib/server/browserContext.js +32 -25
- package/lib/server/browserType.js +12 -4
- package/lib/server/chromium/chromium.js +14 -21
- package/lib/server/chromium/chromiumSwitches.js +2 -2
- package/lib/server/chromium/crBrowser.js +22 -12
- package/lib/server/chromium/crConnection.js +0 -5
- package/lib/server/chromium/crDevTools.js +0 -2
- package/lib/server/chromium/crNetworkManager.js +43 -2
- package/lib/server/chromium/crPage.js +19 -87
- package/lib/server/codegen/javascript.js +6 -29
- package/lib/server/deviceDescriptorsSource.json +56 -56
- package/lib/server/dispatchers/browserContextDispatcher.js +3 -0
- package/lib/server/dispatchers/dispatcher.js +6 -13
- package/lib/server/dispatchers/frameDispatcher.js +1 -1
- package/lib/server/dispatchers/pageAgentDispatcher.js +96 -0
- package/lib/server/dispatchers/pageDispatcher.js +4 -0
- package/lib/server/dom.js +12 -3
- package/lib/server/electron/electron.js +5 -2
- package/lib/server/firefox/ffBrowser.js +10 -20
- package/lib/server/firefox/ffConnection.js +0 -5
- package/lib/server/firefox/ffNetworkManager.js +2 -2
- package/lib/server/firefox/ffPage.js +15 -18
- package/lib/server/firefox/firefox.js +6 -8
- package/lib/server/frameSelectors.js +9 -3
- package/lib/server/frames.js +49 -33
- package/lib/server/instrumentation.js +3 -0
- package/lib/server/network.js +50 -12
- package/lib/server/page.js +33 -89
- package/lib/server/progress.js +26 -6
- package/lib/server/recorder/recorderApp.js +79 -100
- package/lib/server/recorder.js +55 -0
- package/lib/server/registry/browserFetcher.js +6 -4
- package/lib/server/registry/index.js +172 -149
- package/lib/server/registry/oopDownloadBrowserMain.js +3 -0
- package/lib/server/screencast.js +190 -0
- package/lib/server/screenshotCompositor.js +153 -0
- package/lib/server/trace/recorder/snapshotterInjected.js +21 -1
- package/lib/server/trace/recorder/tracing.js +21 -21
- package/lib/server/trace/viewer/traceParser.js +72 -0
- package/lib/server/trace/viewer/traceViewer.js +17 -13
- package/lib/server/utils/expectUtils.js +87 -2
- package/lib/server/utils/httpServer.js +4 -19
- package/lib/server/utils/network.js +37 -28
- package/lib/server/utils/nodePlatform.js +6 -0
- package/lib/server/videoRecorder.js +124 -0
- package/lib/server/webkit/webkit.js +4 -6
- package/lib/server/webkit/wkBrowser.js +2 -6
- package/lib/server/webkit/wkConnection.js +1 -6
- package/lib/server/webkit/wkInterceptableRequest.js +29 -1
- package/lib/server/webkit/wkPage.js +75 -46
- package/lib/utils/isomorphic/ariaSnapshot.js +60 -2
- package/lib/utils/isomorphic/lruCache.js +51 -0
- package/lib/utils/isomorphic/protocolMetainfo.js +9 -1
- package/lib/utils/isomorphic/stringUtils.js +49 -0
- package/lib/utils/isomorphic/trace/entries.js +16 -0
- package/lib/utils/isomorphic/trace/snapshotRenderer.js +499 -0
- package/lib/utils/isomorphic/trace/snapshotServer.js +120 -0
- package/lib/utils/isomorphic/trace/snapshotStorage.js +89 -0
- package/lib/utils/isomorphic/trace/traceLoader.js +131 -0
- package/lib/utils/isomorphic/trace/traceModel.js +365 -0
- package/lib/utils/isomorphic/trace/traceModernizer.js +400 -0
- package/lib/utils/isomorphic/trace/versions/traceV3.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV4.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV5.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV6.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV7.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV8.js +16 -0
- package/lib/utils/isomorphic/yaml.js +84 -0
- package/lib/utils.js +2 -0
- package/lib/utilsBundle.js +2 -5
- package/lib/utilsBundleImpl/index.js +165 -165
- package/lib/vite/htmlReport/index.html +21 -21
- package/lib/vite/recorder/assets/{codeMirrorModule-C3UTv-Ge.css → codeMirrorModule-DYBRYzYX.css} +1 -1
- package/lib/vite/recorder/assets/codeMirrorModule-DadYNm1I.js +32 -0
- package/lib/vite/recorder/assets/{index-Ri0uHF7I.css → index-BSjZa4pk.css} +1 -1
- package/lib/vite/recorder/assets/index-BhTWtUlo.js +193 -0
- package/lib/vite/recorder/index.html +2 -2
- package/lib/vite/traceViewer/assets/codeMirrorModule-8UJPCtp4.js +16884 -0
- package/lib/vite/{recorder/assets/codeMirrorModule-BoWUGj0J.js → traceViewer/assets/codeMirrorModule-BNr6yhVP.js} +1 -1
- package/lib/vite/traceViewer/assets/codeMirrorModule-Dimjuz94.js +32 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-DkmsYcws.js +32 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-DySgctgr.js +16884 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-B1vuWQsF.js +266 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-CtEsdeVH.js +266 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-D4fm31R-.js +34087 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-JtyB0yzL.js +34087 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-tEZf-LNj.js +266 -0
- package/lib/vite/traceViewer/assets/xtermModule-DDw6eROI.js +6168 -0
- package/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css +1 -0
- package/lib/vite/traceViewer/codeMirrorModule.DuST8d_k.css +344 -0
- package/lib/vite/traceViewer/defaultSettingsView.5FCqBwKs.css +3986 -0
- package/lib/vite/traceViewer/defaultSettingsView.7ch9cixO.css +1 -0
- package/lib/vite/traceViewer/index.BQs8gGhY.js +249 -0
- package/lib/vite/traceViewer/index.BVu7tZDe.css +1 -0
- package/lib/vite/traceViewer/index.BoLn624r.js +2 -0
- package/lib/vite/traceViewer/index.Bq_EaK8x.js +249 -0
- package/lib/vite/traceViewer/index.C8YVh4B5.js +2 -0
- package/lib/vite/traceViewer/index.Cr7-GRf8.js +2 -0
- package/lib/vite/traceViewer/index.G-7UhDxt.css +164 -0
- package/lib/vite/traceViewer/index.html +4 -4
- package/lib/vite/traceViewer/sw.bundle.js +5 -3
- package/lib/vite/traceViewer/uiMode.-Kflt2XM.css +1440 -0
- package/lib/vite/traceViewer/uiMode.BTRKnokb.js +5 -0
- package/lib/vite/traceViewer/uiMode.CEZ5RVHh.js +5 -0
- package/lib/vite/traceViewer/uiMode.CIWF23si.js +1829 -0
- package/lib/vite/traceViewer/uiMode.Wi-DvIEY.js +1829 -0
- package/lib/vite/traceViewer/uiMode.html +3 -3
- package/lib/vite/traceViewer/uiMode.zEH1ejvz.js +5 -0
- package/lib/vite/traceViewer/xtermModule.BKlWQB97.css +218 -0
- package/package.json +3 -1
- package/types/protocol.d.ts +738 -159
- package/types/types.d.ts +25 -38
- package/lib/vite/recorder/assets/index-DJqDAOZp.js +0 -193
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-DkmsYcws.js","../codeMirrorModule.DYBRYzYX.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var q1=Object.defineProperty;var $1=(n,e,i)=>e in n?q1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var Ca=(n,e,i)=>$1(n,typeof e!="symbol"?e+"":e,i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function i(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(a){if(a.ep)return;a.ep=!0;const o=i(a);fetch(a.href,o)}})();function I1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Yf={exports:{}},ka={};/**
|
|
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 wy;function V1(){if(wy)return ka;wy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(s,a,o){var u=null;if(o!==void 0&&(u=""+o),a.key!==void 0&&(u=""+a.key),"key"in a){o={};for(var f in a)f!=="key"&&(o[f]=a[f])}else o=a;return a=o.ref,{$$typeof:n,type:s,key:u,ref:a!==void 0?a:null,props:o}}return ka.Fragment=e,ka.jsx=i,ka.jsxs=i,ka}var xy;function G1(){return xy||(xy=1,Yf.exports=V1()),Yf.exports}var S=G1(),Xf={exports:{}},de={};/**
|
|
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 _y;function K1(){if(_y)return de;_y=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function v(C){return C===null||typeof C!="object"?null:(C=y&&C[y]||C["@@iterator"],typeof C=="function"?C:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,x={};function _(C,P,W){this.props=C,this.context=P,this.refs=x,this.updater=W||b}_.prototype.isReactComponent={},_.prototype.setState=function(C,P){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,P,"setState")},_.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function N(){}N.prototype=_.prototype;function k(C,P,W){this.props=C,this.context=P,this.refs=x,this.updater=W||b}var $=k.prototype=new N;$.constructor=k,E($,_.prototype),$.isPureReactComponent=!0;var V=Array.isArray,L={H:null,A:null,T:null,S:null,V:null},G=Object.prototype.hasOwnProperty;function Z(C,P,W,J,ae,be){return W=be.ref,{$$typeof:n,type:C,key:P,ref:W!==void 0?W:null,props:be}}function q(C,P){return Z(C.type,P,void 0,void 0,void 0,C.props)}function R(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function ie(C){var P={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(W){return P[W]})}var le=/\/+/g;function I(C,P){return typeof C=="object"&&C!==null&&C.key!=null?ie(""+C.key):P.toString(36)}function F(){}function ee(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(F,F):(C.status="pending",C.then(function(P){C.status==="pending"&&(C.status="fulfilled",C.value=P)},function(P){C.status==="pending"&&(C.status="rejected",C.reason=P)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function ve(C,P,W,J,ae){var be=typeof C;(be==="undefined"||be==="boolean")&&(C=null);var te=!1;if(C===null)te=!0;else switch(be){case"bigint":case"string":case"number":te=!0;break;case"object":switch(C.$$typeof){case n:case e:te=!0;break;case m:return te=C._init,ve(te(C._payload),P,W,J,ae)}}if(te)return ae=ae(C),te=J===""?"."+I(C,0):J,V(ae)?(W="",te!=null&&(W=te.replace(le,"$&/")+"/"),ve(ae,P,W,"",function(Vt){return Vt})):ae!=null&&(R(ae)&&(ae=q(ae,W+(ae.key==null||C&&C.key===ae.key?"":(""+ae.key).replace(le,"$&/")+"/")+te)),P.push(ae)),1;te=0;var mt=J===""?".":J+":";if(V(C))for(var Ae=0;Ae<C.length;Ae++)J=C[Ae],be=mt+I(J,Ae),te+=ve(J,P,W,be,ae);else if(Ae=v(C),typeof Ae=="function")for(C=Ae.call(C),Ae=0;!(J=C.next()).done;)J=J.value,be=mt+I(J,Ae++),te+=ve(J,P,W,be,ae);else if(be==="object"){if(typeof C.then=="function")return ve(ee(C),P,W,J,ae);throw P=String(C),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return te}function H(C,P,W){if(C==null)return C;var J=[],ae=0;return ve(C,J,"","",function(be){return P.call(W,be,ae++)}),J}function Q(C){if(C._status===-1){var P=C._result;P=P(),P.then(function(W){(C._status===0||C._status===-1)&&(C._status=1,C._result=W)},function(W){(C._status===0||C._status===-1)&&(C._status=2,C._result=W)}),C._status===-1&&(C._status=0,C._result=P)}if(C._status===1)return C._result.default;throw C._result}var se=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)};function we(){}return de.Children={map:H,forEach:function(C,P,W){H(C,function(){P.apply(this,arguments)},W)},count:function(C){var P=0;return H(C,function(){P++}),P},toArray:function(C){return H(C,function(P){return P})||[]},only:function(C){if(!R(C))throw Error("React.Children.only expected to receive a single React element child.");return C}},de.Component=_,de.Fragment=i,de.Profiler=a,de.PureComponent=k,de.StrictMode=s,de.Suspense=d,de.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,de.__COMPILER_RUNTIME={__proto__:null,c:function(C){return L.H.useMemoCache(C)}},de.cache=function(C){return function(){return C.apply(null,arguments)}},de.cloneElement=function(C,P,W){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var J=E({},C.props),ae=C.key,be=void 0;if(P!=null)for(te in P.ref!==void 0&&(be=void 0),P.key!==void 0&&(ae=""+P.key),P)!G.call(P,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&P.ref===void 0||(J[te]=P[te]);var te=arguments.length-2;if(te===1)J.children=W;else if(1<te){for(var mt=Array(te),Ae=0;Ae<te;Ae++)mt[Ae]=arguments[Ae+2];J.children=mt}return Z(C.type,ae,void 0,void 0,be,J)},de.createContext=function(C){return C={$$typeof:u,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:o,_context:C},C},de.createElement=function(C,P,W){var J,ae={},be=null;if(P!=null)for(J in P.key!==void 0&&(be=""+P.key),P)G.call(P,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ae[J]=P[J]);var te=arguments.length-2;if(te===1)ae.children=W;else if(1<te){for(var mt=Array(te),Ae=0;Ae<te;Ae++)mt[Ae]=arguments[Ae+2];ae.children=mt}if(C&&C.defaultProps)for(J in te=C.defaultProps,te)ae[J]===void 0&&(ae[J]=te[J]);return Z(C,be,void 0,void 0,null,ae)},de.createRef=function(){return{current:null}},de.forwardRef=function(C){return{$$typeof:f,render:C}},de.isValidElement=R,de.lazy=function(C){return{$$typeof:m,_payload:{_status:-1,_result:C},_init:Q}},de.memo=function(C,P){return{$$typeof:p,type:C,compare:P===void 0?null:P}},de.startTransition=function(C){var P=L.T,W={};L.T=W;try{var J=C(),ae=L.S;ae!==null&&ae(W,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(we,se)}catch(be){se(be)}finally{L.T=P}},de.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},de.use=function(C){return L.H.use(C)},de.useActionState=function(C,P,W){return L.H.useActionState(C,P,W)},de.useCallback=function(C,P){return L.H.useCallback(C,P)},de.useContext=function(C){return L.H.useContext(C)},de.useDebugValue=function(){},de.useDeferredValue=function(C,P){return L.H.useDeferredValue(C,P)},de.useEffect=function(C,P,W){var J=L.H;if(typeof W=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return J.useEffect(C,P)},de.useId=function(){return L.H.useId()},de.useImperativeHandle=function(C,P,W){return L.H.useImperativeHandle(C,P,W)},de.useInsertionEffect=function(C,P){return L.H.useInsertionEffect(C,P)},de.useLayoutEffect=function(C,P){return L.H.useLayoutEffect(C,P)},de.useMemo=function(C,P){return L.H.useMemo(C,P)},de.useOptimistic=function(C,P){return L.H.useOptimistic(C,P)},de.useReducer=function(C,P,W){return L.H.useReducer(C,P,W)},de.useRef=function(C){return L.H.useRef(C)},de.useState=function(C){return L.H.useState(C)},de.useSyncExternalStore=function(C,P,W){return L.H.useSyncExternalStore(C,P,W)},de.useTransition=function(){return L.H.useTransition()},de.version="19.1.1",de}var Ty;function zh(){return Ty||(Ty=1,Xf.exports=K1()),Xf.exports}var z=zh();const ot=I1(z);function Po(n,e,i,s){const[a,o]=ot.useState(i);return ot.useEffect(()=>{let u=!1;return n().then(f=>{u||o(f)}),()=>{u=!0}},e),a}function os(){const n=ot.useRef(null),[e]=mh(n);return[e,n]}function mh(n){const[e,i]=ot.useState(new DOMRect(0,0,10,10)),s=ot.useCallback(()=>{const a=n==null?void 0:n.current;a&&i(a.getBoundingClientRect())},[n]);return ot.useLayoutEffect(()=>{const a=n==null?void 0:n.current;if(!a)return;s();const o=new ResizeObserver(s);return o.observe(a),window.addEventListener("resize",s),()=>{o.disconnect(),window.removeEventListener("resize",s)}},[s,n]),[e,s]}function xt(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0)+"ms";const e=n/1e3;if(e<60)return e.toFixed(1)+"s";const i=e/60;if(i<60)return i.toFixed(1)+"m";const s=i/60;return s<24?s.toFixed(1)+"h":(s/24).toFixed(1)+"d"}function Y1(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0);const e=n/1024;if(e<1e3)return e.toFixed(1)+"K";const i=e/1024;return i<1e3?i.toFixed(1)+"M":(i/1024).toFixed(1)+"G"}function Mb(n,e,i,s,a){let o=0,u=n.length;for(;o<u;){const f=o+u>>1;i(e,n[f])>=0?o=f+1:u=f}return u}function Ey(n){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=n,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function sn(n,e){n&&(e=es.getObject(n,e));const[i,s]=ot.useState(e),a=ot.useCallback(o=>{n?es.setObject(n,o):s(o)},[n,s]);return ot.useEffect(()=>{if(n){const o=()=>s(es.getObject(n,e));return es.onChangeEmitter.addEventListener(n,o),()=>es.onChangeEmitter.removeEventListener(n,o)}},[e,n]),[i,a]}const yh=new Map,Ob=new Map;let Fo;function xi(n,e){const[i,s]=ot.useState();Ob.set(n,{setter:s,defaultValue:e});const a=ot.useCallback(o=>{const u=yh.get(Fo||"default")||{};u[n]=o,yh.set(Fo||"default",u),s(o)},[n]);return[i,a]}function X1(n){if(Fo===n)return;Fo=n;const e=yh.get(n)||{};for(const[i,s]of Ob.entries())s.setter(e[i]||s.defaultValue)}class P1{constructor(){this.onChangeEmitter=new EventTarget}getString(e,i){return localStorage[e]||i}setString(e,i){var s;localStorage[e]=i,this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}getObject(e,i){if(!localStorage[e])return i;try{return JSON.parse(localStorage[e])}catch{return i}}setObject(e,i){var s;localStorage[e]=JSON.stringify(i),this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}}const es=new P1;function Ke(...n){return n.filter(Boolean).join(" ")}function Lb(n){n&&(n!=null&&n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n==null||n.scrollIntoView())}const Ay="\\u0000-\\u0020\\u007f-\\u009f",Rb=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Ay+'"]{2,}[^\\s'+Ay+`"')}\\],:;.!?]`,"ug");function F1(){const[n,e]=ot.useState(!1),i=ot.useCallback(()=>{const s=[];return e(a=>(s.push(setTimeout(()=>e(!1),1e3)),a?(s.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>s.forEach(clearTimeout)},[e]);return[n,i]}const Q1="system",jb="theme",Z1=[{label:"Dark mode",value:"dark-mode"},{label:"Light mode",value:"light-mode"},{label:"System",value:"system"}],Db=window.matchMedia("(prefers-color-scheme: dark)");function p2(){document.playwrightThemeInitialized||(document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",n=>{n.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",n=>{document.body.classList.add("inactive")},!1),bh(vh()),Db.addEventListener("change",()=>{bh(vh())}))}const Hh=new Set;function bh(n){const e=J1(),i=n==="system"?Db.matches?"dark-mode":"light-mode":n;if(e!==i){e&&document.documentElement.classList.remove(e),document.documentElement.classList.add(i);for(const s of Hh)s(i)}}function g2(n){Hh.add(n)}function m2(n){Hh.delete(n)}function vh(){return es.getString(jb,Q1)}function J1(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":document.documentElement.classList.contains("light-mode")?"light-mode":null}function W1(){const[n,e]=ot.useState(vh());return ot.useEffect(()=>{es.setString(jb,n),bh(n)},[n]),[n,e]}var Pf={exports:{}},Ma={},Ff={exports:{}},Qf={};/**
|
|
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 Ny;function ex(){return Ny||(Ny=1,(function(n){function e(H,Q){var se=H.length;H.push(Q);e:for(;0<se;){var we=se-1>>>1,C=H[we];if(0<a(C,Q))H[we]=Q,H[se]=C,se=we;else break e}}function i(H){return H.length===0?null:H[0]}function s(H){if(H.length===0)return null;var Q=H[0],se=H.pop();if(se!==Q){H[0]=se;e:for(var we=0,C=H.length,P=C>>>1;we<P;){var W=2*(we+1)-1,J=H[W],ae=W+1,be=H[ae];if(0>a(J,se))ae<C&&0>a(be,J)?(H[we]=be,H[ae]=se,we=ae):(H[we]=J,H[W]=se,we=W);else if(ae<C&&0>a(be,se))H[we]=be,H[ae]=se,we=ae;else break e}}return Q}function a(H,Q){var se=H.sortIndex-Q.sortIndex;return se!==0?se:H.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,f=u.now();n.unstable_now=function(){return u.now()-f}}var d=[],p=[],m=1,y=null,v=3,b=!1,E=!1,x=!1,_=!1,N=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function V(H){for(var Q=i(p);Q!==null;){if(Q.callback===null)s(p);else if(Q.startTime<=H)s(p),Q.sortIndex=Q.expirationTime,e(d,Q);else break;Q=i(p)}}function L(H){if(x=!1,V(H),!E)if(i(d)!==null)E=!0,G||(G=!0,I());else{var Q=i(p);Q!==null&&ve(L,Q.startTime-H)}}var G=!1,Z=-1,q=5,R=-1;function ie(){return _?!0:!(n.unstable_now()-R<q)}function le(){if(_=!1,G){var H=n.unstable_now();R=H;var Q=!0;try{e:{E=!1,x&&(x=!1,k(Z),Z=-1),b=!0;var se=v;try{t:{for(V(H),y=i(d);y!==null&&!(y.expirationTime>H&&ie());){var we=y.callback;if(typeof we=="function"){y.callback=null,v=y.priorityLevel;var C=we(y.expirationTime<=H);if(H=n.unstable_now(),typeof C=="function"){y.callback=C,V(H),Q=!0;break t}y===i(d)&&s(d),V(H)}else s(d);y=i(d)}if(y!==null)Q=!0;else{var P=i(p);P!==null&&ve(L,P.startTime-H),Q=!1}}break e}finally{y=null,v=se,b=!1}Q=void 0}}finally{Q?I():G=!1}}}var I;if(typeof $=="function")I=function(){$(le)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,ee=F.port2;F.port1.onmessage=le,I=function(){ee.postMessage(null)}}else I=function(){N(le,0)};function ve(H,Q){Z=N(function(){H(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(H){H.callback=null},n.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<H?Math.floor(1e3/H):5},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(H){switch(v){case 1:case 2:case 3:var Q=3;break;default:Q=v}var se=v;v=Q;try{return H()}finally{v=se}},n.unstable_requestPaint=function(){_=!0},n.unstable_runWithPriority=function(H,Q){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var se=v;v=H;try{return Q()}finally{v=se}},n.unstable_scheduleCallback=function(H,Q,se){var we=n.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?we+se:we):se=we,H){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=se+C,H={id:m++,callback:Q,priorityLevel:H,startTime:se,expirationTime:C,sortIndex:-1},se>we?(H.sortIndex=se,e(p,H),i(d)===null&&H===i(p)&&(x?(k(Z),Z=-1):x=!0,ve(L,se-we))):(H.sortIndex=C,e(d,H),E||b||(E=!0,G||(G=!0,I()))),H},n.unstable_shouldYield=ie,n.unstable_wrapCallback=function(H){var Q=v;return function(){var se=v;v=Q;try{return H.apply(this,arguments)}finally{v=se}}}})(Qf)),Qf}var Cy;function tx(){return Cy||(Cy=1,Ff.exports=ex()),Ff.exports}var Zf={exports:{}},dt={};/**
|
|
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 ky;function nx(){if(ky)return dt;ky=1;var n=zh();function e(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)p+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(d,p,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:""+y,children:d,containerInfo:p,implementation:m}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,dt.createPortal=function(d,p){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return o(d,p,null,m)},dt.flushSync=function(d){var p=u.T,m=s.p;try{if(u.T=null,s.p=2,d)return d()}finally{u.T=p,s.p=m,s.d.f()}},dt.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(d,p))},dt.prefetchDNS=function(d){typeof d=="string"&&s.d.D(d)},dt.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var m=p.as,y=f(m,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,b=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;m==="style"?s.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:b}):m==="script"&&s.d.X(d,{crossOrigin:y,integrity:v,fetchPriority:b,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},dt.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var m=f(p.as,p.crossOrigin);s.d.M(d,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(d)},dt.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var m=p.as,y=f(m,p.crossOrigin);s.d.L(d,m,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},dt.preloadModule=function(d,p){if(typeof d=="string")if(p){var m=f(p.as,p.crossOrigin);s.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(d)},dt.requestFormReset=function(d){s.d.r(d)},dt.unstable_batchedUpdates=function(d,p){return d(p)},dt.useFormState=function(d,p,m){return u.H.useFormState(d,p,m)},dt.useFormStatus=function(){return u.H.useHostTransitionStatus()},dt.version="19.1.1",dt}var My;function ix(){if(My)return Zf.exports;My=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Zf.exports=nx(),Zf.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 Oy;function sx(){if(Oy)return Ma;Oy=1;var n=tx(),e=zh(),i=ix();function s(t){var r="https://react.dev/errors/"+t;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 #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var r=t,l=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(l=r.return),t=r.return;while(t)}return r.tag===3?l:null}function u(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(o(t)!==t)throw Error(s(188))}function d(t){var r=t.alternate;if(!r){if(r=o(t),r===null)throw Error(s(188));return r!==t?null:t}for(var l=t,c=r;;){var h=l.return;if(h===null)break;var g=h.alternate;if(g===null){if(c=h.return,c!==null){l=c;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===l)return f(h),t;if(g===c)return f(h),r;g=g.sibling}throw Error(s(188))}if(l.return!==c.return)l=h,c=g;else{for(var w=!1,T=h.child;T;){if(T===l){w=!0,l=h,c=g;break}if(T===c){w=!0,c=h,l=g;break}T=T.sibling}if(!w){for(T=g.child;T;){if(T===l){w=!0,l=g,c=h;break}if(T===c){w=!0,c=g,l=h;break}T=T.sibling}if(!w)throw Error(s(189))}}if(l.alternate!==c)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?t:r}function p(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=p(t),r!==null)return r;t=t.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),k=Symbol.for("react.consumer"),$=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function I(t){return t===null||typeof t!="object"?null:(t=le&&t[le]||t["@@iterator"],typeof t=="function"?t:null)}var F=Symbol.for("react.client.reference");function ee(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===F?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case E:return"Fragment";case _:return"Profiler";case x:return"StrictMode";case L:return"Suspense";case G:return"SuspenseList";case R:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case b:return"Portal";case $:return(t.displayName||"Context")+".Provider";case k:return(t._context.displayName||"Context")+".Consumer";case V:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Z:return r=t.displayName||null,r!==null?r:ee(t.type)||"Memo";case q:r=t._payload,t=t._init;try{return ee(t(r))}catch{}}return null}var ve=Array.isArray,H=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},we=[],C=-1;function P(t){return{current:t}}function W(t){0>C||(t.current=we[C],we[C]=null,C--)}function J(t,r){C++,we[C]=t.current,t.current=r}var ae=P(null),be=P(null),te=P(null),mt=P(null);function Ae(t,r){switch(J(te,r),J(be,t),J(ae,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?Fm(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=Fm(r),t=Qm(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}W(ae),J(ae,t)}function Vt(){W(ae),W(be),W(te)}function Or(t){t.memoizedState!==null&&J(mt,t);var r=ae.current,l=Qm(r,t.type);r!==l&&(J(be,t),J(ae,l))}function En(t){be.current===t&&(W(ae),W(be)),mt.current===t&&(W(mt),_a._currentValue=se)}var on=Object.prototype.hasOwnProperty,hs=n.unstable_scheduleCallback,yt=n.unstable_cancelCallback,fl=n.unstable_shouldYield,Mc=n.unstable_requestPaint,Gt=n.unstable_now,Lr=n.unstable_getCurrentPriorityLevel,ds=n.unstable_ImmediatePriority,Mi=n.unstable_UserBlockingPriority,ps=n.unstable_NormalPriority,Qn=n.unstable_LowPriority,hl=n.unstable_IdlePriority,Oc=n.log,Lc=n.unstable_setDisableYieldValue,Oi=null,ut=null;function Kt(t){if(typeof Oc=="function"&&Lc(t),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(Oi,t)}catch{}}var bt=Math.clz32?Math.clz32:Li,Rc=Math.log,jc=Math.LN2;function Li(t){return t>>>=0,t===0?32:31-(Rc(t)/jc|0)|0}var Zn=256,An=4194304;function Nn(t){var r=t&42;if(r!==0)return r;switch(t&-t){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:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function gs(t,r,l){var c=t.pendingLanes;if(c===0)return 0;var h=0,g=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var T=c&134217727;return T!==0?(c=T&~g,c!==0?h=Nn(c):(w&=T,w!==0?h=Nn(w):l||(l=T&~t,l!==0&&(h=Nn(l))))):(T=c&~g,T!==0?h=Nn(T):w!==0?h=Nn(w):l||(l=c&~t,l!==0&&(h=Nn(l)))),h===0?0:r!==0&&r!==h&&(r&g)===0&&(g=h&-h,l=r&-r,g>=l||g===32&&(l&4194048)!==0)?r:h}function Ri(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function dl(t,r){switch(t){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 ce(){var t=Zn;return Zn<<=1,(Zn&4194048)===0&&(Zn=256),t}function Jn(){var t=An;return An<<=1,(An&62914560)===0&&(An=4194304),t}function cn(t){for(var r=[],l=0;31>l;l++)r.push(t);return r}function Rr(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function CS(t,r,l,c,h,g){var w=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var T=t.entanglements,A=t.expirationTimes,D=t.hiddenUpdates;for(l=w&~l;0<l;){var K=31-bt(l),X=1<<K;T[K]=0,A[K]=-1;var B=D[K];if(B!==null)for(D[K]=null,K=0;K<B.length;K++){var U=B[K];U!==null&&(U.lane&=-536870913)}l&=~X}c!==0&&jd(t,c,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(w&~r))}function jd(t,r,l){t.pendingLanes|=r,t.suspendedLanes&=~r;var c=31-bt(r);t.entangledLanes|=r,t.entanglements[c]=t.entanglements[c]|1073741824|l&4194090}function Dd(t,r){var l=t.entangledLanes|=r;for(t=t.entanglements;l;){var c=31-bt(l),h=1<<c;h&r|t[c]&r&&(t[c]|=r),l&=~h}}function Dc(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Bc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Bd(){var t=Q.p;return t!==0?t:(t=window.event,t===void 0?32:gy(t.type))}function kS(t,r){var l=Q.p;try{return Q.p=t,r()}finally{Q.p=l}}var Wn=Math.random().toString(36).slice(2),ft="__reactFiber$"+Wn,Tt="__reactProps$"+Wn,ms="__reactContainer$"+Wn,Uc="__reactEvents$"+Wn,MS="__reactListeners$"+Wn,OS="__reactHandles$"+Wn,Ud="__reactResources$"+Wn,jr="__reactMarker$"+Wn;function zc(t){delete t[ft],delete t[Tt],delete t[Uc],delete t[MS],delete t[OS]}function ys(t){var r=t[ft];if(r)return r;for(var l=t.parentNode;l;){if(r=l[ms]||l[ft]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(t=ey(t);t!==null;){if(l=t[ft])return l;t=ey(t)}return r}t=l,l=t.parentNode}return null}function bs(t){if(t=t[ft]||t[ms]){var r=t.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return t}return null}function Dr(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(s(33))}function vs(t){var r=t[Ud];return r||(r=t[Ud]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function We(t){t[jr]=!0}var zd=new Set,Hd={};function ji(t,r){Ss(t,r),Ss(t+"Capture",r)}function Ss(t,r){for(Hd[t]=r,t=0;t<r.length;t++)zd.add(r[t])}var LS=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]*$"),qd={},$d={};function RS(t){return on.call($d,t)?!0:on.call(qd,t)?!1:LS.test(t)?$d[t]=!0:(qd[t]=!0,!1)}function pl(t,r,l){if(RS(r))if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+l)}}function gl(t,r,l){if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+l)}}function Cn(t,r,l,c){if(c===null)t.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(r,l,""+c)}}var Hc,Id;function ws(t){if(Hc===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Hc=r&&r[1]||"",Id=-1<l.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+Hc+t+Id}var qc=!1;function $c(t,r){if(!t||qc)return"";qc=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(U){var B=U}Reflect.construct(t,[],X)}else{try{X.call()}catch(U){B=U}t.call(X.prototype)}}else{try{throw Error()}catch(U){B=U}(X=t())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(U){if(U&&B&&typeof U.stack=="string")return[U.stack,B.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),w=g[0],T=g[1];if(w&&T){var A=w.split(`
|
|
45
|
+
`),D=T.split(`
|
|
46
|
+
`);for(h=c=0;c<A.length&&!A[c].includes("DetermineComponentFrameRoot");)c++;for(;h<D.length&&!D[h].includes("DetermineComponentFrameRoot");)h++;if(c===A.length||h===D.length)for(c=A.length-1,h=D.length-1;1<=c&&0<=h&&A[c]!==D[h];)h--;for(;1<=c&&0<=h;c--,h--)if(A[c]!==D[h]){if(c!==1||h!==1)do if(c--,h--,0>h||A[c]!==D[h]){var K=`
|
|
47
|
+
`+A[c].replace(" at new "," at ");return t.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",t.displayName)),K}while(1<=c&&0<=h);break}}}finally{qc=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?ws(l):""}function jS(t){switch(t.tag){case 26:case 27:case 5:return ws(t.type);case 16:return ws("Lazy");case 13:return ws("Suspense");case 19:return ws("SuspenseList");case 0:case 15:return $c(t.type,!1);case 11:return $c(t.type.render,!1);case 1:return $c(t.type,!0);case 31:return ws("Activity");default:return""}}function Vd(t){try{var r="";do r+=jS(t),t=t.return;while(t);return r}catch(l){return`
|
|
48
|
+
Error generating stack: `+l.message+`
|
|
49
|
+
`+l.stack}}function Yt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Gd(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function DS(t){var r=Gd(t)?"checked":"value",l=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var h=l.get,g=l.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(w){c=""+w,g.call(this,w)}}),Object.defineProperty(t,r,{enumerable:l.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function ml(t){t._valueTracker||(t._valueTracker=DS(t))}function Kd(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var l=r.getValue(),c="";return t&&(c=Gd(t)?t.checked?"true":"false":t.value),t=c,t!==l?(r.setValue(t),!0):!1}function yl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var BS=/[\n"\\]/g;function Xt(t){return t.replace(BS,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Ic(t,r,l,c,h,g,w,T){t.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.type=w:t.removeAttribute("type"),r!=null?w==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+Yt(r)):t.value!==""+Yt(r)&&(t.value=""+Yt(r)):w!=="submit"&&w!=="reset"||t.removeAttribute("value"),r!=null?Vc(t,w,Yt(r)):l!=null?Vc(t,w,Yt(l)):c!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?t.name=""+Yt(T):t.removeAttribute("name")}function Yd(t,r,l,c,h,g,w,T){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),r!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||r!=null))return;l=l!=null?""+Yt(l):"",r=r!=null?""+Yt(r):l,T||r===t.value||(t.value=r),t.defaultValue=r}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=T?t.checked:!!c,t.defaultChecked=!!c,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(t.name=w)}function Vc(t,r,l){r==="number"&&yl(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function xs(t,r,l,c){if(t=t.options,r){r={};for(var h=0;h<l.length;h++)r["$"+l[h]]=!0;for(l=0;l<t.length;l++)h=r.hasOwnProperty("$"+t[l].value),t[l].selected!==h&&(t[l].selected=h),h&&c&&(t[l].defaultSelected=!0)}else{for(l=""+Yt(l),r=null,h=0;h<t.length;h++){if(t[h].value===l){t[h].selected=!0,c&&(t[h].defaultSelected=!0);return}r!==null||t[h].disabled||(r=t[h])}r!==null&&(r.selected=!0)}}function Xd(t,r,l){if(r!=null&&(r=""+Yt(r),r!==t.value&&(t.value=r),l==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=l!=null?""+Yt(l):""}function Pd(t,r,l,c){if(r==null){if(c!=null){if(l!=null)throw Error(s(92));if(ve(c)){if(1<c.length)throw Error(s(93));c=c[0]}l=c}l==null&&(l=""),r=l}l=Yt(r),t.defaultValue=l,c=t.textContent,c===l&&c!==""&&c!==null&&(t.value=c)}function _s(t,r){if(r){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=r;return}}t.textContent=r}var US=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 Fd(t,r,l){var c=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":c?t.setProperty(r,l):typeof l!="number"||l===0||US.has(r)?r==="float"?t.cssFloat=l:t[r]=(""+l).trim():t[r]=l+"px"}function Qd(t,r,l){if(r!=null&&typeof r!="object")throw Error(s(62));if(t=t.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var h in r)c=r[h],r.hasOwnProperty(h)&&l[h]!==c&&Fd(t,h,c)}else for(var g in r)r.hasOwnProperty(g)&&Fd(t,g,r[g])}function Gc(t){if(t.indexOf("-")===-1)return!1;switch(t){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 zS=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"]]),HS=/^[\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 bl(t){return HS.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Kc=null;function Yc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ts=null,Es=null;function Zd(t){var r=bs(t);if(r&&(t=r.stateNode)){var l=t[Tt]||null;e:switch(t=r.stateNode,r.type){case"input":if(Ic(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Xt(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var c=l[r];if(c!==t&&c.form===t.form){var h=c[Tt]||null;if(!h)throw Error(s(90));Ic(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<l.length;r++)c=l[r],c.form===t.form&&Kd(c)}break e;case"textarea":Xd(t,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&xs(t,!!l.multiple,r,!1)}}}var Xc=!1;function Jd(t,r,l){if(Xc)return t(r,l);Xc=!0;try{var c=t(r);return c}finally{if(Xc=!1,(Ts!==null||Es!==null)&&(io(),Ts&&(r=Ts,t=Es,Es=Ts=null,Zd(r),t)))for(r=0;r<t.length;r++)Zd(t[r])}}function Br(t,r){var l=t.stateNode;if(l===null)return null;var c=l[Tt]||null;if(c===null)return null;l=c[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":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(s(231,r,typeof l));return l}var kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pc=!1;if(kn)try{var Ur={};Object.defineProperty(Ur,"passive",{get:function(){Pc=!0}}),window.addEventListener("test",Ur,Ur),window.removeEventListener("test",Ur,Ur)}catch{Pc=!1}var ei=null,Fc=null,vl=null;function Wd(){if(vl)return vl;var t,r=Fc,l=r.length,c,h="value"in ei?ei.value:ei.textContent,g=h.length;for(t=0;t<l&&r[t]===h[t];t++);var w=l-t;for(c=1;c<=w&&r[l-c]===h[g-c];c++);return vl=h.slice(t,1<c?1-c:void 0)}function Sl(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function wl(){return!0}function ep(){return!1}function Et(t){function r(l,c,h,g,w){this._reactName=l,this._targetInst=h,this.type=c,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var T in t)t.hasOwnProperty(T)&&(l=t[T],this[T]=l?l(g):g[T]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?wl:ep,this.isPropagationStopped=ep,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=wl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),r}var Di={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xl=Et(Di),zr=m({},Di,{view:0,detail:0}),qS=Et(zr),Qc,Zc,Hr,_l=m({},zr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Hr&&(Hr&&t.type==="mousemove"?(Qc=t.screenX-Hr.screenX,Zc=t.screenY-Hr.screenY):Zc=Qc=0,Hr=t),Qc)},movementY:function(t){return"movementY"in t?t.movementY:Zc}}),tp=Et(_l),$S=m({},_l,{dataTransfer:0}),IS=Et($S),VS=m({},zr,{relatedTarget:0}),Jc=Et(VS),GS=m({},Di,{animationName:0,elapsedTime:0,pseudoElement:0}),KS=Et(GS),YS=m({},Di,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),XS=Et(YS),PS=m({},Di,{data:0}),np=Et(PS),FS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},QS={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"},ZS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function JS(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=ZS[t])?!!r[t]:!1}function Wc(){return JS}var WS=m({},zr,{key:function(t){if(t.key){var r=FS[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Sl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?QS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wc,charCode:function(t){return t.type==="keypress"?Sl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Sl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),ew=Et(WS),tw=m({},_l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ip=Et(tw),nw=m({},zr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wc}),iw=Et(nw),sw=m({},Di,{propertyName:0,elapsedTime:0,pseudoElement:0}),rw=Et(sw),aw=m({},_l,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),lw=Et(aw),ow=m({},Di,{newState:0,oldState:0}),cw=Et(ow),uw=[9,13,27,32],eu=kn&&"CompositionEvent"in window,qr=null;kn&&"documentMode"in document&&(qr=document.documentMode);var fw=kn&&"TextEvent"in window&&!qr,sp=kn&&(!eu||qr&&8<qr&&11>=qr),rp=" ",ap=!1;function lp(t,r){switch(t){case"keyup":return uw.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function op(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var As=!1;function hw(t,r){switch(t){case"compositionend":return op(r);case"keypress":return r.which!==32?null:(ap=!0,rp);case"textInput":return t=r.data,t===rp&&ap?null:t;default:return null}}function dw(t,r){if(As)return t==="compositionend"||!eu&&lp(t,r)?(t=Wd(),vl=Fc=ei=null,As=!1,t):null;switch(t){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 sp&&r.locale!=="ko"?null:r.data;default:return null}}var pw={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 cp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!pw[t.type]:r==="textarea"}function up(t,r,l,c){Ts?Es?Es.push(c):Es=[c]:Ts=c,r=co(r,"onChange"),0<r.length&&(l=new xl("onChange","change",null,l,c),t.push({event:l,listeners:r}))}var $r=null,Ir=null;function gw(t){Gm(t,0)}function Tl(t){var r=Dr(t);if(Kd(r))return t}function fp(t,r){if(t==="change")return r}var hp=!1;if(kn){var tu;if(kn){var nu="oninput"in document;if(!nu){var dp=document.createElement("div");dp.setAttribute("oninput","return;"),nu=typeof dp.oninput=="function"}tu=nu}else tu=!1;hp=tu&&(!document.documentMode||9<document.documentMode)}function pp(){$r&&($r.detachEvent("onpropertychange",gp),Ir=$r=null)}function gp(t){if(t.propertyName==="value"&&Tl(Ir)){var r=[];up(r,Ir,t,Yc(t)),Jd(gw,r)}}function mw(t,r,l){t==="focusin"?(pp(),$r=r,Ir=l,$r.attachEvent("onpropertychange",gp)):t==="focusout"&&pp()}function yw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Tl(Ir)}function bw(t,r){if(t==="click")return Tl(r)}function vw(t,r){if(t==="input"||t==="change")return Tl(r)}function Sw(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Dt=typeof Object.is=="function"?Object.is:Sw;function Vr(t,r){if(Dt(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var l=Object.keys(t),c=Object.keys(r);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var h=l[c];if(!on.call(r,h)||!Dt(t[h],r[h]))return!1}return!0}function mp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function yp(t,r){var l=mp(t);t=0;for(var c;l;){if(l.nodeType===3){if(c=t+l.textContent.length,t<=r&&c>=r)return{node:l,offset:r-t};t=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=mp(l)}}function bp(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?bp(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function vp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=yl(t.document);r instanceof t.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)t=r.contentWindow;else break;r=yl(t.document)}return r}function iu(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var ww=kn&&"documentMode"in document&&11>=document.documentMode,Ns=null,su=null,Gr=null,ru=!1;function Sp(t,r,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ru||Ns==null||Ns!==yl(c)||(c=Ns,"selectionStart"in c&&iu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Gr&&Vr(Gr,c)||(Gr=c,c=co(su,"onSelect"),0<c.length&&(r=new xl("onSelect","select",null,r,l),t.push({event:r,listeners:c}),r.target=Ns)))}function Bi(t,r){var l={};return l[t.toLowerCase()]=r.toLowerCase(),l["Webkit"+t]="webkit"+r,l["Moz"+t]="moz"+r,l}var Cs={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionrun:Bi("Transition","TransitionRun"),transitionstart:Bi("Transition","TransitionStart"),transitioncancel:Bi("Transition","TransitionCancel"),transitionend:Bi("Transition","TransitionEnd")},au={},wp={};kn&&(wp=document.createElement("div").style,"AnimationEvent"in window||(delete Cs.animationend.animation,delete Cs.animationiteration.animation,delete Cs.animationstart.animation),"TransitionEvent"in window||delete Cs.transitionend.transition);function Ui(t){if(au[t])return au[t];if(!Cs[t])return t;var r=Cs[t],l;for(l in r)if(r.hasOwnProperty(l)&&l in wp)return au[t]=r[l];return t}var xp=Ui("animationend"),_p=Ui("animationiteration"),Tp=Ui("animationstart"),xw=Ui("transitionrun"),_w=Ui("transitionstart"),Tw=Ui("transitioncancel"),Ep=Ui("transitionend"),Ap=new Map,lu="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(" ");lu.push("scrollEnd");function un(t,r){Ap.set(t,r),ji(r,[t])}var Np=new WeakMap;function Pt(t,r){if(typeof t=="object"&&t!==null){var l=Np.get(t);return l!==void 0?l:(r={value:t,source:r,stack:Vd(r)},Np.set(t,r),r)}return{value:t,source:r,stack:Vd(r)}}var Ft=[],ks=0,ou=0;function El(){for(var t=ks,r=ou=ks=0;r<t;){var l=Ft[r];Ft[r++]=null;var c=Ft[r];Ft[r++]=null;var h=Ft[r];Ft[r++]=null;var g=Ft[r];if(Ft[r++]=null,c!==null&&h!==null){var w=c.pending;w===null?h.next=h:(h.next=w.next,w.next=h),c.pending=h}g!==0&&Cp(l,h,g)}}function Al(t,r,l,c){Ft[ks++]=t,Ft[ks++]=r,Ft[ks++]=l,Ft[ks++]=c,ou|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function cu(t,r,l,c){return Al(t,r,l,c),Nl(t)}function Ms(t,r){return Al(t,null,null,r),Nl(t)}function Cp(t,r,l){t.lanes|=l;var c=t.alternate;c!==null&&(c.lanes|=l);for(var h=!1,g=t.return;g!==null;)g.childLanes|=l,c=g.alternate,c!==null&&(c.childLanes|=l),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(h=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,h&&r!==null&&(h=31-bt(l),t=g.hiddenUpdates,c=t[h],c===null?t[h]=[r]:c.push(r),r.lane=l|536870912),g):null}function Nl(t){if(50<ga)throw ga=0,mf=null,Error(s(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Os={};function Ew(t,r,l,c){this.tag=t,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=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(t,r,l,c){return new Ew(t,r,l,c)}function uu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Mn(t,r){var l=t.alternate;return l===null?(l=Bt(t.tag,r,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=r,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,r=t.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function kp(t,r){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,r=l.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function Cl(t,r,l,c,h,g){var w=0;if(c=t,typeof t=="function")uu(t)&&(w=1);else if(typeof t=="string")w=N1(t,l,ae.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case R:return t=Bt(31,l,r,h),t.elementType=R,t.lanes=g,t;case E:return zi(l.children,h,g,r);case x:w=8,h|=24;break;case _:return t=Bt(12,l,r,h|2),t.elementType=_,t.lanes=g,t;case L:return t=Bt(13,l,r,h),t.elementType=L,t.lanes=g,t;case G:return t=Bt(19,l,r,h),t.elementType=G,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case N:case $:w=10;break e;case k:w=9;break e;case V:w=11;break e;case Z:w=14;break e;case q:w=16,c=null;break e}w=29,l=Error(s(130,t===null?"null":typeof t,"")),c=null}return r=Bt(w,l,r,h),r.elementType=t,r.type=c,r.lanes=g,r}function zi(t,r,l,c){return t=Bt(7,t,c,r),t.lanes=l,t}function fu(t,r,l){return t=Bt(6,t,null,r),t.lanes=l,t}function hu(t,r,l){return r=Bt(4,t.children!==null?t.children:[],t.key,r),r.lanes=l,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Ls=[],Rs=0,kl=null,Ml=0,Qt=[],Zt=0,Hi=null,On=1,Ln="";function qi(t,r){Ls[Rs++]=Ml,Ls[Rs++]=kl,kl=t,Ml=r}function Mp(t,r,l){Qt[Zt++]=On,Qt[Zt++]=Ln,Qt[Zt++]=Hi,Hi=t;var c=On;t=Ln;var h=32-bt(c)-1;c&=~(1<<h),l+=1;var g=32-bt(r)+h;if(30<g){var w=h-h%5;g=(c&(1<<w)-1).toString(32),c>>=w,h-=w,On=1<<32-bt(r)+h|l<<h|c,Ln=g+t}else On=1<<g|l<<h|c,Ln=t}function du(t){t.return!==null&&(qi(t,1),Mp(t,1,0))}function pu(t){for(;t===kl;)kl=Ls[--Rs],Ls[Rs]=null,Ml=Ls[--Rs],Ls[Rs]=null;for(;t===Hi;)Hi=Qt[--Zt],Qt[Zt]=null,Ln=Qt[--Zt],Qt[Zt]=null,On=Qt[--Zt],Qt[Zt]=null}var vt=null,qe=null,_e=!1,$i=null,mn=!1,gu=Error(s(519));function Ii(t){var r=Error(s(418,""));throw Xr(Pt(r,t)),gu}function Op(t){var r=t.stateNode,l=t.type,c=t.memoizedProps;switch(r[ft]=t,r[Tt]=c,l){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(l=0;l<ya.length;l++)ye(ya[l],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":ye("invalid",r),Yd(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0),ml(r);break;case"select":ye("invalid",r);break;case"textarea":ye("invalid",r),Pd(r,c.value,c.defaultValue,c.children),ml(r)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||c.suppressHydrationWarning===!0||Pm(r.textContent,l)?(c.popover!=null&&(ye("beforetoggle",r),ye("toggle",r)),c.onScroll!=null&&ye("scroll",r),c.onScrollEnd!=null&&ye("scrollend",r),c.onClick!=null&&(r.onclick=uo),r=!0):r=!1,r||Ii(t)}function Lp(t){for(vt=t.return;vt;)switch(vt.tag){case 5:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:vt=vt.return}}function Kr(t){if(t!==vt)return!1;if(!_e)return Lp(t),_e=!0,!1;var r=t.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||Lf(t.type,t.memoizedProps)),l=!l),l&&qe&&Ii(t),Lp(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8)if(l=t.data,l==="/$"){if(r===0){qe=hn(t.nextSibling);break e}r--}else l!=="$"&&l!=="$!"&&l!=="$?"||r++;t=t.nextSibling}qe=null}}else r===27?(r=qe,mi(t.type)?(t=Bf,Bf=null,qe=t):qe=r):qe=vt?hn(t.stateNode.nextSibling):null;return!0}function Yr(){qe=vt=null,_e=!1}function Rp(){var t=$i;return t!==null&&(Ct===null?Ct=t:Ct.push.apply(Ct,t),$i=null),t}function Xr(t){$i===null?$i=[t]:$i.push(t)}var mu=P(null),Vi=null,Rn=null;function ti(t,r,l){J(mu,r._currentValue),r._currentValue=l}function jn(t){t._currentValue=mu.current,W(mu)}function yu(t,r,l){for(;t!==null;){var c=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),t===l)break;t=t.return}}function bu(t,r,l,c){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var w=h.child;g=g.firstContext;e:for(;g!==null;){var T=g;g=h;for(var A=0;A<r.length;A++)if(T.context===r[A]){g.lanes|=l,T=g.alternate,T!==null&&(T.lanes|=l),yu(g.return,l,t),c||(w=null);break e}g=T.next}}else if(h.tag===18){if(w=h.return,w===null)throw Error(s(341));w.lanes|=l,g=w.alternate,g!==null&&(g.lanes|=l),yu(w,l,t),w=null}else w=h.child;if(w!==null)w.return=h;else for(w=h;w!==null;){if(w===t){w=null;break}if(h=w.sibling,h!==null){h.return=w.return,w=h;break}w=w.return}h=w}}function Pr(t,r,l,c){t=null;for(var h=r,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var w=h.alternate;if(w===null)throw Error(s(387));if(w=w.memoizedProps,w!==null){var T=h.type;Dt(h.pendingProps.value,w.value)||(t!==null?t.push(T):t=[T])}}else if(h===mt.current){if(w=h.alternate,w===null)throw Error(s(387));w.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(_a):t=[_a])}h=h.return}t!==null&&bu(r,t,l,c),r.flags|=262144}function Ol(t){for(t=t.firstContext;t!==null;){if(!Dt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Gi(t){Vi=t,Rn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function ht(t){return jp(Vi,t)}function Ll(t,r){return Vi===null&&Gi(t),jp(t,r)}function jp(t,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Rn===null){if(t===null)throw Error(s(308));Rn=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Rn=Rn.next=r;return l}var Aw=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(l,c){t.push(c)}};this.abort=function(){r.aborted=!0,t.forEach(function(l){return l()})}},Nw=n.unstable_scheduleCallback,Cw=n.unstable_NormalPriority,Qe={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vu(){return{controller:new Aw,data:new Map,refCount:0}}function Fr(t){t.refCount--,t.refCount===0&&Nw(Cw,function(){t.controller.abort()})}var Qr=null,Su=0,js=0,Ds=null;function kw(t,r){if(Qr===null){var l=Qr=[];Su=0,js=_f(),Ds={status:"pending",value:void 0,then:function(c){l.push(c)}}}return Su++,r.then(Dp,Dp),r}function Dp(){if(--Su===0&&Qr!==null){Ds!==null&&(Ds.status="fulfilled");var t=Qr;Qr=null,js=0,Ds=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function Mw(t,r){var l=[],c={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return t.then(function(){c.status="fulfilled",c.value=r;for(var h=0;h<l.length;h++)(0,l[h])(r)},function(h){for(c.status="rejected",c.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),c}var Bp=H.S;H.S=function(t,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&kw(t,r),Bp!==null&&Bp(t,r)};var Ki=P(null);function wu(){var t=Ki.current;return t!==null?t:Le.pooledCache}function Rl(t,r){r===null?J(Ki,Ki.current):J(Ki,r.pool)}function Up(){var t=wu();return t===null?null:{parent:Qe._currentValue,pool:t}}var Zr=Error(s(460)),zp=Error(s(474)),jl=Error(s(542)),xu={then:function(){}};function Hp(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Dl(){}function qp(t,r,l){switch(l=t[l],l===void 0?t.push(r):l!==r&&(r.then(Dl,Dl),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Ip(t),t;default:if(typeof r.status=="string")r.then(Dl,Dl);else{if(t=Le,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=r,t.status="pending",t.then(function(c){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=c}},function(c){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Ip(t),t}throw Jr=r,Zr}}var Jr=null;function $p(){if(Jr===null)throw Error(s(459));var t=Jr;return Jr=null,t}function Ip(t){if(t===Zr||t===jl)throw Error(s(483))}var ni=!1;function _u(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tu(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ii(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function si(t,r,l){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Te&2)!==0){var h=c.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),c.pending=r,r=Nl(t),Cp(t,null,l),r}return Al(t,c,r,l),Nl(t)}function Wr(t,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var c=r.lanes;c&=t.pendingLanes,l|=c,r.lanes=l,Dd(t,l)}}function Eu(t,r){var l=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var h=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var w={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?h=g=w:g=g.next=w,l=l.next}while(l!==null);g===null?h=g=r:g=g.next=r}else h=g=r;l={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=r:t.next=r,l.lastBaseUpdate=r}var Au=!1;function ea(){if(Au){var t=Ds;if(t!==null)throw t}}function ta(t,r,l,c){Au=!1;var h=t.updateQueue;ni=!1;var g=h.firstBaseUpdate,w=h.lastBaseUpdate,T=h.shared.pending;if(T!==null){h.shared.pending=null;var A=T,D=A.next;A.next=null,w===null?g=D:w.next=D,w=A;var K=t.alternate;K!==null&&(K=K.updateQueue,T=K.lastBaseUpdate,T!==w&&(T===null?K.firstBaseUpdate=D:T.next=D,K.lastBaseUpdate=A))}if(g!==null){var X=h.baseState;w=0,K=D=A=null,T=g;do{var B=T.lane&-536870913,U=B!==T.lane;if(U?(Se&B)===B:(c&B)===B){B!==0&&B===js&&(Au=!0),K!==null&&(K=K.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var fe=t,oe=T;B=r;var ke=l;switch(oe.tag){case 1:if(fe=oe.payload,typeof fe=="function"){X=fe.call(ke,X,B);break e}X=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=oe.payload,B=typeof fe=="function"?fe.call(ke,X,B):fe,B==null)break e;X=m({},X,B);break e;case 2:ni=!0}}B=T.callback,B!==null&&(t.flags|=64,U&&(t.flags|=8192),U=h.callbacks,U===null?h.callbacks=[B]:U.push(B))}else U={lane:B,tag:T.tag,payload:T.payload,callback:T.callback,next:null},K===null?(D=K=U,A=X):K=K.next=U,w|=B;if(T=T.next,T===null){if(T=h.shared.pending,T===null)break;U=T,T=U.next,U.next=null,h.lastBaseUpdate=U,h.shared.pending=null}}while(!0);K===null&&(A=X),h.baseState=A,h.firstBaseUpdate=D,h.lastBaseUpdate=K,g===null&&(h.shared.lanes=0),hi|=w,t.lanes=w,t.memoizedState=X}}function Vp(t,r){if(typeof t!="function")throw Error(s(191,t));t.call(r)}function Gp(t,r){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)Vp(l[t],r)}var Bs=P(null),Bl=P(0);function Kp(t,r){t=$n,J(Bl,t),J(Bs,r),$n=t|r.baseLanes}function Nu(){J(Bl,$n),J(Bs,Bs.current)}function Cu(){$n=Bl.current,W(Bs),W(Bl)}var ri=0,pe=null,Ne=null,Xe=null,Ul=!1,Us=!1,Yi=!1,zl=0,na=0,zs=null,Ow=0;function Ie(){throw Error(s(321))}function ku(t,r){if(r===null)return!1;for(var l=0;l<r.length&&l<t.length;l++)if(!Dt(t[l],r[l]))return!1;return!0}function Mu(t,r,l,c,h,g){return ri=g,pe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,H.H=t===null||t.memoizedState===null?Cg:kg,Yi=!1,g=l(c,h),Yi=!1,Us&&(g=Xp(r,l,c,h)),Yp(t),g}function Yp(t){H.H=Gl;var r=Ne!==null&&Ne.next!==null;if(ri=0,Xe=Ne=pe=null,Ul=!1,na=0,zs=null,r)throw Error(s(300));t===null||et||(t=t.dependencies,t!==null&&Ol(t)&&(et=!0))}function Xp(t,r,l,c){pe=t;var h=0;do{if(Us&&(zs=null),na=0,Us=!1,25<=h)throw Error(s(301));if(h+=1,Xe=Ne=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}H.H=zw,g=r(l,c)}while(Us);return g}function Lw(){var t=H.H,r=t.useState()[0];return r=typeof r.then=="function"?ia(r):r,t=t.useState()[0],(Ne!==null?Ne.memoizedState:null)!==t&&(pe.flags|=1024),r}function Ou(){var t=zl!==0;return zl=0,t}function Lu(t,r,l){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~l}function Ru(t){if(Ul){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Ul=!1}ri=0,Xe=Ne=pe=null,Us=!1,na=zl=0,zs=null}function At(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?pe.memoizedState=Xe=t:Xe=Xe.next=t,Xe}function Pe(){if(Ne===null){var t=pe.alternate;t=t!==null?t.memoizedState:null}else t=Ne.next;var r=Xe===null?pe.memoizedState:Xe.next;if(r!==null)Xe=r,Ne=t;else{if(t===null)throw pe.alternate===null?Error(s(467)):Error(s(310));Ne=t,t={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Xe===null?pe.memoizedState=Xe=t:Xe=Xe.next=t}return Xe}function ju(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ia(t){var r=na;return na+=1,zs===null&&(zs=[]),t=qp(zs,t,r),r=pe,(Xe===null?r.memoizedState:Xe.next)===null&&(r=r.alternate,H.H=r===null||r.memoizedState===null?Cg:kg),t}function Hl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ia(t);if(t.$$typeof===$)return ht(t)}throw Error(s(438,String(t)))}function Du(t){var r=null,l=pe.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var c=pe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=ju(),pe.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(t),c=0;c<t;c++)l[c]=ie;return r.index++,l}function Dn(t,r){return typeof r=="function"?r(t):r}function ql(t){var r=Pe();return Bu(r,Ne,t)}function Bu(t,r,l){var c=t.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=l;var h=t.baseQueue,g=c.pending;if(g!==null){if(h!==null){var w=h.next;h.next=g.next,g.next=w}r.baseQueue=h=g,c.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{r=h.next;var T=w=null,A=null,D=r,K=!1;do{var X=D.lane&-536870913;if(X!==D.lane?(Se&X)===X:(ri&X)===X){var B=D.revertLane;if(B===0)A!==null&&(A=A.next={lane:0,revertLane:0,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),X===js&&(K=!0);else if((ri&B)===B){D=D.next,B===js&&(K=!0);continue}else X={lane:0,revertLane:D.revertLane,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(T=A=X,w=g):A=A.next=X,pe.lanes|=B,hi|=B;X=D.action,Yi&&l(g,X),g=D.hasEagerState?D.eagerState:l(g,X)}else B={lane:X,revertLane:D.revertLane,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(T=A=B,w=g):A=A.next=B,pe.lanes|=X,hi|=X;D=D.next}while(D!==null&&D!==r);if(A===null?w=g:A.next=T,!Dt(g,t.memoizedState)&&(et=!0,K&&(l=Ds,l!==null)))throw l;t.memoizedState=g,t.baseState=w,t.baseQueue=A,c.lastRenderedState=g}return h===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Uu(t){var r=Pe(),l=r.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=t;var c=l.dispatch,h=l.pending,g=r.memoizedState;if(h!==null){l.pending=null;var w=h=h.next;do g=t(g,w.action),w=w.next;while(w!==h);Dt(g,r.memoizedState)||(et=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),l.lastRenderedState=g}return[g,c]}function Pp(t,r,l){var c=pe,h=Pe(),g=_e;if(g){if(l===void 0)throw Error(s(407));l=l()}else l=r();var w=!Dt((Ne||h).memoizedState,l);w&&(h.memoizedState=l,et=!0),h=h.queue;var T=Zp.bind(null,c,h,t);if(sa(2048,8,T,[t]),h.getSnapshot!==r||w||Xe!==null&&Xe.memoizedState.tag&1){if(c.flags|=2048,Hs(9,$l(),Qp.bind(null,c,h,l,r),null),Le===null)throw Error(s(349));g||(ri&124)!==0||Fp(c,r,l)}return l}function Fp(t,r,l){t.flags|=16384,t={getSnapshot:r,value:l},r=pe.updateQueue,r===null?(r=ju(),pe.updateQueue=r,r.stores=[t]):(l=r.stores,l===null?r.stores=[t]:l.push(t))}function Qp(t,r,l,c){r.value=l,r.getSnapshot=c,Jp(r)&&Wp(t)}function Zp(t,r,l){return l(function(){Jp(r)&&Wp(t)})}function Jp(t){var r=t.getSnapshot;t=t.value;try{var l=r();return!Dt(t,l)}catch{return!0}}function Wp(t){var r=Ms(t,2);r!==null&&$t(r,t,2)}function zu(t){var r=At();if(typeof t=="function"){var l=t;if(t=l(),Yi){Kt(!0);try{l()}finally{Kt(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:t},r}function eg(t,r,l,c){return t.baseState=l,Bu(t,Ne,typeof c=="function"?c:Dn)}function Rw(t,r,l,c,h){if(Vl(t))throw Error(s(485));if(t=r.action,t!==null){var g={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){g.listeners.push(w)}};H.T!==null?l(!0):g.isTransition=!1,c(g),l=r.pending,l===null?(g.next=r.pending=g,tg(r,g)):(g.next=l.next,r.pending=l.next=g)}}function tg(t,r){var l=r.action,c=r.payload,h=t.state;if(r.isTransition){var g=H.T,w={};H.T=w;try{var T=l(h,c),A=H.S;A!==null&&A(w,T),ng(t,r,T)}catch(D){Hu(t,r,D)}finally{H.T=g}}else try{g=l(h,c),ng(t,r,g)}catch(D){Hu(t,r,D)}}function ng(t,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){ig(t,r,c)},function(c){return Hu(t,r,c)}):ig(t,r,l)}function ig(t,r,l){r.status="fulfilled",r.value=l,sg(r),t.state=l,r=t.pending,r!==null&&(l=r.next,l===r?t.pending=null:(l=l.next,r.next=l,tg(t,l)))}function Hu(t,r,l){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=l,sg(r),r=r.next;while(r!==c)}t.action=null}function sg(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function rg(t,r){return r}function ag(t,r){if(_e){var l=Le.formState;if(l!==null){e:{var c=pe;if(_e){if(qe){t:{for(var h=qe,g=mn;h.nodeType!==8;){if(!g){h=null;break t}if(h=hn(h.nextSibling),h===null){h=null;break t}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){qe=hn(h.nextSibling),c=h.data==="F!";break e}}Ii(c)}c=!1}c&&(r=l[0])}}return l=At(),l.memoizedState=l.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rg,lastRenderedState:r},l.queue=c,l=Eg.bind(null,pe,c),c.dispatch=l,c=zu(!1),g=Gu.bind(null,pe,!1,c.queue),c=At(),h={state:r,dispatch:null,action:t,pending:null},c.queue=h,l=Rw.bind(null,pe,h,g,l),h.dispatch=l,c.memoizedState=t,[r,l,!1]}function lg(t){var r=Pe();return og(r,Ne,t)}function og(t,r,l){if(r=Bu(t,r,rg)[0],t=ql(Dn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=ia(r)}catch(w){throw w===Zr?jl:w}else c=r;r=Pe();var h=r.queue,g=h.dispatch;return l!==r.memoizedState&&(pe.flags|=2048,Hs(9,$l(),jw.bind(null,h,l),null)),[c,g,t]}function jw(t,r){t.action=r}function cg(t){var r=Pe(),l=Ne;if(l!==null)return og(r,l,t);Pe(),r=r.memoizedState,l=Pe();var c=l.queue.dispatch;return l.memoizedState=t,[r,c,!1]}function Hs(t,r,l,c){return t={tag:t,create:l,deps:c,inst:r,next:null},r=pe.updateQueue,r===null&&(r=ju(),pe.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=t.next=t:(c=l.next,l.next=t,t.next=c,r.lastEffect=t),t}function $l(){return{destroy:void 0,resource:void 0}}function ug(){return Pe().memoizedState}function Il(t,r,l,c){var h=At();c=c===void 0?null:c,pe.flags|=t,h.memoizedState=Hs(1|r,$l(),l,c)}function sa(t,r,l,c){var h=Pe();c=c===void 0?null:c;var g=h.memoizedState.inst;Ne!==null&&c!==null&&ku(c,Ne.memoizedState.deps)?h.memoizedState=Hs(r,g,l,c):(pe.flags|=t,h.memoizedState=Hs(1|r,g,l,c))}function fg(t,r){Il(8390656,8,t,r)}function hg(t,r){sa(2048,8,t,r)}function dg(t,r){return sa(4,2,t,r)}function pg(t,r){return sa(4,4,t,r)}function gg(t,r){if(typeof r=="function"){t=t();var l=r(t);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function mg(t,r,l){l=l!=null?l.concat([t]):null,sa(4,4,gg.bind(null,r,t),l)}function qu(){}function yg(t,r){var l=Pe();r=r===void 0?null:r;var c=l.memoizedState;return r!==null&&ku(r,c[1])?c[0]:(l.memoizedState=[t,r],t)}function bg(t,r){var l=Pe();r=r===void 0?null:r;var c=l.memoizedState;if(r!==null&&ku(r,c[1]))return c[0];if(c=t(),Yi){Kt(!0);try{t()}finally{Kt(!1)}}return l.memoizedState=[c,r],c}function $u(t,r,l){return l===void 0||(ri&1073741824)!==0?t.memoizedState=r:(t.memoizedState=l,t=wm(),pe.lanes|=t,hi|=t,l)}function vg(t,r,l,c){return Dt(l,r)?l:Bs.current!==null?(t=$u(t,l,c),Dt(t,r)||(et=!0),t):(ri&42)===0?(et=!0,t.memoizedState=l):(t=wm(),pe.lanes|=t,hi|=t,r)}function Sg(t,r,l,c,h){var g=Q.p;Q.p=g!==0&&8>g?g:8;var w=H.T,T={};H.T=T,Gu(t,!1,r,l);try{var A=h(),D=H.S;if(D!==null&&D(T,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var K=Mw(A,c);ra(t,r,K,qt(t))}else ra(t,r,c,qt(t))}catch(X){ra(t,r,{then:function(){},status:"rejected",reason:X},qt())}finally{Q.p=g,H.T=w}}function Dw(){}function Iu(t,r,l,c){if(t.tag!==5)throw Error(s(476));var h=wg(t).queue;Sg(t,h,r,se,l===null?Dw:function(){return xg(t),l(c)})}function wg(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:se},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:l},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function xg(t){var r=wg(t).next.queue;ra(t,r,{},qt())}function Vu(){return ht(_a)}function _g(){return Pe().memoizedState}function Tg(){return Pe().memoizedState}function Bw(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var l=qt();t=ii(l);var c=si(r,t,l);c!==null&&($t(c,r,l),Wr(c,r,l)),r={cache:vu()},t.payload=r;return}r=r.return}}function Uw(t,r,l){var c=qt();l={lane:c,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},Vl(t)?Ag(r,l):(l=cu(t,r,l,c),l!==null&&($t(l,t,c),Ng(l,r,c)))}function Eg(t,r,l){var c=qt();ra(t,r,l,c)}function ra(t,r,l,c){var h={lane:c,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(Vl(t))Ag(r,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var w=r.lastRenderedState,T=g(w,l);if(h.hasEagerState=!0,h.eagerState=T,Dt(T,w))return Al(t,r,h,0),Le===null&&El(),!1}catch{}finally{}if(l=cu(t,r,h,c),l!==null)return $t(l,t,c),Ng(l,r,c),!0}return!1}function Gu(t,r,l,c){if(c={lane:2,revertLane:_f(),action:c,hasEagerState:!1,eagerState:null,next:null},Vl(t)){if(r)throw Error(s(479))}else r=cu(t,l,c,2),r!==null&&$t(r,t,2)}function Vl(t){var r=t.alternate;return t===pe||r!==null&&r===pe}function Ag(t,r){Us=Ul=!0;var l=t.pending;l===null?r.next=r:(r.next=l.next,l.next=r),t.pending=r}function Ng(t,r,l){if((l&4194048)!==0){var c=r.lanes;c&=t.pendingLanes,l|=c,r.lanes=l,Dd(t,l)}}var Gl={readContext:ht,use:Hl,useCallback:Ie,useContext:Ie,useEffect:Ie,useImperativeHandle:Ie,useLayoutEffect:Ie,useInsertionEffect:Ie,useMemo:Ie,useReducer:Ie,useRef:Ie,useState:Ie,useDebugValue:Ie,useDeferredValue:Ie,useTransition:Ie,useSyncExternalStore:Ie,useId:Ie,useHostTransitionStatus:Ie,useFormState:Ie,useActionState:Ie,useOptimistic:Ie,useMemoCache:Ie,useCacheRefresh:Ie},Cg={readContext:ht,use:Hl,useCallback:function(t,r){return At().memoizedState=[t,r===void 0?null:r],t},useContext:ht,useEffect:fg,useImperativeHandle:function(t,r,l){l=l!=null?l.concat([t]):null,Il(4194308,4,gg.bind(null,r,t),l)},useLayoutEffect:function(t,r){return Il(4194308,4,t,r)},useInsertionEffect:function(t,r){Il(4,2,t,r)},useMemo:function(t,r){var l=At();r=r===void 0?null:r;var c=t();if(Yi){Kt(!0);try{t()}finally{Kt(!1)}}return l.memoizedState=[c,r],c},useReducer:function(t,r,l){var c=At();if(l!==void 0){var h=l(r);if(Yi){Kt(!0);try{l(r)}finally{Kt(!1)}}}else h=r;return c.memoizedState=c.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},c.queue=t,t=t.dispatch=Uw.bind(null,pe,t),[c.memoizedState,t]},useRef:function(t){var r=At();return t={current:t},r.memoizedState=t},useState:function(t){t=zu(t);var r=t.queue,l=Eg.bind(null,pe,r);return r.dispatch=l,[t.memoizedState,l]},useDebugValue:qu,useDeferredValue:function(t,r){var l=At();return $u(l,t,r)},useTransition:function(){var t=zu(!1);return t=Sg.bind(null,pe,t.queue,!0,!1),At().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,l){var c=pe,h=At();if(_e){if(l===void 0)throw Error(s(407));l=l()}else{if(l=r(),Le===null)throw Error(s(349));(Se&124)!==0||Fp(c,r,l)}h.memoizedState=l;var g={value:l,getSnapshot:r};return h.queue=g,fg(Zp.bind(null,c,g,t),[t]),c.flags|=2048,Hs(9,$l(),Qp.bind(null,c,g,l,r),null),l},useId:function(){var t=At(),r=Le.identifierPrefix;if(_e){var l=Ln,c=On;l=(c&~(1<<32-bt(c)-1)).toString(32)+l,r="«"+r+"R"+l,l=zl++,0<l&&(r+="H"+l.toString(32)),r+="»"}else l=Ow++,r="«"+r+"r"+l.toString(32)+"»";return t.memoizedState=r},useHostTransitionStatus:Vu,useFormState:ag,useActionState:ag,useOptimistic:function(t){var r=At();r.memoizedState=r.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=Gu.bind(null,pe,!0,l),l.dispatch=r,[t,r]},useMemoCache:Du,useCacheRefresh:function(){return At().memoizedState=Bw.bind(null,pe)}},kg={readContext:ht,use:Hl,useCallback:yg,useContext:ht,useEffect:hg,useImperativeHandle:mg,useInsertionEffect:dg,useLayoutEffect:pg,useMemo:bg,useReducer:ql,useRef:ug,useState:function(){return ql(Dn)},useDebugValue:qu,useDeferredValue:function(t,r){var l=Pe();return vg(l,Ne.memoizedState,t,r)},useTransition:function(){var t=ql(Dn)[0],r=Pe().memoizedState;return[typeof t=="boolean"?t:ia(t),r]},useSyncExternalStore:Pp,useId:_g,useHostTransitionStatus:Vu,useFormState:lg,useActionState:lg,useOptimistic:function(t,r){var l=Pe();return eg(l,Ne,t,r)},useMemoCache:Du,useCacheRefresh:Tg},zw={readContext:ht,use:Hl,useCallback:yg,useContext:ht,useEffect:hg,useImperativeHandle:mg,useInsertionEffect:dg,useLayoutEffect:pg,useMemo:bg,useReducer:Uu,useRef:ug,useState:function(){return Uu(Dn)},useDebugValue:qu,useDeferredValue:function(t,r){var l=Pe();return Ne===null?$u(l,t,r):vg(l,Ne.memoizedState,t,r)},useTransition:function(){var t=Uu(Dn)[0],r=Pe().memoizedState;return[typeof t=="boolean"?t:ia(t),r]},useSyncExternalStore:Pp,useId:_g,useHostTransitionStatus:Vu,useFormState:cg,useActionState:cg,useOptimistic:function(t,r){var l=Pe();return Ne!==null?eg(l,Ne,t,r):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:Du,useCacheRefresh:Tg},qs=null,aa=0;function Kl(t){var r=aa;return aa+=1,qs===null&&(qs=[]),qp(qs,t,r)}function la(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Yl(t,r){throw r.$$typeof===y?Error(s(525)):(t=Object.prototype.toString.call(r),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Mg(t){var r=t._init;return r(t._payload)}function Og(t){function r(O,M){if(t){var j=O.deletions;j===null?(O.deletions=[M],O.flags|=16):j.push(M)}}function l(O,M){if(!t)return null;for(;M!==null;)r(O,M),M=M.sibling;return null}function c(O){for(var M=new Map;O!==null;)O.key!==null?M.set(O.key,O):M.set(O.index,O),O=O.sibling;return M}function h(O,M){return O=Mn(O,M),O.index=0,O.sibling=null,O}function g(O,M,j){return O.index=j,t?(j=O.alternate,j!==null?(j=j.index,j<M?(O.flags|=67108866,M):j):(O.flags|=67108866,M)):(O.flags|=1048576,M)}function w(O){return t&&O.alternate===null&&(O.flags|=67108866),O}function T(O,M,j,Y){return M===null||M.tag!==6?(M=fu(j,O.mode,Y),M.return=O,M):(M=h(M,j),M.return=O,M)}function A(O,M,j,Y){var ne=j.type;return ne===E?K(O,M,j.props.children,Y,j.key):M!==null&&(M.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===q&&Mg(ne)===M.type)?(M=h(M,j.props),la(M,j),M.return=O,M):(M=Cl(j.type,j.key,j.props,null,O.mode,Y),la(M,j),M.return=O,M)}function D(O,M,j,Y){return M===null||M.tag!==4||M.stateNode.containerInfo!==j.containerInfo||M.stateNode.implementation!==j.implementation?(M=hu(j,O.mode,Y),M.return=O,M):(M=h(M,j.children||[]),M.return=O,M)}function K(O,M,j,Y,ne){return M===null||M.tag!==7?(M=zi(j,O.mode,Y,ne),M.return=O,M):(M=h(M,j),M.return=O,M)}function X(O,M,j){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=fu(""+M,O.mode,j),M.return=O,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case v:return j=Cl(M.type,M.key,M.props,null,O.mode,j),la(j,M),j.return=O,j;case b:return M=hu(M,O.mode,j),M.return=O,M;case q:var Y=M._init;return M=Y(M._payload),X(O,M,j)}if(ve(M)||I(M))return M=zi(M,O.mode,j,null),M.return=O,M;if(typeof M.then=="function")return X(O,Kl(M),j);if(M.$$typeof===$)return X(O,Ll(O,M),j);Yl(O,M)}return null}function B(O,M,j,Y){var ne=M!==null?M.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return ne!==null?null:T(O,M,""+j,Y);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case v:return j.key===ne?A(O,M,j,Y):null;case b:return j.key===ne?D(O,M,j,Y):null;case q:return ne=j._init,j=ne(j._payload),B(O,M,j,Y)}if(ve(j)||I(j))return ne!==null?null:K(O,M,j,Y,null);if(typeof j.then=="function")return B(O,M,Kl(j),Y);if(j.$$typeof===$)return B(O,M,Ll(O,j),Y);Yl(O,j)}return null}function U(O,M,j,Y,ne){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return O=O.get(j)||null,T(M,O,""+Y,ne);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case v:return O=O.get(Y.key===null?j:Y.key)||null,A(M,O,Y,ne);case b:return O=O.get(Y.key===null?j:Y.key)||null,D(M,O,Y,ne);case q:var ge=Y._init;return Y=ge(Y._payload),U(O,M,j,Y,ne)}if(ve(Y)||I(Y))return O=O.get(j)||null,K(M,O,Y,ne,null);if(typeof Y.then=="function")return U(O,M,j,Kl(Y),ne);if(Y.$$typeof===$)return U(O,M,j,Ll(M,Y),ne);Yl(M,Y)}return null}function fe(O,M,j,Y){for(var ne=null,ge=null,re=M,ue=M=0,nt=null;re!==null&&ue<j.length;ue++){re.index>ue?(nt=re,re=null):nt=re.sibling;var xe=B(O,re,j[ue],Y);if(xe===null){re===null&&(re=nt);break}t&&re&&xe.alternate===null&&r(O,re),M=g(xe,M,ue),ge===null?ne=xe:ge.sibling=xe,ge=xe,re=nt}if(ue===j.length)return l(O,re),_e&&qi(O,ue),ne;if(re===null){for(;ue<j.length;ue++)re=X(O,j[ue],Y),re!==null&&(M=g(re,M,ue),ge===null?ne=re:ge.sibling=re,ge=re);return _e&&qi(O,ue),ne}for(re=c(re);ue<j.length;ue++)nt=U(re,O,ue,j[ue],Y),nt!==null&&(t&&nt.alternate!==null&&re.delete(nt.key===null?ue:nt.key),M=g(nt,M,ue),ge===null?ne=nt:ge.sibling=nt,ge=nt);return t&&re.forEach(function(wi){return r(O,wi)}),_e&&qi(O,ue),ne}function oe(O,M,j,Y){if(j==null)throw Error(s(151));for(var ne=null,ge=null,re=M,ue=M=0,nt=null,xe=j.next();re!==null&&!xe.done;ue++,xe=j.next()){re.index>ue?(nt=re,re=null):nt=re.sibling;var wi=B(O,re,xe.value,Y);if(wi===null){re===null&&(re=nt);break}t&&re&&wi.alternate===null&&r(O,re),M=g(wi,M,ue),ge===null?ne=wi:ge.sibling=wi,ge=wi,re=nt}if(xe.done)return l(O,re),_e&&qi(O,ue),ne;if(re===null){for(;!xe.done;ue++,xe=j.next())xe=X(O,xe.value,Y),xe!==null&&(M=g(xe,M,ue),ge===null?ne=xe:ge.sibling=xe,ge=xe);return _e&&qi(O,ue),ne}for(re=c(re);!xe.done;ue++,xe=j.next())xe=U(re,O,ue,xe.value,Y),xe!==null&&(t&&xe.alternate!==null&&re.delete(xe.key===null?ue:xe.key),M=g(xe,M,ue),ge===null?ne=xe:ge.sibling=xe,ge=xe);return t&&re.forEach(function(H1){return r(O,H1)}),_e&&qi(O,ue),ne}function ke(O,M,j,Y){if(typeof j=="object"&&j!==null&&j.type===E&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case v:e:{for(var ne=j.key;M!==null;){if(M.key===ne){if(ne=j.type,ne===E){if(M.tag===7){l(O,M.sibling),Y=h(M,j.props.children),Y.return=O,O=Y;break e}}else if(M.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===q&&Mg(ne)===M.type){l(O,M.sibling),Y=h(M,j.props),la(Y,j),Y.return=O,O=Y;break e}l(O,M);break}else r(O,M);M=M.sibling}j.type===E?(Y=zi(j.props.children,O.mode,Y,j.key),Y.return=O,O=Y):(Y=Cl(j.type,j.key,j.props,null,O.mode,Y),la(Y,j),Y.return=O,O=Y)}return w(O);case b:e:{for(ne=j.key;M!==null;){if(M.key===ne)if(M.tag===4&&M.stateNode.containerInfo===j.containerInfo&&M.stateNode.implementation===j.implementation){l(O,M.sibling),Y=h(M,j.children||[]),Y.return=O,O=Y;break e}else{l(O,M);break}else r(O,M);M=M.sibling}Y=hu(j,O.mode,Y),Y.return=O,O=Y}return w(O);case q:return ne=j._init,j=ne(j._payload),ke(O,M,j,Y)}if(ve(j))return fe(O,M,j,Y);if(I(j)){if(ne=I(j),typeof ne!="function")throw Error(s(150));return j=ne.call(j),oe(O,M,j,Y)}if(typeof j.then=="function")return ke(O,M,Kl(j),Y);if(j.$$typeof===$)return ke(O,M,Ll(O,j),Y);Yl(O,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,M!==null&&M.tag===6?(l(O,M.sibling),Y=h(M,j),Y.return=O,O=Y):(l(O,M),Y=fu(j,O.mode,Y),Y.return=O,O=Y),w(O)):l(O,M)}return function(O,M,j,Y){try{aa=0;var ne=ke(O,M,j,Y);return qs=null,ne}catch(re){if(re===Zr||re===jl)throw re;var ge=Bt(29,re,null,O.mode);return ge.lanes=Y,ge.return=O,ge}finally{}}}var $s=Og(!0),Lg=Og(!1),Jt=P(null),yn=null;function ai(t){var r=t.alternate;J(Ze,Ze.current&1),J(Jt,t),yn===null&&(r===null||Bs.current!==null||r.memoizedState!==null)&&(yn=t)}function Rg(t){if(t.tag===22){if(J(Ze,Ze.current),J(Jt,t),yn===null){var r=t.alternate;r!==null&&r.memoizedState!==null&&(yn=t)}}else li()}function li(){J(Ze,Ze.current),J(Jt,Jt.current)}function Bn(t){W(Jt),yn===t&&(yn=null),W(Ze)}var Ze=P(0);function Xl(t){for(var r=t;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||Df(l)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function Ku(t,r,l,c){r=t.memoizedState,l=l(c,r),l=l==null?r:m({},r,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var Yu={enqueueSetState:function(t,r,l){t=t._reactInternals;var c=qt(),h=ii(c);h.payload=r,l!=null&&(h.callback=l),r=si(t,h,c),r!==null&&($t(r,t,c),Wr(r,t,c))},enqueueReplaceState:function(t,r,l){t=t._reactInternals;var c=qt(),h=ii(c);h.tag=1,h.payload=r,l!=null&&(h.callback=l),r=si(t,h,c),r!==null&&($t(r,t,c),Wr(r,t,c))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var l=qt(),c=ii(l);c.tag=2,r!=null&&(c.callback=r),r=si(t,c,l),r!==null&&($t(r,t,l),Wr(r,t,l))}};function jg(t,r,l,c,h,g,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,w):r.prototype&&r.prototype.isPureReactComponent?!Vr(l,c)||!Vr(h,g):!0}function Dg(t,r,l,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,c),r.state!==t&&Yu.enqueueReplaceState(r,r.state,null)}function Xi(t,r){var l=r;if("ref"in r){l={};for(var c in r)c!=="ref"&&(l[c]=r[c])}if(t=t.defaultProps){l===r&&(l=m({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}var Pl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function Bg(t){Pl(t)}function Ug(t){console.error(t)}function zg(t){Pl(t)}function Fl(t,r){try{var l=t.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function Hg(t,r,l){try{var c=t.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Xu(t,r,l){return l=ii(l),l.tag=3,l.payload={element:null},l.callback=function(){Fl(t,r)},l}function qg(t){return t=ii(t),t.tag=3,t}function $g(t,r,l,c){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var g=c.value;t.payload=function(){return h(g)},t.callback=function(){Hg(r,l,c)}}var w=l.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(t.callback=function(){Hg(r,l,c),typeof h!="function"&&(di===null?di=new Set([this]):di.add(this));var T=c.stack;this.componentDidCatch(c.value,{componentStack:T!==null?T:""})})}function Hw(t,r,l,c,h){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=l.alternate,r!==null&&Pr(r,l,h,!0),l=Jt.current,l!==null){switch(l.tag){case 13:return yn===null?bf():l.alternate===null&&$e===0&&($e=3),l.flags&=-257,l.flags|=65536,l.lanes=h,c===xu?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([c]):r.add(c),Sf(t,c,h)),!1;case 22:return l.flags|=65536,c===xu?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([c]):l.add(c)),Sf(t,c,h)),!1}throw Error(s(435,l.tag))}return Sf(t,c,h),bf(),!1}if(_e)return r=Jt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,c!==gu&&(t=Error(s(422),{cause:c}),Xr(Pt(t,l)))):(c!==gu&&(r=Error(s(423),{cause:c}),Xr(Pt(r,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,c=Pt(c,l),h=Xu(t.stateNode,c,h),Eu(t,h),$e!==4&&($e=2)),!1;var g=Error(s(520),{cause:c});if(g=Pt(g,l),pa===null?pa=[g]:pa.push(g),$e!==4&&($e=2),r===null)return!0;c=Pt(c,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=Xu(l.stateNode,c,t),Eu(l,t),!1;case 1:if(r=l.type,g=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(di===null||!di.has(g))))return l.flags|=65536,h&=-h,l.lanes|=h,h=qg(h),$g(h,t,l,c),Eu(l,h),!1}l=l.return}while(l!==null);return!1}var Ig=Error(s(461)),et=!1;function it(t,r,l,c){r.child=t===null?Lg(r,null,l,c):$s(r,t.child,l,c)}function Vg(t,r,l,c,h){l=l.render;var g=r.ref;if("ref"in c){var w={};for(var T in c)T!=="ref"&&(w[T]=c[T])}else w=c;return Gi(r),c=Mu(t,r,l,w,g,h),T=Ou(),t!==null&&!et?(Lu(t,r,h),Un(t,r,h)):(_e&&T&&du(r),r.flags|=1,it(t,r,c,h),r.child)}function Gg(t,r,l,c,h){if(t===null){var g=l.type;return typeof g=="function"&&!uu(g)&&g.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=g,Kg(t,r,g,c,h)):(t=Cl(l.type,null,c,r,r.mode,h),t.ref=r.ref,t.return=r,r.child=t)}if(g=t.child,!tf(t,h)){var w=g.memoizedProps;if(l=l.compare,l=l!==null?l:Vr,l(w,c)&&t.ref===r.ref)return Un(t,r,h)}return r.flags|=1,t=Mn(g,c),t.ref=r.ref,t.return=r,r.child=t}function Kg(t,r,l,c,h){if(t!==null){var g=t.memoizedProps;if(Vr(g,c)&&t.ref===r.ref)if(et=!1,r.pendingProps=c=g,tf(t,h))(t.flags&131072)!==0&&(et=!0);else return r.lanes=t.lanes,Un(t,r,h)}return Pu(t,r,l,c,h)}function Yg(t,r,l){var c=r.pendingProps,h=c.children,g=t!==null?t.memoizedState:null;if(c.mode==="hidden"){if((r.flags&128)!==0){if(c=g!==null?g.baseLanes|l:l,t!==null){for(h=r.child=t.child,g=0;h!==null;)g=g|h.lanes|h.childLanes,h=h.sibling;r.childLanes=g&~c}else r.childLanes=0,r.child=null;return Xg(t,r,c,l)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&Rl(r,g!==null?g.cachePool:null),g!==null?Kp(r,g):Nu(),Rg(r);else return r.lanes=r.childLanes=536870912,Xg(t,r,g!==null?g.baseLanes|l:l,l)}else g!==null?(Rl(r,g.cachePool),Kp(r,g),li(),r.memoizedState=null):(t!==null&&Rl(r,null),Nu(),li());return it(t,r,h,l),r.child}function Xg(t,r,l,c){var h=wu();return h=h===null?null:{parent:Qe._currentValue,pool:h},r.memoizedState={baseLanes:l,cachePool:h},t!==null&&Rl(r,null),Nu(),Rg(r),t!==null&&Pr(t,r,c,!0),null}function Ql(t,r){var l=r.ref;if(l===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(t===null||t.ref!==l)&&(r.flags|=4194816)}}function Pu(t,r,l,c,h){return Gi(r),l=Mu(t,r,l,c,void 0,h),c=Ou(),t!==null&&!et?(Lu(t,r,h),Un(t,r,h)):(_e&&c&&du(r),r.flags|=1,it(t,r,l,h),r.child)}function Pg(t,r,l,c,h,g){return Gi(r),r.updateQueue=null,l=Xp(r,c,l,h),Yp(t),c=Ou(),t!==null&&!et?(Lu(t,r,g),Un(t,r,g)):(_e&&c&&du(r),r.flags|=1,it(t,r,l,g),r.child)}function Fg(t,r,l,c,h){if(Gi(r),r.stateNode===null){var g=Os,w=l.contextType;typeof w=="object"&&w!==null&&(g=ht(w)),g=new l(c,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Yu,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=c,g.state=r.memoizedState,g.refs={},_u(r),w=l.contextType,g.context=typeof w=="object"&&w!==null?ht(w):Os,g.state=r.memoizedState,w=l.getDerivedStateFromProps,typeof w=="function"&&(Ku(r,l,w,c),g.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(w=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),w!==g.state&&Yu.enqueueReplaceState(g,g.state,null),ta(r,c,g,h),ea(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(t===null){g=r.stateNode;var T=r.memoizedProps,A=Xi(l,T);g.props=A;var D=g.context,K=l.contextType;w=Os,typeof K=="object"&&K!==null&&(w=ht(K));var X=l.getDerivedStateFromProps;K=typeof X=="function"||typeof g.getSnapshotBeforeUpdate=="function",T=r.pendingProps!==T,K||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(T||D!==w)&&Dg(r,g,c,w),ni=!1;var B=r.memoizedState;g.state=B,ta(r,c,g,h),ea(),D=r.memoizedState,T||B!==D||ni?(typeof X=="function"&&(Ku(r,l,X,c),D=r.memoizedState),(A=ni||jg(r,l,A,c,B,D,w))?(K||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=D),g.props=c,g.state=D,g.context=w,c=A):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{g=r.stateNode,Tu(t,r),w=r.memoizedProps,K=Xi(l,w),g.props=K,X=r.pendingProps,B=g.context,D=l.contextType,A=Os,typeof D=="object"&&D!==null&&(A=ht(D)),T=l.getDerivedStateFromProps,(D=typeof T=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w!==X||B!==A)&&Dg(r,g,c,A),ni=!1,B=r.memoizedState,g.state=B,ta(r,c,g,h),ea();var U=r.memoizedState;w!==X||B!==U||ni||t!==null&&t.dependencies!==null&&Ol(t.dependencies)?(typeof T=="function"&&(Ku(r,l,T,c),U=r.memoizedState),(K=ni||jg(r,l,K,c,B,U,A)||t!==null&&t.dependencies!==null&&Ol(t.dependencies))?(D||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,U,A),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,U,A)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=U),g.props=c,g.state=U,g.context=A,c=K):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&B===t.memoizedState||(r.flags|=1024),c=!1)}return g=c,Ql(t,r),c=(r.flags&128)!==0,g||c?(g=r.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,t!==null&&c?(r.child=$s(r,t.child,null,h),r.child=$s(r,null,l,h)):it(t,r,l,h),r.memoizedState=g.state,t=r.child):t=Un(t,r,h),t}function Qg(t,r,l,c){return Yr(),r.flags|=256,it(t,r,l,c),r.child}var Fu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qu(t){return{baseLanes:t,cachePool:Up()}}function Zu(t,r,l){return t=t!==null?t.childLanes&~l:0,r&&(t|=Wt),t}function Zg(t,r,l){var c=r.pendingProps,h=!1,g=(r.flags&128)!==0,w;if((w=g)||(w=t!==null&&t.memoizedState===null?!1:(Ze.current&2)!==0),w&&(h=!0,r.flags&=-129),w=(r.flags&32)!==0,r.flags&=-33,t===null){if(_e){if(h?ai(r):li(),_e){var T=qe,A;if(A=T){e:{for(A=T,T=mn;A.nodeType!==8;){if(!T){T=null;break e}if(A=hn(A.nextSibling),A===null){T=null;break e}}T=A}T!==null?(r.memoizedState={dehydrated:T,treeContext:Hi!==null?{id:On,overflow:Ln}:null,retryLane:536870912,hydrationErrors:null},A=Bt(18,null,null,0),A.stateNode=T,A.return=r,r.child=A,vt=r,qe=null,A=!0):A=!1}A||Ii(r)}if(T=r.memoizedState,T!==null&&(T=T.dehydrated,T!==null))return Df(T)?r.lanes=32:r.lanes=536870912,null;Bn(r)}return T=c.children,c=c.fallback,h?(li(),h=r.mode,T=Zl({mode:"hidden",children:T},h),c=zi(c,h,l,null),T.return=r,c.return=r,T.sibling=c,r.child=T,h=r.child,h.memoizedState=Qu(l),h.childLanes=Zu(t,w,l),r.memoizedState=Fu,c):(ai(r),Ju(r,T))}if(A=t.memoizedState,A!==null&&(T=A.dehydrated,T!==null)){if(g)r.flags&256?(ai(r),r.flags&=-257,r=Wu(t,r,l)):r.memoizedState!==null?(li(),r.child=t.child,r.flags|=128,r=null):(li(),h=c.fallback,T=r.mode,c=Zl({mode:"visible",children:c.children},T),h=zi(h,T,l,null),h.flags|=2,c.return=r,h.return=r,c.sibling=h,r.child=c,$s(r,t.child,null,l),c=r.child,c.memoizedState=Qu(l),c.childLanes=Zu(t,w,l),r.memoizedState=Fu,r=h);else if(ai(r),Df(T)){if(w=T.nextSibling&&T.nextSibling.dataset,w)var D=w.dgst;w=D,c=Error(s(419)),c.stack="",c.digest=w,Xr({value:c,source:null,stack:null}),r=Wu(t,r,l)}else if(et||Pr(t,r,l,!1),w=(l&t.childLanes)!==0,et||w){if(w=Le,w!==null&&(c=l&-l,c=(c&42)!==0?1:Dc(c),c=(c&(w.suspendedLanes|l))!==0?0:c,c!==0&&c!==A.retryLane))throw A.retryLane=c,Ms(t,c),$t(w,t,c),Ig;T.data==="$?"||bf(),r=Wu(t,r,l)}else T.data==="$?"?(r.flags|=192,r.child=t.child,r=null):(t=A.treeContext,qe=hn(T.nextSibling),vt=r,_e=!0,$i=null,mn=!1,t!==null&&(Qt[Zt++]=On,Qt[Zt++]=Ln,Qt[Zt++]=Hi,On=t.id,Ln=t.overflow,Hi=r),r=Ju(r,c.children),r.flags|=4096);return r}return h?(li(),h=c.fallback,T=r.mode,A=t.child,D=A.sibling,c=Mn(A,{mode:"hidden",children:c.children}),c.subtreeFlags=A.subtreeFlags&65011712,D!==null?h=Mn(D,h):(h=zi(h,T,l,null),h.flags|=2),h.return=r,c.return=r,c.sibling=h,r.child=c,c=h,h=r.child,T=t.child.memoizedState,T===null?T=Qu(l):(A=T.cachePool,A!==null?(D=Qe._currentValue,A=A.parent!==D?{parent:D,pool:D}:A):A=Up(),T={baseLanes:T.baseLanes|l,cachePool:A}),h.memoizedState=T,h.childLanes=Zu(t,w,l),r.memoizedState=Fu,c):(ai(r),l=t.child,t=l.sibling,l=Mn(l,{mode:"visible",children:c.children}),l.return=r,l.sibling=null,t!==null&&(w=r.deletions,w===null?(r.deletions=[t],r.flags|=16):w.push(t)),r.child=l,r.memoizedState=null,l)}function Ju(t,r){return r=Zl({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Zl(t,r){return t=Bt(22,t,null,r),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Wu(t,r,l){return $s(r,t.child,null,l),t=Ju(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Jg(t,r,l){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),yu(t.return,r,l)}function ef(t,r,l,c,h){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:h}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=l,g.tailMode=h)}function Wg(t,r,l){var c=r.pendingProps,h=c.revealOrder,g=c.tail;if(it(t,r,c.children,l),c=Ze.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Jg(t,l,r);else if(t.tag===19)Jg(t,l,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}c&=1}switch(J(Ze,c),h){case"forwards":for(l=r.child,h=null;l!==null;)t=l.alternate,t!==null&&Xl(t)===null&&(h=l),l=l.sibling;l=h,l===null?(h=r.child,r.child=null):(h=l.sibling,l.sibling=null),ef(r,!1,h,l,g);break;case"backwards":for(l=null,h=r.child,r.child=null;h!==null;){if(t=h.alternate,t!==null&&Xl(t)===null){r.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}ef(r,!0,l,null,g);break;case"together":ef(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Un(t,r,l){if(t!==null&&(r.dependencies=t.dependencies),hi|=r.lanes,(l&r.childLanes)===0)if(t!==null){if(Pr(t,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(s(153));if(r.child!==null){for(t=r.child,l=Mn(t,t.pendingProps),r.child=l,l.return=r;t.sibling!==null;)t=t.sibling,l=l.sibling=Mn(t,t.pendingProps),l.return=r;l.sibling=null}return r.child}function tf(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&Ol(t)))}function qw(t,r,l){switch(r.tag){case 3:Ae(r,r.stateNode.containerInfo),ti(r,Qe,t.memoizedState.cache),Yr();break;case 27:case 5:Or(r);break;case 4:Ae(r,r.stateNode.containerInfo);break;case 10:ti(r,r.type,r.memoizedProps.value);break;case 13:var c=r.memoizedState;if(c!==null)return c.dehydrated!==null?(ai(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Zg(t,r,l):(ai(r),t=Un(t,r,l),t!==null?t.sibling:null);ai(r);break;case 19:var h=(t.flags&128)!==0;if(c=(l&r.childLanes)!==0,c||(Pr(t,r,l,!1),c=(l&r.childLanes)!==0),h){if(c)return Wg(t,r,l);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),J(Ze,Ze.current),c)break;return null;case 22:case 23:return r.lanes=0,Yg(t,r,l);case 24:ti(r,Qe,t.memoizedState.cache)}return Un(t,r,l)}function em(t,r,l){if(t!==null)if(t.memoizedProps!==r.pendingProps)et=!0;else{if(!tf(t,l)&&(r.flags&128)===0)return et=!1,qw(t,r,l);et=(t.flags&131072)!==0}else et=!1,_e&&(r.flags&1048576)!==0&&Mp(r,Ml,r.index);switch(r.lanes=0,r.tag){case 16:e:{t=r.pendingProps;var c=r.elementType,h=c._init;if(c=h(c._payload),r.type=c,typeof c=="function")uu(c)?(t=Xi(c,t),r.tag=1,r=Fg(null,r,c,t,l)):(r.tag=0,r=Pu(null,r,c,t,l));else{if(c!=null){if(h=c.$$typeof,h===V){r.tag=11,r=Vg(null,r,c,t,l);break e}else if(h===Z){r.tag=14,r=Gg(null,r,c,t,l);break e}}throw r=ee(c)||c,Error(s(306,r,""))}}return r;case 0:return Pu(t,r,r.type,r.pendingProps,l);case 1:return c=r.type,h=Xi(c,r.pendingProps),Fg(t,r,c,h,l);case 3:e:{if(Ae(r,r.stateNode.containerInfo),t===null)throw Error(s(387));c=r.pendingProps;var g=r.memoizedState;h=g.element,Tu(t,r),ta(r,c,null,l);var w=r.memoizedState;if(c=w.cache,ti(r,Qe,c),c!==g.cache&&bu(r,[Qe],l,!0),ea(),c=w.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:w.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=Qg(t,r,c,l);break e}else if(c!==h){h=Pt(Error(s(424)),r),Xr(h),r=Qg(t,r,c,l);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(qe=hn(t.firstChild),vt=r,_e=!0,$i=null,mn=!0,l=Lg(r,null,c,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Yr(),c===h){r=Un(t,r,l);break e}it(t,r,c,l)}r=r.child}return r;case 26:return Ql(t,r),t===null?(l=sy(r.type,null,r.pendingProps,null))?r.memoizedState=l:_e||(l=r.type,t=r.pendingProps,c=fo(te.current).createElement(l),c[ft]=r,c[Tt]=t,rt(c,l,t),We(c),r.stateNode=c):r.memoizedState=sy(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return Or(r),t===null&&_e&&(c=r.stateNode=ty(r.type,r.pendingProps,te.current),vt=r,mn=!0,h=qe,mi(r.type)?(Bf=h,qe=hn(c.firstChild)):qe=h),it(t,r,r.pendingProps.children,l),Ql(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&_e&&((h=c=qe)&&(c=p1(c,r.type,r.pendingProps,mn),c!==null?(r.stateNode=c,vt=r,qe=hn(c.firstChild),mn=!1,h=!0):h=!1),h||Ii(r)),Or(r),h=r.type,g=r.pendingProps,w=t!==null?t.memoizedProps:null,c=g.children,Lf(h,g)?c=null:w!==null&&Lf(h,w)&&(r.flags|=32),r.memoizedState!==null&&(h=Mu(t,r,Lw,null,null,l),_a._currentValue=h),Ql(t,r),it(t,r,c,l),r.child;case 6:return t===null&&_e&&((t=l=qe)&&(l=g1(l,r.pendingProps,mn),l!==null?(r.stateNode=l,vt=r,qe=null,t=!0):t=!1),t||Ii(r)),null;case 13:return Zg(t,r,l);case 4:return Ae(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=$s(r,null,c,l):it(t,r,c,l),r.child;case 11:return Vg(t,r,r.type,r.pendingProps,l);case 7:return it(t,r,r.pendingProps,l),r.child;case 8:return it(t,r,r.pendingProps.children,l),r.child;case 12:return it(t,r,r.pendingProps.children,l),r.child;case 10:return c=r.pendingProps,ti(r,r.type,c.value),it(t,r,c.children,l),r.child;case 9:return h=r.type._context,c=r.pendingProps.children,Gi(r),h=ht(h),c=c(h),r.flags|=1,it(t,r,c,l),r.child;case 14:return Gg(t,r,r.type,r.pendingProps,l);case 15:return Kg(t,r,r.type,r.pendingProps,l);case 19:return Wg(t,r,l);case 31:return c=r.pendingProps,l=r.mode,c={mode:c.mode,children:c.children},t===null?(l=Zl(c,l),l.ref=r.ref,r.child=l,l.return=r,r=l):(l=Mn(t.child,c),l.ref=r.ref,r.child=l,l.return=r,r=l),r;case 22:return Yg(t,r,l);case 24:return Gi(r),c=ht(Qe),t===null?(h=wu(),h===null&&(h=Le,g=vu(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=l),h=g),r.memoizedState={parent:c,cache:h},_u(r),ti(r,Qe,h)):((t.lanes&l)!==0&&(Tu(t,r),ta(r,null,null,l),ea()),h=t.memoizedState,g=r.memoizedState,h.parent!==c?(h={parent:c,cache:c},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),ti(r,Qe,c)):(c=g.cache,ti(r,Qe,c),c!==h.cache&&bu(r,[Qe],l,!0))),it(t,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function zn(t){t.flags|=4}function tm(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!cy(r)){if(r=Jt.current,r!==null&&((Se&4194048)===Se?yn!==null:(Se&62914560)!==Se&&(Se&536870912)===0||r!==yn))throw Jr=xu,zp;t.flags|=8192}}function Jl(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?Jn():536870912,t.lanes|=r,Ks|=r)}function oa(t,r){if(!_e)switch(t.tailMode){case"hidden":r=t.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Be(t){var r=t.alternate!==null&&t.alternate.child===t.child,l=0,c=0;if(r)for(var h=t.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=c,t.childLanes=l,r}function $w(t,r,l){var c=r.pendingProps;switch(pu(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(r),null;case 1:return Be(r),null;case 3:return l=r.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),jn(Qe),Vt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Kr(r)?zn(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Rp())),Be(r),null;case 26:return l=r.memoizedState,t===null?(zn(r),l!==null?(Be(r),tm(r,l)):(Be(r),r.flags&=-16777217)):l?l!==t.memoizedState?(zn(r),Be(r),tm(r,l)):(Be(r),r.flags&=-16777217):(t.memoizedProps!==c&&zn(r),Be(r),r.flags&=-16777217),null;case 27:En(r),l=te.current;var h=r.type;if(t!==null&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Be(r),null}t=ae.current,Kr(r)?Op(r):(t=ty(h,c,l),r.stateNode=t,zn(r))}return Be(r),null;case 5:if(En(r),l=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Be(r),null}if(t=ae.current,Kr(r))Op(r);else{switch(h=fo(te.current),t){case 1:t=h.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:t=h.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":t=h.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":t=h.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":t=h.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof c.is=="string"?h.createElement("select",{is:c.is}):h.createElement("select"),c.multiple?t.multiple=!0:c.size&&(t.size=c.size);break;default:t=typeof c.is=="string"?h.createElement(l,{is:c.is}):h.createElement(l)}}t[ft]=r,t[Tt]=c;e:for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)t.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break e;for(;h.sibling===null;){if(h.return===null||h.return===r)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}r.stateNode=t;e:switch(rt(t,l,c),l){case"button":case"input":case"select":case"textarea":t=!!c.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&zn(r)}}return Be(r),r.flags&=-16777217,null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==c&&zn(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(s(166));if(t=te.current,Kr(r)){if(t=r.stateNode,l=r.memoizedProps,c=null,h=vt,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}t[ft]=r,t=!!(t.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||Pm(t.nodeValue,l)),t||Ii(r)}else t=fo(t).createTextNode(c),t[ft]=r,r.stateNode=t}return Be(r),null;case 13:if(c=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Kr(r),c!==null&&c.dehydrated!==null){if(t===null){if(!h)throw Error(s(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(s(317));h[ft]=r}else Yr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Be(r),h=!1}else h=Rp(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(Bn(r),r):(Bn(r),null)}if(Bn(r),(r.flags&128)!==0)return r.lanes=l,r;if(l=c!==null,t=t!==null&&t.memoizedState!==null,l){c=r.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool);var g=null;c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==h&&(c.flags|=2048)}return l!==t&&l&&(r.child.flags|=8192),Jl(r,r.updateQueue),Be(r),null;case 4:return Vt(),t===null&&Nf(r.stateNode.containerInfo),Be(r),null;case 10:return jn(r.type),Be(r),null;case 19:if(W(Ze),h=r.memoizedState,h===null)return Be(r),null;if(c=(r.flags&128)!==0,g=h.rendering,g===null)if(c)oa(h,!1);else{if($e!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(g=Xl(t),g!==null){for(r.flags|=128,oa(h,!1),t=g.updateQueue,r.updateQueue=t,Jl(r,t),r.subtreeFlags=0,t=l,l=r.child;l!==null;)kp(l,t),l=l.sibling;return J(Ze,Ze.current&1|2),r.child}t=t.sibling}h.tail!==null&&Gt()>to&&(r.flags|=128,c=!0,oa(h,!1),r.lanes=4194304)}else{if(!c)if(t=Xl(g),t!==null){if(r.flags|=128,c=!0,t=t.updateQueue,r.updateQueue=t,Jl(r,t),oa(h,!0),h.tail===null&&h.tailMode==="hidden"&&!g.alternate&&!_e)return Be(r),null}else 2*Gt()-h.renderingStartTime>to&&l!==536870912&&(r.flags|=128,c=!0,oa(h,!1),r.lanes=4194304);h.isBackwards?(g.sibling=r.child,r.child=g):(t=h.last,t!==null?t.sibling=g:r.child=g,h.last=g)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=Gt(),r.sibling=null,t=Ze.current,J(Ze,c?t&1|2:t&1),r):(Be(r),null);case 22:case 23:return Bn(r),Cu(),c=r.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(l&536870912)!==0&&(r.flags&128)===0&&(Be(r),r.subtreeFlags&6&&(r.flags|=8192)):Be(r),l=r.updateQueue,l!==null&&Jl(r,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==l&&(r.flags|=2048),t!==null&&W(Ki),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),jn(Qe),Be(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function Iw(t,r){switch(pu(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return jn(Qe),Vt(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return En(r),null;case 13:if(Bn(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Yr()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return W(Ze),null;case 4:return Vt(),null;case 10:return jn(r.type),null;case 22:case 23:return Bn(r),Cu(),t!==null&&W(Ki),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return jn(Qe),null;case 25:return null;default:return null}}function nm(t,r){switch(pu(r),r.tag){case 3:jn(Qe),Vt();break;case 26:case 27:case 5:En(r);break;case 4:Vt();break;case 13:Bn(r);break;case 19:W(Ze);break;case 10:jn(r.type);break;case 22:case 23:Bn(r),Cu(),t!==null&&W(Ki);break;case 24:jn(Qe)}}function ca(t,r){try{var l=r.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var h=c.next;l=h;do{if((l.tag&t)===t){c=void 0;var g=l.create,w=l.inst;c=g(),w.destroy=c}l=l.next}while(l!==h)}}catch(T){Me(r,r.return,T)}}function oi(t,r,l){try{var c=r.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var g=h.next;c=g;do{if((c.tag&t)===t){var w=c.inst,T=w.destroy;if(T!==void 0){w.destroy=void 0,h=r;var A=l,D=T;try{D()}catch(K){Me(h,A,K)}}}c=c.next}while(c!==g)}}catch(K){Me(r,r.return,K)}}function im(t){var r=t.updateQueue;if(r!==null){var l=t.stateNode;try{Gp(r,l)}catch(c){Me(t,t.return,c)}}}function sm(t,r,l){l.props=Xi(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(c){Me(t,r,c)}}function ua(t,r){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof l=="function"?t.refCleanup=l(c):l.current=c}}catch(h){Me(t,r,h)}}function bn(t,r){var l=t.ref,c=t.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(h){Me(t,r,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){Me(t,r,h)}else l.current=null}function rm(t){var r=t.type,l=t.memoizedProps,c=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(h){Me(t,t.return,h)}}function nf(t,r,l){try{var c=t.stateNode;c1(c,t.type,l,r),c[Tt]=r}catch(h){Me(t,t.return,h)}}function am(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&mi(t.type)||t.tag===4}function sf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||am(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&mi(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function rf(t,r,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(t),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=uo));else if(c!==4&&(c===27&&mi(t.type)&&(l=t.stateNode,r=null),t=t.child,t!==null))for(rf(t,r,l),t=t.sibling;t!==null;)rf(t,r,l),t=t.sibling}function Wl(t,r,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?l.insertBefore(t,r):l.appendChild(t);else if(c!==4&&(c===27&&mi(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Wl(t,r,l),t=t.sibling;t!==null;)Wl(t,r,l),t=t.sibling}function lm(t){var r=t.stateNode,l=t.memoizedProps;try{for(var c=t.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);rt(r,c,l),r[ft]=t,r[Tt]=l}catch(g){Me(t,t.return,g)}}var Hn=!1,Ve=!1,af=!1,om=typeof WeakSet=="function"?WeakSet:Set,tt=null;function Vw(t,r){if(t=t.containerInfo,Mf=bo,t=vp(t),iu(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var h=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break e}var w=0,T=-1,A=-1,D=0,K=0,X=t,B=null;t:for(;;){for(var U;X!==l||h!==0&&X.nodeType!==3||(T=w+h),X!==g||c!==0&&X.nodeType!==3||(A=w+c),X.nodeType===3&&(w+=X.nodeValue.length),(U=X.firstChild)!==null;)B=X,X=U;for(;;){if(X===t)break t;if(B===l&&++D===h&&(T=w),B===g&&++K===c&&(A=w),(U=X.nextSibling)!==null)break;X=B,B=X.parentNode}X=U}l=T===-1||A===-1?null:{start:T,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(Of={focusedElem:t,selectionRange:l},bo=!1,tt=r;tt!==null;)if(r=tt,t=r.child,(r.subtreeFlags&1024)!==0&&t!==null)t.return=r,tt=t;else for(;tt!==null;){switch(r=tt,g=r.alternate,t=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,l=r,h=g.memoizedProps,g=g.memoizedState,c=l.stateNode;try{var fe=Xi(l.type,h,l.elementType===l.type);t=c.getSnapshotBeforeUpdate(fe,g),c.__reactInternalSnapshotBeforeUpdate=t}catch(oe){Me(l,l.return,oe)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,l=t.nodeType,l===9)jf(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":jf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(s(163))}if(t=r.sibling,t!==null){t.return=r.return,tt=t;break}tt=r.return}}function cm(t,r,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:ci(t,l),c&4&&ca(5,l);break;case 1:if(ci(t,l),c&4)if(t=l.stateNode,r===null)try{t.componentDidMount()}catch(w){Me(l,l.return,w)}else{var h=Xi(l.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(h,r,t.__reactInternalSnapshotBeforeUpdate)}catch(w){Me(l,l.return,w)}}c&64&&im(l),c&512&&ua(l,l.return);break;case 3:if(ci(t,l),c&64&&(t=l.updateQueue,t!==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{Gp(t,r)}catch(w){Me(l,l.return,w)}}break;case 27:r===null&&c&4&&lm(l);case 26:case 5:ci(t,l),r===null&&c&4&&rm(l),c&512&&ua(l,l.return);break;case 12:ci(t,l);break;case 13:ci(t,l),c&4&&hm(t,l),c&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=Jw.bind(null,l),m1(t,l))));break;case 22:if(c=l.memoizedState!==null||Hn,!c){r=r!==null&&r.memoizedState!==null||Ve,h=Hn;var g=Ve;Hn=c,(Ve=r)&&!g?ui(t,l,(l.subtreeFlags&8772)!==0):ci(t,l),Hn=h,Ve=g}break;case 30:break;default:ci(t,l)}}function um(t){var r=t.alternate;r!==null&&(t.alternate=null,um(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&zc(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Re=null,Nt=!1;function qn(t,r,l){for(l=l.child;l!==null;)fm(t,r,l),l=l.sibling}function fm(t,r,l){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(Oi,l)}catch{}switch(l.tag){case 26:Ve||bn(l,r),qn(t,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ve||bn(l,r);var c=Re,h=Nt;mi(l.type)&&(Re=l.stateNode,Nt=!1),qn(t,r,l),va(l.stateNode),Re=c,Nt=h;break;case 5:Ve||bn(l,r);case 6:if(c=Re,h=Nt,Re=null,qn(t,r,l),Re=c,Nt=h,Re!==null)if(Nt)try{(Re.nodeType===9?Re.body:Re.nodeName==="HTML"?Re.ownerDocument.body:Re).removeChild(l.stateNode)}catch(g){Me(l,r,g)}else try{Re.removeChild(l.stateNode)}catch(g){Me(l,r,g)}break;case 18:Re!==null&&(Nt?(t=Re,Wm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Na(t)):Wm(Re,l.stateNode));break;case 4:c=Re,h=Nt,Re=l.stateNode.containerInfo,Nt=!0,qn(t,r,l),Re=c,Nt=h;break;case 0:case 11:case 14:case 15:Ve||oi(2,l,r),Ve||oi(4,l,r),qn(t,r,l);break;case 1:Ve||(bn(l,r),c=l.stateNode,typeof c.componentWillUnmount=="function"&&sm(l,r,c)),qn(t,r,l);break;case 21:qn(t,r,l);break;case 22:Ve=(c=Ve)||l.memoizedState!==null,qn(t,r,l),Ve=c;break;default:qn(t,r,l)}}function hm(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Na(t)}catch(l){Me(r,r.return,l)}}function Gw(t){switch(t.tag){case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new om),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new om),r;default:throw Error(s(435,t.tag))}}function lf(t,r){var l=Gw(t);r.forEach(function(c){var h=Ww.bind(null,t,c);l.has(c)||(l.add(c),c.then(h,h))})}function Ut(t,r){var l=r.deletions;if(l!==null)for(var c=0;c<l.length;c++){var h=l[c],g=t,w=r,T=w;e:for(;T!==null;){switch(T.tag){case 27:if(mi(T.type)){Re=T.stateNode,Nt=!1;break e}break;case 5:Re=T.stateNode,Nt=!1;break e;case 3:case 4:Re=T.stateNode.containerInfo,Nt=!0;break e}T=T.return}if(Re===null)throw Error(s(160));fm(g,w,h),Re=null,Nt=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)dm(r,t),r=r.sibling}var fn=null;function dm(t,r){var l=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Ut(r,t),zt(t),c&4&&(oi(3,t,t.return),ca(3,t),oi(5,t,t.return));break;case 1:Ut(r,t),zt(t),c&512&&(Ve||l===null||bn(l,l.return)),c&64&&Hn&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var h=fn;if(Ut(r,t),zt(t),c&512&&(Ve||l===null||bn(l,l.return)),c&4){var g=l!==null?l.memoizedState:null;if(c=t.memoizedState,l===null)if(c===null)if(t.stateNode===null){e:{c=t.type,l=t.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":g=h.getElementsByTagName("title")[0],(!g||g[jr]||g[ft]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=h.createElement(c),h.head.insertBefore(g,h.querySelector("head > title"))),rt(g,c,l),g[ft]=t,We(g),c=g;break e;case"link":var w=ly("link","href",h).get(c+(l.href||""));if(w){for(var T=0;T<w.length;T++)if(g=w[T],g.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&g.getAttribute("rel")===(l.rel==null?null:l.rel)&&g.getAttribute("title")===(l.title==null?null:l.title)&&g.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){w.splice(T,1);break t}}g=h.createElement(c),rt(g,c,l),h.head.appendChild(g);break;case"meta":if(w=ly("meta","content",h).get(c+(l.content||""))){for(T=0;T<w.length;T++)if(g=w[T],g.getAttribute("content")===(l.content==null?null:""+l.content)&&g.getAttribute("name")===(l.name==null?null:l.name)&&g.getAttribute("property")===(l.property==null?null:l.property)&&g.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&g.getAttribute("charset")===(l.charSet==null?null:l.charSet)){w.splice(T,1);break t}}g=h.createElement(c),rt(g,c,l),h.head.appendChild(g);break;default:throw Error(s(468,c))}g[ft]=t,We(g),c=g}t.stateNode=c}else oy(h,t.type,t.stateNode);else t.stateNode=ay(h,c,t.memoizedProps);else g!==c?(g===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):g.count--,c===null?oy(h,t.type,t.stateNode):ay(h,c,t.memoizedProps)):c===null&&t.stateNode!==null&&nf(t,t.memoizedProps,l.memoizedProps)}break;case 27:Ut(r,t),zt(t),c&512&&(Ve||l===null||bn(l,l.return)),l!==null&&c&4&&nf(t,t.memoizedProps,l.memoizedProps);break;case 5:if(Ut(r,t),zt(t),c&512&&(Ve||l===null||bn(l,l.return)),t.flags&32){h=t.stateNode;try{_s(h,"")}catch(U){Me(t,t.return,U)}}c&4&&t.stateNode!=null&&(h=t.memoizedProps,nf(t,h,l!==null?l.memoizedProps:h)),c&1024&&(af=!0);break;case 6:if(Ut(r,t),zt(t),c&4){if(t.stateNode===null)throw Error(s(162));c=t.memoizedProps,l=t.stateNode;try{l.nodeValue=c}catch(U){Me(t,t.return,U)}}break;case 3:if(go=null,h=fn,fn=ho(r.containerInfo),Ut(r,t),fn=h,zt(t),c&4&&l!==null&&l.memoizedState.isDehydrated)try{Na(r.containerInfo)}catch(U){Me(t,t.return,U)}af&&(af=!1,pm(t));break;case 4:c=fn,fn=ho(t.stateNode.containerInfo),Ut(r,t),zt(t),fn=c;break;case 12:Ut(r,t),zt(t);break;case 13:Ut(r,t),zt(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(df=Gt()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,lf(t,c)));break;case 22:h=t.memoizedState!==null;var A=l!==null&&l.memoizedState!==null,D=Hn,K=Ve;if(Hn=D||h,Ve=K||A,Ut(r,t),Ve=K,Hn=D,zt(t),c&8192)e:for(r=t.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(l===null||A||Hn||Ve||Pi(t)),l=null,r=t;;){if(r.tag===5||r.tag===26){if(l===null){A=l=r;try{if(g=A.stateNode,h)w=g.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{T=A.stateNode;var X=A.memoizedProps.style,B=X!=null&&X.hasOwnProperty("display")?X.display:null;T.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(U){Me(A,A.return,U)}}}else if(r.tag===6){if(l===null){A=r;try{A.stateNode.nodeValue=h?"":A.memoizedProps}catch(U){Me(A,A.return,U)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}c&4&&(c=t.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,lf(t,l))));break;case 19:Ut(r,t),zt(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,lf(t,c)));break;case 30:break;case 21:break;default:Ut(r,t),zt(t)}}function zt(t){var r=t.flags;if(r&2){try{for(var l,c=t.return;c!==null;){if(am(c)){l=c;break}c=c.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var h=l.stateNode,g=sf(t);Wl(t,g,h);break;case 5:var w=l.stateNode;l.flags&32&&(_s(w,""),l.flags&=-33);var T=sf(t);Wl(t,T,w);break;case 3:case 4:var A=l.stateNode.containerInfo,D=sf(t);rf(t,D,A);break;default:throw Error(s(161))}}catch(K){Me(t,t.return,K)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function pm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;pm(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function ci(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)cm(t,r.alternate,r),r=r.sibling}function Pi(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:oi(4,r,r.return),Pi(r);break;case 1:bn(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&sm(r,r.return,l),Pi(r);break;case 27:va(r.stateNode);case 26:case 5:bn(r,r.return),Pi(r);break;case 22:r.memoizedState===null&&Pi(r);break;case 30:Pi(r);break;default:Pi(r)}t=t.sibling}}function ui(t,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var c=r.alternate,h=t,g=r,w=g.flags;switch(g.tag){case 0:case 11:case 15:ui(h,g,l),ca(4,g);break;case 1:if(ui(h,g,l),c=g,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(D){Me(c,c.return,D)}if(c=g,h=c.updateQueue,h!==null){var T=c.stateNode;try{var A=h.shared.hiddenCallbacks;if(A!==null)for(h.shared.hiddenCallbacks=null,h=0;h<A.length;h++)Vp(A[h],T)}catch(D){Me(c,c.return,D)}}l&&w&64&&im(g),ua(g,g.return);break;case 27:lm(g);case 26:case 5:ui(h,g,l),l&&c===null&&w&4&&rm(g),ua(g,g.return);break;case 12:ui(h,g,l);break;case 13:ui(h,g,l),l&&w&4&&hm(h,g);break;case 22:g.memoizedState===null&&ui(h,g,l),ua(g,g.return);break;case 30:break;default:ui(h,g,l)}r=r.sibling}}function of(t,r){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&Fr(l))}function cf(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Fr(t))}function vn(t,r,l,c){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)gm(t,r,l,c),r=r.sibling}function gm(t,r,l,c){var h=r.flags;switch(r.tag){case 0:case 11:case 15:vn(t,r,l,c),h&2048&&ca(9,r);break;case 1:vn(t,r,l,c);break;case 3:vn(t,r,l,c),h&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Fr(t)));break;case 12:if(h&2048){vn(t,r,l,c),t=r.stateNode;try{var g=r.memoizedProps,w=g.id,T=g.onPostCommit;typeof T=="function"&&T(w,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(A){Me(r,r.return,A)}}else vn(t,r,l,c);break;case 13:vn(t,r,l,c);break;case 23:break;case 22:g=r.stateNode,w=r.alternate,r.memoizedState!==null?g._visibility&2?vn(t,r,l,c):fa(t,r):g._visibility&2?vn(t,r,l,c):(g._visibility|=2,Is(t,r,l,c,(r.subtreeFlags&10256)!==0)),h&2048&&of(w,r);break;case 24:vn(t,r,l,c),h&2048&&cf(r.alternate,r);break;default:vn(t,r,l,c)}}function Is(t,r,l,c,h){for(h=h&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var g=t,w=r,T=l,A=c,D=w.flags;switch(w.tag){case 0:case 11:case 15:Is(g,w,T,A,h),ca(8,w);break;case 23:break;case 22:var K=w.stateNode;w.memoizedState!==null?K._visibility&2?Is(g,w,T,A,h):fa(g,w):(K._visibility|=2,Is(g,w,T,A,h)),h&&D&2048&&of(w.alternate,w);break;case 24:Is(g,w,T,A,h),h&&D&2048&&cf(w.alternate,w);break;default:Is(g,w,T,A,h)}r=r.sibling}}function fa(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=t,c=r,h=c.flags;switch(c.tag){case 22:fa(l,c),h&2048&&of(c.alternate,c);break;case 24:fa(l,c),h&2048&&cf(c.alternate,c);break;default:fa(l,c)}r=r.sibling}}var ha=8192;function Vs(t){if(t.subtreeFlags&ha)for(t=t.child;t!==null;)mm(t),t=t.sibling}function mm(t){switch(t.tag){case 26:Vs(t),t.flags&ha&&t.memoizedState!==null&&k1(fn,t.memoizedState,t.memoizedProps);break;case 5:Vs(t);break;case 3:case 4:var r=fn;fn=ho(t.stateNode.containerInfo),Vs(t),fn=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=ha,ha=16777216,Vs(t),ha=r):Vs(t));break;default:Vs(t)}}function ym(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function da(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var c=r[l];tt=c,vm(c,t)}ym(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bm(t),t=t.sibling}function bm(t){switch(t.tag){case 0:case 11:case 15:da(t),t.flags&2048&&oi(9,t,t.return);break;case 3:da(t);break;case 12:da(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,eo(t)):da(t);break;default:da(t)}}function eo(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var c=r[l];tt=c,vm(c,t)}ym(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:oi(8,r,r.return),eo(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,eo(r));break;default:eo(r)}t=t.sibling}}function vm(t,r){for(;tt!==null;){var l=tt;switch(l.tag){case 0:case 11:case 15:oi(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Fr(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,tt=c;else e:for(l=t;tt!==null;){c=tt;var h=c.sibling,g=c.return;if(um(c),c===l){tt=null;break e}if(h!==null){h.return=g,tt=h;break e}tt=g}}}var Kw={getCacheForType:function(t){var r=ht(Qe),l=r.data.get(t);return l===void 0&&(l=t(),r.data.set(t,l)),l}},Yw=typeof WeakMap=="function"?WeakMap:Map,Te=0,Le=null,me=null,Se=0,Ee=0,Ht=null,fi=!1,Gs=!1,uf=!1,$n=0,$e=0,hi=0,Fi=0,ff=0,Wt=0,Ks=0,pa=null,Ct=null,hf=!1,df=0,to=1/0,no=null,di=null,st=0,pi=null,Ys=null,Xs=0,pf=0,gf=null,Sm=null,ga=0,mf=null;function qt(){if((Te&2)!==0&&Se!==0)return Se&-Se;if(H.T!==null){var t=js;return t!==0?t:_f()}return Bd()}function wm(){Wt===0&&(Wt=(Se&536870912)===0||_e?ce():536870912);var t=Jt.current;return t!==null&&(t.flags|=32),Wt}function $t(t,r,l){(t===Le&&(Ee===2||Ee===9)||t.cancelPendingCommit!==null)&&(Ps(t,0),gi(t,Se,Wt,!1)),Rr(t,l),((Te&2)===0||t!==Le)&&(t===Le&&((Te&2)===0&&(Fi|=l),$e===4&&gi(t,Se,Wt,!1)),Sn(t))}function xm(t,r,l){if((Te&6)!==0)throw Error(s(327));var c=!l&&(r&124)===0&&(r&t.expiredLanes)===0||Ri(t,r),h=c?Fw(t,r):vf(t,r,!0),g=c;do{if(h===0){Gs&&!c&&gi(t,r,0,!1);break}else{if(l=t.current.alternate,g&&!Xw(l)){h=vf(t,r,!1),g=!1;continue}if(h===2){if(g=r,t.errorRecoveryDisabledLanes&g)var w=0;else w=t.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){r=w;e:{var T=t;h=pa;var A=T.current.memoizedState.isDehydrated;if(A&&(Ps(T,w).flags|=256),w=vf(T,w,!1),w!==2){if(uf&&!A){T.errorRecoveryDisabledLanes|=g,Fi|=g,h=4;break e}g=Ct,Ct=h,g!==null&&(Ct===null?Ct=g:Ct.push.apply(Ct,g))}h=w}if(g=!1,h!==2)continue}}if(h===1){Ps(t,0),gi(t,r,0,!0);break}e:{switch(c=t,g=h,g){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:gi(c,r,Wt,!fi);break e;case 2:Ct=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(h=df+300-Gt(),10<h)){if(gi(c,r,Wt,!fi),gs(c,0,!0)!==0)break e;c.timeoutHandle=Zm(_m.bind(null,c,l,Ct,no,hf,r,Wt,Fi,Ks,fi,g,2,-0,0),h);break e}_m(c,l,Ct,no,hf,r,Wt,Fi,Ks,fi,g,0,-0,0)}}break}while(!0);Sn(t)}function _m(t,r,l,c,h,g,w,T,A,D,K,X,B,U){if(t.timeoutHandle=-1,X=r.subtreeFlags,(X&8192||(X&16785408)===16785408)&&(xa={stylesheets:null,count:0,unsuspend:C1},mm(r),X=M1(),X!==null)){t.cancelPendingCommit=X(Mm.bind(null,t,r,g,l,c,h,w,T,A,K,1,B,U)),gi(t,g,w,!D);return}Mm(t,r,g,l,c,h,w,T,A)}function Xw(t){for(var r=t;;){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 c=0;c<l.length;c++){var h=l[c],g=h.getSnapshot;h=h.value;try{if(!Dt(g(),h))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function gi(t,r,l,c){r&=~ff,r&=~Fi,t.suspendedLanes|=r,t.pingedLanes&=~r,c&&(t.warmLanes|=r),c=t.expirationTimes;for(var h=r;0<h;){var g=31-bt(h),w=1<<g;c[g]=-1,h&=~w}l!==0&&jd(t,l,r)}function io(){return(Te&6)===0?(ma(0),!1):!0}function yf(){if(me!==null){if(Ee===0)var t=me.return;else t=me,Rn=Vi=null,Ru(t),qs=null,aa=0,t=me;for(;t!==null;)nm(t.alternate,t),t=t.return;me=null}}function Ps(t,r){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,f1(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),yf(),Le=t,me=l=Mn(t.current,null),Se=r,Ee=0,Ht=null,fi=!1,Gs=Ri(t,r),uf=!1,Ks=Wt=ff=Fi=hi=$e=0,Ct=pa=null,hf=!1,(r&8)!==0&&(r|=r&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=r;0<c;){var h=31-bt(c),g=1<<h;r|=t[h],c&=~g}return $n=r,El(),l}function Tm(t,r){pe=null,H.H=Gl,r===Zr||r===jl?(r=$p(),Ee=3):r===zp?(r=$p(),Ee=4):Ee=r===Ig?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ht=r,me===null&&($e=1,Fl(t,Pt(r,t.current)))}function Em(){var t=H.H;return H.H=Gl,t===null?Gl:t}function Am(){var t=H.A;return H.A=Kw,t}function bf(){$e=4,fi||(Se&4194048)!==Se&&Jt.current!==null||(Gs=!0),(hi&134217727)===0&&(Fi&134217727)===0||Le===null||gi(Le,Se,Wt,!1)}function vf(t,r,l){var c=Te;Te|=2;var h=Em(),g=Am();(Le!==t||Se!==r)&&(no=null,Ps(t,r)),r=!1;var w=$e;e:do try{if(Ee!==0&&me!==null){var T=me,A=Ht;switch(Ee){case 8:yf(),w=6;break e;case 3:case 2:case 9:case 6:Jt.current===null&&(r=!0);var D=Ee;if(Ee=0,Ht=null,Fs(t,T,A,D),l&&Gs){w=0;break e}break;default:D=Ee,Ee=0,Ht=null,Fs(t,T,A,D)}}Pw(),w=$e;break}catch(K){Tm(t,K)}while(!0);return r&&t.shellSuspendCounter++,Rn=Vi=null,Te=c,H.H=h,H.A=g,me===null&&(Le=null,Se=0,El()),w}function Pw(){for(;me!==null;)Nm(me)}function Fw(t,r){var l=Te;Te|=2;var c=Em(),h=Am();Le!==t||Se!==r?(no=null,to=Gt()+500,Ps(t,r)):Gs=Ri(t,r);e:do try{if(Ee!==0&&me!==null){r=me;var g=Ht;t:switch(Ee){case 1:Ee=0,Ht=null,Fs(t,r,g,1);break;case 2:case 9:if(Hp(g)){Ee=0,Ht=null,Cm(r);break}r=function(){Ee!==2&&Ee!==9||Le!==t||(Ee=7),Sn(t)},g.then(r,r);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:Hp(g)?(Ee=0,Ht=null,Cm(r)):(Ee=0,Ht=null,Fs(t,r,g,7));break;case 5:var w=null;switch(me.tag){case 26:w=me.memoizedState;case 5:case 27:var T=me;if(!w||cy(w)){Ee=0,Ht=null;var A=T.sibling;if(A!==null)me=A;else{var D=T.return;D!==null?(me=D,so(D)):me=null}break t}}Ee=0,Ht=null,Fs(t,r,g,5);break;case 6:Ee=0,Ht=null,Fs(t,r,g,6);break;case 8:yf(),$e=6;break e;default:throw Error(s(462))}}Qw();break}catch(K){Tm(t,K)}while(!0);return Rn=Vi=null,H.H=c,H.A=h,Te=l,me!==null?0:(Le=null,Se=0,El(),$e)}function Qw(){for(;me!==null&&!fl();)Nm(me)}function Nm(t){var r=em(t.alternate,t,$n);t.memoizedProps=t.pendingProps,r===null?so(t):me=r}function Cm(t){var r=t,l=r.alternate;switch(r.tag){case 15:case 0:r=Pg(l,r,r.pendingProps,r.type,void 0,Se);break;case 11:r=Pg(l,r,r.pendingProps,r.type.render,r.ref,Se);break;case 5:Ru(r);default:nm(l,r),r=me=kp(r,$n),r=em(l,r,$n)}t.memoizedProps=t.pendingProps,r===null?so(t):me=r}function Fs(t,r,l,c){Rn=Vi=null,Ru(r),qs=null,aa=0;var h=r.return;try{if(Hw(t,h,r,l,Se)){$e=1,Fl(t,Pt(l,t.current)),me=null;return}}catch(g){if(h!==null)throw me=h,g;$e=1,Fl(t,Pt(l,t.current)),me=null;return}r.flags&32768?(_e||c===1?t=!0:Gs||(Se&536870912)!==0?t=!1:(fi=t=!0,(c===2||c===9||c===3||c===6)&&(c=Jt.current,c!==null&&c.tag===13&&(c.flags|=16384))),km(r,t)):so(r)}function so(t){var r=t;do{if((r.flags&32768)!==0){km(r,fi);return}t=r.return;var l=$w(r.alternate,r,$n);if(l!==null){me=l;return}if(r=r.sibling,r!==null){me=r;return}me=r=t}while(r!==null);$e===0&&($e=5)}function km(t,r){do{var l=Iw(t.alternate,t);if(l!==null){l.flags&=32767,me=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(t=t.sibling,t!==null)){me=t;return}me=t=l}while(t!==null);$e=6,me=null}function Mm(t,r,l,c,h,g,w,T,A){t.cancelPendingCommit=null;do ro();while(st!==0);if((Te&6)!==0)throw Error(s(327));if(r!==null){if(r===t.current)throw Error(s(177));if(g=r.lanes|r.childLanes,g|=ou,CS(t,l,g,w,T,A),t===Le&&(me=Le=null,Se=0),Ys=r,pi=t,Xs=l,pf=g,gf=h,Sm=c,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,e1(ps,function(){return Dm(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=H.T,H.T=null,h=Q.p,Q.p=2,w=Te,Te|=4;try{Vw(t,r,l)}finally{Te=w,Q.p=h,H.T=c}}st=1,Om(),Lm(),Rm()}}function Om(){if(st===1){st=0;var t=pi,r=Ys,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=H.T,H.T=null;var c=Q.p;Q.p=2;var h=Te;Te|=4;try{dm(r,t);var g=Of,w=vp(t.containerInfo),T=g.focusedElem,A=g.selectionRange;if(w!==T&&T&&T.ownerDocument&&bp(T.ownerDocument.documentElement,T)){if(A!==null&&iu(T)){var D=A.start,K=A.end;if(K===void 0&&(K=D),"selectionStart"in T)T.selectionStart=D,T.selectionEnd=Math.min(K,T.value.length);else{var X=T.ownerDocument||document,B=X&&X.defaultView||window;if(B.getSelection){var U=B.getSelection(),fe=T.textContent.length,oe=Math.min(A.start,fe),ke=A.end===void 0?oe:Math.min(A.end,fe);!U.extend&&oe>ke&&(w=ke,ke=oe,oe=w);var O=yp(T,oe),M=yp(T,ke);if(O&&M&&(U.rangeCount!==1||U.anchorNode!==O.node||U.anchorOffset!==O.offset||U.focusNode!==M.node||U.focusOffset!==M.offset)){var j=X.createRange();j.setStart(O.node,O.offset),U.removeAllRanges(),oe>ke?(U.addRange(j),U.extend(M.node,M.offset)):(j.setEnd(M.node,M.offset),U.addRange(j))}}}}for(X=[],U=T;U=U.parentNode;)U.nodeType===1&&X.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<X.length;T++){var Y=X[T];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}bo=!!Mf,Of=Mf=null}finally{Te=h,Q.p=c,H.T=l}}t.current=r,st=2}}function Lm(){if(st===2){st=0;var t=pi,r=Ys,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=H.T,H.T=null;var c=Q.p;Q.p=2;var h=Te;Te|=4;try{cm(t,r.alternate,r)}finally{Te=h,Q.p=c,H.T=l}}st=3}}function Rm(){if(st===4||st===3){st=0,Mc();var t=pi,r=Ys,l=Xs,c=Sm;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?st=5:(st=0,Ys=pi=null,jm(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(di=null),Bc(l),r=r.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(Oi,r,void 0,(r.current.flags&128)===128)}catch{}if(c!==null){r=H.T,h=Q.p,Q.p=2,H.T=null;try{for(var g=t.onRecoverableError,w=0;w<c.length;w++){var T=c[w];g(T.value,{componentStack:T.stack})}}finally{H.T=r,Q.p=h}}(Xs&3)!==0&&ro(),Sn(t),h=t.pendingLanes,(l&4194090)!==0&&(h&42)!==0?t===mf?ga++:(ga=0,mf=t):ga=0,ma(0)}}function jm(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,Fr(r)))}function ro(t){return Om(),Lm(),Rm(),Dm()}function Dm(){if(st!==5)return!1;var t=pi,r=pf;pf=0;var l=Bc(Xs),c=H.T,h=Q.p;try{Q.p=32>l?32:l,H.T=null,l=gf,gf=null;var g=pi,w=Xs;if(st=0,Ys=pi=null,Xs=0,(Te&6)!==0)throw Error(s(331));var T=Te;if(Te|=4,bm(g.current),gm(g,g.current,w,l),Te=T,ma(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(Oi,g)}catch{}return!0}finally{Q.p=h,H.T=c,jm(t,r)}}function Bm(t,r,l){r=Pt(l,r),r=Xu(t.stateNode,r,2),t=si(t,r,2),t!==null&&(Rr(t,2),Sn(t))}function Me(t,r,l){if(t.tag===3)Bm(t,t,l);else for(;r!==null;){if(r.tag===3){Bm(r,t,l);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(di===null||!di.has(c))){t=Pt(l,t),l=qg(2),c=si(r,l,2),c!==null&&($g(l,c,r,t),Rr(c,2),Sn(c));break}}r=r.return}}function Sf(t,r,l){var c=t.pingCache;if(c===null){c=t.pingCache=new Yw;var h=new Set;c.set(r,h)}else h=c.get(r),h===void 0&&(h=new Set,c.set(r,h));h.has(l)||(uf=!0,h.add(l),t=Zw.bind(null,t,r,l),r.then(t,t))}function Zw(t,r,l){var c=t.pingCache;c!==null&&c.delete(r),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Le===t&&(Se&l)===l&&($e===4||$e===3&&(Se&62914560)===Se&&300>Gt()-df?(Te&2)===0&&Ps(t,0):ff|=l,Ks===Se&&(Ks=0)),Sn(t)}function Um(t,r){r===0&&(r=Jn()),t=Ms(t,r),t!==null&&(Rr(t,r),Sn(t))}function Jw(t){var r=t.memoizedState,l=0;r!==null&&(l=r.retryLane),Um(t,l)}function Ww(t,r){var l=0;switch(t.tag){case 13:var c=t.stateNode,h=t.memoizedState;h!==null&&(l=h.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(s(314))}c!==null&&c.delete(r),Um(t,l)}function e1(t,r){return hs(t,r)}var ao=null,Qs=null,wf=!1,lo=!1,xf=!1,Qi=0;function Sn(t){t!==Qs&&t.next===null&&(Qs===null?ao=Qs=t:Qs=Qs.next=t),lo=!0,wf||(wf=!0,n1())}function ma(t,r){if(!xf&&lo){xf=!0;do for(var l=!1,c=ao;c!==null;){if(t!==0){var h=c.pendingLanes;if(h===0)var g=0;else{var w=c.suspendedLanes,T=c.pingedLanes;g=(1<<31-bt(42|t)+1)-1,g&=h&~(w&~T),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,$m(c,g))}else g=Se,g=gs(c,c===Le?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||Ri(c,g)||(l=!0,$m(c,g));c=c.next}while(l);xf=!1}}function t1(){zm()}function zm(){lo=wf=!1;var t=0;Qi!==0&&(u1()&&(t=Qi),Qi=0);for(var r=Gt(),l=null,c=ao;c!==null;){var h=c.next,g=Hm(c,r);g===0?(c.next=null,l===null?ao=h:l.next=h,h===null&&(Qs=l)):(l=c,(t!==0||(g&3)!==0)&&(lo=!0)),c=h}ma(t)}function Hm(t,r){for(var l=t.suspendedLanes,c=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var w=31-bt(g),T=1<<w,A=h[w];A===-1?((T&l)===0||(T&c)!==0)&&(h[w]=dl(T,r)):A<=r&&(t.expiredLanes|=T),g&=~T}if(r=Le,l=Se,l=gs(t,t===r?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,l===0||t===r&&(Ee===2||Ee===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&yt(c),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Ri(t,l)){if(r=l&-l,r===t.callbackPriority)return r;switch(c!==null&&yt(c),Bc(l)){case 2:case 8:l=Mi;break;case 32:l=ps;break;case 268435456:l=hl;break;default:l=ps}return c=qm.bind(null,t),l=hs(l,c),t.callbackPriority=r,t.callbackNode=l,r}return c!==null&&c!==null&&yt(c),t.callbackPriority=2,t.callbackNode=null,2}function qm(t,r){if(st!==0&&st!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(ro()&&t.callbackNode!==l)return null;var c=Se;return c=gs(t,t===Le?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(xm(t,c,r),Hm(t,Gt()),t.callbackNode!=null&&t.callbackNode===l?qm.bind(null,t):null)}function $m(t,r){if(ro())return null;xm(t,r,!0)}function n1(){h1(function(){(Te&6)!==0?hs(ds,t1):zm()})}function _f(){return Qi===0&&(Qi=ce()),Qi}function Im(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:bl(""+t)}function Vm(t,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,t.id&&l.setAttribute("form",t.id),r.parentNode.insertBefore(l,r),t=new FormData(t),l.parentNode.removeChild(l),t}function i1(t,r,l,c,h){if(r==="submit"&&l&&l.stateNode===h){var g=Im((h[Tt]||null).action),w=c.submitter;w&&(r=(r=w[Tt]||null)?Im(r.formAction):w.getAttribute("formAction"),r!==null&&(g=r,w=null));var T=new xl("action","action",null,c,h);t.push({event:T,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Qi!==0){var A=w?Vm(h,w):new FormData(h);Iu(l,{pending:!0,data:A,method:h.method,action:g},null,A)}}else typeof g=="function"&&(T.preventDefault(),A=w?Vm(h,w):new FormData(h),Iu(l,{pending:!0,data:A,method:h.method,action:g},g,A))},currentTarget:h}]})}}for(var Tf=0;Tf<lu.length;Tf++){var Ef=lu[Tf],s1=Ef.toLowerCase(),r1=Ef[0].toUpperCase()+Ef.slice(1);un(s1,"on"+r1)}un(xp,"onAnimationEnd"),un(_p,"onAnimationIteration"),un(Tp,"onAnimationStart"),un("dblclick","onDoubleClick"),un("focusin","onFocus"),un("focusout","onBlur"),un(xw,"onTransitionRun"),un(_w,"onTransitionStart"),un(Tw,"onTransitionCancel"),un(Ep,"onTransitionEnd"),Ss("onMouseEnter",["mouseout","mouseover"]),Ss("onMouseLeave",["mouseout","mouseover"]),Ss("onPointerEnter",["pointerout","pointerover"]),Ss("onPointerLeave",["pointerout","pointerover"]),ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ya="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(" "),a1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ya));function Gm(t,r){r=(r&4)!==0;for(var l=0;l<t.length;l++){var c=t[l],h=c.event;c=c.listeners;e:{var g=void 0;if(r)for(var w=c.length-1;0<=w;w--){var T=c[w],A=T.instance,D=T.currentTarget;if(T=T.listener,A!==g&&h.isPropagationStopped())break e;g=T,h.currentTarget=D;try{g(h)}catch(K){Pl(K)}h.currentTarget=null,g=A}else for(w=0;w<c.length;w++){if(T=c[w],A=T.instance,D=T.currentTarget,T=T.listener,A!==g&&h.isPropagationStopped())break e;g=T,h.currentTarget=D;try{g(h)}catch(K){Pl(K)}h.currentTarget=null,g=A}}}}function ye(t,r){var l=r[Uc];l===void 0&&(l=r[Uc]=new Set);var c=t+"__bubble";l.has(c)||(Km(r,t,2,!1),l.add(c))}function Af(t,r,l){var c=0;r&&(c|=4),Km(l,t,c,r)}var oo="_reactListening"+Math.random().toString(36).slice(2);function Nf(t){if(!t[oo]){t[oo]=!0,zd.forEach(function(l){l!=="selectionchange"&&(a1.has(l)||Af(l,!1,t),Af(l,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[oo]||(r[oo]=!0,Af("selectionchange",!1,r))}}function Km(t,r,l,c){switch(gy(r)){case 2:var h=R1;break;case 8:h=j1;break;default:h=$f}l=h.bind(null,r,l,t),h=void 0,!Pc||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),c?h!==void 0?t.addEventListener(r,l,{capture:!0,passive:h}):t.addEventListener(r,l,!0):h!==void 0?t.addEventListener(r,l,{passive:h}):t.addEventListener(r,l,!1)}function Cf(t,r,l,c,h){var g=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var T=c.stateNode.containerInfo;if(T===h)break;if(w===4)for(w=c.return;w!==null;){var A=w.tag;if((A===3||A===4)&&w.stateNode.containerInfo===h)return;w=w.return}for(;T!==null;){if(w=ys(T),w===null)return;if(A=w.tag,A===5||A===6||A===26||A===27){c=g=w;continue e}T=T.parentNode}}c=c.return}Jd(function(){var D=g,K=Yc(l),X=[];e:{var B=Ap.get(t);if(B!==void 0){var U=xl,fe=t;switch(t){case"keypress":if(Sl(l)===0)break e;case"keydown":case"keyup":U=ew;break;case"focusin":fe="focus",U=Jc;break;case"focusout":fe="blur",U=Jc;break;case"beforeblur":case"afterblur":U=Jc;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=tp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=IS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=iw;break;case xp:case _p:case Tp:U=KS;break;case Ep:U=rw;break;case"scroll":case"scrollend":U=qS;break;case"wheel":U=lw;break;case"copy":case"cut":case"paste":U=XS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=ip;break;case"toggle":case"beforetoggle":U=cw}var oe=(r&4)!==0,ke=!oe&&(t==="scroll"||t==="scrollend"),O=oe?B!==null?B+"Capture":null:B;oe=[];for(var M=D,j;M!==null;){var Y=M;if(j=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||j===null||O===null||(Y=Br(M,O),Y!=null&&oe.push(ba(M,Y,j))),ke)break;M=M.return}0<oe.length&&(B=new U(B,fe,null,l,K),X.push({event:B,listeners:oe}))}}if((r&7)===0){e:{if(B=t==="mouseover"||t==="pointerover",U=t==="mouseout"||t==="pointerout",B&&l!==Kc&&(fe=l.relatedTarget||l.fromElement)&&(ys(fe)||fe[ms]))break e;if((U||B)&&(B=K.window===K?K:(B=K.ownerDocument)?B.defaultView||B.parentWindow:window,U?(fe=l.relatedTarget||l.toElement,U=D,fe=fe?ys(fe):null,fe!==null&&(ke=o(fe),oe=fe.tag,fe!==ke||oe!==5&&oe!==27&&oe!==6)&&(fe=null)):(U=null,fe=D),U!==fe)){if(oe=tp,Y="onMouseLeave",O="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(oe=ip,Y="onPointerLeave",O="onPointerEnter",M="pointer"),ke=U==null?B:Dr(U),j=fe==null?B:Dr(fe),B=new oe(Y,M+"leave",U,l,K),B.target=ke,B.relatedTarget=j,Y=null,ys(K)===D&&(oe=new oe(O,M+"enter",fe,l,K),oe.target=j,oe.relatedTarget=ke,Y=oe),ke=Y,U&&fe)t:{for(oe=U,O=fe,M=0,j=oe;j;j=Zs(j))M++;for(j=0,Y=O;Y;Y=Zs(Y))j++;for(;0<M-j;)oe=Zs(oe),M--;for(;0<j-M;)O=Zs(O),j--;for(;M--;){if(oe===O||O!==null&&oe===O.alternate)break t;oe=Zs(oe),O=Zs(O)}oe=null}else oe=null;U!==null&&Ym(X,B,U,oe,!1),fe!==null&&ke!==null&&Ym(X,ke,fe,oe,!0)}}e:{if(B=D?Dr(D):window,U=B.nodeName&&B.nodeName.toLowerCase(),U==="select"||U==="input"&&B.type==="file")var ne=fp;else if(cp(B))if(hp)ne=vw;else{ne=yw;var ge=mw}else U=B.nodeName,!U||U.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?D&&Gc(D.elementType)&&(ne=fp):ne=bw;if(ne&&(ne=ne(t,D))){up(X,ne,l,K);break e}ge&&ge(t,B,D),t==="focusout"&&D&&B.type==="number"&&D.memoizedProps.value!=null&&Vc(B,"number",B.value)}switch(ge=D?Dr(D):window,t){case"focusin":(cp(ge)||ge.contentEditable==="true")&&(Ns=ge,su=D,Gr=null);break;case"focusout":Gr=su=Ns=null;break;case"mousedown":ru=!0;break;case"contextmenu":case"mouseup":case"dragend":ru=!1,Sp(X,l,K);break;case"selectionchange":if(ww)break;case"keydown":case"keyup":Sp(X,l,K)}var re;if(eu)e:{switch(t){case"compositionstart":var ue="onCompositionStart";break e;case"compositionend":ue="onCompositionEnd";break e;case"compositionupdate":ue="onCompositionUpdate";break e}ue=void 0}else As?lp(t,l)&&(ue="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(ue="onCompositionStart");ue&&(sp&&l.locale!=="ko"&&(As||ue!=="onCompositionStart"?ue==="onCompositionEnd"&&As&&(re=Wd()):(ei=K,Fc="value"in ei?ei.value:ei.textContent,As=!0)),ge=co(D,ue),0<ge.length&&(ue=new np(ue,t,null,l,K),X.push({event:ue,listeners:ge}),re?ue.data=re:(re=op(l),re!==null&&(ue.data=re)))),(re=fw?hw(t,l):dw(t,l))&&(ue=co(D,"onBeforeInput"),0<ue.length&&(ge=new np("onBeforeInput","beforeinput",null,l,K),X.push({event:ge,listeners:ue}),ge.data=re)),i1(X,t,D,l,K)}Gm(X,r)})}function ba(t,r,l){return{instance:t,listener:r,currentTarget:l}}function co(t,r){for(var l=r+"Capture",c=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=Br(t,l),h!=null&&c.unshift(ba(t,h,g)),h=Br(t,r),h!=null&&c.push(ba(t,h,g))),t.tag===3)return c;t=t.return}return[]}function Zs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Ym(t,r,l,c,h){for(var g=r._reactName,w=[];l!==null&&l!==c;){var T=l,A=T.alternate,D=T.stateNode;if(T=T.tag,A!==null&&A===c)break;T!==5&&T!==26&&T!==27||D===null||(A=D,h?(D=Br(l,g),D!=null&&w.unshift(ba(l,D,A))):h||(D=Br(l,g),D!=null&&w.push(ba(l,D,A)))),l=l.return}w.length!==0&&t.push({event:r,listeners:w})}var l1=/\r\n?/g,o1=/\u0000|\uFFFD/g;function Xm(t){return(typeof t=="string"?t:""+t).replace(l1,`
|
|
50
|
+
`).replace(o1,"")}function Pm(t,r){return r=Xm(r),Xm(t)===r}function uo(){}function Ce(t,r,l,c,h,g){switch(l){case"children":typeof c=="string"?r==="body"||r==="textarea"&&c===""||_s(t,c):(typeof c=="number"||typeof c=="bigint")&&r!=="body"&&_s(t,""+c);break;case"className":gl(t,"class",c);break;case"tabIndex":gl(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":gl(t,l,c);break;case"style":Qd(t,c,g);break;case"data":if(r!=="object"){gl(t,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||l!=="href")){t.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=bl(""+c),t.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){t.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 g=="function"&&(l==="formAction"?(r!=="input"&&Ce(t,r,"name",h.name,h,null),Ce(t,r,"formEncType",h.formEncType,h,null),Ce(t,r,"formMethod",h.formMethod,h,null),Ce(t,r,"formTarget",h.formTarget,h,null)):(Ce(t,r,"encType",h.encType,h,null),Ce(t,r,"method",h.method,h,null),Ce(t,r,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=bl(""+c),t.setAttribute(l,c);break;case"onClick":c!=null&&(t.onclick=uo);break;case"onScroll":c!=null&&ye("scroll",t);break;case"onScrollEnd":c!=null&&ye("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=l}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}l=bl(""+c),t.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":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""+c):t.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":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":c===!0?t.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,c):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(l,c):t.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(l):t.setAttribute(l,c);break;case"popover":ye("beforetoggle",t),ye("toggle",t),pl(t,"popover",c);break;case"xlinkActuate":Cn(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Cn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Cn(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Cn(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Cn(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Cn(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Cn(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":pl(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=zS.get(l)||l,pl(t,l,c))}}function kf(t,r,l,c,h,g){switch(l){case"style":Qd(t,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=l}}break;case"children":typeof c=="string"?_s(t,c):(typeof c=="number"||typeof c=="bigint")&&_s(t,""+c);break;case"onScroll":c!=null&&ye("scroll",t);break;case"onScrollEnd":c!=null&&ye("scrollend",t);break;case"onClick":c!=null&&(t.onclick=uo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hd.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),r=l.slice(2,h?l.length-7:void 0),g=t[Tt]||null,g=g!=null?g[l]:null,typeof g=="function"&&t.removeEventListener(r,g,h),typeof c=="function")){typeof g!="function"&&g!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(r,c,h);break e}l in t?t[l]=c:c===!0?t.setAttribute(l,""):pl(t,l,c)}}}function rt(t,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",t),ye("load",t);var c=!1,h=!1,g;for(g in l)if(l.hasOwnProperty(g)){var w=l[g];if(w!=null)switch(g){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Ce(t,r,g,w,l,null)}}h&&Ce(t,r,"srcSet",l.srcSet,l,null),c&&Ce(t,r,"src",l.src,l,null);return;case"input":ye("invalid",t);var T=g=w=h=null,A=null,D=null;for(c in l)if(l.hasOwnProperty(c)){var K=l[c];if(K!=null)switch(c){case"name":h=K;break;case"type":w=K;break;case"checked":A=K;break;case"defaultChecked":D=K;break;case"value":g=K;break;case"defaultValue":T=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(s(137,r));break;default:Ce(t,r,c,K,l,null)}}Yd(t,g,T,A,D,w,h,!1),ml(t);return;case"select":ye("invalid",t),c=w=g=null;for(h in l)if(l.hasOwnProperty(h)&&(T=l[h],T!=null))switch(h){case"value":g=T;break;case"defaultValue":w=T;break;case"multiple":c=T;default:Ce(t,r,h,T,l,null)}r=g,l=w,t.multiple=!!c,r!=null?xs(t,!!c,r,!1):l!=null&&xs(t,!!c,l,!0);return;case"textarea":ye("invalid",t),g=h=c=null;for(w in l)if(l.hasOwnProperty(w)&&(T=l[w],T!=null))switch(w){case"value":c=T;break;case"defaultValue":h=T;break;case"children":g=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(s(91));break;default:Ce(t,r,w,T,l,null)}Pd(t,c,h,g),ml(t);return;case"option":for(A in l)if(l.hasOwnProperty(A)&&(c=l[A],c!=null))switch(A){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Ce(t,r,A,c,l,null)}return;case"dialog":ye("beforetoggle",t),ye("toggle",t),ye("cancel",t),ye("close",t);break;case"iframe":case"object":ye("load",t);break;case"video":case"audio":for(c=0;c<ya.length;c++)ye(ya[c],t);break;case"image":ye("error",t),ye("load",t);break;case"details":ye("toggle",t);break;case"embed":case"source":case"link":ye("error",t),ye("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in l)if(l.hasOwnProperty(D)&&(c=l[D],c!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Ce(t,r,D,c,l,null)}return;default:if(Gc(r)){for(K in l)l.hasOwnProperty(K)&&(c=l[K],c!==void 0&&kf(t,r,K,c,l,void 0));return}}for(T in l)l.hasOwnProperty(T)&&(c=l[T],c!=null&&Ce(t,r,T,c,l,null))}function c1(t,r,l,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,w=null,T=null,A=null,D=null,K=null;for(U in l){var X=l[U];if(l.hasOwnProperty(U)&&X!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":A=X;default:c.hasOwnProperty(U)||Ce(t,r,U,null,c,X)}}for(var B in c){var U=c[B];if(X=l[B],c.hasOwnProperty(B)&&(U!=null||X!=null))switch(B){case"type":g=U;break;case"name":h=U;break;case"checked":D=U;break;case"defaultChecked":K=U;break;case"value":w=U;break;case"defaultValue":T=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,r));break;default:U!==X&&Ce(t,r,B,U,c,X)}}Ic(t,w,T,A,D,K,g,h);return;case"select":U=w=T=B=null;for(g in l)if(A=l[g],l.hasOwnProperty(g)&&A!=null)switch(g){case"value":break;case"multiple":U=A;default:c.hasOwnProperty(g)||Ce(t,r,g,null,c,A)}for(h in c)if(g=c[h],A=l[h],c.hasOwnProperty(h)&&(g!=null||A!=null))switch(h){case"value":B=g;break;case"defaultValue":T=g;break;case"multiple":w=g;default:g!==A&&Ce(t,r,h,g,c,A)}r=T,l=w,c=U,B!=null?xs(t,!!l,B,!1):!!c!=!!l&&(r!=null?xs(t,!!l,r,!0):xs(t,!!l,l?[]:"",!1));return;case"textarea":U=B=null;for(T in l)if(h=l[T],l.hasOwnProperty(T)&&h!=null&&!c.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Ce(t,r,T,null,c,h)}for(w in c)if(h=c[w],g=l[w],c.hasOwnProperty(w)&&(h!=null||g!=null))switch(w){case"value":B=h;break;case"defaultValue":U=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:h!==g&&Ce(t,r,w,h,c,g)}Xd(t,B,U);return;case"option":for(var fe in l)if(B=l[fe],l.hasOwnProperty(fe)&&B!=null&&!c.hasOwnProperty(fe))switch(fe){case"selected":t.selected=!1;break;default:Ce(t,r,fe,null,c,B)}for(A in c)if(B=c[A],U=l[A],c.hasOwnProperty(A)&&B!==U&&(B!=null||U!=null))switch(A){case"selected":t.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:Ce(t,r,A,B,c,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 oe in l)B=l[oe],l.hasOwnProperty(oe)&&B!=null&&!c.hasOwnProperty(oe)&&Ce(t,r,oe,null,c,B);for(D in c)if(B=c[D],U=l[D],c.hasOwnProperty(D)&&B!==U&&(B!=null||U!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,r));break;default:Ce(t,r,D,B,c,U)}return;default:if(Gc(r)){for(var ke in l)B=l[ke],l.hasOwnProperty(ke)&&B!==void 0&&!c.hasOwnProperty(ke)&&kf(t,r,ke,void 0,c,B);for(K in c)B=c[K],U=l[K],!c.hasOwnProperty(K)||B===U||B===void 0&&U===void 0||kf(t,r,K,B,c,U);return}}for(var O in l)B=l[O],l.hasOwnProperty(O)&&B!=null&&!c.hasOwnProperty(O)&&Ce(t,r,O,null,c,B);for(X in c)B=c[X],U=l[X],!c.hasOwnProperty(X)||B===U||B==null&&U==null||Ce(t,r,X,B,c,U)}var Mf=null,Of=null;function fo(t){return t.nodeType===9?t:t.ownerDocument}function Fm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Qm(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function Lf(t,r){return t==="textarea"||t==="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 Rf=null;function u1(){var t=window.event;return t&&t.type==="popstate"?t===Rf?!1:(Rf=t,!0):(Rf=null,!1)}var Zm=typeof setTimeout=="function"?setTimeout:void 0,f1=typeof clearTimeout=="function"?clearTimeout:void 0,Jm=typeof Promise=="function"?Promise:void 0,h1=typeof queueMicrotask=="function"?queueMicrotask:typeof Jm<"u"?function(t){return Jm.resolve(null).then(t).catch(d1)}:Zm;function d1(t){setTimeout(function(){throw t})}function mi(t){return t==="head"}function Wm(t,r){var l=r,c=0,h=0;do{var g=l.nextSibling;if(t.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(0<c&&8>c){l=c;var w=t.ownerDocument;if(l&1&&va(w.documentElement),l&2&&va(w.body),l&4)for(l=w.head,va(l),w=l.firstChild;w;){var T=w.nextSibling,A=w.nodeName;w[jr]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&w.rel.toLowerCase()==="stylesheet"||l.removeChild(w),w=T}}if(h===0){t.removeChild(g),Na(r);return}h--}else l==="$"||l==="$?"||l==="$!"?h++:c=l.charCodeAt(0)-48;else c=0;l=g}while(l);Na(r)}function jf(t){var r=t.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":jf(l),zc(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function p1(t,r,l,c){for(;t.nodeType===1;){var h=l;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[jr])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=hn(t.nextSibling),t===null)break}return null}function g1(t,r,l){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=hn(t.nextSibling),t===null))return null;return t}function Df(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function m1(t,r){var l=t.ownerDocument;if(t.data!=="$?"||l.readyState==="complete")r();else{var c=function(){r(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function hn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return t}var Bf=null;function ey(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"){if(r===0)return t;r--}else l==="/$"&&r++}t=t.previousSibling}return null}function ty(t,r,l){switch(r=fo(l),t){case"html":if(t=r.documentElement,!t)throw Error(s(452));return t;case"head":if(t=r.head,!t)throw Error(s(453));return t;case"body":if(t=r.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function va(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);zc(t)}var en=new Map,ny=new Set;function ho(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var In=Q.d;Q.d={f:y1,r:b1,D:v1,C:S1,L:w1,m:x1,X:T1,S:_1,M:E1};function y1(){var t=In.f(),r=io();return t||r}function b1(t){var r=bs(t);r!==null&&r.tag===5&&r.type==="form"?xg(r):In.r(t)}var Js=typeof document>"u"?null:document;function iy(t,r,l){var c=Js;if(c&&typeof r=="string"&&r){var h=Xt(r);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),ny.has(h)||(ny.add(h),t={rel:t,crossOrigin:l,href:r},c.querySelector(h)===null&&(r=c.createElement("link"),rt(r,"link",t),We(r),c.head.appendChild(r)))}}function v1(t){In.D(t),iy("dns-prefetch",t,null)}function S1(t,r){In.C(t,r),iy("preconnect",t,r)}function w1(t,r,l){In.L(t,r,l);var c=Js;if(c&&t&&r){var h='link[rel="preload"][as="'+Xt(r)+'"]';r==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+Xt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+Xt(l.imageSizes)+'"]')):h+='[href="'+Xt(t)+'"]';var g=h;switch(r){case"style":g=Ws(t);break;case"script":g=er(t)}en.has(g)||(t=m({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:t,as:r},l),en.set(g,t),c.querySelector(h)!==null||r==="style"&&c.querySelector(Sa(g))||r==="script"&&c.querySelector(wa(g))||(r=c.createElement("link"),rt(r,"link",t),We(r),c.head.appendChild(r)))}}function x1(t,r){In.m(t,r);var l=Js;if(l&&t){var c=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Xt(c)+'"][href="'+Xt(t)+'"]',g=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=er(t)}if(!en.has(g)&&(t=m({rel:"modulepreload",href:t},r),en.set(g,t),l.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(wa(g)))return}c=l.createElement("link"),rt(c,"link",t),We(c),l.head.appendChild(c)}}}function _1(t,r,l){In.S(t,r,l);var c=Js;if(c&&t){var h=vs(c).hoistableStyles,g=Ws(t);r=r||"default";var w=h.get(g);if(!w){var T={loading:0,preload:null};if(w=c.querySelector(Sa(g)))T.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":r},l),(l=en.get(g))&&Uf(t,l);var A=w=c.createElement("link");We(A),rt(A,"link",t),A._p=new Promise(function(D,K){A.onload=D,A.onerror=K}),A.addEventListener("load",function(){T.loading|=1}),A.addEventListener("error",function(){T.loading|=2}),T.loading|=4,po(w,r,c)}w={type:"stylesheet",instance:w,count:1,state:T},h.set(g,w)}}}function T1(t,r){In.X(t,r);var l=Js;if(l&&t){var c=vs(l).hoistableScripts,h=er(t),g=c.get(h);g||(g=l.querySelector(wa(h)),g||(t=m({src:t,async:!0},r),(r=en.get(h))&&zf(t,r),g=l.createElement("script"),We(g),rt(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function E1(t,r){In.M(t,r);var l=Js;if(l&&t){var c=vs(l).hoistableScripts,h=er(t),g=c.get(h);g||(g=l.querySelector(wa(h)),g||(t=m({src:t,async:!0,type:"module"},r),(r=en.get(h))&&zf(t,r),g=l.createElement("script"),We(g),rt(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function sy(t,r,l,c){var h=(h=te.current)?ho(h):null;if(!h)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=Ws(l.href),l=vs(h).hoistableStyles,c=l.get(r),c||(c={type:"style",instance:null,count:0,state:null},l.set(r,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Ws(l.href);var g=vs(h).hoistableStyles,w=g.get(t);if(w||(h=h.ownerDocument||h,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,w),(g=h.querySelector(Sa(t)))&&!g._p&&(w.instance=g,w.state.loading=5),en.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},en.set(t,l),g||A1(h,t,l,w.state))),r&&c===null)throw Error(s(528,""));return w}if(r&&c!==null)throw Error(s(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=er(l),l=vs(h).hoistableScripts,c=l.get(r),c||(c={type:"script",instance:null,count:0,state:null},l.set(r,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Ws(t){return'href="'+Xt(t)+'"'}function Sa(t){return'link[rel="stylesheet"]['+t+"]"}function ry(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function A1(t,r,l,c){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?c.loading=1:(r=t.createElement("link"),c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2}),rt(r,"link",l),We(r),t.head.appendChild(r))}function er(t){return'[src="'+Xt(t)+'"]'}function wa(t){return"script[async]"+t}function ay(t,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var c=t.querySelector('style[data-href~="'+Xt(l.href)+'"]');if(c)return r.instance=c,We(c),c;var h=m({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),We(c),rt(c,"style",h),po(c,l.precedence,t),r.instance=c;case"stylesheet":h=Ws(l.href);var g=t.querySelector(Sa(h));if(g)return r.state.loading|=4,r.instance=g,We(g),g;c=ry(l),(h=en.get(h))&&Uf(c,h),g=(t.ownerDocument||t).createElement("link"),We(g);var w=g;return w._p=new Promise(function(T,A){w.onload=T,w.onerror=A}),rt(g,"link",c),r.state.loading|=4,po(g,l.precedence,t),r.instance=g;case"script":return g=er(l.src),(h=t.querySelector(wa(g)))?(r.instance=h,We(h),h):(c=l,(h=en.get(g))&&(c=m({},l),zf(c,h)),t=t.ownerDocument||t,h=t.createElement("script"),We(h),rt(h,"link",c),t.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,po(c,l.precedence,t));return r.instance}function po(t,r,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,g=h,w=0;w<c.length;w++){var T=c[w];if(T.dataset.precedence===r)g=T;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(t,r.firstChild))}function Uf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function zf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var go=null;function ly(t,r,l){if(go===null){var c=new Map,h=go=new Map;h.set(l,c)}else h=go,c=h.get(l),c||(c=new Map,h.set(l,c));if(c.has(t))return c;for(c.set(t,null),l=l.getElementsByTagName(t),h=0;h<l.length;h++){var g=l[h];if(!(g[jr]||g[ft]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var w=g.getAttribute(r)||"";w=t+w;var T=c.get(w);T?T.push(g):c.set(w,[g])}}return c}function oy(t,r,l){t=t.ownerDocument||t,t.head.insertBefore(l,r==="title"?t.querySelector("head > title"):null)}function N1(t,r,l){if(l===1||r.itemProp!=null)return!1;switch(t){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 t=r.disabled,typeof r.precedence=="string"&&t==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 cy(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var xa=null;function C1(){}function k1(t,r,l){if(xa===null)throw Error(s(475));var c=xa;if(r.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var h=Ws(l.href),g=t.querySelector(Sa(h));if(g){t=g._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(c.count++,c=mo.bind(c),t.then(c,c)),r.state.loading|=4,r.instance=g,We(g);return}g=t.ownerDocument||t,l=ry(l),(h=en.get(h))&&Uf(l,h),g=g.createElement("link"),We(g);var w=g;w._p=new Promise(function(T,A){w.onload=T,w.onerror=A}),rt(g,"link",l),r.instance=g}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(c.count++,r=mo.bind(c),t.addEventListener("load",r),t.addEventListener("error",r))}}function M1(){if(xa===null)throw Error(s(475));var t=xa;return t.stylesheets&&t.count===0&&Hf(t,t.stylesheets),0<t.count?function(r){var l=setTimeout(function(){if(t.stylesheets&&Hf(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(l)}}:null}function mo(){if(this.count--,this.count===0){if(this.stylesheets)Hf(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var yo=null;function Hf(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,yo=new Map,r.forEach(O1,t),yo=null,mo.call(t))}function O1(t,r){if(!(r.state.loading&4)){var l=yo.get(t);if(l)var c=l.get(null);else{l=new Map,yo.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var w=h[g];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(l.set(w.dataset.precedence,w),c=w)}c&&l.set(null,c)}h=r.instance,w=h.getAttribute("data-precedence"),g=l.get(w)||c,g===c&&l.set(null,h),l.set(w,h),this.count++,c=mo.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),g?g.parentNode.insertBefore(h,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),r.state.loading|=4}}var _a={$$typeof:$,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function L1(t,r,l,c,h,g,w,T){this.tag=1,this.containerInfo=t,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=cn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cn(0),this.hiddenUpdates=cn(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function uy(t,r,l,c,h,g,w,T,A,D,K,X){return t=new L1(t,r,l,w,T,A,D,X),r=1,g===!0&&(r|=24),g=Bt(3,null,null,r),t.current=g,g.stateNode=t,r=vu(),r.refCount++,t.pooledCache=r,r.refCount++,g.memoizedState={element:c,isDehydrated:l,cache:r},_u(g),t}function fy(t){return t?(t=Os,t):Os}function hy(t,r,l,c,h,g){h=fy(h),c.context===null?c.context=h:c.pendingContext=h,c=ii(r),c.payload={element:l},g=g===void 0?null:g,g!==null&&(c.callback=g),l=si(t,c,r),l!==null&&($t(l,t,r),Wr(l,t,r))}function dy(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<r?l:r}}function qf(t,r){dy(t,r),(t=t.alternate)&&dy(t,r)}function py(t){if(t.tag===13){var r=Ms(t,67108864);r!==null&&$t(r,t,67108864),qf(t,67108864)}}var bo=!0;function R1(t,r,l,c){var h=H.T;H.T=null;var g=Q.p;try{Q.p=2,$f(t,r,l,c)}finally{Q.p=g,H.T=h}}function j1(t,r,l,c){var h=H.T;H.T=null;var g=Q.p;try{Q.p=8,$f(t,r,l,c)}finally{Q.p=g,H.T=h}}function $f(t,r,l,c){if(bo){var h=If(c);if(h===null)Cf(t,r,c,vo,l),my(t,c);else if(B1(h,t,r,l,c))c.stopPropagation();else if(my(t,c),r&4&&-1<D1.indexOf(t)){for(;h!==null;){var g=bs(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var w=Nn(g.pendingLanes);if(w!==0){var T=g;for(T.pendingLanes|=2,T.entangledLanes|=2;w;){var A=1<<31-bt(w);T.entanglements[1]|=A,w&=~A}Sn(g),(Te&6)===0&&(to=Gt()+500,ma(0))}}break;case 13:T=Ms(g,2),T!==null&&$t(T,g,2),io(),qf(g,2)}if(g=If(c),g===null&&Cf(t,r,c,vo,l),g===h)break;h=g}h!==null&&c.stopPropagation()}else Cf(t,r,c,null,l)}}function If(t){return t=Yc(t),Vf(t)}var vo=null;function Vf(t){if(vo=null,t=ys(t),t!==null){var r=o(t);if(r===null)t=null;else{var l=r.tag;if(l===13){if(t=u(r),t!==null)return t;t=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return vo=t,null}function gy(t){switch(t){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(Lr()){case ds:return 2;case Mi:return 8;case ps:case Qn:return 32;case hl:return 268435456;default:return 32}default:return 32}}var Gf=!1,yi=null,bi=null,vi=null,Ta=new Map,Ea=new Map,Si=[],D1="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 my(t,r){switch(t){case"focusin":case"focusout":yi=null;break;case"dragenter":case"dragleave":bi=null;break;case"mouseover":case"mouseout":vi=null;break;case"pointerover":case"pointerout":Ta.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ea.delete(r.pointerId)}}function Aa(t,r,l,c,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:r,domEventName:l,eventSystemFlags:c,nativeEvent:g,targetContainers:[h]},r!==null&&(r=bs(r),r!==null&&py(r)),t):(t.eventSystemFlags|=c,r=t.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),t)}function B1(t,r,l,c,h){switch(r){case"focusin":return yi=Aa(yi,t,r,l,c,h),!0;case"dragenter":return bi=Aa(bi,t,r,l,c,h),!0;case"mouseover":return vi=Aa(vi,t,r,l,c,h),!0;case"pointerover":var g=h.pointerId;return Ta.set(g,Aa(Ta.get(g)||null,t,r,l,c,h)),!0;case"gotpointercapture":return g=h.pointerId,Ea.set(g,Aa(Ea.get(g)||null,t,r,l,c,h)),!0}return!1}function yy(t){var r=ys(t.target);if(r!==null){var l=o(r);if(l!==null){if(r=l.tag,r===13){if(r=u(l),r!==null){t.blockedOn=r,kS(t.priority,function(){if(l.tag===13){var c=qt();c=Dc(c);var h=Ms(l,c);h!==null&&$t(h,l,c),qf(l,c)}});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function So(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var l=If(t.nativeEvent);if(l===null){l=t.nativeEvent;var c=new l.constructor(l.type,l);Kc=c,l.target.dispatchEvent(c),Kc=null}else return r=bs(l),r!==null&&py(r),t.blockedOn=l,!1;r.shift()}return!0}function by(t,r,l){So(t)&&l.delete(r)}function U1(){Gf=!1,yi!==null&&So(yi)&&(yi=null),bi!==null&&So(bi)&&(bi=null),vi!==null&&So(vi)&&(vi=null),Ta.forEach(by),Ea.forEach(by)}function wo(t,r){t.blockedOn===r&&(t.blockedOn=null,Gf||(Gf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,U1)))}var xo=null;function vy(t){xo!==t&&(xo=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){xo===t&&(xo=null);for(var r=0;r<t.length;r+=3){var l=t[r],c=t[r+1],h=t[r+2];if(typeof c!="function"){if(Vf(c||l)===null)continue;break}var g=bs(l);g!==null&&(t.splice(r,3),r-=3,Iu(g,{pending:!0,data:h,method:l.method,action:c},c,h))}}))}function Na(t){function r(A){return wo(A,t)}yi!==null&&wo(yi,t),bi!==null&&wo(bi,t),vi!==null&&wo(vi,t),Ta.forEach(r),Ea.forEach(r);for(var l=0;l<Si.length;l++){var c=Si[l];c.blockedOn===t&&(c.blockedOn=null)}for(;0<Si.length&&(l=Si[0],l.blockedOn===null);)yy(l),l.blockedOn===null&&Si.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var h=l[c],g=l[c+1],w=h[Tt]||null;if(typeof g=="function")w||vy(l);else if(w){var T=null;if(g&&g.hasAttribute("formAction")){if(h=g,w=g[Tt]||null)T=w.formAction;else if(Vf(h)!==null)continue}else T=w.action;typeof T=="function"?l[c+1]=T:(l.splice(c,3),c-=3),vy(l)}}}function Kf(t){this._internalRoot=t}_o.prototype.render=Kf.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(s(409));var l=r.current,c=qt();hy(l,c,t,r,null,null)},_o.prototype.unmount=Kf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;hy(t.current,2,null,t,null,null),io(),r[ms]=null}};function _o(t){this._internalRoot=t}_o.prototype.unstable_scheduleHydration=function(t){if(t){var r=Bd();t={blockedOn:null,target:t,priority:r};for(var l=0;l<Si.length&&r!==0&&r<Si[l].priority;l++);Si.splice(l,0,t),l===0&&yy(t)}};var Sy=e.version;if(Sy!=="19.1.1")throw Error(s(527,Sy,"19.1.1"));Q.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=d(r),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var z1={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var To=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!To.isDisabled&&To.supportsFiber)try{Oi=To.inject(z1),ut=To}catch{}}return Ma.createRoot=function(t,r){if(!a(t))throw Error(s(299));var l=!1,c="",h=Bg,g=Ug,w=zg,T=null;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(g=r.onCaughtError),r.onRecoverableError!==void 0&&(w=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(T=r.unstable_transitionCallbacks)),r=uy(t,1,!1,null,null,l,c,h,g,w,T,null),t[ms]=r.current,Nf(t),new Kf(r)},Ma.hydrateRoot=function(t,r,l){if(!a(t))throw Error(s(299));var c=!1,h="",g=Bg,w=Ug,T=zg,A=null,D=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(w=l.onCaughtError),l.onRecoverableError!==void 0&&(T=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(A=l.unstable_transitionCallbacks),l.formState!==void 0&&(D=l.formState)),r=uy(t,1,!0,r,l??null,c,h,g,w,T,A,D),r.context=fy(null),l=r.current,c=qt(),c=Dc(c),h=ii(c),h.callback=null,si(l,h,c),l=c,r.current.lanes=l,Rr(r,l),Sn(r),t[ms]=r.current,Nf(t),new _o(r)},Ma.version="19.1.1",Ma}var Ly;function rx(){if(Ly)return Pf.exports;Ly=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Pf.exports=sx(),Pf.exports}var y2=rx();const qh=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 Bb(n,e){var i;return(i=ax(n,e))==null?void 0:i.replaceAll(`
|
|
51
|
+
`,"\\n")}function ax(n,e){if(n)for(const i of e.split("|")){if(i==="url")try{const a=new URL(n[i]);return a.protocol==="data:"?a.protocol:a.protocol==="about:"?n[i]:a.pathname+a.search}catch{if(n[i]!==void 0)return n[i]}if(i==="timeNumber"&&n[i]!==void 0)return new Date(n[i]).toString();const s=lx(n,i);if(s!==void 0)return s}}function lx(n,e){const i=e.split(".");let s=n;for(const a of i){if(typeof s!="object"||s===null)return;s=s[a]}if(s!==void 0)return String(s)}function ox(n){var i;return(n.title??((i=qh.get(n.type+"."+n.method))==null?void 0:i.title)??n.method).replace(/\{([^}]+)\}/g,(s,a)=>Bb(n.params,a)??s)}function cx(n){var e;return(e=qh.get(n.type+"."+n.method))==null?void 0:e.group}const za=Symbol("context"),Ub=Symbol("nextInContext"),zb=Symbol("prevByEndTime"),Hb=Symbol("nextByStartTime"),Ry=Symbol("events");class b2{constructor(e,i){var a;i.forEach(o=>ux(o));const s=i.find(o=>o.origin==="library");this.traceUri=e,this.browserName=(s==null?void 0:s.browserName)||"",this.sdkLanguage=s==null?void 0:s.sdkLanguage,this.channel=s==null?void 0:s.channel,this.testIdAttributeName=s==null?void 0:s.testIdAttributeName,this.platform=(s==null?void 0:s.platform)||"",this.playwrightVersion=(a=i.find(o=>o.playwrightVersion))==null?void 0:a.playwrightVersion,this.title=(s==null?void 0:s.title)||"",this.options=(s==null?void 0:s.options)||{},this.actions=fx(i),this.pages=[].concat(...i.map(o=>o.pages)),this.wallTime=i.map(o=>o.wallTime).reduce((o,u)=>Math.min(o||Number.MAX_VALUE,u),Number.MAX_VALUE),this.startTime=i.map(o=>o.startTime).reduce((o,u)=>Math.min(o,u),Number.MAX_VALUE),this.endTime=i.map(o=>o.endTime).reduce((o,u)=>Math.max(o,u),Number.MIN_VALUE),this.events=[].concat(...i.map(o=>o.events)),this.stdio=[].concat(...i.map(o=>o.stdio)),this.errors=[].concat(...i.map(o=>o.errors)),this.hasSource=i.some(o=>o.hasSource),this.hasStepData=i.some(o=>o.origin==="testRunner"),this.resources=[...i.map(o=>o.resources)].flat(),this.attachments=this.actions.flatMap(o=>{var u;return((u=o.attachments)==null?void 0:u.map(f=>({...f,callId:o.callId,traceUri:e})))??[]}),this.visibleAttachments=this.attachments.filter(o=>!o.name.startsWith("_")),this.events.sort((o,u)=>o.time-u.time),this.resources.sort((o,u)=>o._monotonicTime-u._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=bx(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const o of this.actions)o.group=o.group??cx({type:o.class,method:o.method}),o.group&&this.actionCounters.set(o.group,1+(this.actionCounters.get(o.group)||0))}createRelativeUrl(e){const i=new URL("http://localhost/"+e);return i.searchParams.set("trace",this.traceUri),i.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const i=new Set(e);return this.actions.filter(s=>!s.group||i.has(s.group))}renderActionTree(e){const i=this.filteredActions(e??[]),{rootItem:s}=qb(i),a=[],o=(u,f)=>{const d=ox({...u.action,type:u.action.class});a.push(`${f}${d||u.id}`);for(const p of u.children)o(p,f+" ")};return s.children.forEach(u=>o(u,"")),a}_errorDescriptorsFromActions(){var i;const e=[];for(const s of this.actions||[])(i=s.error)!=null&&i.message&&e.push({action:s,stack:s.stack,message:s.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,i)=>({stack:e.stack,message:e.message}))}}function ux(n){for(const i of n.pages)i[za]=n;for(let i=0;i<n.actions.length;++i){const s=n.actions[i];s[za]=n}let e;for(let i=n.actions.length-1;i>=0;i--){const s=n.actions[i];s[Ub]=e,s.class!=="Route"&&(e=s)}for(const i of n.events)i[za]=n;for(const i of n.resources)i[za]=n}function fx(n){const e=[],i=hx(n);e.push(...i),e.sort((s,a)=>a.parentId===s.callId?1:s.parentId===a.callId?-1:s.endTime-a.endTime);for(let s=1;s<e.length;++s)e[s][zb]=e[s-1];e.sort((s,a)=>a.parentId===s.callId?-1:s.parentId===a.callId?1:s.startTime-a.startTime);for(let s=0;s+1<e.length;++s)e[s][Hb]=e[s+1];return e}let jy=0;function hx(n){const e=new Map,i=n.filter(u=>u.origin==="library"),s=n.filter(u=>u.origin==="testRunner");if(!s.length||!i.length)return n.map(u=>u.actions.map(f=>({...f,context:u}))).flat();for(const u of i)for(const f of u.actions)e.set(f.stepId||`tmp-step@${++jy}`,{...f,context:u});const a=px(s,e);a&&dx(i,a);const o=new Map;for(const u of s)for(const f of u.actions){const d=f.stepId&&e.get(f.stepId);if(d){o.set(f.callId,d.callId),f.error&&(d.error=f.error),f.attachments&&(d.attachments=f.attachments),f.annotations&&(d.annotations=f.annotations),f.parentId&&(d.parentId=o.get(f.parentId)??f.parentId),f.group&&(d.group=f.group),d.startTime=f.startTime,d.endTime=f.endTime;continue}f.parentId&&(f.parentId=o.get(f.parentId)??f.parentId),e.set(f.stepId||`tmp-step@${++jy}`,{...f,context:u})}return[...e.values()]}function dx(n,e){for(const i of n){i.startTime+=e,i.endTime+=e;for(const s of i.actions)s.startTime&&(s.startTime+=e),s.endTime&&(s.endTime+=e);for(const s of i.events)s.time+=e;for(const s of i.stdio)s.timestamp+=e;for(const s of i.pages)for(const a of s.screencastFrames)a.timestamp+=e;for(const s of i.resources)s._monotonicTime&&(s._monotonicTime+=e)}}function px(n,e){for(const i of n)for(const s of i.actions){if(!s.startTime)continue;const a=s.stepId?e.get(s.stepId):void 0;if(a)return s.startTime-a.startTime}return 0}function qb(n){const e=new Map;for(const a of n)e.set(a.callId,{id:a.callId,parent:void 0,children:[],action:a});const i={action:{...vx},id:"",parent:void 0,children:[]};for(const a of e.values()){i.action.startTime=Math.min(i.action.startTime,a.action.startTime),i.action.endTime=Math.max(i.action.endTime,a.action.endTime);const o=a.action.parentId&&e.get(a.action.parentId)||i;o.children.push(a),a.parent=o}const s=a=>{for(const o of a.children)o.action.stack=o.action.stack??a.action.stack,s(o)};return s(i),{rootItem:i,itemMap:e}}function $b(n){return n[za]}function gx(n){return n[Ub]}function Dy(n){return n[zb]}function By(n){return n[Hb]}function mx(n){let e=0,i=0;for(const s of yx(n)){if(s.type==="console"){const a=s.messageType;a==="warning"?++i:a==="error"&&++e}s.type==="event"&&s.method==="pageError"&&++e}return{errors:e,warnings:i}}function yx(n){let e=n[Ry];if(e)return e;const i=gx(n);return e=$b(n).events.filter(s=>s.time>=n.startTime&&(!i||s.time<i.startTime)),n[Ry]=e,e}function bx(n,e){var s;const i=new Map;for(const a of n)for(const o of a.stack||[]){let u=i.get(o.file);u||(u={errors:[],content:void 0},i.set(o.file,u))}for(const a of e){const{action:o,stack:u,message:f}=a;!o||!u||(s=i.get(u[0].file))==null||s.errors.push({line:u[0].line||0,message:f})}return i}const vx={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:""}},Sx=50,Qo=({sidebarSize:n,sidebarHidden:e=!1,sidebarIsFirst:i=!1,orientation:s="vertical",minSidebarSize:a=Sx,settingName:o,sidebar:u,main:f})=>{const d=Math.max(a,n)*window.devicePixelRatio,[p,m]=sn(o?o+"."+s+":size":void 0,d),[y,v]=sn(o?o+"."+s+":size":void 0,d),[b,E]=z.useState(null),[x,_]=os();let N;s==="vertical"?(N=y/window.devicePixelRatio,x&&x.height<N&&(N=x.height-10)):(N=p/window.devicePixelRatio,x&&x.width<N&&(N=x.width-10)),document.body.style.userSelect=b?"none":"inherit";let k={};return s==="vertical"?i?k={top:b?0:N-4,bottom:b?0:void 0,height:b?"initial":8}:k={bottom:b?0:N-4,top:b?0:void 0,height:b?"initial":8}:i?k={left:b?0:N-4,right:b?0:void 0,width:b?"initial":8}:k={right:b?0:N-4,left:b?0:void 0,width:b?"initial":8},S.jsxs("div",{className:Ke("split-view",s,i&&"sidebar-first"),ref:_,children:[S.jsx("div",{className:"split-view-main",children:f}),!e&&S.jsx("div",{style:{flexBasis:N},className:"split-view-sidebar",children:u}),!e&&S.jsx("div",{style:k,className:"split-view-resizer",onMouseDown:$=>E({offset:s==="vertical"?$.clientY:$.clientX,size:N}),onMouseUp:()=>E(null),onMouseMove:$=>{if(!$.buttons)E(null);else if(b){const L=(s==="vertical"?$.clientY:$.clientX)-b.offset,G=i?b.size+L:b.size-L,q=$.target.parentElement.getBoundingClientRect(),R=Math.min(Math.max(a,G),(s==="vertical"?q.height:q.width)-a);s==="vertical"?v(R*window.devicePixelRatio):m(R*window.devicePixelRatio)}}})]})},Fe=function(n,e,i){return n>=e&&n<=i};function kt(n){return Fe(n,48,57)}function Uy(n){return kt(n)||Fe(n,65,70)||Fe(n,97,102)}function wx(n){return Fe(n,65,90)}function xx(n){return Fe(n,97,122)}function _x(n){return wx(n)||xx(n)}function Tx(n){return n>=128}function Do(n){return _x(n)||Tx(n)||n===95}function zy(n){return Do(n)||kt(n)||n===45}function Ex(n){return Fe(n,0,8)||n===11||Fe(n,14,31)||n===127}function Bo(n){return n===10}function Vn(n){return Bo(n)||n===9||n===32}const Ax=1114111;class $h extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function Nx(n){const e=[];for(let i=0;i<n.length;i++){let s=n.charCodeAt(i);if(s===13&&n.charCodeAt(i+1)===10&&(s=10,i++),(s===13||s===12)&&(s=10),s===0&&(s=65533),Fe(s,55296,56319)&&Fe(n.charCodeAt(i+1),56320,57343)){const a=s-55296,o=n.charCodeAt(i+1)-56320;s=Math.pow(2,16)+a*Math.pow(2,10)+o,i++}e.push(s)}return e}function Je(n){if(n<=65535)return String.fromCharCode(n);n-=Math.pow(2,16);const e=Math.floor(n/Math.pow(2,10))+55296,i=n%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(i)}function Ib(n){const e=Nx(n);let i=-1;const s=[];let a;const o=function(I){return I>=e.length?-1:e[I]},u=function(I){if(I===void 0&&(I=1),I>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(i+I)},f=function(I){return I===void 0&&(I=1),i+=I,a=o(i),!0},d=function(){return i-=1,!0},p=function(I){return I===void 0&&(I=a),I===-1},m=function(){if(y(),f(),Vn(a)){for(;Vn(u());)f();return new Zo}else{if(a===34)return E();if(a===35)if(zy(u())||N(u(1),u(2))){const I=new t0("");return $(u(1),u(2),u(3))&&(I.type="id"),I.value=Z(),I}else return new at(a);else return a===36?u()===61?(f(),new Ox):new at(a):a===39?E():a===40?new Jb:a===41?new Ih:a===42?u()===61?(f(),new Lx):new at(a):a===43?G()?(d(),v()):new at(a):a===44?new Pb:a===45?G()?(d(),v()):u(1)===45&&u(2)===62?(f(2),new Kb):V()?(d(),b()):new at(a):a===46?G()?(d(),v()):new at(a):a===58?new Yb:a===59?new Xb:a===60?u(1)===33&&u(2)===45&&u(3)===45?(f(3),new Gb):new at(a):a===64?$(u(1),u(2),u(3))?new e0(Z()):new at(a):a===91?new Zb:a===92?k()?(d(),b()):new at(a):a===93?new Sh:a===94?u()===61?(f(),new Mx):new at(a):a===123?new Fb:a===124?u()===61?(f(),new kx):u()===124?(f(),new Wb):new at(a):a===125?new Qb:a===126?u()===61?(f(),new Cx):new at(a):kt(a)?(d(),v()):Do(a)?(d(),b()):p()?new zo:new at(a)}},y=function(){for(;u(1)===47&&u(2)===42;)for(f(2);;)if(f(),a===42&&u()===47){f();break}else if(p())return},v=function(){const I=q();if($(u(1),u(2),u(3))){const F=new Rx;return F.value=I.value,F.repr=I.repr,F.type=I.type,F.unit=Z(),F}else if(u()===37){f();const F=new s0;return F.value=I.value,F.repr=I.repr,F}else{const F=new i0;return F.value=I.value,F.repr=I.repr,F.type=I.type,F}},b=function(){const I=Z();if(I.toLowerCase()==="url"&&u()===40){for(f();Vn(u(1))&&Vn(u(2));)f();return u()===34||u()===39?new Ga(I):Vn(u())&&(u(2)===34||u(2)===39)?new Ga(I):x()}else return u()===40?(f(),new Ga(I)):new Vh(I)},E=function(I){I===void 0&&(I=a);let F="";for(;f();){if(a===I||p())return new Gh(F);if(Bo(a))return d(),new Vb;a===92?p(u())||(Bo(u())?f():F+=Je(_())):F+=Je(a)}throw new Error("Internal error")},x=function(){const I=new n0("");for(;Vn(u());)f();if(p(u()))return I;for(;f();){if(a===41||p())return I;if(Vn(a)){for(;Vn(u());)f();return u()===41||p(u())?(f(),I):(ie(),new Uo)}else{if(a===34||a===39||a===40||Ex(a))return ie(),new Uo;if(a===92)if(k())I.value+=Je(_());else return ie(),new Uo;else I.value+=Je(a)}}throw new Error("Internal error")},_=function(){if(f(),Uy(a)){const I=[a];for(let ee=0;ee<5&&Uy(u());ee++)f(),I.push(a);Vn(u())&&f();let F=parseInt(I.map(function(ee){return String.fromCharCode(ee)}).join(""),16);return F>Ax&&(F=65533),F}else return p()?65533:a},N=function(I,F){return!(I!==92||Bo(F))},k=function(){return N(a,u())},$=function(I,F,ee){return I===45?Do(F)||F===45||N(F,ee):Do(I)?!0:I===92?N(I,F):!1},V=function(){return $(a,u(1),u(2))},L=function(I,F,ee){return I===43||I===45?!!(kt(F)||F===46&&kt(ee)):I===46?!!kt(F):!!kt(I)},G=function(){return L(a,u(1),u(2))},Z=function(){let I="";for(;f();)if(zy(a))I+=Je(a);else if(k())I+=Je(_());else return d(),I;throw new Error("Internal parse error")},q=function(){let I="",F="integer";for((u()===43||u()===45)&&(f(),I+=Je(a));kt(u());)f(),I+=Je(a);if(u(1)===46&&kt(u(2)))for(f(),I+=Je(a),f(),I+=Je(a),F="number";kt(u());)f(),I+=Je(a);const ee=u(1),ve=u(2),H=u(3);if((ee===69||ee===101)&&kt(ve))for(f(),I+=Je(a),f(),I+=Je(a),F="number";kt(u());)f(),I+=Je(a);else if((ee===69||ee===101)&&(ve===43||ve===45)&&kt(H))for(f(),I+=Je(a),f(),I+=Je(a),f(),I+=Je(a),F="number";kt(u());)f(),I+=Je(a);const Q=R(I);return{type:F,value:Q,repr:I}},R=function(I){return+I},ie=function(){for(;f();){if(a===41||p())return;k()&&_()}};let le=0;for(;!p(u());)if(s.push(m()),le++,le>e.length*2)throw new Error("I'm infinite-looping!");return s}class Ye{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class Vb extends Ye{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Uo extends Ye{constructor(){super(...arguments),this.tokenType="BADURL"}}class Zo extends Ye{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class Gb extends Ye{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class Kb extends Ye{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class Yb extends Ye{constructor(){super(...arguments),this.tokenType=":"}}class Xb extends Ye{constructor(){super(...arguments),this.tokenType=";"}}class Pb extends Ye{constructor(){super(...arguments),this.tokenType=","}}class wr extends Ye{constructor(){super(...arguments),this.value="",this.mirror=""}}class Fb extends wr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class Qb extends wr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class Zb extends wr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Sh extends wr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class Jb extends wr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Ih extends wr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class Cx extends Ye{constructor(){super(...arguments),this.tokenType="~="}}class kx extends Ye{constructor(){super(...arguments),this.tokenType="|="}}class Mx extends Ye{constructor(){super(...arguments),this.tokenType="^="}}class Ox extends Ye{constructor(){super(...arguments),this.tokenType="$="}}class Lx extends Ye{constructor(){super(...arguments),this.tokenType="*="}}class Wb extends Ye{constructor(){super(...arguments),this.tokenType="||"}}class zo extends Ye{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class at extends Ye{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=Je(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 xr extends Ye{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 Vh extends xr{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return al(this.value)}}class Ga extends xr{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return al(this.value)+"("}}class e0 extends xr{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+al(this.value)}}class t0 extends xr{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"?"#"+al(this.value):"#"+jx(this.value)}}class Gh extends xr{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+r0(this.value)+'"'}}class n0 extends xr{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+r0(this.value)+'")'}}class i0 extends Ye{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 s0 extends Ye{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 Rx extends Ye{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 i=al(this.unit);return i[0].toLowerCase()==="e"&&(i[1]==="-"||Fe(i.charCodeAt(1),48,57))&&(i="\\65 "+i.slice(1,i.length)),e+i}}function al(n){n=""+n;let e="";const i=n.charCodeAt(0);for(let s=0;s<n.length;s++){const a=n.charCodeAt(s);if(a===0)throw new $h("Invalid character: the input contains U+0000.");Fe(a,1,31)||a===127||s===0&&Fe(a,48,57)||s===1&&Fe(a,48,57)&&i===45?e+="\\"+a.toString(16)+" ":a>=128||a===45||a===95||Fe(a,48,57)||Fe(a,65,90)||Fe(a,97,122)?e+=n[s]:e+="\\"+n[s]}return e}function jx(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);if(s===0)throw new $h("Invalid character: the input contains U+0000.");s>=128||s===45||s===95||Fe(s,48,57)||Fe(s,65,90)||Fe(s,97,122)?e+=n[i]:e+="\\"+s.toString(16)+" "}return e}function r0(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);if(s===0)throw new $h("Invalid character: the input contains U+0000.");Fe(s,1,31)||s===127?e+="\\"+s.toString(16)+" ":s===34||s===92?e+="\\"+n[i]:e+=n[i]}return e}class Mt extends Error{}function Dx(n,e){let i;try{i=Ib(n),i[i.length-1]instanceof zo||i.push(new zo)}catch(R){const ie=R.message+` while parsing css selector "${n}". Did you mean to CSS.escape it?`,le=(R.stack||"").indexOf(R.message);throw le!==-1&&(R.stack=R.stack.substring(0,le)+ie+R.stack.substring(le+R.message.length)),R.message=ie,R}const s=i.find(R=>R instanceof e0||R instanceof Vb||R instanceof Uo||R instanceof Wb||R instanceof Gb||R instanceof Kb||R instanceof Xb||R instanceof Fb||R instanceof Qb||R instanceof n0||R instanceof s0);if(s)throw new Mt(`Unsupported token "${s.toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`);let a=0;const o=new Set;function u(){return new Mt(`Unexpected token "${i[a].toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`)}function f(){for(;i[a]instanceof Zo;)a++}function d(R=a){return i[R]instanceof Vh}function p(R=a){return i[R]instanceof Gh}function m(R=a){return i[R]instanceof i0}function y(R=a){return i[R]instanceof Pb}function v(R=a){return i[R]instanceof Jb}function b(R=a){return i[R]instanceof Ih}function E(R=a){return i[R]instanceof Ga}function x(R=a){return i[R]instanceof at&&i[R].value==="*"}function _(R=a){return i[R]instanceof zo}function N(R=a){return i[R]instanceof at&&[">","+","~"].includes(i[R].value)}function k(R=a){return y(R)||b(R)||_(R)||N(R)||i[R]instanceof Zo}function $(){const R=[V()];for(;f(),!!y();)a++,R.push(V());return R}function V(){return f(),m()||p()?i[a++].value:L()}function L(){const R={simples:[]};for(f(),N()?R.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):R.simples.push({selector:G(),combinator:""});;){if(f(),N())R.simples[R.simples.length-1].combinator=i[a++].value,f();else if(k())break;R.simples.push({combinator:"",selector:G()})}return R}function G(){let R="";const ie=[];for(;!k();)if(d()||x())R+=i[a++].toSource();else if(i[a]instanceof t0)R+=i[a++].toSource();else if(i[a]instanceof at&&i[a].value===".")if(a++,d())R+="."+i[a++].toSource();else throw u();else if(i[a]instanceof Yb)if(a++,d())if(!e.has(i[a].value.toLowerCase()))R+=":"+i[a++].toSource();else{const le=i[a++].value.toLowerCase();ie.push({name:le,args:[]}),o.add(le)}else if(E()){const le=i[a++].value.toLowerCase();if(e.has(le)?(ie.push({name:le,args:$()}),o.add(le)):R+=`:${le}(${Z()})`,f(),!b())throw u();a++}else throw u();else if(i[a]instanceof Zb){for(R+="[",a++;!(i[a]instanceof Sh)&&!_();)R+=i[a++].toSource();if(!(i[a]instanceof Sh))throw u();R+="]",a++}else throw u();if(!R&&!ie.length)throw u();return{css:R||void 0,functions:ie}}function Z(){let R="",ie=1;for(;!_()&&((v()||E())&&ie++,b()&&ie--,!!ie);)R+=i[a++].toSource();return R}const q=$();if(!_())throw u();if(q.some(R=>typeof R!="object"||!("simples"in R)))throw new Mt(`Error while parsing css selector "${n}". Did you mean to CSS.escape it?`);return{selector:q,names:Array.from(o)}}const wh=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Bx=new Set(["left-of","right-of","above","below","near"]),a0=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 ll(n){const e=Hx(n),i=[];for(const s of e.parts){if(s.name==="css"||s.name==="css:light"){s.name==="css:light"&&(s.body=":light("+s.body+")");const a=Dx(s.body,a0);i.push({name:"css",body:a.selector,source:s.body});continue}if(wh.has(s.name)){let a,o;try{const p=JSON.parse("["+s.body+"]");if(!Array.isArray(p)||p.length<1||p.length>2||typeof p[0]!="string")throw new Mt(`Malformed selector: ${s.name}=`+s.body);if(a=p[0],p.length===2){if(typeof p[1]!="number"||!Bx.has(s.name))throw new Mt(`Malformed selector: ${s.name}=`+s.body);o=p[1]}}catch{throw new Mt(`Malformed selector: ${s.name}=`+s.body)}const u={name:s.name,source:s.body,body:{parsed:ll(a),distance:o}},f=[...u.body.parsed.parts].reverse().find(p=>p.name==="internal:control"&&p.body==="enter-frame"),d=f?u.body.parsed.parts.indexOf(f):-1;d!==-1&&Ux(u.body.parsed.parts.slice(0,d+1),i.slice(0,d+1))&&u.body.parsed.parts.splice(0,d+1),i.push(u);continue}i.push({...s,source:s.body})}if(wh.has(i[0].name))throw new Mt(`"${i[0].name}" selector cannot be first`);return{capture:e.capture,parts:i}}function Ux(n,e){return xn({parts:n})===xn({parts:e})}function xn(n,e){return typeof n=="string"?n:n.parts.map((i,s)=>{let a=!0;!e&&s!==n.capture&&(i.name==="css"||i.name==="xpath"&&i.source.startsWith("//")||i.source.startsWith(".."))&&(a=!1);const o=a?i.name+"=":"";return`${s===n.capture?"*":""}${o}${i.source}`}).join(" >> ")}function zx(n,e){const i=(s,a)=>{for(const o of s.parts)e(o,a),wh.has(o.name)&&i(o.body.parsed,!0)};i(n,!1)}function Hx(n){let e=0,i,s=0;const a={parts:[]},o=()=>{const f=n.substring(s,e).trim(),d=f.indexOf("=");let p,m;d!==-1&&f.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(p=f.substring(0,d).trim(),m=f.substring(d+1)):f.length>1&&f[0]==='"'&&f[f.length-1]==='"'||f.length>1&&f[0]==="'"&&f[f.length-1]==="'"?(p="text",m=f):/^\(*\/\//.test(f)||f.startsWith("..")?(p="xpath",m=f):(p="css",m=f);let y=!1;if(p[0]==="*"&&(y=!0,p=p.substring(1)),a.parts.push({name:p,body:m}),y){if(a.capture!==void 0)throw new Mt("Only one of the selectors can capture using * modifier");a.capture=a.parts.length-1}};if(!n.includes(">>"))return e=n.length,o(),a;const u=()=>{const d=n.substring(s,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e<n.length;){const f=n[e];f==="\\"&&e+1<n.length?e+=2:f===i?(i=void 0,e++):!i&&(f==='"'||f==="'"||f==="`")&&!u()?(i=f,e++):!i&&f===">"&&n[e+1]===">"?(o(),e+=2,s=e):e++}return o(),a}function as(n,e){let i=0,s=n.length===0;const a=()=>n[i]||"",o=()=>{const _=a();return++i,s=i>=n.length,_},u=_=>{throw s?new Mt(`Unexpected end of selector while parsing selector \`${n}\``):new Mt(`Error while parsing selector \`${n}\` - unexpected symbol "${a()}" at position ${i}`+(_?" during "+_:""))};function f(){for(;!s&&/\s/.test(a());)o()}function d(_){return _>=""||_>="0"&&_<="9"||_>="A"&&_<="Z"||_>="a"&&_<="z"||_>="0"&&_<="9"||_==="_"||_==="-"}function p(){let _="";for(f();!s&&d(a());)_+=o();return _}function m(_){let N=o();for(N!==_&&u("parsing quoted string");!s&&a()!==_;)a()==="\\"&&o(),N+=o();return a()!==_&&u("parsing quoted string"),N+=o(),N}function y(){o()!=="/"&&u("parsing regular expression");let _="",N=!1;for(;!s;){if(a()==="\\")_+=o(),s&&u("parsing regular expression");else if(N&&a()==="]")N=!1;else if(!N&&a()==="[")N=!0;else if(!N&&a()==="/")break;_+=o()}o()!=="/"&&u("parsing regular expression");let k="";for(;!s&&a().match(/[dgimsuy]/);)k+=o();try{return new RegExp(_,k)}catch($){throw new Mt(`Error while parsing selector \`${n}\`: ${$.message}`)}}function v(){let _="";return f(),a()==="'"||a()==='"'?_=m(a()).slice(1,-1):_=p(),_||u("parsing property path"),_}function b(){f();let _="";return s||(_+=o()),!s&&_!=="="&&(_+=o()),["=","*=","^=","$=","|=","~="].includes(_)||u("parsing operator"),_}function E(){o();const _=[];for(_.push(v()),f();a()===".";)o(),_.push(v()),f();if(a()==="]")return o(),{name:_.join("."),jsonPath:_,op:"<truthy>",value:null,caseSensitive:!1};const N=b();let k,$=!0;if(f(),a()==="/"){if(N!=="=")throw new Mt(`Error while parsing selector \`${n}\` - cannot use ${N} in attribute with regular expression`);k=y()}else if(a()==="'"||a()==='"')k=m(a()).slice(1,-1),f(),a()==="i"||a()==="I"?($=!1,o()):(a()==="s"||a()==="S")&&($=!0,o());else{for(k="";!s&&(d(a())||a()==="+"||a()===".");)k+=o();k==="true"?k=!0:k==="false"?k=!1:e||(k=+k,Number.isNaN(k)&&u("parsing attribute value"))}if(f(),a()!=="]"&&u("parsing attribute value"),o(),N!=="="&&typeof k!="string")throw new Mt(`Error while parsing selector \`${n}\` - cannot use ${N} in attribute with non-string matching value - ${k}`);return{name:_.join("."),jsonPath:_,op:N,value:k,caseSensitive:$}}const x={name:"",attributes:[]};for(x.name=p(),f();a()==="[";)x.attributes.push(E()),f();if(s||u(void 0),!x.name&&!x.attributes.length)throw new Mt(`Error while parsing selector \`${n}\` - selector cannot be empty`);return x}function cc(n,e="'"){const i=JSON.stringify(n),s=i.substring(1,i.length-1).replace(/\\"/g,'"');if(e==="'")return e+s.replace(/[']/g,"\\'")+e;if(e==='"')return e+s.replace(/["]/g,'\\"')+e;if(e==="`")return e+s.replace(/[`]/g,"\\`")+e;throw new Error("Invalid escape char")}function Jo(n){return n.charAt(0).toUpperCase()+n.substring(1)}function l0(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function lr(n){return`"${n.replace(/["\\]/g,e=>"\\"+e)}"`}let Zi;function qx(){Zi=new Map}function _t(n){let e=Zi==null?void 0:Zi.get(n);return e===void 0&&(e=n.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),Zi==null||Zi.set(n,e)),e}function uc(n){return n.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function o0(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Ot(n,e){return typeof n!="string"?o0(n):`${JSON.stringify(n)}${e?"s":"i"}`}function wt(n,e){return typeof n!="string"?o0(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function $x(n,e,i=""){if(n.length<=e)return n;const s=[...n];return s.length>e?s.slice(0,e-i.length).join("")+i:s.join("")}function Hy(n,e){return $x(n,e,"…")}function Wo(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ix(n,e){const i=n.length,s=e.length;let a=0,o=0;const u=Array(i+1).fill(null).map(()=>Array(s+1).fill(0));for(let f=1;f<=i;f++)for(let d=1;d<=s;d++)n[f-1]===e[d-1]&&(u[f][d]=u[f-1][d-1]+1,u[f][d]>a&&(a=u[f][d],o=f));return n.slice(o-a,o)}function Vx(n,e){try{const i=ll(e),s=Gx(i);return s||ts(new u0[n],i,!1,1)[0]}catch{return e}}function Gx(n){const e=n.parts[n.parts.length-1];if((e==null?void 0:e.name)==="internal:describe"){const i=JSON.parse(e.body);if(typeof i=="string")return i}}function Ti(n,e,i=!1){return c0(n,e,i,1)[0]}function c0(n,e,i=!1,s=20,a){try{return ts(new u0[n](a),ll(e),i,s)}catch{return[e]}}function ts(n,e,i=!1,s=20){const a=[...e.parts],o=[];let u=i?"frame-locator":"page";for(let f=0;f<a.length;f++){const d=a[f],p=u;if(u="locator",d.name==="internal:describe")continue;if(d.name==="nth"){d.body==="0"?o.push([n.generateLocator(p,"first",""),n.generateLocator(p,"nth","0")]):d.body==="-1"?o.push([n.generateLocator(p,"last",""),n.generateLocator(p,"nth","-1")]):o.push([n.generateLocator(p,"nth",d.body)]);continue}if(d.name==="visible"){o.push([n.generateLocator(p,"visible",d.body),n.generateLocator(p,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:E,text:x}=Oa(d.body);o.push([n.generateLocator(p,"text",x,{exact:E})]);continue}if(d.name==="internal:has-text"){const{exact:E,text:x}=Oa(d.body);if(!E){o.push([n.generateLocator(p,"has-text",x,{exact:E})]);continue}}if(d.name==="internal:has-not-text"){const{exact:E,text:x}=Oa(d.body);if(!E){o.push([n.generateLocator(p,"has-not-text",x,{exact:E})]);continue}}if(d.name==="internal:has"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"has",x)));continue}if(d.name==="internal:has-not"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"hasNot",x)));continue}if(d.name==="internal:and"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"and",x)));continue}if(d.name==="internal:or"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"or",x)));continue}if(d.name==="internal:chain"){const E=ts(n,d.body.parsed,!1,s);o.push(E.map(x=>n.generateLocator(p,"chain",x)));continue}if(d.name==="internal:label"){const{exact:E,text:x}=Oa(d.body);o.push([n.generateLocator(p,"label",x,{exact:E})]);continue}if(d.name==="internal:role"){const E=as(d.body,!0),x={attrs:[]};for(const _ of E.attributes)_.name==="name"?(x.exact=_.caseSensitive,x.name=_.value):(_.name==="level"&&typeof _.value=="string"&&(_.value=+_.value),x.attrs.push({name:_.name==="include-hidden"?"includeHidden":_.name,value:_.value}));o.push([n.generateLocator(p,"role",E.name,x)]);continue}if(d.name==="internal:testid"){const E=as(d.body,!0),{value:x}=E.attributes[0];o.push([n.generateLocator(p,"test-id",x)]);continue}if(d.name==="internal:attr"){const E=as(d.body,!0),{name:x,value:_,caseSensitive:N}=E.attributes[0],k=_,$=!!N;if(x==="placeholder"){o.push([n.generateLocator(p,"placeholder",k,{exact:$})]);continue}if(x==="alt"){o.push([n.generateLocator(p,"alt",k,{exact:$})]);continue}if(x==="title"){o.push([n.generateLocator(p,"title",k,{exact:$})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const E=o[o.length-1],x=a[f-1],_=E.map(N=>n.chainLocators([N,n.generateLocator(p,"frame","")]));["xpath","css"].includes(x.name)&&_.push(n.generateLocator(p,"frame-locator",xn({parts:[x]})),n.generateLocator(p,"frame-locator",xn({parts:[x]},!0))),E.splice(0,E.length,..._),u="frame-locator";continue}const m=a[f+1],y=xn({parts:[d]}),v=n.generateLocator(p,"default",y);if(m&&["internal:has-text","internal:has-not-text"].includes(m.name)){const{exact:E,text:x}=Oa(m.body);if(!E){const _=n.generateLocator("locator",m.name==="internal:has-text"?"has-text":"has-not-text",x,{exact:E}),N={};m.name==="internal:has-text"?N.hasText=x:N.hasNotText=x;const k=n.generateLocator(p,"default",y,N);o.push([n.chainLocators([v,_]),k]),f++;continue}}let b;if(["xpath","css"].includes(d.name)){const E=xn({parts:[d]},!0);b=n.generateLocator(p,"default",E)}o.push([v,b].filter(Boolean))}return Kx(n,o,s)}function Kx(n,e,i){const s=e.map(()=>""),a=[],o=u=>{if(u===e.length)return a.push(n.chainLocators(s)),a.length<i;for(const f of e[u])if(s[u]=f,!o(u+1))return!1;return!0};return o(0),a}function Oa(n){let e=!1;const i=n.match(/^\/(.*)\/([igm]*)$/);return i?{text:new RegExp(i[1],i[2])}:(n.endsWith('"')?(n=JSON.parse(n),e=!0):n.endsWith('"s')?(n=JSON.parse(n.substring(0,n.length-1)),e=!0):n.endsWith('"i')&&(n=JSON.parse(n.substring(0,n.length-1)),e=!1),{exact:e,text:n})}class Yx{constructor(e){this.preferredQuote=e}generateLocator(e,i,s,a={}){switch(i){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, { hasText: ${this.toHasText(a.hasText)} })`:a.hasNotText!==void 0?`locator(${this.quote(s)}, { hasNotText: ${this.toHasText(a.hasNotText)} })`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${s==="true"?"true":"false"} })`;case"role":const o=[];lt(a.name)?o.push(`name: ${this.regexToSourceString(a.name)}`):typeof a.name=="string"&&(o.push(`name: ${this.quote(a.name)}`),a.exact&&o.push("exact: true"));for(const{name:f,value:d}of a.attrs)o.push(`${f}: ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, { ${o.join(", ")} }`:"";return`getByRole(${this.quote(s)}${u})`;case"has-text":return`filter({ hasText: ${this.toHasText(s)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(s)} })`;case"has":return`filter({ has: ${s} })`;case"hasNot":return`filter({ hasNot: ${s} })`;case"and":return`and(${s})`;case"or":return`or(${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("getByText",s,!!a.exact);case"alt":return this.toCallWithExact("getByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact("getByLabel",s,!!a.exact);case"title":return this.toCallWithExact("getByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return uc(String(e))}toCallWithExact(e,i,s){return lt(i)?`${e}(${this.regexToSourceString(i)})`:s?`${e}(${this.quote(i)}, { exact: true })`:`${e}(${this.quote(i)})`}toHasText(e){return lt(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return lt(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return cc(e,this.preferredQuote??"'")}}class Xx{generateLocator(e,i,s,a={}){switch(i){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, has_text=${this.toHasText(a.hasText)})`:a.hasNotText!==void 0?`locator(${this.quote(s)}, has_not_text=${this.toHasText(a.hasNotText)})`:`locator(${this.quote(s)})`;case"frame-locator":return`frame_locator(${this.quote(s)})`;case"frame":return"content_frame";case"nth":return`nth(${s})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${s==="true"?"True":"False"})`;case"role":const o=[];lt(a.name)?o.push(`name=${this.regexToString(a.name)}`):typeof a.name=="string"&&(o.push(`name=${this.quote(a.name)}`),a.exact&&o.push("exact=True"));for(const{name:f,value:d}of a.attrs){let p=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(p=d?"True":"False"),o.push(`${l0(f)}=${p}`)}const u=o.length?`, ${o.join(", ")}`:"";return`get_by_role(${this.quote(s)}${u})`;case"has-text":return`filter(has_text=${this.toHasText(s)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(s)})`;case"has":return`filter(has=${s})`;case"hasNot":return`filter(has_not=${s})`;case"and":return`and_(${s})`;case"or":return`or_(${s})`;case"chain":return`locator(${s})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("get_by_text",s,!!a.exact);case"alt":return this.toCallWithExact("get_by_alt_text",s,!!a.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",s,!!a.exact);case"label":return this.toCallWithExact("get_by_label",s,!!a.exact);case"title":return this.toCallWithExact("get_by_title",s,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${uc(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${i})`}toCallWithExact(e,i,s){return lt(i)?`${e}(${this.regexToString(i)})`:s?`${e}(${this.quote(i)}, exact=True)`:`${e}(${this.quote(i)})`}toHasText(e){return lt(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return lt(e)?this.regexToString(e):this.quote(e)}quote(e){return cc(e,'"')}}class Px{generateLocator(e,i,s,a={}){let o;switch(e){case"page":o="Page";break;case"frame-locator":o="FrameLocator";break;case"locator":o="Locator";break}switch(i){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(a.hasText)}))`:a.hasNotText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(a.hasNotText)}))`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${o}.FilterOptions().setVisible(${s==="true"?"true":"false"}))`;case"role":const u=[];lt(a.name)?u.push(`.setName(${this.regexToString(a.name)})`):typeof a.name=="string"&&(u.push(`.setName(${this.quote(a.name)})`),a.exact&&u.push(".setExact(true)"));for(const{name:d,value:p}of a.attrs)u.push(`.set${Jo(d)}(${typeof p=="string"?this.quote(p):p})`);const f=u.length?`, new ${o}.GetByRoleOptions()${u.join("")}`:"";return`getByRole(AriaRole.${l0(s).toUpperCase()}${f})`;case"has-text":return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(s)}))`;case"has-not-text":return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(s)}))`;case"has":return`filter(new ${o}.FilterOptions().setHas(${s}))`;case"hasNot":return`filter(new ${o}.FilterOptions().setHasNot(${s}))`;case"and":return`and(${s})`;case"or":return`or(${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact(o,"getByText",s,!!a.exact);case"alt":return this.toCallWithExact(o,"getByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact(o,"getByLabel",s,!!a.exact);case"title":return this.toCallWithExact(o,"getByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(uc(e.source))}${i})`}toCallWithExact(e,i,s,a){return lt(s)?`${i}(${this.regexToString(s)})`:a?`${i}(${this.quote(s)}, new ${e}.${Jo(i)}Options().setExact(true))`:`${i}(${this.quote(s)})`}toHasText(e){return lt(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return lt(e)?this.regexToString(e):this.quote(e)}quote(e){return cc(e,'"')}}class Fx{generateLocator(e,i,s,a={}){switch(i){case"default":return a.hasText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasText(a.hasText)} })`:a.hasNotText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasNotText(a.hasNotText)} })`:`Locator(${this.quote(s)})`;case"frame-locator":return`FrameLocator(${this.quote(s)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${s})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${s==="true"?"true":"false"} })`;case"role":const o=[];lt(a.name)?o.push(`NameRegex = ${this.regexToString(a.name)}`):typeof a.name=="string"&&(o.push(`Name = ${this.quote(a.name)}`),a.exact&&o.push("Exact = true"));for(const{name:f,value:d}of a.attrs)o.push(`${Jo(f)} = ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${Jo(s)}${u})`;case"has-text":return`Filter(new() { ${this.toHasText(s)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(s)} })`;case"has":return`Filter(new() { Has = ${s} })`;case"hasNot":return`Filter(new() { HasNot = ${s} })`;case"and":return`And(${s})`;case"or":return`Or(${s})`;case"chain":return`Locator(${s})`;case"test-id":return`GetByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("GetByText",s,!!a.exact);case"alt":return this.toCallWithExact("GetByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact("GetByLabel",s,!!a.exact);case"title":return this.toCallWithExact("GetByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(uc(e.source))}${i})`}toCallWithExact(e,i,s){return lt(i)?`${e}(${this.regexToString(i)})`:s?`${e}(${this.quote(i)}, new() { Exact = true })`:`${e}(${this.quote(i)})`}toHasText(e){return lt(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return lt(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return lt(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return cc(e,'"')}}class Qx{generateLocator(e,i,s,a={}){return JSON.stringify({kind:i,body:s,options:a})}chainLocators(e){const i=e.map(s=>JSON.parse(s));for(let s=0;s<i.length-1;++s)i[s].next=i[s+1];return JSON.stringify(i[0])}}const u0={javascript:Yx,python:Xx,java:Px,csharp:Fx,jsonl:Qx};function lt(n){return n instanceof RegExp}const qy=new Map;function Zx({name:n,rootItem:e,render:i,title:s,icon:a,isError:o,isVisible:u,selectedItem:f,onAccepted:d,onSelected:p,onHighlighted:m,treeState:y,setTreeState:v,noItemsMessage:b,dataTestId:E,autoExpandDepth:x}){const _=z.useMemo(()=>Jx(e,f,y.expandedItems,x||0,u),[e,f,y,x,u]),N=z.useRef(null),[k,$]=z.useState(),[V,L]=z.useState(!1);z.useEffect(()=>{m==null||m(k)},[m,k]),z.useEffect(()=>{const q=N.current;if(!q)return;const R=()=>{qy.set(n,q.scrollTop)};return q.addEventListener("scroll",R,{passive:!0}),()=>q.removeEventListener("scroll",R)},[n]),z.useEffect(()=>{N.current&&(N.current.scrollTop=qy.get(n)||0)},[n]);const G=z.useCallback(q=>{const{expanded:R}=_.get(q);if(R){for(let ie=f;ie;ie=ie.parent)if(ie===q){p==null||p(q);break}y.expandedItems.set(q.id,!1)}else y.expandedItems.set(q.id,!0);v({...y})},[_,f,p,y,v]),Z=z.useCallback(q=>{const{expanded:R}=_.get(q),ie=[q];for(;ie.length;){const le=ie.pop();ie.push(...le.children),y.expandedItems.set(le.id,!R)}v({...y})},[_,y,v]);return S.jsx("div",{className:Ke("tree-view vbox",n+"-tree-view"),"data-testid":E||n+"-tree",children:S.jsxs("div",{className:Ke("tree-view-content"),role:_.size>0?"tree":void 0,tabIndex:0,onKeyDown:q=>{if(f&&q.key==="Enter"){d==null||d(f);return}if(q.key!=="ArrowDown"&&q.key!=="ArrowUp"&&q.key!=="ArrowLeft"&&q.key!=="ArrowRight")return;if(q.stopPropagation(),q.preventDefault(),f&&q.key==="ArrowLeft"){const{expanded:ie,parent:le}=_.get(f);ie?(y.expandedItems.set(f.id,!1),v({...y})):le&&(p==null||p(le));return}if(f&&q.key==="ArrowRight"){f.children.length&&(y.expandedItems.set(f.id,!0),v({...y}));return}let R=f;if(q.key==="ArrowDown"&&(f?R=_.get(f).next:_.size&&(R=[..._.keys()][0])),q.key==="ArrowUp"){if(f)R=_.get(f).prev;else if(_.size){const ie=[..._.keys()];R=ie[ie.length-1]}}m==null||m(void 0),R&&(L(!0),p==null||p(R)),$(void 0)},ref:N,children:[b&&_.size===0&&S.jsx("div",{className:"tree-view-empty",children:b}),e.children.map(q=>_.get(q)&&S.jsx(f0,{item:q,treeItems:_,selectedItem:f,onSelected:p,onAccepted:d,isError:o,toggleExpanded:G,toggleSubtree:Z,highlightedItem:k,setHighlightedItem:$,render:i,icon:a,title:s,isKeyboardNavigation:V,setIsKeyboardNavigation:L},q.id))]})})}function f0({item:n,treeItems:e,selectedItem:i,onSelected:s,highlightedItem:a,setHighlightedItem:o,isError:u,onAccepted:f,toggleExpanded:d,toggleSubtree:p,render:m,title:y,icon:v,isKeyboardNavigation:b,setIsKeyboardNavigation:E}){const x=z.useId(),_=z.useRef(null);z.useEffect(()=>{i===n&&b&&_.current&&(Lb(_.current),E(!1))},[n,i,b,E]);const N=e.get(n),k=N.depth,$=N.expanded;let V="codicon-blank";typeof $=="boolean"&&(V=$?"codicon-chevron-down":"codicon-chevron-right");const L=m(n),G=$&&n.children.length?n.children:[],Z=y==null?void 0:y(n),q=(v==null?void 0:v(n))||"codicon-blank";return S.jsxs("div",{ref:_,role:"treeitem","aria-selected":n===i,"aria-expanded":$,"aria-controls":x,title:Z,className:"vbox",style:{flex:"none"},children:[S.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(n),className:Ke("tree-view-entry",i===n&&"selected",a===n&&"highlighted",(u==null?void 0:u(n))&&"error"),onClick:()=>s==null?void 0:s(n),onMouseEnter:()=>o(n),onMouseLeave:()=>o(void 0),children:[k?new Array(k).fill(0).map((R,ie)=>S.jsx("div",{className:"tree-view-indent"},"indent-"+ie)):void 0,S.jsx("div",{"aria-hidden":"true",className:"codicon "+V,style:{minWidth:16,marginRight:4},onDoubleClick:R=>{R.preventDefault(),R.stopPropagation()},onClick:R=>{R.stopPropagation(),R.preventDefault(),R.altKey?p(n):d(n)}}),v&&S.jsx("div",{className:"codicon "+q,style:{minWidth:16,marginRight:4},"aria-label":"["+q.replace("codicon","icon")+"]"}),typeof L=="string"?S.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:L}):L]}),!!G.length&&S.jsx("div",{id:x,role:"group",children:G.map(R=>e.get(R)&&S.jsx(f0,{item:R,treeItems:e,selectedItem:i,onSelected:s,onAccepted:f,isError:u,toggleExpanded:d,toggleSubtree:p,highlightedItem:a,setHighlightedItem:o,render:m,title:y,icon:v,isKeyboardNavigation:b,setIsKeyboardNavigation:E},R.id))})]})}function Jx(n,e,i,s,a=()=>!0){if(!a(n))return new Map;const o=new Map,u=new Set;for(let p=e==null?void 0:e.parent;p;p=p.parent)u.add(p.id);let f=null;const d=(p,m)=>{for(const y of p.children){if(!a(y))continue;const v=u.has(y.id)||i.get(y.id),b=s>m&&o.size<25&&v!==!1,E=y.children.length?v??b:void 0,x={depth:m,expanded:E,parent:n===p?null:p,next:null,prev:f};f&&(o.get(f).next=y),f=y,o.set(y,x),E&&d(y,m+1)}};return d(n,0),o}const jt=z.forwardRef(function({children:e,title:i="",icon:s,disabled:a=!1,toggled:o=!1,onClick:u=()=>{},style:f,testId:d,className:p,ariaLabel:m},y){return S.jsxs("button",{ref:y,className:Ke(p,"toolbar-button",s,o&&"toggled"),onMouseDown:$y,onClick:u,onDoubleClick:$y,title:i,disabled:!!a,style:f,"data-testid":d,"aria-label":m||i,children:[s&&S.jsx("span",{className:`codicon codicon-${s}`,style:e?{marginRight:5}:{}}),e]})}),$y=n=>{n.stopPropagation(),n.preventDefault()};function h0(n){return n==="scheduled"?"codicon-clock":n==="running"?"codicon-loading":n==="failed"?"codicon-error":n==="passed"?"codicon-check":n==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function Wx(n){return n==="scheduled"?"Pending":n==="running"?"Running":n==="failed"?"Failed":n==="passed"?"Passed":n==="skipped"?"Skipped":"Did not run"}const e_=Zx,t_=({actions:n,selectedAction:e,selectedTime:i,setSelectedTime:s,treeState:a,setTreeState:o,sdkLanguage:u,onSelected:f,onHighlighted:d,revealConsole:p,revealActionAttachment:m,isLive:y})=>{const{rootItem:v,itemMap:b}=z.useMemo(()=>qb(n),[n]),{selectedItem:E}=z.useMemo(()=>({selectedItem:e?b.get(e.callId):void 0}),[b,e]),x=z.useCallback(L=>{var G;return!!((G=L.action.error)!=null&&G.message)},[]),_=z.useCallback(L=>s({minimum:L.action.startTime,maximum:L.action.endTime}),[s]),N=z.useCallback(L=>{var Z;const G=!!m&&!!((Z=L.action.attachments)!=null&&Z.length);return Kh(L.action,{sdkLanguage:u,revealConsole:p,revealActionAttachment:()=>m==null?void 0:m(L.action.callId),isLive:y,showDuration:!0,showBadges:!0,showAttachments:G})},[y,p,m,u]),k=z.useCallback(L=>!i||!L.action||L.action.startTime<=i.maximum&&L.action.endTime>=i.minimum,[i]),$=z.useCallback(L=>{f==null||f(L.action)},[f]),V=z.useCallback(L=>{d==null||d(L==null?void 0:L.action)},[d]);return S.jsxs("div",{className:"vbox",children:[i&&S.jsxs("div",{className:"action-list-show-all",onClick:()=>s(void 0),children:[S.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),S.jsx(e_,{name:"actions",rootItem:v,treeState:a,setTreeState:o,selectedItem:E,onSelected:$,onHighlighted:V,onAccepted:_,isError:x,isVisible:k,render:N})]})},Kh=(n,e)=>{var _;const{sdkLanguage:i,revealConsole:s,revealActionAttachment:a,isLive:o,showDuration:u,showBadges:f,showAttachments:d}=e,{errors:p,warnings:m}=mx(n),y=n.params.selector?Vx(i||"javascript",n.params.selector):void 0,v=n.class==="Test"&&n.method==="test.step"&&((_=n.annotations)==null?void 0:_.some(N=>N.type==="skip"));let b="";n.endTime?b=xt(n.endTime-n.startTime):n.error?b="Timed out":o||(b="-");const{elements:E,title:x}=d0(n);return S.jsxs("div",{className:"action-title vbox",children:[S.jsxs("div",{className:"hbox",children:[S.jsx("span",{className:"action-title-method",title:x,children:E}),(u||f||d||v)&&S.jsx("div",{className:"spacer"}),d&&S.jsx(jt,{icon:"attach",title:"Open Attachment",onClick:()=>a==null?void 0:a()}),u&&!v&&S.jsx("div",{className:"action-duration",children:b||S.jsx("span",{className:"codicon codicon-loading"})}),v&&S.jsx("span",{className:Ke("action-skipped","codicon",h0("skipped")),title:"skipped"}),f&&S.jsxs("div",{className:"action-icons",onClick:()=>s==null?void 0:s(),children:[!!p&&S.jsxs("div",{className:"action-icon",children:[S.jsx("span",{className:"codicon codicon-error"}),S.jsx("span",{className:"action-icon-value",children:p})]}),!!m&&S.jsxs("div",{className:"action-icon",children:[S.jsx("span",{className:"codicon codicon-warning"}),S.jsx("span",{className:"action-icon-value",children:m})]})]})]}),y&&S.jsx("div",{className:"action-title-selector",title:y,children:y})]})};function d0(n){var f;let e=n.title??((f=qh.get(n.class+"."+n.method))==null?void 0:f.title)??n.method;e=e.replace(/\n/g," ");const i=[],s=[];let a=0;const o=/\{([^}]+)\}/g;let u;for(;(u=o.exec(e))!==null;){const[d,p]=u,m=e.slice(a,u.index);i.push(m),s.push(m);const y=Bb(n.params,p);y===void 0?(i.push(d),s.push(d)):u.index===0?(i.push(y),s.push(y)):(i.push(S.jsx("span",{className:"action-title-param",children:y},i.length)),s.push(y)),a=u.index+d.length}if(a<e.length){const d=e.slice(a);i.push(d),s.push(d)}return{elements:i,title:s.join("")}}const Yh=({value:n,description:e})=>{const[i,s]=z.useState("copy"),a=z.useCallback(()=>{(typeof n=="function"?n():Promise.resolve(n)).then(u=>{navigator.clipboard.writeText(u).then(()=>{s("check"),setTimeout(()=>{s("copy")},3e3)},()=>{s("close")})},()=>{s("close")})},[n]);return S.jsx(jt,{title:e||"Copy",icon:i,onClick:a})},Ho=({value:n,description:e,copiedDescription:i=e,style:s})=>{const[a,o]=z.useState(!1),u=z.useCallback(async()=>{const f=typeof n=="function"?await n():n;await navigator.clipboard.writeText(f),o(!0),setTimeout(()=>o(!1),3e3)},[n]);return S.jsx(jt,{style:s,title:e,onClick:u,className:"copy-to-clipboard-text-button",children:a?i:e})},cs=({text:n})=>S.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:n}),n_=({action:n,startTimeOffset:e,sdkLanguage:i})=>{const s=z.useMemo(()=>Object.keys((n==null?void 0:n.params)??{}).filter(f=>f!=="info"),[n]);if(!n)return S.jsx(cs,{text:"No action selected"});const a=n.startTime-e,o=xt(a),{title:u}=d0(n);return S.jsxs("div",{className:"call-tab",children:[S.jsx("div",{className:"call-line",children:u}),S.jsx("div",{className:"call-section",children:"Time"}),Eo({name:"start",type:"literal",text:o}),Eo({name:"duration",type:"literal",text:i_(n)}),!!s.length&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"call-section",children:"Parameters"}),s.map(f=>Eo(Iy(n,f,n.params[f],i)))]}),!!n.result&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(n.result).map(f=>Eo(Iy(n,f,n.result[f],i)))]})]})};function i_(n){return n.endTime?xt(n.endTime-n.startTime):n.error?"Timed Out":"Running"}function Eo(n){let e=n.text.replace(/\n/g,"↵");return n.type==="string"&&(e=`"${e}"`),S.jsxs("div",{className:"call-line",children:[n.name,":",S.jsx("span",{className:Ke("call-value",n.type),title:n.text,children:e}),["literal","string","number","object","locator"].includes(n.type)&&S.jsx(Yh,{value:n.text})]},n.name)}function Iy(n,e,i,s){const a=n.method.includes("eval")||n.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&a)&&(i=ec(i.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&a||e==="received"&&n.method==="expect")&&(i=ec(i,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:Ti(s||"javascript",n.params.selector),type:"locator",name:"locator"};const o=typeof i;return o!=="object"||i===null?{text:String(i),type:o,name:e}:i.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(i).slice(0,1e3),type:"object",name:e}}function ec(n,e){if(n.n!==void 0)return n.n;if(n.s!==void 0)return n.s;if(n.b!==void 0)return n.b;if(n.v!==void 0){if(n.v==="undefined")return;if(n.v==="null")return null;if(n.v==="NaN")return NaN;if(n.v==="Infinity")return 1/0;if(n.v==="-Infinity")return-1/0;if(n.v==="-0")return-0}if(n.d!==void 0)return new Date(n.d);if(n.r!==void 0)return new RegExp(n.r.p,n.r.f);if(n.a!==void 0)return n.a.map(i=>ec(i,e));if(n.o!==void 0){const i={};for(const{k:s,v:a}of n.o)i[s]=ec(a,e);return i}return n.h!==void 0?e===void 0?"<object>":e[n.h]:"<object>"}const Vy=new Map;function fc({name:n,items:e=[],id:i,render:s,icon:a,isError:o,isWarning:u,isInfo:f,selectedItem:d,onAccepted:p,onSelected:m,onHighlighted:y,onIconClicked:v,noItemsMessage:b,dataTestId:E,notSelectable:x,ariaLabel:_}){const N=z.useRef(null),[k,$]=z.useState();return z.useEffect(()=>{y==null||y(k)},[y,k]),z.useEffect(()=>{const V=N.current;if(!V)return;const L=()=>{Vy.set(n,V.scrollTop)};return V.addEventListener("scroll",L,{passive:!0}),()=>V.removeEventListener("scroll",L)},[n]),z.useEffect(()=>{N.current&&(N.current.scrollTop=Vy.get(n)||0)},[n]),S.jsx("div",{className:Ke("list-view vbox",n+"-list-view"),role:e.length>0?"list":void 0,"aria-label":_,children:S.jsxs("div",{className:Ke("list-view-content",x&&"not-selectable"),tabIndex:0,onKeyDown:V=>{var q;if(d&&V.key==="Enter"){p==null||p(d,e.indexOf(d));return}if(V.key!=="ArrowDown"&&V.key!=="ArrowUp")return;V.stopPropagation(),V.preventDefault();const L=d?e.indexOf(d):-1;let G=L;V.key==="ArrowDown"&&(L===-1?G=0:G=Math.min(L+1,e.length-1)),V.key==="ArrowUp"&&(L===-1?G=e.length-1:G=Math.max(L-1,0));const Z=(q=N.current)==null?void 0:q.children.item(G);Lb(Z||void 0),y==null||y(void 0),m==null||m(e[G],G),$(void 0)},ref:N,children:[b&&e.length===0&&S.jsx("div",{className:"list-view-empty",children:b}),e.map((V,L)=>{const G=s(V,L);return S.jsxs("div",{onDoubleClick:()=>p==null?void 0:p(V,L),role:"listitem",className:Ke("list-view-entry",d===V&&"selected",!x&&k===V&&"highlighted",(o==null?void 0:o(V,L))&&"error",(u==null?void 0:u(V,L))&&"warning",(f==null?void 0:f(V,L))&&"info"),"aria-selected":d===V,onClick:()=>m==null?void 0:m(V,L),onMouseEnter:()=>$(V),onMouseLeave:()=>$(void 0),children:[a&&S.jsx("div",{className:"codicon "+(a(V,L)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:Z=>{Z.preventDefault(),Z.stopPropagation()},onClick:Z=>{Z.stopPropagation(),Z.preventDefault(),v==null||v(V,L)}}),typeof G=="string"?S.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:G}):G]},(i==null?void 0:i(V,L))||L)})]})})}const s_=fc,r_=({action:n,isLive:e})=>{const i=z.useMemo(()=>{var u;if(!n||!n.log.length)return[];const s=n.log,a=n.context.wallTime-n.context.startTime,o=[];for(let f=0;f<s.length;++f){let d="";if(s[f].time!==-1){const p=(u=s[f])==null?void 0:u.time;f+1<s.length?d=xt(s[f+1].time-p):n.endTime>0?d=xt(n.endTime-p):e?d=xt(Date.now()-a-p):d="-"}o.push({message:s[f].message,time:d})}return o},[n,e]);return i.length?S.jsx(s_,{name:"log",ariaLabel:"Log entries",items:i,render:s=>S.jsxs("div",{className:"log-list-item",children:[S.jsx("span",{className:"log-list-duration",children:s.time}),s.message]}),notSelectable:!0}):S.jsx(cs,{text:"No log entries"})};function el(n,e){const i=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,s=[];let a,o={},u=!1,f=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(a=i.exec(n))!==null;){const[,,p,,m]=a;if(p){const y=+p;switch(y){case 0:o={};break;case 1:o["font-weight"]="bold";break;case 2:o.opacity="0.8";break;case 3:o["font-style"]="italic";break;case 4:o["text-decoration"]="underline";break;case 7:u=!0;break;case 8:o.display="none";break;case 9:o["text-decoration"]="line-through";break;case 22:delete o["font-weight"],delete o["font-style"],delete o.opacity,delete o["text-decoration"];break;case 23:delete o["font-weight"],delete o["font-style"],delete o.opacity;break;case 24:delete o["text-decoration"];break;case 27:u=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:f=Gy[y-30];break;case 39:f=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:d=Gy[y-40];break;case 49:d=e==null?void 0:e.bg;break;case 53:o["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:f=Ky[y-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=Ky[y-100];break}}else if(m){const y={...o},v=u?d:f;v!==void 0&&(y.color=v);const b=u?f:d;b!==void 0&&(y["background-color"]=b),s.push(`<span style="${l_(y)}">${a_(m)}</span>`)}}return s.join("")}const Gy={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)"},Ky={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 a_(n){return n.replace(/[&"<>]/g,e=>({"&":"&",'"':""","<":"<",">":">"})[e])}function l_(n){return Object.entries(n).map(([e,i])=>`${e}: ${i}`).join("; ")}const o_=({error:n})=>{const e=z.useMemo(()=>el(n),[n]);return S.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},p0=({cursor:n,onPaneMouseMove:e,onPaneMouseUp:i,onPaneDoubleClick:s})=>(ot.useEffect(()=>{const a=document.createElement("div");return a.style.position="fixed",a.style.top="0",a.style.right="0",a.style.bottom="0",a.style.left="0",a.style.zIndex="9999",a.style.cursor=n,document.body.appendChild(a),e&&a.addEventListener("mousemove",e),i&&a.addEventListener("mouseup",i),s&&document.body.addEventListener("dblclick",s),()=>{e&&a.removeEventListener("mousemove",e),i&&a.removeEventListener("mouseup",i),s&&document.body.removeEventListener("dblclick",s),document.body.removeChild(a)}},[n,e,i,s]),S.jsx(S.Fragment,{})),c_={position:"absolute",top:0,right:0,bottom:0,left:0},g0=({orientation:n,offsets:e,setOffsets:i,resizerColor:s,resizerWidth:a,minColumnWidth:o})=>{const u=o||0,[f,d]=ot.useState(null),[p,m]=os(),y={position:"absolute",right:n==="horizontal"?void 0:0,bottom:n==="horizontal"?0:void 0,width:n==="horizontal"?7:void 0,height:n==="horizontal"?void 0:7,borderTopWidth:n==="horizontal"?void 0:(7-a)/2,borderRightWidth:n==="horizontal"?(7-a)/2:void 0,borderBottomWidth:n==="horizontal"?void 0:(7-a)/2,borderLeftWidth:n==="horizontal"?(7-a)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:n==="horizontal"?"ew-resize":"ns-resize"};return S.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-a)/2,zIndex:100,pointerEvents:"none"},ref:m,children:[!!f&&S.jsx(p0,{cursor:n==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:v=>{if(!v.buttons)d(null);else if(f){const b=n==="horizontal"?v.clientX-f.clientX:v.clientY-f.clientY,E=f.offset+b,x=f.index>0?e[f.index-1]:0,_=n==="horizontal"?p.width:p.height,N=Math.min(Math.max(x+u,E),_-u)-e[f.index];for(let k=f.index;k<e.length;++k)e[k]=e[k]+N;i([...e])}}}),e.map((v,b)=>S.jsx("div",{style:{...y,top:n==="horizontal"?0:v,left:n==="horizontal"?v:0,pointerEvents:"initial"},onMouseDown:E=>d({clientX:E.clientX,clientY:E.clientY,offset:v,index:b}),children:S.jsx("div",{style:{...c_,background:s}})},b))]})};async function Jf(n){const e=new Image;return n&&(e.src=n,await new Promise((i,s)=>{e.onload=i,e.onerror=i})),e}const xh={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`},u_=({diff:n,noTargetBlank:e,hideDetails:i})=>{const[s,a]=z.useState(n.diff?"diff":"actual"),[o,u]=z.useState(!1),[f,d]=z.useState(null),[p,m]=z.useState("Expected"),[y,v]=z.useState(null),[b,E]=z.useState(null),[x,_]=os();z.useEffect(()=>{(async()=>{var R,ie,le,I;d(await Jf((R=n.expected)==null?void 0:R.attachment.path)),m(((ie=n.expected)==null?void 0:ie.title)||"Expected"),v(await Jf((le=n.actual)==null?void 0:le.attachment.path)),E(await Jf((I=n.diff)==null?void 0:I.attachment.path))})()},[n]);const N=f&&y&&b,k=N?Math.max(f.naturalWidth,y.naturalWidth,200):500,$=N?Math.max(f.naturalHeight,y.naturalHeight,200):500,V=Math.min(1,(x.width-30)/k),L=Math.min(1,(x.width-50)/k/2),G=k*V,Z=$*V,q={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return S.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:_,children:N&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[n.diff&&S.jsx("div",{style:{...q,fontWeight:s==="diff"?600:"initial"},onClick:()=>a("diff"),children:"Diff"}),S.jsx("div",{style:{...q,fontWeight:s==="actual"?600:"initial"},onClick:()=>a("actual"),children:"Actual"}),S.jsx("div",{style:{...q,fontWeight:s==="expected"?600:"initial"},onClick:()=>a("expected"),children:p}),S.jsx("div",{style:{...q,fontWeight:s==="sxs"?600:"initial"},onClick:()=>a("sxs"),children:"Side by side"}),S.jsx("div",{style:{...q,fontWeight:s==="slider"?600:"initial"},onClick:()=>a("slider"),children:"Slider"})]}),S.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:Z+60},children:[n.diff&&s==="diff"&&S.jsx(Gn,{image:b,alt:"Diff",hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),n.diff&&s==="actual"&&S.jsx(Gn,{image:y,alt:"Actual",hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),n.diff&&s==="expected"&&S.jsx(Gn,{image:f,alt:p,hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),n.diff&&s==="slider"&&S.jsx(f_,{expectedImage:f,actualImage:y,hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V,expectedTitle:p}),n.diff&&s==="sxs"&&S.jsxs("div",{style:{display:"flex"},children:[S.jsx(Gn,{image:f,title:p,hideSize:i,canvasWidth:L*k,canvasHeight:L*$,scale:L}),S.jsx(Gn,{image:o?b:y,title:o?"Diff":"Actual",onClick:()=>u(!o),hideSize:i,canvasWidth:L*k,canvasHeight:L*$,scale:L})]}),!n.diff&&s==="actual"&&S.jsx(Gn,{image:y,title:"Actual",hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),!n.diff&&s==="expected"&&S.jsx(Gn,{image:f,title:p,hideSize:i,canvasWidth:G,canvasHeight:Z,scale:V}),!n.diff&&s==="sxs"&&S.jsxs("div",{style:{display:"flex"},children:[S.jsx(Gn,{image:f,title:p,canvasWidth:L*k,canvasHeight:L*$,scale:L}),S.jsx(Gn,{image:y,title:"Actual",canvasWidth:L*k,canvasHeight:L*$,scale:L})]})]}),!i&&S.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[S.jsx("div",{children:n.diff&&S.jsx("a",{target:"_blank",href:n.diff.attachment.path,rel:"noreferrer",children:n.diff.attachment.name})}),S.jsx("div",{children:S.jsx("a",{target:e?"":"_blank",href:n.actual.attachment.path,rel:"noreferrer",children:n.actual.attachment.name})}),S.jsx("div",{children:S.jsx("a",{target:e?"":"_blank",href:n.expected.attachment.path,rel:"noreferrer",children:n.expected.attachment.name})})]})]})})},f_=({expectedImage:n,actualImage:e,canvasWidth:i,canvasHeight:s,scale:a,expectedTitle:o,hideSize:u})=>{const f={position:"absolute",top:0,left:0},[d,p]=z.useState(i/2),m=n.naturalWidth===e.naturalWidth&&n.naturalHeight===e.naturalHeight;return S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!u&&S.jsxs("div",{style:{margin:5},children:[!m&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),S.jsx("span",{children:n.naturalWidth}),S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),S.jsx("span",{children:n.naturalHeight}),!m&&S.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!m&&S.jsx("span",{children:e.naturalWidth}),!m&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!m&&S.jsx("span",{children:e.naturalHeight})]}),S.jsxs("div",{style:{position:"relative",width:i,height:s,margin:15,...xh},children:[S.jsx(g0,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),S.jsx("img",{alt:o,style:{width:n.naturalWidth*a,height:n.naturalHeight*a},draggable:"false",src:n.src}),S.jsx("div",{style:{...f,bottom:0,overflow:"hidden",width:d,...xh},children:S.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*a,height:e.naturalHeight*a},draggable:"false",src:e.src})})]})]})},Gn=({image:n,title:e,alt:i,hideSize:s,canvasWidth:a,canvasHeight:o,scale:u,onClick:f})=>S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!s&&S.jsxs("div",{style:{margin:5},children:[e&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),S.jsx("span",{children:n.naturalWidth}),S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),S.jsx("span",{children:n.naturalHeight})]}),S.jsx("div",{style:{display:"flex",flex:"none",width:a,height:o,margin:15,...xh},children:S.jsx("img",{width:n.naturalWidth*u,height:n.naturalHeight*u,alt:e||i,style:{cursor:f?"pointer":"initial"},draggable:"false",src:n.src,onClick:f})})]}),h_="modulepreload",d_=function(n,e){return new URL(n,e).href},Yy={},p_=function(e,i,s){let a=Promise.resolve();if(i&&i.length>0){let u=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const f=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));a=u(i.map(m=>{if(m=d_(m,s),m in Yy)return;Yy[m]=!0;const y=m.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(!!s)for(let x=f.length-1;x>=0;x--){const _=f[x];if(_.href===m&&(!y||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${v}`))return;const E=document.createElement("link");if(E.rel=y?"stylesheet":h_,y||(E.as="script"),E.crossOrigin="",E.href=m,p&&E.setAttribute("nonce",p),document.head.appendChild(E),y)return new Promise((x,_)=>{E.addEventListener("load",x),E.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return a.then(u=>{for(const f of u||[])f.status==="rejected"&&o(f.reason);return e().catch(o)})},g_=20,br=({text:n,highlighter:e,mimeType:i,linkify:s,readOnly:a,highlight:o,revealLine:u,lineNumbers:f,isFocused:d,focusOnChange:p,wrapLines:m,onChange:y,dataTestId:v,placeholder:b})=>{const[E,x]=os(),[_]=z.useState(p_(()=>import("./codeMirrorModule-DkmsYcws.js"),__vite__mapDeps([0,1]),import.meta.url).then(V=>V.default)),N=z.useRef(null),[k,$]=z.useState();return z.useEffect(()=>{(async()=>{var q,R;const V=await _;y_(V);const L=x.current;if(!L)return;const G=v_(e)||b_(i)||(s?"text/linkified":"");if(N.current&&G===N.current.cm.getOption("mode")&&!!a===N.current.cm.getOption("readOnly")&&f===N.current.cm.getOption("lineNumbers")&&m===N.current.cm.getOption("lineWrapping")&&b===N.current.cm.getOption("placeholder"))return;(R=(q=N.current)==null?void 0:q.cm)==null||R.getWrapperElement().remove();const Z=V(L,{value:"",mode:G,readOnly:!!a,lineNumbers:f,lineWrapping:m,placeholder:b,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-F":"findPersistent","Cmd-F":"findPersistent"}});return N.current={cm:Z},d&&Z.focus(),$(Z),Z})()},[_,k,x,e,i,s,f,m,a,d,b]),z.useEffect(()=>{N.current&&N.current.cm.setSize(E.width,E.height)},[E]),z.useLayoutEffect(()=>{var G;if(!k)return;let V=!1;if(k.getValue()!==n&&(k.setValue(n),V=!0,p&&(k.execCommand("selectAll"),k.focus())),V||JSON.stringify(o)!==JSON.stringify(N.current.highlight)){for(const R of N.current.highlight||[])k.removeLineClass(R.line-1,"wrap");for(const R of o||[])k.addLineClass(R.line-1,"wrap",`source-line-${R.type}`);for(const R of N.current.widgets||[])k.removeLineWidget(R);for(const R of N.current.markers||[])R.clear();const Z=[],q=[];for(const R of o||[]){if(R.type!=="subtle-error"&&R.type!=="error")continue;const ie=(G=N.current)==null?void 0:G.cm.getLine(R.line-1);if(ie){const le={};le.title=R.message||"",q.push(k.markText({line:R.line-1,ch:0},{line:R.line-1,ch:R.column||ie.length},{className:"source-line-error-underline",attributes:le}))}if(R.type==="error"){const le=document.createElement("div");le.innerHTML=el(R.message||""),le.className="source-line-error-widget",Z.push(k.addLineWidget(R.line,le,{above:!0,coverGutter:!1}))}}N.current.highlight=o,N.current.widgets=Z,N.current.markers=q}typeof u=="number"&&N.current.cm.lineCount()>=u&&k.scrollIntoView({line:Math.max(0,u-1),ch:0},50);let L;return y&&(L=()=>y(k.getValue()),k.on("change",L)),()=>{L&&k.off("change",L)}},[k,n,o,u,p,y]),S.jsx("div",{"data-testid":v,className:"cm-wrapper",ref:x,onClick:m_})};function m_(n){var i;if(!(n.target instanceof HTMLElement))return;let e;n.target.classList.contains("cm-linkified")?e=n.target.textContent:n.target.classList.contains("cm-link")&&((i=n.target.nextElementSibling)!=null&&i.classList.contains("cm-url"))&&(e=n.target.nextElementSibling.textContent.slice(1,-1)),e&&(n.preventDefault(),n.stopPropagation(),window.open(e,"_blank"))}let Xy=!1;function y_(n){Xy||(Xy=!0,n.defineSimpleMode("text/linkified",{start:[{regex:Rb,token:"linkified"}]}))}function b_(n){if(n){if(n.includes("javascript")||n.includes("json"))return"javascript";if(n.includes("python"))return"python";if(n.includes("csharp"))return"text/x-csharp";if(n.includes("java"))return"text/x-java";if(n.includes("markdown"))return"markdown";if(n.includes("html")||n.includes("svg"))return"htmlmixed";if(n.includes("css"))return"css"}}function v_(n){if(n)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[n]}function S_(n){return!!n.match(/^(application\/json|application\/.*?\+json|text\/(x-)?json)(;\s*charset=.*)?$/)}function w_(n){return!!n.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const m0=({title:n,children:e,setExpanded:i,expanded:s,expandOnTitleClick:a,className:o})=>{const u=z.useId(),f=z.useId(),d=z.useCallback(()=>i(!s),[s,i]),p=S.jsx("div",{className:Ke("codicon",s?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:a?void 0:d});return S.jsxs("div",{className:Ke("expandable",s&&"expanded",o),children:[a?S.jsxs("div",{id:u,role:"button","aria-expanded":s,"aria-controls":f,className:"expandable-title",onClick:d,children:[p,n]}):S.jsxs("div",{className:"expandable-title",children:[p,n]}),s&&S.jsx("div",{id:f,"aria-labelledby":u,role:"region",className:"expandable-content",children:e})]})};function y0(n){const e=[];let i=0,s;for(;(s=Rb.exec(n))!==null;){const o=n.substring(i,s.index);o&&e.push(o);const u=s[0];e.push(x_(u)),i=s.index+u.length}const a=n.substring(i);return a&&e.push(a),e}function x_(n){let e=n;return e.startsWith("www.")&&(e="https://"+e),S.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:n})}const b0=z.createContext(void 0),Fn=()=>z.useContext(b0),__=({attachment:n,reveal:e})=>{const i=Fn(),[s,a]=z.useState(!1),[o,u]=z.useState(null),[f,d]=z.useState(null),[p,m]=F1(),y=z.useRef(null),v=w_(n.contentType),b=!!n.sha1||!!n.path;z.useEffect(()=>{var _;if(e)return(_=y.current)==null||_.scrollIntoView({behavior:"smooth"}),m()},[e,m]),z.useEffect(()=>{s&&o===null&&f===null&&(d("Loading ..."),fetch(hc(i,n)).then(_=>_.text()).then(_=>{u(_),d(null)}).catch(_=>{d("Failed to load: "+_.message)}))},[i,s,o,f,n]);const E=z.useMemo(()=>{const _=o?o.split(`
|
|
60
|
+
`).length:0;return Math.min(Math.max(5,_),20)*g_},[o]),x=S.jsxs("span",{style:{marginLeft:5},ref:y,"aria-label":n.name,children:[S.jsx("span",{children:y0(n.name)}),b&&S.jsx("a",{style:{marginLeft:5},href:qo(i,n),children:"download"})]});return!v||!b?S.jsx("div",{style:{marginLeft:20},children:x}):S.jsxs("div",{className:Ke(p&&"yellow-flash"),children:[S.jsx(m0,{title:x,expanded:s,setExpanded:a,expandOnTitleClick:!0,children:f&&S.jsx("i",{children:f})}),s&&o!==null&&S.jsx("div",{className:"vbox",style:{height:E},children:S.jsx(br,{text:o,readOnly:!0,mimeType:n.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},T_=({revealedAttachmentCallId:n})=>{const e=Fn(),{diffMap:i,screenshots:s,attachments:a}=z.useMemo(()=>{const o=new Set((e==null?void 0:e.visibleAttachments)??[]),u=new Set,f=new Map;for(const d of o){if(!d.path&&!d.sha1)continue;const p=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(p){const m=p[1],y=p[2],v=f.get(m)||{expected:void 0,actual:void 0,diff:void 0};v[y]=d,f.set(m,v),o.delete(d)}else d.contentType.startsWith("image/")&&(u.add(d),o.delete(d))}return{diffMap:f,attachments:o,screenshots:u}},[e]);return!i.size&&!s.size&&!a.size?S.jsx(cs,{text:"No attachments"}):S.jsxs("div",{className:"attachments-tab",children:[[...i.values()].map(({expected:o,actual:u,diff:f})=>S.jsxs(S.Fragment,{children:[o&&u&&S.jsx("div",{className:"attachments-section",children:"Image diff"}),o&&u&&S.jsx(u_,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:qo(e,o)},title:"Expected"},actual:{attachment:{...u,path:qo(e,u)}},diff:f?{attachment:{...f,path:qo(e,f)}}:void 0}})]})),s.size?S.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...s.values()].map((o,u)=>{const f=hc(e,o);return S.jsxs("div",{className:"attachment-item",children:[S.jsx("div",{children:S.jsx("img",{draggable:"false",src:f})}),S.jsx("div",{children:S.jsx("a",{target:"_blank",href:f,rel:"noreferrer",children:o.name})})]},`screenshot-${u}`)}),a.size?S.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...a.values()].map((o,u)=>S.jsx("div",{className:"attachment-item",children:S.jsx(__,{attachment:o,reveal:n&&o.callId===n.callId?n:void 0})},E_(o,u)))]})};function hc(n,e){return n&&e.sha1?n.createRelativeUrl(`sha1/${e.sha1}`):`file?path=${encodeURIComponent(e.path)}`}function qo(n,e){let i=e.contentType?`&dn=${encodeURIComponent(e.name)}`:"";return e.contentType&&(i+=`&dct=${encodeURIComponent(e.contentType)}`),hc(n,e)+i}function E_(n,e){return e+"-"+(n.sha1?"sha1-"+n.sha1:"path-"+n.path)}const A_=`
|
|
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 N_({testInfo:n,metadata:e,errorContext:i,errors:s,buildCodeFrame:a,stdout:o,stderr:u}){var y;const f=new Set(s.filter(v=>v.message&&!v.message.includes(`
|
|
67
|
+
`)).map(v=>v.message));for(const v of s)for(const b of f.keys())(y=v.message)!=null&&y.includes(b)&&f.delete(b);const d=s.filter(v=>!(!v.message||!v.message.includes(`
|
|
68
|
+
`)&&!f.has(v.message)));if(!d.length)return;const p=[A_,"# Test info","",n];o&&p.push("","# Stdout","","```",$o(o),"```"),u&&p.push("","# Stderr","","```",$o(u),"```"),p.push("","# Error details");for(const v of d)p.push("","```",$o(v.message||""),"```");i&&p.push(i);const m=await a(d[d.length-1]);return m&&p.push("","# Test source","","```ts",m,"```"),e!=null&&e.gitDiff&&p.push("","# Local changes","","```diff",e.gitDiff,"```"),p.join(`
|
|
69
|
+
`)}const C_=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 $o(n){return n.replace(C_,"")}const k_=fc,M_=({stack:n,setSelectedFrame:e,selectedFrame:i})=>{const s=n||[];return S.jsx(k_,{name:"stack-trace",ariaLabel:"Stack trace",items:s,selectedItem:s[i],render:a=>{const o=a.file[1]===":"?"\\":"/";return S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"stack-trace-frame-function",children:a.function||"(anonymous)"}),S.jsx("span",{className:"stack-trace-frame-location",children:a.file.split(o).pop()}),S.jsx("span",{className:"stack-trace-frame-line",children:":"+a.line})]})},onSelected:a=>e(s.indexOf(a))})},Xh=({noShadow:n,children:e,noMinHeight:i,className:s,sidebarBackground:a,onClick:o})=>S.jsx("div",{className:Ke("toolbar",n&&"no-shadow",i&&"no-min-height",s,a&&"toolbar-sidebar-background"),onClick:o,children:e});function O_(n,e,i,s,a){const o=Fn();return Po(async()=>{var b,E,x,_;const u=n==null?void 0:n[e],f=u!=null&&u.file?u:a;if(!f)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const d=f.file;let p=i.get(d);p||(p={errors:((b=a==null?void 0:a.source)==null?void 0:b.errors)||[],content:(E=a==null?void 0:a.source)==null?void 0:E.content},i.set(d,p));const m=(f==null?void 0:f.line)||((x=p.errors[0])==null?void 0:x.line)||0,y=s&&d.startsWith(s)?d.substring(s.length+1):d,v=p.errors.map(N=>({type:"error",line:N.line,message:N.message}));if(v.push({line:m,type:"running"}),((_=a==null?void 0:a.source)==null?void 0:_.content)!==void 0)p.content=a.source.content;else if(p.content===void 0||f===a){const N=await v0(d);try{let k=o?await fetch(o.createRelativeUrl(`sha1/src@${N}.txt`)):void 0;(!k||k.status===404)&&(k=await fetch(`file?path=${encodeURIComponent(d)}`)),k.status>=400?p.content="":p.content=await k.text()}catch{p.content=`<Unable to read "${d}">`}}return{model:o,source:p,highlight:v,targetLine:m,fileName:y,location:f}},[n,e,s,a],{source:{errors:[],content:"Loading…"},highlight:[]})}const L_=({stack:n,sources:e,rootDir:i,fallbackLocation:s,stackFrameLocation:a,onOpenExternally:o})=>{const[u,f]=z.useState(),[d,p]=z.useState(0);z.useEffect(()=>{u!==n&&(f(n),p(0))},[n,u,f,p]);const{source:m,highlight:y,targetLine:v,fileName:b,location:E}=O_(n,d,e,i,s),x=z.useCallback(()=>{E&&(o?o(E):window.location.href=`vscode://file//${E.file}:${E.line}`)},[o,E]),_=((n==null?void 0:n.length)??0)>1,N=R_(b),k=N.endsWith(".md")?"markdown":"javascript";return S.jsx(Qo,{sidebarSize:200,orientation:a==="bottom"?"vertical":"horizontal",sidebarHidden:!_,main:S.jsxs("div",{className:"vbox","data-testid":"source-code",children:[b&&S.jsxs(Xh,{children:[S.jsx("div",{className:"source-tab-file-name",title:b,children:S.jsx("div",{children:N})}),S.jsx(Yh,{description:"Copy filename",value:N}),E&&S.jsx(jt,{icon:"link-external",title:"Open in VS Code",onClick:x})]}),S.jsx(br,{text:m.content||"",highlighter:k,highlight:y,revealLine:v,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:S.jsx(M_,{stack:n,selectedFrame:d,setSelectedFrame:p})})};async function v0(n){const e=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-1",e),s=[],a=new DataView(i);for(let o=0;o<a.byteLength;o+=1){const u=a.getUint8(o).toString(16).padStart(2,"0");s.push(u)}return s.join("")}function R_(n){if(!n)return"";const e=n!=null&&n.includes("/")?"/":"\\";return(n==null?void 0:n.split(e).pop())??""}const j_=({prompt:n})=>S.jsx(Ho,{value:n,description:"Copy prompt",copiedDescription:S.jsxs(S.Fragment,{children:["Copied ",S.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function D_(n){return z.useMemo(()=>{if(!n)return{errors:new Map};const e=new Map;for(const i of n.errorDescriptors)e.set(i.message,i);return{errors:e}},[n])}function B_({message:n,error:e,sdkLanguage:i,revealInSource:s}){var f;let a,o;const u=(f=e.stack)==null?void 0:f[0];return u&&(a=u.file.replace(/.*[/\\](.*)/,"$1")+":"+u.line,o=u.file+":"+u.line),S.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[S.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&Kh(e.action,{sdkLanguage:i}),a&&S.jsxs("div",{className:"action-location",children:["@ ",S.jsx("span",{title:o,onClick:()=>s(e),children:a})]})]}),S.jsx(o_,{error:n})]})}const U_=({errorsModel:n,sdkLanguage:e,revealInSource:i,wallTime:s,testRunMetadata:a})=>{const o=Fn(),u=Po(async()=>{const p=o==null?void 0:o.attachments.find(m=>m.name==="error-context");if(p)return await fetch(hc(o,p)).then(m=>m.text())},[o],void 0),f=z.useCallback(async p=>{var b;const m=(b=p.stack)==null?void 0:b[0];if(!m)return;let y=o?await fetch(o.createRelativeUrl(`sha1/src@${await v0(m.file)}.txt`)):void 0;if((!y||y.status===404)&&(y=await fetch(`file?path=${encodeURIComponent(m.file)}`)),y.status>=400)return;const v=await y.text();return z_({source:v,message:$o(p.message).split(`
|
|
70
|
+
`)[0]||void 0,location:m,linesAbove:100,linesBelow:100})},[o]),d=Po(()=>N_({testInfo:(o==null?void 0:o.title)??"",metadata:a,errorContext:u,errors:(o==null?void 0:o.errorDescriptors)??[],buildCodeFrame:f}),[u,a,o,f],void 0);return n.errors.size?S.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[S.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:d&&S.jsx(j_,{prompt:d})}),[...n.errors.entries()].map(([p,m])=>{const y=`error-${s}-${p}`;return S.jsx(B_,{message:p,error:m,revealInSource:i,sdkLanguage:e},y)})]}):S.jsx(cs,{text:"No errors"})};function z_({source:n,message:e,location:i,linesAbove:s,linesBelow:a}){const o=n.split(`
|
|
71
|
+
`).slice(),u=Math.max(0,i.line-s-1),f=Math.min(o.length,i.line+a),d=o.slice(u,f),p=String(f).length,m=d.map((y,v)=>`${u+v+1===i.line?"> ":" "}${(u+v+1).toString().padEnd(p," ")} | ${y}`);return e&&m.splice(i.line-u,0,`${" ".repeat(p+2)} | ${" ".repeat(i.column-2)} ^ ${e}`),m.join(`
|
|
72
|
+
`)}const H_=fc;function q_(n,e){const{entries:i}=z.useMemo(()=>{if(!n)return{entries:[]};const a=[];function o(f){var m,y,v,b,E,x;const d=a[a.length-1];d&&((m=f.browserMessage)==null?void 0:m.bodyString)===((y=d.browserMessage)==null?void 0:y.bodyString)&&((v=f.browserMessage)==null?void 0:v.location)===((b=d.browserMessage)==null?void 0:b.location)&&f.browserError===d.browserError&&((E=f.nodeMessage)==null?void 0:E.html)===((x=d.nodeMessage)==null?void 0:x.html)&&f.isError===d.isError&&f.isWarning===d.isWarning&&f.timestamp-d.timestamp<1e3?d.repeat++:a.push({...f,repeat:1})}const u=[...n.events,...n.stdio].sort((f,d)=>{const p="time"in f?f.time:f.timestamp,m="time"in d?d.time:d.timestamp;return p-m});for(const f of u){if(f.type==="console"){const d=f.args&&f.args.length?I_(f.args):S0(f.text),p=f.location.url,y=`${p?p.substring(p.lastIndexOf("/")+1):"<anonymous>"}:${f.location.lineNumber}`;o({browserMessage:{body:d,bodyString:f.text,location:y},isError:f.messageType==="error",isWarning:f.messageType==="warning",timestamp:f.time})}if(f.type==="event"&&f.method==="pageError"&&o({browserError:f.params.error,isError:!0,isWarning:!1,timestamp:f.time}),f.type==="stderr"||f.type==="stdout"){let d="";f.text&&(d=el(f.text.trim())||""),f.base64&&(d=el(atob(f.base64).trim())||""),o({nodeMessage:{html:d},isError:f.type==="stderr",isWarning:!1,timestamp:f.timestamp})}}return{entries:a}},[n]);return{entries:z.useMemo(()=>e?i.filter(a=>a.timestamp>=e.minimum&&a.timestamp<=e.maximum):i,[i,e])}}const $_=({consoleModel:n,boundaries:e,onEntryHovered:i,onAccepted:s})=>n.entries.length?S.jsx("div",{className:"console-tab",children:S.jsx(H_,{name:"console",onAccepted:s,onHighlighted:a=>i==null?void 0:i(a?n.entries.indexOf(a):void 0),items:n.entries,isError:a=>a.isError,isWarning:a=>a.isWarning,render:a=>{const o=xt(a.timestamp-e.minimum),u=S.jsx("span",{className:"console-time",children:o}),f=a.isError?"status-error":a.isWarning?"status-warning":"status-none",d=a.browserMessage||a.browserError?S.jsx("span",{className:Ke("codicon","codicon-browser",f),title:"Browser message"}):S.jsx("span",{className:Ke("codicon","codicon-file",f),title:"Runner message"});let p,m,y,v;const{browserMessage:b,browserError:E,nodeMessage:x}=a;if(b&&(p=b.location,m=b.body),E){const{error:_,value:N}=E;_?(m=_.message,v=_.stack):m=String(N)}return x&&(y=x.html),S.jsxs("div",{className:"console-line",children:[u,d,p&&S.jsx("span",{className:"console-location",children:p}),a.repeat>1&&S.jsx("span",{className:"console-repeat",children:a.repeat}),m&&S.jsx("span",{className:"console-line-message",children:m}),y&&S.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),v&&S.jsx("div",{className:"console-stack",children:v})]})}})}):S.jsx(cs,{text:"No console entries"});function I_(n){if(n.length===1)return S0(n[0].preview);const e=typeof n[0].value=="string"&&n[0].value.includes("%"),i=e?n[0].value:"",s=e?n.slice(1):n;let a=0;const o=/%([%sdifoOc])/g;let u;const f=[];let d=[];f.push(S.jsx("span",{children:d},f.length+1));let p=0;for(;(u=o.exec(i))!==null;){const m=i.substring(p,u.index);d.push(S.jsx("span",{children:m},d.length+1)),p=u.index+2;const y=u[0][1];if(y==="%")d.push(S.jsx("span",{children:"%"},d.length+1));else if(y==="s"||y==="o"||y==="O"||y==="d"||y==="i"||y==="f"){const v=s[a++],b={};typeof(v==null?void 0:v.value)!="string"&&(b.color="var(--vscode-debugTokenExpression-number)"),d.push(S.jsx("span",{style:b,children:(v==null?void 0:v.preview)||""},d.length+1))}else if(y==="c"){d=[];const v=s[a++],b=v?V_(v.preview):{};f.push(S.jsx("span",{style:b,children:d},f.length+1))}}for(p<i.length&&d.push(S.jsx("span",{children:i.substring(p)},d.length+1));a<s.length;a++){const m=s[a],y={};d.length&&d.push(S.jsx("span",{children:" "},d.length+1)),typeof(m==null?void 0:m.value)!="string"&&(y.color="var(--vscode-debugTokenExpression-number)"),d.push(S.jsx("span",{style:y,children:(m==null?void 0:m.preview)||""},d.length+1))}return f}function S0(n){return[S.jsx("span",{dangerouslySetInnerHTML:{__html:el(n.trim())}})]}function V_(n){try{const e={},i=n.split(";");for(const s of i){const a=s.trim();if(!a)continue;let[o,u]=a.split(":");if(o=o.trim(),u=u.trim(),!G_(o))continue;const f=o.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[f]=u}return e}catch{return{}}}function G_(n){return["background","border","color","font","line","margin","padding","text"].some(i=>n.startsWith(i))}const _h=({tabs:n,selectedTab:e,setSelectedTab:i,leftToolbar:s,rightToolbar:a,dataTestId:o,mode:u})=>{const f=z.useId();return e||(e=n[0].id),u||(u="default"),S.jsx("div",{className:"tabbed-pane","data-testid":o,children:S.jsxs("div",{className:"vbox",children:[S.jsxs(Xh,{children:[s&&S.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...s]}),u==="default"&&S.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...n.map(d=>S.jsx(w0,{id:d.id,ariaControls:`${f}-${d.id}`,title:d.title,count:d.count,errorCount:d.errorCount,selected:e===d.id,onSelect:i},d.id))]}),u==="select"&&S.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:S.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:e,onChange:d=>{i==null||i(n[d.currentTarget.selectedIndex].id)},children:n.map(d=>{let p="";return d.count&&(p=` (${d.count})`),d.errorCount&&(p=` (${d.errorCount})`),S.jsxs("option",{value:d.id,role:"tab","aria-controls":`${f}-${d.id}`,children:[d.title,p]},d.id)})})}),a&&S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...a]})]}),n.map(d=>{const p="tab-content tab-"+d.id;if(d.component)return S.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,style:{display:e===d.id?"inherit":"none"},children:d.component},d.id);if(e===d.id)return S.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,children:d.render()},d.id)})]})})},w0=({id:n,title:e,count:i,errorCount:s,selected:a,onSelect:o,ariaControls:u})=>S.jsxs("div",{className:Ke("tabbed-pane-tab",a&&"selected"),onClick:()=>o==null?void 0:o(n),role:"tab",title:e,"aria-controls":u,"aria-selected":a,children:[S.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!i&&S.jsx("div",{className:"tabbed-pane-tab-counter",children:i}),!!s&&S.jsx("div",{className:"tabbed-pane-tab-counter error",children:s})]});async function K_(n,e){const i=navigator.platform.includes("Win")?"win":"unix";let s=[];const a=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function o(v){return'^"'+v.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 u(v){function b(E){let _=E.charCodeAt(0).toString(16);for(;_.length<4;)_="0"+_;return"\\u"+_}return/[\0-\x1F\x7F-\x9F!]|\'/.test(v)?"$'"+v.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,b)+"'":"'"+v+"'"}const f=i==="win"?o:u;s.push(f(e.request.url).replace(/[[{}\]]/g,"\\$&"));let d="GET";const p=[],m=await x0(n,e);m&&(p.push("--data-raw "+f(m)),a.add("content-length"),d="POST"),e.request.method!==d&&s.push("-X "+f(e.request.method));const y=e.request.headers;for(let v=0;v<y.length;v++){const b=y[v],E=b.name.replace(/^:/,"");if(a.has(E.toLowerCase()))continue;const x=b.value;x.trim()?E.toLowerCase()==="cookie"?s.push("-b "+f(x)):s.push("-H "+f(E+": "+x)):s.push("-H "+f(E+";"))}return s=s.concat(p),"curl "+s.join(s.length>=3?i==="win"?` ^
|
|
75
|
+
`:` \\
|
|
76
|
+
`:" ")}async function Y_(n,e,i=0){const s=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"]),a=new Set(["cookie","authorization"]),o=JSON.stringify(e.request.url),u=e.request.headers,f=u.reduce((x,_)=>{const N=_.name;return!s.has(N.toLowerCase())&&!N.includes(":")&&x.append(N,_.value),x},new Headers),d={};for(const x of f)d[x[0]]=x[1];const p=e.request.cookies.length||u.some(({name:x})=>a.has(x.toLowerCase()))?"include":"omit",m=u.find(({name:x})=>x.toLowerCase()==="referer"),y=m?m.value:void 0,v=await x0(n,e),b={headers:Object.keys(d).length?d:void 0,referrer:y,body:v,method:e.request.method,mode:"cors"};if(i===1){const x=u.find(N=>N.name.toLowerCase()==="cookie"),_={};delete b.mode,x&&(_.cookie=x.value),y&&(delete b.referrer,_.Referer=y),Object.keys(_).length&&(b.headers={...d,..._})}else b.credentials=p;const E=JSON.stringify(b,null,2);return`fetch(${o}, ${E});`}async function x0(n,e){var i,s;return n&&((i=e.request.postData)!=null&&i._sha1)?await fetch(n.createRelativeUrl(`sha1/${e.request.postData._sha1}`)).then(a=>a.text()):(s=e.request.postData)==null?void 0:s.text}class X_{generatePlaywrightRequestCall(e,i){let s=e.method.toLowerCase();const a=new URL(e.url),o=`${a.origin}${a.pathname}`,u={};["delete","get","head","post","put","patch"].includes(s)||(u.method=s,s="fetch"),a.searchParams.size&&(u.params=Object.fromEntries(a.searchParams.entries())),i&&(u.data=i),e.headers.length&&(u.headers=Object.fromEntries(e.headers.map(p=>[p.name,p.value])));const f=[`'${o}'`];return Object.keys(u).length>0&&f.push(this.prettyPrintObject(u)),`await page.request.${s}(${f.join(", ")});`}prettyPrintObject(e,i=2,s=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 f=" ".repeat(s*i),d=" ".repeat((s+1)*i);return`[
|
|
77
|
+
${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
|
|
78
|
+
`)}
|
|
79
|
+
${f}]`}if(Object.keys(e).length===0)return"{}";const a=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`{
|
|
80
|
+
${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1),m=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(f)?f:this.stringLiteral(f);return`${o}${m}: ${p}`}).join(`,
|
|
81
|
+
`)}
|
|
82
|
+
${a}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
|
|
83
|
+
`)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class P_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),o=[`"${`${s.origin}${s.pathname}`}"`];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`method="${u}"`),u="fetch"),s.searchParams.size&&o.push(`params=${this.prettyPrintObject(Object.fromEntries(s.searchParams.entries()))}`),i&&o.push(`data=${this.prettyPrintObject(i)}`),e.headers.length&&o.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(d=>[d.name,d.value])))}`);const f=o.length===1?o[0]:`
|
|
84
|
+
${o.map(d=>this.indent(d,2)).join(`,
|
|
85
|
+
`)}
|
|
86
|
+
`;return`await page.request.${u}(${f})`}indent(e,i){return e.split(`
|
|
87
|
+
`).map(s=>" ".repeat(i)+s).join(`
|
|
88
|
+
`)}prettyPrintObject(e,i=2,s=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 f=" ".repeat(s*i),d=" ".repeat((s+1)*i);return`[
|
|
89
|
+
${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
|
|
90
|
+
`)}
|
|
91
|
+
${f}]`}if(Object.keys(e).length===0)return"{}";const a=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`{
|
|
92
|
+
${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1);return`${o}${this.stringLiteral(f)}: ${p}`}).join(`,
|
|
93
|
+
`)}
|
|
94
|
+
${a}}`}stringLiteral(e){return JSON.stringify(e)}}class F_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),a=`${s.origin}${s.pathname}`,o={},u=[];let f=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(f)||(o.Method=f,f="fetch"),s.searchParams.size&&(o.Params=Object.fromEntries(s.searchParams.entries())),i&&(o.Data=i),e.headers.length&&(o.Headers=Object.fromEntries(e.headers.map(m=>[m.name,m.value])));const d=[`"${a}"`];return Object.keys(o).length>0&&d.push(this.prettyPrintObject(o)),`${u.join(`
|
|
95
|
+
`)}${u.length?`
|
|
96
|
+
`:""}await request.${this.toFunctionName(f)}(${d.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,i=2,s=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 f=" ".repeat(s*i),d=" ".repeat((s+1)*i);return`new object[] {
|
|
97
|
+
${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
|
|
98
|
+
`)}
|
|
99
|
+
${f}}`}if(Object.keys(e).length===0)return"new {}";const a=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`new() {
|
|
100
|
+
${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1),m=s===0?f:`[${this.stringLiteral(f)}]`;return`${o}${m} = ${p}`}).join(`,
|
|
101
|
+
`)}
|
|
102
|
+
${a}}`}stringLiteral(e){return JSON.stringify(e)}}class Q_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),a=[`"${s.origin}${s.pathname}"`],o=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`setMethod("${u}")`),u="fetch");for(const[f,d]of s.searchParams)o.push(`setQueryParam(${this.stringLiteral(f)}, ${this.stringLiteral(d)})`);i&&o.push(`setData(${this.stringLiteral(i)})`);for(const f of e.headers)o.push(`setHeader(${this.stringLiteral(f.name)}, ${this.stringLiteral(f.value)})`);return o.length>0&&a.push(`RequestOptions.create()
|
|
103
|
+
.${o.join(`
|
|
104
|
+
.`)}
|
|
105
|
+
`),`request.${u}(${a.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function Z_(n){if(n==="javascript")return new X_;if(n==="python")return new P_;if(n==="csharp")return new F_;if(n==="java")return new Q_;throw new Error("Unsupported language: "+n)}const J_=({resource:n,sdkLanguage:e,startTimeOffset:i,onClose:s})=>{const[a,o]=z.useState("headers"),u=Fn(),f=Po(async()=>{if(u&&n.request.postData){const d=n.request.headers.find(m=>m.name.toLowerCase()==="content-type"),p=d?d.value:"";if(n.request.postData._sha1){const m=await fetch(u.createRelativeUrl(`sha1/${n.request.postData._sha1}`));return{text:Th(await m.text(),p),mimeType:p}}else return{text:Th(n.request.postData.text,p),mimeType:p}}else return null},[n],null);return S.jsx(_h,{leftToolbar:[S.jsx(jt,{icon:"close",title:"Close",onClick:s},"close")],rightToolbar:[S.jsx(W_,{requestBody:f,resource:n,sdkLanguage:e},"dropdown")],tabs:[{id:"headers",title:"Headers",render:()=>S.jsx(eT,{resource:n,startTimeOffset:i})},{id:"payload",title:"Payload",render:()=>S.jsx(tT,{resource:n,requestBody:f})},{id:"response",title:"Response",render:()=>S.jsx(nT,{resource:n})}],selectedTab:a,setSelectedTab:o})},W_=({resource:n,sdkLanguage:e,requestBody:i})=>{const s=Fn(),a=S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>Z_(e).generatePlaywrightRequestCall(n.request,i==null?void 0:i.text);return S.jsxs("div",{className:"copy-request-dropdown",children:[S.jsxs(jt,{className:"copy-request-dropdown-toggle",children:[S.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",S.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),S.jsxs("div",{className:"copy-request-dropdown-menu",children:[S.jsx(Ho,{description:"Copy as cURL",copiedDescription:a,value:()=>K_(s,n)}),S.jsx(Ho,{description:"Copy as Fetch",copiedDescription:a,value:()=>Y_(s,n)}),S.jsx(Ho,{description:"Copy as Playwright",copiedDescription:a,value:o})]})]})},Ka=({title:n,data:e,showCount:i,children:s,className:a})=>{const[o,u]=sn(`trace-viewer-network-details-${n.replaceAll(" ","-")}`,!0);return S.jsxs(m0,{expanded:o,setExpanded:u,expandOnTitleClick:!0,title:S.jsxs("span",{className:"network-request-details-header",children:[n,i&&S.jsxs("span",{className:"network-request-details-header-count",children:[" × ",(e==null?void 0:e.length)??0]})]}),className:a,children:[e&&S.jsx("table",{className:"network-request-details-table",children:S.jsx("tbody",{children:e.map(({name:f,value:d},p)=>d!==null&&S.jsxs("tr",{children:[S.jsx("td",{children:f}),S.jsx("td",{children:d})]},p))})}),s]})},eT=({resource:n,startTimeOffset:e})=>{const i=z.useMemo(()=>Object.entries({URL:n.request.url,Method:n.request.method,"Status Code":n.response.status!==-1&&S.jsxs("span",{className:sT(n.response.status),children:[" ",n.response.status," ",n.response.statusText]}),Start:xt(e),Duration:xt(n.time)}).map(([s,a])=>({name:s,value:a})),[n,e]);return S.jsxs("div",{className:"vbox network-request-details-tab",children:[S.jsx(Ka,{title:"General",data:i}),S.jsx(Ka,{title:"Request Headers",showCount:!0,data:n.request.headers}),S.jsx(Ka,{title:"Response Headers",showCount:!0,data:n.response.headers})]})},tT=({resource:n,requestBody:e})=>S.jsxs("div",{className:"vbox network-request-details-tab",children:[n.request.queryString.length===0&&!e&&S.jsx("em",{className:"network-request-no-payload",children:"No payload for this request."}),n.request.queryString.length>0&&S.jsx(Ka,{title:"Query String Parameters",showCount:!0,data:n.request.queryString}),e&&S.jsx(Ka,{title:"Request Body",className:"network-request-request-body",children:S.jsx(br,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})})]}),nT=({resource:n})=>{const e=Fn(),[i,s]=z.useState(null);return z.useEffect(()=>{(async()=>{if(e&&n.response.content._sha1){const o=n.response.content.mimeType.includes("image"),u=n.response.content.mimeType.includes("font"),f=await fetch(e.createRelativeUrl(`sha1/${n.response.content._sha1}`));if(o){const d=await f.blob(),p=new FileReader,m=new Promise(y=>p.onload=y);p.readAsDataURL(d),s({dataUrl:(await m).target.result})}else if(u){const d=await f.arrayBuffer();s({font:d})}else{const d=Th(await f.text(),n.response.content.mimeType);s({text:d,mimeType:n.response.content.mimeType})}}else s(null)})()},[n,e]),S.jsxs("div",{className:"vbox network-request-details-tab",children:[!n.response.content._sha1&&S.jsx("div",{children:"Response body is not available for this request."}),i&&i.font&&S.jsx(iT,{font:i.font}),i&&i.dataUrl&&S.jsx("div",{children:S.jsx("img",{draggable:"false",src:i.dataUrl})}),i&&i.text&&S.jsx(br,{text:i.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0})]})},iT=({font:n})=>{const[e,i]=z.useState(!1);return z.useEffect(()=>{let s;try{s=new FontFace("font-preview",n),s.status==="loaded"&&document.fonts.add(s),s.status==="error"&&i(!0)}catch{i(!0)}return()=>{document.fonts.delete(s)}},[n]),e?S.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):S.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",S.jsx("br",{}),"NOPQRSTUVWXYZ",S.jsx("br",{}),"abcdefghijklm",S.jsx("br",{}),"nopqrstuvwxyz",S.jsx("br",{}),"1234567890"]})};function sT(n){return n<300||n===304?"green-circle":n<400?"yellow-circle":"red-circle"}function Th(n,e){if(n===null)return"Loading...";const i=n;if(i==="")return"<Empty>";if(S_(e))try{return JSON.stringify(JSON.parse(i),null,2)}catch{return i}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(i):i}function rT(n){const[e,i]=z.useState([]);z.useEffect(()=>{const o=[];for(let u=0;u<n.columns.length-1;++u){const f=n.columns[u];o[u]=(o[u-1]||0)+n.columnWidths.get(f)}i(o)},[n.columns,n.columnWidths]);function s(o){const u=new Map(n.columnWidths.entries());for(let f=0;f<o.length;++f){const d=o[f]-(o[f-1]||0),p=n.columns[f];u.set(p,d)}n.setColumnWidths(u)}const a=z.useCallback(o=>{var u,f;(f=n.setSorting)==null||f.call(n,{by:o,negate:((u=n.sorting)==null?void 0:u.by)===o?!n.sorting.negate:!1})},[n]);return S.jsxs("div",{className:`grid-view ${n.name}-grid-view`,children:[S.jsx(g0,{orientation:"horizontal",offsets:e,setOffsets:s,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),S.jsxs("div",{className:"vbox",children:[S.jsx("div",{className:"grid-view-header",children:n.columns.map((o,u)=>S.jsxs("div",{className:"grid-view-header-cell "+aT(o,n.sorting),style:{width:u<n.columns.length-1?n.columnWidths.get(o):void 0},onClick:()=>n.setSorting&&a(o),children:[S.jsx("span",{className:"grid-view-header-cell-title",children:n.columnTitle(o)}),S.jsx("span",{className:"codicon codicon-triangle-up"}),S.jsx("span",{className:"codicon codicon-triangle-down"})]},n.columnTitle(o)))}),S.jsx(fc,{name:n.name,items:n.items,ariaLabel:n.ariaLabel,id:n.id,render:(o,u)=>S.jsx(S.Fragment,{children:n.columns.map((f,d)=>{const{body:p,title:m}=n.render(o,f,u);return S.jsx("div",{className:`grid-view-cell grid-view-column-${String(f)}`,title:m,style:{width:d<n.columns.length-1?n.columnWidths.get(f):void 0},children:p},n.columnTitle(f))})}),icon:n.icon,isError:n.isError,isWarning:n.isWarning,isInfo:n.isInfo,selectedItem:n.selectedItem,onAccepted:n.onAccepted,onSelected:n.onSelected,onHighlighted:n.onHighlighted,onIconClicked:n.onIconClicked,noItemsMessage:n.noItemsMessage,dataTestId:n.dataTestId,notSelectable:n.notSelectable})]})]})}function aT(n,e){return n===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const lT=["Fetch","HTML","JS","CSS","Font","Image"],oT={searchValue:"",resourceTypes:new Set},cT=({filterState:n,onFilterStateChange:e})=>S.jsxs("div",{className:"network-filters",children:[S.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:n.searchValue,onChange:i=>e({...n,searchValue:i.target.value})}),S.jsxs("div",{className:"network-filters-resource-types",role:"tablist","aria-multiselectable":"true",children:[S.jsx("div",{title:"All",onClick:()=>e({...n,resourceTypes:new Set}),className:`network-filters-resource-type ${n.resourceTypes.size===0?"selected":""}`,children:"All"}),lT.map(i=>S.jsx("div",{title:i,onClick:s=>{let a;s.ctrlKey||s.metaKey?a=n.resourceTypes.symmetricDifference(new Set([i])):a=new Set([i]),e({...n,resourceTypes:a})},className:`network-filters-resource-type ${n.resourceTypes.has(i)?"selected":""}`,role:"tab","aria-selected":n.resourceTypes.has(i),children:i},i))]})]}),uT=rT;function fT(n,e){const i=z.useMemo(()=>((n==null?void 0:n.resources)||[]).filter(u=>e?!!u._monotonicTime&&u._monotonicTime>=e.minimum&&u._monotonicTime<=e.maximum:!0),[n,e]),s=z.useMemo(()=>new yT(n),[n]);return{resources:i,contextIdMap:s}}const hT=({boundaries:n,networkModel:e,onResourceHovered:i,sdkLanguage:s})=>{const[a,o]=z.useState(void 0),[u,f]=z.useState(void 0),[d,p]=z.useState(oT),m=z.useMemo(()=>u&&e.resources.includes(u.resource)?u:void 0,[u,e.resources]),{renderedEntries:y}=z.useMemo(()=>{const _=e.resources.map((N,k)=>bT(N,n,e.contextIdMap,k)).filter(_T(d));return a&&ST(_,a),{renderedEntries:_}},[e.resources,e.contextIdMap,d,a,n]),[v,b]=z.useState(()=>new Map(_0().map(_=>[_,pT(_)]))),E=z.useCallback(_=>{p(_),f(void 0)},[]);if(!e.resources.length)return S.jsx(cs,{text:"No network calls"});const x=S.jsx(uT,{name:"network",ariaLabel:"Network requests",items:y,selectedItem:m,onSelected:_=>f(_),onHighlighted:_=>i==null?void 0:i(_==null?void 0:_.ordinal),columns:gT(!!m,y),columnTitle:dT,columnWidths:v,setColumnWidths:b,isError:_=>_.status.code>=400||_.status.code===-1,isInfo:_=>!!_.route,render:(_,N)=>mT(_,N),sorting:a,setSorting:o});return S.jsxs(S.Fragment,{children:[S.jsx(cT,{filterState:d,onFilterStateChange:E}),!m&&x,m&&S.jsx(Qo,{sidebarSize:v.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:S.jsx(J_,{resource:m.resource,sdkLanguage:s,startTimeOffset:m.start,onClose:()=>f(void 0)}),sidebar:x})]})},dT=n=>n==="contextId"?"Source":n==="name"?"Name":n==="method"?"Method":n==="status"?"Status":n==="contentType"?"Content Type":n==="duration"?"Duration":n==="size"?"Size":n==="start"?"Start":n==="route"?"Route":"",pT=n=>n==="name"?200:n==="method"||n==="status"?60:n==="contentType"?200:n==="contextId"?60:100;function gT(n,e){if(n){const s=["name"];return Py(e)&&s.unshift("contextId"),s}let i=_0();return Py(e)||(i=i.filter(s=>s!=="contextId")),i}function _0(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const mT=(n,e)=>e==="contextId"?{body:n.contextId,title:n.name.url}:e==="name"?{body:n.name.name,title:n.name.url}:e==="method"?{body:n.method}:e==="status"?{body:n.status.code>0?n.status.code:"",title:n.status.text}:e==="contentType"?{body:n.contentType}:e==="duration"?{body:xt(n.duration)}:e==="size"?{body:Y1(n.size)}:e==="start"?{body:xt(n.start)}:e==="route"?{body:n.route}:{body:""};class yT{constructor(e){Ca(this,"_pagerefToShortId",new Map);Ca(this,"_contextToId",new Map);Ca(this,"_lastPageId",0);Ca(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let i=this._pagerefToShortId.get(e);return i||(++this._lastPageId,i="page#"+this._lastPageId,this._pagerefToShortId.set(e,i)),i}_apiRequestContextId(e){const i=$b(e);if(!i)return"";let s=this._contextToId.get(i);return s||(++this._lastApiRequestContextId,s="api#"+this._lastApiRequestContextId,this._contextToId.set(i,s)),s}}function Py(n){const e=new Set;for(const i of n)if(e.add(i.contextId),e.size>1)return!0;return!1}const bT=(n,e,i,s)=>{const a=vT(n);let o;try{const d=new URL(n.request.url);o=d.pathname.substring(d.pathname.lastIndexOf("/")+1),o||(o=d.host),d.search&&(o+=d.search)}catch{o=n.request.url}let u=n.response.content.mimeType;const f=u.match(/^(.*);\s*charset=.*$/);return f&&(u=f[1]),{ordinal:s,name:{name:o,url:n.request.url},method:n.request.method,status:{code:n.response.status,text:n.response.statusText},contentType:u,duration:n.time,size:n.response._transferSize>0?n.response._transferSize:n.response.bodySize,start:n._monotonicTime-e.minimum,route:a,resource:n,contextId:i.contextId(n)}};function vT(n){return n._wasAborted?"aborted":n._wasContinued?"continued":n._wasFulfilled?"fulfilled":n._apiRequest?"api":""}function ST(n,e){const i=wT(e==null?void 0:e.by);i&&n.sort(i),e.negate&&n.reverse()}function wT(n){if(n==="start")return(e,i)=>e.start-i.start;if(n==="duration")return(e,i)=>e.duration-i.duration;if(n==="status")return(e,i)=>e.status.code-i.status.code;if(n==="method")return(e,i)=>{const s=e.method,a=i.method;return s.localeCompare(a)};if(n==="size")return(e,i)=>e.size-i.size;if(n==="contentType")return(e,i)=>e.contentType.localeCompare(i.contentType);if(n==="name")return(e,i)=>e.name.name.localeCompare(i.name.name);if(n==="route")return(e,i)=>e.route.localeCompare(i.route);if(n==="contextId")return(e,i)=>e.contextId.localeCompare(i.contextId)}const xT={Fetch:n=>n==="application/json",HTML:n=>n==="text/html",CSS:n=>n==="text/css",JS:n=>n.includes("javascript"),Font:n=>n.includes("font"),Image:n=>n.includes("image")};function _T({searchValue:n,resourceTypes:e}){return i=>(e.size===0||Array.from(e).some(a=>xT[a](i.contentType)))&&i.name.url.toLowerCase().includes(n.toLowerCase())}function TT(n,e){if(n.role!==e.role||n.name!==e.name||!ET(n,e)||tc(n)!==tc(e))return!1;const i=Object.keys(n.props),s=Object.keys(e.props);return i.length===s.length&&i.every(a=>n.props[a]===e.props[a])}function tc(n){return n.box.cursor==="pointer"}function ET(n,e){return n.active===e.active&&n.checked===e.checked&&n.disabled===e.disabled&&n.expanded===e.expanded&&n.selected===e.selected&&n.level===e.level&&n.pressed===e.pressed}function Ph(n,e,i={}){var v;const s=new n.LineCounter,a={keepSourceTokens:!0,lineCounter:s,...i},o=n.parseDocument(e,a),u=[],f=b=>[s.linePos(b[0]),s.linePos(b[1])],d=b=>{u.push({message:b.message,range:[s.linePos(b.pos[0]),s.linePos(b.pos[1])]})},p=(b,E)=>{for(const x of E.items){if(x instanceof n.Scalar&&typeof x.value=="string"){const k=nc.parse(x,a,u);k&&(b.children=b.children||[],b.children.push(k));continue}if(x instanceof n.YAMLMap){m(b,x);continue}u.push({message:"Sequence items should be strings or maps",range:f(x.range||E.range)})}},m=(b,E)=>{for(const x of E.items){if(b.children=b.children||[],!(x.key instanceof n.Scalar&&typeof x.key.value=="string")){u.push({message:"Only string keys are supported",range:f(x.key.range||E.range)});continue}const N=x.key,k=x.value;if(N.value==="text"){if(!(k instanceof n.Scalar&&typeof k.value=="string")){u.push({message:"Text value should be a string",range:f(x.value.range||E.range)});continue}b.children.push({kind:"text",text:Wf(k.value)});continue}if(N.value==="/children"){if(!(k instanceof n.Scalar&&typeof k.value=="string")||k.value!=="contain"&&k.value!=="equal"&&k.value!=="deep-equal"){u.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:f(x.value.range||E.range)});continue}b.containerMode=k.value;continue}if(N.value.startsWith("/")){if(!(k instanceof n.Scalar&&typeof k.value=="string")){u.push({message:"Property value should be a string",range:f(x.value.range||E.range)});continue}b.props=b.props??{},b.props[N.value.slice(1)]=Wf(k.value);continue}const $=nc.parse(N,a,u);if(!$)continue;if(k instanceof n.Scalar){const G=typeof k.value;if(G!=="string"&&G!=="number"&&G!=="boolean"){u.push({message:"Node value should be a string or a sequence",range:f(x.value.range||E.range)});continue}b.children.push({...$,children:[{kind:"text",text:Wf(String(k.value))}]});continue}if(k instanceof n.YAMLSeq){b.children.push($),p($,k);continue}u.push({message:"Map values should be strings or sequences",range:f(x.value.range||E.range)})}},y={kind:"role",role:"fragment"};return o.errors.forEach(d),u.length?{errors:u,fragment:y}:(o.contents instanceof n.YAMLSeq||u.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:o.contents?f(o.contents.range):[{line:0,col:0},{line:0,col:0}]}),u.length?{errors:u,fragment:y}:(p(y,o.contents),u.length?{errors:u,fragment:AT}:((v=y.children)==null?void 0:v.length)===1&&(!y.containerMode||y.containerMode==="contain")?{fragment:y.children[0],errors:[]}:{fragment:y,errors:[]}))}const AT={kind:"role",role:"fragment"};function T0(n){return n.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function Wf(n){return{raw:n,normalized:T0(n)}}class nc{static parse(e,i,s){try{return new nc(e.value)._parse()}catch(a){if(a instanceof Fy){const o=i.prettyErrors===!1?a.message:a.message+`:
|
|
106
|
+
|
|
107
|
+
`+e.value+`
|
|
108
|
+
`+" ".repeat(a.pos)+`^
|
|
109
|
+
`;return s.push({message:o,range:[i.lineCounter.linePos(e.range[0]),i.lineCounter.linePos(e.range[0]+a.pos)]}),null}throw a}}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 i=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(i,this._pos)}_readString(){let e="",i=!1;for(;!this._eof();){const s=this._next();if(i)e+=s,i=!1;else if(s==="\\")i=!0;else{if(s==='"')return e;e+=s}}this._throwError("Unterminated string")}_throwError(e,i=0){throw new Fy(e,i||this._pos)}_readRegex(){let e="",i=!1,s=!1;for(;!this._eof();){const a=this._next();if(i)e+=a,i=!1;else if(a==="\\")i=!0,e+=a;else{if(a==="/"&&!s)return{pattern:e};a==="["?(s=!0,e+=a):a==="]"&&s?(e+=a,s=!1):e+=a}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),T0(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let i=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),i=this._pos;const s=this._readIdentifier("attribute");this._skipWhitespace();let a="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),i=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)a+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,s,a||"true",i)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const i=this._readStringOrRegex()||"",s={kind:"role",role:e,name:i};return this._readAttributes(s),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),s}_applyAttribute(e,i,s,a){if(i==="checked"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',a),e.checked=s==="true"?!0:s==="false"?!1:"mixed";return}if(i==="disabled"){this._assert(s==="true"||s==="false",'Value of "disabled" attribute must be a boolean',a),e.disabled=s==="true";return}if(i==="expanded"){this._assert(s==="true"||s==="false",'Value of "expanded" attribute must be a boolean',a),e.expanded=s==="true";return}if(i==="active"){this._assert(s==="true"||s==="false",'Value of "active" attribute must be a boolean',a),e.active=s==="true";return}if(i==="level"){this._assert(!isNaN(Number(s)),'Value of "level" attribute must be a number',a),e.level=Number(s);return}if(i==="pressed"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',a),e.pressed=s==="true"?!0:s==="false"?!1:"mixed";return}if(i==="selected"){this._assert(s==="true"||s==="false",'Value of "selected" attribute must be a boolean',a),e.selected=s==="true";return}this._assert(!1,`Unsupported attribute [${i}]`,a)}_assert(e,i,s){e||this._throwError(i||"Assertion error",s)}}class Fy extends Error{constructor(e,i){super(e),this.pos=i}}function NT(n,e){var u,f;function i(d,p,m){let y=1,v=m+y;for(const b of d.children||[])typeof b=="string"?(y++,v++):(y+=i(b,p,v),v+=y);if(!["none","presentation","fragment","iframe","generic"].includes(d.role)&&d.name){let b=p.get(d.role);b||(b=new Map,p.set(d.role,b));const E=b.get(d.name),x=y*100-m;(!E||E.sizeAndPosition<x)&&b.set(d.name,{node:d,sizeAndPosition:x})}return y}const s=new Map;n&&i(n,s,0);const a=new Map;i(e,a,0);const o=[];for(const[d,p]of a)for(const[m,y]of p)((u=s.get(d))==null?void 0:u.get(m))||o.push(y);return o.sort((d,p)=>p.sizeAndPosition-d.sizeAndPosition),(f=o[0])==null?void 0:f.node}function CT(n){return E0(n)?"'"+n.replace(/'/g,"''")+"'":n}function eh(n){return E0(n)?'"'+n.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")}})+'"':n}function E0(n){return!!(n.length===0||/^\s|\s$/.test(n)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(n)||/^-/.test(n)||/[\n:](\s|$)/.test(n)||/\s#/.test(n)||/[\n\r]/.test(n)||/^[&*\],?!>|@"'#%]/.test(n)||/[{}`]/.test(n)||/^\[/.test(n)||!isNaN(Number(n))||["y","n","yes","no","true","false","on","off","null"].includes(n.toLowerCase()))}let A0={};function kT(n){A0=n}function tl(n,e){for(;e;){if(n.contains(e))return!0;e=C0(e)}return!1}function pt(n){if(n.parentElement)return n.parentElement;if(n.parentNode&&n.parentNode.nodeType===11&&n.parentNode.host)return n.parentNode.host}function N0(n){let e=n;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function C0(n){for(;n.parentElement;)n=n.parentElement;return pt(n)}function Ha(n,e,i){for(;n;){const s=n.closest(e);if(i&&s!==i&&(s!=null&&s.contains(i)))return;if(s)return s;n=C0(n)}}function ki(n,e){const i=e==="::before"?Qh:e==="::after"?Zh:Fh;if(i&&i.has(n))return i.get(n);const s=n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView.getComputedStyle(n,e):void 0;return i==null||i.set(n,s),s}function k0(n,e){if(e=e??ki(n),!e)return!0;if(Element.prototype.checkVisibility&&A0.browserNameForWorkarounds!=="webkit"){if(!n.checkVisibility())return!1}else{const i=n.closest("details,summary");if(i!==n&&(i==null?void 0:i.nodeName)==="DETAILS"&&!i.open)return!1}return e.visibility==="visible"}function ic(n){const e=ki(n);if(!e)return{visible:!0,inline:!1};const i=e.cursor;if(e.display==="contents"){for(let a=n.firstChild;a;a=a.nextSibling){if(a.nodeType===1&&Ei(a))return{visible:!0,inline:!1,cursor:i};if(a.nodeType===3&&M0(a))return{visible:!0,inline:!0,cursor:i}}return{visible:!1,inline:!1,cursor:i}}if(!k0(n,e))return{cursor:i,visible:!1,inline:!1};const s=n.getBoundingClientRect();return{cursor:i,visible:s.width>0&&s.height>0,inline:e.display==="inline"}}function Ei(n){return ic(n).visible}function M0(n){const e=n.ownerDocument.createRange();e.selectNode(n);const i=e.getBoundingClientRect();return i.width>0&&i.height>0}function Ge(n){const e=n.tagName;return typeof e=="string"?e.toUpperCase():n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}let Fh,Qh,Zh,O0=0;function Jh(){++O0,Fh??(Fh=new Map),Qh??(Qh=new Map),Zh??(Zh=new Map)}function Wh(){--O0||(Fh=void 0,Qh=void 0,Zh=void 0)}function Qy(n){return n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")}const Zy="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]",MT=[["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 L0(n,e){return MT.some(([i,s])=>!(s!=null&&s.includes(e||""))&&n.hasAttribute(i))}function R0(n){return!Number.isNaN(Number(String(n.getAttribute("tabindex"))))}function OT(n){return!K0(n)&&(LT(n)||R0(n))}function LT(n){const e=Ge(n);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?n.hasAttribute("href"):e==="INPUT"?!n.hidden:!1}const th={A:n=>n.hasAttribute("href")?"link":null,AREA:n=>n.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:n=>Ha(n,Zy)?null:"contentinfo",FORM:n=>Qy(n)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:n=>Ha(n,Zy)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:n=>n.getAttribute("alt")===""&&!n.getAttribute("title")&&!L0(n)&&!R0(n)?"presentation":"img",INPUT:n=>{const e=n.type.toLowerCase();if(e==="search")return n.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const i=_r(n,n.getAttribute("list"))[0];return i&&Ge(i)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":PT[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:n=>Qy(n)?"region":null,SELECT:n=>n.hasAttribute("multiple")||n.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:n=>{const e=Ha(n,"table"),i=e?ed(e):"";return i==="grid"||i==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:n=>{const e=n.getAttribute("scope");if(e==="col"||e==="colgroup")return"columnheader";if(e==="row"||e==="rowgroup")return"rowheader";const i=n.nextElementSibling,s=n.previousElementSibling,a=n.parentElement&&Ge(n.parentElement)==="TR"?n.parentElement:void 0;if(!i&&!s){if(a){const o=Ha(a,"table");if(o&&o.rows.length<=1)return null}return"columnheader"}return Jy(i)&&Jy(s)?"columnheader":Wy(i)||Wy(s)?"rowheader":"columnheader"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"};function Jy(n){return!!n&&Ge(n)==="TH"}function Wy(n){var e;return!n||Ge(n)!=="TD"?!1:!!((e=n.textContent)!=null&&e.trim()||n.children.length>0)}const RT={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 eb(n){var s;const e=((s=th[Ge(n)])==null?void 0:s.call(th,n))||"";if(!e)return null;let i=n;for(;i;){const a=pt(i),o=RT[Ge(i)];if(!o||!a||!o.includes(Ge(a)))break;const u=ed(a);if((u==="none"||u==="presentation")&&!j0(a,u))return u;i=a}return e}const jT=["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 ed(n){return(n.getAttribute("role")||"").split(" ").map(i=>i.trim()).find(i=>jT.includes(i))||null}function j0(n,e){return L0(n,e)||OT(n)}function ct(n){const e=ed(n);if(!e)return eb(n);if(e==="none"||e==="presentation"){const i=eb(n);if(j0(n,i))return i}return e}function D0(n){return n===null?void 0:n.toLowerCase()==="true"}function B0(n){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Ge(n))}function nn(n){if(B0(n))return!0;const e=ki(n),i=n.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!i){for(let a=n.firstChild;a;a=a.nextSibling)if(a.nodeType===1&&!nn(a)||a.nodeType===3&&M0(a))return!1;return!0}return!(n.nodeName==="OPTION"&&!!n.closest("select"))&&!i&&!k0(n,e)?!0:U0(n)}function U0(n){let e=_i==null?void 0:_i.get(n);if(e===void 0){if(e=!1,n.parentElement&&n.parentElement.shadowRoot&&!n.assignedSlot&&(e=!0),!e){const i=ki(n);e=!i||i.display==="none"||D0(n.getAttribute("aria-hidden"))===!0}if(!e){const i=pt(n);i&&(e=U0(i))}_i==null||_i.set(n,e)}return e}function _r(n,e){if(!e)return[];const i=N0(n);if(!i)return[];try{const s=e.split(" ").filter(o=>!!o),a=[];for(const o of s){const u=i.querySelector("#"+CSS.escape(o));u&&!a.includes(u)&&a.push(u)}return a}catch{return[]}}function Kn(n){return n.trim()}function Ya(n){return n.split(" ").map(e=>e.replace(/\r\n/g,`
|
|
111
|
+
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function tb(n,e){const i=[...n.querySelectorAll(e)];for(const s of _r(n,n.getAttribute("aria-owns")))s.matches(e)&&i.push(s),i.push(...s.querySelectorAll(e));return i}function Xa(n,e){const i=e==="::before"?hd:e==="::after"?dd:fd;if(i!=null&&i.has(n))return i==null?void 0:i.get(n);const s=ki(n,e);let a;if(s){const o=s.content;o&&o!=="none"&&o!=="normal"&&s.display!=="none"&&s.visibility!=="hidden"&&(a=DT(n,o,!!e))}return e&&a!==void 0&&((s==null?void 0:s.display)||"inline")!=="inline"&&(a=" "+a+" "),i&&i.set(n,a),a}function DT(n,e,i){if(!(!e||e==="none"||e==="normal"))try{let s=Ib(e).filter(f=>!(f instanceof Zo));const a=s.findIndex(f=>f instanceof at&&f.value==="/");if(a!==-1)s=s.slice(a+1);else if(!i)return;const o=[];let u=0;for(;u<s.length;)if(s[u]instanceof Gh)o.push(s[u].value),u++;else if(u+2<s.length&&s[u]instanceof Ga&&s[u].value==="attr"&&s[u+1]instanceof Vh&&s[u+2]instanceof Ih){const f=s[u+1].value;o.push(n.getAttribute(f)||""),u+=3}else return;return o.join("")}catch{}}function z0(n){const e=n.getAttribute("aria-labelledby");if(e===null)return null;const i=_r(n,e);return i.length?i:null}function BT(n,e){const i=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(n),s=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(n);return i||s}function nl(n,e){const i=e?od:ld;let s=i==null?void 0:i.get(n);return s===void 0&&(s="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(ct(n)||"")||(s=Ya(pn(n,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),i==null||i.set(n,s)),s}function nb(n,e){const i=e?ud:cd;let s=i==null?void 0:i.get(n);if(s===void 0){if(s="",n.hasAttribute("aria-describedby")){const a=_r(n,n.getAttribute("aria-describedby"));s=Ya(a.map(o=>pn(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:nn(o)}})).join(" "))}else n.hasAttribute("aria-description")?s=Ya(n.getAttribute("aria-description")||""):s=Ya(n.getAttribute("title")||"");i==null||i.set(n,s)}return s}function UT(n){const e=n.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function zT(n){if("validity"in n){const e=n.validity;return(e==null?void 0:e.valid)===!1}return!1}function HT(n){const e=cr;let i=cr==null?void 0:cr.get(n);if(i===void 0){i="";const s=UT(n)!=="false",a=zT(n);if(s||a){const o=n.getAttribute("aria-errormessage");i=_r(n,o).map(d=>Ya(pn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:nn(d)}}))).join(" ").trim()}e==null||e.set(n,i)}return i}function pn(n,e){var d,p,m,y;if(e.visitedElements.has(n))return"";const i={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const v=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((p=e.embeddedInDescribedBy)!=null&&p.hidden)||!!((m=e.embeddedInNativeTextAlternative)!=null&&m.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if(B0(n)||!v&&nn(n))return e.visitedElements.add(n),""}const s=z0(n);if(!e.embeddedInLabelledBy){const v=(s||[]).map(b=>pn(b,{...e,embeddedInLabelledBy:{element:b,hidden:nn(b)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(v)return v}const a=ct(n)||"",o=Ge(n);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const v=[...n.labels||[]].includes(n),b=(s||[]).includes(n);if(!v&&!b){if(a==="textbox")return e.visitedElements.add(n),o==="INPUT"||o==="TEXTAREA"?n.value:n.textContent||"";if(["combobox","listbox"].includes(a)){e.visitedElements.add(n);let E;if(o==="SELECT")E=[...n.selectedOptions],!E.length&&n.options.length&&E.push(n.options[0]);else{const x=a==="combobox"?tb(n,"*").find(_=>ct(_)==="listbox"):n;E=x?tb(x,'[aria-selected="true"]').filter(_=>ct(_)==="option"):[]}return!E.length&&o==="INPUT"?n.value:E.map(x=>pn(x,i)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(a))return e.visitedElements.add(n),n.hasAttribute("aria-valuetext")?n.getAttribute("aria-valuetext")||"":n.hasAttribute("aria-valuenow")?n.getAttribute("aria-valuenow")||"":n.getAttribute("value")||"";if(["menu"].includes(a))return e.visitedElements.add(n),""}}const u=n.getAttribute("aria-label")||"";if(Kn(u))return e.visitedElements.add(n),u;if(!["presentation","none"].includes(a)){if(o==="INPUT"&&["button","submit","reset"].includes(n.type)){e.visitedElements.add(n);const v=n.value||"";return Kn(v)?v:n.type==="submit"?"Submit":n.type==="reset"?"Reset":n.getAttribute("title")||""}if(o==="INPUT"&&n.type==="file"){e.visitedElements.add(n);const v=n.labels||[];return v.length&&!e.embeddedInLabelledBy?La(v,e):"Choose File"}if(o==="INPUT"&&n.type==="image"){e.visitedElements.add(n);const v=n.labels||[];if(v.length&&!e.embeddedInLabelledBy)return La(v,e);const b=n.getAttribute("alt")||"";if(Kn(b))return b;const E=n.getAttribute("title")||"";return Kn(E)?E:"Submit"}if(!s&&o==="BUTTON"){e.visitedElements.add(n);const v=n.labels||[];if(v.length)return La(v,e)}if(!s&&o==="OUTPUT"){e.visitedElements.add(n);const v=n.labels||[];return v.length?La(v,e):n.getAttribute("title")||""}if(!s&&(o==="TEXTAREA"||o==="SELECT"||o==="INPUT")){e.visitedElements.add(n);const v=n.labels||[];if(v.length)return La(v,e);const b=o==="INPUT"&&["text","password","search","tel","email","url"].includes(n.type)||o==="TEXTAREA",E=n.getAttribute("placeholder")||"",x=n.getAttribute("title")||"";return!b||x?x:E}if(!s&&o==="FIELDSET"){e.visitedElements.add(n);for(let b=n.firstElementChild;b;b=b.nextElementSibling)if(Ge(b)==="LEGEND")return pn(b,{...i,embeddedInNativeTextAlternative:{element:b,hidden:nn(b)}});return n.getAttribute("title")||""}if(!s&&o==="FIGURE"){e.visitedElements.add(n);for(let b=n.firstElementChild;b;b=b.nextElementSibling)if(Ge(b)==="FIGCAPTION")return pn(b,{...i,embeddedInNativeTextAlternative:{element:b,hidden:nn(b)}});return n.getAttribute("title")||""}if(o==="IMG"){e.visitedElements.add(n);const v=n.getAttribute("alt")||"";return Kn(v)?v:n.getAttribute("title")||""}if(o==="TABLE"){e.visitedElements.add(n);for(let b=n.firstElementChild;b;b=b.nextElementSibling)if(Ge(b)==="CAPTION")return pn(b,{...i,embeddedInNativeTextAlternative:{element:b,hidden:nn(b)}});const v=n.getAttribute("summary")||"";if(v)return v}if(o==="AREA"){e.visitedElements.add(n);const v=n.getAttribute("alt")||"";return Kn(v)?v:n.getAttribute("title")||""}if(o==="SVG"||n.ownerSVGElement){e.visitedElements.add(n);for(let v=n.firstElementChild;v;v=v.nextElementSibling)if(Ge(v)==="TITLE"&&v.ownerSVGElement)return pn(v,{...i,embeddedInLabelledBy:{element:v,hidden:nn(v)}})}if(n.ownerSVGElement&&o==="A"){const v=n.getAttribute("xlink:title")||"";if(Kn(v))return e.visitedElements.add(n),v}}const f=o==="SUMMARY"&&!["presentation","none"].includes(a);if(BT(a,e.embeddedInTargetElement==="descendant")||f||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(n);const v=qT(n,i);if(e.embeddedInTargetElement==="self"?Kn(v):v)return v}if(!["presentation","none"].includes(a)||o==="IFRAME"){e.visitedElements.add(n);const v=n.getAttribute("title")||"";if(Kn(v))return v}return e.visitedElements.add(n),""}function qT(n,e){const i=[],s=(o,u)=>{var f;if(!(u&&o.assignedSlot))if(o.nodeType===1){const d=((f=ki(o))==null?void 0:f.display)||"inline";let p=pn(o,e);(d!=="inline"||o.nodeName==="BR")&&(p=" "+p+" "),i.push(p)}else o.nodeType===3&&i.push(o.textContent||"")};i.push(Xa(n,"::before")||"");const a=Xa(n);if(a!==void 0)i.push(a);else{const o=n.nodeName==="SLOT"?n.assignedNodes():[];if(o.length)for(const u of o)s(u,!1);else{for(let u=n.firstChild;u;u=u.nextSibling)s(u,!0);if(n.shadowRoot)for(let u=n.shadowRoot.firstChild;u;u=u.nextSibling)s(u,!0);for(const u of _r(n,n.getAttribute("aria-owns")))s(u,!0)}}return i.push(Xa(n,"::after")||""),i.join("")}const td=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function H0(n){return Ge(n)==="OPTION"?n.selected:td.includes(ct(n)||"")?D0(n.getAttribute("aria-selected"))===!0:!1}const nd=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function q0(n){const e=id(n,!0);return e==="error"?!1:e}function $T(n){return id(n,!0)}function IT(n){return id(n,!1)}function id(n,e){const i=Ge(n);if(e&&i==="INPUT"&&n.indeterminate)return"mixed";if(i==="INPUT"&&["checkbox","radio"].includes(n.type))return n.checked;if(nd.includes(ct(n)||"")){const s=n.getAttribute("aria-checked");return s==="true"?!0:e&&s==="mixed"?"mixed":!1}return"error"}const VT=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function GT(n){const e=Ge(n);return["INPUT","TEXTAREA","SELECT"].includes(e)?n.hasAttribute("readonly"):VT.includes(ct(n)||"")?n.getAttribute("aria-readonly")==="true":n.isContentEditable?!1:"error"}const sd=["button"];function $0(n){if(sd.includes(ct(n)||"")){const e=n.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const rd=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function I0(n){if(Ge(n)==="DETAILS")return n.open;if(rd.includes(ct(n)||"")){const e=n.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const ad=["heading","listitem","row","treeitem"];function V0(n){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Ge(n)];if(e)return e;if(ad.includes(ct(n)||"")){const i=n.getAttribute("aria-level"),s=i===null?Number.NaN:Number(i);if(Number.isInteger(s)&&s>=1)return s}return 0}const G0=["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 sc(n){return K0(n)||Y0(n)}function K0(n){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(Ge(n))&&(n.hasAttribute("disabled")||KT(n)||YT(n))}function KT(n){return Ge(n)==="OPTION"&&!!n.closest("OPTGROUP[DISABLED]")}function YT(n){const e=n==null?void 0:n.closest("FIELDSET[DISABLED]");if(!e)return!1;const i=e.querySelector(":scope > LEGEND");return!i||!i.contains(n)}function Y0(n,e=!1){if(!n)return!1;if(e||G0.includes(ct(n)||"")){const i=(n.getAttribute("aria-disabled")||"").toLowerCase();return i==="true"?!0:i==="false"?!1:Y0(pt(n),!0)}return!1}function La(n,e){return[...n].map(i=>pn(i,{...e,embeddedInLabel:{element:i,hidden:nn(i)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(i=>!!i).join(" ")}function XT(n){const e=pd;let i=n,s;const a=[];for(;i;i=pt(i)){const o=e.get(i);if(o!==void 0){s=o;break}a.push(i);const u=ki(i);if(!u){s=!0;break}const f=u.pointerEvents;if(f){s=f!=="none";break}}s===void 0&&(s=!0);for(const o of a)e.set(o,s);return s}let ld,od,cd,ud,cr,_i,fd,hd,dd,pd,X0=0;function dc(){Jh(),++X0,ld??(ld=new Map),od??(od=new Map),cd??(cd=new Map),ud??(ud=new Map),cr??(cr=new Map),_i??(_i=new Map),fd??(fd=new Map),hd??(hd=new Map),dd??(dd=new Map),pd??(pd=new Map)}function pc(){--X0||(ld=void 0,od=void 0,cd=void 0,ud=void 0,cr=void 0,_i=void 0,fd=void 0,hd=void 0,dd=void 0,pd=void 0),Wh()}const PT={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};let FT=0;function P0(n){return n.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:n.refPrefix,includeGenericRole:!0,renderActive:!n.doNotRenderActive,renderCursorPointer:!0}:n.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:n.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function Pa(n,e){const i=P0(e),s=new Set,a={root:{role:"fragment",name:"",children:[],props:{},box:ic(n),receivesPointerEvents:!0},elements:new Map,refs:new Map,iframeRefs:[]};Eh(a.root,n);const o=(f,d,p)=>{if(s.has(d))return;if(s.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!p)return;const x=d.nodeValue;f.role!=="textbox"&&x&&f.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const m=d,y=!nn(m);let v=y;if(i.visibility==="ariaOrVisible"&&(v=y||Ei(m)),i.visibility==="ariaAndVisible"&&(v=y&&Ei(m)),i.visibility==="aria"&&!v)return;const b=[];if(m.hasAttribute("aria-owns")){const x=m.getAttribute("aria-owns").split(/\s+/);for(const _ of x){const N=n.ownerDocument.getElementById(_);N&&b.push(N)}}const E=v?QT(m,i):null;E&&(E.ref&&(a.elements.set(E.ref,m),a.refs.set(m,E.ref),E.role==="iframe"&&a.iframeRefs.push(E.ref)),f.children.push(E)),u(E||f,m,b,v)};function u(f,d,p,m){var E;const v=(((E=ki(d))==null?void 0:E.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";v&&f.children.push(v),f.children.push(Xa(d,"::before")||"");const b=d.nodeName==="SLOT"?d.assignedNodes():[];if(b.length)for(const x of b)o(f,x,m);else{for(let x=d.firstChild;x;x=x.nextSibling)x.assignedSlot||o(f,x,m);if(d.shadowRoot)for(let x=d.shadowRoot.firstChild;x;x=x.nextSibling)o(f,x,m)}for(const x of p)o(f,x,m);if(f.children.push(Xa(d,"::after")||""),v&&f.children.push(v),f.children.length===1&&f.name===f.children[0]&&(f.children=[]),f.role==="link"&&d.hasAttribute("href")){const x=d.getAttribute("href");f.props.url=x}if(f.role==="textbox"&&d.hasAttribute("placeholder")&&d.getAttribute("placeholder")!==f.name){const x=d.getAttribute("placeholder");f.props.placeholder=x}}dc();try{o(a.root,n,!0)}finally{pc()}return JT(a.root),ZT(a.root),a}function ib(n,e){if(e.refs==="none"||e.refs==="interactable"&&(!n.box.visible||!n.receivesPointerEvents))return;const i=md(n);let s=i._ariaRef;(!s||s.role!==n.role||s.name!==n.name)&&(s={role:n.role,name:n.name,ref:(e.refPrefix??"")+"e"+ ++FT},i._ariaRef=s),n.ref=s.ref}function QT(n,e){const i=n.ownerDocument.activeElement===n;if(n.nodeName==="IFRAME"){const p={role:"iframe",name:"",children:[],props:{},box:ic(n),receivesPointerEvents:!0,active:i};return Eh(p,n),ib(p,e),p}const s=e.includeGenericRole?"generic":null,a=ct(n)??s;if(!a||a==="presentation"||a==="none")return null;const o=_t(nl(n,!1)||""),u=XT(n),f=ic(n);if(a==="generic"&&f.inline&&n.childNodes.length===1&&n.childNodes[0].nodeType===Node.TEXT_NODE)return null;const d={role:a,name:o,children:[],props:{},box:f,receivesPointerEvents:u,active:i};return Eh(d,n),ib(d,e),nd.includes(a)&&(d.checked=q0(n)),G0.includes(a)&&(d.disabled=sc(n)),rd.includes(a)&&(d.expanded=I0(n)),ad.includes(a)&&(d.level=V0(n)),sd.includes(a)&&(d.pressed=$0(n)),td.includes(a)&&(d.selected=H0(n)),(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.type!=="checkbox"&&n.type!=="radio"&&n.type!=="file"&&(d.children=[n.value]),d}function ZT(n){const e=i=>{const s=[];for(const o of i.children||[]){if(typeof o=="string"){s.push(o);continue}const u=e(o);s.push(...u)}return i.role==="generic"&&!i.name&&s.length<=1&&s.every(o=>typeof o!="string"&&!!o.ref)?s:(i.children=s,[i])};e(n)}function JT(n){const e=(s,a)=>{if(!s.length)return;const o=_t(s.join(""));o&&a.push(o),s.length=0},i=s=>{const a=[],o=[];for(const u of s.children||[])typeof u=="string"?o.push(u):(e(o,a),i(u),a.push(u));e(o,a),s.children=a.length?a:[],s.children.length===1&&s.children[0]===s.name&&(s.children=[])};i(n)}function WT(n,e){return e?n?typeof e=="string"?n===e:!!n.match(new RegExp(e.pattern)):!1:!0}function sb(n,e){if(!(e!=null&&e.normalized))return!0;if(!n)return!1;if(n===e.normalized||n===e.raw)return!0;const i=eE(e);return i?!!n.match(i):!1}const nh=Symbol("cachedRegex");function eE(n){if(n[nh]!==void 0)return n[nh];const{raw:e}=n,i=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let s;try{s=i?new RegExp(e.slice(1,-1)):null}catch{s=null}return n[nh]=s,s}function tE(n,e){const i=Pa(n,{mode:"expect"});return{matches:F0(i.root,e,!1,!1),received:{raw:Fa(i,{mode:"expect"}),regex:Fa(i,{mode:"codegen"})}}}function nE(n,e){const i=Pa(n,{mode:"expect"}).root;return F0(i,e,!0,!1).map(a=>md(a))}function gd(n,e,i){var s;return typeof n=="string"&&e.kind==="text"?sb(n,e.text):n===null||typeof n!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==n.role||e.checked!==void 0&&e.checked!==n.checked||e.disabled!==void 0&&e.disabled!==n.disabled||e.expanded!==void 0&&e.expanded!==n.expanded||e.level!==void 0&&e.level!==n.level||e.pressed!==void 0&&e.pressed!==n.pressed||e.selected!==void 0&&e.selected!==n.selected||!WT(n.name,e.name)||!sb(n.props.url,(s=e.props)==null?void 0:s.url)?!1:e.containerMode==="contain"?ab(n.children||[],e.children||[]):e.containerMode==="equal"?rb(n.children||[],e.children||[],!1):e.containerMode==="deep-equal"||i?rb(n.children||[],e.children||[],!0):ab(n.children||[],e.children||[])}function rb(n,e,i){if(e.length!==n.length)return!1;for(let s=0;s<e.length;++s)if(!gd(n[s],e[s],i))return!1;return!0}function ab(n,e){if(e.length>n.length)return!1;const i=n.slice(),s=e.slice();for(const a of s){let o=i.shift();for(;o&&!gd(o,a,!1);)o=i.shift();if(!o)return!1}return!0}function F0(n,e,i,s){const a=[],o=(u,f)=>{if(gd(u,e,s)){const d=typeof u=="string"?f:u;return d&&a.push(d),!i}if(typeof u=="string")return!1;for(const d of u.children||[])if(o(d,u))return!0;return!1};return o(n,null),a}function Q0(n,e=new Map){n!=null&&n.ref&&e.set(n.ref,n);for(const i of(n==null?void 0:n.children)||[])typeof i!="string"&&Q0(i,e);return e}function iE(n,e){var o;const i=Q0(e==null?void 0:e.root),s=new Map,a=(u,f)=>{let d=u.children.length===(f==null?void 0:f.children.length)&&TT(u,f),p=d;for(let m=0;m<u.children.length;m++){const y=u.children[m],v=f==null?void 0:f.children[m];if(typeof y=="string")d&&(d=y===v),p&&(p=y===v);else{let b=typeof v!="string"?v:void 0;y.ref&&(b=i.get(y.ref));const E=a(y,b);(!b||!E&&!y.ref||b!==v)&&(p=!1),d&&(d=E&&b===v)}}return s.set(u,d?"same":p?"skip":"changed"),d};return a(n.root,i.get((o=e==null?void 0:e.root)==null?void 0:o.ref)),s}function sE(n,e){const i=[],s=a=>{const o=e.get(a);if(o!=="same")if(o==="skip")for(const u of a.children)typeof u!="string"&&s(u);else i.push(a)};for(const a of n)typeof a=="string"?i.push(a):s(a);return i}function Fa(n,e,i){const s=P0(e),a=[],o=s.renderStringsAsRegex?aE:()=>!0,u=s.renderStringsAsRegex?rE:b=>b;let f=n.root.role==="fragment"?n.root.children:[n.root];const d=iE(n,i);i&&(f=sE(f,d));const p=(b,E)=>{const x=eh(u(b));x&&a.push(E+"- text: "+x)},m=(b,E)=>{let x=b.role;if(b.name&&b.name.length<=900){const _=u(b.name);if(_){const N=_.startsWith("/")&&_.endsWith("/")?_:JSON.stringify(_);x+=" "+N}}return b.checked==="mixed"&&(x+=" [checked=mixed]"),b.checked===!0&&(x+=" [checked]"),b.disabled&&(x+=" [disabled]"),b.expanded&&(x+=" [expanded]"),b.active&&s.renderActive&&(x+=" [active]"),b.level&&(x+=` [level=${b.level}]`),b.pressed==="mixed"&&(x+=" [pressed=mixed]"),b.pressed===!0&&(x+=" [pressed]"),b.selected===!0&&(x+=" [selected]"),b.ref&&(x+=` [ref=${b.ref}]`,E&&tc(b)&&(x+=" [cursor=pointer]")),x},y=b=>(b==null?void 0:b.children.length)===1&&typeof b.children[0]=="string"&&!Object.keys(b.props).length?b.children[0]:void 0,v=(b,E,x)=>{if(d.get(b)==="same"&&b.ref){a.push(E+`- ref=${b.ref} [unchanged]`);return}const _=!!i&&!E,N=E+"- "+(_?"<changed> ":"")+CT(m(b,x)),k=y(b);if(!b.children.length&&!Object.keys(b.props).length)a.push(N);else if(k!==void 0)o(b,k)?a.push(N+": "+eh(u(k))):a.push(N);else{a.push(N+":");for(const[L,G]of Object.entries(b.props))a.push(E+" - /"+L+": "+eh(G));const $=E+" ",V=!!b.ref&&x&&tc(b);for(const L of b.children)typeof L=="string"?p(o(b,L)?L:"",$):v(L,$,x&&!V)}};for(const b of f)typeof b=="string"?p(b,""):v(b,"",!!s.renderCursorPointer);return a.join(`
|
|
112
|
+
`)}function rE(n){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 i="",s=0;const a=new RegExp(e.map(o=>"("+o.regex.source+")").join("|"),"g");return n.replace(a,(o,...u)=>{const f=u[u.length-2],d=u.slice(0,-2);i+=Wo(n.slice(s,f));for(let p=0;p<d.length;p++)if(d[p]){const{replacement:m}=e[p];i+=m;break}return s=f+o.length,o}),i?(i+=Wo(n.slice(s)),String(new RegExp(i))):n}function aE(n,e){if(!e.length)return!1;if(!n.name)return!0;if(n.name.length>e.length)return!1;const i=e.length<=200&&n.name.length<=200?Ix(e,n.name):"";let s=e;for(;i&&s.includes(i);)s=s.replace(i,"");return s.trim().length/e.length>.1}const Z0=Symbol("element");function md(n){return n[Z0]}function Eh(n,e){n[Z0]=e}function lE(n,e){const i=NT(n,e);return i?md(i):void 0}const lb=":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;height:150px}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.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 ih{constructor(e){this._renderedEntries=[],this._language="javascript",this._injectedScript=e;const i=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=i.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=i.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 s=new this._injectedScript.window.CSSStyleSheet;s.replaceSync(lb),this._glassPaneShadow.adoptedStyleSheets.push(s)}else{const s=this._injectedScript.document.createElement("style");s.textContent=lb,this._glassPaneShadow.appendChild(s)}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 i=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),s=Ti(this._language,xn(e)),a=i.length>1?"#f6b26b7f":"#6fa8dc7f";this.updateHighlight(i.map((o,u)=>{const f=i.length>1?` [${u+1} of ${i.length}]`:"";return{element:o,color:a,tooltipText:s+f}})),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,i){this._actionPointElement.style.top=i+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,i;for(const s of this._renderedEntries)(e=s.highlightElement)==null||e.remove(),(i=s.tooltipElement)==null||i.remove();this._renderedEntries=[]}maskElements(e,i){this.updateHighlight(e.map(s=>({element:s,color:i})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const i of e){const s=this._createHighlightElement();this._glassPaneShadow.appendChild(s);let a;if(i.tooltipText){a=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(a),a.style.top="0",a.style.left="0",a.style.display="flex";const o=this._injectedScript.document.createElement("x-pw-tooltip-line");o.textContent=i.tooltipText,a.appendChild(o)}this._renderedEntries.push({targetElement:i.element,color:i.color,tooltipElement:a,highlightElement:s})}for(const i of this._renderedEntries){if(i.box=i.targetElement.getBoundingClientRect(),!i.tooltipElement)continue;const{anchorLeft:s,anchorTop:a}=this.tooltipPosition(i.box,i.tooltipElement);i.tooltipTop=a,i.tooltipLeft=s}for(const i of this._renderedEntries){i.tooltipElement&&(i.tooltipElement.style.top=i.tooltipTop+"px",i.tooltipElement.style.left=i.tooltipLeft+"px");const s=i.box;i.highlightElement.style.backgroundColor=i.color,i.highlightElement.style.left=s.x+"px",i.highlightElement.style.top=s.y+"px",i.highlightElement.style.width=s.width+"px",i.highlightElement.style.height=s.height+"px",i.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:s.x,y:s.y,width:s.width,height:s.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,i){const s=i.offsetWidth,a=i.offsetHeight,o=this._glassPaneElement.offsetWidth,u=this._glassPaneElement.offsetHeight;let f=Math.max(5,e.left);f+s>o-5&&(f=o-s-5);let d=Math.max(0,e.bottom)+5;return d+a>u-5&&(Math.max(0,e.top)>a+5?d=Math.max(0,e.top)-a-5:d=u-5-a),{anchorLeft:f,anchorTop:d}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let i=0;i<this._renderedEntries.length;++i){if(e[i].element!==this._renderedEntries[i].targetElement||e[i].color!==this._renderedEntries[i].color)return!1;const s=this._renderedEntries[i].box;if(!s)return!1;const a=e[i].element.getBoundingClientRect();if(a.top!==s.top||a.right!==s.right||a.bottom!==s.bottom||a.left!==s.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 oE(n,e,i){const s=n.left-e.right;if(!(s<0||i!==void 0&&s>i))return s+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function cE(n,e,i){const s=e.left-n.right;if(!(s<0||i!==void 0&&s>i))return s+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function uE(n,e,i){const s=e.top-n.bottom;if(!(s<0||i!==void 0&&s>i))return s+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function fE(n,e,i){const s=n.top-e.bottom;if(!(s<0||i!==void 0&&s>i))return s+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function hE(n,e,i){const s=i===void 0?50:i;let a=0;return n.left-e.right>=0&&(a+=n.left-e.right),e.left-n.right>=0&&(a+=e.left-n.right),e.top-n.bottom>=0&&(a+=e.top-n.bottom),n.top-e.bottom>=0&&(a+=n.top-e.bottom),a>s?void 0:a}const dE=["left-of","right-of","above","below","near"];function J0(n,e,i,s){const a=e.getBoundingClientRect(),o={"left-of":cE,"right-of":oE,above:uE,below:fE,near:hE}[n];let u;for(const f of i){if(f===e)continue;const d=o(a,f.getBoundingClientRect(),s);d!==void 0&&(u===void 0||d<u)&&(u=d)}return u}function W0(n,e){for(const i of e.jsonPath)n!=null&&(n=n[i]);return ev(n,e)}function ev(n,e){const i=typeof n=="string"&&!e.caseSensitive?n.toUpperCase():n,s=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!i:e.op==="="?s instanceof RegExp?typeof i=="string"&&!!i.match(s):i===s:typeof i!="string"||typeof s!="string"?!1:e.op==="*="?i.includes(s):e.op==="^="?i.startsWith(s):e.op==="$="?i.endsWith(s):e.op==="|="?i===s||i.startsWith(s+"-"):e.op==="~="?i.split(" ").includes(s):!1}function yd(n){const e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}function Rt(n,e){let i=n.get(e);if(i===void 0){if(i={full:"",normalized:"",immediate:[]},!yd(e)){let s="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))i={full:e.value,normalized:_t(e.value),immediate:[e.value]};else{for(let a=e.firstChild;a;a=a.nextSibling)if(a.nodeType===Node.TEXT_NODE)i.full+=a.nodeValue||"",s+=a.nodeValue||"";else{if(a.nodeType===Node.COMMENT_NODE)continue;s&&i.immediate.push(s),s="",a.nodeType===Node.ELEMENT_NODE&&(i.full+=Rt(n,a).full)}s&&i.immediate.push(s),e.shadowRoot&&(i.full+=Rt(n,e.shadowRoot).full),i.full&&(i.normalized=_t(i.full))}}n.set(e,i)}return i}function gc(n,e,i){if(yd(e)||!i(Rt(n,e)))return"none";for(let s=e.firstChild;s;s=s.nextSibling)if(s.nodeType===Node.ELEMENT_NODE&&i(Rt(n,s)))return"selfAndChildren";return e.shadowRoot&&i(Rt(n,e.shadowRoot))?"selfAndChildren":"self"}function tv(n,e){const i=z0(e);if(i)return i.map(o=>Rt(n,o));const s=e.getAttribute("aria-label");if(s!==null&&s.trim())return[{full:s,normalized:_t(s),immediate:[s]}];const a=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||a){const o=e.labels;if(o)return[...o].map(u=>Rt(n,u))}return[]}function ob(n){return n.displayName||n.name||"Anonymous"}function pE(n){if(n.type)switch(typeof n.type){case"function":return ob(n.type);case"string":return n.type;case"object":return n.type.displayName||(n.type.render?ob(n.type.render):"")}if(n._currentElement){const e=n._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function gE(n){var e;return n.key??((e=n._currentElement)==null?void 0:e.key)}function mE(n){if(n.child){const i=[];for(let s=n.child;s;s=s.sibling)i.push(s);return i}if(!n._currentElement)return[];const e=i=>{var a;const s=(a=i._currentElement)==null?void 0:a.type;return typeof s=="function"||typeof s=="string"};if(n._renderedComponent){const i=n._renderedComponent;return e(i)?[i]:[]}return n._renderedChildren?[...Object.values(n._renderedChildren)].filter(e):[]}function yE(n){var s;const e=n.memoizedProps||((s=n._currentElement)==null?void 0:s.props);if(!e||typeof e=="string")return e;const i={...e};return delete i.children,i}function nv(n){var s;const e={key:gE(n),name:pE(n),children:mE(n).map(nv),rootElements:[],props:yE(n)},i=n.stateNode||n._hostNode||((s=n._renderedComponent)==null?void 0:s._hostNode);if(i instanceof Element)e.rootElements.push(i);else for(const a of e.children)e.rootElements.push(...a.rootElements);return e}function iv(n,e,i=[]){e(n)&&i.push(n);for(const s of n.children)iv(s,e,i);return i}function sv(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);do{const a=s.currentNode,o=a,u=Object.keys(o).find(d=>d.startsWith("__reactContainer")&&o[d]!==null);if(u)e.push(o[u].stateNode.current);else{const d="_reactRootContainer";o.hasOwnProperty(d)&&o[d]!==null&&e.push(o[d]._internalRoot.current)}if(a instanceof Element&&a.hasAttribute("data-reactroot"))for(const d of Object.keys(a))(d.startsWith("__reactInternalInstance")||d.startsWith("__reactFiber"))&&e.push(a[d]);const f=a instanceof Element?a.shadowRoot:null;f&&sv(f,e)}while(s.nextNode());return e}const bE=()=>({queryAll(n,e){const{name:i,attributes:s}=as(e,!1),u=sv(n.ownerDocument||n).map(d=>nv(d)).map(d=>iv(d,p=>{const m=p.props??{};if(p.key!==void 0&&(m.key=p.key),i&&p.name!==i||p.rootElements.some(y=>!tl(n,y)))return!1;for(const y of s)if(!W0(m,y))return!1;return!0})).flat(),f=new Set;for(const d of u)for(const p of d.rootElements)f.add(p);return[...f]}}),rv=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];rv.sort();function Ra(n,e,i){if(!e.includes(i))throw new Error(`"${n}" attribute is only supported for roles: ${e.slice().sort().map(s=>`"${s}"`).join(", ")}`)}function tr(n,e){if(n.op!=="<truthy>"&&!e.includes(n.value))throw new Error(`"${n.name}" must be one of ${e.map(i=>JSON.stringify(i)).join(", ")}`)}function nr(n,e){if(!e.includes(n.op))throw new Error(`"${n.name}" does not support "${n.op}" matcher`)}function vE(n,e){const i={role:e};for(const s of n)switch(s.name){case"checked":{Ra(s.name,nd,e),tr(s,[!0,!1,"mixed"]),nr(s,["<truthy>","="]),i.checked=s.op==="<truthy>"?!0:s.value;break}case"pressed":{Ra(s.name,sd,e),tr(s,[!0,!1,"mixed"]),nr(s,["<truthy>","="]),i.pressed=s.op==="<truthy>"?!0:s.value;break}case"selected":{Ra(s.name,td,e),tr(s,[!0,!1]),nr(s,["<truthy>","="]),i.selected=s.op==="<truthy>"?!0:s.value;break}case"expanded":{Ra(s.name,rd,e),tr(s,[!0,!1]),nr(s,["<truthy>","="]),i.expanded=s.op==="<truthy>"?!0:s.value;break}case"level":{if(Ra(s.name,ad,e),typeof s.value=="string"&&(s.value=+s.value),s.op!=="="||typeof s.value!="number"||Number.isNaN(s.value))throw new Error('"level" attribute must be compared to a number');i.level=s.value;break}case"disabled":{tr(s,[!0,!1]),nr(s,["<truthy>","="]),i.disabled=s.op==="<truthy>"?!0:s.value;break}case"name":{if(s.op==="<truthy>")throw new Error('"name" attribute must have a value');if(typeof s.value!="string"&&!(s.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');i.name=s.value,i.nameOp=s.op,i.exact=s.caseSensitive;break}case"include-hidden":{tr(s,[!0,!1]),nr(s,["<truthy>","="]),i.includeHidden=s.op==="<truthy>"?!0:s.value;break}default:throw new Error(`Unknown attribute "${s.name}", must be one of ${rv.map(a=>`"${a}"`).join(", ")}.`)}return i}function SE(n,e,i){const s=[],a=u=>{if(ct(u)===e.role&&!(e.selected!==void 0&&H0(u)!==e.selected)&&!(e.checked!==void 0&&q0(u)!==e.checked)&&!(e.pressed!==void 0&&$0(u)!==e.pressed)&&!(e.expanded!==void 0&&I0(u)!==e.expanded)&&!(e.level!==void 0&&V0(u)!==e.level)&&!(e.disabled!==void 0&&sc(u)!==e.disabled)&&!(!e.includeHidden&&nn(u))){if(e.name!==void 0){const f=_t(nl(u,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=_t(e.name)),i&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!ev(f,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}s.push(u)}},o=u=>{const f=[];u.shadowRoot&&f.push(u.shadowRoot);for(const d of u.querySelectorAll("*"))a(d),d.shadowRoot&&f.push(d.shadowRoot);f.forEach(o)};return o(n),s}function cb(n){return{queryAll:(e,i)=>{const s=as(i,!0),a=s.name.toLowerCase();if(!a)throw new Error("Role must not be empty");const o=vE(s.attributes,a);dc();try{return SE(e,o,n)}finally{pc()}}}}class wE{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",TE),this._engines.set("is",qa),this._engines.set("where",qa),this._engines.set("has",xE),this._engines.set("scope",_E),this._engines.set("light",EE),this._engines.set("visible",AE),this._engines.set("text",NE),this._engines.set("text-is",CE),this._engines.set("text-matches",kE),this._engines.set("has-text",ME),this._engines.set("right-of",ja("right-of")),this._engines.set("left-of",ja("left-of")),this._engines.set("above",ja("above")),this._engines.set("below",ja("below")),this._engines.set("near",ja("near")),this._engines.set("nth-match",OE);const e=[...this._engines.keys()];e.sort();const i=[...a0];if(i.sort(),e.join("|")!==i.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${i.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,i,s,a){e.has(i)||e.set(i,[]);const o=e.get(i),u=o.find(d=>s.every((p,m)=>d.rest[m]===p));if(u)return u.result;const f=a();return o.push({rest:s,result:f}),f}_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,i,s){const a=this._checkSelector(i);this.begin();try{return this._cached(this._cacheMatches,e,[a,s.scope,s.pierceShadow,s.originalScope],()=>Array.isArray(a)?this._matchesEngine(qa,e,a,s):(this._hasScopeClause(a)&&(s=this._expandContextForScopeMatching(s)),this._matchesSimple(e,a.simples[a.simples.length-1].selector,s)?this._matchesParents(e,a,a.simples.length-2,s):!1))}finally{this.end()}}query(e,i){const s=this._checkSelector(i);this.begin();try{return this._cached(this._cacheQuery,s,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(s))return this._queryEngine(qa,e,s);this._hasScopeClause(s)&&(e=this._expandContextForScopeMatching(e));const a=this._scoreMap;this._scoreMap=new Map;let o=this._querySimple(e,s.simples[s.simples.length-1].selector);return o=o.filter(u=>this._matchesParents(u,s,s.simples.length-2,e)),this._scoreMap.size&&o.sort((u,f)=>{const d=this._scoreMap.get(u),p=this._scoreMap.get(f);return d===p?0:d===void 0?1:p===void 0?-1:d-p}),this._scoreMap=a,o})}finally{this.end()}}_markScore(e,i){this._scoreMap&&this._scoreMap.set(e,i)}_hasScopeClause(e){return e.simples.some(i=>i.selector.functions.some(s=>s.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const i=pt(e.scope);return i?{...e,scope:i,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,i,s){return this._cached(this._cacheMatchesSimple,e,[i,s.scope,s.pierceShadow,s.originalScope],()=>{if(e===s.scope||i.css&&!this._matchesCSS(e,i.css))return!1;for(const a of i.functions)if(!this._matchesEngine(this._getEngine(a.name),e,a.args,s))return!1;return!0})}_querySimple(e,i){return i.functions.length?this._cached(this._cacheQuerySimple,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=i.css;const a=i.functions;s==="*"&&a.length&&(s=void 0);let o,u=-1;s!==void 0?o=this._queryCSS(e,s):(u=a.findIndex(f=>this._getEngine(f.name).query!==void 0),u===-1&&(u=0),o=this._queryEngine(this._getEngine(a[u].name),e,a[u].args));for(let f=0;f<a.length;f++){if(f===u)continue;const d=this._getEngine(a[f].name);d.matches!==void 0&&(o=o.filter(p=>this._matchesEngine(d,p,a[f].args,e)))}for(let f=0;f<a.length;f++){if(f===u)continue;const d=this._getEngine(a[f].name);d.matches===void 0&&(o=o.filter(p=>this._matchesEngine(d,p,a[f].args,e)))}return o}):this._queryCSS(e,i.css||"*")}_matchesParents(e,i,s,a){return s<0?!0:this._cached(this._cacheMatchesParents,e,[i,s,a.scope,a.pierceShadow,a.originalScope],()=>{const{selector:o,combinator:u}=i.simples[s];if(u===">"){const f=Ao(e,a);return!f||!this._matchesSimple(f,o,a)?!1:this._matchesParents(f,i,s-1,a)}if(u==="+"){const f=sh(e,a);return!f||!this._matchesSimple(f,o,a)?!1:this._matchesParents(f,i,s-1,a)}if(u===""){let f=Ao(e,a);for(;f;){if(this._matchesSimple(f,o,a)){if(this._matchesParents(f,i,s-1,a))return!0;if(i.simples[s-1].combinator==="")break}f=Ao(f,a)}return!1}if(u==="~"){let f=sh(e,a);for(;f;){if(this._matchesSimple(f,o,a)){if(this._matchesParents(f,i,s-1,a))return!0;if(i.simples[s-1].combinator==="~")break}f=sh(f,a)}return!1}if(u===">="){let f=e;for(;f;){if(this._matchesSimple(f,o,a)){if(this._matchesParents(f,i,s-1,a))return!0;if(i.simples[s-1].combinator==="")break}f=Ao(f,a)}return!1}throw new Error(`Unsupported combinator "${u}"`)})}_matchesEngine(e,i,s,a){if(e.matches)return this._callMatches(e,i,s,a);if(e.query)return this._callQuery(e,s,a).includes(i);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,i,s){if(e.query)return this._callQuery(e,s,i);if(e.matches)return this._queryCSS(i,"*").filter(a=>this._callMatches(e,a,s,i));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,i,s,a){return this._cached(this._cacheCallMatches,i,[e,a.scope,a.pierceShadow,a.originalScope,...s],()=>e.matches(i,s,a,this))}_callQuery(e,i,s){return this._cached(this._cacheCallQuery,e,[s.scope,s.pierceShadow,s.originalScope,...i],()=>e.query(s,i,this))}_matchesCSS(e,i){return e.matches(i)}_queryCSS(e,i){return this._cached(this._cacheQueryCSS,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=[];function a(o){if(s=s.concat([...o.querySelectorAll(i)]),!!e.pierceShadow){o.shadowRoot&&a(o.shadowRoot);for(const u of o.querySelectorAll("*"))u.shadowRoot&&a(u.shadowRoot)}}return a(e.scope),s})}_getEngine(e){const i=this._engines.get(e);if(!i)throw new Error(`Unknown selector engine "${e}"`);return i}}const qa={matches(n,e,i,s){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(a=>s.matches(n,a,i))},query(n,e,i){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let s=[];for(const a of e)s=s.concat(i.query(n,a));return e.length===1?s:av(s)}},xE={matches(n,e,i,s){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return s.query({...i,scope:n},e).length>0}},_E={matches(n,e,i,s){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const a=i.originalScope||i.scope;return a.nodeType===9?n===a.documentElement:n===a},query(n,e,i){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const s=n.originalScope||n.scope;if(s.nodeType===9){const a=s.documentElement;return a?[a]:[]}return s.nodeType===1?[s]:[]}},TE={matches(n,e,i,s){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!s.matches(n,e,i)}},EE={query(n,e,i){return i.query({...n,pierceShadow:!1},e)},matches(n,e,i,s){return s.matches(n,e,{...i,pierceShadow:!1})}},AE={matches(n,e,i,s){if(e.length)throw new Error('"visible" engine expects no arguments');return Ei(n)}},NE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const a=_t(e[0]).toLowerCase(),o=u=>u.normalized.toLowerCase().includes(a);return gc(s._cacheText,n,o)==="self"}},CE={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const a=_t(e[0]),o=u=>!a&&!u.immediate.length?!0:u.immediate.some(f=>_t(f)===a);return gc(s._cacheText,n,o)!=="none"}},kE={matches(n,e,i,s){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 a=new RegExp(e[0],e.length===2?e[1]:void 0),o=u=>a.test(u.full);return gc(s._cacheText,n,o)==="self"}},ME={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(yd(n))return!1;const a=_t(e[0]).toLowerCase();return(u=>u.normalized.toLowerCase().includes(a))(Rt(s._cacheText,n))}};function ja(n){return{matches(e,i,s,a){const o=i.length&&typeof i[i.length-1]=="number"?i[i.length-1]:void 0,u=o===void 0?i:i.slice(0,i.length-1);if(i.length<1+(o===void 0?0:1))throw new Error(`"${n}" engine expects a selector list and optional maximum distance in pixels`);const f=a.query(s,u),d=J0(n,e,f,o);return d===void 0?!1:(a._markScore(e,d),!0)}}}const OE={query(n,e,i){let s=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 s!="number"||s<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const a=qa.query(n,e.slice(0,e.length-1),i);return s--,s<a.length?[a[s]]:[]}};function Ao(n,e){if(n!==e.scope)return e.pierceShadow?pt(n):n.parentElement||void 0}function sh(n,e){if(n!==e.scope)return n.previousElementSibling||void 0}function av(n){const e=new Map,i=[],s=[];function a(u){let f=e.get(u);if(f)return f;const d=pt(u);return d?a(d).children.push(u):i.push(u),f={children:[],taken:!1},e.set(u,f),f}for(const u of n)a(u).taken=!0;function o(u){const f=e.get(u);if(f.taken&&s.push(u),f.children.length>1){const d=new Set(f.children);f.children=[];let p=u.firstElementChild;for(;p&&f.children.length<d.size;)d.has(p)&&f.children.push(p),p=p.nextElementSibling;for(p=u.shadowRoot?u.shadowRoot.firstElementChild:null;p&&f.children.length<d.size;)d.has(p)&&f.children.push(p),p=p.nextElementSibling}f.children.forEach(o)}return i.forEach(o),s}const lv=10,Tr=lv/2,ub=1,LE=2,RE=10,jE=50,ov=100,cv=120,uv=140,fv=160,Io=180,hv=200,fb=250,DE=cv+Tr,BE=uv+Tr,UE=ov+Tr,zE=fv+Tr,HE=Io+Tr,qE=hv+Tr,$E=300,IE=500,dv=510,rh=520,pv=530,Ah=1e4,VE=1e7,GE=1e3;function hb(n,e,i){n._evaluator.begin();const s={allowText:new Map,disallowText:new Map};dc(),Jh();try{let a=[];if(i.forTextExpect){let f=$a(n,e.ownerDocument.documentElement,i);for(let d=e;d;d=pt(d)){const p=Ji(s,n,d,{...i,noText:!0});if(!p)continue;if(Wi(p)<=GE){f=p;break}}a=[Vo(f)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const f=Ha(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",i.root);f&&Ei(f)&&(e=f)}if(i.multiple){const f=Ji(s,n,e,i),d=Ji(s,n,e,{...i,noText:!0});let p=[f,d];if(s.allowText.clear(),s.disallowText.clear(),f&&ah(f)&&p.push(Ji(s,n,e,{...i,noCSSId:!0})),d&&ah(d)&&p.push(Ji(s,n,e,{...i,noText:!0,noCSSId:!0})),p=p.filter(Boolean),!p.length){const m=$a(n,e,i);p.push(m),ah(m)&&p.push($a(n,e,{...i,noCSSId:!0}))}a=[...new Set(p.map(m=>Vo(m)))]}else{const f=Ji(s,n,e,i)||$a(n,e,i);a=[Vo(f)]}}const o=a[0],u=n.parseSelector(o);return{selector:o,selectors:a,elements:n.querySelectorAll(u,i.root??e.ownerDocument)}}finally{Wh(),pc(),n._evaluator.end()}}function Ji(n,e,i,s){if(s.root&&!tl(s.root,i))throw new Error("Target element must belong to the root's subtree");if(i===s.root)return[{engine:"css",selector:":scope",score:1}];if(i.ownerDocument.documentElement===i)return[{engine:"css",selector:"html",score:1}];let a=null;const o=f=>{(!a||Wi(f)<Wi(a))&&(a=f)},u=[];if(!s.noText)for(const f of YE(e,i,!s.isRecursive))u.push({candidate:f,isTextCandidate:!0});for(const f of KE(e,i,s))s.omitInternalEngines&&f.engine.startsWith("internal:")||u.push({candidate:[f],isTextCandidate:!1});u.sort((f,d)=>Wi(f.candidate)-Wi(d.candidate));for(const{candidate:f,isTextCandidate:d}of u){const p=e.querySelectorAll(e.parseSelector(Vo(f)),s.root??i.ownerDocument);if(!p.includes(i))continue;if(p.length===1){o(f);break}const m=p.indexOf(i);if(!(m>5)&&(o([...f,{engine:"nth",selector:String(m),score:Ah}]),!s.isRecursive))for(let y=pt(i);y&&y!==s.root;y=pt(y)){const v=p.filter($=>tl(y,$)&&$!==y),b=v.indexOf(i);if(v.length>5||b===-1||b===m&&v.length>1)continue;const E=v.length===1?f:[...f,{engine:"nth",selector:String(b),score:Ah}];if(a&&Wi([{engine:"",selector:"",score:1},...E])>=Wi(a))continue;const _=!!s.noText||d,N=_?n.disallowText:n.allowText;let k=N.get(y);k===void 0&&(k=Ji(n,e,y,{...s,isRecursive:!0,noText:_})||$a(e,y,s),N.set(y,k)),k&&o([...k,...E])}}return a}function KE(n,e,i){const s=[];{for(const u of["data-testid","data-test-id","data-test"])u!==i.testIdAttributeName&&e.getAttribute(u)&&s.push({engine:"css",selector:`[${u}=${lr(e.getAttribute(u))}]`,score:LE});if(!i.noCSSId){const u=e.getAttribute("id");u&&!XE(u)&&s.push({engine:"css",selector:gv(u),score:IE})}s.push({engine:"css",selector:Yn(e),score:pv})}if(e.nodeName==="IFRAME"){for(const u of["name","title"])e.getAttribute(u)&&s.push({engine:"css",selector:`${Yn(e)}[${u}=${lr(e.getAttribute(u))}]`,score:RE});return e.getAttribute(i.testIdAttributeName)&&s.push({engine:"css",selector:`[${i.testIdAttributeName}=${lr(e.getAttribute(i.testIdAttributeName))}]`,score:ub}),Nh([s]),s}if(e.getAttribute(i.testIdAttributeName)&&s.push({engine:"internal:testid",selector:`[${i.testIdAttributeName}=${wt(e.getAttribute(i.testIdAttributeName),!0)}]`,score:ub}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e;if(u.placeholder){s.push({engine:"internal:attr",selector:`[placeholder=${wt(u.placeholder,!0)}]`,score:DE});for(const f of ur(u.placeholder))s.push({engine:"internal:attr",selector:`[placeholder=${wt(f.text,!1)}]`,score:cv-f.scoreBonus})}}const a=tv(n._evaluator._cacheText,e);for(const u of a){const f=u.normalized;s.push({engine:"internal:label",selector:Ot(f,!0),score:BE});for(const d of ur(f))s.push({engine:"internal:label",selector:Ot(d.text,!1),score:uv-d.scoreBonus})}const o=ct(e);return o&&!["none","presentation"].includes(o)&&s.push({engine:"internal:role",selector:o,score:dv}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&s.push({engine:"css",selector:`${Yn(e)}[name=${lr(e.getAttribute("name"))}]`,score:rh}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&s.push({engine:"css",selector:`${Yn(e)}[type=${lr(e.getAttribute("type"))}]`,score:rh}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&s.push({engine:"css",selector:Yn(e),score:rh+1}),Nh([s]),s}function YE(n,e,i){if(e.nodeName==="SELECT")return[];const s=[],a=e.getAttribute("title");if(a){s.push([{engine:"internal:attr",selector:`[title=${wt(a,!0)}]`,score:qE}]);for(const p of ur(a))s.push([{engine:"internal:attr",selector:`[title=${wt(p.text,!1)}]`,score:hv-p.scoreBonus}])}const o=e.getAttribute("alt");if(o&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){s.push([{engine:"internal:attr",selector:`[alt=${wt(o,!0)}]`,score:zE}]);for(const p of ur(o))s.push([{engine:"internal:attr",selector:`[alt=${wt(p.text,!1)}]`,score:fv-p.scoreBonus}])}const u=Rt(n._evaluator._cacheText,e).normalized,f=u?ur(u):[];if(u){if(i){u.length<=80&&s.push([{engine:"internal:text",selector:Ot(u,!0),score:HE}]);for(const m of f)s.push([{engine:"internal:text",selector:Ot(m.text,!1),score:Io-m.scoreBonus}])}const p={engine:"css",selector:Yn(e),score:pv};for(const m of f)s.push([p,{engine:"internal:has-text",selector:Ot(m.text,!1),score:Io-m.scoreBonus}]);if(i&&u.length<=80){const m=new RegExp("^"+Wo(u)+"$");s.push([p,{engine:"internal:has-text",selector:Ot(m,!1),score:fb}])}}const d=ct(e);if(d&&!["none","presentation"].includes(d)){const p=nl(e,!1);if(p&&!p.match(new RegExp("^\\p{Co}+$","u"))){const m={engine:"internal:role",selector:`${d}[name=${wt(p,!0)}]`,score:UE};s.push([m]);for(const y of ur(p))s.push([{engine:"internal:role",selector:`${d}[name=${wt(y.text,!1)}]`,score:ov-y.scoreBonus}])}else{const m={engine:"internal:role",selector:`${d}`,score:dv};for(const y of f)s.push([m,{engine:"internal:has-text",selector:Ot(y.text,!1),score:Io-y.scoreBonus}]);if(i&&u.length<=80){const y=new RegExp("^"+Wo(u)+"$");s.push([m,{engine:"internal:has-text",selector:Ot(y,!1),score:fb}])}}}return Nh(s),s}function gv(n){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(n)?"#"+n:`[id=${lr(n)}]`}function ah(n){return n.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function $a(n,e,i){const s=i.root??e.ownerDocument,a=[];function o(f){const d=a.slice();f&&d.unshift(f);const p=d.join(" > "),m=n.parseSelector(p);return n.querySelector(m,s,!1)===e?p:void 0}function u(f){const d={engine:"css",selector:f,score:VE},p=n.parseSelector(f),m=n.querySelectorAll(p,s);if(m.length===1)return[d];const y={engine:"nth",selector:String(m.indexOf(e)),score:Ah};return[d,y]}for(let f=e;f&&f!==s;f=pt(f)){let d="";if(f.id&&!i.noCSSId){const y=gv(f.id),v=o(y);if(v)return u(v);d=y}const p=f.parentNode,m=[...f.classList].map(PE);for(let y=0;y<m.length;++y){const v="."+m.slice(0,y+1).join("."),b=o(v);if(b)return u(b);!d&&p&&p.querySelectorAll(v).length===1&&(d=v)}if(p){const y=[...p.children],v=f.nodeName,E=y.filter(_=>_.nodeName===v).indexOf(f)===0?Yn(f):`${Yn(f)}:nth-child(${1+y.indexOf(f)})`,x=o(E);if(x)return u(x);d||(d=E)}else d||(d=Yn(f));a.unshift(d)}return u(o())}function Nh(n){for(const e of n)for(const i of e)i.score>jE&&i.score<$E&&(i.score+=Math.min(lv,i.selector.length/10|0))}function Vo(n){const e=[];let i="";for(const{engine:s,selector:a}of n)e.length&&(i!=="css"||s!=="css"||a.startsWith(":nth-match("))&&e.push(">>"),i=s,s==="css"?e.push(a):e.push(`${s}=${a}`);return e.join(" ")}function Wi(n){let e=0;for(let i=0;i<n.length;i++)e+=n[i].score*(n.length-i);return e}function XE(n){let e,i=0;for(let s=0;s<n.length;++s){const a=n[s];let o;if(!(a==="-"||a==="_")){if(a>="a"&&a<="z"?o="lower":a>="A"&&a<="Z"?o="upper":a>="0"&&a<="9"?o="digit":o="other",o==="lower"&&e==="upper"){e=o;continue}e&&e!==o&&++i,e=o}}return i>=n.length/4}function No(n,e){if(n.length<=e)return n;n=n.substring(0,e);const i=n.match(/^(.*)\b(.+?)$/);return i?i[1].trimEnd():""}function ur(n){let e=[];{const i=n.match(/^([\d.,]+)[^.,\w]/),s=i?i[1].length:0;if(s){const a=No(n.substring(s).trimStart(),80);e.push({text:a,scoreBonus:a.length<=30?2:1})}}{const i=n.match(/[^.,\w]([\d.,]+)$/),s=i?i[1].length:0;if(s){const a=No(n.substring(0,n.length-s).trimEnd(),80);e.push({text:a,scoreBonus:a.length<=30?2:1})}}return n.length<=30?e.push({text:n,scoreBonus:0}):(e.push({text:No(n,80),scoreBonus:0}),e.push({text:No(n,30),scoreBonus:1})),e=e.filter(i=>i.text),e.length||e.push({text:n.substring(0,80),scoreBonus:0}),e}function Yn(n){return n.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function PE(n){let e="";for(let i=0;i<n.length;i++)e+=FE(n,i);return e}function FE(n,e){const i=n.charCodeAt(e);return i===0?"�":i>=1&&i<=31||i>=48&&i<=57&&(e===0||e===1&&n.charCodeAt(0)===45)?"\\"+i.toString(16)+" ":e===0&&i===45&&n.length===1?"\\"+n.charAt(e):i>=128||i===45||i===95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n.charAt(e):"\\"+n.charAt(e)}function mv(n,e){const i=n.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let s=i.substring(i.lastIndexOf("/")+1);return s.endsWith(e)&&(s=s.substring(0,s.length-e.length)),s}function QE(n,e){return e?e.toUpperCase():""}const ZE=/(?:^|[-_/])(\w)/g,yv=n=>n&&n.replace(ZE,QE);function JE(n){function e(m){const y=m.name||m._componentTag||m.__playwright_guessedName;if(y)return y;const v=m.__file;if(v)return yv(mv(v,".vue"))}function i(m,y){return m.type.__playwright_guessedName=y,y}function s(m){var v,b,E,x;const y=e(m.type||{});if(y)return y;if(m.root===m)return"Root";for(const _ in(b=(v=m.parent)==null?void 0:v.type)==null?void 0:b.components)if(((E=m.parent)==null?void 0:E.type.components[_])===m.type)return i(m,_);for(const _ in(x=m.appContext)==null?void 0:x.components)if(m.appContext.components[_]===m.type)return i(m,_);return"Anonymous Component"}function a(m){return m._isBeingDestroyed||m.isUnmounted}function o(m){return m.subTree.type.toString()==="Symbol(Fragment)"}function u(m){const y=[];return m.component&&y.push(m.component),m.suspense&&y.push(...u(m.suspense.activeBranch)),Array.isArray(m.children)&&m.children.forEach(v=>{v.component?y.push(v.component):y.push(...u(v))}),y.filter(v=>{var b;return!a(v)&&!((b=v.type.devtools)!=null&&b.hide)})}function f(m){return o(m)?d(m.subTree):[m.subTree.el]}function d(m){if(!m.children)return[];const y=[];for(let v=0,b=m.children.length;v<b;v++){const E=m.children[v];E.component?y.push(...f(E.component)):E.el&&y.push(E.el)}return y}function p(m){return{name:s(m),children:u(m.subTree).map(p),rootElements:f(m),props:m.props}}return p(n)}function WE(n){function e(o){const u=o.displayName||o.name||o._componentTag;if(u)return u;const f=o.__file;if(f)return yv(mv(f,".vue"))}function i(o){const u=e(o.$options||o.fnOptions||{});return u||(o.$root===o?"Root":"Anonymous Component")}function s(o){return o.$children?o.$children:Array.isArray(o.subTree.children)?o.subTree.children.filter(u=>!!u.component).map(u=>u.component):[]}function a(o){return{name:i(o),children:s(o).map(a),rootElements:[o.$el],props:o._props}}return a(n)}function bv(n,e,i=[]){e(n)&&i.push(n);for(const s of n.children)bv(s,e,i);return i}function vv(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),a=new Set;do{const o=s.currentNode;o.__vue__&&a.add(o.__vue__.$root),o.__vue_app__&&o._vnode&&o._vnode.component&&e.push({root:o._vnode.component,version:3});const u=o instanceof Element?o.shadowRoot:null;u&&vv(u,e)}while(s.nextNode());for(const o of a)e.push({version:2,root:o});return e}const eA=()=>({queryAll(n,e){const i=n.ownerDocument||n,{name:s,attributes:a}=as(e,!1),f=vv(i).map(p=>p.version===3?JE(p.root):WE(p.root)).map(p=>bv(p,m=>{if(s&&m.name!==s||m.rootElements.some(y=>!tl(n,y)))return!1;for(const y of a)if(!W0(m.props,y))return!1;return!0})).flat(),d=new Set;for(const p of f)for(const m of p.rootElements)d.add(m);return[...d]}}),db={queryAll(n,e){e.startsWith("/")&&n.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const i=[],s=n.ownerDocument||n;if(!s)return i;const a=s.evaluate(e,n,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let o=a.iterateNext();o;o=a.iterateNext())o.nodeType===Node.ELEMENT_NODE&&i.push(o);return i}};function bd(n,e,i){return`internal:attr=[${n}=${wt(e,(i==null?void 0:i.exact)||!1)}]`}function tA(n,e){return`internal:testid=[${n}=${wt(e,!0)}]`}function nA(n,e){return"internal:label="+Ot(n,!!(e!=null&&e.exact))}function iA(n,e){return bd("alt",n,e)}function sA(n,e){return bd("title",n,e)}function rA(n,e){return bd("placeholder",n,e)}function aA(n,e){return"internal:text="+Ot(n,!!(e!=null&&e.exact))}function lA(n,e={}){const i=[];return e.checked!==void 0&&i.push(["checked",String(e.checked)]),e.disabled!==void 0&&i.push(["disabled",String(e.disabled)]),e.selected!==void 0&&i.push(["selected",String(e.selected)]),e.expanded!==void 0&&i.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&i.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&i.push(["level",String(e.level)]),e.name!==void 0&&i.push(["name",wt(e.name,!!e.exact)]),e.pressed!==void 0&&i.push(["pressed",String(e.pressed)]),`internal:role=${n}${i.map(([s,a])=>`[${s}=${a}]`).join("")}`}const Da=Symbol("selector"),oA=class Ia{constructor(e,i,s){if(s!=null&&s.hasText&&(i+=` >> internal:has-text=${Ot(s.hasText,!1)}`),s!=null&&s.hasNotText&&(i+=` >> internal:has-not-text=${Ot(s.hasNotText,!1)}`),s!=null&&s.has&&(i+=" >> internal:has="+JSON.stringify(s.has[Da])),s!=null&&s.hasNot&&(i+=" >> internal:has-not="+JSON.stringify(s.hasNot[Da])),(s==null?void 0:s.visible)!==void 0&&(i+=` >> visible=${s.visible?"true":"false"}`),this[Da]=i,i){const u=e.parseSelector(i);this.element=e.querySelector(u,e.document,!1),this.elements=e.querySelectorAll(u,e.document)}const a=i,o=this;o.locator=(u,f)=>new Ia(e,a?a+" >> "+u:u,f),o.getByTestId=u=>o.locator(tA(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),u)),o.getByAltText=(u,f)=>o.locator(iA(u,f)),o.getByLabel=(u,f)=>o.locator(nA(u,f)),o.getByPlaceholder=(u,f)=>o.locator(rA(u,f)),o.getByText=(u,f)=>o.locator(aA(u,f)),o.getByTitle=(u,f)=>o.locator(sA(u,f)),o.getByRole=(u,f={})=>o.locator(lA(u,f)),o.filter=u=>new Ia(e,i,u),o.first=()=>o.locator("nth=0"),o.last=()=>o.locator("nth=-1"),o.nth=u=>o.locator(`nth=${u}`),o.and=u=>new Ia(e,a+" >> internal:and="+JSON.stringify(u[Da])),o.or=u=>new Ia(e,a+" >> internal:or="+JSON.stringify(u[Da]))}};let cA=oA;class uA{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,i)=>this._querySelector(e,!!i),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,i)=>this._generateLocator(e,i),ariaSnapshot:(e,i)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,i||{mode:"expect"}),resume:()=>this._resume(),...new cA(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,i){if(typeof e!="string")throw new Error("Usage: playwright.query('Playwright >> selector').");const s=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(s,this._injectedScript.document,i)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const i=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(i,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,i){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const s=this._injectedScript.generateSelectorSimple(e);return Ti(i||"javascript",s)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function fA(n){try{return n instanceof RegExp||Object.prototype.toString.call(n)==="[object RegExp]"}catch{return!1}}function hA(n){try{return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}catch{return!1}}function dA(n){try{return n instanceof URL||Object.prototype.toString.call(n)==="[object URL]"}catch{return!1}}function pA(n){var e;try{return n instanceof Error||n&&((e=Object.getPrototypeOf(n))==null?void 0:e.name)==="Error"}catch{return!1}}function gA(n,e){try{return n instanceof e||Object.prototype.toString.call(n)===`[object ${e.name}]`}catch{return!1}}const Sv={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function mA(n){if("toBase64"in n)return n.toBase64();const e=Array.from(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)).map(i=>String.fromCharCode(i)).join("");return btoa(e)}function yA(n,e){const i=atob(n),s=new Uint8Array(i.length);for(let a=0;a<i.length;a++)s[a]=i.charCodeAt(a);return new e(s.buffer)}function Ch(n,e=[],i=new Map){if(!Object.is(n,void 0)){if(typeof n=="object"&&n){if("ref"in n)return i.get(n.ref);if("v"in n)return n.v==="undefined"?void 0:n.v==="null"?null:n.v==="NaN"?NaN:n.v==="Infinity"?1/0:n.v==="-Infinity"?-1/0:n.v==="-0"?-0:void 0;if("d"in n)return new Date(n.d);if("u"in n)return new URL(n.u);if("bi"in n)return BigInt(n.bi);if("e"in n){const s=new Error(n.e.m);return s.name=n.e.n,s.stack=n.e.s,s}if("r"in n)return new RegExp(n.r.p,n.r.f);if("a"in n){const s=[];i.set(n.id,s);for(const a of n.a)s.push(Ch(a,e,i));return s}if("o"in n){const s={};i.set(n.id,s);for(const{k:a,v:o}of n.o)a!=="__proto__"&&(s[a]=Ch(o,e,i));return s}if("h"in n)return e[n.h];if("ta"in n)return yA(n.ta.b,Sv[n.ta.k])}return n}}function bA(n,e){return kh(n,e,{visited:new Map,lastId:0})}function kh(n,e,i){if(n&&typeof n=="object"){if(typeof globalThis.Window=="function"&&n instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&n instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&n instanceof globalThis.Node)return"ref: <Node>"}return wv(n,e,i)}function wv(n,e,i){var o;const s=e(n);if("fallThrough"in s)n=s.fallThrough;else return s;if(typeof n=="symbol")return{v:"undefined"};if(Object.is(n,void 0))return{v:"undefined"};if(Object.is(n,null))return{v:"null"};if(Object.is(n,NaN))return{v:"NaN"};if(Object.is(n,1/0))return{v:"Infinity"};if(Object.is(n,-1/0))return{v:"-Infinity"};if(Object.is(n,-0))return{v:"-0"};if(typeof n=="boolean"||typeof n=="number"||typeof n=="string")return n;if(typeof n=="bigint")return{bi:n.toString()};if(pA(n)){let u;return(o=n.stack)!=null&&o.startsWith(n.name+": "+n.message)?u=n.stack:u=`${n.name}: ${n.message}
|
|
113
|
+
${n.stack}`,{e:{n:n.name,m:n.message,s:u}}}if(hA(n))return{d:n.toJSON()};if(dA(n))return{u:n.toJSON()};if(fA(n))return{r:{p:n.source,f:n.flags}};for(const[u,f]of Object.entries(Sv))if(gA(n,f))return{ta:{b:mA(n),k:u}};const a=i.visited.get(n);if(a)return{ref:a};if(Array.isArray(n)){const u=[],f=++i.lastId;i.visited.set(n,f);for(let d=0;d<n.length;++d)u.push(kh(n[d],e,i));return{a:u,id:f}}if(typeof n=="object"){const u=[],f=++i.lastId;i.visited.set(n,f);for(const p of Object.keys(n)){let m;try{m=n[p]}catch{continue}p==="toJSON"&&typeof m=="function"?u.push({k:p,v:{o:[],id:0}}):u.push({k:p,v:kh(m,e,i)})}let d;try{u.length===0&&n.toJSON&&typeof n.toJSON=="function"&&(d={value:n.toJSON()})}catch{}return d?wv(d.value,e,i):{o:u,id:f}}}class vA{constructor(e,i){var s,a,o,u,f,d,p,m;this.global=e,this.isUnderTest=i,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(s=e.setTimeout)==null?void 0:s.bind(e),clearTimeout:(a=e.clearTimeout)==null?void 0:a.bind(e),setInterval:(o=e.setInterval)==null?void 0:o.bind(e),clearInterval:(u=e.clearInterval)==null?void 0:u.bind(e),requestAnimationFrame:(f=e.requestAnimationFrame)==null?void 0:f.bind(e),cancelAnimationFrame:(d=e.cancelAnimationFrame)==null?void 0:d.bind(e),requestIdleCallback:(p=e.requestIdleCallback)==null?void 0:p.bind(e),cancelIdleCallback:(m=e.cancelIdleCallback)==null?void 0:m.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,i,s,a,...o){const u=o.slice(0,a),f=o.slice(a),d=[];for(let m=0;m<u.length;m++)d[m]=Ch(u[m],f);let p=this.global.eval(s);return e===!0?p=p(...d):e===!1?p=p:typeof p=="function"&&(p=p(...d)),i?this._promiseAwareJsonValueNoThrow(p):p}jsonValue(e,i){if(i!==void 0)return bA(i,s=>({fallThrough:s}))}_promiseAwareJsonValueNoThrow(e){const i=s=>{try{return this.jsonValue(!0,s)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const s=await e;return i(s)})():i(e)}}class xv{constructor(e,i){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this._lastAriaSnapshotForTrack=new Map,this.utils={asLocator:Ti,cacheNormalizedWhitespaces:qx,elementText:Rt,getAriaRole:ct,getElementAccessibleDescription:nb,getElementAccessibleName:nl,isElementVisible:Ei,isInsideScope:tl,normalizeWhiteSpace:_t,parseAriaSnapshot:Ph,generateAriaTree:Pa,findNewElement:lE,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=i.isUnderTest,this.utils.builtins=new vA(e,i.isUnderTest).builtins,this._sdkLanguage=i.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=i.testIdAttributeName,this._evaluator=new wE,this.consoleApi=new uA(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",db),this._engines.set("xpath:light",db),this._engines.set("_react",bE()),this._engines.set("_vue",eA()),this._engines.set("role",cb(!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",cb(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:s,source:a}of i.customEngines)this._engines.set(s,this.eval(a));this._stableRafCount=i.stableRafCount,this._browserName=i.browserName,this._isUtilityWorld=!!i.isUtilityWorld,kT({browserNameForWorkarounds:i.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 i=ll(e);return zx(i,s=>{if(!this._engines.has(s.name))throw this.createStacklessError(`Unknown engine "${s.name}" while parsing selector ${e}`)}),i}generateSelector(e,i){return hb(this,e,i)}generateSelectorSimple(e,i){return hb(this,e,{...i,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,i,s){const a=this.querySelectorAll(e,i);if(s&&a.length>1)throw this.strictModeViolationError(e,a);return this.checkDeprecatedSelectorUsage(e,a),a[0]}_queryNth(e,i){const s=[...e];let a=+i.body;return a===-1&&(a=s.length-1),new Set(s.slice(a,a+1))}_queryLayoutSelector(e,i,s){const a=i.name,o=i.body,u=[],f=this.querySelectorAll(o.parsed,s);for(const d of e){const p=J0(a,d,f,o.distance);p!==void 0&&u.push({element:d,score:p})}return u.sort((d,p)=>d.score-p.score),new Set(u.map(d=>d.element))}ariaSnapshot(e,i){return this.incrementalAriaSnapshot(e,i).full}incrementalAriaSnapshot(e,i){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const s=Pa(e,i),a=Fa(s,i);let o;if(i.track){const u=this._lastAriaSnapshotForTrack.get(i.track);u&&(o=Fa(s,i,u)),this._lastAriaSnapshotForTrack.set(i.track,s)}return this._lastAriaSnapshotForQuery=s,{full:a,incremental:o,iframeRefs:s.iframeRefs}}ariaSnapshotForRecorder(){const e=Pa(this.document.body,{mode:"ai"});return{ariaSnapshot:Fa(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,i){return nE(e.documentElement,i)}querySelectorAll(e,i){if(e.capture!==void 0){if(e.parts.some(a=>a.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const s={parts:e.parts.slice(0,e.capture+1)};if(e.capture<e.parts.length-1){const a={parts:e.parts.slice(e.capture+1)},o={name:"internal:has",body:{parsed:a},source:xn(a)};s.parts.push(o)}return this.querySelectorAll(s,i)}if(!i.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(i.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[i];this._evaluator.begin();try{let s=new Set([i]);for(const a of e.parts)if(a.name==="nth")s=this._queryNth(s,a);else if(a.name==="internal:and"){const o=this.querySelectorAll(a.body.parsed,i);s=new Set(o.filter(u=>s.has(u)))}else if(a.name==="internal:or"){const o=this.querySelectorAll(a.body.parsed,i);s=new Set(av(new Set([...s,...o])))}else if(dE.includes(a.name))s=this._queryLayoutSelector(s,a,i);else{const o=new Set;for(const u of s){const f=this._queryEngineAll(a,u);for(const d of f)o.add(d)}s=o}return[...s]}finally{this._evaluator.end()}}_queryEngineAll(e,i){const s=this._engines.get(e.name).queryAll(i,e.body);for(const a of s)if(!("nodeName"in a))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(a)}`);return s}_createAttributeEngine(e,i){const s=a=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(a)}]`,functions:[]},combinator:""}]}];return{queryAll:(a,o)=>this._evaluator.query({scope:a,pierceShadow:i},s(o))}}_createCSSEngine(){return{queryAll:(e,i)=>this._evaluator.query({scope:e,pierceShadow:!0},i)}}_createTextEngine(e,i){return{queryAll:(a,o)=>{const{matcher:u,kind:f}=ko(o,i),d=[];let p=null;const m=v=>{if(f==="lax"&&p&&p.contains(v))return!1;const b=gc(this._evaluator._cacheText,v,u);b==="none"&&(p=v),(b==="self"||b==="selfAndChildren"&&f==="strict"&&!i)&&d.push(v)};a.nodeType===Node.ELEMENT_NODE&&m(a);const y=this._evaluator._queryCSS({scope:a,pierceShadow:e},"*");for(const v of y)m(v);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const s=e,a=Rt(this._evaluator._cacheText,s),{matcher:o}=ko(i,!0);return o(a)?[s]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const s=e,a=Rt(this._evaluator._cacheText,s),{matcher:o}=ko(i,!0);return o(a)?[]:[s]}}}_createInternalLabelEngine(){return{queryAll:(e,i)=>{const{matcher:s}=ko(i,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(o=>tv(this._evaluator._cacheText,o).some(u=>s(u)))}}}_createNamedAttributeEngine(){return{queryAll:(i,s)=>{const a=as(s,!0);if(a.name||a.attributes.length!==1)throw new Error("Malformed attribute selector: "+s);const{name:o,value:u,caseSensitive:f}=a.attributes[0],d=f?null:u.toLowerCase();let p;return u instanceof RegExp?p=y=>!!y.match(u):f?p=y=>y===u:p=y=>y.toLowerCase().includes(d),this._evaluator._queryCSS({scope:i,pierceShadow:!0},`[${o}]`).filter(y=>p(y.getAttribute(o)))}}}_createDescribeEngine(){return{queryAll:i=>i.nodeType!==1?[]:[i]}}_createControlEngine(){return{queryAll(e,i){if(i==="enter-frame")return[];if(i==="return-empty")return[];if(i==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${i}`)}}}_createHasEngine(){return{queryAll:(i,s)=>i.nodeType!==1?[]:!!this.querySelector(s.parsed,i,!1)?[i]:[]}}_createHasNotEngine(){return{queryAll:(i,s)=>i.nodeType!==1?[]:!!this.querySelector(s.parsed,i,!1)?[]:[i]}}_createVisibleEngine(){return{queryAll:(i,s)=>{if(i.nodeType!==1)return[];const a=s==="true";return Ei(i)===a?[i]:[]}}}_createInternalChainEngine(){return{queryAll:(i,s)=>this.querySelectorAll(s.parsed,i)}}extend(e,i){const s=this.window.eval(`
|
|
114
|
+
(() => {
|
|
115
|
+
const module = {};
|
|
116
|
+
${e}
|
|
117
|
+
return module.exports.default();
|
|
118
|
+
})()`);return new s(this,i)}async viewportRatio(e){return await new Promise(i=>{const s=new IntersectionObserver(a=>{i(a[0].intersectionRatio),s.disconnect()});s.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 i=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(i.borderLeftWidth||"",10),top:parseInt(i.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const i=e.ownerDocument.defaultView;for(let a=e;a;a=pt(a))if(i.getComputedStyle(a).transform!=="none")return"transformed";const s=i.getComputedStyle(e);return{left:parseInt(s.borderLeftWidth||"",10)+parseInt(s.paddingLeft||"",10),top:parseInt(s.borderTopWidth||"",10)+parseInt(s.paddingTop||"",10)}}retarget(e,i){let s=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!s)return null;if(i==="none")return s;if(!s.matches("input, textarea, select")&&!s.isContentEditable&&(i==="button-link"?s=s.closest("button, [role=button], a, [role=link]")||s:s=s.closest("button, [role=button], [role=checkbox], [role=radio]")||s),i==="follow-label"&&!s.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!s.isContentEditable){const a=s.closest("label");a&&a.control&&(s=a.control)}return s}async checkElementStates(e,i){if(i.includes("stable")){const s=await this._checkElementIsStable(e);if(s===!1)return{missingState:"stable"};if(s==="error:notconnected")return"error:notconnected"}for(const s of i)if(s!=="stable"){const a=this.elementState(e,s);if(a.received==="error:notconnected")return"error:notconnected";if(!a.matches)return{missingState:s}}}async _checkElementIsStable(e){const i=Symbol("continuePolling");let s,a=0,o=0;const u=()=>{const y=this.retarget(e,"no-follow-label");if(!y)return"error:notconnected";const v=this.utils.builtins.performance.now();if(this._stableRafCount>1&&v-o<15)return i;o=v;const b=y.getBoundingClientRect(),E={x:b.top,y:b.left,width:b.width,height:b.height};if(s){if(!(E.x===s.x&&E.y===s.y&&E.width===s.width&&E.height===s.height))return!1;if(++a>=this._stableRafCount)return!0}return s=E,i};let f,d;const p=new Promise((y,v)=>{f=y,d=v}),m=()=>{try{const y=u();y!==i?f(y):this.utils.builtins.requestAnimationFrame(m)}catch(y){d(y)}};return this.utils.builtins.requestAnimationFrame(m),p}_createAriaRefEngine(){return{queryAll:(i,s)=>{var o,u;const a=(u=(o=this._lastAriaSnapshotForQuery)==null?void 0:o.elements)==null?void 0:u.get(s);return a&&a.isConnected?[a]:[]}}}elementState(e,i){const s=this.retarget(e,["visible","hidden"].includes(i)?"none":"follow-label");if(!s||!s.isConnected)return i==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(i==="visible"||i==="hidden"){const a=Ei(s);return{matches:i==="visible"?a:!a,received:a?"visible":"hidden"}}if(i==="disabled"||i==="enabled"){const a=sc(s);return{matches:i==="disabled"?a:!a,received:a?"disabled":"enabled"}}if(i==="editable"){const a=sc(s),o=GT(s);if(o==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!a&&!o,received:a?"disabled":o?"readOnly":"editable"}}if(i==="checked"||i==="unchecked"){const a=i==="checked",o=IT(s);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");const u=s.nodeName==="INPUT"&&s.type==="radio";return{matches:a===o,received:o?"checked":"unchecked",isRadio:u}}if(i==="indeterminate"){const a=$T(s);if(a==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:a==="mixed",received:a===!0?"checked":a===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${i}"`)}selectOptions(e,i){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const a=s,o=[...a.options],u=[];let f=i.slice();for(let d=0;d<o.length;d++){const p=o[d],m=y=>{if(y instanceof Node)return p===y;let v=!0;return y.valueOrLabel!==void 0&&(v=v&&(y.valueOrLabel===p.value||y.valueOrLabel===p.label)),y.value!==void 0&&(v=v&&y.value===p.value),y.label!==void 0&&(v=v&&y.label===p.label),y.index!==void 0&&(v=v&&y.index===d),v};if(f.some(m)){if(!this.elementState(p,"enabled").matches)return"error:optionnotenabled";if(u.push(p),a.multiple)f=f.filter(y=>!m(y));else{f=[];break}}}return f.length?"error:optionsnotfound":(a.value=void 0,u.forEach(d=>d.selected=!0),a.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),a.dispatchEvent(new Event("change",{bubbles:!0})),u.map(d=>d.value))}fill(e,i){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()==="input"){const a=s,o=a.type.toLowerCase(),u=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(o)&&!u.has(o))throw this.createStacklessError(`Input of type "${o}" cannot be filled`);if(o==="number"&&(i=i.trim(),isNaN(Number(i))))throw this.createStacklessError("Cannot type text into input[type=number]");if(o==="color"&&(i=i.toLowerCase()),u.has(o)){if(i=i.trim(),a.focus(),a.value=i,a.value!==i)throw this.createStacklessError("Malformed value");return s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})),"done"}}else if(s.nodeName.toLowerCase()!=="textarea"){if(!s.isContentEditable)throw this.createStacklessError("Element is not an <input>, <textarea> or [contenteditable] element")}return this.selectText(s),"needsinput"}selectText(e){const i=this.retarget(e,"follow-label");if(!i)return"error:notconnected";if(i.nodeName.toLowerCase()==="input"){const o=i;return o.select(),o.focus(),"done"}if(i.nodeName.toLowerCase()==="textarea"){const o=i;return o.selectionStart=0,o.selectionEnd=o.value.length,o.focus(),"done"}const s=i.ownerDocument.createRange();s.selectNodeContents(i);const a=i.ownerDocument.defaultView.getSelection();return a&&(a.removeAllRanges(),a.addRange(s)),i.focus(),"done"}_activelyFocused(e){const i=e.getRootNode().activeElement,s=i===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:i,isFocused:s}}focusNode(e,i){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:s,isFocused:a}=this._activelyFocused(e);if(e.isContentEditable&&!a&&s&&s.blur&&s.blur(),e.focus(),e.focus(),i&&!a&&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,i){if(e.nodeType!==Node.ELEMENT_NODE)return"Node is not of type HTMLElement";const s=e;if(s.nodeName!=="INPUT")return"Not an <input> element";const a=s;if((a.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const u=i.map(d=>{const p=Uint8Array.from(atob(d.buffer),m=>m.charCodeAt(0));return new File([p],d.name,{type:d.mimeType,lastModified:d.lastModifiedMs})}),f=new DataTransfer;for(const d of u)f.items.add(d);a.files=f.files,a.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),a.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,i){const s=[];let a=i;for(;a;){const m=N0(a);if(!m||(s.push(m),m.nodeType===9))break;a=m.host}let o;for(let m=s.length-1;m>=0;m--){const y=s[m],v=y.elementsFromPoint(e.x,e.y),b=y.elementFromPoint(e.x,e.y);if(b&&v[0]&&pt(b)===v[0]){const x=this.window.getComputedStyle(b);(x==null?void 0:x.display)==="contents"&&v.unshift(b)}v[0]&&v[0].shadowRoot===y&&v[1]===b&&v.shift();const E=v[0];if(!E||(o=E,m&&E!==s[m-1].host))break}const u=[];for(;o&&o!==i;)u.push(o),o=o.assignedSlot??pt(o);if(o===i)return"done";const f=this.previewNode(u[0]||this.document.documentElement);let d,p=i;for(;p;){const m=u.indexOf(p);if(m!==-1){m>1&&(d=this.previewNode(u[m-1]));break}p=pt(p)}return d?{hitTargetDescription:`${f} from ${d} subtree`}:{hitTargetDescription:f}}setupHitTargetInterceptor(e,i,s,a){const o=this.retarget(e,"button-link");if(!o||!o.isConnected)return"error:notconnected";if(s){const m=this.expectHitTarget(s,o);if(m!=="done")return m.hitTargetDescription}if(i==="drag")return{stop:()=>"done"};const u={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[i];let f;const d=m=>{if(!u.has(m.type)||!m.isTrusted)return;const y=this.window.TouchEvent&&m instanceof this.window.TouchEvent?m.touches[0]:m;f===void 0&&y&&(f=this.expectHitTarget({x:y.clientX,y:y.clientY},o)),(a||f!=="done"&&f!==void 0)&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation())},p=()=>(this._hitTargetInterceptor===d&&(this._hitTargetInterceptor=void 0),f||"done");return this._hitTargetInterceptor=d,{stop:p}}dispatchEvent(e,i,s){var u,f,d;let a;const o={bubbles:!0,cancelable:!0,composed:!0,...s};switch(this._eventTypes.get(i)){case"mouse":a=new MouseEvent(i,o);break;case"keyboard":a=new KeyboardEvent(i,o);break;case"touch":{if(this._browserName==="webkit"){const p=y=>{var E,x;if(y instanceof Touch)return y;let v=y.pageX;v===void 0&&y.clientX!==void 0&&(v=y.clientX+(((E=this.document.scrollingElement)==null?void 0:E.scrollLeft)||0));let b=y.pageY;return b===void 0&&y.clientY!==void 0&&(b=y.clientY+(((x=this.document.scrollingElement)==null?void 0:x.scrollTop)||0)),this.document.createTouch(this.window,y.target??e,y.identifier,v,b,y.screenX,y.screenY,y.radiusX,y.radiusY,y.rotationAngle,y.force)},m=y=>y instanceof TouchList||!y?y:this.document.createTouchList(...y.map(p));o.target??(o.target=e),o.touches=m(o.touches),o.targetTouches=m(o.targetTouches),o.changedTouches=m(o.changedTouches),a=new TouchEvent(i,o)}else o.target??(o.target=e),o.touches=(u=o.touches)==null?void 0:u.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o.targetTouches=(f=o.targetTouches)==null?void 0:f.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o.changedTouches=(d=o.changedTouches)==null?void 0:d.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),a=new TouchEvent(i,o);break}case"pointer":a=new PointerEvent(i,o);break;case"focus":a=new FocusEvent(i,o);break;case"drag":a=new DragEvent(i,o);break;case"wheel":a=new WheelEvent(i,o);break;case"deviceorientation":try{a=new DeviceOrientationEvent(i,o)}catch{const{bubbles:p,cancelable:m,alpha:y,beta:v,gamma:b,absolute:E}=o;a=this.document.createEvent("DeviceOrientationEvent"),a.initDeviceOrientationEvent(i,p,m,y,v,b,E)}break;case"devicemotion":try{a=new DeviceMotionEvent(i,o)}catch{const{bubbles:p,cancelable:m,acceleration:y,accelerationIncludingGravity:v,rotationRate:b,interval:E}=o;a=this.document.createEvent("DeviceMotionEvent"),a.initDeviceMotionEvent(i,p,m,y,v,b,E)}break;default:a=new Event(i,o);break}e.dispatchEvent(a)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return Co(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return Co(`<${e.nodeName.toLowerCase()} />`);const i=e,s=[];for(let d=0;d<i.attributes.length;d++){const{name:p,value:m}=i.attributes[d];p!=="style"&&(!m&&this._booleanAttributes.has(p)?s.push(` ${p}`):s.push(` ${p}="${m}"`))}s.sort((d,p)=>d.length-p.length);const a=Hy(s.join(""),500);if(this._autoClosingTags.has(i.nodeName))return Co(`<${i.nodeName.toLowerCase()}${a}/>`);const o=i.childNodes;let u=!1;if(o.length<=5){u=!0;for(let d=0;d<o.length;d++)u=u&&o[d].nodeType===Node.TEXT_NODE}const f=u?i.textContent||"":o.length?"…":"";return Co(`<${i.nodeName.toLowerCase()}${a}>${Hy(f,50)}</${i.nodeName.toLowerCase()}>`)}_generateSelectors(e){this._evaluator.begin(),dc(),Jh();try{const i=this._isUtilityWorld&&this._browserName==="firefox"?2:10;return e.slice(0,i).map(a=>({preview:this.previewNode(a),selector:this.generateSelectorSimple(a)})).map((a,o)=>`${o+1}) ${a.preview} aka ${Ti(this._sdkLanguage,a.selector)}`)}finally{Wh(),pc(),this._evaluator.end()}}strictModeViolationError(e,i){const s=this._generateSelectors(i).map(a=>`
|
|
119
|
+
`+a);return s.length<i.length&&s.push(`
|
|
120
|
+
...`),this.createStacklessError(`strict mode violation: ${Ti(this._sdkLanguage,xn(e))} resolved to ${i.length} elements:${s.join("")}
|
|
121
|
+
`)}checkDeprecatedSelectorUsage(e,i){const s=new Set(["_react","_vue","xpath:light","text:light","id:light","data-testid:light","data-test-id:light","data-test:light"]);if(!i.length)return;const a=e.parts.find(u=>s.has(u.name));if(!a)return;const o=this._generateSelectors(i).map(u=>`
|
|
122
|
+
`+u);throw o.length<i.length&&o.push(`
|
|
123
|
+
...`),this.createStacklessError(`"${a.name}" selector is not supported: ${Ti(this._sdkLanguage,xn(e))} resolved to ${i.length} element${i.length===1?"":"s"}:${o.join("")}
|
|
124
|
+
`)}createStacklessError(e){if(this._browserName==="firefox"){const s=new Error("Error: "+e);return s.stack="",s}const i=new Error(e);return delete i.stack,i}createHighlight(){return new ih(this)}maskSelectors(e,i){this._highlight&&this.hideHighlight(),this._highlight=new ih(this),this._highlight.install();const s=[];for(const a of e)s.push(this.querySelectorAll(a,this.document.documentElement));this._highlight.maskElements(s.flat(),i)}highlight(e){this._highlight||(this._highlight=new ih(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,i){var u,f;((u=this._markedElements)==null?void 0:u.callId)!==i&&(this._markedElements=void 0);const s=((f=this._markedElements)==null?void 0:f.elements)||new Set,a=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const d of s)e.has(d)||d.dispatchEvent(a);const o=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const d of e)s.has(d)||d.dispatchEvent(o);this._markedElements={callId:i,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let i=!1;const s=()=>i=!0;this.window.addEventListener(e,s),new MutationObserver(a=>{if(a.some(u=>Array.from(u.addedNodes).includes(this.document.documentElement))&&(i=!1,this.window.dispatchEvent(new CustomEvent(e)),!i)){this.window.addEventListener(e,s);for(const u of this.onGlobalListenersRemoved)u()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=s=>{var a;return(a=this._hitTargetInterceptor)==null?void 0:a.call(this,s)},i=()=>{for(const s of this._allHitTargetInterceptorEvents)this.window.addEventListener(s,e,{capture:!0,passive:!1})};i(),this.onGlobalListenersRemoved.add(i)}async expect(e,i,s){var o,u;if(i.expression==="to.have.count"||i.expression.endsWith(".array"))return this.expectArray(s,i);if(!e){if(!i.isNot&&i.expression==="to.be.hidden")return{matches:!0};if(i.isNot&&i.expression==="to.be.visible")return{matches:!1};if(!i.isNot&&i.expression==="to.be.detached")return{matches:!0};if(i.isNot&&i.expression==="to.be.attached")return{matches:!1};if(i.isNot&&i.expression==="to.be.in.viewport")return{matches:!1};if(i.expression==="to.have.title"&&((o=i==null?void 0:i.expectedText)!=null&&o[0])){const f=new ir(i.expectedText[0]),d=this.document.title;return{received:d,matches:f.matches(d)}}if(i.expression==="to.have.url"&&((u=i==null?void 0:i.expectedText)!=null&&u[0])){const f=new ir(i.expectedText[0]),d=this.document.location.href;return{received:d,matches:f.matches(d)}}return{matches:i.isNot,missingReceived:!0}}return await this.expectSingleElement(e,i)}async expectSingleElement(e,i){var a;const s=i.expression;{let o;if(s==="to.have.attribute"){const u=e.hasAttribute(i.expressionArg);o={matches:u,received:u?"attribute present":"attribute not present"}}else if(s==="to.be.checked"){const{checked:u,indeterminate:f}=i.expectedValue;if(f){if(u!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");o=this.elementState(e,"indeterminate")}else o=this.elementState(e,u===!1?"unchecked":"checked")}else if(s==="to.be.disabled")o=this.elementState(e,"disabled");else if(s==="to.be.editable")o=this.elementState(e,"editable");else if(s==="to.be.readonly")o=this.elementState(e,"editable"),o.matches=!o.matches;else if(s==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e.value;o={matches:!u,received:u?"notEmpty":"empty"}}else{const u=(a=e.textContent)==null?void 0:a.trim();o={matches:!u,received:u?"notEmpty":"empty"}}else if(s==="to.be.enabled")o=this.elementState(e,"enabled");else if(s==="to.be.focused"){const u=this._activelyFocused(e).isFocused;o={matches:u,received:u?"focused":"inactive"}}else s==="to.be.hidden"?o=this.elementState(e,"hidden"):s==="to.be.visible"?o=this.elementState(e,"visible"):s==="to.be.attached"?o={matches:!0,received:"attached"}:s==="to.be.detached"&&(o={matches:!1,received:"attached"});if(o){if(o.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return o}}if(s==="to.have.property"){let o=e;const u=i.expressionArg.split(".");for(let p=0;p<u.length-1;p++){if(typeof o!="object"||!(u[p]in o))return{received:void 0,matches:!1};o=o[u[p]]}const f=o[u[u.length-1]],d=Mh(f,i.expectedValue);return{received:f,matches:d}}if(s==="to.be.in.viewport"){const o=await this.viewportRatio(e);return{received:`viewport ratio ${o}`,matches:o>0&&o>(i.expectedNumber??0)-1e-9}}if(s==="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 o=[...e.selectedOptions].map(u=>u.value);return o.length!==i.expectedText.length?{received:o,matches:!1}:{received:o,matches:o.map((u,f)=>new ir(i.expectedText[f]).matches(u)).every(Boolean)}}if(s==="to.match.aria"){const o=tE(e,i.expectedValue);return{received:o.received,matches:!!o.matches.length}}{let o;if(s==="to.have.attribute.value"){const u=e.getAttribute(i.expressionArg);if(u===null)return{received:null,matches:!1};o=u}else if(["to.have.class","to.contain.class"].includes(s)){if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);return{received:e.classList.toString(),matches:new ir(i.expectedText[0]).matchesClassList(this,e.classList,s==="to.contain.class")}}else if(s==="to.have.css")o=this.window.getComputedStyle(e).getPropertyValue(i.expressionArg);else if(s==="to.have.id")o=e.id;else if(s==="to.have.text")o=i.useInnerText?e.innerText:Rt(new Map,e).full;else if(s==="to.have.accessible.name")o=nl(e,!1);else if(s==="to.have.accessible.description")o=nb(e,!1);else if(s==="to.have.accessible.error.message")o=HT(e);else if(s==="to.have.role")o=ct(e)||"";else if(s==="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");o=e.value}if(o!==void 0&&i.expectedText){const u=new ir(i.expectedText[0]);return{received:o,matches:u.matches(o)}}}throw this.createStacklessError("Unknown expect matcher: "+s)}expectArray(e,i){const s=i.expression;if(s==="to.have.count"){const d=e.length,p=d===i.expectedNumber;return{received:d,matches:p}}if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);if(["to.have.class.array","to.contain.class.array"].includes(s)){const d=e.map(y=>y.classList),p=d.map(String);if(d.length!==i.expectedText.length)return{received:p,matches:!1};const m=this._matchSequentially(i.expectedText,d,(y,v)=>y.matchesClassList(this,v,s==="to.contain.class.array"));return{received:p,matches:m}}if(!["to.contain.text.array","to.have.text.array"].includes(s))throw this.createStacklessError("Unknown expect matcher: "+s);const a=e.map(d=>i.useInnerText?d.innerText:Rt(new Map,d).full),o=s!=="to.contain.text.array";if(!(a.length===i.expectedText.length||!o))return{received:a,matches:!1};const f=this._matchSequentially(i.expectedText,a,(d,p)=>d.matches(p));return{received:a,matches:f}}_matchSequentially(e,i,s){const a=e.map(f=>new ir(f));let o=0,u=0;for(;o<a.length&&u<i.length;)s(a[o],i[u])&&++o,++u;return o===a.length}}function Co(n){return n.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function SA(n){if(n=n.substring(1,n.length-1),!n.includes("\\"))return n;const e=[];let i=0;for(;i<n.length;)n[i]==="\\"&&i+1<n.length&&i++,e.push(n[i++]);return e.join("")}function ko(n,e){if(n[0]==="/"&&n.lastIndexOf("/")>0){const a=n.lastIndexOf("/"),o=new RegExp(n.substring(1,a),n.substring(a+1));return{matcher:u=>o.test(u.full),kind:"regex"}}const i=e?JSON.parse.bind(JSON):SA;let s=!1;return n.length>1&&n[0]==='"'&&n[n.length-1]==='"'?(n=i(n),s=!0):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="i"?(n=i(n.substring(0,n.length-1)),s=!1):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="s"?(n=i(n.substring(0,n.length-1)),s=!0):n.length>1&&n[0]==="'"&&n[n.length-1]==="'"&&(n=i(n),s=!0),n=_t(n),s?e?{kind:"strict",matcher:o=>o.normalized===n}:{matcher:o=>!n&&!o.immediate.length?!0:o.immediate.some(u=>_t(u)===n),kind:"strict"}:(n=n.toLowerCase(),{kind:"lax",matcher:a=>a.normalized.toLowerCase().includes(n)})}class ir{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 i=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&i.delete("i"),e.ignoreCase===!0&&i.add("i"),this._regex=new RegExp(e.regexSource,[...i].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,i,s){if(s){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(a=>i.contains(a))}return this.matches(i.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=_t(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function Mh(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(let s=0;s<n.length;++s)if(!Mh(n[s],e[s]))return!1;return!0}if(n instanceof RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();const i=Object.keys(n);if(i.length!==Object.keys(e).length)return!1;for(let s=0;s<i.length;++s)if(!e.hasOwnProperty(i[s]))return!1;for(const s of i)if(!Mh(n[s],e[s]))return!1;return!0}return typeof n=="number"&&typeof e=="number"?isNaN(n)&&isNaN(e):!1}const wA={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:"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"}}]}]}]},rn={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f"};class pb{}class lh{constructor(e,i){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=i}cursor(){return"pointer"}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){var i;Ue(e),e.button===0&&(i=this._hoveredModel)!=null&&i.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){Ue(e)}onPointerUp(e){Ue(e)}onMouseDown(e){Ue(e)}onMouseUp(e){Ue(e)}onMouseMove(e){var a;Ue(e);let i=this._recorder.deepEventTarget(e);if(i.isConnected||(i=null),this._hoveredElement===i)return;this._hoveredElement=i;let s=null;if(this._hoveredElement){const o=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});s={selector:o.selector,elements:o.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,o.selector),color:this._assertVisibility?rn.assert:rn.single}}((a=this._hoveredModel)==null?void 0:a.selector)!==(s==null?void 0:s.selector)&&(this._hoveredModel=s,this._recorder.updateHighlight(s,!0))}onMouseEnter(e){Ue(e)}onMouseLeave(e){Ue(e);const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){Ue(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){Ue(e)}onScroll(e){this._reset(!1)}_commit(e,i){var s;this._assertVisibility?(this._recorder.recordAction({name:"assertVisible",selector:e,signals:[]}),this._recorder.setMode("recording"),(s=this._recorder.overlay)==null||s.flashToolSucceeded("assertingVisibility")):this._recorder.elementPicked(e,i)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class xA{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 _v(e)}cursor(){return"pointer"}_installObserverIfNeeded(){var e;this._observer||(e=this._recorder.injectedScript.document)!=null&&e.body&&(this._observer=new MutationObserver(i=>{if(this._hoveredElement)for(const s of i)for(const a of s.removedNodes)(a===this._hoveredElement||a.contains(this._hoveredElement))&&this._resetHoveredModel()}),this._observer.observe(this._recorder.injectedScript.document.body,{childList:!0,subtree:!0}))}uninstall(){var e;(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){if(this._dialog.isShowing()){e.button===2&&e.type==="auxclick"&&Ue(e);return}if(Ja(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel))return;if(e.button===2&&e.type==="auxclick"){this._showActionListDialog(this._hoveredModel,e);return}const i=Za(this._recorder.deepEventTarget(e));if(i&&e.detail===1){this._performAction({name:i.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[]});return}this._cancelPendingClickAction(),e.detail===1&&(this._pendingClickAction={action:{name:"click",selector:this._hoveredModel.selector,position:Qa(e),signals:[],button:Oh(e),modifiers:gr(e),clickCount:e.detail},timeout:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){this._dialog.isShowing()||Ja(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:Qa(e),signals:[],button:Oh(e),modifiers:gr(e),clickCount:e.detail}))}_commitPendingClickAction(){this._pendingClickAction&&this._performAction(this._pendingClickAction.action),this._cancelPendingClickAction()}_cancelPendingClickAction(){this._pendingClickAction&&this._recorder.injectedScript.utils.builtins.clearTimeout(this._pendingClickAction.timeout),this._pendingClickAction=void 0}onContextMenu(e){if(this._dialog.isShowing()){Ue(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._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);this._hoveredElement!==i&&(this._hoveredElement=i,this._updateModelForHoveredElement())}onMouseLeave(e){if(this._dialog.isShowing())return;const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredElement=null,this._updateModelForHoveredElement())}onFocus(e){this._dialog.isShowing()||this._onFocus(!0)}async onInput(e){if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);if(i.nodeName==="INPUT"&&i.type.toLowerCase()==="file"){const s=i.files,a=s?[...s].map(u=>u.name):[],o=s&&s.length>0?await this._readFiles(s):[];this._recordAction({name:"setInputFiles",selector:this._activeModel.selector,signals:[],files:a,fullFiles:o.length>0?o:void 0});return}if(Ja(i)){this._recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:i.value});return}if(["INPUT","TEXTAREA"].includes(i.nodeName)||i.isContentEditable){if(i.nodeName==="INPUT"&&["checkbox","radio"].includes(i.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:i.isContentEditable?i.innerText:i.value})}if(i.nodeName==="SELECT"){const s=i;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...s.selectedOptions].map(a=>a.value),signals:[]})}}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 i=Za(this._recorder.deepEventTarget(e));if(i&&e.detail===0){this._performAction({name:i.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[]});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:gr(e)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){Ue(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,i){Ue(i);const s=Qa(i),a=[{title:"Click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:0})},{title:"Right click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"right",modifiers:0,clickCount:0})},{title:"Double click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:2})},{title:"Hover",cb:()=>this._performAction({name:"hover",selector:e.selector,position:s,signals:[]})},{title:"Pick locator",cb:()=>this._recorder.elementPicked(e.selector,e)}],o=this._recorder.document.createElement("x-pw-action-list");o.setAttribute("role","list"),o.setAttribute("aria-label","Choose action");for(const p of a){const m=this._recorder.document.createElement("x-pw-action-item");m.setAttribute("role","listitem"),m.textContent=p.title,m.setAttribute("aria-label",p.title),m.addEventListener("click",()=>{this._dialog.close(),p.cb()}),o.appendChild(m)}const u=this._dialog.show({label:"Choose action",body:o,autosize:!0}),f=this._recorder.highlight.firstTooltipBox()||e.elements[0].getBoundingClientRect(),d=this._recorder.highlight.tooltipPosition(f,u);this._dialog.moveTo(d.anchorTop,d.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const i=AA(this._recorder.document);if(e&&i===this._recorder.document.body)return;const s=i?this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=s&&s.selector?{...s,color:rn.action}:null,e&&(this._hoveredElement=i,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),s=i.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(i.type))}_actionInProgress(e){const i=e instanceof KeyboardEvent,s=e instanceof MouseEvent||e instanceof PointerEvent;for(const a of this._performingActions)if(i&&a.name==="press"&&e.key===a.key||s&&(a.name==="click"||a.name==="hover"||a.name==="check"||a.name==="uncheck"))return!0;return Ue(e),!1}_consumedDueToNoModel(e,i){return i?!1:(Ue(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(Ue(e),!0)}_consumeWhenAboutToPerform(e){this._performingActions.size||Ue(e)}_recordAction(e){this._recorder.recordAction(e)}async _readFiles(e){const s=[];for(const a of Array.from(e))if(!(a.size>52428800))try{const o=await a.arrayBuffer(),u=new Uint8Array(o),f=8192;let d="";for(let m=0;m<u.length;m+=f){const y=u.subarray(m,m+f);d+=String.fromCharCode(...y)}const p=btoa(d);s.push({name:a.name,mimeType:a.type||"application/octet-stream",buffer:p,lastModifiedMs:a.lastModified})}catch{}return s}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e);const i=this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1)});this._recorder.injectedScript.isUnderTest&&i.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 i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!!Za(this._recorder.deepEventTarget(e)):!0}_updateModelForHoveredElement(){if(this._installObserverIfNeeded(),this._performingActions.size)return;if(!this._hoveredElement||!this._hoveredElement.isConnected){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!0);return}const{selector:e,elements:i}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoveredModel&&this._hoveredModel.selector===e||(this._hoveredModel=e?{selector:e,elements:i,color:rn.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class _A{constructor(e){this._recorder=e}install(){this._recorder.highlight.uninstall()}uninstall(){this._recorder.highlight.install()}onClick(e){const i=this._recorder.deepEventTarget(e);if(Ja(i)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const s=Za(i),{ariaSnapshot:a,selector:o,ref:u}=this._ariaSnapshot(i);if(s&&e.detail===1){this._recorder.recordAction({name:s.checked?"check":"uncheck",selector:o,ref:u,signals:[],ariaSnapshot:a});return}this._recorder.recordAction({name:"click",selector:o,ref:u,ariaSnapshot:a,position:Qa(e),signals:[],button:Oh(e),modifiers:gr(e),clickCount:e.detail})}onContextMenu(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o}=this._ariaSnapshot(i);this._recorder.recordAction({name:"click",selector:a,ref:o,ariaSnapshot:s,position:Qa(e),signals:[],button:"right",modifiers:gr(e),clickCount:1})}onInput(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o}=this._ariaSnapshot(i);if(Ja(i)){this._recorder.recordAction({name:"fill",selector:a,ref:o,ariaSnapshot:s,signals:[],text:i.value});return}if(["INPUT","TEXTAREA"].includes(i.nodeName)||i.isContentEditable){if(i.nodeName==="INPUT"&&["checkbox","radio"].includes(i.type.toLowerCase()))return;this._recorder.recordAction({name:"fill",ref:o,selector:a,ariaSnapshot:s,signals:[],text:i.isContentEditable?i.innerText:i.value});return}if(i.nodeName==="SELECT"){const u=i;this._recorder.recordAction({name:"select",selector:a,ref:o,ariaSnapshot:s,options:[...u.selectedOptions].map(f=>f.value),signals:[]});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o}=this._ariaSnapshot(i);if(e.key===" "){const u=Za(i);if(u&&e.detail===0){this._recorder.recordAction({name:u.checked?"uncheck":"check",selector:a,ref:o,ariaSnapshot:s,signals:[]});return}}this._recorder.recordAction({name:"press",selector:a,ref:o,ariaSnapshot:s,signals:[],key:e.key,modifiers:gr(e)})}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),s=i.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(i.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 i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"||e.isContentEditable)}_ariaSnapshot(e){const{ariaSnapshot:i,refs:s}=this._recorder.injectedScript.ariaSnapshotForRecorder(),a=e?s.get(e):void 0,o=e?this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}):void 0;return{ariaSnapshot:i,selector:o==null?void 0:o.selector,ref:a}}}class oh{constructor(e,i){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=i,this._dialog=new _v(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){Ue(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const i=this._recorder.deepEventTarget(e);this._elementHasValue(i)&&e.preventDefault()}onPointerUp(e){var s;const i=(s=this._hoverHighlight)==null?void 0:s.elements[0];this._kind==="value"&&i&&(i.nodeName==="INPUT"||i.nodeName==="SELECT")&&i.disabled&&this._commitAssertValue()}onMouseMove(e){var s;if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);if(((s=this._hoverHighlight)==null?void 0:s.elements[0])!==i){if(this._kind==="text"||this._kind==="snapshot")this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,i).full?{elements:[i],selector:"",color:rn.assert}:null;else if(this._elementHasValue(i)){const a=this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:a.selector,elements:a.elements,color:rn.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),Ue(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 i;this._textCache.clear();const e=(i=this._hoverHighlight)==null?void 0:i.elements[0];if(!e)return null;if(this._kind==="value"){if(!this._elementHasValue(e))return null;const{selector:s}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName==="INPUT"&&["checkbox","radio"].includes(e.type.toLowerCase())?{name:"assertChecked",selector:s,signals:[],checked:!e.checked}:{name:"assertValue",selector:s,signals:[],value:e.value}}else if(this._kind==="snapshot"){const s=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:s.selector,elements:s.elements,color:rn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"codegen"})}}else{const s=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:s.selector,elements:s.elements,color:rn.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}}}_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"))}_showDialog(){var e,i,s,a;(e=this._hoverHighlight)!=null&&e.elements[0]&&(this._action=this._generateAction(),((i=this._action)==null?void 0:i.name)==="assertText"?this._showTextDialog(this._action):((s=this._action)==null?void 0:s.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(a=this._recorder.overlay)==null||a.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const i=this._recorder.document.createElement("textarea");i.setAttribute("spellcheck","false"),i.value=this._renderValue(e),i.classList.add("text-editor");const s=()=>{var y;const f=this._recorder.injectedScript.utils.normalizeWhiteSpace(i.value),d=(y=this._hoverHighlight)==null?void 0:y.elements[0];if(!d)return;e.text=f;const p=this._recorder.injectedScript.utils.elementText(this._textCache,d).normalized,m=f&&p.includes(f);i.classList.toggle("does-not-match",!m)};i.addEventListener("input",s);const o=this._dialog.show({label:"Assert that element contains text",body:i,onCommit:()=>this._commit()}),u=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),o);this._dialog.moveTo(u.anchorTop,u.anchorLeft),i.focus()}_commitAssertValue(){var i;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(i=this._recorder.overlay)==null||i.flashToolSucceeded("assertingValue"))}}class TA{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._recorder=e;const i=this._recorder.document;this._overlayElement=i.createElement("x-pw-overlay");const s=i.createElement("x-pw-tools-list");this._overlayElement.appendChild(s),this._dragHandle=i.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(i.createElement("x-div")),s.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")),s.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")),s.appendChild(this._pickLocatorToggle),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")),s.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")),s.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")),s.appendChild(this._assertValuesToggle),this._assertSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertSnapshotToggle.title="Assert snapshot",this._assertSnapshotToggle.classList.add("snapshot"),this._assertSnapshotToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertSnapshotToggle),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){Tv(this._listeners),this._listeners=[je(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),je(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")}),je(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"};this._recorder.setMode(e[this._recorder.state.mode])}),je(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),je(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),je(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),je(this._assertSnapshotToggle,"click",()=>{this._assertSnapshotToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingSnapshot"?"recording":"assertingSnapshot")})]}install(){this._recorder.highlight.appendChild(this._overlayElement),this._refreshListeners(),this._updateVisualPosition()}contains(e){return this._recorder.injectedScript.utils.isInsideScope(this._overlayElement,e)}setUIState(e){const i=e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="recording-inspecting";this._recordToggle.classList.toggle("toggled",i),this._recordToggle.title=i?"Stop Recording":"Start Recording",this._pickLocatorToggle.classList.toggle("toggled",e.mode==="inspecting"||e.mode==="recording-inspecting"),this._assertVisibilityToggle.classList.toggle("toggled",e.mode==="assertingVisibility"),this._assertVisibilityToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertTextToggle.classList.toggle("toggled",e.mode==="assertingText"),this._assertTextToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertValuesToggle.classList.toggle("toggled",e.mode==="assertingValue"),this._assertValuesToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertSnapshotToggle.classList.toggle("toggled",e.mode==="assertingSnapshot"),this._assertSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._offsetX!==e.overlay.offsetX&&(this._offsetX=e.overlay.offsetX,this._updateVisualPosition()),e.mode==="none"?this._hideOverlay():this._showOverlay()}flashToolSucceeded(e){let i;e==="assertingVisibility"?i=this._assertVisibilityToggle:e==="assertingSnapshot"?i=this._assertSnapshotToggle:i=this._assertValuesToggle,i.classList.add("succeeded"),this._recorder.injectedScript.utils.builtins.setTimeout(()=>i.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 i=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-i,Math.min(i,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),Ue(e),!0}return!1}onMouseUp(e){return this._dragState?(Ue(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,Ue(e),!0):!1}onDblClick(e){return!1}}class EA{constructor(e,i){var s,a;this._listeners=[],this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.state={mode:"none",testIdAttributeName:"data-testid",language:"javascript",overlay:{offsetX:0}},this._delegate={},this.document=e.document,this.injectedScript=e,this.highlight=e.createHighlight(),this._tools={none:new pb,standby:new pb,inspecting:new lh(this,!1),recording:(i==null?void 0:i.recorderMode)==="api"?new _A(this):new xA(this),"recording-inspecting":new lh(this,!1),assertingText:new oh(this,"text"),assertingVisibility:new lh(this,!0),assertingValue:new oh(this,"value"),assertingSnapshot:new oh(this,"snapshot")},this._currentTool=this._tools.none,(a=(s=this._currentTool).install)==null||a.call(s),e.window.top===e.window&&(this.overlay=new TA(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
|
|
125
|
+
body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
|
|
126
|
+
body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
|
|
127
|
+
`),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var s,a,o;Tv(this._listeners),this._listeners=[je(this.document,"click",u=>this._onClick(u),!0),je(this.document,"auxclick",u=>this._onClick(u),!0),je(this.document,"dblclick",u=>this._onDblClick(u),!0),je(this.document,"contextmenu",u=>this._onContextMenu(u),!0),je(this.document,"dragstart",u=>this._onDragStart(u),!0),je(this.document,"input",u=>this._onInput(u),!0),je(this.document,"keydown",u=>this._onKeyDown(u),!0),je(this.document,"keyup",u=>this._onKeyUp(u),!0),je(this.document,"pointerdown",u=>this._onPointerDown(u),!0),je(this.document,"pointerup",u=>this._onPointerUp(u),!0),je(this.document,"mousedown",u=>this._onMouseDown(u),!0),je(this.document,"mouseup",u=>this._onMouseUp(u),!0),je(this.document,"mousemove",u=>this._onMouseMove(u),!0),je(this.document,"mouseleave",u=>this._onMouseLeave(u),!0),je(this.document,"mouseenter",u=>this._onMouseEnter(u),!0),je(this.document,"focus",u=>this._onFocus(u),!0),je(this.document,"scroll",u=>this._onScroll(u),!0)],this.highlight.install();let e;const i=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(i,500)};e=this.injectedScript.utils.builtins.setTimeout(i,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(Ev(this.document,wA)),(s=this.overlay)==null||s.install(),(o=(a=this._currentTool)==null?void 0:a.install)==null||o.call(a),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var s,a,o,u,f,d;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(a=(s=this._currentTool).uninstall)==null||a.call(s),this.clearHighlight(),this._currentTool=e,(u=(o=this._currentTool).install)==null||u.call(o);const i=(f=e.cursor)==null?void 0:f.call(e);i&&((d=this.injectedScript.document.body)==null||d.setAttribute("data-pw-cursor",i))}setUIState(e,i){var o;this._delegate=i,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()),this.state=e,this.highlight.setLanguage(e.language),this._switchCurrentTool(),(o=this.overlay)==null||o.setUIState(e);let s="noop";if(e.actionSelector!==this._lastHighlightedSelector){const u=e.actionSelector?NA(this.injectedScript,e.language,e.actionSelector,this.document):null;s=u!=null&&u.length?u:"clear",this._lastHighlightedSelector=u!=null&&u.length?e.actionSelector:void 0}const a=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==a){const u=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(u.length){const f=u.length>1?rn.multiple:rn.single;s=u.map(d=>({element:d,color:f})),this._lastHighlightedAriaTemplateJSON=a}else this._lastHighlightedSelector||(s="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}s==="clear"?this.highlight.clearHighlight():s!=="noop"&&this.highlight.updateHighlight(s)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var i,s,a;e.isTrusted&&((i=this.overlay)!=null&&i.onClick(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onClick)==null||a.call(s,e))}_onDblClick(e){var i,s,a;e.isTrusted&&((i=this.overlay)!=null&&i.onDblClick(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onDblClick)==null||a.call(s,e))}_onContextMenu(e){var i,s;e.isTrusted&&((s=(i=this._currentTool).onContextMenu)==null||s.call(i,e))}_onDragStart(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onDragStart)==null||s.call(i,e))}_onPointerDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onPointerDown)==null||s.call(i,e))}_onPointerUp(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onPointerUp)==null||s.call(i,e))}_onMouseDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseDown)==null||s.call(i,e))}_onMouseUp(e){var i,s,a;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseUp(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onMouseUp)==null||a.call(s,e))}_onMouseMove(e){var i,s,a;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseMove(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onMouseMove)==null||a.call(s,e))}_onMouseEnter(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseEnter)==null||s.call(i,e))}_onMouseLeave(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseLeave)==null||s.call(i,e))}_onFocus(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onFocus)==null||s.call(i,e))}_onScroll(e){var i,s;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(s=(i=this._currentTool).onScroll)==null||s.call(i,e))}_onInput(e){var i,s;this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onInput)==null||s.call(i,e)}_onKeyDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onKeyDown)==null||s.call(i,e))}_onKeyUp(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onKeyUp)==null||s.call(i,e))}updateHighlight(e,i){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,i)}_updateHighlight(e,i){var a,o;let s=e==null?void 0:e.tooltipText;s===void 0&&(e!=null&&e.selector)&&(s=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(u=>({element:u,color:e.color,tooltipText:s}))):this.highlight.clearHighlight(),i&&((o=(a=this._delegate).highlightUpdated)==null||o.call(a))}_ignoreOverlayEvent(e){return e.composedPath().some(i=>(i.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var i;for(const s of e.composedPath())if(!((i=this.overlay)!=null&&i.contains(s)))return s;return e.composedPath()[0]}setMode(e){var i,s;(s=(i=this._delegate).setMode)==null||s.call(i,e)}_captureAutoExpectSnapshot(){const e=this.injectedScript.document.documentElement;return e?this.injectedScript.utils.generateAriaTree(e,{mode:"autoexpect"}):void 0}async performAction(e){var s,a,o;const i=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),!CA(e)&&this._lastActionAutoexpectSnapshot){const u=this.injectedScript.utils.findNewElement(i==null?void 0:i.root,(s=this._lastActionAutoexpectSnapshot)==null?void 0:s.root);e.preconditionSelector=u?this.injectedScript.generateSelector(u,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,e.preconditionSelector===e.selector&&(e.preconditionSelector=void 0)}await((o=(a=this._delegate).performAction)==null?void 0:o.call(a,e).catch(()=>{}))}recordAction(e){var i,s;this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),(s=(i=this._delegate).recordAction)==null||s.call(i,e)}setOverlayState(e){var i,s;(s=(i=this._delegate).setOverlayState)==null||s.call(i,e)}elementPicked(e,i){var a,o;const s=this.injectedScript.ariaSnapshot(i.elements[0],{mode:"expect"});(o=(a=this._delegate).elementPicked)==null||o.call(a,{selector:e,ariaSnapshot:s})}}let _v=class{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const i=this._recorder.document.createElement("x-pw-tool-item");i.title="Accept",i.classList.add("accept"),i.appendChild(this._recorder.document.createElement("x-div")),i.addEventListener("click",()=>{var f;return(f=e.onCommit)==null?void 0:f.call(e)});const s=this._recorder.document.createElement("x-pw-tool-item");s.title="Close",s.classList.add("cancel"),s.appendChild(this._recorder.document.createElement("x-div")),s.addEventListener("click",()=>{var f;this.close(),(f=e.onCancel)==null||f.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),e.autosize&&this._dialogElement.classList.add("autosize"),this._keyboardListener=f=>{var d;if(f.key==="Escape"){this.close(),(d=e.onCancel)==null||d.call(e);return}if(e.onCommit&&f.key==="Enter"&&(f.ctrlKey||f.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=f=>{var d;this.close(),(d=e.onCancel)==null||d.call(e)},this._dialogElement.addEventListener("click",f=>f.stopPropagation());const a=this._recorder.document.createElement("x-pw-tools-list"),o=this._recorder.document.createElement("label");o.textContent=e.label,a.appendChild(o),a.appendChild(this._recorder.document.createElement("x-spacer")),e.onCommit&&a.appendChild(i),a.appendChild(s),this._dialogElement.appendChild(a);const u=this._recorder.document.createElement("x-pw-dialog-body");return u.appendChild(e.body),this._dialogElement.appendChild(u),this._recorder.highlight.appendChild(this._dialogElement),this._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.addEventListener("keydown",this._keyboardListener,!0),this._dialogElement}moveTo(e,i){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=i+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}};function AA(n){let e=n.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function gr(n){return(n.altKey?1:0)|(n.ctrlKey?2:0)|(n.metaKey?4:0)|(n.shiftKey?8:0)}function Oh(n){switch(n.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function Qa(n){if(n.target.nodeName==="CANVAS")return{x:n.offsetX,y:n.offsetY}}function Ue(n){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}function Za(n){if(!n||n.nodeName!=="INPUT")return null;const e=n;return["checkbox","radio"].includes(e.type)?e:null}function Ja(n){return!n||n.nodeName!=="INPUT"?!1:n.type.toLowerCase()==="range"}function je(n,e,i,s){return n.addEventListener(e,i,s),()=>{n.removeEventListener(e,i,s)}}function Tv(n){for(const e of n)e();n.splice(0,n.length)}function NA(n,e,i,s){try{const a=n.parseSelector(i),o=n.querySelectorAll(a,s),u=o.length>1?rn.multiple:rn.single,f=n.utils.asLocator(e,i);return o.map((d,p)=>{const m=o.length>1?` [${p+1} of ${o.length}]`:"";return{element:d,color:u,tooltipText:f+m}})}catch{return[]}}function Ev(n,{tagName:e,attrs:i,children:s}){const a=n.createElementNS("http://www.w3.org/2000/svg",e);if(i)for(const[o,u]of Object.entries(i))a.setAttribute(o,u);if(s)for(const o of s)a.appendChild(Ev(n,o));return a}function CA(n){return n.name.startsWith("assert")}function kA(n,e){n=n.replace(/AriaRole\s*\.\s*([\w]+)/g,(o,u)=>u.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(o,u,f)=>`${u}(${f.toLowerCase()}`);const i=[];let s="";for(let o=0;o<n.length;++o){const u=n[o];if(u!=='"'&&u!=="'"&&u!=="`"&&u!=="/"){s+=u;continue}const f=n[o-1]==="r"||n[o]==="/";++o;let d="";for(;o<n.length;){if(n[o]==="\\"){f?(n[o+1]!==u&&(d+=n[o]),++o,d+=n[o]):(++o,n[o]==="n"?d+=`
|
|
128
|
+
`:n[o]==="r"?d+="\r":n[o]==="t"?d+=" ":d+=n[o]),++o;continue}if(n[o]!==u){d+=n[o++];continue}break}i.push({quote:u,text:d}),s+=(u==="/"?"r":"")+"$"+i.length}s=s.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(/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 a=i.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:Av(s,i,e),preferredQuote:a}}function gb(n){return[...n.matchAll(/\$\d+/g)].length}function mb(n,e){return n.replace(/\$(\d+)/g,(i,s)=>`$${s-e}`)}function Av(n,e,i){for(;;){const a=n.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!a)break;const o=a.index+a[0].length;let u=0,f=o;for(;f<n.length&&(n[f]==="("?u++:n[f]===")"&&u--,!(u<0));f++);let d=n.substring(0,o),p=0;["sethas(","sethasnot("].includes(a[1])&&(p=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const m=gb(n.substring(0,o)),y=mb(n.substring(o,f),m),v=gb(y),b=e.slice(m,m+v),E=JSON.stringify(Av(y,b,i));n=d.replace(/=$/,"2=")+`$${m+1}`+mb(n.substring(f+p),v-1);const x=e.slice(0,m),_=e.slice(m+v);e=x.concat([{quote:'"',text:E}]).concat(_)}n=n.replace(/\,set([\w]+)\(([^)]+)\)/g,(a,o,u)=>","+o.toLowerCase()+"="+u.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=[${i}=$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 s=n.split(".");for(let a=0;a<s.length-1;a++)if(s[a]==="internal:control=enter-frame"&&s[a+1].startsWith("nth=")){const[o]=s.splice(a,1);s.splice(a+1,0,o)}return s.map(a=>!a.startsWith("internal:")||a==="internal:control"?a.replace(/\$(\d+)/g,(o,u)=>e[+u-1].text):(a=a.includes("[")?a.replace(/\]/,"")+"]":a,a=a.replace(/(?:r)\$(\d+)(i)?/g,(o,u,f)=>{const d=e[+u-1];return a.startsWith("internal:attr")||a.startsWith("internal:testid")||a.startsWith("internal:role")?wt(new RegExp(d.text),!1)+(f||""):Ot(new RegExp(d.text,f),!1)}).replace(/\$(\d+)(i|s)?/g,(o,u,f)=>{const d=e[+u-1];return a.startsWith("internal:has=")||a.startsWith("internal:has-not=")?d.text:a.startsWith("internal:testid")?wt(d.text,!0):a.startsWith("internal:attr")||a.startsWith("internal:role")?wt(d.text,f==="s"):Ot(d.text,f==="s")}),a)).join(" >> ")}function MA(n,e,i){try{return OA(n,e,i)}catch{return""}}function OA(n,e,i){try{return ll(e),e}catch{}const{selector:s,preferredQuote:a}=kA(e,i),o=c0(n,s,void 0,void 0,a),u=yb(n,e);return o.some(f=>yb(n,f)===u)?s:""}function yb(n,e){return e=e.replace(/\s/g,""),n==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const LA=({url:n})=>S.jsxs("div",{className:"browser-frame-header",children:[S.jsxs("div",{className:"browser-traffic-lights",children:[S.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),S.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),S.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),S.jsxs("div",{className:"browser-frame-address-bar",title:n||"about:blank",children:[S.jsx("span",{className:"browser-frame-address",children:n||"about:blank"}),n&&S.jsx(Yh,{value:n})]}),S.jsx("div",{style:{marginLeft:"auto"},children:S.jsxs("div",{children:[S.jsx("span",{className:"browser-frame-menu-bar"}),S.jsx("span",{className:"browser-frame-menu-bar"}),S.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),vd=Symbol.for("yaml.alias"),Lh=Symbol.for("yaml.document"),Ai=Symbol.for("yaml.map"),Nv=Symbol.for("yaml.pair"),Tn=Symbol.for("yaml.scalar"),Er=Symbol.for("yaml.seq"),ln=Symbol.for("yaml.node.type"),us=n=>!!n&&typeof n=="object"&&n[ln]===vd,fs=n=>!!n&&typeof n=="object"&&n[ln]===Lh,Ar=n=>!!n&&typeof n=="object"&&n[ln]===Ai,De=n=>!!n&&typeof n=="object"&&n[ln]===Nv,Oe=n=>!!n&&typeof n=="object"&&n[ln]===Tn,Nr=n=>!!n&&typeof n=="object"&&n[ln]===Er;function ze(n){if(n&&typeof n=="object")switch(n[ln]){case Ai:case Er:return!0}return!1}function He(n){if(n&&typeof n=="object")switch(n[ln]){case vd:case Ai:case Tn:case Er:return!0}return!1}const RA=n=>(Oe(n)||ze(n))&&!!n.anchor,Lt=Symbol("break visit"),Cv=Symbol("skip children"),_n=Symbol("remove node");function Ni(n,e){const i=kv(e);fs(n)?fr(null,n.contents,i,Object.freeze([n]))===_n&&(n.contents=null):fr(null,n,i,Object.freeze([]))}Ni.BREAK=Lt;Ni.SKIP=Cv;Ni.REMOVE=_n;function fr(n,e,i,s){const a=Mv(n,e,i,s);if(He(a)||De(a))return Ov(n,s,a),fr(n,a,i,s);if(typeof a!="symbol"){if(ze(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const u=fr(o,e.items[o],i,s);if(typeof u=="number")o=u-1;else{if(u===Lt)return Lt;u===_n&&(e.items.splice(o,1),o-=1)}}}else if(De(e)){s=Object.freeze(s.concat(e));const o=fr("key",e.key,i,s);if(o===Lt)return Lt;o===_n&&(e.key=null);const u=fr("value",e.value,i,s);if(u===Lt)return Lt;u===_n&&(e.value=null)}}return a}async function mc(n,e){const i=kv(e);fs(n)?await hr(null,n.contents,i,Object.freeze([n]))===_n&&(n.contents=null):await hr(null,n,i,Object.freeze([]))}mc.BREAK=Lt;mc.SKIP=Cv;mc.REMOVE=_n;async function hr(n,e,i,s){const a=await Mv(n,e,i,s);if(He(a)||De(a))return Ov(n,s,a),hr(n,a,i,s);if(typeof a!="symbol"){if(ze(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const u=await hr(o,e.items[o],i,s);if(typeof u=="number")o=u-1;else{if(u===Lt)return Lt;u===_n&&(e.items.splice(o,1),o-=1)}}}else if(De(e)){s=Object.freeze(s.concat(e));const o=await hr("key",e.key,i,s);if(o===Lt)return Lt;o===_n&&(e.key=null);const u=await hr("value",e.value,i,s);if(u===Lt)return Lt;u===_n&&(e.value=null)}}return a}function kv(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function Mv(n,e,i,s){var a,o,u,f,d;if(typeof i=="function")return i(n,e,s);if(Ar(e))return(a=i.Map)==null?void 0:a.call(i,n,e,s);if(Nr(e))return(o=i.Seq)==null?void 0:o.call(i,n,e,s);if(De(e))return(u=i.Pair)==null?void 0:u.call(i,n,e,s);if(Oe(e))return(f=i.Scalar)==null?void 0:f.call(i,n,e,s);if(us(e))return(d=i.Alias)==null?void 0:d.call(i,n,e,s)}function Ov(n,e,i){const s=e[e.length-1];if(ze(s))s.items[n]=i;else if(De(s))n==="key"?s.key=i:s.value=i;else if(fs(s))s.contents=i;else{const a=us(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}const jA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},DA=n=>n.replace(/[!,[\]{}]/g,e=>jA[e]);class St{constructor(e,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},St.defaultYaml,e),this.tags=Object.assign({},St.defaultTags,i)}clone(){const e=new St(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new St(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:St.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},St.defaultTags);break}return e}add(e,i){this.atNextDocument&&(this.yaml={explicit:St.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},St.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),a=s.shift();switch(a){case"%TAG":{if(s.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[o,u]=s;return this.tags[o]=u,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[o]=s;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const u=/^\d+\.\d+$/.test(o);return i(6,`Unsupported YAML version ${o}`,u),!1}}default:return i(0,`Unknown directive ${a}`,!0),!1}}tagName(e,i){if(e==="!")return"!";if(e[0]!=="!")return i(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const u=e.slice(2,-1);return u==="!"||u==="!!"?(i(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&i("Verbatim tags must end with a >"),u)}const[,s,a]=e.match(/^(.*!)([^!]*)$/s);a||i(`The ${e} tag has no suffix`);const o=this.tags[s];if(o)try{return o+decodeURIComponent(a)}catch(u){return i(String(u)),null}return s==="!"?e:(i(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[i,s]of Object.entries(this.tags))if(e.startsWith(s))return i+DA(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let a;if(e&&s.length>0&&He(e.contents)){const o={};Ni(e.contents,(u,f)=>{He(f)&&f.tag&&(o[f.tag]=!0)}),a=Object.keys(o)}else a=[];for(const[o,u]of s)o==="!!"&&u==="tag:yaml.org,2002:"||(!e||a.some(f=>f.startsWith(u)))&&i.push(`%TAG ${o} ${u}`);return i.join(`
|
|
129
|
+
`)}}St.defaultYaml={explicit:!1,version:"1.2"};St.defaultTags={"!!":"tag:yaml.org,2002:"};function Lv(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){const i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(i)}return!0}function Rv(n){const e=new Set;return Ni(n,{Value(i,s){s.anchor&&e.add(s.anchor)}}),e}function jv(n,e){for(let i=1;;++i){const s=`${n}${i}`;if(!e.has(s))return s}}function BA(n,e){const i=[],s=new Map;let a=null;return{onAnchor:o=>{i.push(o),a||(a=Rv(n));const u=jv(e,a);return a.add(u),u},setAnchors:()=>{for(const o of i){const u=s.get(o);if(typeof u=="object"&&u.anchor&&(Oe(u.node)||ze(u.node)))u.node.anchor=u.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=o,f}}},sourceObjects:s}}function dr(n,e,i,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let a=0,o=s.length;a<o;++a){const u=s[a],f=dr(n,s,String(a),u);f===void 0?delete s[a]:f!==u&&(s[a]=f)}else if(s instanceof Map)for(const a of Array.from(s.keys())){const o=s.get(a),u=dr(n,s,a,o);u===void 0?s.delete(a):u!==o&&s.set(a,u)}else if(s instanceof Set)for(const a of Array.from(s)){const o=dr(n,s,a,a);o===void 0?s.delete(a):o!==a&&(s.delete(a),s.add(o))}else for(const[a,o]of Object.entries(s)){const u=dr(n,s,a,o);u===void 0?delete s[a]:u!==o&&(s[a]=u)}return n.call(e,i,s)}function an(n,e,i){if(Array.isArray(n))return n.map((s,a)=>an(s,String(a),i));if(n&&typeof n.toJSON=="function"){if(!i||!RA(n))return n.toJSON(e,i);const s={aliasCount:0,count:1,res:void 0};i.anchors.set(n,s),i.onCreate=o=>{s.res=o,delete i.onCreate};const a=n.toJSON(e,i);return i.onCreate&&i.onCreate(a),a}return typeof n=="bigint"&&!(i!=null&&i.keep)?Number(n):n}class Sd{constructor(e){Object.defineProperty(this,ln,{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:i,maxAliasCount:s,onAnchor:a,reviver:o}={}){if(!fs(e))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:e,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},f=an(this,"",u);if(typeof a=="function")for(const{count:d,res:p}of u.anchors.values())a(p,d);return typeof o=="function"?dr(o,{"":f},"",f):f}}class yc extends Sd{constructor(e){super(vd),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let i;return Ni(e,{Node:(s,a)=>{if(a===this)return Ni.BREAK;a.anchor===this.source&&(i=a)}}),i}toJSON(e,i){if(!i)return{source:this.source};const{anchors:s,doc:a,maxAliasCount:o}=i,u=this.resolve(a);if(!u){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let f=s.get(u);if(f||(an(u,null,i),f=s.get(u)),!f||f.res===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=Go(a,u,s)),f.count*f.aliasCount>o)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return f.res}toString(e,i,s){const a=`*${this.source}`;if(e){if(Lv(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${a} `}return a}}function Go(n,e,i){if(us(e)){const s=e.resolve(n),a=i&&s&&i.get(s);return a?a.count*a.aliasCount:0}else if(ze(e)){let s=0;for(const a of e.items){const o=Go(n,a,i);o>s&&(s=o)}return s}else if(De(e)){const s=Go(n,e.key,i),a=Go(n,e.value,i);return Math.max(s,a)}return 1}const Dv=n=>!n||typeof n!="function"&&typeof n!="object";class he extends Sd{constructor(e){super(Tn),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:an(this.value,e,i)}toString(){return String(this.value)}}he.BLOCK_FOLDED="BLOCK_FOLDED";he.BLOCK_LITERAL="BLOCK_LITERAL";he.PLAIN="PLAIN";he.QUOTE_DOUBLE="QUOTE_DOUBLE";he.QUOTE_SINGLE="QUOTE_SINGLE";const UA="tag:yaml.org,2002:";function zA(n,e,i){if(e){const s=i.filter(o=>o.tag===e),a=s.find(o=>!o.format)??s[0];if(!a)throw new Error(`Tag ${e} not found`);return a}return i.find(s=>{var a;return((a=s.identify)==null?void 0:a.call(s,n))&&!s.format})}function il(n,e,i){var y,v,b;if(fs(n)&&(n=n.contents),He(n))return n;if(De(n)){const E=(v=(y=i.schema[Ai]).createNode)==null?void 0:v.call(y,i.schema,null,i);return E.items.push(n),E}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());const{aliasDuplicateObjects:s,onAnchor:a,onTagObj:o,schema:u,sourceObjects:f}=i;let d;if(s&&n&&typeof n=="object"){if(d=f.get(n),d)return d.anchor||(d.anchor=a(n)),new yc(d.anchor);d={anchor:null,node:null},f.set(n,d)}e!=null&&e.startsWith("!!")&&(e=UA+e.slice(2));let p=zA(n,e,u.tags);if(!p){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const E=new he(n);return d&&(d.node=E),E}p=n instanceof Map?u[Ai]:Symbol.iterator in Object(n)?u[Er]:u[Ai]}o&&(o(p),delete i.onTagObj);const m=p!=null&&p.createNode?p.createNode(i.schema,n,i):typeof((b=p==null?void 0:p.nodeClass)==null?void 0:b.from)=="function"?p.nodeClass.from(i.schema,n,i):new he(n);return e?m.tag=e:p.default||(m.tag=p.tag),d&&(d.node=m),m}function rc(n,e,i){let s=i;for(let a=e.length-1;a>=0;--a){const o=e[a];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const u=[];u[o]=s,s=u}else s=new Map([[o,s]])}return il(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const Va=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class Bv extends Sd{constructor(e,i){super(e),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(e){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(i.schema=e),i.items=i.items.map(s=>He(s)||De(s)?s.clone(e):s),this.range&&(i.range=this.range.slice()),i}addIn(e,i){if(Va(e))this.add(i);else{const[s,...a]=e,o=this.get(s,!0);if(ze(o))o.addIn(a,i);else if(o===void 0&&this.schema)this.set(s,rc(this.schema,a,i));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${a}`)}}deleteIn(e){const[i,...s]=e;if(s.length===0)return this.delete(i);const a=this.get(i,!0);if(ze(a))return a.deleteIn(s);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${s}`)}getIn(e,i){const[s,...a]=e,o=this.get(s,!0);return a.length===0?!i&&Oe(o)?o.value:o:ze(o)?o.getIn(a,i):void 0}hasAllNullValues(e){return this.items.every(i=>{if(!De(i))return!1;const s=i.value;return s==null||e&&Oe(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){const[i,...s]=e;if(s.length===0)return this.has(i);const a=this.get(i,!0);return ze(a)?a.hasIn(s):!1}setIn(e,i){const[s,...a]=e;if(a.length===0)this.set(s,i);else{const o=this.get(s,!0);if(ze(o))o.setIn(a,i);else if(o===void 0&&this.schema)this.set(s,rc(this.schema,a,i));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${a}`)}}}const HA=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function Xn(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const is=(n,e,i)=>n.endsWith(`
|
|
130
|
+
`)?Xn(i,e):i.includes(`
|
|
131
|
+
`)?`
|
|
132
|
+
`+Xn(i,e):(n.endsWith(" ")?"":" ")+i,Uv="flow",Rh="block",Ko="quoted";function bc(n,e,i="flow",{indentAtStart:s,lineWidth:a=80,minContentWidth:o=20,onFold:u,onOverflow:f}={}){if(!a||a<0)return n;a<o&&(o=0);const d=Math.max(1+o,1+a-e.length);if(n.length<=d)return n;const p=[],m={};let y=a-e.length;typeof s=="number"&&(s>a-Math.max(2,o)?p.push(0):y=a-s);let v,b,E=!1,x=-1,_=-1,N=-1;i===Rh&&(x=bb(n,x,e.length),x!==-1&&(y=x+d));for(let $;$=n[x+=1];){if(i===Ko&&$==="\\"){switch(_=x,n[x+1]){case"x":x+=3;break;case"u":x+=5;break;case"U":x+=9;break;default:x+=1}N=x}if($===`
|
|
133
|
+
`)i===Rh&&(x=bb(n,x,e.length)),y=x+e.length+d,v=void 0;else{if($===" "&&b&&b!==" "&&b!==`
|
|
134
|
+
`&&b!==" "){const V=n[x+1];V&&V!==" "&&V!==`
|
|
135
|
+
`&&V!==" "&&(v=x)}if(x>=y)if(v)p.push(v),y=v+d,v=void 0;else if(i===Ko){for(;b===" "||b===" ";)b=$,$=n[x+=1],E=!0;const V=x>N+1?x-2:_-1;if(m[V])return n;p.push(V),m[V]=!0,y=V+d,v=void 0}else E=!0}b=$}if(E&&f&&f(),p.length===0)return n;u&&u();let k=n.slice(0,p[0]);for(let $=0;$<p.length;++$){const V=p[$],L=p[$+1]||n.length;V===0?k=`
|
|
136
|
+
${e}${n.slice(0,L)}`:(i===Ko&&m[V]&&(k+=`${n[V]}\\`),k+=`
|
|
137
|
+
${e}${n.slice(V+1,L)}`)}return k}function bb(n,e,i){let s=e,a=e+1,o=n[a];for(;o===" "||o===" ";)if(e<a+i)o=n[++e];else{do o=n[++e];while(o&&o!==`
|
|
138
|
+
`);s=e,a=e+1,o=n[a]}return s}const vc=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),Sc=n=>/^(%|---|\.\.\.)/m.test(n);function qA(n,e,i){if(!e||e<0)return!1;const s=e-i,a=n.length;if(a<=s)return!1;for(let o=0,u=0;o<a;++o)if(n[o]===`
|
|
139
|
+
`){if(o-u>s)return!0;if(u=o+1,a-u<=s)return!1}return!0}function Wa(n,e){const i=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return i;const{implicitKey:s}=e,a=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Sc(n)?" ":"");let u="",f=0;for(let d=0,p=i[d];p;p=i[++d])if(p===" "&&i[d+1]==="\\"&&i[d+2]==="n"&&(u+=i.slice(f,d)+"\\ ",d+=1,f=d,p="\\"),p==="\\")switch(i[d+1]){case"u":{u+=i.slice(f,d);const m=i.substr(d+2,4);switch(m){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:m.substr(0,2)==="00"?u+="\\x"+m.substr(2):u+=i.substr(d,6)}d+=5,f=d+1}break;case"n":if(s||i[d+2]==='"'||i.length<a)d+=1;else{for(u+=i.slice(f,d)+`
|
|
140
|
+
|
|
141
|
+
`;i[d+2]==="\\"&&i[d+3]==="n"&&i[d+4]!=='"';)u+=`
|
|
142
|
+
`,d+=2;u+=o,i[d+2]===" "&&(u+="\\"),d+=1,f=d+1}break;default:d+=1}return u=f?u+i.slice(f):i,s?u:bc(u,o,Ko,vc(e,!1))}function jh(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
|
|
143
|
+
`)||/[ \t]\n|\n[ \t]/.test(n))return Wa(n,e);const i=e.indent||(Sc(n)?" ":""),s="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
144
|
+
${i}`)+"'";return e.implicitKey?s:bc(s,i,Uv,vc(e,!1))}function pr(n,e){const{singleQuote:i}=e.options;let s;if(i===!1)s=Wa;else{const a=n.includes('"'),o=n.includes("'");a&&!o?s=jh:o&&!a?s=Wa:s=i?jh:Wa}return s(n,e)}let Dh;try{Dh=new RegExp(`(^|(?<!
|
|
145
|
+
))
|
|
146
|
+
+(?!
|
|
147
|
+
|$)`,"g")}catch{Dh=/\n+(?!\n|$)/g}function Yo({comment:n,type:e,value:i},s,a,o){const{blockQuote:u,commentString:f,lineWidth:d}=s.options;if(!u||/\n[\t ]+$/.test(i)||/^\s*$/.test(i))return pr(i,s);const p=s.indent||(s.forceBlockIndent||Sc(i)?" ":""),m=u==="literal"?!0:u==="folded"||e===he.BLOCK_FOLDED?!1:e===he.BLOCK_LITERAL?!0:!qA(i,d,p.length);if(!i)return m?`|
|
|
148
|
+
`:`>
|
|
149
|
+
`;let y,v;for(v=i.length;v>0;--v){const G=i[v-1];if(G!==`
|
|
150
|
+
`&&G!==" "&&G!==" ")break}let b=i.substring(v);const E=b.indexOf(`
|
|
151
|
+
`);E===-1?y="-":i===b||E!==b.length-1?(y="+",o&&o()):y="",b&&(i=i.slice(0,-b.length),b[b.length-1]===`
|
|
152
|
+
`&&(b=b.slice(0,-1)),b=b.replace(Dh,`$&${p}`));let x=!1,_,N=-1;for(_=0;_<i.length;++_){const G=i[_];if(G===" ")x=!0;else if(G===`
|
|
153
|
+
`)N=_;else break}let k=i.substring(0,N<_?N+1:_);k&&(i=i.substring(k.length),k=k.replace(/\n+/g,`$&${p}`));let V=(m?"|":">")+(x?p?"2":"1":"")+y;if(n&&(V+=" "+f(n.replace(/ ?[\r\n]+/g," ")),a&&a()),m)return i=i.replace(/\n+/g,`$&${p}`),`${V}
|
|
154
|
+
${p}${k}${i}${b}`;i=i.replace(/\n+/g,`
|
|
155
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);const L=bc(`${k}${i}${b}`,p,Rh,vc(s,!0));return`${V}
|
|
156
|
+
${p}${L}`}function $A(n,e,i,s){const{type:a,value:o}=n,{actualString:u,implicitKey:f,indent:d,indentStep:p,inFlow:m}=e;if(f&&o.includes(`
|
|
157
|
+
`)||m&&/[[\]{},]/.test(o))return pr(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||m||!o.includes(`
|
|
158
|
+
`)?pr(o,e):Yo(n,e,i,s);if(!f&&!m&&a!==he.PLAIN&&o.includes(`
|
|
159
|
+
`))return Yo(n,e,i,s);if(Sc(o)){if(d==="")return e.forceBlockIndent=!0,Yo(n,e,i,s);if(f&&d===p)return pr(o,e)}const y=o.replace(/\n+/g,`$&
|
|
160
|
+
${d}`);if(u){const v=x=>{var _;return x.default&&x.tag!=="tag:yaml.org,2002:str"&&((_=x.test)==null?void 0:_.test(y))},{compat:b,tags:E}=e.doc.schema;if(E.some(v)||b!=null&&b.some(v))return pr(o,e)}return f?y:bc(y,d,Uv,vc(e,!1))}function ol(n,e,i,s){const{implicitKey:a,inFlow:o}=e,u=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:f}=n;f!==he.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(f=he.QUOTE_DOUBLE);const d=m=>{switch(m){case he.BLOCK_FOLDED:case he.BLOCK_LITERAL:return a||o?pr(u.value,e):Yo(u,e,i,s);case he.QUOTE_DOUBLE:return Wa(u.value,e);case he.QUOTE_SINGLE:return jh(u.value,e);case he.PLAIN:return $A(u,e,i,s);default:return null}};let p=d(f);if(p===null){const{defaultKeyType:m,defaultStringType:y}=e.options,v=a&&m||y;if(p=d(v),p===null)throw new Error(`Unsupported default string type ${v}`)}return p}function zv(n,e){const i=Object.assign({blockQuote:!0,commentString:HA,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,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e);let s;switch(i.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:n,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:s,options:i}}function IA(n,e){var a;if(e.tag){const o=n.filter(u=>u.tag===e.tag);if(o.length>0)return o.find(u=>u.format===e.format)??o[0]}let i,s;if(Oe(e)){s=e.value;let o=n.filter(u=>{var f;return(f=u.identify)==null?void 0:f.call(u,s)});if(o.length>1){const u=o.filter(f=>f.test);u.length>0&&(o=u)}i=o.find(u=>u.format===e.format)??o.find(u=>!u.format)}else s=e,i=n.find(o=>o.nodeClass&&s instanceof o.nodeClass);if(!i){const o=((a=s==null?void 0:s.constructor)==null?void 0:a.name)??typeof s;throw new Error(`Tag not resolved for ${o} value`)}return i}function VA(n,e,{anchors:i,doc:s}){if(!s.directives)return"";const a=[],o=(Oe(n)||ze(n))&&n.anchor;o&&Lv(o)&&(i.add(o),a.push(`&${o}`));const u=n.tag?n.tag:e.default?null:e.tag;return u&&a.push(s.directives.tagString(u)),a.join(" ")}function vr(n,e,i,s){var d;if(De(n))return n.toString(e,i,s);if(us(n)){if(e.doc.directives)return n.toString(e);if((d=e.resolvedAliases)!=null&&d.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let a;const o=He(n)?n:e.doc.createNode(n,{onTagObj:p=>a=p});a||(a=IA(e.doc.schema.tags,o));const u=VA(o,a,e);u.length>0&&(e.indentAtStart=(e.indentAtStart??0)+u.length+1);const f=typeof a.stringify=="function"?a.stringify(o,e,i,s):Oe(o)?ol(o,e,i,s):o.toString(e,i,s);return u?Oe(o)||f[0]==="{"||f[0]==="["?`${u} ${f}`:`${u}
|
|
161
|
+
${e.indent}${f}`:f}function GA({key:n,value:e},i,s,a){const{allNullValues:o,doc:u,indent:f,indentStep:d,options:{commentString:p,indentSeq:m,simpleKeys:y}}=i;let v=He(n)&&n.comment||null;if(y){if(v)throw new Error("With simple keys, key nodes cannot have comments");if(ze(n)||!He(n)&&typeof n=="object"){const Z="With simple keys, collection cannot be used as a key value";throw new Error(Z)}}let b=!y&&(!n||v&&e==null&&!i.inFlow||ze(n)||(Oe(n)?n.type===he.BLOCK_FOLDED||n.type===he.BLOCK_LITERAL:typeof n=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!b&&(y||!o),indent:f+d});let E=!1,x=!1,_=vr(n,i,()=>E=!0,()=>x=!0);if(!b&&!i.inFlow&&_.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");b=!0}if(i.inFlow){if(o||e==null)return E&&s&&s(),_===""?"?":b?`? ${_}`:_}else if(o&&!y||e==null&&b)return _=`? ${_}`,v&&!E?_+=is(_,i.indent,p(v)):x&&a&&a(),_;E&&(v=null),b?(v&&(_+=is(_,i.indent,p(v))),_=`? ${_}
|
|
162
|
+
${f}:`):(_=`${_}:`,v&&(_+=is(_,i.indent,p(v))));let N,k,$;He(e)?(N=!!e.spaceBefore,k=e.commentBefore,$=e.comment):(N=!1,k=null,$=null,e&&typeof e=="object"&&(e=u.createNode(e))),i.implicitKey=!1,!b&&!v&&Oe(e)&&(i.indentAtStart=_.length+1),x=!1,!m&&d.length>=2&&!i.inFlow&&!b&&Nr(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let V=!1;const L=vr(e,i,()=>V=!0,()=>x=!0);let G=" ";if(v||N||k){if(G=N?`
|
|
163
|
+
`:"",k){const Z=p(k);G+=`
|
|
164
|
+
${Xn(Z,i.indent)}`}L===""&&!i.inFlow?G===`
|
|
165
|
+
`&&(G=`
|
|
166
|
+
|
|
167
|
+
`):G+=`
|
|
168
|
+
${i.indent}`}else if(!b&&ze(e)){const Z=L[0],q=L.indexOf(`
|
|
169
|
+
`),R=q!==-1,ie=i.inFlow??e.flow??e.items.length===0;if(R||!ie){let le=!1;if(R&&(Z==="&"||Z==="!")){let I=L.indexOf(" ");Z==="&"&&I!==-1&&I<q&&L[I+1]==="!"&&(I=L.indexOf(" ",I+1)),(I===-1||q<I)&&(le=!0)}le||(G=`
|
|
170
|
+
${i.indent}`)}}else(L===""||L[0]===`
|
|
171
|
+
`)&&(G="");return _+=G+L,i.inFlow?V&&s&&s():$&&!V?_+=is(_,i.indent,p($)):x&&a&&a(),_}function Hv(n,e){(n==="debug"||n==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const Mo="<<",Pn={identify:n=>n===Mo||typeof n=="symbol"&&n.description===Mo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new he(Symbol(Mo)),{addToJSMap:qv}),stringify:()=>Mo},KA=(n,e)=>(Pn.identify(e)||Oe(e)&&(!e.type||e.type===he.PLAIN)&&Pn.identify(e.value))&&(n==null?void 0:n.doc.schema.tags.some(i=>i.tag===Pn.tag&&i.default));function qv(n,e,i){if(i=n&&us(i)?i.resolve(n.doc):i,Nr(i))for(const s of i.items)ch(n,e,s);else if(Array.isArray(i))for(const s of i)ch(n,e,s);else ch(n,e,i)}function ch(n,e,i){const s=n&&us(i)?i.resolve(n.doc):i;if(!Ar(s))throw new Error("Merge sources must be maps or map aliases");const a=s.toJSON(null,n,Map);for(const[o,u]of a)e instanceof Map?e.has(o)||e.set(o,u):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0});return e}function $v(n,e,{key:i,value:s}){if(He(i)&&i.addToJSMap)i.addToJSMap(n,e,s);else if(KA(n,i))qv(n,e,s);else{const a=an(i,"",n);if(e instanceof Map)e.set(a,an(s,a,n));else if(e instanceof Set)e.add(a);else{const o=YA(i,a,n),u=an(s,o,n);o in e?Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[o]=u}}return e}function YA(n,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(He(n)&&(i!=null&&i.doc)){const s=zv(i.doc,{});s.anchors=new Set;for(const o of i.anchors.keys())s.anchors.add(o.anchor);s.inFlow=!0,s.inStringifyKey=!0;const a=n.toString(s);if(!i.mapKeyWarned){let o=JSON.stringify(a);o.length>40&&(o=o.substring(0,36)+'..."'),Hv(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return a}return JSON.stringify(e)}function wd(n,e,i){const s=il(n,void 0,i),a=il(e,void 0,i);return new gt(s,a)}class gt{constructor(e,i=null){Object.defineProperty(this,ln,{value:Nv}),this.key=e,this.value=i}clone(e){let{key:i,value:s}=this;return He(i)&&(i=i.clone(e)),He(s)&&(s=s.clone(e)),new gt(i,s)}toJSON(e,i){const s=i!=null&&i.mapAsMap?new Map:{};return $v(i,s,this)}toString(e,i,s){return e!=null&&e.doc?GA(this,e,i,s):JSON.stringify(this)}}function Iv(n,e,i){return(e.inFlow??n.flow?PA:XA)(n,e,i)}function XA({comment:n,items:e},i,{blockItemPrefix:s,flowChars:a,itemIndent:o,onChompKeep:u,onComment:f}){const{indent:d,options:{commentString:p}}=i,m=Object.assign({},i,{indent:o,type:null});let y=!1;const v=[];for(let E=0;E<e.length;++E){const x=e[E];let _=null;if(He(x))!y&&x.spaceBefore&&v.push(""),ac(i,v,x.commentBefore,y),x.comment&&(_=x.comment);else if(De(x)){const k=He(x.key)?x.key:null;k&&(!y&&k.spaceBefore&&v.push(""),ac(i,v,k.commentBefore,y))}y=!1;let N=vr(x,m,()=>_=null,()=>y=!0);_&&(N+=is(N,o,p(_))),y&&_&&(y=!1),v.push(s+N)}let b;if(v.length===0)b=a.start+a.end;else{b=v[0];for(let E=1;E<v.length;++E){const x=v[E];b+=x?`
|
|
172
|
+
${d}${x}`:`
|
|
173
|
+
`}}return n?(b+=`
|
|
174
|
+
`+Xn(p(n),d),f&&f()):y&&u&&u(),b}function PA({items:n},e,{flowChars:i,itemIndent:s}){const{indent:a,indentStep:o,flowCollectionPadding:u,options:{commentString:f}}=e;s+=o;const d=Object.assign({},e,{indent:s,inFlow:!0,type:null});let p=!1,m=0;const y=[];for(let E=0;E<n.length;++E){const x=n[E];let _=null;if(He(x))x.spaceBefore&&y.push(""),ac(e,y,x.commentBefore,!1),x.comment&&(_=x.comment);else if(De(x)){const k=He(x.key)?x.key:null;k&&(k.spaceBefore&&y.push(""),ac(e,y,k.commentBefore,!1),k.comment&&(p=!0));const $=He(x.value)?x.value:null;$?($.comment&&(_=$.comment),$.commentBefore&&(p=!0)):x.value==null&&(k!=null&&k.comment)&&(_=k.comment)}_&&(p=!0);let N=vr(x,d,()=>_=null);E<n.length-1&&(N+=","),_&&(N+=is(N,s,f(_))),!p&&(y.length>m||N.includes(`
|
|
175
|
+
`))&&(p=!0),y.push(N),m=y.length}const{start:v,end:b}=i;if(y.length===0)return v+b;if(!p){const E=y.reduce((x,_)=>x+_.length+2,2);p=e.options.lineWidth>0&&E>e.options.lineWidth}if(p){let E=v;for(const x of y)E+=x?`
|
|
176
|
+
${o}${a}${x}`:`
|
|
177
|
+
`;return`${E}
|
|
178
|
+
${a}${b}`}else return`${v}${u}${y.join(" ")}${u}${b}`}function ac({indent:n,options:{commentString:e}},i,s,a){if(s&&a&&(s=s.replace(/^\n+/,"")),s){const o=Xn(e(s),n);i.push(o.trimStart())}}function ss(n,e){const i=Oe(e)?e.value:e;for(const s of n)if(De(s)&&(s.key===e||s.key===i||Oe(s.key)&&s.key.value===i))return s}class It extends Bv{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Ai,e),this.items=[]}static from(e,i,s){const{keepUndefined:a,replacer:o}=s,u=new this(e),f=(d,p)=>{if(typeof o=="function")p=o.call(i,d,p);else if(Array.isArray(o)&&!o.includes(d))return;(p!==void 0||a)&&u.items.push(wd(d,p,s))};if(i instanceof Map)for(const[d,p]of i)f(d,p);else if(i&&typeof i=="object")for(const d of Object.keys(i))f(d,i[d]);return typeof e.sortMapEntries=="function"&&u.items.sort(e.sortMapEntries),u}add(e,i){var u;let s;De(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new gt(e,e==null?void 0:e.value):s=new gt(e.key,e.value);const a=ss(this.items,s.key),o=(u=this.schema)==null?void 0:u.sortMapEntries;if(a){if(!i)throw new Error(`Key ${s.key} already set`);Oe(a.value)&&Dv(s.value)?a.value.value=s.value:a.value=s.value}else if(o){const f=this.items.findIndex(d=>o(s,d)<0);f===-1?this.items.push(s):this.items.splice(f,0,s)}else this.items.push(s)}delete(e){const i=ss(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){const s=ss(this.items,e),a=s==null?void 0:s.value;return(!i&&Oe(a)?a.value:a)??void 0}has(e){return!!ss(this.items,e)}set(e,i){this.add(new gt(e,i),!0)}toJSON(e,i,s){const a=s?new s:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(a);for(const o of this.items)$v(i,a,o);return a}toString(e,i,s){if(!e)return JSON.stringify(this);for(const a of this.items)if(!De(a))throw new Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Iv(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:i})}}const Cr={collection:"map",default:!0,nodeClass:It,tag:"tag:yaml.org,2002:map",resolve(n,e){return Ar(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,i)=>It.from(n,e,i)};class Ci extends Bv{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Er,e),this.items=[]}add(e){this.items.push(e)}delete(e){const i=Oo(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){const s=Oo(e);if(typeof s!="number")return;const a=this.items[s];return!i&&Oe(a)?a.value:a}has(e){const i=Oo(e);return typeof i=="number"&&i<this.items.length}set(e,i){const s=Oo(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const a=this.items[s];Oe(a)&&Dv(i)?a.value=i:this.items[s]=i}toJSON(e,i){const s=[];i!=null&&i.onCreate&&i.onCreate(s);let a=0;for(const o of this.items)s.push(an(o,String(a++),i));return s}toString(e,i,s){return e?Iv(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:i}):JSON.stringify(this)}static from(e,i,s){const{replacer:a}=s,o=new this(e);if(i&&Symbol.iterator in Object(i)){let u=0;for(let f of i){if(typeof a=="function"){const d=i instanceof Set?f:String(u++);f=a.call(i,d,f)}o.items.push(il(f,void 0,s))}}return o}}function Oo(n){let e=Oe(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const kr={collection:"seq",default:!0,nodeClass:Ci,tag:"tag:yaml.org,2002:seq",resolve(n,e){return Nr(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,i)=>Ci.from(n,e,i)},wc={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,i,s){return e=Object.assign({actualString:!0},e),ol(n,e,i,s)}},xc={identify:n=>n==null,createNode:()=>new he(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new he(null),stringify:({source:n},e)=>typeof n=="string"&&xc.test.test(n)?n:e.options.nullStr},xd={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new he(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},i){if(n&&xd.test.test(n)){const s=n[0]==="t"||n[0]==="T";if(e===s)return n}return e?i.options.trueStr:i.options.falseStr}};function gn({format:n,minFractionDigits:e,tag:i,value:s}){if(typeof s=="bigint")return String(s);const a=typeof s=="number"?s:Number(s);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let o=JSON.stringify(s);if(!n&&e&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let u=o.indexOf(".");u<0&&(u=o.length,o+=".");let f=e-(o.length-u-1);for(;f-- >0;)o+="0"}return o}const Vv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:gn},Gv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():gn(n)}},Kv={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){const e=new he(parseFloat(n)),i=n.indexOf(".");return i!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-i-1),e},stringify:gn},_c=n=>typeof n=="bigint"||Number.isInteger(n),_d=(n,e,i,{intAsBigInt:s})=>s?BigInt(n):parseInt(n.substring(e),i);function Yv(n,e,i){const{value:s}=n;return _c(s)&&s>=0?i+s.toString(e):gn(n)}const Xv={identify:n=>_c(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,i)=>_d(n,2,8,i),stringify:n=>Yv(n,8,"0o")},Pv={identify:_c,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,i)=>_d(n,0,10,i),stringify:gn},Fv={identify:n=>_c(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,i)=>_d(n,2,16,i),stringify:n=>Yv(n,16,"0x")},FA=[Cr,kr,wc,xc,xd,Xv,Pv,Fv,Vv,Gv,Kv];function vb(n){return typeof n=="bigint"||Number.isInteger(n)}const Lo=({value:n})=>JSON.stringify(n),QA=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:Lo},{identify:n=>n==null,createNode:()=>new he(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Lo},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:n=>n==="true",stringify:Lo},{identify:vb,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:i})=>i?BigInt(n):parseInt(n,10),stringify:({value:n})=>vb(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:Lo}],ZA={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},JA=[Cr,kr].concat(QA,ZA),Td={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){const i=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(i.length);for(let a=0;a<i.length;++a)s[a]=i.charCodeAt(a);return s}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:i},s,a,o){const u=i;let f;if(typeof Buffer=="function")f=u instanceof Buffer?u.toString("base64"):Buffer.from(u.buffer).toString("base64");else if(typeof btoa=="function"){let d="";for(let p=0;p<u.length;++p)d+=String.fromCharCode(u[p]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=he.BLOCK_LITERAL),e!==he.QUOTE_DOUBLE){const d=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),p=Math.ceil(f.length/d),m=new Array(p);for(let y=0,v=0;y<p;++y,v+=d)m[y]=f.substr(v,d);f=m.join(e===he.BLOCK_LITERAL?`
|
|
179
|
+
`:" ")}return ol({comment:n,type:e,value:f},s,a,o)}};function Qv(n,e){if(Nr(n))for(let i=0;i<n.items.length;++i){let s=n.items[i];if(!De(s)){if(Ar(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");const a=s.items[0]||new gt(new he(null));if(s.commentBefore&&(a.key.commentBefore=a.key.commentBefore?`${s.commentBefore}
|
|
180
|
+
${a.key.commentBefore}`:s.commentBefore),s.comment){const o=a.value??a.key;o.comment=o.comment?`${s.comment}
|
|
181
|
+
${o.comment}`:s.comment}s=a}n.items[i]=De(s)?s:new gt(s)}}else e("Expected a sequence for this tag");return n}function Zv(n,e,i){const{replacer:s}=i,a=new Ci(n);a.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let u of e){typeof s=="function"&&(u=s.call(e,String(o++),u));let f,d;if(Array.isArray(u))if(u.length===2)f=u[0],d=u[1];else throw new TypeError(`Expected [key, value] tuple: ${u}`);else if(u&&u instanceof Object){const p=Object.keys(u);if(p.length===1)f=p[0],d=u[f];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else f=u;a.items.push(wd(f,d,i))}return a}const Ed={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Qv,createNode:Zv};class mr extends Ci{constructor(){super(),this.add=It.prototype.add.bind(this),this.delete=It.prototype.delete.bind(this),this.get=It.prototype.get.bind(this),this.has=It.prototype.has.bind(this),this.set=It.prototype.set.bind(this),this.tag=mr.tag}toJSON(e,i){if(!i)return super.toJSON(e);const s=new Map;i!=null&&i.onCreate&&i.onCreate(s);for(const a of this.items){let o,u;if(De(a)?(o=an(a.key,"",i),u=an(a.value,o,i)):o=an(a,"",i),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,u)}return s}static from(e,i,s){const a=Zv(e,i,s),o=new this;return o.items=a.items,o}}mr.tag="tag:yaml.org,2002:omap";const Ad={collection:"seq",identify:n=>n instanceof Map,nodeClass:mr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const i=Qv(n,e),s=[];for(const{key:a}of i.items)Oe(a)&&(s.includes(a.value)?e(`Ordered maps must not include duplicate keys: ${a.value}`):s.push(a.value));return Object.assign(new mr,i)},createNode:(n,e,i)=>mr.from(n,e,i)};function Jv({value:n,source:e},i){return e&&(n?Wv:eS).test.test(e)?e:n?i.options.trueStr:i.options.falseStr}const Wv={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new he(!0),stringify:Jv},eS={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new he(!1),stringify:Jv},WA={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:gn},eN={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():gn(n)}},tN={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){const e=new he(parseFloat(n.replace(/_/g,""))),i=n.indexOf(".");if(i!==-1){const s=n.substring(i+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:gn},cl=n=>typeof n=="bigint"||Number.isInteger(n);function Tc(n,e,i,{intAsBigInt:s}){const a=n[0];if((a==="-"||a==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),s){switch(i){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const u=BigInt(n);return a==="-"?BigInt(-1)*u:u}const o=parseInt(n,i);return a==="-"?-1*o:o}function Nd(n,e,i){const{value:s}=n;if(cl(s)){const a=s.toString(e);return s<0?"-"+i+a.substr(1):i+a}return gn(n)}const nN={identify:cl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,i)=>Tc(n,2,2,i),stringify:n=>Nd(n,2,"0b")},iN={identify:cl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,i)=>Tc(n,1,8,i),stringify:n=>Nd(n,8,"0")},sN={identify:cl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,i)=>Tc(n,0,10,i),stringify:gn},rN={identify:cl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,i)=>Tc(n,2,16,i),stringify:n=>Nd(n,16,"0x")};class yr extends It{constructor(e){super(e),this.tag=yr.tag}add(e){let i;De(e)?i=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?i=new gt(e.key,null):i=new gt(e,null),ss(this.items,i.key)||this.items.push(i)}get(e,i){const s=ss(this.items,e);return!i&&De(s)?Oe(s.key)?s.key.value:s.key:s}set(e,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);const s=ss(this.items,e);s&&!i?this.items.splice(this.items.indexOf(s),1):!s&&i&&this.items.push(new gt(e))}toJSON(e,i){return super.toJSON(e,i,Set)}toString(e,i,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),i,s);throw new Error("Set items must all have null values")}static from(e,i,s){const{replacer:a}=s,o=new this(e);if(i&&Symbol.iterator in Object(i))for(let u of i)typeof a=="function"&&(u=a.call(i,u,u)),o.items.push(wd(u,null,s));return o}}yr.tag="tag:yaml.org,2002:set";const Cd={collection:"map",identify:n=>n instanceof Set,nodeClass:yr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,i)=>yr.from(n,e,i),resolve(n,e){if(Ar(n)){if(n.hasAllNullValues(!0))return Object.assign(new yr,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function kd(n,e){const i=n[0],s=i==="-"||i==="+"?n.substring(1):n,a=u=>e?BigInt(u):Number(u),o=s.replace(/_/g,"").split(":").reduce((u,f)=>u*a(60)+a(f),a(0));return i==="-"?a(-1)*o:o}function tS(n){let{value:e}=n,i=u=>u;if(typeof e=="bigint")i=u=>BigInt(u);else if(isNaN(e)||!isFinite(e))return gn(n);let s="";e<0&&(s="-",e*=i(-1));const a=i(60),o=[e%a];return e<60?o.unshift(0):(e=(e-o[0])/a,o.unshift(e%a),e>=60&&(e=(e-o[0])/a,o.unshift(e))),s+o.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const nS={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:i})=>kd(n,i),stringify:tS},iS={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>kd(n,!1),stringify:tS},Ec={identify:n=>n 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(n){const e=n.match(Ec.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,s,a,o,u,f]=e.map(Number),d=e[7]?Number((e[7]+"00").substr(1,3)):0;let p=Date.UTC(i,s-1,a,o||0,u||0,f||0,d);const m=e[8];if(m&&m!=="Z"){let y=kd(m,!1);Math.abs(y)<30&&(y*=60),p-=6e4*y}return new Date(p)},stringify:({value:n})=>n.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Sb=[Cr,kr,wc,xc,Wv,eS,nN,iN,sN,rN,WA,eN,tN,Td,Pn,Ad,Ed,Cd,nS,iS,Ec],wb=new Map([["core",FA],["failsafe",[Cr,kr,wc]],["json",JA],["yaml11",Sb],["yaml-1.1",Sb]]),xb={binary:Td,bool:xd,float:Kv,floatExp:Gv,floatNaN:Vv,floatTime:iS,int:Pv,intHex:Fv,intOct:Xv,intTime:nS,map:Cr,merge:Pn,null:xc,omap:Ad,pairs:Ed,seq:kr,set:Cd,timestamp:Ec},aN={"tag:yaml.org,2002:binary":Td,"tag:yaml.org,2002:merge":Pn,"tag:yaml.org,2002:omap":Ad,"tag:yaml.org,2002:pairs":Ed,"tag:yaml.org,2002:set":Cd,"tag:yaml.org,2002:timestamp":Ec};function uh(n,e,i){const s=wb.get(e);if(s&&!n)return i&&!s.includes(Pn)?s.concat(Pn):s.slice();let a=s;if(!a)if(Array.isArray(n))a=[];else{const o=Array.from(wb.keys()).filter(u=>u!=="yaml11").map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(n))for(const o of n)a=a.concat(o);else typeof n=="function"&&(a=n(a.slice()));return i&&(a=a.concat(Pn)),a.reduce((o,u)=>{const f=typeof u=="string"?xb[u]:u;if(!f){const d=JSON.stringify(u),p=Object.keys(xb).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${p}`)}return o.includes(f)||o.push(f),o},[])}const lN=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;class Ac{constructor({compat:e,customTags:i,merge:s,resolveKnownTags:a,schema:o,sortMapEntries:u,toStringDefaults:f}){this.compat=Array.isArray(e)?uh(e,"compat"):e?uh(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=a?aN:{},this.tags=uh(i,this.name,s),this.toStringOptions=f??null,Object.defineProperty(this,Ai,{value:Cr}),Object.defineProperty(this,Tn,{value:wc}),Object.defineProperty(this,Er,{value:kr}),this.sortMapEntries=typeof u=="function"?u:u===!0?lN:null}clone(){const e=Object.create(Ac.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function oN(n,e){var d;const i=[];let s=e.directives===!0;if(e.directives!==!1&&n.directives){const p=n.directives.toString(n);p?(i.push(p),s=!0):n.directives.docStart&&(s=!0)}s&&i.push("---");const a=zv(n,e),{commentString:o}=a.options;if(n.commentBefore){i.length!==1&&i.unshift("");const p=o(n.commentBefore);i.unshift(Xn(p,""))}let u=!1,f=null;if(n.contents){if(He(n.contents)){if(n.contents.spaceBefore&&s&&i.push(""),n.contents.commentBefore){const y=o(n.contents.commentBefore);i.push(Xn(y,""))}a.forceBlockIndent=!!n.comment,f=n.contents.comment}const p=f?void 0:()=>u=!0;let m=vr(n.contents,a,()=>f=null,p);f&&(m+=is(m,"",o(f))),(m[0]==="|"||m[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${m}`:i.push(m)}else i.push(vr(n.contents,a));if((d=n.directives)!=null&&d.docEnd)if(n.comment){const p=o(n.comment);p.includes(`
|
|
182
|
+
`)?(i.push("..."),i.push(Xn(p,""))):i.push(`... ${p}`)}else i.push("...");else{let p=n.comment;p&&u&&(p=p.replace(/^\n+/,"")),p&&((!u||f)&&i[i.length-1]!==""&&i.push(""),i.push(Xn(o(p),"")))}return i.join(`
|
|
183
|
+
`)+`
|
|
184
|
+
`}class Mr{constructor(e,i,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ln,{value:Lh});let a=null;typeof i=="function"||Array.isArray(i)?a=i:s===void 0&&i&&(s=i,i=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=o;let{version:u}=o;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new St({version:u}),this.setSchema(u,s),this.contents=e===void 0?null:this.createNode(e,a,s)}clone(){const e=Object.create(Mr.prototype,{[ln]:{value:Lh}});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=He(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){sr(this.contents)&&this.contents.add(e)}addIn(e,i){sr(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){const s=Rv(this);e.anchor=!i||s.has(i)?jv(i||"a",s):i}return new yc(e.anchor)}createNode(e,i,s){let a;if(typeof i=="function")e=i.call({"":e},"",e),a=i;else if(Array.isArray(i)){const _=k=>typeof k=="number"||k instanceof String||k instanceof Number,N=i.filter(_).map(String);N.length>0&&(i=i.concat(N)),a=i}else s===void 0&&i&&(s=i,i=void 0);const{aliasDuplicateObjects:o,anchorPrefix:u,flow:f,keepUndefined:d,onTagObj:p,tag:m}=s??{},{onAnchor:y,setAnchors:v,sourceObjects:b}=BA(this,u||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:p,replacer:a,schema:this.schema,sourceObjects:b},x=il(e,m,E);return f&&ze(x)&&(x.flow=!0),v(),x}createPair(e,i,s={}){const a=this.createNode(e,null,s),o=this.createNode(i,null,s);return new gt(a,o)}delete(e){return sr(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Va(e)?this.contents==null?!1:(this.contents=null,!0):sr(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return ze(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return Va(e)?!i&&Oe(this.contents)?this.contents.value:this.contents:ze(this.contents)?this.contents.getIn(e,i):void 0}has(e){return ze(this.contents)?this.contents.has(e):!1}hasIn(e){return Va(e)?this.contents!==void 0:ze(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=rc(this.schema,[e],i):sr(this.contents)&&this.contents.set(e,i)}setIn(e,i){Va(e)?this.contents=i:this.contents==null?this.contents=rc(this.schema,Array.from(e),i):sr(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new St({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new St({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const a=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${a}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(s)this.schema=new Ac(Object.assign(s,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:s,maxAliasCount:a,onAnchor:o,reviver:u}={}){const f={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},d=an(this.contents,i??"",f);if(typeof o=="function")for(const{count:p,res:m}of f.anchors.values())o(m,p);return typeof u=="function"?dr(u,{"":d},"",d):d}toJSON(e,i){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:i})}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 i=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return oN(this,e)}}function sr(n){if(ze(n))return!0;throw new Error("Expected a YAML collection as document contents")}class Md extends Error{constructor(e,i,s,a){super(),this.name=e,this.code=s,this.message=a,this.pos=i}}class rs extends Md{constructor(e,i,s){super("YAMLParseError",e,i,s)}}class sS extends Md{constructor(e,i,s){super("YAMLWarning",e,i,s)}}const lc=(n,e)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(f=>e.linePos(f));const{line:s,col:a}=i.linePos[0];i.message+=` at line ${s}, column ${a}`;let o=a-1,u=n.substring(e.lineStarts[s-1],e.lineStarts[s]).replace(/[\n\r]+$/,"");if(o>=60&&u.length>80){const f=Math.min(o-39,u.length-79);u="…"+u.substring(f),o-=f-1}if(u.length>80&&(u=u.substring(0,79)+"…"),s>1&&/^ *$/.test(u.substring(0,o))){let f=n.substring(e.lineStarts[s-2],e.lineStarts[s-1]);f.length>80&&(f=f.substring(0,79)+`…
|
|
185
|
+
`),u=f+u}if(/[^ ]/.test(u)){let f=1;const d=i.linePos[1];d&&d.line===s&&d.col>a&&(f=Math.max(1,Math.min(d.col-a,80-o)));const p=" ".repeat(o)+"^".repeat(f);i.message+=`:
|
|
186
|
+
|
|
187
|
+
${u}
|
|
188
|
+
${p}
|
|
189
|
+
`}};function Sr(n,{flow:e,indicator:i,next:s,offset:a,onError:o,parentIndent:u,startOnNewline:f}){let d=!1,p=f,m=f,y="",v="",b=!1,E=!1,x=null,_=null,N=null,k=null,$=null,V=null,L=null;for(const q of n)switch(E&&(q.type!=="space"&&q.type!=="newline"&&q.type!=="comma"&&o(q.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),x&&(p&&q.type!=="comment"&&q.type!=="newline"&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),x=null),q.type){case"space":!e&&(i!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&q.source.includes(" ")&&(x=q),m=!0;break;case"comment":{m||o(q,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const R=q.source.substring(1)||" ";y?y+=v+R:y=R,v="",p=!1;break}case"newline":p?y?y+=q.source:d=!0:v+=q.source,p=!0,b=!0,(_||N)&&(k=q),m=!0;break;case"anchor":_&&o(q,"MULTIPLE_ANCHORS","A node can have at most one anchor"),q.source.endsWith(":")&&o(q.offset+q.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),_=q,L===null&&(L=q.offset),p=!1,m=!1,E=!0;break;case"tag":{N&&o(q,"MULTIPLE_TAGS","A node can have at most one tag"),N=q,L===null&&(L=q.offset),p=!1,m=!1,E=!0;break}case i:(_||N)&&o(q,"BAD_PROP_ORDER",`Anchors and tags must be after the ${q.source} indicator`),V&&o(q,"UNEXPECTED_TOKEN",`Unexpected ${q.source} in ${e??"collection"}`),V=q,p=i==="seq-item-ind"||i==="explicit-key-ind",m=!1;break;case"comma":if(e){$&&o(q,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),$=q,p=!1,m=!1;break}default:o(q,"UNEXPECTED_TOKEN",`Unexpected ${q.type} token`),p=!1,m=!1}const G=n[n.length-1],Z=G?G.offset+G.source.length:a;return E&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),x&&(p&&x.indent<=u||(s==null?void 0:s.type)==="block-map"||(s==null?void 0:s.type)==="block-seq")&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:$,found:V,spaceBefore:d,comment:y,hasNewline:b,anchor:_,tag:N,newlineAfterProp:k,end:Z,start:L??Z}}function sl(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
|
|
190
|
+
`))return!0;if(n.end){for(const e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of n.items){for(const i of e.start)if(i.type==="newline")return!0;if(e.sep){for(const i of e.sep)if(i.type==="newline")return!0}if(sl(e.key)||sl(e.value))return!0}return!1;default:return!0}}function Bh(n,e,i){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===n&&(s.source==="]"||s.source==="}")&&sl(e)&&i(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function rS(n,e,i){const{uniqueKeys:s}=n.options;if(s===!1)return!1;const a=typeof s=="function"?s:(o,u)=>o===u||Oe(o)&&Oe(u)&&o.value===u.value;return e.some(o=>a(o.key,i))}const _b="All mapping items must start at the same column";function cN({composeNode:n,composeEmptyNode:e},i,s,a,o){var m;const u=(o==null?void 0:o.nodeClass)??It,f=new u(i.schema);i.atRoot&&(i.atRoot=!1);let d=s.offset,p=null;for(const y of s.items){const{start:v,key:b,sep:E,value:x}=y,_=Sr(v,{indicator:"explicit-key-ind",next:b??(E==null?void 0:E[0]),offset:d,onError:a,parentIndent:s.indent,startOnNewline:!0}),N=!_.found;if(N){if(b&&(b.type==="block-seq"?a(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in b&&b.indent!==s.indent&&a(d,"BAD_INDENT",_b)),!_.anchor&&!_.tag&&!E){p=_.end,_.comment&&(f.comment?f.comment+=`
|
|
191
|
+
`+_.comment:f.comment=_.comment);continue}(_.newlineAfterProp||sl(b))&&a(b??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((m=_.found)==null?void 0:m.indent)!==s.indent&&a(d,"BAD_INDENT",_b);i.atKey=!0;const k=_.end,$=b?n(i,b,_,a):e(i,k,v,null,_,a);i.schema.compat&&Bh(s.indent,b,a),i.atKey=!1,rS(i,f.items,$)&&a(k,"DUPLICATE_KEY","Map keys must be unique");const V=Sr(E??[],{indicator:"map-value-ind",next:x,offset:$.range[2],onError:a,parentIndent:s.indent,startOnNewline:!b||b.type==="block-scalar"});if(d=V.end,V.found){N&&((x==null?void 0:x.type)==="block-map"&&!V.hasNewline&&a(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&_.start<V.found.offset-1024&&a($.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const L=x?n(i,x,V,a):e(i,d,E,null,V,a);i.schema.compat&&Bh(s.indent,x,a),d=L.range[2];const G=new gt($,L);i.options.keepSourceTokens&&(G.srcToken=y),f.items.push(G)}else{N&&a($.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),V.comment&&($.comment?$.comment+=`
|
|
192
|
+
`+V.comment:$.comment=V.comment);const L=new gt($);i.options.keepSourceTokens&&(L.srcToken=y),f.items.push(L)}}return p&&p<d&&a(p,"IMPOSSIBLE","Map comment with trailing content"),f.range=[s.offset,d,p??d],f}function uN({composeNode:n,composeEmptyNode:e},i,s,a,o){const u=(o==null?void 0:o.nodeClass)??Ci,f=new u(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let d=s.offset,p=null;for(const{start:m,value:y}of s.items){const v=Sr(m,{indicator:"seq-item-ind",next:y,offset:d,onError:a,parentIndent:s.indent,startOnNewline:!0});if(!v.found)if(v.anchor||v.tag||y)y&&y.type==="block-seq"?a(v.end,"BAD_INDENT","All sequence items must start at the same column"):a(d,"MISSING_CHAR","Sequence item without - indicator");else{p=v.end,v.comment&&(f.comment=v.comment);continue}const b=y?n(i,y,v,a):e(i,v.end,m,null,v,a);i.schema.compat&&Bh(s.indent,y,a),d=b.range[2],f.items.push(b)}return f.range=[s.offset,d,p??d],f}function ul(n,e,i,s){let a="";if(n){let o=!1,u="";for(const f of n){const{source:d,type:p}=f;switch(p){case"space":o=!0;break;case"comment":{i&&!o&&s(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const m=d.substring(1)||" ";a?a+=u+m:a=m,u="";break}case"newline":a&&(u+=d),o=!0;break;default:s(f,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=d.length}}return{comment:a,offset:e}}const fh="Block collections are not allowed within flow collections",hh=n=>n&&(n.type==="block-map"||n.type==="block-seq");function fN({composeNode:n,composeEmptyNode:e},i,s,a,o){const u=s.start.source==="{",f=u?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(u?It:Ci),p=new d(i.schema);p.flow=!0;const m=i.atRoot;m&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let y=s.offset+s.start.source.length;for(let _=0;_<s.items.length;++_){const N=s.items[_],{start:k,key:$,sep:V,value:L}=N,G=Sr(k,{flow:f,indicator:"explicit-key-ind",next:$??(V==null?void 0:V[0]),offset:y,onError:a,parentIndent:s.indent,startOnNewline:!1});if(!G.found){if(!G.anchor&&!G.tag&&!V&&!L){_===0&&G.comma?a(G.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):_<s.items.length-1&&a(G.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),G.comment&&(p.comment?p.comment+=`
|
|
193
|
+
`+G.comment:p.comment=G.comment),y=G.end;continue}!u&&i.options.strict&&sl($)&&a($,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)G.comma&&a(G.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(G.comma||a(G.start,"MISSING_CHAR",`Missing , between ${f} items`),G.comment){let Z="";e:for(const q of k)switch(q.type){case"comma":case"space":break;case"comment":Z=q.source.substring(1);break e;default:break e}if(Z){let q=p.items[p.items.length-1];De(q)&&(q=q.value??q.key),q.comment?q.comment+=`
|
|
194
|
+
`+Z:q.comment=Z,G.comment=G.comment.substring(Z.length+1)}}if(!u&&!V&&!G.found){const Z=L?n(i,L,G,a):e(i,G.end,V,null,G,a);p.items.push(Z),y=Z.range[2],hh(L)&&a(Z.range,"BLOCK_IN_FLOW",fh)}else{i.atKey=!0;const Z=G.end,q=$?n(i,$,G,a):e(i,Z,k,null,G,a);hh($)&&a(q.range,"BLOCK_IN_FLOW",fh),i.atKey=!1;const R=Sr(V??[],{flow:f,indicator:"map-value-ind",next:L,offset:q.range[2],onError:a,parentIndent:s.indent,startOnNewline:!1});if(R.found){if(!u&&!G.found&&i.options.strict){if(V)for(const I of V){if(I===R.found)break;if(I.type==="newline"){a(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}G.start<R.found.offset-1024&&a(R.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else L&&("source"in L&&L.source&&L.source[0]===":"?a(L,"MISSING_CHAR",`Missing space after : in ${f}`):a(R.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const ie=L?n(i,L,R,a):R.found?e(i,R.end,V,null,R,a):null;ie?hh(L)&&a(ie.range,"BLOCK_IN_FLOW",fh):R.comment&&(q.comment?q.comment+=`
|
|
195
|
+
`+R.comment:q.comment=R.comment);const le=new gt(q,ie);if(i.options.keepSourceTokens&&(le.srcToken=N),u){const I=p;rS(i,I.items,q)&&a(Z,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(le)}else{const I=new It(i.schema);I.flow=!0,I.items.push(le);const F=(ie??q).range;I.range=[q.range[0],F[1],F[2]],p.items.push(I)}y=ie?ie.range[2]:R.end}}const v=u?"}":"]",[b,...E]=s.end;let x=y;if(b&&b.source===v)x=b.offset+b.source.length;else{const _=f[0].toUpperCase()+f.substring(1),N=m?`${_} must end with a ${v}`:`${_} in block collection must be sufficiently indented and end with a ${v}`;a(y,m?"MISSING_CHAR":"BAD_INDENT",N),b&&b.source.length!==1&&E.unshift(b)}if(E.length>0){const _=ul(E,x,i.options.strict,a);_.comment&&(p.comment?p.comment+=`
|
|
196
|
+
`+_.comment:p.comment=_.comment),p.range=[s.offset,x,_.offset]}else p.range=[s.offset,x,x];return p}function dh(n,e,i,s,a,o){const u=i.type==="block-map"?cN(n,e,i,s,o):i.type==="block-seq"?uN(n,e,i,s,o):fN(n,e,i,s,o),f=u.constructor;return a==="!"||a===f.tagName?(u.tag=f.tagName,u):(a&&(u.tag=a),u)}function hN(n,e,i,s,a){var v;const o=s.tag,u=o?e.directives.tagName(o.source,b=>a(o,"TAG_RESOLVE_FAILED",b)):null;if(i.type==="block-seq"){const{anchor:b,newlineAfterProp:E}=s,x=b&&o?b.offset>o.offset?b:o:b??o;x&&(!E||E.offset<x.offset)&&a(x,"MISSING_CHAR","Missing newline after block sequence props")}const f=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!o||!u||u==="!"||u===It.tagName&&f==="map"||u===Ci.tagName&&f==="seq")return dh(n,e,i,a,u);let d=e.schema.tags.find(b=>b.tag===u&&b.collection===f);if(!d){const b=e.schema.knownTags[u];if(b&&b.collection===f)e.schema.tags.push(Object.assign({},b,{default:!1})),d=b;else return b!=null&&b.collection?a(o,"BAD_COLLECTION_TYPE",`${b.tag} used for ${f} collection, but expects ${b.collection}`,!0):a(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),dh(n,e,i,a,u)}const p=dh(n,e,i,a,u,d),m=((v=d.resolve)==null?void 0:v.call(d,p,b=>a(o,"TAG_RESOLVE_FAILED",b),e.options))??p,y=He(m)?m:new he(m);return y.range=p.range,y.tag=u,d!=null&&d.format&&(y.format=d.format),y}function aS(n,e,i){const s=e.offset,a=dN(e,n.options.strict,i);if(!a)return{value:"",type:null,comment:"",range:[s,s,s]};const o=a.mode===">"?he.BLOCK_FOLDED:he.BLOCK_LITERAL,u=e.source?pN(e.source):[];let f=u.length;for(let x=u.length-1;x>=0;--x){const _=u[x][1];if(_===""||_==="\r")f=x;else break}if(f===0){const x=a.chomp==="+"&&u.length>0?`
|
|
197
|
+
`.repeat(Math.max(1,u.length-1)):"";let _=s+a.length;return e.source&&(_+=e.source.length),{value:x,type:o,comment:a.comment,range:[s,_,_]}}let d=e.indent+a.indent,p=e.offset+a.length,m=0;for(let x=0;x<f;++x){const[_,N]=u[x];if(N===""||N==="\r")a.indent===0&&_.length>d&&(d=_.length);else{_.length<d&&i(p+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),a.indent===0&&(d=_.length),m=x,d===0&&!n.atRoot&&i(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=_.length+N.length+1}for(let x=u.length-1;x>=f;--x)u[x][0].length>d&&(f=x+1);let y="",v="",b=!1;for(let x=0;x<m;++x)y+=u[x][0].slice(d)+`
|
|
198
|
+
`;for(let x=m;x<f;++x){let[_,N]=u[x];p+=_.length+N.length+1;const k=N[N.length-1]==="\r";if(k&&(N=N.slice(0,-1)),N&&_.length<d){const V=`Block scalar lines must not be less indented than their ${a.indent?"explicit indentation indicator":"first line"}`;i(p-N.length-(k?2:1),"BAD_INDENT",V),_=""}o===he.BLOCK_LITERAL?(y+=v+_.slice(d)+N,v=`
|
|
199
|
+
`):_.length>d||N[0]===" "?(v===" "?v=`
|
|
200
|
+
`:!b&&v===`
|
|
201
|
+
`&&(v=`
|
|
202
|
+
|
|
203
|
+
`),y+=v+_.slice(d)+N,v=`
|
|
204
|
+
`,b=!0):N===""?v===`
|
|
205
|
+
`?y+=`
|
|
206
|
+
`:v=`
|
|
207
|
+
`:(y+=v+N,v=" ",b=!1)}switch(a.chomp){case"-":break;case"+":for(let x=f;x<u.length;++x)y+=`
|
|
208
|
+
`+u[x][0].slice(d);y[y.length-1]!==`
|
|
209
|
+
`&&(y+=`
|
|
210
|
+
`);break;default:y+=`
|
|
211
|
+
`}const E=s+a.length+e.source.length;return{value:y,type:o,comment:a.comment,range:[s,E,E]}}function dN({offset:n,props:e},i,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=e[0],o=a[0];let u=0,f="",d=-1;for(let v=1;v<a.length;++v){const b=a[v];if(!f&&(b==="-"||b==="+"))f=b;else{const E=Number(b);!u&&E?u=E:d===-1&&(d=n+v)}}d!==-1&&s(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let p=!1,m="",y=a.length;for(let v=1;v<e.length;++v){const b=e[v];switch(b.type){case"space":p=!0;case"newline":y+=b.source.length;break;case"comment":i&&!p&&s(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=b.source.length,m=b.source.substring(1);break;case"error":s(b,"UNEXPECTED_TOKEN",b.message),y+=b.source.length;break;default:{const E=`Unexpected token in block scalar header: ${b.type}`;s(b,"UNEXPECTED_TOKEN",E);const x=b.source;x&&typeof x=="string"&&(y+=x.length)}}}return{mode:o,indent:u,chomp:f,comment:m,length:y}}function pN(n){const e=n.split(/\n( *)/),i=e[0],s=i.match(/^( *)/),o=[s!=null&&s[1]?[s[1],i.slice(s[1].length)]:["",i]];for(let u=1;u<e.length;u+=2)o.push([e[u],e[u+1]]);return o}function lS(n,e,i){const{offset:s,type:a,source:o,end:u}=n;let f,d;const p=(v,b,E)=>i(s+v,b,E);switch(a){case"scalar":f=he.PLAIN,d=gN(o,p);break;case"single-quoted-scalar":f=he.QUOTE_SINGLE,d=mN(o,p);break;case"double-quoted-scalar":f=he.QUOTE_DOUBLE,d=yN(o,p);break;default:return i(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[s,s+o.length,s+o.length]}}const m=s+o.length,y=ul(u,m,e,i);return{value:d,type:f,comment:y.comment,range:[s,m,y.offset]}}function gN(n,e){let i="";switch(n[0]){case" ":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${n[0]}`;break}case"@":case"`":{i=`reserved character ${n[0]}`;break}}return i&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),oS(n)}function mN(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),oS(n.slice(1,-1)).replace(/''/g,"'")}function oS(n){let e,i;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
212
|
+
`,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
213
|
+
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(n);if(!s)return n;let a=s[1],o=" ",u=e.lastIndex;for(i.lastIndex=u;s=i.exec(n);)s[1]===""?o===`
|
|
214
|
+
`?a+=o:o=`
|
|
215
|
+
`:(a+=o+s[1],o=" "),u=i.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=u,s=f.exec(n),a+o+((s==null?void 0:s[1])??"")}function yN(n,e){let i="";for(let s=1;s<n.length-1;++s){const a=n[s];if(!(a==="\r"&&n[s+1]===`
|
|
216
|
+
`))if(a===`
|
|
217
|
+
`){const{fold:o,offset:u}=bN(n,s);i+=o,s=u}else if(a==="\\"){let o=n[++s];const u=vN[o];if(u)i+=u;else if(o===`
|
|
218
|
+
`)for(o=n[s+1];o===" "||o===" ";)o=n[++s+1];else if(o==="\r"&&n[s+1]===`
|
|
219
|
+
`)for(o=n[++s+1];o===" "||o===" ";)o=n[++s+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];i+=SN(n,s+1,f,e),s+=f}else{const f=n.substr(s-1,2);e(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),i+=f}}else if(a===" "||a===" "){const o=s;let u=n[s+1];for(;u===" "||u===" ";)u=n[++s+1];u!==`
|
|
220
|
+
`&&!(u==="\r"&&n[s+2]===`
|
|
221
|
+
`)&&(i+=s>o?n.slice(o,s+1):a)}else i+=a}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),i}function bN(n,e){let i="",s=n[e+1];for(;(s===" "||s===" "||s===`
|
|
222
|
+
`||s==="\r")&&!(s==="\r"&&n[e+2]!==`
|
|
223
|
+
`);)s===`
|
|
224
|
+
`&&(i+=`
|
|
225
|
+
`),e+=1,s=n[e+1];return i||(i=" "),{fold:i,offset:e}}const vN={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
226
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function SN(n,e,i,s){const a=n.substr(e,i),u=a.length===i&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;if(isNaN(u)){const f=n.substr(e-2,i+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(u)}function cS(n,e,i,s){const{value:a,type:o,comment:u,range:f}=e.type==="block-scalar"?aS(n,e,s):lS(e,n.options.strict,s),d=i?n.directives.tagName(i.source,y=>s(i,"TAG_RESOLVE_FAILED",y)):null;let p;n.options.stringKeys&&n.atKey?p=n.schema[Tn]:d?p=wN(n.schema,a,d,i,s):e.type==="scalar"?p=xN(n,a,e,s):p=n.schema[Tn];let m;try{const y=p.resolve(a,v=>s(i??e,"TAG_RESOLVE_FAILED",v),n.options);m=Oe(y)?y:new he(y)}catch(y){const v=y instanceof Error?y.message:String(y);s(i??e,"TAG_RESOLVE_FAILED",v),m=new he(a)}return m.range=f,m.source=a,o&&(m.type=o),d&&(m.tag=d),p.format&&(m.format=p.format),u&&(m.comment=u),m}function wN(n,e,i,s,a){var f;if(i==="!")return n[Tn];const o=[];for(const d of n.tags)if(!d.collection&&d.tag===i)if(d.default&&d.test)o.push(d);else return d;for(const d of o)if((f=d.test)!=null&&f.test(e))return d;const u=n.knownTags[i];return u&&!u.collection?(n.tags.push(Object.assign({},u,{default:!1,test:void 0})),u):(a(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),n[Tn])}function xN({atKey:n,directives:e,schema:i},s,a,o){const u=i.tags.find(f=>{var d;return(f.default===!0||n&&f.default==="key")&&((d=f.test)==null?void 0:d.test(s))})||i[Tn];if(i.compat){const f=i.compat.find(d=>{var p;return d.default&&((p=d.test)==null?void 0:p.test(s))})??i[Tn];if(u.tag!==f.tag){const d=e.tagString(u.tag),p=e.tagString(f.tag),m=`Value may be parsed as either ${d} or ${p}`;o(a,"TAG_RESOLVE_FAILED",m,!0)}}return u}function _N(n,e,i){if(e){i===null&&(i=e.length);for(let s=i-1;s>=0;--s){let a=e[s];switch(a.type){case"space":case"comment":case"newline":n-=a.source.length;continue}for(a=e[++s];(a==null?void 0:a.type)==="space";)n+=a.source.length,a=e[++s];break}}return n}const TN={composeNode:uS,composeEmptyNode:Od};function uS(n,e,i,s){const a=n.atKey,{spaceBefore:o,comment:u,anchor:f,tag:d}=i;let p,m=!0;switch(e.type){case"alias":p=EN(n,e,s),(f||d)&&s(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":p=cS(n,e,d,s),f&&(p.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=hN(TN,n,e,i,s),f&&(p.anchor=f.source.substring(1));break;default:{const y=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",y),p=Od(n,e.offset,void 0,null,i,s),m=!1}}return f&&p.anchor===""&&s(f,"BAD_ALIAS","Anchor cannot be an empty string"),a&&n.options.stringKeys&&(!Oe(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&s(d??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(p.spaceBefore=!0),u&&(e.type==="scalar"&&e.source===""?p.comment=u:p.commentBefore=u),n.options.keepSourceTokens&&m&&(p.srcToken=e),p}function Od(n,e,i,s,{spaceBefore:a,comment:o,anchor:u,tag:f,end:d},p){const m={type:"scalar",offset:_N(e,i,s),indent:-1,source:""},y=cS(n,m,f,p);return u&&(y.anchor=u.source.substring(1),y.anchor===""&&p(u,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(y.spaceBefore=!0),o&&(y.comment=o,y.range[2]=d),y}function EN({options:n},{offset:e,source:i,end:s},a){const o=new yc(i.substring(1));o.source===""&&a(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&a(e+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const u=e+i.length,f=ul(s,u,n.strict,a);return o.range=[e,u,f.offset],f.comment&&(o.comment=f.comment),o}function AN(n,e,{offset:i,start:s,value:a,end:o},u){const f=Object.assign({_directives:e},n),d=new Mr(void 0,f),p={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},m=Sr(s,{indicator:"doc-start",next:a??(o==null?void 0:o[0]),offset:i,onError:u,parentIndent:0,startOnNewline:!0});m.found&&(d.directives.docStart=!0,a&&(a.type==="block-map"||a.type==="block-seq")&&!m.hasNewline&&u(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=a?uS(p,a,m,u):Od(p,m.end,s,null,m,u);const y=d.contents.range[2],v=ul(o,y,!1,u);return v.comment&&(d.comment=v.comment),d.range=[i,y,v.offset],d}function Ba(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];const{offset:e,source:i}=n;return[e,e+(typeof i=="string"?i.length:1)]}function Tb(n){var a;let e="",i=!1,s=!1;for(let o=0;o<n.length;++o){const u=n[o];switch(u[0]){case"#":e+=(e===""?"":s?`
|
|
227
|
+
|
|
228
|
+
`:`
|
|
229
|
+
`)+(u.substring(1)||" "),i=!0,s=!1;break;case"%":((a=n[o+1])==null?void 0:a[0])!=="#"&&(o+=1),i=!1;break;default:i||(s=!0),i=!1}}return{comment:e,afterEmptyLine:s}}class Ld{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,s,a,o)=>{const u=Ba(i);o?this.warnings.push(new sS(u,s,a)):this.errors.push(new rs(u,s,a))},this.directives=new St({version:e.version||"1.2"}),this.options=e}decorate(e,i){const{comment:s,afterEmptyLine:a}=Tb(this.prelude);if(s){const o=e.contents;if(i)e.comment=e.comment?`${e.comment}
|
|
230
|
+
${s}`:s;else if(a||e.directives.docStart||!o)e.commentBefore=s;else if(ze(o)&&!o.flow&&o.items.length>0){let u=o.items[0];De(u)&&(u=u.key);const f=u.commentBefore;u.commentBefore=f?`${s}
|
|
231
|
+
${f}`:s}else{const u=o.commentBefore;o.commentBefore=u?`${s}
|
|
232
|
+
${u}`:s}}i?(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:Tb(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,s=-1){for(const a of e)yield*this.next(a);yield*this.end(i,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(i,s,a)=>{const o=Ba(e);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",s,a)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const i=AN(this.options,this.directives,e,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const i=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new rs(Ba(e),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new rs(Ba(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const i=ul(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const s=this.doc.comment;this.doc.comment=s?`${s}
|
|
233
|
+
${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new rs(Ba(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,i=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),a=new Mr(void 0,s);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,i,i],this.decorate(a,!1),yield a}}}function NN(n,e=!0,i){if(n){const s=(a,o,u)=>{const f=typeof a=="number"?a:Array.isArray(a)?a[0]:a.offset;if(i)i(f,o,u);else throw new rs([f,f+1],o,u)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return lS(n,e,s);case"block-scalar":return aS({options:{strict:e}},n,s)}}return null}function CN(n,e){const{implicitKey:i=!1,indent:s,inFlow:a=!1,offset:o=-1,type:u="PLAIN"}=e,f=ol({type:u,value:n},{implicitKey:i,indent:s>0?" ".repeat(s):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:s,source:`
|
|
234
|
+
`}];switch(f[0]){case"|":case">":{const p=f.indexOf(`
|
|
235
|
+
`),m=f.substring(0,p),y=f.substring(p+1)+`
|
|
236
|
+
`,v=[{type:"block-scalar-header",offset:o,indent:s,source:m}];return fS(v,d)||v.push({type:"newline",offset:-1,indent:s,source:`
|
|
237
|
+
`}),{type:"block-scalar",offset:o,indent:s,props:v,source:y}}case'"':return{type:"double-quoted-scalar",offset:o,indent:s,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:o,indent:s,source:f,end:d};default:return{type:"scalar",offset:o,indent:s,source:f,end:d}}}function kN(n,e,i={}){let{afterKey:s=!1,implicitKey:a=!1,inFlow:o=!1,type:u}=i,f="indent"in n?n.indent:null;if(s&&typeof f=="number"&&(f+=2),!u)switch(n.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const p=n.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const d=ol({type:u,value:e},{implicitKey:a||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":MN(n,d);break;case'"':ph(n,d,"double-quoted-scalar");break;case"'":ph(n,d,"single-quoted-scalar");break;default:ph(n,d,"scalar")}}function MN(n,e){const i=e.indexOf(`
|
|
238
|
+
`),s=e.substring(0,i),a=e.substring(i+1)+`
|
|
239
|
+
`;if(n.type==="block-scalar"){const o=n.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=s,n.source=a}else{const{offset:o}=n,u="indent"in n?n.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:u,source:s}];fS(f,"end"in n?n.end:void 0)||f.push({type:"newline",offset:-1,indent:u,source:`
|
|
240
|
+
`});for(const d of Object.keys(n))d!=="type"&&d!=="offset"&&delete n[d];Object.assign(n,{type:"block-scalar",indent:u,props:f,source:a})}}function fS(n,e){if(e)for(const i of e)switch(i.type){case"space":case"comment":n.push(i);break;case"newline":return n.push(i),!0}return!1}function ph(n,e,i){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=i,n.source=e;break;case"block-scalar":{const s=n.props.slice(1);let a=e.length;n.props[0].type==="block-scalar-header"&&(a-=n.props[0].source.length);for(const o of s)o.offset+=a;delete n.props,Object.assign(n,{type:i,source:e,end:s});break}case"block-map":case"block-seq":{const a={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
|
|
241
|
+
`};delete n.items,Object.assign(n,{type:i,source:e,end:[a]});break}default:{const s="indent"in n?n.indent:-1,a="end"in n&&Array.isArray(n.end)?n.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(n))o!=="type"&&o!=="offset"&&delete n[o];Object.assign(n,{type:i,indent:s,source:e,end:a})}}}const ON=n=>"type"in n?oc(n):Xo(n);function oc(n){switch(n.type){case"block-scalar":{let e="";for(const i of n.props)e+=oc(i);return e+n.source}case"block-map":case"block-seq":{let e="";for(const i of n.items)e+=Xo(i);return e}case"flow-collection":{let e=n.start.source;for(const i of n.items)e+=Xo(i);for(const i of n.end)e+=i.source;return e}case"document":{let e=Xo(n);if(n.end)for(const i of n.end)e+=i.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const i of n.end)e+=i.source;return e}}}function Xo({start:n,key:e,sep:i,value:s}){let a="";for(const o of n)a+=o.source;if(e&&(a+=oc(e)),i)for(const o of i)a+=o.source;return s&&(a+=oc(s)),a}const Uh=Symbol("break visit"),LN=Symbol("skip children"),hS=Symbol("remove item");function ls(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),dS(Object.freeze([]),n,e)}ls.BREAK=Uh;ls.SKIP=LN;ls.REMOVE=hS;ls.itemAtPath=(n,e)=>{let i=n;for(const[s,a]of e){const o=i==null?void 0:i[s];if(o&&"items"in o)i=o.items[a];else return}return i};ls.parentCollection=(n,e)=>{const i=ls.itemAtPath(n,e.slice(0,-1)),s=e[e.length-1][0],a=i==null?void 0:i[s];if(a&&"items"in a)return a;throw new Error("Parent collection not found")};function dS(n,e,i){let s=i(e,n);if(typeof s=="symbol")return s;for(const a of["key","value"]){const o=e[a];if(o&&"items"in o){for(let u=0;u<o.items.length;++u){const f=dS(Object.freeze(n.concat([[a,u]])),o.items[u],i);if(typeof f=="number")u=f-1;else{if(f===Uh)return Uh;f===hS&&(o.items.splice(u,1),u-=1)}}typeof s=="function"&&a==="key"&&(s=s(e,n))}}return typeof s=="function"?s(e,n):s}const Nc="\uFEFF",Cc="",kc="",rl="",RN=n=>!!n&&"items"in n,jN=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function DN(n){switch(n){case Nc:return"<BOM>";case Cc:return"<DOC>";case kc:return"<FLOW_END>";case rl:return"<SCALAR>";default:return JSON.stringify(n)}}function pS(n){switch(n){case Nc:return"byte-order-mark";case Cc:return"doc-mode";case kc:return"flow-error-end";case rl:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
242
|
+
`:case`\r
|
|
243
|
+
`: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(n[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 BN=Object.freeze(Object.defineProperty({__proto__:null,BOM:Nc,DOCUMENT:Cc,FLOW_END:kc,SCALAR:rl,createScalarToken:CN,isCollection:RN,isScalar:jN,prettyToken:DN,resolveAsScalar:NN,setScalarValue:kN,stringify:ON,tokenType:pS,visit:ls},Symbol.toStringTag,{value:"Module"}));function dn(n){switch(n){case void 0:case" ":case`
|
|
244
|
+
`:case"\r":case" ":return!0;default:return!1}}const Eb=new Set("0123456789ABCDEFabcdef"),UN=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ro=new Set(",[]{}"),zN=new Set(` ,[]{}
|
|
245
|
+
\r `),gh=n=>!n||zN.has(n);class gS{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,i=!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=!i;let s=this.next??"stream";for(;s&&(i||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,i=this.buffer[e];for(;i===" "||i===" ";)i=this.buffer[++e];return!i||i==="#"||i===`
|
|
246
|
+
`?!0:i==="\r"?this.buffer[e+1]===`
|
|
247
|
+
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let i=this.buffer[e];if(this.indentNext>0){let s=0;for(;i===" ";)i=this.buffer[++s+e];if(i==="\r"){const a=this.buffer[s+e+1];if(a===`
|
|
248
|
+
`||!a&&!this.atEnd)return e+s+1}return i===`
|
|
249
|
+
`||s>=this.indentNext||!i&&!this.atEnd?e+s:-1}if(i==="-"||i==="."){const s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&dn(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(`
|
|
250
|
+
`,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]===Nc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let i=e.length,s=e.indexOf("#");for(;s!==-1;){const o=e[s-1];if(o===" "||o===" "){i=s-1;break}else s=e.indexOf("#",s+1)}for(;;){const o=e[i-1];if(o===" "||o===" ")i-=1;else break}const a=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-a),this.pushNewline(),"stream"}if(this.atLineEnd()){const i=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-i),yield*this.pushNewline(),"stream"}return yield Cc,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 i=this.peek(3);if((i==="---"||i==="...")&&dn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,i==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!dn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&dn(i)){const s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let i=yield*this.pushIndicators();switch(e[i]){case"#":yield*this.pushCount(e.length-i);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(gh),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return i+=yield*this.parseBlockScalarHeader(),i+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-i),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,i,s=-1;do e=yield*this.pushNewline(),e>0?(i=yield*this.pushSpaces(!1),this.indentValue=s=i):i=0,i+=yield*this.pushSpaces(!0);while(e+i>0);const a=this.getLine();if(a===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&a[0]!=="#"||s===0&&(a.startsWith("---")||a.startsWith("..."))&&dn(a[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(a[0]==="]"||a[0]==="}")))return this.flowLevel=0,yield kc,yield*this.parseLineStart();let o=0;for(;a[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),a[o]){case void 0:return"flow";case"#":return yield*this.pushCount(a.length-o),"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(gh),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const u=this.charAt(1);if(this.flowKey||dn(u)||u===",")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 i=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;i!==-1&&this.buffer[i+1]==="'";)i=this.buffer.indexOf("'",i+2);else for(;i!==-1;){let o=0;for(;this.buffer[i-1-o]==="\\";)o+=1;if(o%2===0)break;i=this.buffer.indexOf('"',i+1)}const s=this.buffer.substring(0,i);let a=s.indexOf(`
|
|
251
|
+
`,this.pos);if(a!==-1){for(;a!==-1;){const o=this.continueScalar(a+1);if(o===-1)break;a=s.indexOf(`
|
|
252
|
+
`,o)}a!==-1&&(i=a-(s[a-1]==="\r"?2:1))}if(i===-1){if(!this.atEnd)return this.setNext("quoted-scalar");i=this.buffer.length}return yield*this.pushToIndex(i+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const i=this.buffer[++e];if(i==="+")this.blockScalarKeep=!0;else if(i>"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>dn(i)||i==="#")}*parseBlockScalar(){let e=this.pos-1,i=0,s;e:for(let o=this.pos;s=this.buffer[o];++o)switch(s){case" ":i+=1;break;case`
|
|
253
|
+
`:e=o,i=0;break;case"\r":{const u=this.buffer[o+1];if(!u&&!this.atEnd)return this.setNext("block-scalar");if(u===`
|
|
254
|
+
`)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=i:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(e+1);if(o===-1)break;e=this.buffer.indexOf(`
|
|
255
|
+
`,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let a=e+1;for(s=this.buffer[a];s===" ";)s=this.buffer[++a];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
|
|
256
|
+
`;)s=this.buffer[++a];e=a-1}else if(!this.blockScalarKeep)do{let o=e-1,u=this.buffer[o];u==="\r"&&(u=this.buffer[--o]);const f=o;for(;u===" ";)u=this.buffer[--o];if(u===`
|
|
257
|
+
`&&o>=this.pos&&o+1+i>f)e=o;else break}while(!0);return yield rl,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let i=this.pos-1,s=this.pos-1,a;for(;a=this.buffer[++s];)if(a===":"){const o=this.buffer[s+1];if(dn(o)||e&&Ro.has(o))break;i=s}else if(dn(a)){let o=this.buffer[s+1];if(a==="\r"&&(o===`
|
|
258
|
+
`?(s+=1,a=`
|
|
259
|
+
`,o=this.buffer[s+1]):i=s),o==="#"||e&&Ro.has(o))break;if(a===`
|
|
260
|
+
`){const u=this.continueScalar(s+1);if(u===-1)break;s=Math.max(s,u-2)}}else{if(e&&Ro.has(a))break;i=s}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield rl,yield*this.pushToIndex(i+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,i){const s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(gh))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,i=this.charAt(1);if(dn(i)||e&&Ro.has(i))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,i=this.buffer[e];for(;!dn(i)&&i!==">";)i=this.buffer[++e];return yield*this.pushToIndex(i===">"?e+1:e,!1)}else{let e=this.pos+1,i=this.buffer[e];for(;i;)if(UN.has(i))i=this.buffer[++e];else if(i==="%"&&Eb.has(this.buffer[e+1])&&Eb.has(this.buffer[e+2]))i=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
|
|
261
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
262
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let i=this.pos-1,s;do s=this.buffer[++i];while(s===" "||e&&s===" ");const a=i-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=i),a}*pushUntil(e){let i=this.pos,s=this.buffer[i];for(;!e(s);)s=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class mS{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,s=this.lineStarts.length;for(;i<s;){const o=i+s>>1;this.lineStarts[o]<e?i=o+1:s=o}if(this.lineStarts[i]===e)return{line:i+1,col:1};if(i===0)return{line:0,col:e};const a=this.lineStarts[i-1];return{line:i,col:e-a+1}}}}function ns(n,e){for(let i=0;i<n.length;++i)if(n[i].type===e)return!0;return!1}function Ab(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function yS(n){switch(n==null?void 0:n.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function jo(n){switch(n.type){case"document":return n.start;case"block-map":{const e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function rr(n){var i;if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((i=n[++e])==null?void 0:i.type)==="space";);return n.splice(e,n.length)}function Nb(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!ns(e.start,"explicit-key-ind")&&!ns(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,yS(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 Rd{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 gS,this.onNewLine=e}*parse(e,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,i))yield*this.next(s);i||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const i=pS(e);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){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 s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,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||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 i=e??this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield i;else{const s=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in s?s.indent:0:i.type==="flow-collection"&&s.type==="document"&&(i.indent=0),i.type==="flow-collection"&&Nb(i),s.type){case"document":s.value=i;break;case"block-scalar":s.props.push(i);break;case"block-map":{const a=s.items[s.items.length-1];if(a.value){s.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(a.sep)a.value=i;else{Object.assign(a,{key:i,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{const a=s.items[s.items.length-1];a.value?s.items.push({start:[],value:i}):a.value=i;break}case"flow-collection":{const a=s.items[s.items.length-1];!a||a.value?s.items.push({start:[],key:i,sep:[]}):a.sep?a.value=i:Object.assign(a,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const a=i.items[i.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&Ab(a.start)===-1&&(i.indent===0||a.start.every(o=>o.type!=="comment"||o.indent<i.indent))&&(s.type==="document"?s.end=a.start:s.items.push({start:a.start}),i.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":{Ab(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 i=this.startBlockValue(e);i?this.stack.push(i):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 i=jo(this.peek(2)),s=rr(i);let a;e.end?(a=e.end,a.push(this.sourceToken),delete e.end):a=[this.sourceToken];const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}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 i=this.source.indexOf(`
|
|
263
|
+
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
|
|
264
|
+
`,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var s;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){const a="end"in i.value?i.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,e.indent)){const a=e.items[e.items.length-2],o=(s=a==null?void 0:a.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const a=!this.onKeyLine&&this.indent===e.indent,o=a&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(o&&i.sep&&!i.value){const f=[];for(let d=0;d<i.sep.length;++d){const p=i.sep[d];switch(p.type){case"newline":f.push(d);break;case"space":break;case"comment":p.indent>e.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(u=i.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||i.value?(u.push(this.sourceToken),e.items.push({start:u}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):o||i.value?(u.push(this.sourceToken),e.items.push({start:u,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(i.explicitKey)if(i.sep)if(i.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ns(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(yS(i.key)&&!ns(i.sep,"newline")){const f=rr(i.start),d=i.key,p=i.sep;p.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:d,sep:p}]})}else u.length>0?i.sep=i.sep.concat(u,this.sourceToken):i.sep.push(this.sourceToken);else if(ns(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const f=rr(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||o?e.items.push({start:u,key:null,sep:[this.sourceToken]}):ns(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);o||i.value?(e.items.push({start:u,key:f,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(f):(Object.assign(i,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(e);if(f){a&&f.type!=="block-seq"&&e.items.push({start:u}),this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var s;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(i.value){const a="end"in i.value?i.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,e.indent)){const a=e.items[e.items.length-2],o=(s=a==null?void 0:a.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=e.indent)break;i.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;i.value||ns(i.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>e.indent){const a=this.startBlockValue(e);if(a){this.stack.push(a);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const i=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s&&s.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!i||i.sep?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return;case"map-value-ind":!i||i.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!i||i.value?e.items.push({start:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);!i||i.value?e.items.push({start:[],key:a,sep:[]}):i.sep?this.stack.push(a):Object.assign(i,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const a=jo(s),o=rr(a);Nb(e);const u=e.end.splice(1,e.end.length);u.push(this.sourceToken);const f={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:u}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=f}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let i=this.source.indexOf(`
|
|
265
|
+
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
|
|
266
|
+
`,i)+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 i=jo(e),s=rr(i);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=jo(e),s=rr(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(s=>s.type==="newline"||s.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 bS(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new mS||null,prettyErrors:e}}function HN(n,e={}){const{lineCounter:i,prettyErrors:s}=bS(e),a=new Rd(i==null?void 0:i.addNewLine),o=new Ld(e),u=Array.from(o.compose(a.parse(n)));if(s&&i)for(const f of u)f.errors.forEach(lc(n,i)),f.warnings.forEach(lc(n,i));return u.length>0?u:Object.assign([],{empty:!0},o.streamInfo())}function vS(n,e={}){const{lineCounter:i,prettyErrors:s}=bS(e),a=new Rd(i==null?void 0:i.addNewLine),o=new Ld(e);let u=null;for(const f of o.compose(a.parse(n),!0,n.length))if(!u)u=f;else if(u.options.logLevel!=="silent"){u.errors.push(new rs(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&i&&(u.errors.forEach(lc(n,i)),u.warnings.forEach(lc(n,i))),u}function qN(n,e,i){let s;typeof e=="function"?s=e:i===void 0&&e&&typeof e=="object"&&(i=e);const a=vS(n,i);if(!a)return null;if(a.warnings.forEach(o=>Hv(a.options.logLevel,o)),a.errors.length>0){if(a.options.logLevel!=="silent")throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:s},i))}function $N(n,e,i){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:i===void 0&&e&&(i=e),typeof i=="string"&&(i=i.length),typeof i=="number"){const a=Math.round(i);i=a<1?void 0:a>8?{indent:8}:{indent:a}}if(n===void 0){const{keepUndefined:a}=i??e??{};if(!a)return}return fs(n)&&!s?n.toString(i):new Mr(n,s,i).toString(i)}const SS=Object.freeze(Object.defineProperty({__proto__:null,Alias:yc,CST:BN,Composer:Ld,Document:Mr,Lexer:gS,LineCounter:mS,Pair:gt,Parser:Rd,Scalar:he,Schema:Ac,YAMLError:Md,YAMLMap:It,YAMLParseError:rs,YAMLSeq:Ci,YAMLWarning:sS,isAlias:us,isCollection:ze,isDocument:fs,isMap:Ar,isNode:He,isPair:De,isScalar:Oe,isSeq:Nr,parse:qN,parseAllDocuments:HN,parseDocument:vS,stringify:$N,visit:Ni,visitAsync:mc},Symbol.toStringTag,{value:"Module"})),IN=({action:n,model:e,sdkLanguage:i,testIdAttributeName:s,isInspecting:a,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})=>{const[d,p]=z.useState("action"),[m]=sn("shouldPopulateCanvasFromScreenshot",!1),y=z.useMemo(()=>YN(n),[n]),{snapshotInfoUrl:v,snapshotUrl:b,popoutUrl:E}=z.useMemo(()=>{const _=y[d];return e&&_?XN(e.traceUri,_,m):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[y,d,m,e]),x=z.useMemo(()=>v!==void 0?{snapshotInfoUrl:v,snapshotUrl:b,popoutUrl:E}:void 0,[v,b,E]);return S.jsxs("div",{className:"snapshot-tab vbox",children:[S.jsxs(Xh,{children:[S.jsx(jt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:a,onClick:()=>o(!a)}),S.jsx("div",{className:"hbox",style:{height:"100%"},role:"tablist",children:["action","before","after"].map(_=>S.jsx(w0,{id:_,title:KN(_),selected:d===_,onSelect:()=>p(_)},_))}),S.jsx("div",{style:{flex:"auto"}}),S.jsx(jt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(x!=null&&x.popoutUrl),onClick:()=>{const _=window.open((x==null?void 0:x.popoutUrl)||"","_blank");_==null||_.addEventListener("DOMContentLoaded",()=>{new xv(_,{isUnderTest:xS,sdkLanguage:i,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),S.jsx(VN,{snapshotUrls:x,sdkLanguage:i,testIdAttributeName:s,isInspecting:a,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})]})},VN=({snapshotUrls:n,sdkLanguage:e,testIdAttributeName:i,isInspecting:s,setIsInspecting:a,highlightedElement:o,setHighlightedElement:u})=>{const f=z.useRef(null),d=z.useRef(null),[p,m]=z.useState({viewport:_S,url:""}),y=z.useRef({iteration:0,visibleIframe:0});return z.useEffect(()=>{(async()=>{const v=y.current.iteration+1,b=1-y.current.visibleIframe;y.current.iteration=v;const E=await PN(n==null?void 0:n.snapshotInfoUrl);if(y.current.iteration!==v)return;const x=[f,d][b].current;if(x){let _=()=>{};const N=new Promise(k=>_=k);try{x.addEventListener("load",_),x.addEventListener("error",_);const k=(n==null?void 0:n.snapshotUrl)||FN;x.contentWindow?x.contentWindow.location.replace(k):x.src=k,await N}catch{}finally{x.removeEventListener("load",_),x.removeEventListener("error",_)}}y.current.iteration===v&&(y.current.visibleIframe=b,m(E))})()},[n]),S.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:v=>{v.key==="Escape"&&s&&a(!1)},children:[S.jsx(Cb,{isInspecting:s,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:f.current,iteration:y.current.iteration}),S.jsx(Cb,{isInspecting:s,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:d.current,iteration:y.current.iteration}),S.jsx(GN,{snapshotInfo:p,children:S.jsxs("div",{className:"snapshot-switcher",children:[S.jsx("iframe",{ref:f,name:"snapshot",title:"DOM Snapshot",className:Ke(y.current.visibleIframe===0&&"snapshot-visible")}),S.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:Ke(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},GN=({snapshotInfo:n,children:e})=>{const[i,s]=os(),a=40,o={width:n.viewport.width,height:n.viewport.height},u={width:Math.max(o.width,480),height:Math.max(o.height+a,320)},f=Math.min(i.width/u.width,i.height/u.height,1),d={x:(i.width-u.width)/2,y:(i.height-u.height)/2};return S.jsx("div",{ref:s,className:"snapshot-wrapper",children:S.jsxs("div",{className:"snapshot-container",style:{width:u.width+"px",height:u.height+"px",transform:`translate(${d.x}px, ${d.y}px) scale(${f})`},children:[S.jsx(LA,{url:n.url}),S.jsx("div",{className:"snapshot-browser-body",children:S.jsx("div",{style:{width:o.width+"px",height:o.height+"px"},children:e})})]})})};function KN(n){return n==="before"?"Before":n==="after"?"After":n==="action"?"Action":n}const Cb=({iframe:n,isInspecting:e,sdkLanguage:i,testIdAttributeName:s,highlightedElement:a,setHighlightedElement:o,iteration:u})=>(z.useEffect(()=>{const f=a.lastEdited==="ariaSnapshot"?a.ariaSnapshot:void 0,d=a.lastEdited==="locator"?a.locator:void 0,p=!!f||!!d||e,m=[],y=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{wS(m,p,i,s,y,"",n==null?void 0:n.contentWindow)}catch{}const v=f?Ph(SS,f):void 0,b=d?MA(i,d,s):void 0;for(const{recorder:E,frameSelector:x}of m){const _=b!=null&&b.startsWith(x)?b.substring(x.length).trim():void 0,N=(v==null?void 0:v.errors.length)===0?v.fragment:void 0;E.setUIState({mode:e?"inspecting":"none",actionSelector:_,ariaTemplate:N,language:i,testIdAttributeName:s,overlay:{offsetX:0}},{async elementPicked(k){o({locator:Ti(i,x+k.selector),ariaSnapshot:k.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const k of m)k.recorder!==E&&k.recorder.clearHighlight()}})}},[n,e,a,o,i,s,u]),S.jsx(S.Fragment,{}));function wS(n,e,i,s,a,o,u){if(!u)return;const f=u;if(!f._recorder&&e){const d=new xv(u,{isUnderTest:a,sdkLanguage:i,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}),p=new EA(d);f._injectedScript=d,f._recorder={recorder:p,frameSelector:o},a&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(p)))}f._recorder&&n.push(f._recorder);for(let d=0;d<u.frames.length;++d){const p=u.frames[d],m=p.frameElement?f._injectedScript.generateSelectorSimple(p.frameElement,{omitInternalEngines:!0,testIdAttributeName:s})+" >> internal:control=enter-frame >> ":"";wS(n,e,i,s,a,o+m,p)}}const Ua=(n,e,i=!1)=>{if(!n)return;const s=n[e];if(s){if(!n.pageId){console.error("snapshot action must have a pageId");return}return{action:n,snapshotName:s,pageId:n.pageId,point:n.point,hasInputTarget:i}}};function YN(n){if(!n)return{};let e=Ua(n,"beforeSnapshot");if(!e){for(let a=Dy(n);a;a=Dy(a))if(a.endTime<=n.startTime&&a.afterSnapshot){e=Ua(a,"afterSnapshot");break}}let i=Ua(n,"afterSnapshot");if(!i){let a;for(let o=By(n);o&&o.startTime<=n.endTime;o=By(o))o.endTime>n.endTime||!o.afterSnapshot||a&&a.endTime>o.endTime||(a=o);a?i=Ua(a,"afterSnapshot"):i=e}const s=Ua(n,"inputSnapshot",!0)??i;return s&&(s.point=n.point),{action:s,before:e,after:i}}const xS=new URLSearchParams(window.location.search).has("isUnderTest");function XN(n,e,i){const s=new URLSearchParams;s.set("trace",n),s.set("name",e.snapshotName),xS&&s.set("isUnderTest","true"),e.point&&(s.set("pointX",String(e.point.x)),s.set("pointY",String(e.point.y)),e.hasInputTarget&&s.set("hasInputTarget","1")),i&&s.set("shouldPopulateCanvasFromScreenshot","1");const a=new URL(`snapshot/${e.pageId}?${s.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${e.pageId}?${s.toString()}`,window.location.href).toString(),u=new URLSearchParams;u.set("r",a),u.set("trace",n);const f=new URL(`snapshot.html?${u.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:a,popoutUrl:f}}async function PN(n){const e={url:"",viewport:_S,timestamp:void 0,wallTime:void 0};if(n){const s=await(await fetch(n)).json();s.error||(e.url=s.url,e.viewport=s.viewport,e.timestamp=s.timestamp,e.wallTime=s.wallTime)}return e}const _S={width:1280,height:720},FN='data:text/html,<body style="background: #ddd"></body>',TS={width:200,height:45},or=2.5,QN=TS.height+or*2,ZN=({boundaries:n,previewPoint:e})=>{var m,y;const i=Fn(),[s,a]=os(),o=z.useRef(null);let u=0;if(o.current&&e){const v=o.current.getBoundingClientRect();u=(e.clientY-v.top+o.current.scrollTop)/QN|0}const f=(y=(m=i==null?void 0:i.pages)==null?void 0:m[u])==null?void 0:y.screencastFrames;let d,p;if(e!==void 0&&f&&f.length){const v=n.minimum+(n.maximum-n.minimum)*e.x/s.width;d=f[Mb(f,v,ES)-1];const b={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};p=d?AS({width:d.width,height:d.height},b):void 0}return S.jsxs("div",{className:"film-strip",ref:a,children:[S.jsx("div",{className:"film-strip-lanes",ref:o,children:i==null?void 0:i.pages.map((v,b)=>v.screencastFrames.length?S.jsx(JN,{boundaries:n,page:v,width:s.width},b):null)}),i&&(e==null?void 0:e.x)!==void 0&&S.jsxs("div",{className:"film-strip-hover",style:{top:s.bottom+5,left:Math.min(e.x,s.width-(p?p.width:0)-10)},children:[e.action&&S.jsx("div",{className:"film-strip-hover-title",children:Kh(e.action,e)}),d&&p&&S.jsx("div",{style:{width:p.width,height:p.height},children:S.jsx("img",{src:i.createRelativeUrl(`sha1/${d.sha1}`),width:p.width,height:p.height})})]})]})},JN=({boundaries:n,page:e,width:i})=>{const s=Fn(),a={width:0,height:0},o=e.screencastFrames;for(const _ of o)a.width=Math.max(a.width,_.width),a.height=Math.max(a.height,_.height);const u=AS(a,TS),f=o[0].timestamp,d=o[o.length-1].timestamp,p=n.maximum-n.minimum,m=(f-n.minimum)/p*i,y=(n.maximum-d)/p*i,b=(d-f)/p*i/(u.width+2*or)|0,E=(d-f)/b,x=[];for(let _=0;f&&E&&_<b;++_){const N=f+E*_,k=Mb(o,N,ES)-1;x.push(S.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${s==null?void 0:s.createRelativeUrl("sha1/"+o[k].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:or,marginRight:or}},_))}return x.push(S.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${s==null?void 0:s.createRelativeUrl("sha1/"+o[o.length-1].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:or,marginRight:or}},x.length)),S.jsx("div",{className:"film-strip-lane",style:{marginLeft:m+"px",marginRight:y+"px"},children:x})};function ES(n,e){return n-e.timestamp}function AS(n,e){const i=Math.max(n.width/e.width,n.height/e.height);return{width:n.width/i|0,height:n.height/i|0}}const WN=({model:n,boundaries:e,consoleEntries:i,networkResources:s,onSelected:a,highlightedAction:o,highlightedResourceOrdinal:u,highlightedConsoleEntryOrdinal:f,selectedTime:d,setSelectedTime:p,sdkLanguage:m})=>{const[y,v]=os(),[b,E]=z.useState(),[x,_]=z.useState(),[N]=sn("actionsFilter",[]),{offsets:k,curtainLeft:$,curtainRight:V}=z.useMemo(()=>{let F=d||e;if(b&&b.startX!==b.endX){const Q=wn(y.width,e,b.startX),se=wn(y.width,e,b.endX);F={minimum:Math.min(Q,se),maximum:Math.max(Q,se)}}const ee=tn(y.width,e,F.minimum),H=tn(y.width,e,e.maximum)-tn(y.width,e,F.maximum);return{offsets:e2(y.width,e),curtainLeft:ee,curtainRight:H}},[d,e,b,y]),L=z.useMemo(()=>n==null?void 0:n.filteredActions(N),[n,N]),G=z.useMemo(()=>{const F=[];for(const ee of L||[])F.push({action:ee,leftTime:ee.startTime,rightTime:ee.endTime||e.maximum,leftPosition:tn(y.width,e,ee.startTime),rightPosition:tn(y.width,e,ee.endTime||e.maximum),active:!1,error:!!ee.error});for(const ee of(n==null?void 0:n.resources)||[]){const ve=ee._monotonicTime,H=ee._monotonicTime+ee.time;F.push({resource:ee,leftTime:ve,rightTime:H,leftPosition:tn(y.width,e,ve),rightPosition:tn(y.width,e,H),active:!1,error:!1})}for(const ee of i||[])F.push({consoleMessage:ee,leftTime:ee.timestamp,rightTime:ee.timestamp,leftPosition:tn(y.width,e,ee.timestamp),rightPosition:tn(y.width,e,ee.timestamp),active:!1,error:ee.isError});return F},[n,L,i,e,y]);z.useMemo(()=>{for(const F of G)o?F.active=F.action===o:u!==void 0?F.active=F.resource===(s==null?void 0:s[u]):f!==void 0?F.active=F.consoleMessage===(i==null?void 0:i[f]):F.active=!1},[G,o,u,f,i,s]);const Z=z.useCallback(F=>{if(_(void 0),!v.current)return;const ee=F.clientX-v.current.getBoundingClientRect().left,ve=wn(y.width,e,ee),H=d?tn(y.width,e,d.minimum):0,Q=d?tn(y.width,e,d.maximum):0;d&&Math.abs(ee-H)<10?E({startX:Q,endX:ee,type:"resize"}):d&&Math.abs(ee-Q)<10?E({startX:H,endX:ee,type:"resize"}):d&&ve>d.minimum&&ve<d.maximum&&F.clientY-v.current.getBoundingClientRect().top<20?E({startX:H,endX:Q,pivot:ee,type:"move"}):E({startX:ee,endX:ee,type:"resize"})},[e,y,v,d]),q=z.useCallback(F=>{if(!v.current)return;const ee=F.clientX-v.current.getBoundingClientRect().left,ve=wn(y.width,e,ee),H=L==null?void 0:L.findLast(C=>C.startTime<=ve);if(!F.buttons){E(void 0);return}if(H&&a(H),!b)return;let Q=b;if(b.type==="resize")Q={...b,endX:ee};else{const C=ee-b.pivot;let P=b.startX+C,W=b.endX+C;P<0&&(P=0,W=P+(b.endX-b.startX)),W>y.width&&(W=y.width,P=W-(b.endX-b.startX)),Q={...b,startX:P,endX:W,pivot:ee}}E(Q);const se=wn(y.width,e,Q.startX),we=wn(y.width,e,Q.endX);se!==we&&p({minimum:Math.min(se,we),maximum:Math.max(se,we)})},[e,b,y,L,a,v,p]),R=z.useCallback(()=>{if(_(void 0),!!b){if(b.startX!==b.endX){const F=wn(y.width,e,b.startX),ee=wn(y.width,e,b.endX);p({minimum:Math.min(F,ee),maximum:Math.max(F,ee)})}else{const F=wn(y.width,e,b.startX),ee=L==null?void 0:L.findLast(ve=>ve.startTime<=F);ee&&a(ee),p(void 0)}E(void 0)}},[e,b,y,L,p,a]),ie=z.useCallback(F=>{if(!v.current)return;const ee=F.clientX-v.current.getBoundingClientRect().left,ve=wn(y.width,e,ee),H=L==null?void 0:L.findLast(Q=>Q.startTime<=ve);_({x:ee,clientY:F.clientY,action:H,sdkLanguage:m})},[e,y,L,v,m]),le=z.useCallback(()=>{_(void 0)},[]),I=z.useCallback(()=>{p(void 0)},[p]);return S.jsxs("div",{className:"timeline-view-container",children:[!!b&&S.jsx(p0,{cursor:(b==null?void 0:b.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:R,onPaneMouseMove:q,onPaneDoubleClick:I}),S.jsxs("div",{ref:v,className:"timeline-view",onMouseDown:Z,onMouseMove:ie,onMouseLeave:le,children:[S.jsx("div",{className:"timeline-grid",children:k.map((F,ee)=>S.jsx("div",{className:"timeline-divider",style:{left:F.position+"px"},children:S.jsx("div",{className:"timeline-time",children:xt(F.time-e.minimum)})},ee))}),S.jsx("div",{style:{height:8}}),S.jsx(ZN,{boundaries:e,previewPoint:x}),S.jsx("div",{className:"timeline-bars",children:G.filter(F=>!F.action||F.action.class!=="Test").map((F,ee)=>S.jsx("div",{className:Ke("timeline-bar",F.action&&"action",F.resource&&"network",F.consoleMessage&&"console-message",F.active&&"active",F.error&&"error"),style:{left:F.leftPosition,width:Math.max(5,F.rightPosition-F.leftPosition),top:t2(F),bottom:0}},ee))}),S.jsx("div",{className:"timeline-marker",style:{display:x!==void 0?"block":"none",left:((x==null?void 0:x.x)||0)+"px"}}),d&&S.jsxs("div",{className:"timeline-window",children:[S.jsx("div",{className:"timeline-window-curtain left",style:{width:$}}),S.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),S.jsx("div",{className:"timeline-window-center",children:S.jsx("div",{className:"timeline-window-drag"})}),S.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),S.jsx("div",{className:"timeline-window-curtain right",style:{width:V}})]})]})]})};function e2(n,e){let s=n/64;const a=e.maximum-e.minimum,o=n/a;let u=a/s;const f=Math.ceil(Math.log(u)/Math.LN10);u=Math.pow(10,f),u*o>=320&&(u=u/5),u*o>=128&&(u=u/2);const d=e.minimum;let p=e.maximum;p+=64/o,s=Math.ceil((p-d)/u),u||(s=0);const m=[];for(let y=0;y<s;++y){const v=d+u*y;m.push({position:tn(n,e,v),time:v})}return m}function tn(n,e,i){return(i-e.minimum)/(e.maximum-e.minimum)*n}function wn(n,e,i){return i/n*(e.maximum-e.minimum)+e.minimum}function t2(n){return n.resource?25:20}const n2=({model:n})=>{var i,s;if(!n)return S.jsx(S.Fragment,{});const e=n.wallTime!==void 0?new Date(n.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return S.jsxs("div",{style:{flex:"auto",display:"block",overflow:"hidden auto"},children:[S.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&S.jsxs("div",{className:"call-line",children:["start time:",S.jsx("span",{className:"call-value datetime",title:e,children:e})]}),S.jsxs("div",{className:"call-line",children:["duration:",S.jsx("span",{className:"call-value number",title:xt(n.endTime-n.startTime),children:xt(n.endTime-n.startTime)})]}),S.jsx("div",{className:"call-section",children:"Browser"}),S.jsxs("div",{className:"call-line",children:["engine:",S.jsx("span",{className:"call-value string",title:n.browserName,children:n.browserName})]}),n.channel&&S.jsxs("div",{className:"call-line",children:["channel:",S.jsx("span",{className:"call-value string",title:n.channel,children:n.channel})]}),n.platform&&S.jsxs("div",{className:"call-line",children:["platform:",S.jsx("span",{className:"call-value string",title:n.platform,children:n.platform})]}),n.playwrightVersion&&S.jsxs("div",{className:"call-line",children:["playwright version:",S.jsx("span",{className:"call-value string",title:n.playwrightVersion,children:n.playwrightVersion})]}),n.options.userAgent&&S.jsxs("div",{className:"call-line",children:["user agent:",S.jsx("span",{className:"call-value datetime",title:n.options.userAgent,children:n.options.userAgent})]}),n.options.baseURL&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),S.jsxs("div",{className:"call-line",children:["baseURL:",S.jsx("a",{className:"call-value string",href:n.options.baseURL,title:n.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:n.options.baseURL})]})]}),S.jsx("div",{className:"call-section",children:"Viewport"}),n.options.viewport&&S.jsxs("div",{className:"call-line",children:["width:",S.jsx("span",{className:"call-value number",title:String(!!((i=n.options.viewport)!=null&&i.width)),children:n.options.viewport.width})]}),n.options.viewport&&S.jsxs("div",{className:"call-line",children:["height:",S.jsx("span",{className:"call-value number",title:String(!!((s=n.options.viewport)!=null&&s.height)),children:n.options.viewport.height})]}),S.jsxs("div",{className:"call-line",children:["is mobile:",S.jsx("span",{className:"call-value boolean",title:String(!!n.options.isMobile),children:String(!!n.options.isMobile)})]}),n.options.deviceScaleFactor&&S.jsxs("div",{className:"call-line",children:["device scale:",S.jsx("span",{className:"call-value number",title:String(n.options.deviceScaleFactor),children:String(n.options.deviceScaleFactor)})]}),S.jsx("div",{className:"call-section",children:"Counts"}),S.jsxs("div",{className:"call-line",children:["pages:",S.jsx("span",{className:"call-value number",children:n.pages.length})]}),S.jsxs("div",{className:"call-line",children:["actions:",S.jsx("span",{className:"call-value number",children:n.actions.length})]}),S.jsxs("div",{className:"call-line",children:["events:",S.jsx("span",{className:"call-value number",children:n.events.length})]})]})},i2=({annotations:n})=>n.length?S.jsx("div",{className:"annotations-tab",children:n.map((e,i)=>S.jsxs("div",{className:"annotation-item",children:[S.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&S.jsxs("span",{children:[": ",y0(e.description)]})]},`annotation-${i}`))}):S.jsx(cs,{text:"No annotations"}),s2=({sdkLanguage:n,isInspecting:e,setIsInspecting:i,highlightedElement:s,setHighlightedElement:a})=>{const[o,u]=z.useState(),f=z.useCallback(d=>{const{errors:p}=Ph(SS,d,{prettyErrors:!1}),m=p.map(y=>({message:y.message,line:y.range[1].line,column:y.range[1].col,type:"subtle-error"}));u(m),a({...s,ariaSnapshot:d,lastEdited:"ariaSnapshot"}),i(!1)},[s,a,i]);return S.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[S.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[S.jsx("div",{children:"Locator"}),S.jsx(jt,{style:{margin:"0 4px"},title:"Pick locator",icon:"target",toggled:e,onClick:()=>i(!e)}),S.jsx("div",{style:{flex:"auto"}}),S.jsx(jt,{icon:"files",title:"Copy locator",onClick:()=>{Ey(s.locator||"")}})]}),S.jsx("div",{style:{height:50},children:S.jsx(br,{text:s.locator||"",highlighter:n,isFocused:!0,wrapLines:!0,onChange:d=>{a({...s,locator:d,lastEdited:"locator"}),i(!1)}})}),S.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[S.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),S.jsx(jt,{icon:"files",title:"Copy snapshot",onClick:()=>{Ey(s.ariaSnapshot||"")}})]}),S.jsx("div",{style:{height:150},children:S.jsx(br,{text:s.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:o,onChange:f})})]})},r2=({className:n,style:e,open:i,isModal:s,minWidth:a,verticalOffset:o,requestClose:u,anchor:f,dataTestId:d,children:p})=>{const m=z.useRef(null),[y,v]=z.useState(0),[b]=mh(m),[E,x]=mh(f),_=f?a2(b,E,o):void 0;return z.useEffect(()=>{const N=$=>{!m.current||!($.target instanceof Node)||m.current.contains($.target)||u==null||u()},k=$=>{$.key==="Escape"&&(u==null||u())};return i?(document.addEventListener("mousedown",N),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",N),document.removeEventListener("keydown",k)}):()=>{}},[i,u]),z.useLayoutEffect(()=>x(),[i,x]),z.useEffect(()=>{const N=()=>v(k=>k+1);return window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}},[]),z.useLayoutEffect(()=>{m.current&&(i?s?m.current.showModal():m.current.show():m.current.close())},[i,s]),S.jsx("dialog",{ref:m,style:{position:"fixed",margin:_?0:void 0,zIndex:110,top:_==null?void 0:_.top,left:_==null?void 0:_.left,minWidth:a||0,...e},className:n,"data-testid":d,children:p})};function a2(n,e,i=4,s=4){let a=Math.max(s,e.left);a+n.width>window.innerWidth-s&&(a=window.innerWidth-n.width-s);let o=Math.max(0,e.bottom)+i;return o+n.height>window.innerHeight-i&&(Math.max(0,e.top)>n.height+i?o=Math.max(0,e.top)-n.height-i:o=window.innerHeight-i-n.height),{left:a,top:o}}const l2=({title:n,icon:e,buttonChildren:i,anchorRef:s,dialogDataTestId:a,children:o})=>{const u=z.useRef(null),f=s??u,[d,p]=z.useState(!1);return S.jsxs(S.Fragment,{children:[S.jsx(jt,{ref:u,icon:e,title:n,onClick:()=>p(m=>!m),children:i}),S.jsx(r2,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:d,verticalOffset:8,requestClose:()=>p(!1),anchor:f,dataTestId:a,children:o})]})},NS=({settings:n})=>S.jsx("div",{className:"vbox settings-view",children:n.map(e=>{const i=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return S.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:o2(e,i)},e.name)})}),o2=(n,e)=>{switch(n.type){case"check":return S.jsxs(S.Fragment,{children:[S.jsx("input",{type:"checkbox",id:e,checked:n.value,onChange:()=>n.set(!n.value)}),S.jsxs("label",{htmlFor:e,children:[n.name,!!n.count&&S.jsx("span",{className:"setting-counter",children:n.count})]})]});case"select":return S.jsxs(S.Fragment,{children:[S.jsxs("label",{htmlFor:e,children:[n.name,":",!!n.count&&S.jsx("span",{className:"setting-counter",children:n.count})]}),S.jsx("select",{id:e,value:n.value,onChange:i=>n.set(i.target.value),children:n.options.map(i=>S.jsx("option",{value:i.value,children:i.label},i.value))})]});default:return null}},S2=n=>{var i;const e=f2((i=n.model)==null?void 0:i.traceUri);return S.jsx(b0.Provider,{value:n.model,children:S.jsx(c2,{partition:e,...n})})},c2=n=>{var dl;const{partition:e,model:i,showSourcesFirst:s,rootDir:a,fallbackLocation:o,isLive:u,hideTimeline:f,status:d,annotations:p,inert:m,onOpenExternally:y,revealSource:v,testRunMetadata:b}=n,[E,x]=sn("navigatorTab","actions"),[_,N]=sn("propertiesTab",s?"source":"call"),[k,$]=sn("propertiesSidebarLocation","bottom"),[V]=sn("actionsFilter",[]),[L,G]=xi("selectedCallId"),[Z,q]=xi("selectedTime"),[R,ie]=xi("highlightedCallId"),[le,I]=xi("revealedErrorKey"),[F,ee]=xi("highlightedConsoleMessageOrdinal"),[ve,H]=xi("revealedAttachmentCallId"),[Q,se]=xi("highlightedResourceOrdinal"),[we,C]=xi("treeState",{expandedItems:new Map});X1(e);const[P,W]=z.useState({lastEdited:"none"}),[J,ae]=z.useState(!1),be=z.useCallback(ce=>{G(ce==null?void 0:ce.callId),I(void 0)},[G,I]),te=z.useMemo(()=>i==null?void 0:i.filteredActions(V),[i,V]),mt=((i==null?void 0:i.actions.length)??0)-((te==null?void 0:te.length)??0),Ae=z.useMemo(()=>te==null?void 0:te.find(ce=>ce.callId===R),[te,R]),Vt=z.useCallback(ce=>{ie(ce==null?void 0:ce.callId)},[ie]),Or=z.useMemo(()=>(i==null?void 0:i.sources)||new Map,[i]);z.useEffect(()=>{q(void 0),I(void 0)},[i,q,I]);const En=z.useMemo(()=>{if(L){const Jn=te==null?void 0:te.find(cn=>cn.callId===L);if(Jn)return Jn}const ce=i==null?void 0:i.failedAction();if(ce)return ce;if(te!=null&&te.length){let Jn=te.length-1;for(let cn=0;cn<te.length;++cn)if(te[cn].title==="After Hooks"&&cn){Jn=cn-1;break}return te[Jn]}},[i,te,L]),on=z.useMemo(()=>Ae||En,[En,Ae]),hs=z.useCallback(ce=>{be(ce),Vt(void 0)},[be,Vt]),yt=z.useCallback(ce=>{N(ce),ce!=="inspector"&&ae(!1)},[N]),fl=z.useCallback(ce=>{!J&&ce&&yt("inspector"),ae(ce)},[ae,yt,J]),Mc=z.useCallback(ce=>{W(ce),yt("inspector")},[yt]),Gt=z.useCallback(ce=>{yt("attachments"),H({callId:ce})},[yt,H]);z.useEffect(()=>{v&&yt("source")},[v,yt]);const Lr=q_(i,Z),ds=fT(i,Z),Mi=D_(i),ps=z.useMemo(()=>{var ce;return le!==void 0?(ce=Mi.errors.get(le))==null?void 0:ce.stack:on==null?void 0:on.stack},[on,le,Mi]),Qn=(i==null?void 0:i.sdkLanguage)||"javascript",hl={id:"inspector",title:"Locator",render:()=>S.jsx(s2,{sdkLanguage:Qn,isInspecting:J,setIsInspecting:fl,highlightedElement:P,setHighlightedElement:W})},Oc={id:"call",title:"Call",render:()=>S.jsx(n_,{action:on,startTimeOffset:(i==null?void 0:i.startTime)??0,sdkLanguage:Qn})},Lc={id:"log",title:"Log",render:()=>S.jsx(r_,{action:on,isLive:u})},Oi={id:"errors",title:"Errors",errorCount:Mi.errors.size,render:()=>S.jsx(U_,{errorsModel:Mi,testRunMetadata:b,sdkLanguage:Qn,revealInSource:ce=>{ce.action?be(ce.action):I(ce.message),yt("source")},wallTime:(i==null?void 0:i.wallTime)??0})};let ut;!En&&o&&(ut=(dl=o.source)==null?void 0:dl.errors.length);const Kt={id:"source",title:"Source",errorCount:ut,render:()=>S.jsx(L_,{stack:ps,sources:Or,rootDir:a,stackFrameLocation:k==="bottom"?"right":"bottom",fallbackLocation:o,onOpenExternally:y})},bt={id:"console",title:"Console",count:Lr.entries.length,render:()=>S.jsx($_,{consoleModel:Lr,boundaries:Zn,selectedTime:Z,onAccepted:ce=>q({minimum:ce.timestamp,maximum:ce.timestamp}),onEntryHovered:ee})},Rc={id:"network",title:"Network",count:ds.resources.length,render:()=>S.jsx(hT,{boundaries:Zn,networkModel:ds,onResourceHovered:se,sdkLanguage:(i==null?void 0:i.sdkLanguage)??"javascript"})},jc={id:"attachments",title:"Attachments",count:i==null?void 0:i.visibleAttachments.length,render:()=>S.jsx(T_,{revealedAttachmentCallId:ve})},Li=[hl,Oc,Lc,Oi,bt,Rc,Kt,jc];if(p!==void 0){const ce={id:"annotations",title:"Annotations",count:p.length,render:()=>S.jsx(i2,{annotations:p})};Li.push(ce)}if(s){const ce=Li.indexOf(Kt);Li.splice(ce,1),Li.splice(1,0,Kt)}const{boundaries:Zn}=z.useMemo(()=>{const ce={minimum:(i==null?void 0:i.startTime)||0,maximum:(i==null?void 0:i.endTime)||3e4};return ce.minimum>ce.maximum&&(ce.minimum=0,ce.maximum=3e4),ce.maximum+=(ce.maximum-ce.minimum)/20,{boundaries:ce}},[i]);let An=0;!u&&i&&i.endTime>=0?An=i.endTime-i.startTime:i&&i.wallTime&&(An=Date.now()-i.wallTime);const Nn={id:"actions",title:"Actions",component:S.jsxs("div",{className:"vbox",children:[d&&S.jsxs("div",{className:"workbench-run-status","data-testid":"workbench-run-status",children:[S.jsx("span",{className:Ke("codicon",h0(d))}),S.jsx("div",{children:Wx(d)}),S.jsx("div",{className:"spacer"}),S.jsx("div",{className:"workbench-run-duration",children:An?xt(An):""})]}),S.jsx(t_,{sdkLanguage:Qn,actions:te||[],selectedAction:i?En:void 0,selectedTime:Z,setSelectedTime:q,treeState:we,setTreeState:C,onSelected:hs,onHighlighted:Vt,revealActionAttachment:Gt,revealConsole:()=>yt("console"),isLive:u})]})},gs={id:"metadata",title:"Metadata",component:S.jsx(n2,{model:i})},Ri=E==="actions"&&S.jsx(u2,{counters:i==null?void 0:i.actionCounters,hiddenActionsCount:mt});return S.jsxs("div",{className:"vbox workbench",...m?{inert:!0}:{},children:[!f&&S.jsx(WN,{model:i,consoleEntries:Lr.entries,networkResources:ds.resources,boundaries:Zn,highlightedAction:Ae,highlightedResourceOrdinal:Q,highlightedConsoleEntryOrdinal:F,onSelected:hs,sdkLanguage:Qn,selectedTime:Z,setSelectedTime:q}),S.jsx(Qo,{sidebarSize:250,orientation:k==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:S.jsx(Qo,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:S.jsx(IN,{action:on,model:i,sdkLanguage:Qn,testIdAttributeName:(i==null?void 0:i.testIdAttributeName)||"data-testid",isInspecting:J,setIsInspecting:fl,highlightedElement:P,setHighlightedElement:Mc}),sidebar:S.jsx(_h,{tabs:[Nn,gs],rightToolbar:[Ri],selectedTab:E,setSelectedTab:x})}),sidebar:S.jsx(_h,{tabs:Li,selectedTab:_,setSelectedTab:yt,rightToolbar:[k==="bottom"?S.jsx(jt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{$("right")}}):S.jsx(jt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{$("bottom")}})],mode:k==="bottom"?"default":"select"})})]})},u2=({counters:n,hiddenActionsCount:e})=>{const[i,s]=sn("actionsFilter",[]),a=z.useRef(null),o=S.jsxs(S.Fragment,{children:[e>0&&S.jsxs("span",{className:"workbench-actions-hidden-count",title:e+" actions hidden by filters",children:[e," hidden"]}),S.jsx("span",{ref:a,className:"codicon codicon-filter"})]});return S.jsx(l2,{title:"Filter actions",dialogDataTestId:"actions-filter-dialog",buttonChildren:o,anchorRef:a,children:S.jsx(NS,{settings:[{type:"check",value:i.includes("getter"),set:u=>s(u?[...i,"getter"]:i.filter(f=>f!=="getter")),name:"Getters",count:n==null?void 0:n.get("getter")},{type:"check",value:i.includes("route"),set:u=>s(u?[...i,"route"]:i.filter(f=>f!=="route")),name:"Network routes",count:n==null?void 0:n.get("route")},{type:"check",value:i.includes("configuration"),set:u=>s(u?[...i,"configuration"]:i.filter(f=>f!=="configuration")),name:"Configuration",count:n==null?void 0:n.get("configuration")}]})})};function f2(n){if(!n)return"default";const e=new URL(n,"http://localhost");return e.searchParams.delete("timestamp"),e.toString()}var kb;(n=>{function e(i){for(const s of i.splice(0))s.dispose()}n.disposeAll=e})(kb||(kb={}));class ar{constructor(){this._listeners=new Set,this.event=(e,i)=>{this._listeners.add(e);let s=!1;const a=this,o={dispose(){s||(s=!0,a._listeners.delete(e))}};return i&&i.push(o),o}}fire(e){const i=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const s of this._listeners)this._deliveryQueue.push({listener:s,event:e});if(i){for(let s=0;s<this._deliveryQueue.length;s++){const{listener:a,event:o}=this._deliveryQueue[s];a.call(null,o)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class h2 extends Error{constructor(){super("Test server connection closed")}}class w2{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",i=>e(i.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 x2{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(s=>{const a=JSON.parse(s),{id:o,result:u,error:f,method:d,params:p}=a;if(o){const m=this._callbacks.get(o);if(!m)return;this._callbacks.delete(o),f?m.reject(new Error(f)):m.resolve(u)}else this._dispatchEvent(d,p)});const i=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((s,a)=>{this._transport.onopen(s),this._transport.onerror(a)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(i);for(const s of this._callbacks.values())s.reject(new h2);this._callbacks.clear()})}isClosed(){return this._isClosed}async _sendMessage(e,i){const s=globalThis.__logForTest;s==null||s({method:e,params:i}),await this._connectedPromise;const a=++this._lastId,o={id:a,method:e,params:i};return this._transport.send(JSON.stringify(o)),new Promise((u,f)=>{this._callbacks.set(a,{resolve:u,reject:f})})}_sendMessageNoReply(e,i){this._sendMessage(e,i).catch(()=>{})}_dispatchEvent(e,i){e==="report"?this._onReportEmitter.fire(i):e==="stdio"?this._onStdioEmitter.fire(i):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(i):e==="loadTraceRequested"?this._onLoadTraceRequestedEmitter.fire(i):e==="testPaused"&&this._onTestPausedEmitter.fire(i)}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 _2=({location:n})=>{const[e,i]=sn("shouldPopulateCanvasFromScreenshot",!1),[s,a]=W1(),[o,u]=sn("mergeFiles",!1);return S.jsx(NS,{settings:[{type:"select",value:s,set:a,name:"Theme",options:Z1},...n==="ui-mode"?[{type:"check",value:o,set:u,name:"Merge files"}]:[],{type:"check",value:e,set:i,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{l2 as D,m0 as E,ot as R,Qo as S,b2 as T,w2 as W,p_ as _,x2 as a,_2 as b,S2 as c,r2 as d,p2 as e,y2 as f,J1 as g,g2 as h,m2 as i,S as j,Ke as k,Zx as l,xt as m,Xh as n,jt as o,sn as p,NS as q,z as r,es as s,h0 as t,os as u,I1 as v};
|