const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-DS0FLvoc.js","../codeMirrorModule.DYBRYzYX.css"])))=>i.map(i=>d[i]); (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function ex(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Wf={exports:{}},Ma={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var qy;function tx(){if(qy)return Ma;qy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(r,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:n,type:r,key:u,ref:l!==void 0?l:null,props:o}}return Ma.Fragment=e,Ma.jsx=i,Ma.jsxs=i,Ma}var $y;function nx(){return $y||($y=1,Wf.exports=tx()),Wf.exports}var v=nx(),eh={exports:{}},ce={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Iy;function ix(){if(Iy)return ce;Iy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=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"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),S=Symbol.iterator;function w(M){return M===null||typeof M!="object"?null:(M=S&&M[S]||M["@@iterator"],typeof M=="function"?M:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function A(M,Y,Z){this.props=M,this.context=Y,this.refs=_,this.updater=Z||T}A.prototype.isReactComponent={},A.prototype.setState=function(M,Y){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,Y,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function N(){}N.prototype=A.prototype;function $(M,Y,Z){this.props=M,this.context=Y,this.refs=_,this.updater=Z||T}var G=$.prototype=new N;G.constructor=$,x(G,A.prototype),G.isPureReactComponent=!0;var X=Array.isArray;function U(){}var L={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function O(M,Y,Z){var P=Z.ref;return{$$typeof:n,type:M,key:Y,ref:P!==void 0?P:null,props:Z}}function ne(M,Y){return O(M.type,Y,M.props)}function te(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}function V(M){var Y={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(Z){return Y[Z]})}var W=/\/+/g;function ge(M,Y){return typeof M=="object"&&M!==null&&M.key!=null?V(""+M.key):Y.toString(36)}function Ue(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(U,U):(M.status="pending",M.then(function(Y){M.status==="pending"&&(M.status="fulfilled",M.value=Y)},function(Y){M.status==="pending"&&(M.status="rejected",M.reason=Y)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function I(M,Y,Z,P,oe){var he=typeof M;(he==="undefined"||he==="boolean")&&(M=null);var be=!1;if(M===null)be=!0;else switch(he){case"bigint":case"string":case"number":be=!0;break;case"object":switch(M.$$typeof){case n:case e:be=!0;break;case b:return be=M._init,I(be(M._payload),Y,Z,P,oe)}}if(be)return oe=oe(M),be=P===""?"."+ge(M,0):P,X(oe)?(Z="",be!=null&&(Z=be.replace(W,"$&/")+"/"),I(oe,Y,Z,"",function(Et){return Et})):oe!=null&&(te(oe)&&(oe=ne(oe,Z+(oe.key==null||M&&M.key===oe.key?"":(""+oe.key).replace(W,"$&/")+"/")+be)),Y.push(oe)),1;be=0;var rt=P===""?".":P+":";if(X(M))for(var ke=0;ke{let u=!1;return n().then(f=>{u||o(f)}),()=>{u=!0}},e),l}function ms(){const n=vt.useRef(null),[e]=xh(n);return[e,n]}function xh(n){const[e,i]=vt.useState(new DOMRect(0,0,10,10)),r=vt.useCallback(()=>{const l=n==null?void 0:n.current;l&&i(l.getBoundingClientRect())},[n]);return vt.useLayoutEffect(()=>{const l=n==null?void 0:n.current;if(!l)return;r();const o=new ResizeObserver(r);return o.observe(l),window.addEventListener("resize",r),()=>{o.disconnect(),window.removeEventListener("resize",r)}},[r,n]),[e,r]}function Zb(n,e,i,r,l){let o=0,u=n.length;for(;o>1;i(e,n[f])>=0?o=f+1:u=f}return u}function Gy(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 pn(n,e){n&&(e=us.getObject(n,e));const[i,r]=vt.useState(e),l=vt.useCallback(o=>{n?us.setObject(n,o):r(o)},[n,r]);return vt.useEffect(()=>{if(n){const o=()=>r(us.getObject(n,e));return us.onChangeEmitter.addEventListener(n,o),()=>us.onChangeEmitter.removeEventListener(n,o)}},[e,n]),[i,l]}const _h=new Map,Wb=new Map;let tc;function rr(n,e){const[i,r]=vt.useState();Wb.set(n,{setter:r,defaultValue:e});const l=vt.useCallback(o=>{const u=_h.get(tc||"default")||{};u[n]=o,_h.set(tc||"default",u),r(o)},[n]);return[i,l]}function sx(n){if(tc===n)return;tc=n;const e=_h.get(n)||{};for(const[i,r]of Wb.entries())r.setter(e[i]||r.defaultValue)}class rx{constructor(){this.onChangeEmitter=new EventTarget}getString(e,i){return localStorage[e]||i}setString(e,i){var r;localStorage[e]=i,this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}getObject(e,i){if(!localStorage[e])return i;try{return JSON.parse(localStorage[e])}catch{return i}}setObject(e,i){var r;localStorage[e]=JSON.stringify(i),this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}}const us=new rx;function st(...n){return n.filter(Boolean).join(" ")}function e0(n){n&&(n!=null&&n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n==null||n.scrollIntoView())}const Ky="\\u0000-\\u0020\\u007f-\\u009f",t0=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Ky+'"]{2,}[^\\s'+Ky+`"')}\\],:;.!?]`,"ug");function ax(){const[n,e]=vt.useState(!1),i=vt.useCallback(()=>{const r=[];return e(l=>(r.push(setTimeout(()=>e(!1),1e3)),l?(r.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>r.forEach(clearTimeout)},[e]);return[n,i]}const lx="system",n0="theme",ox=[{label:"Dark mode",value:"dark-mode"},{label:"Light mode",value:"light-mode"},{label:"System",value:"system"}],i0=window.matchMedia("(prefers-color-scheme: dark)");function m2(){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),Eh(Th()),i0.addEventListener("change",()=>{Eh(Th())}))}const Fh=new Set;function Eh(n){const e=cx(),i=n==="system"?i0.matches?"dark-mode":"light-mode":n;if(e!==i){e&&document.documentElement.classList.remove(e),document.documentElement.classList.add(i);for(const r of Fh)r(i)}}function y2(n){Fh.add(n)}function b2(n){Fh.delete(n)}function Th(){return us.getString(n0,lx)}function cx(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":document.documentElement.classList.contains("light-mode")?"light-mode":null}function ux(){const[n,e]=vt.useState(Th());return vt.useEffect(()=>{us.setString(n0,n),Eh(n)},[n]),[n,e]}var th={exports:{}},Oa={},nh={exports:{}},ih={};/** * @license React * scheduler.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Xy;function fx(){return Xy||(Xy=1,(function(n){function e(I,J){var re=I.length;I.push(J);e:for(;0>>1,_e=I[xe];if(0>>1;xel(Z,re))P<_e&&0>l(oe,Z)?(I[xe]=oe,I[P]=re,xe=P):(I[xe]=Z,I[Y]=re,xe=Y);else if(P<_e&&0>l(oe,re))I[xe]=oe,I[P]=re,xe=P;else break e}}return J}function l(I,J){var re=I.sortIndex-J.sortIndex;return re!==0?re:I.id-J.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=[],g=[],b=1,m=null,S=3,w=!1,T=!1,x=!1,_=!1,A=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function G(I){for(var J=i(g);J!==null;){if(J.callback===null)r(g);else if(J.startTime<=I)r(g),J.sortIndex=J.expirationTime,e(d,J);else break;J=i(g)}}function X(I){if(x=!1,G(I),!T)if(i(d)!==null)T=!0,U||(U=!0,V());else{var J=i(g);J!==null&&Ue(X,J.startTime-I)}}var U=!1,L=-1,B=5,O=-1;function ne(){return _?!0:!(n.unstable_now()-OI&&ne());){var xe=m.callback;if(typeof xe=="function"){m.callback=null,S=m.priorityLevel;var _e=xe(m.expirationTime<=I);if(I=n.unstable_now(),typeof _e=="function"){m.callback=_e,G(I),J=!0;break t}m===i(d)&&r(d),G(I)}else r(d);m=i(d)}if(m!==null)J=!0;else{var M=i(g);M!==null&&Ue(X,M.startTime-I),J=!1}}break e}finally{m=null,S=re,w=!1}J=void 0}}finally{J?V():U=!1}}}var V;if(typeof $=="function")V=function(){$(te)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,ge=W.port2;W.port1.onmessage=te,V=function(){ge.postMessage(null)}}else V=function(){A(te,0)};function Ue(I,J){L=A(function(){I(n.unstable_now())},J)}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(I){I.callback=null},n.unstable_forceFrameRate=function(I){0>I||125xe?(I.sortIndex=re,e(g,I),i(d)===null&&I===i(g)&&(x?(N(L),L=-1):x=!0,Ue(X,re-xe))):(I.sortIndex=_e,e(d,I),T||w||(T=!0,U||(U=!0,V()))),I},n.unstable_shouldYield=ne,n.unstable_wrapCallback=function(I){var J=S;return function(){var re=S;S=J;try{return I.apply(this,arguments)}finally{S=re}}}})(ih)),ih}var Yy;function hx(){return Yy||(Yy=1,nh.exports=fx()),nh.exports}var sh={exports:{}},wt={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Fy;function dx(){if(Fy)return wt;Fy=1;var n=Xh();function e(d){var g="https://react.dev/errors/"+d;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),sh.exports=dx(),sh.exports}/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Py;function gx(){if(Py)return Oa;Py=1;var n=hx(),e=Xh(),i=px();function r(t){var s="https://react.dev/errors/"+t;if(1_e||(t.current=xe[_e],xe[_e]=null,_e--)}function Z(t,s){_e++,xe[_e]=t.current,t.current=s}var P=M(null),oe=M(null),he=M(null),be=M(null);function rt(t,s){switch(Z(he,s),Z(oe,t),Z(P,null),s.nodeType){case 9:case 11:t=(t=s.documentElement)&&(t=t.namespaceURI)?cy(t):0;break;default:if(t=s.tagName,s=s.namespaceURI)s=cy(s),t=uy(s,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Y(P),Z(P,t)}function ke(){Y(P),Y(oe),Y(he)}function Et(t){t.memoizedState!==null&&Z(be,t);var s=P.current,a=uy(s,t.type);s!==a&&(Z(oe,t),Z(P,a))}function fe(t){oe.current===t&&(Y(P),Y(oe)),be.current===t&&(Y(be),Aa._currentValue=re)}var Ne,qe;function Ee(t){if(Ne===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);Ne=s&&s[1]||"",qe=-1)":-1h||C[c]!==z[h]){var K=` `+C[c].replace(" at new "," at ");return t.displayName&&K.includes("")&&(K=K.replace("",t.displayName)),K}while(1<=c&&0<=h);break}}}finally{Gt=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Ee(a):""}function en(t,s){switch(t.tag){case 26:case 27:case 5:return Ee(t.type);case 16:return Ee("Lazy");case 13:return t.child!==s&&s!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return Wt(t.type,!1);case 11:return Wt(t.type.render,!1);case 1:return Wt(t.type,!0);case 31:return Ee("Activity");default:return""}}function qi(t){try{var s="",a=null;do s+=en(t,a),a=t,t=t.return;while(t);return s}catch(c){return` Error generating stack: `+c.message+` `+c.stack}}var Ss=Object.prototype.hasOwnProperty,ri=n.unstable_scheduleCallback,Ur=n.unstable_cancelCallback,ai=n.unstable_shouldYield,zc=n.unstable_requestPaint,Tt=n.unstable_now,Uc=n.unstable_getCurrentPriorityLevel,hl=n.unstable_ImmediatePriority,Hr=n.unstable_UserBlockingPriority,li=n.unstable_NormalPriority,Hc=n.unstable_LowPriority,dl=n.unstable_IdlePriority,Bc=n.log,$i=n.unstable_setDisableYieldValue,En=null,At=null;function Tn(t){if(typeof Bc=="function"&&$i(t),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(En,t)}catch{}}var Ct=Math.clz32?Math.clz32:Ii,pl=Math.log,ae=Math.LN2;function Ii(t){return t>>>=0,t===0?32:31-(pl(t)/ae|0)|0}var tn=256,gl=262144,ml=4194304;function Vi(t){var s=t&42;if(s!==0)return s;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:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;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 yl(t,s,a){var c=t.pendingLanes;if(c===0)return 0;var h=0,p=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var E=c&134217727;return E!==0?(c=E&~p,c!==0?h=Vi(c):(y&=E,y!==0?h=Vi(y):a||(a=E&~t,a!==0&&(h=Vi(a))))):(E=c&~p,E!==0?h=Vi(E):y!==0?h=Vi(y):a||(a=c&~t,a!==0&&(h=Vi(a)))),h===0?0:s!==0&&s!==h&&(s&p)===0&&(p=h&-h,a=s&-s,p>=a||p===32&&(a&4194048)!==0)?s:h}function Br(t,s){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&s)===0}function $S(t,s){switch(t){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 Gd(){var t=ml;return ml<<=1,(ml&62914560)===0&&(ml=4194304),t}function qc(t){for(var s=[],a=0;31>a;a++)s.push(t);return s}function qr(t,s){t.pendingLanes|=s,s!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function IS(t,s,a,c,h,p){var y=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var E=t.entanglements,C=t.expirationTimes,z=t.hiddenUpdates;for(a=y&~a;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var FS=/[\n"\\]/g;function sn(t){return t.replace(FS,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Xc(t,s,a,c,h,p,y,E){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),s!=null?y==="number"?(s===0&&t.value===""||t.value!=s)&&(t.value=""+nn(s)):t.value!==""+nn(s)&&(t.value=""+nn(s)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),s!=null?Yc(t,y,nn(s)):a!=null?Yc(t,y,nn(a)):c!=null&&t.removeAttribute("value"),h==null&&p!=null&&(t.defaultChecked=!!p),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?t.name=""+nn(E):t.removeAttribute("name")}function ip(t,s,a,c,h,p,y,E){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(t.type=p),s!=null||a!=null){if(!(p!=="submit"&&p!=="reset"||s!=null)){Kc(t);return}a=a!=null?""+nn(a):"",s=s!=null?""+nn(s):a,E||s===t.value||(t.value=s),t.defaultValue=s}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=E?t.checked:!!c,t.defaultChecked=!!c,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),Kc(t)}function Yc(t,s,a){s==="number"&&Sl(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function As(t,s,a,c){if(t=t.options,s){s={};for(var h=0;h"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zc=!1;if(zn)try{var Gr={};Object.defineProperty(Gr,"passive",{get:function(){Zc=!0}}),window.addEventListener("test",Gr,Gr),window.removeEventListener("test",Gr,Gr)}catch{Zc=!1}var ci=null,Wc=null,xl=null;function up(){if(xl)return xl;var t,s=Wc,a=s.length,c,h="value"in ci?ci.value:ci.textContent,p=h.length;for(t=0;t=Yr),mp=" ",yp=!1;function bp(t,s){switch(t){case"keyup":return x1.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ms=!1;function E1(t,s){switch(t){case"compositionend":return vp(s);case"keypress":return s.which!==32?null:(yp=!0,mp);case"textInput":return t=s.data,t===mp&&yp?null:t;default:return null}}function T1(t,s){if(Ms)return t==="compositionend"||!su&&bp(t,s)?(t=up(),xl=Wc=ci=null,Ms=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:a,offset:s-t};t=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Cp(a)}}function kp(t,s){return t&&s?t===s?!0:t&&t.nodeType===3?!1:s&&s.nodeType===3?kp(t,s.parentNode):"contains"in t?t.contains(s):t.compareDocumentPosition?!!(t.compareDocumentPosition(s)&16):!1:!1}function Mp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var s=Sl(t.document);s instanceof t.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)t=s.contentWindow;else break;s=Sl(t.document)}return s}function lu(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s&&(s==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||s==="textarea"||t.contentEditable==="true")}var L1=zn&&"documentMode"in document&&11>=document.documentMode,Os=null,ou=null,Jr=null,cu=!1;function Op(t,s,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;cu||Os==null||Os!==Sl(c)||(c=Os,"selectionStart"in c&&lu(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}),Jr&&Pr(Jr,c)||(Jr=c,c=mo(ou,"onSelect"),0>=y,h-=y,An=1<<32-Ct(s)+h|a<pe?(Se=ie,ie=null):Se=ie.sibling;var Ae=H(j,ie,D[pe],F);if(Ae===null){ie===null&&(ie=Se);break}t&&ie&&Ae.alternate===null&&s(j,ie),k=p(Ae,k,pe),Te===null?se=Ae:Te.sibling=Ae,Te=Ae,ie=Se}if(pe===D.length)return a(j,ie),we&&Hn(j,pe),se;if(ie===null){for(;pepe?(Se=ie,ie=null):Se=ie.sibling;var Oi=H(j,ie,Ae.value,F);if(Oi===null){ie===null&&(ie=Se);break}t&&ie&&Oi.alternate===null&&s(j,ie),k=p(Oi,k,pe),Te===null?se=Oi:Te.sibling=Oi,Te=Oi,ie=Se}if(Ae.done)return a(j,ie),we&&Hn(j,pe),se;if(ie===null){for(;!Ae.done;pe++,Ae=D.next())Ae=Q(j,Ae.value,F),Ae!==null&&(k=p(Ae,k,pe),Te===null?se=Ae:Te.sibling=Ae,Te=Ae);return we&&Hn(j,pe),se}for(ie=c(ie);!Ae.done;pe++,Ae=D.next())Ae=q(ie,j,pe,Ae.value,F),Ae!==null&&(t&&Ae.alternate!==null&&ie.delete(Ae.key===null?pe:Ae.key),k=p(Ae,k,pe),Te===null?se=Ae:Te.sibling=Ae,Te=Ae);return t&&ie.forEach(function(Ww){return s(j,Ww)}),we&&Hn(j,pe),se}function Re(j,k,D,F){if(typeof D=="object"&&D!==null&&D.type===x&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case w:e:{for(var se=D.key;k!==null;){if(k.key===se){if(se=D.type,se===x){if(k.tag===7){a(j,k.sibling),F=h(k,D.props.children),F.return=j,j=F;break e}}else if(k.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===B&&es(se)===k.type){a(j,k.sibling),F=h(k,D.props),ia(F,D),F.return=j,j=F;break e}a(j,k);break}else s(j,k);k=k.sibling}D.type===x?(F=Qi(D.props.children,j.mode,F,D.key),F.return=j,j=F):(F=jl(D.type,D.key,D.props,null,j.mode,F),ia(F,D),F.return=j,j=F)}return y(j);case T:e:{for(se=D.key;k!==null;){if(k.key===se)if(k.tag===4&&k.stateNode.containerInfo===D.containerInfo&&k.stateNode.implementation===D.implementation){a(j,k.sibling),F=h(k,D.children||[]),F.return=j,j=F;break e}else{a(j,k);break}else s(j,k);k=k.sibling}F=mu(D,j.mode,F),F.return=j,j=F}return y(j);case B:return D=es(D),Re(j,k,D,F)}if(Ue(D))return ee(j,k,D,F);if(V(D)){if(se=V(D),typeof se!="function")throw Error(r(150));return D=se.call(D),le(j,k,D,F)}if(typeof D.then=="function")return Re(j,k,Bl(D),F);if(D.$$typeof===$)return Re(j,k,Dl(j,D),F);ql(j,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,k!==null&&k.tag===6?(a(j,k.sibling),F=h(k,D),F.return=j,j=F):(a(j,k),F=gu(D,j.mode,F),F.return=j,j=F),y(j)):a(j,k)}return function(j,k,D,F){try{na=0;var se=Re(j,k,D,F);return Is=null,se}catch(ie){if(ie===$s||ie===Ul)throw ie;var Te=Xt(29,ie,null,j.mode);return Te.lanes=F,Te.return=j,Te}finally{}}}var ns=eg(!0),tg=eg(!1),pi=!1;function Nu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ku(t,s){t=t.updateQueue,s.updateQueue===t&&(s.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function gi(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function mi(t,s,a){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Ce&2)!==0){var h=c.pending;return h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s,s=Ol(t),Hp(t,null,a),s}return Ml(t,c,s,a),Ol(t)}function sa(t,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194048)!==0)){var c=s.lanes;c&=t.pendingLanes,a|=c,s.lanes=a,Xd(t,a)}}function Mu(t,s){var a=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};p===null?h=p=y:p=p.next=y,a=a.next}while(a!==null);p===null?h=p=s:p=p.next=s}else h=p=s;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:p,shared:c.shared,callbacks:c.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=s:t.next=s,a.lastBaseUpdate=s}var Ou=!1;function ra(){if(Ou){var t=qs;if(t!==null)throw t}}function aa(t,s,a,c){Ou=!1;var h=t.updateQueue;pi=!1;var p=h.firstBaseUpdate,y=h.lastBaseUpdate,E=h.shared.pending;if(E!==null){h.shared.pending=null;var C=E,z=C.next;C.next=null,y===null?p=z:y.next=z,y=C;var K=t.alternate;K!==null&&(K=K.updateQueue,E=K.lastBaseUpdate,E!==y&&(E===null?K.firstBaseUpdate=z:E.next=z,K.lastBaseUpdate=C))}if(p!==null){var Q=h.baseState;y=0,K=z=C=null,E=p;do{var H=E.lane&-536870913,q=H!==E.lane;if(q?(ve&H)===H:(c&H)===H){H!==0&&H===Bs&&(Ou=!0),K!==null&&(K=K.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ee=t,le=E;H=s;var Re=a;switch(le.tag){case 1:if(ee=le.payload,typeof ee=="function"){Q=ee.call(Re,Q,H);break e}Q=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=le.payload,H=typeof ee=="function"?ee.call(Re,Q,H):ee,H==null)break e;Q=m({},Q,H);break e;case 2:pi=!0}}H=E.callback,H!==null&&(t.flags|=64,q&&(t.flags|=8192),q=h.callbacks,q===null?h.callbacks=[H]:q.push(H))}else q={lane:H,tag:E.tag,payload:E.payload,callback:E.callback,next:null},K===null?(z=K=q,C=Q):K=K.next=q,y|=H;if(E=E.next,E===null){if(E=h.shared.pending,E===null)break;q=E,E=q.next,q.next=null,h.lastBaseUpdate=q,h.shared.pending=null}}while(!0);K===null&&(C=Q),h.baseState=C,h.firstBaseUpdate=z,h.lastBaseUpdate=K,p===null&&(h.shared.lanes=0),wi|=y,t.lanes=y,t.memoizedState=Q}}function ng(t,s){if(typeof t!="function")throw Error(r(191,t));t.call(s)}function ig(t,s){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;tp?p:8;var y=I.T,E={};I.T=E,Pu(t,!1,s,a);try{var C=h(),z=I.S;if(z!==null&&z(E,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var K=I1(C,c);ca(t,s,K,Jt(t))}else ca(t,s,c,Jt(t))}catch(Q){ca(t,s,{then:function(){},status:"rejected",reason:Q},Jt())}finally{J.p=p,y!==null&&E.types!==null&&(y.types=E.types),I.T=y}}function F1(){}function Fu(t,s,a,c){if(t.tag!==5)throw Error(r(476));var h=Dg(t).queue;Rg(t,h,s,re,a===null?F1:function(){return zg(t),a(c)})}function Dg(t){var s=t.memoizedState;if(s!==null)return s;s={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:re},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:a},next:null},t.memoizedState=s,t=t.alternate,t!==null&&(t.memoizedState=s),s}function zg(t){var s=Dg(t);s.next===null&&(s=t.alternate.memoizedState),ca(t,s.next.queue,{},Jt())}function Qu(){return dt(Aa)}function Ug(){return Pe().memoizedState}function Hg(){return Pe().memoizedState}function Q1(t){for(var s=t.return;s!==null;){switch(s.tag){case 24:case 3:var a=Jt();t=gi(a);var c=mi(s,t,a);c!==null&&(Ht(c,s,a),sa(c,s,a)),s={cache:Eu()},t.payload=s;return}s=s.return}}function P1(t,s,a){var c=Jt();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Pl(t)?qg(s,a):(a=du(t,s,a,c),a!==null&&(Ht(a,t,c),$g(a,s,c)))}function Bg(t,s,a){var c=Jt();ca(t,s,a,c)}function ca(t,s,a,c){var h={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Pl(t))qg(s,h);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=s.lastRenderedReducer,p!==null))try{var y=s.lastRenderedState,E=p(y,a);if(h.hasEagerState=!0,h.eagerState=E,Kt(E,y))return Ml(t,s,h,0),De===null&&kl(),!1}catch{}finally{}if(a=du(t,s,h,c),a!==null)return Ht(a,t,c),$g(a,s,c),!0}return!1}function Pu(t,s,a,c){if(c={lane:2,revertLane:kf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Pl(t)){if(s)throw Error(r(479))}else s=du(t,a,c,2),s!==null&&Ht(s,t,2)}function Pl(t){var s=t.alternate;return t===de||s!==null&&s===de}function qg(t,s){Gs=Vl=!0;var a=t.pending;a===null?s.next=s:(s.next=a.next,a.next=s),t.pending=s}function $g(t,s,a){if((a&4194048)!==0){var c=s.lanes;c&=t.pendingLanes,a|=c,s.lanes=a,Xd(t,a)}}var ua={readContext:dt,use:Xl,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};ua.useEffectEvent=Ye;var Ig={readContext:dt,use:Xl,useCallback:function(t,s){return Nt().memoizedState=[t,s===void 0?null:s],t},useContext:dt,useEffect:Tg,useImperativeHandle:function(t,s,a){a=a!=null?a.concat([t]):null,Fl(4194308,4,kg.bind(null,s,t),a)},useLayoutEffect:function(t,s){return Fl(4194308,4,t,s)},useInsertionEffect:function(t,s){Fl(4,2,t,s)},useMemo:function(t,s){var a=Nt();s=s===void 0?null:s;var c=t();if(is){Tn(!0);try{t()}finally{Tn(!1)}}return a.memoizedState=[c,s],c},useReducer:function(t,s,a){var c=Nt();if(a!==void 0){var h=a(s);if(is){Tn(!0);try{a(s)}finally{Tn(!1)}}}else h=s;return c.memoizedState=c.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},c.queue=t,t=t.dispatch=P1.bind(null,de,t),[c.memoizedState,t]},useRef:function(t){var s=Nt();return t={current:t},s.memoizedState=t},useState:function(t){t=Vu(t);var s=t.queue,a=Bg.bind(null,de,s);return s.dispatch=a,[t.memoizedState,a]},useDebugValue:Xu,useDeferredValue:function(t,s){var a=Nt();return Yu(a,t,s)},useTransition:function(){var t=Vu(!1);return t=Rg.bind(null,de,t.queue,!0,!1),Nt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,s,a){var c=de,h=Nt();if(we){if(a===void 0)throw Error(r(407));a=a()}else{if(a=s(),De===null)throw Error(r(349));(ve&127)!==0||cg(c,s,a)}h.memoizedState=a;var p={value:a,getSnapshot:s};return h.queue=p,Tg(fg.bind(null,c,p,t),[t]),c.flags|=2048,Xs(9,{destroy:void 0},ug.bind(null,c,p,a,s),null),a},useId:function(){var t=Nt(),s=De.identifierPrefix;if(we){var a=Cn,c=An;a=(c&~(1<<32-Ct(c)-1)).toString(32)+a,s="_"+s+"R_"+a,a=Gl++,0<\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof c.is=="string"?y.createElement("select",{is:c.is}):y.createElement("select"),c.multiple?p.multiple=!0:c.size&&(p.size=c.size);break;default:p=typeof c.is=="string"?y.createElement(h,{is:c.is}):y.createElement(h)}}p[ft]=s,p[jt]=c;e:for(y=s.child;y!==null;){if(y.tag===5||y.tag===6)p.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===s)break e;for(;y.sibling===null;){if(y.return===null||y.return===s)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}s.stateNode=p;e:switch(gt(p,h,c),h){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Gn(s)}}return Be(s),ff(s,s.type,t===null?null:t.memoizedProps,s.pendingProps,a),null;case 6:if(t&&s.stateNode!=null)t.memoizedProps!==c&&Gn(s);else{if(typeof c!="string"&&s.stateNode===null)throw Error(r(166));if(t=he.current,Us(s)){if(t=s.stateNode,a=s.memoizedProps,c=null,h=ht,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}t[ft]=s,t=!!(t.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||ly(t.nodeValue,a)),t||hi(s,!0)}else t=yo(t).createTextNode(c),t[ft]=s,s.stateNode=t}return Be(s),null;case 31:if(a=s.memoizedState,t===null||t.memoizedState!==null){if(c=Us(s),a!==null){if(t===null){if(!c)throw Error(r(318));if(t=s.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[ft]=s}else Pi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Be(s),t=!1}else a=Su(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return s.flags&256?(Ft(s),s):(Ft(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Be(s),null;case 13:if(c=s.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Us(s),c!==null&&c.dehydrated!==null){if(t===null){if(!h)throw Error(r(318));if(h=s.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(r(317));h[ft]=s}else Pi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Be(s),h=!1}else h=Su(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return s.flags&256?(Ft(s),s):(Ft(s),null)}return Ft(s),(s.flags&128)!==0?(s.lanes=a,s):(a=c!==null,t=t!==null&&t.memoizedState!==null,a&&(c=s.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool),p=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(p=c.memoizedState.cachePool.pool),p!==h&&(c.flags|=2048)),a!==t&&a&&(s.child.flags|=8192),to(s,s.updateQueue),Be(s),null);case 4:return ke(),t===null&&Lf(s.stateNode.containerInfo),Be(s),null;case 10:return qn(s.type),Be(s),null;case 19:if(Y(Qe),c=s.memoizedState,c===null)return Be(s),null;if(h=(s.flags&128)!==0,p=c.rendering,p===null)if(h)ha(c,!1);else{if(Fe!==0||t!==null&&(t.flags&128)!==0)for(t=s.child;t!==null;){if(p=Il(t),p!==null){for(s.flags|=128,ha(c,!1),t=p.updateQueue,s.updateQueue=t,to(s,t),s.subtreeFlags=0,t=a,a=s.child;a!==null;)Bp(a,t),a=a.sibling;return Z(Qe,Qe.current&1|2),we&&Hn(s,c.treeForkCount),s.child}t=t.sibling}c.tail!==null&&Tt()>ao&&(s.flags|=128,h=!0,ha(c,!1),s.lanes=4194304)}else{if(!h)if(t=Il(p),t!==null){if(s.flags|=128,h=!0,t=t.updateQueue,s.updateQueue=t,to(s,t),ha(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!we)return Be(s),null}else 2*Tt()-c.renderingStartTime>ao&&a!==536870912&&(s.flags|=128,h=!0,ha(c,!1),s.lanes=4194304);c.isBackwards?(p.sibling=s.child,s.child=p):(t=c.last,t!==null?t.sibling=p:s.child=p,c.last=p)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Tt(),t.sibling=null,a=Qe.current,Z(Qe,h?a&1|2:a&1),we&&Hn(s,c.treeForkCount),t):(Be(s),null);case 22:case 23:return Ft(s),Lu(),c=s.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(s.flags|=8192):c&&(s.flags|=8192),c?(a&536870912)!==0&&(s.flags&128)===0&&(Be(s),s.subtreeFlags&6&&(s.flags|=8192)):Be(s),a=s.updateQueue,a!==null&&to(s,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==a&&(s.flags|=2048),t!==null&&Y(Wi),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),s.memoizedState.cache!==a&&(s.flags|=2048),qn(We),Be(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function tw(t,s){switch(bu(s),s.tag){case 1:return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 3:return qn(We),ke(),t=s.flags,(t&65536)!==0&&(t&128)===0?(s.flags=t&-65537|128,s):null;case 26:case 27:case 5:return fe(s),null;case 31:if(s.memoizedState!==null){if(Ft(s),s.alternate===null)throw Error(r(340));Pi()}return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 13:if(Ft(s),t=s.memoizedState,t!==null&&t.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Pi()}return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 19:return Y(Qe),null;case 4:return ke(),null;case 10:return qn(s.type),null;case 22:case 23:return Ft(s),Lu(),t!==null&&Y(Wi),t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 24:return qn(We),null;case 25:return null;default:return null}}function hm(t,s){switch(bu(s),s.tag){case 3:qn(We),ke();break;case 26:case 27:case 5:fe(s);break;case 4:ke();break;case 31:s.memoizedState!==null&&Ft(s);break;case 13:Ft(s);break;case 19:Y(Qe);break;case 10:qn(s.type);break;case 22:case 23:Ft(s),Lu(),t!==null&&Y(Wi);break;case 24:qn(We)}}function da(t,s){try{var a=s.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var h=c.next;a=h;do{if((a.tag&t)===t){c=void 0;var p=a.create,y=a.inst;c=p(),y.destroy=c}a=a.next}while(a!==h)}}catch(E){Oe(s,s.return,E)}}function vi(t,s,a){try{var c=s.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var p=h.next;c=p;do{if((c.tag&t)===t){var y=c.inst,E=y.destroy;if(E!==void 0){y.destroy=void 0,h=s;var C=a,z=E;try{z()}catch(K){Oe(h,C,K)}}}c=c.next}while(c!==p)}}catch(K){Oe(s,s.return,K)}}function dm(t){var s=t.updateQueue;if(s!==null){var a=t.stateNode;try{ig(s,a)}catch(c){Oe(t,t.return,c)}}}function pm(t,s,a){a.props=ss(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(c){Oe(t,s,c)}}function pa(t,s){try{var a=t.ref;if(a!==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 a=="function"?t.refCleanup=a(c):a.current=c}}catch(h){Oe(t,s,h)}}function Nn(t,s){var a=t.ref,c=t.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(h){Oe(t,s,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){Oe(t,s,h)}else a.current=null}function gm(t){var s=t.type,a=t.memoizedProps,c=t.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break e;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(h){Oe(t,t.return,h)}}function hf(t,s,a){try{var c=t.stateNode;_w(c,t.type,a,s),c[jt]=s}catch(h){Oe(t,t.return,h)}}function mm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ai(t.type)||t.tag===4}function df(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||mm(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&&Ai(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 pf(t,s,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,s?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,s):(s=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,s.appendChild(t),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=Dn));else if(c!==4&&(c===27&&Ai(t.type)&&(a=t.stateNode,s=null),t=t.child,t!==null))for(pf(t,s,a),t=t.sibling;t!==null;)pf(t,s,a),t=t.sibling}function no(t,s,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,s?a.insertBefore(t,s):a.appendChild(t);else if(c!==4&&(c===27&&Ai(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(no(t,s,a),t=t.sibling;t!==null;)no(t,s,a),t=t.sibling}function ym(t){var s=t.stateNode,a=t.memoizedProps;try{for(var c=t.type,h=s.attributes;h.length;)s.removeAttributeNode(h[0]);gt(s,c,a),s[ft]=t,s[jt]=a}catch(p){Oe(t,t.return,p)}}var Kn=!1,nt=!1,gf=!1,bm=typeof WeakSet=="function"?WeakSet:Set,ct=null;function nw(t,s){if(t=t.containerInfo,zf=Eo,t=Mp(t),lu(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,p=c.focusNode;c=c.focusOffset;try{a.nodeType,p.nodeType}catch{a=null;break e}var y=0,E=-1,C=-1,z=0,K=0,Q=t,H=null;t:for(;;){for(var q;Q!==a||h!==0&&Q.nodeType!==3||(E=y+h),Q!==p||c!==0&&Q.nodeType!==3||(C=y+c),Q.nodeType===3&&(y+=Q.nodeValue.length),(q=Q.firstChild)!==null;)H=Q,Q=q;for(;;){if(Q===t)break t;if(H===a&&++z===h&&(E=y),H===p&&++K===c&&(C=y),(q=Q.nextSibling)!==null)break;Q=H,H=Q.parentNode}Q=q}a=E===-1||C===-1?null:{start:E,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(Uf={focusedElem:t,selectionRange:a},Eo=!1,ct=s;ct!==null;)if(s=ct,t=s.child,(s.subtreeFlags&1028)!==0&&t!==null)t.return=s,ct=t;else for(;ct!==null;){switch(s=ct,p=s.alternate,t=s.flags,s.tag){case 0:if((t&4)!==0&&(t=s.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a title"))),gt(p,c,a),p[ft]=t,ot(p),c=p;break e;case"link":var y=Ey("link","href",h).get(c+(a.href||""));if(y){for(var E=0;ERe&&(y=Re,Re=le,le=y);var j=Np(E,le),k=Np(E,Re);if(j&&k&&(q.rangeCount!==1||q.anchorNode!==j.node||q.anchorOffset!==j.offset||q.focusNode!==k.node||q.focusOffset!==k.offset)){var D=Q.createRange();D.setStart(j.node,j.offset),q.removeAllRanges(),le>Re?(q.addRange(D),q.extend(k.node,k.offset)):(D.setEnd(k.node,k.offset),q.addRange(D))}}}}for(Q=[],q=E;q=q.parentNode;)q.nodeType===1&&Q.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;Ea?32:a,I.T=null,a=xf,xf=null;var p=_i,y=Pn;if(at=0,Js=_i=null,Pn=0,(Ce&6)!==0)throw Error(r(331));var E=Ce;if(Ce|=4,km(p.current),Am(p,p.current,y,a),Ce=E,Sa(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(En,p)}catch{}return!0}finally{J.p=h,I.T=c,Ym(t,s)}}function Qm(t,s,a){s=an(a,s),s=ef(t.stateNode,s,2),t=mi(t,s,2),t!==null&&(qr(t,2),kn(t))}function Oe(t,s,a){if(t.tag===3)Qm(t,t,a);else for(;s!==null;){if(s.tag===3){Qm(s,t,a);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(xi===null||!xi.has(c))){t=an(a,t),a=Pg(2),c=mi(s,a,2),c!==null&&(Jg(a,c,s,t),qr(c,2),kn(c));break}}s=s.return}}function Af(t,s,a){var c=t.pingCache;if(c===null){c=t.pingCache=new rw;var h=new Set;c.set(s,h)}else h=c.get(s),h===void 0&&(h=new Set,c.set(s,h));h.has(a)||(bf=!0,h.add(a),t=uw.bind(null,t,s,a),s.then(t,t))}function uw(t,s,a){var c=t.pingCache;c!==null&&c.delete(s),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,De===t&&(ve&a)===a&&(Fe===4||Fe===3&&(ve&62914560)===ve&&300>Tt()-ro?(Ce&2)===0&&Zs(t,0):vf|=a,Ps===ve&&(Ps=0)),kn(t)}function Pm(t,s){s===0&&(s=Gd()),t=Fi(t,s),t!==null&&(qr(t,s),kn(t))}function fw(t){var s=t.memoizedState,a=0;s!==null&&(a=s.retryLane),Pm(t,a)}function hw(t,s){var a=0;switch(t.tag){case 31:case 13:var c=t.stateNode,h=t.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(s),Pm(t,a)}function dw(t,s){return ri(t,s)}var ho=null,er=null,Cf=!1,po=!1,Nf=!1,Ti=0;function kn(t){t!==er&&t.next===null&&(er===null?ho=er=t:er=er.next=t),po=!0,Cf||(Cf=!0,gw())}function Sa(t,s){if(!Nf&&po){Nf=!0;do for(var a=!1,c=ho;c!==null;){if(t!==0){var h=c.pendingLanes;if(h===0)var p=0;else{var y=c.suspendedLanes,E=c.pingedLanes;p=(1<<31-Ct(42|t)+1)-1,p&=h&~(y&~E),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(a=!0,ey(c,p))}else p=ve,p=yl(c,c===De?p:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(p&3)===0||Br(c,p)||(a=!0,ey(c,p));c=c.next}while(a);Nf=!1}}function pw(){Jm()}function Jm(){po=Cf=!1;var t=0;Ti!==0&&Tw()&&(t=Ti);for(var s=Tt(),a=null,c=ho;c!==null;){var h=c.next,p=Zm(c,s);p===0?(c.next=null,a===null?ho=h:a.next=h,h===null&&(er=a)):(a=c,(t!==0||(p&3)!==0)&&(po=!0)),c=h}at!==0&&at!==5||Sa(t),Ti!==0&&(Ti=0)}function Zm(t,s){for(var a=t.suspendedLanes,c=t.pingedLanes,h=t.expirationTimes,p=t.pendingLanes&-62914561;0E)break;var K=C.transferSize,Q=C.initiatorType;K&&oy(Q)&&(C=C.responseEnd,y+=K*(C"u"?null:document;function Sy(t,s,a){var c=tr;if(c&&typeof s=="string"&&s){var h=sn(s);h='link[rel="'+t+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),vy.has(h)||(vy.add(h),t={rel:t,crossOrigin:a,href:s},c.querySelector(h)===null&&(s=c.createElement("link"),gt(s,"link",t),ot(s),c.head.appendChild(s)))}}function Rw(t){Jn.D(t),Sy("dns-prefetch",t,null)}function Dw(t,s){Jn.C(t,s),Sy("preconnect",t,s)}function zw(t,s,a){Jn.L(t,s,a);var c=tr;if(c&&t&&s){var h='link[rel="preload"][as="'+sn(s)+'"]';s==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+sn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+sn(a.imageSizes)+'"]')):h+='[href="'+sn(t)+'"]';var p=h;switch(s){case"style":p=nr(t);break;case"script":p=ir(t)}hn.has(p)||(t=m({rel:"preload",href:s==="image"&&a&&a.imageSrcSet?void 0:t,as:s},a),hn.set(p,t),c.querySelector(h)!==null||s==="style"&&c.querySelector(Ea(p))||s==="script"&&c.querySelector(Ta(p))||(s=c.createElement("link"),gt(s,"link",t),ot(s),c.head.appendChild(s)))}}function Uw(t,s){Jn.m(t,s);var a=tr;if(a&&t){var c=s&&typeof s.as=="string"?s.as:"script",h='link[rel="modulepreload"][as="'+sn(c)+'"][href="'+sn(t)+'"]',p=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=ir(t)}if(!hn.has(p)&&(t=m({rel:"modulepreload",href:t},s),hn.set(p,t),a.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ta(p)))return}c=a.createElement("link"),gt(c,"link",t),ot(c),a.head.appendChild(c)}}}function Hw(t,s,a){Jn.S(t,s,a);var c=tr;if(c&&t){var h=Es(c).hoistableStyles,p=nr(t);s=s||"default";var y=h.get(p);if(!y){var E={loading:0,preload:null};if(y=c.querySelector(Ea(p)))E.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":s},a),(a=hn.get(p))&&Gf(t,a);var C=y=c.createElement("link");ot(C),gt(C,"link",t),C._p=new Promise(function(z,K){C.onload=z,C.onerror=K}),C.addEventListener("load",function(){E.loading|=1}),C.addEventListener("error",function(){E.loading|=2}),E.loading|=4,vo(y,s,c)}y={type:"stylesheet",instance:y,count:1,state:E},h.set(p,y)}}}function Bw(t,s){Jn.X(t,s);var a=tr;if(a&&t){var c=Es(a).hoistableScripts,h=ir(t),p=c.get(h);p||(p=a.querySelector(Ta(h)),p||(t=m({src:t,async:!0},s),(s=hn.get(h))&&Kf(t,s),p=a.createElement("script"),ot(p),gt(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(h,p))}}function qw(t,s){Jn.M(t,s);var a=tr;if(a&&t){var c=Es(a).hoistableScripts,h=ir(t),p=c.get(h);p||(p=a.querySelector(Ta(h)),p||(t=m({src:t,async:!0,type:"module"},s),(s=hn.get(h))&&Kf(t,s),p=a.createElement("script"),ot(p),gt(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(h,p))}}function wy(t,s,a,c){var h=(h=he.current)?bo(h):null;if(!h)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(s=nr(a.href),a=Es(h).hoistableStyles,c=a.get(s),c||(c={type:"style",instance:null,count:0,state:null},a.set(s,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=nr(a.href);var p=Es(h).hoistableStyles,y=p.get(t);if(y||(h=h.ownerDocument||h,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(t,y),(p=h.querySelector(Ea(t)))&&!p._p&&(y.instance=p,y.state.loading=5),hn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},hn.set(t,a),p||$w(h,t,a,y.state))),s&&c===null)throw Error(r(528,""));return y}if(s&&c!==null)throw Error(r(529,""));return null;case"script":return s=a.async,a=a.src,typeof a=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=ir(a),a=Es(h).hoistableScripts,c=a.get(s),c||(c={type:"script",instance:null,count:0,state:null},a.set(s,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function nr(t){return'href="'+sn(t)+'"'}function Ea(t){return'link[rel="stylesheet"]['+t+"]"}function xy(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function $w(t,s,a,c){t.querySelector('link[rel="preload"][as="style"]['+s+"]")?c.loading=1:(s=t.createElement("link"),c.preload=s,s.addEventListener("load",function(){return c.loading|=1}),s.addEventListener("error",function(){return c.loading|=2}),gt(s,"link",a),ot(s),t.head.appendChild(s))}function ir(t){return'[src="'+sn(t)+'"]'}function Ta(t){return"script[async]"+t}function _y(t,s,a){if(s.count++,s.instance===null)switch(s.type){case"style":var c=t.querySelector('style[data-href~="'+sn(a.href)+'"]');if(c)return s.instance=c,ot(c),c;var h=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),ot(c),gt(c,"style",h),vo(c,a.precedence,t),s.instance=c;case"stylesheet":h=nr(a.href);var p=t.querySelector(Ea(h));if(p)return s.state.loading|=4,s.instance=p,ot(p),p;c=xy(a),(h=hn.get(h))&&Gf(c,h),p=(t.ownerDocument||t).createElement("link"),ot(p);var y=p;return y._p=new Promise(function(E,C){y.onload=E,y.onerror=C}),gt(p,"link",c),s.state.loading|=4,vo(p,a.precedence,t),s.instance=p;case"script":return p=ir(a.src),(h=t.querySelector(Ta(p)))?(s.instance=h,ot(h),h):(c=a,(h=hn.get(p))&&(c=m({},a),Kf(c,h)),t=t.ownerDocument||t,h=t.createElement("script"),ot(h),gt(h,"link",c),t.head.appendChild(h),s.instance=h);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(c=s.instance,s.state.loading|=4,vo(c,a.precedence,t));return s.instance}function vo(t,s,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,p=h,y=0;y title"):null)}function Iw(t,s,a){if(a===1||s.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return t=s.disabled,typeof s.precedence=="string"&&t==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Ay(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Vw(t,s,a,c){if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var h=nr(c.href),p=s.querySelector(Ea(h));if(p){s=p._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(t.count++,t=wo.bind(t),s.then(t,t)),a.state.loading|=4,a.instance=p,ot(p);return}p=s.ownerDocument||s,c=xy(c),(h=hn.get(h))&&Gf(c,h),p=p.createElement("link"),ot(p);var y=p;y._p=new Promise(function(E,C){y.onload=E,y.onerror=C}),gt(p,"link",c),a.instance=p}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,s),(s=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=wo.bind(t),s.addEventListener("load",a),s.addEventListener("error",a))}}var Xf=0;function Gw(t,s){return t.stylesheets&&t.count===0&&_o(t,t.stylesheets),0Xf?50:800)+s);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(h)}}:null}function wo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_o(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var xo=null;function _o(t,s){t.stylesheets=null,t.unsuspend!==null&&(t.count++,xo=new Map,s.forEach(Kw,t),xo=null,wo.call(t))}function Kw(t,s){if(!(s.state.loading&4)){var a=xo.get(t);if(a)var c=a.get(null);else{a=new Map,xo.set(t,a);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),th.exports=gx(),th.exports}var v2=mx();const yx=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",group:"configuration"}],["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"}],["BrowserType.connectOverCDPTransport",{title:"Connect over CDP transport"}],["Browser.startServer",{title:"Start server"}],["Browser.stopServer",{title:"Stop server"}],["Browser.close",{title:"Close browser",pause:!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}],["Debugger.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}],["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",pause:!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",group:"configuration"}],["BrowserContext.setStorageState",{title:"Set storage state",group:"configuration"}],["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",pause:!0}],["Page.clearConsoleMessages",{title:"Clear console messages"}],["Page.consoleMessages",{title:"Get console messages",group:"getter"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0,pause:!0}],["Page.exposeBinding",{title:"Expose binding",group:"configuration"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0,pause:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0,pause:!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,pause:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0,pause:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0,pause:!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,pause:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.clearPageErrors",{title:"Clear page errors"}],["Page.pageErrors",{title:"Get page errors",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.requests",{title:"Get network requests",group:"getter"}],["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.pickLocator",{title:"Pick locator",group:"configuration"}],["Page.cancelPickLocator",{title:"Cancel pick locator",group:"configuration"}],["Page.screencastShowOverlay",{title:"Show overlay",group:"configuration"}],["Page.screencastRemoveOverlay",{title:"Remove overlay",group:"configuration"}],["Page.screencastChapter",{title:"Show chapter overlay",group:"configuration"}],["Page.screencastSetOverlayVisible",{title:"Set overlay visibility",group:"configuration"}],["Page.screencastShowActions",{title:"Show actions",group:"configuration"}],["Page.screencastHideActions",{title:"Remove actions",group:"configuration"}],["Page.screencastStart",{title:"Start screencast",group:"configuration"}],["Page.screencastStop",{title:"Stop screencast",group:"configuration"}],["Page.updateSubscription",{internal:!0}],["Page.setDockTile",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0,pause:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pause:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0,pause:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0,pause:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",group:"getter"}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0,pause:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.content",{title:"Get content",snapshot:!0,pause:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0,pause:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0,pause:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pause:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0,pause:!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,pause:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0,pause:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,pause:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,pause:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,pause:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,pause:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,pause:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,pause:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,pause:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,pause:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,pause:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0,pause:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.setContent",{title:"Set content",snapshot:!0,pause:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,pause:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0,pause:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0,pause:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["Worker.updateSubscription",{internal:!0}],["Disposable.dispose",{internal:!0}],["JSHandle.dispose",{internal:!0}],["ElementHandle.dispose",{internal:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pause:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pause:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pause:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pause:!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,pause:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pause:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0,pause:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.contentFrame",{title:"Get content frame",group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0,pause:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0,pause:!0}],["ElementHandle.getAttribute",{title:"Get attribute",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0,pause:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0,pause:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0,pause:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0,pause:!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.httpVersion",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Debugger.requestPause",{title:"Pause on next call",group:"configuration"}],["Debugger.resume",{title:"Resume",group:"configuration"}],["Debugger.next",{title:"Step to next call",group:"configuration"}],["Debugger.runTo",{title:"Run to location",group:"configuration"}],["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}]]);function Qh(n){return yx.get(n.type+"."+n.method)}function s0(n,e){var i;return(i=bx(n,e))==null?void 0:i.replaceAll(` `,"\\n")}function bx(n,e){if(n)for(const i of e.split("|")){if(i==="url")try{const l=new URL(n[i]);return l.protocol==="data:"?l.protocol:l.protocol==="about:"?n[i]:l.pathname+l.search}catch{if(n[i]!==void 0)return n[i]}if(i==="timeNumber"&&n[i]!==void 0)return new Date(n[i]).toString();const r=vx(n,i);if(r!==void 0)return r}}function vx(n,e){const i=e.split(".");let r=n;for(const l of i){if(typeof r!="object"||r===null)return;r=r[l]}if(r!==void 0)return String(r)}function Sx(n){var i;return(n.title??((i=Qh(n))==null?void 0:i.title)??n.method).replace(/\{([^}]+)\}/g,(r,l)=>s0(n.params,l)??r)}function wx(n){var e;return(e=Qh(n))==null?void 0:e.group}const Ba=Symbol("context"),r0=Symbol("nextInContext"),a0=Symbol("prevByEndTime"),l0=Symbol("nextByStartTime"),Zy=Symbol("events");class S2{constructor(e,i){var l,o;i.forEach(u=>xx(u));const r=i.find(u=>u.origin==="library");this.traceUri=e,this.browserName=(r==null?void 0:r.browserName)||"",this.sdkLanguage=r==null?void 0:r.sdkLanguage,this.channel=r==null?void 0:r.channel,this.testIdAttributeName=r==null?void 0:r.testIdAttributeName,this.platform=(r==null?void 0:r.platform)||"",this.playwrightVersion=(l=i.find(u=>u.playwrightVersion))==null?void 0:l.playwrightVersion,this.title=(r==null?void 0:r.title)||"",this.options=(r==null?void 0:r.options)||{},this.testTimeout=(o=i.find(u=>u.origin==="testRunner"))==null?void 0:o.testTimeout,this.actions=_x(i),this.pages=[].concat(...i.map(u=>u.pages)),this.wallTime=i.map(u=>u.wallTime).reduce((u,f)=>Math.min(u||Number.MAX_VALUE,f),Number.MAX_VALUE),this.startTime=i.map(u=>u.startTime).reduce((u,f)=>Math.min(u,f),Number.MAX_VALUE),this.endTime=i.map(u=>u.endTime).reduce((u,f)=>Math.max(u,f),Number.MIN_VALUE),this.events=[].concat(...i.map(u=>u.events)),this.stdio=[].concat(...i.map(u=>u.stdio)),this.errors=[].concat(...i.map(u=>u.errors)),this.hasSource=i.some(u=>u.hasSource),this.hasStepData=i.some(u=>u.origin==="testRunner"),this.resources=[...i.map(u=>u.resources)].flat().map(u=>({...u,id:`${u.pageref}-${u.time}-${u.request.url}`})),this.attachments=this.actions.flatMap(u=>{var f;return((f=u.attachments)==null?void 0:f.map(d=>({...d,callId:u.callId,traceUri:e})))??[]}),this.visibleAttachments=this.attachments.filter(u=>!u.name.startsWith("_")),this.events.sort((u,f)=>u.time-f.time),this.resources.sort((u,f)=>u._monotonicTime-f._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Mx(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const u of this.actions)u.group=u.group??wx({type:u.class,method:u.method}),u.group&&this.actionCounters.set(u.group,1+(this.actionCounters.get(u.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(r=>!r.group||i.has(r.group))}renderActionTree(e){const i=this.filteredActions(e??[]),{rootItem:r}=o0(i),l=[],o=(u,f)=>{const d=Sx({...u.action,type:u.action.class});l.push(`${f}${d||u.id}`);for(const g of u.children)o(g,f+" ")};return r.children.forEach(u=>o(u,"")),l}_errorDescriptorsFromActions(){var i;const e=[];for(const r of this.actions||[])(i=r.error)!=null&&i.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,i)=>({stack:e.stack,message:e.message}))}}function xx(n){for(const i of n.pages)i[Ba]=n;for(let i=0;i=0;i--){const r=n.actions[i];r[r0]=e,r.class!=="Route"&&(e=r)}for(const i of n.events)i[Ba]=n;for(const i of n.resources)i[Ba]=n}function _x(n){const e=[],i=Ex(n);e.push(...i),e.sort((r,l)=>l.parentId===r.callId?1:r.parentId===l.callId?-1:r.endTime-l.endTime);for(let r=1;rl.parentId===r.callId?-1:r.parentId===l.callId?1:r.startTime-l.startTime);for(let r=0;r+1u.origin==="library"),r=n.filter(u=>u.origin==="testRunner");if(!r.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@${++Wy}`,{...f,context:u});const l=Ax(r,e);l&&Tx(i,l);const o=new Map;for(const u of r)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@${++Wy}`,{...f,context:u})}return[...e.values()]}function Tx(n,e){for(const i of n){i.startTime+=e,i.endTime+=e;for(const r of i.actions)r.startTime&&(r.startTime+=e),r.endTime&&(r.endTime+=e);for(const r of i.events)r.time+=e;for(const r of i.stdio)r.timestamp+=e;for(const r of i.pages)for(const l of r.screencastFrames)l.timestamp+=e;for(const r of i.resources)r._monotonicTime&&(r._monotonicTime+=e)}}function Ax(n,e){for(const i of n)for(const r of i.actions){if(!r.startTime)continue;const l=r.stepId?e.get(r.stepId):void 0;if(l)return r.startTime-l.startTime}return 0}function o0(n){const e=new Map;for(const l of n)e.set(l.callId,{id:l.callId,parent:void 0,children:[],action:l});const i={action:{...Ox},id:"",parent:void 0,children:[]};for(const l of e.values()){i.action.startTime=Math.min(i.action.startTime,l.action.startTime),i.action.endTime=Math.max(i.action.endTime,l.action.endTime);const o=l.action.parentId&&e.get(l.action.parentId)||i;o.children.push(l),l.parent=o}const r=l=>{for(const o of l.children)o.action.stack=o.action.stack??l.action.stack,r(o)};return r(i),{rootItem:i,itemMap:e}}function c0(n){return n[Ba]}function Cx(n){return n[r0]}function eb(n){return n[a0]}function tb(n){return n[l0]}function Nx(n){let e=0,i=0;for(const r of kx(n)){if(r.type==="console"){const l=r.messageType;l==="warning"?++i:l==="error"&&++e}r.type==="event"&&r.method==="pageError"&&++e}return{errors:e,warnings:i}}function kx(n){let e=n[Zy];if(e)return e;const i=Cx(n);return e=c0(n).events.filter(r=>r.time>=n.startTime&&(!i||r.time{const d=Math.max(l,n)*window.devicePixelRatio,[g,b]=pn(o?o+"."+r+":size":void 0,d),[m,S]=pn(o?o+"."+r+":size":void 0,d),[w,T]=R.useState(null),[x,_]=ms();let A;r==="vertical"?(A=m/window.devicePixelRatio,x&&x.heightT({offset:r==="vertical"?$.clientY:$.clientX,size:A}),onMouseUp:()=>T(null),onMouseMove:$=>{if(!$.buttons)T(null);else if(w){const X=(r==="vertical"?$.clientY:$.clientX)-w.offset,U=i?w.size+X:w.size-X,B=$.target.parentElement.getBoundingClientRect(),O=Math.min(Math.max(l,U),(r==="vertical"?B.height:B.width)-l);r==="vertical"?S(O*window.devicePixelRatio):b(O*window.devicePixelRatio)}}})]})};function bt(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0ms";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 r=i/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function Lx(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"}const it=function(n,e,i){return n>=e&&n<=i};function Bt(n){return it(n,48,57)}function nb(n){return Bt(n)||it(n,65,70)||it(n,97,102)}function Rx(n){return it(n,65,90)}function Dx(n){return it(n,97,122)}function zx(n){return Rx(n)||Dx(n)}function Ux(n){return n>=128}function Vo(n){return zx(n)||Ux(n)||n===95}function ib(n){return Vo(n)||Bt(n)||n===45}function Hx(n){return it(n,0,8)||n===11||it(n,14,31)||n===127}function Go(n){return n===10}function Zn(n){return Go(n)||n===9||n===32}const Bx=1114111;class Ph extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function qx(n){const e=[];for(let i=0;i=e.length?-1:e[V]},u=function(V){if(V===void 0&&(V=1),V>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(i+V)},f=function(V){return V===void 0&&(V=1),i+=V,l=o(i),!0},d=function(){return i-=1,!0},g=function(V){return V===void 0&&(V=l),V===-1},b=function(){if(m(),f(),Zn(l)){for(;Zn(u());)f();return new ic}else{if(l===34)return T();if(l===35)if(ib(u())||A(u(1),u(2))){const V=new _0("");return $(u(1),u(2),u(3))&&(V.type="id"),V.value=L(),V}else return new mt(l);else return l===36?u()===61?(f(),new Gx):new mt(l):l===39?T():l===40?new S0:l===41?new Jh:l===42?u()===61?(f(),new Kx):new mt(l):l===43?U()?(d(),S()):new mt(l):l===44?new m0:l===45?U()?(d(),S()):u(1)===45&&u(2)===62?(f(2),new d0):G()?(d(),w()):new mt(l):l===46?U()?(d(),S()):new mt(l):l===58?new p0:l===59?new g0:l===60?u(1)===33&&u(2)===45&&u(3)===45?(f(3),new h0):new mt(l):l===64?$(u(1),u(2),u(3))?new x0(L()):new mt(l):l===91?new v0:l===92?N()?(d(),w()):new mt(l):l===93?new Ah:l===94?u()===61?(f(),new Vx):new mt(l):l===123?new y0:l===124?u()===61?(f(),new Ix):u()===124?(f(),new w0):new mt(l):l===125?new b0:l===126?u()===61?(f(),new $x):new mt(l):Bt(l)?(d(),S()):Vo(l)?(d(),w()):g()?new Xo:new mt(l)}},m=function(){for(;u(1)===47&&u(2)===42;)for(f(2);;)if(f(),l===42&&u()===47){f();break}else if(g())return},S=function(){const V=B();if($(u(1),u(2),u(3))){const W=new Xx;return W.value=V.value,W.repr=V.repr,W.type=V.type,W.unit=L(),W}else if(u()===37){f();const W=new A0;return W.value=V.value,W.repr=V.repr,W}else{const W=new T0;return W.value=V.value,W.repr=V.repr,W.type=V.type,W}},w=function(){const V=L();if(V.toLowerCase()==="url"&&u()===40){for(f();Zn(u(1))&&Zn(u(2));)f();return u()===34||u()===39?new Ka(V):Zn(u())&&(u(2)===34||u(2)===39)?new Ka(V):x()}else return u()===40?(f(),new Ka(V)):new Zh(V)},T=function(V){V===void 0&&(V=l);let W="";for(;f();){if(l===V||g())return new Wh(W);if(Go(l))return d(),new f0;l===92?g(u())||(Go(u())?f():W+=lt(_())):W+=lt(l)}throw new Error("Internal error")},x=function(){const V=new E0("");for(;Zn(u());)f();if(g(u()))return V;for(;f();){if(l===41||g())return V;if(Zn(l)){for(;Zn(u());)f();return u()===41||g(u())?(f(),V):(ne(),new Ko)}else{if(l===34||l===39||l===40||Hx(l))return ne(),new Ko;if(l===92)if(N())V.value+=lt(_());else return ne(),new Ko;else V.value+=lt(l)}}throw new Error("Internal error")},_=function(){if(f(),nb(l)){const V=[l];for(let ge=0;ge<5&&nb(u());ge++)f(),V.push(l);Zn(u())&&f();let W=parseInt(V.map(function(ge){return String.fromCharCode(ge)}).join(""),16);return W>Bx&&(W=65533),W}else return g()?65533:l},A=function(V,W){return!(V!==92||Go(W))},N=function(){return A(l,u())},$=function(V,W,ge){return V===45?Vo(W)||W===45||A(W,ge):Vo(V)?!0:V===92?A(V,W):!1},G=function(){return $(l,u(1),u(2))},X=function(V,W,ge){return V===43||V===45?!!(Bt(W)||W===46&&Bt(ge)):V===46?!!Bt(W):!!Bt(V)},U=function(){return X(l,u(1),u(2))},L=function(){let V="";for(;f();)if(ib(l))V+=lt(l);else if(N())V+=lt(_());else return d(),V;throw new Error("Internal parse error")},B=function(){let V="",W="integer";for((u()===43||u()===45)&&(f(),V+=lt(l));Bt(u());)f(),V+=lt(l);if(u(1)===46&&Bt(u(2)))for(f(),V+=lt(l),f(),V+=lt(l),W="number";Bt(u());)f(),V+=lt(l);const ge=u(1),Ue=u(2),I=u(3);if((ge===69||ge===101)&&Bt(Ue))for(f(),V+=lt(l),f(),V+=lt(l),W="number";Bt(u());)f(),V+=lt(l);else if((ge===69||ge===101)&&(Ue===43||Ue===45)&&Bt(I))for(f(),V+=lt(l),f(),V+=lt(l),f(),V+=lt(l),W="number";Bt(u());)f(),V+=lt(l);const J=O(V);return{type:W,value:J,repr:V}},O=function(V){return+V},ne=function(){for(;f();){if(l===41||g())return;N()&&_()}};let te=0;for(;!g(u());)if(r.push(b()),te++,te>e.length*2)throw new Error("I'm infinite-looping!");return r}class Ze{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class f0 extends Ze{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Ko extends Ze{constructor(){super(...arguments),this.tokenType="BADURL"}}class ic extends Ze{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class h0 extends Ze{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return""}}class p0 extends Ze{constructor(){super(...arguments),this.tokenType=":"}}class g0 extends Ze{constructor(){super(...arguments),this.tokenType=";"}}class m0 extends Ze{constructor(){super(...arguments),this.tokenType=","}}class Cr extends Ze{constructor(){super(...arguments),this.value="",this.mirror=""}}class y0 extends Cr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class b0 extends Cr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class v0 extends Cr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Ah extends Cr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class S0 extends Cr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Jh extends Cr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class $x extends Ze{constructor(){super(...arguments),this.tokenType="~="}}class Ix extends Ze{constructor(){super(...arguments),this.tokenType="|="}}class Vx extends Ze{constructor(){super(...arguments),this.tokenType="^="}}class Gx extends Ze{constructor(){super(...arguments),this.tokenType="$="}}class Kx extends Ze{constructor(){super(...arguments),this.tokenType="*="}}class w0 extends Ze{constructor(){super(...arguments),this.tokenType="||"}}class Xo extends Ze{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class mt extends Ze{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=lt(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==="\\"?`\\ `:this.value}}class Nr extends Ze{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 Zh extends Nr{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return ll(this.value)}}class Ka extends Nr{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return ll(this.value)+"("}}class x0 extends Nr{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+ll(this.value)}}class _0 extends Nr{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"?"#"+ll(this.value):"#"+Yx(this.value)}}class Wh extends Nr{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+C0(this.value)+'"'}}class E0 extends Nr{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+C0(this.value)+'")'}}class T0 extends Ze{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 A0 extends Ze{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 Xx extends Ze{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=ll(this.unit);return i[0].toLowerCase()==="e"&&(i[1]==="-"||it(i.charCodeAt(1),48,57))&&(i="\\65 "+i.slice(1,i.length)),e+i}}function ll(n){n=""+n;let e="";const i=n.charCodeAt(0);for(let r=0;r=128||l===45||l===95||it(l,48,57)||it(l,65,90)||it(l,97,122)?e+=n[r]:e+="\\"+n[r]}return e}function Yx(n){n=""+n;let e="";for(let i=0;i=128||r===45||r===95||it(r,48,57)||it(r,65,90)||it(r,97,122)?e+=n[i]:e+="\\"+r.toString(16)+" "}return e}function C0(n){n=""+n;let e="";for(let i=0;iO instanceof x0||O instanceof f0||O instanceof Ko||O instanceof w0||O instanceof h0||O instanceof d0||O instanceof g0||O instanceof y0||O instanceof b0||O instanceof E0||O instanceof A0);if(r)throw new qt(`Unsupported token "${r.toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`);let l=0;const o=new Set;function u(){return new qt(`Unexpected token "${i[l].toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`)}function f(){for(;i[l]instanceof ic;)l++}function d(O=l){return i[O]instanceof Zh}function g(O=l){return i[O]instanceof Wh}function b(O=l){return i[O]instanceof T0}function m(O=l){return i[O]instanceof m0}function S(O=l){return i[O]instanceof S0}function w(O=l){return i[O]instanceof Jh}function T(O=l){return i[O]instanceof Ka}function x(O=l){return i[O]instanceof mt&&i[O].value==="*"}function _(O=l){return i[O]instanceof Xo}function A(O=l){return i[O]instanceof mt&&[">","+","~"].includes(i[O].value)}function N(O=l){return m(O)||w(O)||_(O)||A(O)||i[O]instanceof ic}function $(){const O=[G()];for(;f(),!!m();)l++,O.push(G());return O}function G(){return f(),b()||g()?i[l++].value:X()}function X(){const O={simples:[]};for(f(),A()?O.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):O.simples.push({selector:U(),combinator:""});;){if(f(),A())O.simples[O.simples.length-1].combinator=i[l++].value,f();else if(N())break;O.simples.push({combinator:"",selector:U()})}return O}function U(){let O="";const ne=[];for(;!N();)if(d()||x())O+=i[l++].toSource();else if(i[l]instanceof _0)O+=i[l++].toSource();else if(i[l]instanceof mt&&i[l].value===".")if(l++,d())O+="."+i[l++].toSource();else throw u();else if(i[l]instanceof p0)if(l++,d())if(!e.has(i[l].value.toLowerCase()))O+=":"+i[l++].toSource();else{const te=i[l++].value.toLowerCase();ne.push({name:te,args:[]}),o.add(te)}else if(T()){const te=i[l++].value.toLowerCase();if(e.has(te)?(ne.push({name:te,args:$()}),o.add(te)):O+=`:${te}(${L()})`,f(),!w())throw u();l++}else throw u();else if(i[l]instanceof v0){for(O+="[",l++;!(i[l]instanceof Ah)&&!_();)O+=i[l++].toSource();if(!(i[l]instanceof Ah))throw u();O+="]",l++}else throw u();if(!O&&!ne.length)throw u();return{css:O||void 0,functions:ne}}function L(){let O="",ne=1;for(;!_()&&((S()||T())&&ne++,w()&&ne--,!!ne);)O+=i[l++].toSource();return O}const B=$();if(!_())throw u();if(B.some(O=>typeof O!="object"||!("simples"in O)))throw new qt(`Error while parsing css selector "${n}". Did you mean to CSS.escape it?`);return{selector:B,names:Array.from(o)}}const Ch=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Qx=new Set(["left-of","right-of","above","below","near"]),N0=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 ol(n){const e=Zx(n),i=[];for(const r of e.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const l=Fx(r.body,N0);i.push({name:"css",body:l.selector,source:r.body});continue}if(Ch.has(r.name)){let l,o;try{const g=JSON.parse("["+r.body+"]");if(!Array.isArray(g)||g.length<1||g.length>2||typeof g[0]!="string")throw new qt(`Malformed selector: ${r.name}=`+r.body);if(l=g[0],g.length===2){if(typeof g[1]!="number"||!Qx.has(r.name))throw new qt(`Malformed selector: ${r.name}=`+r.body);o=g[1]}}catch{throw new qt(`Malformed selector: ${r.name}=`+r.body)}const u={name:r.name,source:r.body,body:{parsed:ol(l),distance:o}},f=[...u.body.parsed.parts].reverse().find(g=>g.name==="internal:control"&&g.body==="enter-frame"),d=f?u.body.parsed.parts.indexOf(f):-1;d!==-1&&Px(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({...r,source:r.body})}if(Ch.has(i[0].name))throw new qt(`"${i[0].name}" selector cannot be first`);return{capture:e.capture,parts:i}}function Px(n,e){return On({parts:n})===On({parts:e})}function On(n,e){return typeof n=="string"?n:n.parts.map((i,r)=>{let l=!0;!e&&r!==n.capture&&(i.name==="css"||i.name==="xpath"&&i.source.startsWith("//")||i.source.startsWith(".."))&&(l=!1);const o=l?i.name+"=":"";return`${r===n.capture?"*":""}${o}${i.source}`}).join(" >> ")}function Jx(n,e){const i=(r,l)=>{for(const o of r.parts)e(o,l),Ch.has(o.name)&&i(o.body.parsed,!0)};i(n,!1)}function Zx(n){let e=0,i,r=0;const l={parts:[]},o=()=>{const f=n.substring(r,e).trim(),d=f.indexOf("=");let g,b;d!==-1&&f.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(g=f.substring(0,d).trim(),b=f.substring(d+1)):f.length>1&&f[0]==='"'&&f[f.length-1]==='"'||f.length>1&&f[0]==="'"&&f[f.length-1]==="'"?(g="text",b=f):/^\(*\/\//.test(f)||f.startsWith("..")?(g="xpath",b=f):(g="css",b=f);let m=!1;if(g[0]==="*"&&(m=!0,g=g.substring(1)),l.parts.push({name:g,body:b}),m){if(l.capture!==void 0)throw new qt("Only one of the selectors can capture using * modifier");l.capture=l.parts.length-1}};if(!n.includes(">>"))return e=n.length,o(),l;const u=()=>{const d=n.substring(r,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e"&&n[e+1]===">"?(o(),e+=2,r=e):e++}return o(),l}function Xa(n,e){let i=0,r=n.length===0;const l=()=>n[i]||"",o=()=>{const _=l();return++i,r=i>=n.length,_},u=_=>{throw r?new qt(`Unexpected end of selector while parsing selector \`${n}\``):new qt(`Error while parsing selector \`${n}\` - unexpected symbol "${l()}" at position ${i}`+(_?" during "+_:""))};function f(){for(;!r&&/\s/.test(l());)o()}function d(_){return _>="€"||_>="0"&&_<="9"||_>="A"&&_<="Z"||_>="a"&&_<="z"||_>="0"&&_<="9"||_==="_"||_==="-"}function g(){let _="";for(f();!r&&d(l());)_+=o();return _}function b(_){let A=o();for(A!==_&&u("parsing quoted string");!r&&l()!==_;)l()==="\\"&&o(),A+=o();return l()!==_&&u("parsing quoted string"),A+=o(),A}function m(){o()!=="/"&&u("parsing regular expression");let _="",A=!1;for(;!r;){if(l()==="\\")_+=o(),r&&u("parsing regular expression");else if(A&&l()==="]")A=!1;else if(!A&&l()==="[")A=!0;else if(!A&&l()==="/")break;_+=o()}o()!=="/"&&u("parsing regular expression");let N="";for(;!r&&l().match(/[dgimsuy]/);)N+=o();try{return new RegExp(_,N)}catch($){throw new qt(`Error while parsing selector \`${n}\`: ${$.message}`)}}function S(){let _="";return f(),l()==="'"||l()==='"'?_=b(l()).slice(1,-1):_=g(),_||u("parsing property path"),_}function w(){f();let _="";return r||(_+=o()),!r&&_!=="="&&(_+=o()),["=","*=","^=","$=","|=","~="].includes(_)||u("parsing operator"),_}function T(){o();const _=[];for(_.push(S()),f();l()===".";)o(),_.push(S()),f();if(l()==="]")return o(),{name:_.join("."),jsonPath:_,op:"",value:null,caseSensitive:!1};const A=w();let N,$=!0;if(f(),l()==="/"){if(A!=="=")throw new qt(`Error while parsing selector \`${n}\` - cannot use ${A} in attribute with regular expression`);N=m()}else if(l()==="'"||l()==='"')N=b(l()).slice(1,-1),f(),l()==="i"||l()==="I"?($=!1,o()):(l()==="s"||l()==="S")&&($=!0,o());else{for(N="";!r&&(d(l())||l()==="+"||l()===".");)N+=o();N==="true"?N=!0:N==="false"&&(N=!1)}if(f(),l()!=="]"&&u("parsing attribute value"),o(),A!=="="&&typeof N!="string")throw new qt(`Error while parsing selector \`${n}\` - cannot use ${A} in attribute with non-string matching value - ${N}`);return{name:_.join("."),jsonPath:_,op:A,value:N,caseSensitive:$}}const x={name:"",attributes:[]};for(x.name=g(),f();l()==="[";)x.attributes.push(T()),f();if(r||u(void 0),!x.name&&!x.attributes.length)throw new qt(`Error while parsing selector \`${n}\` - selector cannot be empty`);return x}function gc(n,e="'"){const i=JSON.stringify(n),r=i.substring(1,i.length-1).replace(/\\"/g,'"');if(e==="'")return e+r.replace(/[']/g,"\\'")+e;if(e==='"')return e+r.replace(/["]/g,'\\"')+e;if(e==="`")return e+r.replace(/[`]/g,"\\`")+e;throw new Error("Invalid escape char")}function sc(n){return n.charAt(0).toUpperCase()+n.substring(1)}function k0(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function hr(n){return`"${n.replace(/["\\]/g,e=>"\\"+e)}"`}let ls;function Wx(){ls=new Map}function Ot(n){let e=ls==null?void 0:ls.get(n);return e===void 0&&(e=n.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),ls==null||ls.set(n,e)),e}function mc(n){return n.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function M0(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function $t(n,e){return typeof n!="string"?M0(n):`${JSON.stringify(n)}${e?"s":"i"}`}function Mt(n,e){return typeof n!="string"?M0(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function e_(n,e,i=""){if(n.length<=e)return n;const r=[...n];return r.length>e?r.slice(0,e-i.length).join("")+i:r.join("")}function sb(n,e){return e_(n,e,"…")}function rc(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function t_(n,e){const i=n.length,r=e.length;let l=0,o=0;const u=Array(i+1).fill(null).map(()=>Array(r+1).fill(0));for(let f=1;f<=i;f++)for(let d=1;d<=r;d++)n[f-1]===e[d-1]&&(u[f][d]=u[f-1][d-1]+1,u[f][d]>l&&(l=u[f][d],o=f));return n.slice(o-l,o)}function O0(n,e){try{const i=ol(e),r=n_(i);return r||fs(new L0[n],i,!1,1)[0]}catch{return e}}function n_(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 Ri(n,e,i=!1){return j0(n,e,i,1)[0]}function j0(n,e,i=!1,r=20,l){try{return fs(new L0[n](l),ol(e),i,r)}catch{return[e]}}function fs(n,e,i=!1,r=20){const l=[...e.parts],o=[];let u=i?"frame-locator":"page";for(let f=0;fn.generateLocator(g,"has",x)));continue}if(d.name==="internal:has-not"){const T=fs(n,d.body.parsed,!1,r);o.push(T.map(x=>n.generateLocator(g,"hasNot",x)));continue}if(d.name==="internal:and"){const T=fs(n,d.body.parsed,!1,r);o.push(T.map(x=>n.generateLocator(g,"and",x)));continue}if(d.name==="internal:or"){const T=fs(n,d.body.parsed,!1,r);o.push(T.map(x=>n.generateLocator(g,"or",x)));continue}if(d.name==="internal:chain"){const T=fs(n,d.body.parsed,!1,r);o.push(T.map(x=>n.generateLocator(g,"chain",x)));continue}if(d.name==="internal:label"){const{exact:T,text:x}=ja(d.body);o.push([n.generateLocator(g,"label",x,{exact:T})]);continue}if(d.name==="internal:role"){const T=Xa(d.body),x={attrs:[]};for(const _ of T.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(g,"role",T.name,x)]);continue}if(d.name==="internal:testid"){const T=Xa(d.body),{value:x}=T.attributes[0];o.push([n.generateLocator(g,"test-id",x)]);continue}if(d.name==="internal:attr"){const T=Xa(d.body),{name:x,value:_,caseSensitive:A}=T.attributes[0],N=_,$=!!A;if(x==="placeholder"){o.push([n.generateLocator(g,"placeholder",N,{exact:$})]);continue}if(x==="alt"){o.push([n.generateLocator(g,"alt",N,{exact:$})]);continue}if(x==="title"){o.push([n.generateLocator(g,"title",N,{exact:$})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const T=o[o.length-1],x=l[f-1],_=T.map(A=>n.chainLocators([A,n.generateLocator(g,"frame","")]));["xpath","css"].includes(x.name)&&_.push(n.generateLocator(g,"frame-locator",On({parts:[x]})),n.generateLocator(g,"frame-locator",On({parts:[x]},!0))),T.splice(0,T.length,..._),u="frame-locator";continue}const b=l[f+1],m=On({parts:[d]}),S=n.generateLocator(g,"default",m);if(b&&["internal:has-text","internal:has-not-text"].includes(b.name)){const{exact:T,text:x}=ja(b.body);if(!T){const _=n.generateLocator("locator",b.name==="internal:has-text"?"has-text":"has-not-text",x,{exact:T}),A={};b.name==="internal:has-text"?A.hasText=x:A.hasNotText=x;const N=n.generateLocator(g,"default",m,A);o.push([n.chainLocators([S,_]),N]),f++;continue}}let w;if(["xpath","css"].includes(d.name)){const T=On({parts:[d]},!0);w=n.generateLocator(g,"default",T)}o.push([S,w].filter(Boolean))}return i_(n,o,r)}function i_(n,e,i){const r=e.map(()=>""),l=[],o=u=>{if(u===e.length)return l.push(n.chainLocators(r)),l.lengthJSON.parse(r));for(let r=0;ru_(e,f,m.expandedItems,x||0,u),[e,f,m,x,u]),A=R.useRef(null),[N,$]=R.useState();R.useEffect(()=>{b==null||b(N)},[b,N]),R.useEffect(()=>{const U=A.current;if(!U)return;const L=()=>{rb.set(n,U.scrollTop)};return U.addEventListener("scroll",L,{passive:!0}),()=>U.removeEventListener("scroll",L)},[n]),R.useEffect(()=>{A.current&&(A.current.scrollTop=rb.get(n)||0)},[n]);const G=R.useCallback(U=>{const{expanded:L}=_.get(U);if(L){for(let B=f;B;B=B.parent)if(B===U){g==null||g(U);break}m.expandedItems.set(U.id,!1)}else m.expandedItems.set(U.id,!0);S({...m})},[_,f,g,m,S]),X=R.useCallback(U=>{const{expanded:L}=_.get(U),B=[U];for(;B.length;){const O=B.pop();B.push(...O.children),m.expandedItems.set(O.id,!L)}S({...m})},[_,m,S]);return v.jsx("div",{className:st("tree-view vbox",n+"-tree-view"),"data-testid":T||n+"-tree",children:v.jsxs("div",{className:st("tree-view-content"),role:_.size>0?"tree":void 0,tabIndex:0,onKeyDown:U=>{if(f&&U.key==="Enter"){d==null||d(f);return}if(U.key!=="ArrowDown"&&U.key!=="ArrowUp"&&U.key!=="ArrowLeft"&&U.key!=="ArrowRight")return;if(U.stopPropagation(),U.preventDefault(),f&&U.key==="ArrowLeft"){const{expanded:B,parent:O}=_.get(f);B?(m.expandedItems.set(f.id,!1),S({...m})):O&&(g==null||g(O));return}if(f&&U.key==="ArrowRight"){f.children.length&&(m.expandedItems.set(f.id,!0),S({...m}));return}let L=f;if(U.key==="ArrowDown"&&(f?L=_.get(f).next:_.size&&(L=[..._.keys()][0])),U.key==="ArrowUp"){if(f)L=_.get(f).prev;else if(_.size){const B=[..._.keys()];L=B[B.length-1]}}b==null||b(void 0),L&&(g==null||g(L)),$(void 0)},ref:A,children:[w&&_.size===0&&v.jsx("div",{className:"tree-view-empty",children:w}),e.children.map(U=>_.get(U)&&v.jsx(R0,{item:U,treeItems:_,selectedItem:f,onSelected:g,onAccepted:d,isError:o,toggleExpanded:G,toggleSubtree:X,highlightedItem:N,setHighlightedItem:$,render:i,icon:l,title:r},U.id))]})})}function R0({item:n,treeItems:e,selectedItem:i,onSelected:r,highlightedItem:l,setHighlightedItem:o,isError:u,onAccepted:f,toggleExpanded:d,toggleSubtree:g,render:b,title:m,icon:S}){const w=R.useId(),T=R.useRef(null);R.useEffect(()=>{(i==null?void 0:i.id)===n.id&&T.current&&e0(T.current)},[n.id,i==null?void 0:i.id]);const x=e.get(n),_=x.depth,A=x.expanded;let N="codicon-blank";typeof A=="boolean"&&(N=A?"codicon-chevron-down":"codicon-chevron-right");const $=b(n),G=A&&n.children.length?n.children:[],X=m==null?void 0:m(n),U=(S==null?void 0:S(n))||"codicon-blank";return v.jsxs("div",{ref:T,role:"treeitem","aria-selected":n===i,"aria-expanded":A,"aria-controls":w,title:X,className:"vbox",style:{flex:"none"},children:[v.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(n),className:st("tree-view-entry",i===n&&"selected",l===n&&"highlighted",(u==null?void 0:u(n))&&"error"),onClick:()=>r==null?void 0:r(n),onMouseEnter:()=>o(n),onMouseLeave:()=>o(void 0),children:[_?new Array(_).fill(0).map((L,B)=>v.jsx("div",{className:"tree-view-indent"},"indent-"+B)):void 0,v.jsx("div",{"aria-hidden":"true",className:"codicon "+N,style:{minWidth:16,marginRight:4},onDoubleClick:L=>{L.preventDefault(),L.stopPropagation()},onClick:L=>{L.stopPropagation(),L.preventDefault(),L.altKey?g(n):d(n)}}),S&&v.jsx("div",{className:"codicon "+U,style:{minWidth:16,marginRight:4},"aria-label":"["+U.replace("codicon","icon")+"]"}),typeof $=="string"?v.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:$}):$]}),!!G.length&&v.jsx("div",{id:w,role:"group",children:G.map(L=>e.get(L)&&v.jsx(R0,{item:L,treeItems:e,selectedItem:i,onSelected:r,onAccepted:f,isError:u,toggleExpanded:d,toggleSubtree:g,highlightedItem:l,setHighlightedItem:o,render:b,title:m,icon:S},L.id))})]})}function Nh(n,e,i){const r=i.get(n.id);if(r!==void 0)return r;const l=e(n),o=l==="if-needed"?n.children.some(u=>Nh(u,e,i)):l;return i.set(n.id,o),o}function u_(n,e,i,r,l=()=>!0){const o=new Map;if(!Nh(n,l,o))return new Map;const u=new Map,f=new Set;for(let b=e==null?void 0:e.parent;b;b=b.parent)f.add(b.id);let d=null;const g=(b,m)=>{for(const S of b.children){if(!Nh(S,l,o))continue;const w=f.has(S.id)||i.get(S.id),T=r>m&&u.size<25&&w!==!1,x=S.children.length?w??T:void 0,_={depth:m,expanded:x,parent:n===b?null:b,next:null,prev:d};d&&(u.get(d).next=S),d=S,u.set(S,_),x&&g(S,m+1)}};return g(n,0),u}const ut=R.forwardRef(function({children:e,title:i="",icon:r,disabled:l=!1,toggled:o=!1,onClick:u=()=>{},style:f,testId:d,className:g,ariaLabel:b},m){return v.jsxs("button",{ref:m,className:st(g,"toolbar-button",r,o&&"toggled"),onMouseDown:ab,onClick:u,onDoubleClick:ab,title:i,disabled:!!l,style:f,"data-testid":d,"aria-label":b||i,children:[r&&v.jsx("span",{className:`codicon codicon-${r}`,style:e?{marginRight:5}:{}}),e]})}),ab=n=>{n.stopPropagation(),n.preventDefault()};function D0(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 f_(n){return n==="scheduled"?"Pending":n==="running"?"Running":n==="failed"?"Failed":n==="passed"?"Passed":n==="skipped"?"Skipped":"Did not run"}const h_=c_,d_=({actions:n,selectedAction:e,selectedTime:i,setSelectedTime:r,treeState:l,setTreeState:o,sdkLanguage:u,onSelected:f,onHighlighted:d,revealConsole:g,revealActionAttachment:b,isLive:m,actionFilterText:S})=>{const{rootItem:w,itemMap:T}=R.useMemo(()=>o0(n),[n]),{selectedItem:x}=R.useMemo(()=>({selectedItem:e?T.get(e.callId):void 0}),[T,e]),_=R.useCallback(U=>{var L;return!!((L=U.action.error)!=null&&L.message)},[]),A=R.useCallback(U=>r({minimum:U.action.startTime,maximum:U.action.endTime}),[r]),N=R.useCallback(U=>{var B;const L=!!b&&!!((B=U.action.attachments)!=null&&B.length);return ed(U.action,{sdkLanguage:u,revealConsole:g,revealActionAttachment:()=>b==null?void 0:b(U.action.callId),isLive:m,showDuration:!0,showBadges:!0,showAttachments:L})},[m,g,b,u]),$=R.useCallback(U=>{if(!(!i||!U.action||U.action.startTime<=i.maximum&&U.action.endTime>=i.minimum))return!1;const B=td(U.action).title;return S?B.toLowerCase().includes(S.toLowerCase())?!0:"if-needed":!0},[i,S]),G=R.useCallback(U=>{f==null||f(U.action)},[f]),X=R.useCallback(U=>{d==null||d(U==null?void 0:U.action)},[d]);return v.jsxs("div",{className:"vbox action-list-container",children:[i&&v.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[v.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),v.jsx(h_,{name:"actions",rootItem:w,treeState:l,setTreeState:o,selectedItem:x,onSelected:G,onHighlighted:X,onAccepted:A,isError:_,isVisible:$,render:N,autoExpandDepth:S!=null&&S.trim()?5:0})]})},ed=(n,e)=>{var _;const{sdkLanguage:i,revealConsole:r,revealActionAttachment:l,isLive:o,showDuration:u,showBadges:f,showAttachments:d}=e,{errors:g,warnings:b}=Nx(n),m=n.params.selector?O0(i||"javascript",n.params.selector):void 0,S=n.class==="Test"&&n.method==="test.step"&&((_=n.annotations)==null?void 0:_.some(A=>A.type==="skip"));let w="";n.endTime?w=bt(n.endTime-n.startTime):n.error?w="Timed out":o||(w="-");const{elements:T,title:x}=td(n);return v.jsxs("div",{className:"action-title vbox",children:[v.jsxs("div",{className:"hbox",children:[v.jsx("span",{className:"action-title-method",title:x,children:T}),(u||f||d||S)&&v.jsx("div",{className:"spacer"}),d&&v.jsx(ut,{icon:"attach",title:"Open Attachment",onClick:()=>l==null?void 0:l()}),u&&!S&&v.jsx("div",{className:"action-duration",children:w||v.jsx("span",{className:"codicon codicon-loading"})}),S&&v.jsx("span",{className:st("action-skipped","codicon",D0("skipped")),title:"skipped"}),f&&v.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!g&&v.jsxs("div",{className:"action-icon",children:[v.jsx("span",{className:"codicon codicon-error"}),v.jsx("span",{className:"action-icon-value",children:g})]}),!!b&&v.jsxs("div",{className:"action-icon",children:[v.jsx("span",{className:"codicon codicon-warning"}),v.jsx("span",{className:"action-icon-value",children:b})]})]})]}),m&&v.jsx("div",{className:"action-title-selector",title:m,children:m})]})};function td(n,e){var g;let i=n.title??((g=Qh({type:n.class,method:n.method}))==null?void 0:g.title)??n.method;i=i.replace(/\n/g," ");const r=[],l=[];let o=0;const u=/\{([^}]+)\}/g;let f;for(;(f=u.exec(i))!==null;){const[b,m]=f,S=i.slice(o,f.index);r.push(S),l.push(S);const w=s0(n.params,m);w===void 0?(r.push(b),l.push(b)):f.index===0?(r.push(w),l.push(w)):(r.push(v.jsx("span",{className:"action-title-param",children:w},r.length)),l.push(w)),o=f.index+b.length}if(o{const[i,r]=R.useState("copy"),l=R.useCallback(()=>{(typeof n=="function"?n():Promise.resolve(n)).then(u=>{navigator.clipboard.writeText(u).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[n]);return v.jsx(ut,{title:e||"Copy",icon:i,onClick:l})},Yo=({value:n,description:e,copiedDescription:i=e,style:r})=>{const[l,o]=R.useState(!1),u=R.useCallback(async()=>{const f=typeof n=="function"?await n():n;await navigator.clipboard.writeText(f),o(!0),setTimeout(()=>o(!1),3e3)},[n]);return v.jsx(ut,{style:r,title:e,onClick:u,className:"copy-to-clipboard-text-button",children:l?i:e})},ys=({text:n})=>v.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:n}),p_=({action:n,startTimeOffset:e,sdkLanguage:i})=>{const r=R.useMemo(()=>Object.keys((n==null?void 0:n.params)??{}).filter(f=>f!=="info"),[n]);if(!n)return v.jsx(ys,{text:"No action selected"});const l=n.startTime-e,o=bt(l),{title:u}=td(n);return v.jsxs("div",{className:"call-tab",children:[v.jsx("div",{className:"call-line",children:u}),v.jsx("div",{className:"call-section",children:"Time"}),Oo({name:"start",type:"literal",text:o}),Oo({name:"duration",type:"literal",text:g_(n)}),!!r.length&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"call-section",children:"Parameters"}),r.map(f=>Oo(lb(n,f,n.params[f],i)))]}),!!n.result&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(n.result).map(f=>Oo(lb(n,f,n.result[f],i)))]})]})};function g_(n){return n.endTime?bt(n.endTime-n.startTime):n.error?"Timed Out":"Running"}function Oo(n){let e=n.text.replace(/\n/g,"↵");return n.type==="string"&&(e=`"${e}"`),v.jsxs("div",{className:"call-line",children:[n.name,":",v.jsx("span",{className:st("call-value",n.type),title:n.text,children:e}),["literal","string","number","object","locator"].includes(n.type)&&v.jsx(nd,{value:n.text})]},n.name)}function lb(n,e,i,r){const l=n.method.includes("eval")||n.method==="waitForFunction";if(e==="files")return{text:"",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&l)&&(i=ac(i.value,new Array(10).fill({handle:""}))),(e==="value"&&l||e==="received"&&n.method==="expect")&&(i=ac(i,new Array(10).fill({handle:""}))),e==="selector")return{text:Ri(r||"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:"",type:"handle",name:e}:{text:JSON.stringify(i).slice(0,1e3),type:"object",name:e}}function ac(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=>ac(i,e));if(n.o!==void 0){const i={};for(const{k:r,v:l}of n.o)i[r]=ac(l,e);return i}return n.h!==void 0?e===void 0?"":e[n.h]:""}const ob=new Map;function yc({name:n,items:e=[],id:i,render:r,icon:l,isError:o,isWarning:u,isInfo:f,selectedItem:d,onAccepted:g,onSelected:b,onHighlighted:m,onIconClicked:S,noItemsMessage:w,dataTestId:T,notSelectable:x,ariaLabel:_}){const A=R.useRef(null),[N,$]=R.useState();return R.useEffect(()=>{m==null||m(N)},[m,N]),R.useEffect(()=>{const G=A.current;if(!G)return;const X=()=>{ob.set(n,G.scrollTop)};return G.addEventListener("scroll",X,{passive:!0}),()=>G.removeEventListener("scroll",X)},[n]),R.useEffect(()=>{A.current&&(A.current.scrollTop=ob.get(n)||0)},[n]),v.jsx("div",{className:st("list-view vbox",n+"-list-view"),role:e.length>0?"list":void 0,"aria-label":_,children:v.jsxs("div",{className:st("list-view-content",x&&"not-selectable"),tabIndex:0,onKeyDown:G=>{var B;if(d&&G.key==="Enter"){g==null||g(d,e.indexOf(d));return}if(G.key!=="ArrowDown"&&G.key!=="ArrowUp")return;G.stopPropagation(),G.preventDefault();const X=d?e.indexOf(d):-1;let U=X;G.key==="ArrowDown"&&(X===-1?U=0:U=Math.min(X+1,e.length-1)),G.key==="ArrowUp"&&(X===-1?U=e.length-1:U=Math.max(X-1,0));const L=(B=A.current)==null?void 0:B.children.item(U);e0(L||void 0),m==null||m(void 0),b==null||b(e[U],U),$(void 0)},ref:A,children:[w&&e.length===0&&v.jsx("div",{className:"list-view-empty",children:w}),e.map((G,X)=>{const U=r(G,X);return v.jsxs("div",{onDoubleClick:()=>g==null?void 0:g(G,X),role:"listitem",className:st("list-view-entry",d===G&&"selected",!x&&N===G&&"highlighted",(o==null?void 0:o(G,X))&&"error",(u==null?void 0:u(G,X))&&"warning",(f==null?void 0:f(G,X))&&"info"),"aria-selected":d===G,onClick:()=>b==null?void 0:b(G,X),onMouseEnter:()=>$(G),onMouseLeave:()=>$(void 0),children:[l&&v.jsx("div",{className:"codicon "+(l(G,X)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:L=>{L.preventDefault(),L.stopPropagation()},onClick:L=>{L.stopPropagation(),L.preventDefault(),S==null||S(G,X)}}),typeof U=="string"?v.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:U}):U]},(i==null?void 0:i(G,X))||X)})]})})}const m_=yc,y_=({action:n,isLive:e})=>{const i=R.useMemo(()=>{var u;if(!n||!n.log.length)return[];const r=n.log,l=n.context.wallTime-n.context.startTime,o=[];for(let f=0;f0?d=bt(n.endTime-g):e?d=bt(Date.now()-l-g):d="-"}o.push({message:r[f].message,time:d})}return o},[n,e]);return i.length?v.jsx(m_,{name:"log",ariaLabel:"Log entries",items:i,render:r=>v.jsxs("div",{className:"log-list-item",children:[v.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):v.jsx(ys,{text:"No log entries"})};function nl(n,e){const i=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let l,o={},u=!1,f=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(l=i.exec(n))!==null;){const[,,g,,b]=l;if(g){const m=+g;switch(m){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=cb[m-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=cb[m-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=ub[m-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=ub[m-100];break}}else if(b){const m={...o},S=u?d:f;S!==void 0&&(m.color=S);const w=u?f:d;w!==void 0&&(m["background-color"]=w),r.push(`${b_(b)}`)}}return r.join("")}const cb={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)"},ub={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 b_(n){return n.replace(/[&"<>]/g,e=>({"&":"&",'"':""","<":"<",">":">"})[e])}function v_(n){return Object.entries(n).map(([e,i])=>`${e}: ${i}`).join("; ")}const S_=({error:n})=>{const e=R.useMemo(()=>nl(n),[n]);return v.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},z0=({cursor:n,onPaneMouseMove:e,onPaneMouseUp:i,onPaneDoubleClick:r})=>(vt.useEffect(()=>{const l=document.createElement("div");return l.style.position="fixed",l.style.top="0",l.style.right="0",l.style.bottom="0",l.style.left="0",l.style.zIndex="9999",l.style.cursor=n,document.body.appendChild(l),e&&l.addEventListener("mousemove",e),i&&l.addEventListener("mouseup",i),r&&document.body.addEventListener("dblclick",r),()=>{e&&l.removeEventListener("mousemove",e),i&&l.removeEventListener("mouseup",i),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(l)}},[n,e,i,r]),v.jsx(v.Fragment,{})),w_={position:"absolute",top:0,right:0,bottom:0,left:0},U0=({orientation:n,offsets:e,setOffsets:i,resizerColor:r,resizerWidth:l,minColumnWidth:o})=>{const u=o||0,[f,d]=vt.useState(null),[g,b]=ms(),m={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-l)/2,borderRightWidth:n==="horizontal"?(7-l)/2:void 0,borderBottomWidth:n==="horizontal"?void 0:(7-l)/2,borderLeftWidth:n==="horizontal"?(7-l)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:n==="horizontal"?"ew-resize":"ns-resize"};return v.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-l)/2,zIndex:100,pointerEvents:"none"},ref:b,children:[!!f&&v.jsx(z0,{cursor:n==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:S=>{if(!S.buttons)d(null);else if(f){const w=n==="horizontal"?S.clientX-f.clientX:S.clientY-f.clientY,T=f.offset+w,x=f.index>0?e[f.index-1]:0,_=n==="horizontal"?g.width:g.height,A=Math.min(Math.max(x+u,T),_-u)-e[f.index];for(let N=f.index;Nv.jsx("div",{style:{...m,top:n==="horizontal"?0:S,left:n==="horizontal"?S:0,pointerEvents:"initial"},onMouseDown:T=>d({clientX:T.clientX,clientY:T.clientY,offset:S,index:w}),children:v.jsx("div",{style:{...w_,background:r}})},w))]})};async function rh(n){const e=new Image;return n&&(e.src=n,await new Promise((i,r)=>{e.onload=i,e.onerror=i})),e}const kh={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%), linear-gradient(-45deg, #80808020 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #80808020 75%), 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, rgb(0 0 0 / 15%) 0px 6.1px 6.3px, rgb(0 0 0 / 10%) 0px -2px 4px, rgb(0 0 0 / 15%) 0px -6.1px 12px, rgb(0 0 0 / 25%) 0px 6px 12px`},x_=({diff:n,noTargetBlank:e,hideDetails:i})=>{const[r,l]=R.useState(n.diff?"diff":"actual"),[o,u]=R.useState(!1),[f,d]=R.useState(null),[g,b]=R.useState("Expected"),[m,S]=R.useState(null),[w,T]=R.useState(null),[x,_]=ms();R.useEffect(()=>{(async()=>{var O,ne,te,V;d(await rh((O=n.expected)==null?void 0:O.attachment.path)),b(((ne=n.expected)==null?void 0:ne.title)||"Expected"),S(await rh((te=n.actual)==null?void 0:te.attachment.path)),T(await rh((V=n.diff)==null?void 0:V.attachment.path))})()},[n]);const A=f&&m&&w,N=A?Math.max(f.naturalWidth,m.naturalWidth,200):500,$=A?Math.max(f.naturalHeight,m.naturalHeight,200):500,G=Math.min(1,(x.width-30)/N),X=Math.min(1,(x.width-50)/N/2),U=N*G,L=$*G,B={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return v.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:_,children:A&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[n.diff&&v.jsx("div",{style:{...B,fontWeight:r==="diff"?600:"initial"},onClick:()=>l("diff"),children:"Diff"}),v.jsx("div",{style:{...B,fontWeight:r==="actual"?600:"initial"},onClick:()=>l("actual"),children:"Actual"}),v.jsx("div",{style:{...B,fontWeight:r==="expected"?600:"initial"},onClick:()=>l("expected"),children:g}),v.jsx("div",{style:{...B,fontWeight:r==="sxs"?600:"initial"},onClick:()=>l("sxs"),children:"Side by side"}),v.jsx("div",{style:{...B,fontWeight:r==="slider"?600:"initial"},onClick:()=>l("slider"),children:"Slider"})]}),v.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:L+60},children:[n.diff&&r==="diff"&&v.jsx(Wn,{image:w,alt:"Diff",hideSize:i,canvasWidth:U,canvasHeight:L,scale:G}),n.diff&&r==="actual"&&v.jsx(Wn,{image:m,alt:"Actual",hideSize:i,canvasWidth:U,canvasHeight:L,scale:G}),n.diff&&r==="expected"&&v.jsx(Wn,{image:f,alt:g,hideSize:i,canvasWidth:U,canvasHeight:L,scale:G}),n.diff&&r==="slider"&&v.jsx(__,{expectedImage:f,actualImage:m,hideSize:i,canvasWidth:U,canvasHeight:L,scale:G,expectedTitle:g}),n.diff&&r==="sxs"&&v.jsxs("div",{style:{display:"flex"},children:[v.jsx(Wn,{image:f,title:g,hideSize:i,canvasWidth:X*N,canvasHeight:X*$,scale:X}),v.jsx(Wn,{image:o?w:m,title:o?"Diff":"Actual",onClick:()=>u(!o),hideSize:i,canvasWidth:X*N,canvasHeight:X*$,scale:X})]}),!n.diff&&r==="actual"&&v.jsx(Wn,{image:m,title:"Actual",hideSize:i,canvasWidth:U,canvasHeight:L,scale:G}),!n.diff&&r==="expected"&&v.jsx(Wn,{image:f,title:g,hideSize:i,canvasWidth:U,canvasHeight:L,scale:G}),!n.diff&&r==="sxs"&&v.jsxs("div",{style:{display:"flex"},children:[v.jsx(Wn,{image:f,title:g,canvasWidth:X*N,canvasHeight:X*$,scale:X}),v.jsx(Wn,{image:m,title:"Actual",canvasWidth:X*N,canvasHeight:X*$,scale:X})]})]}),!i&&v.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[v.jsx("div",{children:n.diff&&v.jsx("a",{target:"_blank",href:n.diff.attachment.path,rel:"noreferrer",children:n.diff.attachment.name})}),v.jsx("div",{children:v.jsx("a",{target:e?"":"_blank",href:n.actual.attachment.path,rel:"noreferrer",children:n.actual.attachment.name})}),v.jsx("div",{children:v.jsx("a",{target:e?"":"_blank",href:n.expected.attachment.path,rel:"noreferrer",children:n.expected.attachment.name})})]})]})})},__=({expectedImage:n,actualImage:e,canvasWidth:i,canvasHeight:r,scale:l,expectedTitle:o,hideSize:u})=>{const f={position:"absolute",top:0,left:0},[d,g]=R.useState(i/2),b=n.naturalWidth===e.naturalWidth&&n.naturalHeight===e.naturalHeight;return v.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!u&&v.jsxs("div",{style:{margin:5},children:[!b&&v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),v.jsx("span",{children:n.naturalWidth}),v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),v.jsx("span",{children:n.naturalHeight}),!b&&v.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!b&&v.jsx("span",{children:e.naturalWidth}),!b&&v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!b&&v.jsx("span",{children:e.naturalHeight})]}),v.jsxs("div",{style:{position:"relative",width:i,height:r,margin:15,...kh},children:[v.jsx(U0,{orientation:"horizontal",offsets:[d],setOffsets:m=>g(m[0]),resizerColor:"#57606a80",resizerWidth:6}),v.jsx("img",{alt:o,style:{width:n.naturalWidth*l,height:n.naturalHeight*l},draggable:"false",src:n.src}),v.jsx("div",{style:{...f,bottom:0,overflow:"hidden",width:d,...kh},children:v.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*l,height:e.naturalHeight*l},draggable:"false",src:e.src})})]})]})},Wn=({image:n,title:e,alt:i,hideSize:r,canvasWidth:l,canvasHeight:o,scale:u,onClick:f})=>v.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&v.jsxs("div",{style:{margin:5},children:[e&&v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),v.jsx("span",{children:n.naturalWidth}),v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),v.jsx("span",{children:n.naturalHeight})]}),v.jsx("div",{style:{display:"flex",flex:"none",width:l,height:o,margin:15,...kh},children:v.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})})]}),E_="modulepreload",T_=function(n,e){return new URL(n,e).href},fb={},A_=function(e,i,r){let l=Promise.resolve();if(i&&i.length>0){let u=function(b){return Promise.all(b.map(m=>Promise.resolve(m).then(S=>({status:"fulfilled",value:S}),S=>({status:"rejected",reason:S}))))};const f=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),g=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));l=u(i.map(b=>{if(b=T_(b,r),b in fb)return;fb[b]=!0;const m=b.endsWith(".css"),S=m?'[rel="stylesheet"]':"";if(!!r)for(let x=f.length-1;x>=0;x--){const _=f[x];if(_.href===b&&(!m||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${b}"]${S}`))return;const T=document.createElement("link");if(T.rel=m?"stylesheet":E_,m||(T.as="script"),T.crossOrigin="",T.href=b,g&&T.setAttribute("nonce",g),document.head.appendChild(T),m)return new Promise((x,_)=>{T.addEventListener("load",x),T.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${b}`)))})}))}function o(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return l.then(u=>{for(const f of u||[])f.status==="rejected"&&o(f.reason);return e().catch(o)})},C_=20,Er=({text:n,highlighter:e,mimeType:i,linkify:r,readOnly:l,highlight:o,revealLine:u,lineNumbers:f,isFocused:d,focusOnChange:g,wrapLines:b,onChange:m,dataTestId:S,placeholder:w})=>{const[T,x]=ms(),[_]=R.useState(A_(()=>import("./codeMirrorModule-DS0FLvoc.js"),__vite__mapDeps([0,1]),import.meta.url).then(G=>G.default)),A=R.useRef(null),[N,$]=R.useState();return R.useEffect(()=>{(async()=>{var B,O;const G=await _;k_(G);const X=x.current;if(!X)return;const U=O_(e)||M_(i)||(r?"text/linkified":"");if(A.current&&U===A.current.cm.getOption("mode")&&!!l===A.current.cm.getOption("readOnly")&&f===A.current.cm.getOption("lineNumbers")&&b===A.current.cm.getOption("lineWrapping")&&w===A.current.cm.getOption("placeholder"))return;(O=(B=A.current)==null?void 0:B.cm)==null||O.getWrapperElement().remove();const L=G(X,{value:"",mode:U,readOnly:!!l,lineNumbers:f,lineWrapping:b,placeholder:w,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-F":"findPersistent","Cmd-F":"findPersistent"}});return A.current={cm:L},d&&L.focus(),$(L),L})()},[_,N,x,e,i,r,f,b,l,d,w]),R.useEffect(()=>{A.current&&A.current.cm.setSize(T.width,T.height)},[T]),R.useLayoutEffect(()=>{var U;if(!N)return;let G=!1;if(N.getValue()!==n&&(N.setValue(n),G=!0,g&&(N.execCommand("selectAll"),N.focus())),G||JSON.stringify(o)!==JSON.stringify(A.current.highlight)){for(const O of A.current.highlight||[])N.removeLineClass(O.line-1,"wrap");for(const O of o||[])N.addLineClass(O.line-1,"wrap",`source-line-${O.type}`);for(const O of A.current.widgets||[])N.removeLineWidget(O);for(const O of A.current.markers||[])O.clear();const L=[],B=[];for(const O of o||[]){if(O.type!=="subtle-error"&&O.type!=="error")continue;const ne=(U=A.current)==null?void 0:U.cm.getLine(O.line-1);if(ne){const te={};te.title=O.message||"",B.push(N.markText({line:O.line-1,ch:0},{line:O.line-1,ch:O.column||ne.length},{className:"source-line-error-underline",attributes:te}))}if(O.type==="error"){const te=document.createElement("div");te.innerHTML=nl(O.message||""),te.className="source-line-error-widget",L.push(N.addLineWidget(O.line,te,{above:!0,coverGutter:!1}))}}A.current.highlight=o,A.current.widgets=L,A.current.markers=B}typeof u=="number"&&A.current.cm.lineCount()>=u&&N.scrollIntoView({line:Math.max(0,u-1),ch:0},50);let X;return m&&(X=()=>m(N.getValue()),N.on("change",X)),()=>{X&&N.off("change",X)}},[N,n,o,u,g,m]),v.jsx("div",{"data-testid":S,className:"cm-wrapper",ref:x,onClick:N_})};function N_(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 hb=!1;function k_(n){hb||(hb=!0,n.defineSimpleMode("text/linkified",{start:[{regex:t0,token:"linkified"}]}))}function M_(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 O_(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 j_(n){return!!n.match(/^(application\/json|application\/.*?\+json|text\/(x-)?json)(;\s*charset=.*)?$/)}function L_(n){return!!n.match(/^(application\/xml|application\/.*?\+xml|text\/xml)(;\s*charset=.*)?$/)}function R_(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 H0=({title:n,children:e,setExpanded:i,expanded:r,expandOnTitleClick:l,className:o})=>{const u=R.useId(),f=R.useId(),d=R.useCallback(()=>i(!r),[r,i]),g=v.jsx("div",{className:st("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:l?void 0:d});return v.jsxs("div",{className:st("expandable",r&&"expanded",o),children:[l?v.jsxs("div",{id:u,role:"button","aria-expanded":r,"aria-controls":f,className:"expandable-title",onClick:d,children:[g,n]}):v.jsxs("div",{className:"expandable-title",children:[g,n]}),r&&v.jsx("div",{id:f,"aria-labelledby":u,role:"region",className:"expandable-content",children:e})]})};function B0(n){const e=[];let i=0,r;for(;(r=t0.exec(n))!==null;){const o=n.substring(i,r.index);o&&e.push(o);const u=r[0];e.push(D_(u)),i=r.index+u.length}const l=n.substring(i);return l&&e.push(l),e}function D_(n){let e=n;return e.startsWith("www.")&&(e="https://"+e),v.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:n})}const q0=R.createContext(void 0),si=()=>R.useContext(q0),z_=({attachment:n,reveal:e})=>{const i=si(),[r,l]=R.useState(!1),[o,u]=R.useState(null),[f,d]=R.useState(null),[g,b]=ax(),m=R.useRef(null),S=R_(n.contentType),w=!!n.sha1||!!n.path;R.useEffect(()=>{var _;if(e)return(_=m.current)==null||_.scrollIntoView({behavior:"smooth"}),b()},[e,b]),R.useEffect(()=>{r&&o===null&&f===null&&(d("Loading ..."),fetch(bc(i,n)).then(_=>_.text()).then(_=>{u(_),d(null)}).catch(_=>{d("Failed to load: "+_.message)}))},[i,r,o,f,n]);const T=R.useMemo(()=>{const _=o?o.split(` `).length:0;return Math.min(Math.max(5,_),20)*C_},[o]),x=v.jsxs("span",{style:{marginLeft:5},ref:m,"aria-label":n.name,children:[v.jsx("span",{children:B0(n.name)}),w&&v.jsx("a",{style:{marginLeft:5},href:Fo(i,n),children:"download"})]});return!S||!w?v.jsx("div",{style:{marginLeft:20},children:x}):v.jsxs("div",{className:st(g&&"yellow-flash"),children:[v.jsx(H0,{title:x,expanded:r,setExpanded:l,expandOnTitleClick:!0,children:f&&v.jsx("i",{children:f})}),r&&o!==null&&v.jsx("div",{className:"vbox",style:{height:T},children:v.jsx(Er,{text:o,readOnly:!0,mimeType:n.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},U_=({revealedAttachmentCallId:n})=>{const e=si(),{diffMap:i,screenshots:r,attachments:l}=R.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 g=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(g){const b=g[1],m=g[2],S=f.get(b)||{expected:void 0,actual:void 0,diff:void 0};S[m]=d,f.set(b,S),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&&!r.size&&!l.size?v.jsx(ys,{text:"No attachments"}):v.jsxs("div",{className:"attachments-tab",children:[[...i.values()].map(({expected:o,actual:u,diff:f})=>v.jsxs(v.Fragment,{children:[o&&u&&v.jsx("div",{className:"attachments-section",children:"Image diff"}),o&&u&&v.jsx(x_,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:Fo(e,o)},title:"Expected"},actual:{attachment:{...u,path:Fo(e,u)}},diff:f?{attachment:{...f,path:Fo(e,f)}}:void 0}})]})),r.size?v.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((o,u)=>{const f=bc(e,o);return v.jsxs("div",{className:"attachment-item",children:[v.jsx("div",{children:v.jsx("img",{draggable:"false",src:f})}),v.jsx("div",{children:v.jsx("a",{target:"_blank",href:f,rel:"noreferrer",children:o.name})})]},`screenshot-${u}`)}),l.size?v.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...l.values()].map((o,u)=>v.jsx("div",{className:"attachment-item",children:v.jsx(z_,{attachment:o,reveal:n&&o.callId===n.callId?n:void 0})},H_(o,u)))]})};function bc(n,e){return n&&e.sha1?n.createRelativeUrl(`sha1/${e.sha1}`):`file?path=${encodeURIComponent(e.path)}`}function Fo(n,e){let i=e.contentType?`&dn=${encodeURIComponent(e.name)}`:"";return e.contentType&&(i+=`&dct=${encodeURIComponent(e.contentType)}`),bc(n,e)+i}function H_(n,e){return e+"-"+(n.sha1?"sha1-"+n.sha1:"path-"+n.path)}const B_=({prompt:n})=>v.jsx(Yo,{value:n,description:"Copy prompt",copiedDescription:v.jsxs(v.Fragment,{children:["Copied ",v.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function q_(n){return R.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 $_({message:n,error:e,sdkLanguage:i,revealInSource:r}){var f;let l,o;const u=(f=e.stack)==null?void 0:f[0];return u&&(l=u.file.replace(/.*[/\\](.*)/,"$1")+":"+u.line,o=u.file+":"+u.line),v.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[v.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&ed(e.action,{sdkLanguage:i}),l&&v.jsxs("div",{className:"action-location",children:["@ ",v.jsx("span",{title:o,onClick:()=>r(e),children:l})]})]}),v.jsx(S_,{error:n})]})}const I_=({errorsModel:n,sdkLanguage:e,revealInSource:i,wallTime:r,testRunMetadata:l})=>{const o=si(),u=Yh(async()=>{const f=o==null?void 0:o.attachments.find(g=>g.name==="error-context");if(!f)return;let d=await fetch(bc(o,f)).then(g=>g.text());if(d)return l!=null&&l.gitDiff&&(d+=` # Local changes \`\`\`diff `+l.gitDiff+"\n```"),d},[o,l],void 0);return n.errors.size?v.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[v.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:u&&v.jsx(B_,{prompt:u})}),[...n.errors.entries()].map(([f,d])=>{const g=`error-${r}-${f}`;return v.jsx($_,{message:f,error:d,revealInSource:i,sdkLanguage:e},g)})]}):v.jsx(ys,{text:"No errors"})},V_=yc;function G_(n,e){const{entries:i}=R.useMemo(()=>{if(!n)return{entries:[]};const l=[];function o(f){var b,m,S,w,T,x;const d=l[l.length-1];d&&((b=f.browserMessage)==null?void 0:b.bodyString)===((m=d.browserMessage)==null?void 0:m.bodyString)&&((S=f.browserMessage)==null?void 0:S.location)===((w=d.browserMessage)==null?void 0:w.location)&&f.browserError===d.browserError&&((T=f.nodeMessage)==null?void 0:T.html)===((x=d.nodeMessage)==null?void 0:x.html)&&f.isError===d.isError&&f.isWarning===d.isWarning&&f.timestamp-d.timestamp<1e3?d.repeat++:l.push({...f,repeat:1})}const u=[...n.events,...n.stdio].sort((f,d)=>{const g="time"in f?f.time:f.timestamp,b="time"in d?d.time:d.timestamp;return g-b});for(const f of u){if(f.type==="console"){const d=f.args&&f.args.length?X_(f.args):$0(f.text),g=f.location.url,m=`${g?g.substring(g.lastIndexOf("/")+1):""}:${f.location.lineNumber}`;o({browserMessage:{body:d,bodyString:f.text,location:m},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=nl(f.text.trim())||""),f.base64&&(d=nl(atob(f.base64).trim())||""),o({nodeMessage:{html:d},isError:f.type==="stderr",isWarning:!1,timestamp:f.timestamp})}}return{entries:l}},[n]);return{entries:R.useMemo(()=>e?i.filter(l=>l.timestamp>=e.minimum&&l.timestamp<=e.maximum):i,[i,e])}}const K_=({consoleModel:n,boundaries:e,onEntryHovered:i,onAccepted:r})=>n.entries.length?v.jsx("div",{className:"console-tab",children:v.jsx(V_,{name:"console",onAccepted:r,onHighlighted:l=>i==null?void 0:i(l?n.entries.indexOf(l):void 0),items:n.entries,isError:l=>l.isError,isWarning:l=>l.isWarning,render:l=>{const o=bt(l.timestamp-e.minimum),u=v.jsx("span",{className:"console-time",children:o}),f=l.isError?"status-error":l.isWarning?"status-warning":"status-none",d=l.browserMessage||l.browserError?v.jsx("span",{className:st("codicon","codicon-browser",f),title:"Browser message"}):v.jsx("span",{className:st("codicon","codicon-file",f),title:"Runner message"});let g,b,m,S;const{browserMessage:w,browserError:T,nodeMessage:x}=l;if(w&&(g=w.location,b=w.body),T){const{error:_,value:A}=T;_?(b=_.message,S=_.stack):b=String(A)}return x&&(m=x.html),v.jsxs("div",{className:"console-line",children:[u,d,g&&v.jsx("span",{className:"console-location",children:g}),l.repeat>1&&v.jsx("span",{className:"console-repeat",children:l.repeat}),b&&v.jsx("span",{className:"console-line-message",children:b}),m&&v.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:m}}),S&&v.jsx("div",{className:"console-stack",children:S})]})}})}):v.jsx(ys,{text:"No console entries"});function X_(n){if(n.length===1)return $0(n[0].preview);const e=typeof n[0].value=="string"&&n[0].value.includes("%"),i=e?n[0].value:"",r=e?n.slice(1):n;let l=0;const o=/%([%sdifoOc])/g;let u;const f=[];let d=[];f.push(v.jsx("span",{children:d},f.length+1));let g=0;for(;(u=o.exec(i))!==null;){const b=i.substring(g,u.index);d.push(v.jsx("span",{children:b},d.length+1)),g=u.index+2;const m=u[0][1];if(m==="%")d.push(v.jsx("span",{children:"%"},d.length+1));else if(m==="s"||m==="o"||m==="O"||m==="d"||m==="i"||m==="f"){const S=r[l++],w={};typeof(S==null?void 0:S.value)!="string"&&(w.color="var(--vscode-debugTokenExpression-number)"),d.push(v.jsx("span",{style:w,children:(S==null?void 0:S.preview)||""},d.length+1))}else if(m==="c"){d=[];const S=r[l++],w=S?Y_(S.preview):{};f.push(v.jsx("span",{style:w,children:d},f.length+1))}}for(gd[1].toUpperCase());e[f]=u}return e}catch{return{}}}function F_(n){return["background","border","color","font","line","margin","padding","text"].some(i=>n.startsWith(i))}const id=({noShadow:n,children:e,noMinHeight:i,className:r,sidebarBackground:l,onClick:o})=>v.jsx("div",{className:st("toolbar",n&&"no-shadow",i&&"no-min-height",r,l&&"toolbar-sidebar-background"),onClick:o,children:e}),Mh=({tabs:n,selectedTab:e,setSelectedTab:i,leftToolbar:r,rightToolbar:l,dataTestId:o,mode:u})=>{const f=R.useId();return e||(e=n[0].id),u||(u="default"),v.jsx("div",{className:"tabbed-pane","data-testid":o,children:v.jsxs("div",{className:"vbox",children:[v.jsxs(id,{children:[r&&v.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),u==="default"&&v.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...n.map(d=>v.jsx(I0,{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"&&v.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:v.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 g="";return d.count&&(g=` (${d.count})`),d.errorCount&&(g=` (${d.errorCount})`),v.jsxs("option",{value:d.id,role:"tab","aria-controls":`${f}-${d.id}`,children:[d.title,g]},d.id)})})}),l&&v.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...l]})]}),n.map(d=>{const g="tab-content tab-"+d.id;if(d.component)return v.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:g,style:{display:e===d.id?"inherit":"none"},children:d.component},d.id);if(e===d.id)return v.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:g,children:d.render()},d.id)})]})})},I0=({id:n,title:e,count:i,errorCount:r,selected:l,onSelect:o,ariaControls:u})=>v.jsxs("div",{className:st("tabbed-pane-tab",l&&"selected"),onClick:()=>o==null?void 0:o(n),role:"tab",title:e,"aria-controls":u,"aria-selected":l,children:[v.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!i&&v.jsx("div",{className:"tabbed-pane-tab-counter",children:i}),!!r&&v.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]});async function Q_(n,e){const i=navigator.platform.includes("Win")?"win":"unix";let r=[];const l=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function o(S){return'^"'+S.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,`^ `)+'^"'}function u(S){function w(T){let _=T.charCodeAt(0).toString(16);for(;_.length<4;)_="0"+_;return"\\u"+_}return/[\0-\x1F\x7F-\x9F!]|\'/.test(S)?"$'"+S.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,w)+"'":"'"+S+"'"}const f=i==="win"?o:u;r.push(f(e.request.url).replace(/[[{}\]]/g,"\\$&"));let d="GET";const g=[],b=await V0(n,e);b&&(g.push("--data-raw "+f(b)),l.add("content-length"),d="POST"),e.request.method!==d&&r.push("-X "+f(e.request.method));const m=e.request.headers;for(let S=0;S=3?i==="win"?` ^ `:` \\ `:" ")}async function P_(n,e,i=0){const r=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"]),l=new Set(["cookie","authorization"]),o=JSON.stringify(e.request.url),u=e.request.headers,f=u.reduce((x,_)=>{const A=_.name;return!r.has(A.toLowerCase())&&!A.includes(":")&&x.append(A,_.value),x},new Headers),d={};for(const x of f)d[x[0]]=x[1];const g=e.request.cookies.length||u.some(({name:x})=>l.has(x.toLowerCase()))?"include":"omit",b=u.find(({name:x})=>x.toLowerCase()==="referer"),m=b?b.value:void 0,S=await V0(n,e),w={headers:Object.keys(d).length?d:void 0,referrer:m,body:S,method:e.request.method,mode:"cors"};if(i===1){const x=u.find(A=>A.name.toLowerCase()==="cookie"),_={};delete w.mode,x&&(_.cookie=x.value),m&&(delete w.referrer,_.Referer=m),Object.keys(_).length&&(w.headers={...d,..._})}else w.credentials=g;const T=JSON.stringify(w,null,2);return`fetch(${o}, ${T});`}async function V0(n,e){var i,r;return n&&((i=e.request.postData)!=null&&i._sha1)?await fetch(n.createRelativeUrl(`sha1/${e.request.postData._sha1}`)).then(l=>l.text()):(r=e.request.postData)==null?void 0:r.text}class J_{generatePlaywrightRequestCall(e,i){let r=e.method.toLowerCase();const l=new URL(e.url),o=`${l.origin}${l.pathname}`,u={};["delete","get","head","post","put","patch"].includes(r)||(u.method=r,r="fetch"),l.searchParams.size&&(u.params=Object.fromEntries(l.searchParams.entries())),i&&(u.data=i),e.headers.length&&(u.headers=Object.fromEntries(e.headers.map(g=>[g.name,g.value])));const f=[`'${o}'`];return Object.keys(u).length>0&&f.push(this.prettyPrintObject(u)),`await page.request.${r}(${f.join(", ")});`}prettyPrintObject(e,i=2,r=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(r*i),d=" ".repeat((r+1)*i);return`[ ${e.map(b=>`${d}${this.prettyPrintObject(b,i,r+1)}`).join(`, `)} ${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`{ ${Object.entries(e).map(([f,d])=>{const g=this.prettyPrintObject(d,i,r+1),b=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(f)?f:this.stringLiteral(f);return`${o}${b}: ${g}`}).join(`, `)} ${l}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(` `)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class Z_{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),o=[`"${`${r.origin}${r.pathname}`}"`];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`method="${u}"`),u="fetch"),r.searchParams.size&&o.push(`params=${this.prettyPrintObject(Object.fromEntries(r.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]:` ${o.map(d=>this.indent(d,2)).join(`, `)} `;return`await page.request.${u}(${f})`}indent(e,i){return e.split(` `).map(r=>" ".repeat(i)+r).join(` `)}prettyPrintObject(e,i=2,r=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(r*i),d=" ".repeat((r+1)*i);return`[ ${e.map(b=>`${d}${this.prettyPrintObject(b,i,r+1)}`).join(`, `)} ${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`{ ${Object.entries(e).map(([f,d])=>{const g=this.prettyPrintObject(d,i,r+1);return`${o}${this.stringLiteral(f)}: ${g}`}).join(`, `)} ${l}}`}stringLiteral(e){return JSON.stringify(e)}}class W_{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),l=`${r.origin}${r.pathname}`,o={},u=[];let f=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(f)||(o.Method=f,f="fetch"),r.searchParams.size&&(o.Params=Object.fromEntries(r.searchParams.entries())),i&&(o.Data=i),e.headers.length&&(o.Headers=Object.fromEntries(e.headers.map(b=>[b.name,b.value])));const d=[`"${l}"`];return Object.keys(o).length>0&&d.push(this.prettyPrintObject(o)),`${u.join(` `)}${u.length?` `:""}await request.${this.toFunctionName(f)}(${d.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,i=2,r=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(r*i),d=" ".repeat((r+1)*i);return`new object[] { ${e.map(b=>`${d}${this.prettyPrintObject(b,i,r+1)}`).join(`, `)} ${f}}`}if(Object.keys(e).length===0)return"new {}";const l=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`new() { ${Object.entries(e).map(([f,d])=>{const g=this.prettyPrintObject(d,i,r+1),b=r===0?f:`[${this.stringLiteral(f)}]`;return`${o}${b} = ${g}`}).join(`, `)} ${l}}`}stringLiteral(e){return JSON.stringify(e)}}class eE{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),l=[`"${r.origin}${r.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 r.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&&l.push(`RequestOptions.create() .${o.join(` .`)} `),`request.${u}(${l.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function tE(n){if(n==="javascript")return new J_;if(n==="python")return new Z_;if(n==="csharp")return new W_;if(n==="java")return new eE;throw new Error("Unsupported language: "+n)}const nE=({resource:n,sdkLanguage:e,startTimeOffset:i,onClose:r})=>{const[l,o]=R.useState("headers"),u=si(),f=Yh(async()=>{if(u&&n.request.postData){const d=n.request.headers.find(b=>b.name.toLowerCase()==="content-type"),g=d?d.value:"";if(n.request.postData._sha1){const b=await fetch(u.createRelativeUrl(`sha1/${n.request.postData._sha1}`));return{text:Oh(await b.text(),g),mimeType:g}}else return{text:Oh(n.request.postData.text,g),mimeType:g}}else return null},[n],null);return v.jsx(Mh,{leftToolbar:[v.jsx(ut,{icon:"close",title:"Close",onClick:r},"close")],rightToolbar:[v.jsx(iE,{requestBody:f,resource:n,sdkLanguage:e},"dropdown")],tabs:[{id:"headers",title:"Headers",render:()=>v.jsx(sE,{resource:n,startTimeOffset:i})},{id:"payload",title:"Payload",render:()=>v.jsx(rE,{resource:n,requestBody:f})},{id:"response",title:"Response",render:()=>v.jsx(aE,{resource:n})}],selectedTab:l,setSelectedTab:o})},iE=({resource:n,sdkLanguage:e,requestBody:i})=>{const r=si(),l=v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>tE(e).generatePlaywrightRequestCall(n.request,i==null?void 0:i.text);return v.jsxs("div",{className:"copy-request-dropdown",children:[v.jsxs(ut,{className:"copy-request-dropdown-toggle",children:[v.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",v.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),v.jsxs("div",{className:"copy-request-dropdown-menu",children:[v.jsx(Yo,{description:"Copy as cURL",copiedDescription:l,value:()=>Q_(r,n)}),v.jsx(Yo,{description:"Copy as Fetch",copiedDescription:l,value:()=>P_(r,n)}),v.jsx(Yo,{description:"Copy as Playwright",copiedDescription:l,value:o})]})]})},Ya=({title:n,data:e,showCount:i,children:r,className:l})=>{const[o,u]=pn(`trace-viewer-network-details-${n.replaceAll(" ","-")}`,!0);return v.jsxs(H0,{expanded:o,setExpanded:u,expandOnTitleClick:!0,title:v.jsxs("span",{className:"network-request-details-header",children:[n,i&&v.jsxs("span",{className:"network-request-details-header-count",children:[" × ",(e==null?void 0:e.length)??0]})]}),className:l,children:[e&&v.jsx("table",{className:"network-request-details-table",children:v.jsx("tbody",{children:e.map(({name:f,value:d},g)=>d!==null&&v.jsxs("tr",{children:[v.jsx("td",{children:f}),v.jsx("td",{children:d})]},g))})}),r]})},sE=({resource:n,startTimeOffset:e})=>{const i=R.useMemo(()=>Object.entries({URL:n.request.url,Method:n.request.method,"Status Code":n.response.status!==-1&&v.jsxs("span",{className:oE(n.response.status),children:[" ",n.response.status," ",n.response.statusText]}),Start:bt(e),Duration:bt(n.time)}).map(([r,l])=>({name:r,value:l})),[n,e]);return v.jsxs("div",{className:"vbox network-request-details-tab",children:[v.jsx(Ya,{title:"General",data:i}),v.jsx(Ya,{title:"Request Headers",showCount:!0,data:n.request.headers}),v.jsx(Ya,{title:"Response Headers",showCount:!0,data:n.response.headers})]})},rE=({resource:n,requestBody:e})=>v.jsxs("div",{className:"vbox network-request-details-tab",children:[n.request.queryString.length===0&&!e&&v.jsx("em",{className:"network-request-no-payload",children:"No payload for this request."}),n.request.queryString.length>0&&v.jsx(Ya,{title:"Query String Parameters",showCount:!0,data:n.request.queryString}),e&&v.jsx(Ya,{title:"Request Body",className:"network-request-request-body",children:v.jsx(Er,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})})]}),aE=({resource:n})=>{const e=si(),[i,r]=R.useState(null);return R.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(),g=new FileReader,b=new Promise(m=>g.onload=m);g.readAsDataURL(d),r({dataUrl:(await b).target.result})}else if(u){const d=await f.arrayBuffer();r({font:d})}else{const d=Oh(await f.text(),n.response.content.mimeType);r({text:d,mimeType:n.response.content.mimeType})}}else r(null)})()},[n,e]),v.jsxs("div",{className:"vbox network-request-details-tab",children:[!n.response.content._sha1&&v.jsx("div",{children:"Response body is not available for this request."}),i&&i.font&&v.jsx(lE,{font:i.font}),i&&i.dataUrl&&v.jsx("div",{children:v.jsx("img",{draggable:"false",src:i.dataUrl})}),i&&i.text&&v.jsx(Er,{text:i.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0})]})},lE=({font:n})=>{const[e,i]=R.useState(!1);return R.useEffect(()=>{let r;try{r=new FontFace("font-preview",n),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&i(!0)}catch{i(!0)}return()=>{document.fonts.delete(r)}},[n]),e?v.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):v.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",v.jsx("br",{}),"NOPQRSTUVWXYZ",v.jsx("br",{}),"abcdefghijklm",v.jsx("br",{}),"nopqrstuvwxyz",v.jsx("br",{}),"1234567890"]})};function oE(n){return n<300||n===304?"green-circle":n<400?"yellow-circle":"red-circle"}const cE=/<[^>]+>[^<]*<\//;function uE(n,e=" "){let i=0;const r=[],l=n.replace(/>\s* <`).split(` `);for(const o of l){const u=o.trim();u&&(u.startsWith("")||u.startsWith("";if(j_(e))try{return JSON.stringify(JSON.parse(i),null,2)}catch{return i}if(L_(e))try{return uE(i)}catch{return i}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(i):i}function fE(n){const[e,i]=R.useState([]);R.useEffect(()=>{const o=[];for(let u=0;u{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 v.jsxs("div",{className:`grid-view ${n.name}-grid-view`,children:[v.jsx(U0,{orientation:"horizontal",offsets:e,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),v.jsxs("div",{className:"vbox",children:[v.jsx("div",{className:"grid-view-header",children:n.columns.map((o,u)=>v.jsxs("div",{className:"grid-view-header-cell "+hE(o,n.sorting),style:{width:un.setSorting&&l(o),children:[v.jsx("span",{className:"grid-view-header-cell-title",children:n.columnTitle(o)}),v.jsx("span",{className:"codicon codicon-triangle-up"}),v.jsx("span",{className:"codicon codicon-triangle-down"})]},n.columnTitle(o)))}),v.jsx(yc,{name:n.name,items:n.items,ariaLabel:n.ariaLabel,id:n.id,render:(o,u)=>v.jsx(v.Fragment,{children:n.columns.map((f,d)=>{const{body:g,title:b}=n.render(o,f,u);return v.jsx("div",{className:`grid-view-cell grid-view-column-${String(f)}`,title:b,style:{width:dv.jsxs("div",{className:"network-filters",children:[v.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:n.searchValue,onChange:i=>e({...n,searchValue:i.target.value})}),v.jsxs("div",{className:"network-filters-resource-types",role:"tablist","aria-multiselectable":"true",children:[v.jsx("div",{title:"All",onClick:()=>e({...n,resourceTypes:new Set}),className:`network-filters-resource-type ${n.resourceTypes.size===0?"selected":""}`,children:"All"}),dE.map(i=>v.jsx("div",{title:i,onClick:r=>{let l;r.ctrlKey||r.metaKey?l=n.resourceTypes.symmetricDifference(new Set([i])):l=new Set([i]),e({...n,resourceTypes:l})},className:`network-filters-resource-type ${n.resourceTypes.has(i)?"selected":""}`,role:"tab","aria-selected":n.resourceTypes.has(i),children:i},i))]})]}),mE=fE;function yE(n,e){const i=R.useMemo(()=>((n==null?void 0:n.resources)||[]).filter(u=>e?!!u._monotonicTime&&u._monotonicTime>=e.minimum&&u._monotonicTime<=e.maximum:!0),[n,e]),r=R.useMemo(()=>new _E(n),[n]);return{resources:i,contextIdMap:r}}const bE=({boundaries:n,networkModel:e,onResourceHovered:i,sdkLanguage:r})=>{const[l,o]=R.useState(void 0),[u,f]=R.useState(void 0),[d,g]=R.useState(pE),{renderedEntries:b}=R.useMemo(()=>{const _=e.resources.map(A=>EE(A,n,e.contextIdMap)).filter(kE(d));return l&&AE(_,l),{renderedEntries:_}},[e.resources,e.contextIdMap,d,l,n]),m=R.useMemo(()=>u?b.find(_=>_.resource.id===u):void 0,[u,b]),[S,w]=R.useState(()=>new Map(G0().map(_=>[_,SE(_)]))),T=R.useCallback(_=>{g(_),f(void 0)},[]);if(!e.resources.length)return v.jsx(ys,{text:"No network calls"});const x=v.jsx(mE,{name:"network",ariaLabel:"Network requests",items:b,selectedItem:m,onSelected:_=>f(_.resource.id),onHighlighted:_=>i==null?void 0:i(_==null?void 0:_.resource.id),columns:wE(!!m,b),columnTitle:vE,columnWidths:S,setColumnWidths:w,isError:_=>_.status.code>=400||_.status.code===-1,isInfo:_=>!!_.route,render:(_,A)=>xE(_,A),sorting:l,setSorting:o});return v.jsxs(v.Fragment,{children:[v.jsx(gE,{filterState:d,onFilterStateChange:T}),!m&&x,m&&v.jsx(nc,{sidebarSize:S.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:v.jsx(nE,{resource:m.resource,sdkLanguage:r,startTimeOffset:m.start,onClose:()=>f(void 0)}),sidebar:x})]})},vE=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":"",SE=n=>n==="name"?200:n==="method"||n==="status"?60:n==="contentType"?200:n==="contextId"?60:100;function wE(n,e){if(n){const r=["name"];return db(e)&&r.unshift("contextId"),r}let i=G0();return db(e)||(i=i.filter(r=>r!=="contextId")),i}function G0(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const xE=(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:bt(n.duration)}:e==="size"?{body:Lx(n.size)}:e==="start"?{body:bt(n.start)}:e==="route"?{body:n.route}:{body:""};class _E{constructor(e){this._pagerefToShortId=new Map,this._contextToId=new Map,this._lastPageId=0,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=c0(e);if(!i)return"";let r=this._contextToId.get(i);return r||(++this._lastApiRequestContextId,r="api#"+this._lastApiRequestContextId,this._contextToId.set(i,r)),r}}function db(n){const e=new Set;for(const i of n)if(e.add(i.contextId),e.size>1)return!0;return!1}const EE=(n,e,i)=>{const r=TE(n);let l;try{const f=new URL(n.request.url);l=f.pathname.substring(f.pathname.lastIndexOf("/")+1),l||(l=f.host),f.search&&(l+=f.search)}catch{l=n.request.url}let o=n.response.content.mimeType;const u=o.match(/^(.*);\s*charset=.*$/);return u&&(o=u[1]),{name:{name:l,url:n.request.url},method:n.request.method,status:{code:n.response.status,text:n.response.statusText},contentType:o,duration:n.time,size:n.response._transferSize>0?n.response._transferSize:n.response.bodySize,start:n._monotonicTime-e.minimum,route:r,resource:n,contextId:i.contextId(n)}};function TE(n){return n._wasAborted?"aborted":n._wasContinued?"continued":n._wasFulfilled?"fulfilled":n._apiRequest?"api":""}function AE(n,e){const i=CE(e==null?void 0:e.by);i&&n.sort(i),e.negate&&n.reverse()}function CE(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 r=e.method,l=i.method;return r.localeCompare(l)};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 NE={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 kE({searchValue:n,resourceTypes:e}){return i=>(e.size===0||Array.from(e).some(l=>NE[l](i.contentType)))&&i.name.url.toLowerCase().includes(n.toLowerCase())}function ME(n,e){if(n.role!==e.role||n.name!==e.name||!OE(n,e)||lc(n)!==lc(e))return!1;const i=Object.keys(n.props),r=Object.keys(e.props);return i.length===r.length&&i.every(l=>n.props[l]===e.props[l])}function lc(n){return n.box.cursor==="pointer"}function OE(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 sd(n,e,i={}){var S;const r=new n.LineCounter,l={keepSourceTokens:!0,lineCounter:r,...i},o=n.parseDocument(e,l),u=[],f=w=>[r.linePos(w[0]),r.linePos(w[1])],d=w=>{u.push({message:w.message,range:[r.linePos(w.pos[0]),r.linePos(w.pos[1])]})},g=(w,T)=>{for(const x of T.items){if(x instanceof n.Scalar&&typeof x.value=="string"){const N=oc.parse(x,l,u);N&&(w.children=w.children||[],w.children.push(N));continue}if(x instanceof n.YAMLMap){b(w,x);continue}u.push({message:"Sequence items should be strings or maps",range:f(x.range||T.range)})}},b=(w,T)=>{for(const x of T.items){if(w.children=w.children||[],!(x.key instanceof n.Scalar&&typeof x.key.value=="string")){u.push({message:"Only string keys are supported",range:f(x.key.range||T.range)});continue}const A=x.key,N=x.value;if(A.value==="text"){if(!(N instanceof n.Scalar&&typeof N.value=="string")){u.push({message:"Text value should be a string",range:f(x.value.range||T.range)});continue}w.children.push({kind:"text",text:ah(N.value)});continue}if(A.value==="/children"){if(!(N instanceof n.Scalar&&typeof N.value=="string")||N.value!=="contain"&&N.value!=="equal"&&N.value!=="deep-equal"){u.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:f(x.value.range||T.range)});continue}w.containerMode=N.value;continue}if(A.value.startsWith("/")){if(!(N instanceof n.Scalar&&typeof N.value=="string")){u.push({message:"Property value should be a string",range:f(x.value.range||T.range)});continue}w.props=w.props??{},w.props[A.value.slice(1)]=ah(N.value);continue}const $=oc.parse(A,l,u);if(!$)continue;if(N instanceof n.Scalar){const U=typeof N.value;if(U!=="string"&&U!=="number"&&U!=="boolean"){u.push({message:"Node value should be a string or a sequence",range:f(x.value.range||T.range)});continue}w.children.push({...$,children:[{kind:"text",text:ah(String(N.value))}]});continue}if(N instanceof n.YAMLSeq){w.children.push($),g($,N);continue}u.push({message:"Map values should be strings or sequences",range:f(x.value.range||T.range)})}},m={kind:"role",role:"fragment"};return o.errors.forEach(d),u.length?{errors:u,fragment:m}:(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:m}:(g(m,o.contents),u.length?{errors:u,fragment:jE}:((S=m.children)==null?void 0:S.length)===1&&(!m.containerMode||m.containerMode==="contain")?{fragment:m.children[0],errors:[]}:{fragment:m,errors:[]}))}const jE={kind:"role",role:"fragment"};function K0(n){return n.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function ah(n){return{raw:n,normalized:K0(n)}}class oc{static parse(e,i,r){try{return new oc(e.value)._parse()}catch(l){if(l instanceof pb){const o=i.prettyErrors===!1?l.message:l.message+`: `+e.value+` `+" ".repeat(l.pos)+`^ `;return r.push({message:o,range:[i.lineCounter.linePos(e.range[0]),i.lineCounter.linePos(e.range[0]+l.pos)]}),null}throw l}}constructor(e){this._input=e,this._pos=0,this._length=e.length}_peek(){return this._input[this._pos]||""}_next(){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 r=this._next();if(i)e+=r,i=!1;else if(r==="\\")i=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,i=0){throw new pb(e,i||this._pos)}_readRegex(){let e="",i=!1,r=!1;for(;!this._eof();){const l=this._next();if(i)e+=l,i=!1;else if(l==="\\")i=!0,e+=l;else{if(l==="/"&&!r)return{pattern:e};l==="["?(r=!0,e+=l):l==="]"&&r?(e+=l,r=!1):e+=l}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),K0(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 r=this._readIdentifier("attribute");this._skipWhitespace();let l="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),i=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)l+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,r,l||"true",i)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const i=this._readStringOrRegex()||"",r={kind:"role",role:e,name:i};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,i,r,l){if(i==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',l),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(i==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',l),e.disabled=r==="true";return}if(i==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',l),e.expanded=r==="true";return}if(i==="active"){this._assert(r==="true"||r==="false",'Value of "active" attribute must be a boolean',l),e.active=r==="true";return}if(i==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',l),e.level=Number(r);return}if(i==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',l),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(i==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',l),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${i}]`,l)}_assert(e,i,r){e||this._throwError(i||"Assertion error",r)}}class pb extends Error{constructor(e,i){super(e),this.pos=i}}function LE(n,e){var u,f;function i(d,g,b){let m=1,S=b+m;for(const w of d.children||[])typeof w=="string"?(m++,S++):(m+=i(w,g,S),S+=m);if(!["none","presentation","fragment","iframe","generic"].includes(d.role)&&d.name){let w=g.get(d.role);w||(w=new Map,g.set(d.role,w));const T=w.get(d.name),x=m*100-b;(!T||T.sizeAndPositiong.sizeAndPosition-d.sizeAndPosition),(f=o[0])==null?void 0:f.node}function RE(n){return X0(n)?"'"+n.replace(/'/g,"''")+"'":n}function lh(n){return X0(n)?'"'+n.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case` `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':n}function X0(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 Y0={};function DE(n){Y0=n}function jh(n,e){for(;e;){if(n.contains(e))return!0;e=Q0(e)}return!1}function xt(n){if(n.parentElement)return n.parentElement;if(n.parentNode&&n.parentNode.nodeType===11&&n.parentNode.host)return n.parentNode.host}function F0(n){let e=n;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Q0(n){for(;n.parentElement;)n=n.parentElement;return xt(n)}function qa(n,e,i){for(;n;){const r=n.closest(e);if(i&&r!==i&&(r!=null&&r.contains(i)))return;if(r)return r;n=Q0(n)}}function Hi(n,e){const i=e==="::before"?ad:e==="::after"?ld:rd;if(i&&i.has(n))return i.get(n);const r=n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView.getComputedStyle(n,e):void 0;return i==null||i.set(n,r),r}function P0(n,e){if(e=e??Hi(n),!e)return!0;if(Element.prototype.checkVisibility&&Y0.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 cc(n){const e=Hi(n);if(!e)return{visible:!0,inline:!1};const i=e.cursor;if(e.display==="contents"){for(let l=n.firstChild;l;l=l.nextSibling){if(l.nodeType===1&&Di(l))return{visible:!0,inline:!1,cursor:i};if(l.nodeType===3&&J0(l))return{visible:!0,inline:!0,cursor:i}}return{visible:!1,inline:!1,cursor:i}}if(!P0(n,e))return{cursor:i,visible:!1,inline:!1};const r=n.getBoundingClientRect();return{cursor:i,visible:r.width>0&&r.height>0,inline:e.display==="inline"}}function Di(n){return cc(n).visible}function J0(n){const e=n.ownerDocument.createRange();e.selectNode(n);const i=e.getBoundingClientRect();return i.width>0&&i.height>0}function Je(n){const e=n.tagName;return typeof e=="string"?e.toUpperCase():n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}let rd,ad,ld,Z0=0;function od(){++Z0,rd??(rd=new Map),ad??(ad=new Map),ld??(ld=new Map)}function cd(){--Z0||(rd=void 0,ad=void 0,ld=void 0)}function gb(n){return n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")}const mb="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]",zE=[["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 W0(n,e){return zE.some(([i,r])=>!(r!=null&&r.includes(e||""))&&n.hasAttribute(i))}function ev(n){return!Number.isNaN(Number(String(n.getAttribute("tabindex"))))}function UE(n){return!hv(n)&&(HE(n)||ev(n))}function HE(n){const e=Je(n);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?n.hasAttribute("href"):e==="INPUT"?!n.hidden:!1}const oh={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=>qa(n,mb)?null:"contentinfo",FORM:n=>gb(n)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:n=>qa(n,mb)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:n=>n.getAttribute("alt")===""&&!n.getAttribute("title")&&!W0(n)&&!ev(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=kr(n,n.getAttribute("list"))[0];return i&&Je(i)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":eT[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=>gb(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=qa(n,"table"),i=e?ud(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,r=n.previousElementSibling,l=n.parentElement&&Je(n.parentElement)==="TR"?n.parentElement:void 0;if(!i&&!r){if(l){const o=qa(l,"table");if(o&&o.rows.length<=1)return null}return"columnheader"}return yb(i)&&yb(r)?"columnheader":bb(i)||bb(r)?"rowheader":"columnheader"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"};function yb(n){return!!n&&Je(n)==="TH"}function bb(n){var e;return!n||Je(n)!=="TD"?!1:!!((e=n.textContent)!=null&&e.trim()||n.children.length>0)}const BE={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 vb(n){var r;const e=((r=oh[Je(n)])==null?void 0:r.call(oh,n))||"";if(!e)return null;let i=n;for(;i;){const l=xt(i),o=BE[Je(i)];if(!o||!l||!o.includes(Je(l)))break;const u=ud(l);if((u==="none"||u==="presentation")&&!tv(l,u))return u;i=l}return e}const qE=["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 ud(n){return(n.getAttribute("role")||"").split(" ").map(i=>i.trim()).find(i=>qE.includes(i))||null}function tv(n,e){return W0(n,e)||UE(n)}function St(n){const e=ud(n);if(!e)return vb(n);if(e==="none"||e==="presentation"){const i=vb(n);if(tv(n,i))return i}return e}function nv(n){return n===null?void 0:n.toLowerCase()==="true"}function iv(n){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Je(n))}function dn(n){if(iv(n))return!0;const e=Hi(n),i=n.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!i){for(let l=n.firstChild;l;l=l.nextSibling)if(l.nodeType===1&&!dn(l)||l.nodeType===3&&J0(l))return!1;return!0}return!(n.nodeName==="OPTION"&&!!n.closest("select"))&&!i&&!P0(n,e)?!0:sv(n)}function sv(n){let e=ji==null?void 0:ji.get(n);if(e===void 0){if(e=!1,n.parentElement&&n.parentElement.shadowRoot&&!n.assignedSlot&&(e=!0),!e){const i=Hi(n);e=!i||i.display==="none"||nv(n.getAttribute("aria-hidden"))===!0}if(!e){const i=xt(n);i&&(e=sv(i))}ji==null||ji.set(n,e)}return e}function kr(n,e){if(!e)return[];const i=F0(n);if(!i)return[];try{const r=e.split(" ").filter(o=>!!o),l=[];for(const o of r){const u=i.querySelector("#"+CSS.escape(o));u&&!l.includes(u)&&l.push(u)}return l}catch{return[]}}function ei(n){return n.trim()}function Fa(n){return n.split(" ").map(e=>e.replace(/\r\n/g,` `).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function Sb(n,e){const i=[...n.querySelectorAll(e)];for(const r of kr(n,n.getAttribute("aria-owns")))r.matches(e)&&i.push(r),i.push(...r.querySelectorAll(e));return i}function Qa(n,e){const i=e==="::before"?xd:e==="::after"?_d:wd;if(i!=null&&i.has(n))return i==null?void 0:i.get(n);const r=Hi(n,e);let l;if(r){const o=r.content;o&&o!=="none"&&o!=="normal"&&r.display!=="none"&&r.visibility!=="hidden"&&(l=$E(n,o,!!e))}return e&&l!==void 0&&((r==null?void 0:r.display)||"inline")!=="inline"&&(l=" "+l+" "),i&&i.set(n,l),l}function $E(n,e,i){if(!(!e||e==="none"||e==="normal"))try{let r=u0(e).filter(f=>!(f instanceof ic));const l=r.findIndex(f=>f instanceof mt&&f.value==="/");if(l!==-1)r=r.slice(l+1);else if(!i)return;const o=[];let u=0;for(;uxn(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:dn(o)}})).join(" "))}else n.hasAttribute("aria-description")?r=Fa(n.getAttribute("aria-description")||""):r=Fa(n.getAttribute("title")||"");i==null||i.set(n,r)}return r}function VE(n){const e=n.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function GE(n){if("validity"in n){const e=n.validity;return(e==null?void 0:e.valid)===!1}return!1}function KE(n){const e=gr;let i=gr==null?void 0:gr.get(n);if(i===void 0){i="";const r=VE(n)!=="false",l=GE(n);if(r||l){const o=n.getAttribute("aria-errormessage");i=kr(n,o).map(d=>Fa(xn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:dn(d)}}))).join(" ").trim()}e==null||e.set(n,i)}return i}function xn(n,e){var d,g,b,m;if(e.visitedElements.has(n))return"";const i={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const S=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((g=e.embeddedInDescribedBy)!=null&&g.hidden)||!!((b=e.embeddedInNativeTextAlternative)!=null&&b.hidden)||!!((m=e.embeddedInLabel)!=null&&m.hidden);if(iv(n)||!S&&dn(n))return e.visitedElements.add(n),""}const r=rv(n);if(!e.embeddedInLabelledBy){const S=(r||[]).map(w=>xn(w,{...e,embeddedInLabelledBy:{element:w,hidden:dn(w)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(S)return S}const l=St(n)||"",o=Je(n);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const S=[...n.labels||[]].includes(n),w=(r||[]).includes(n);if(!S&&!w){if(l==="textbox")return e.visitedElements.add(n),o==="INPUT"||o==="TEXTAREA"?n.value:n.textContent||"";if(["combobox","listbox"].includes(l)){e.visitedElements.add(n);let T;if(o==="SELECT")T=[...n.selectedOptions],!T.length&&n.options.length&&T.push(n.options[0]);else{const x=l==="combobox"?Sb(n,"*").find(_=>St(_)==="listbox"):n;T=x?Sb(x,'[aria-selected="true"]').filter(_=>St(_)==="option"):[]}return!T.length&&o==="INPUT"?n.value:T.map(x=>xn(x,i)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(l))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(l))return e.visitedElements.add(n),""}}const u=n.getAttribute("aria-label")||"";if(ei(u))return e.visitedElements.add(n),u;if(!["presentation","none"].includes(l)){if(o==="INPUT"&&["button","submit","reset"].includes(n.type)){e.visitedElements.add(n);const S=n.value||"";return ei(S)?S:n.type==="submit"?"Submit":n.type==="reset"?"Reset":n.getAttribute("title")||""}if(o==="INPUT"&&n.type==="file"){e.visitedElements.add(n);const S=n.labels||[];return S.length&&!e.embeddedInLabelledBy?La(S,e):"Choose File"}if(o==="INPUT"&&n.type==="image"){e.visitedElements.add(n);const S=n.labels||[];if(S.length&&!e.embeddedInLabelledBy)return La(S,e);const w=n.getAttribute("alt")||"";if(ei(w))return w;const T=n.getAttribute("title")||"";return ei(T)?T:"Submit"}if(!r&&o==="BUTTON"){e.visitedElements.add(n);const S=n.labels||[];if(S.length)return La(S,e)}if(!r&&o==="OUTPUT"){e.visitedElements.add(n);const S=n.labels||[];return S.length?La(S,e):n.getAttribute("title")||""}if(!r&&(o==="TEXTAREA"||o==="SELECT"||o==="INPUT")){e.visitedElements.add(n);const S=n.labels||[];if(S.length)return La(S,e);const w=o==="INPUT"&&["text","password","search","tel","email","url"].includes(n.type)||o==="TEXTAREA",T=n.getAttribute("placeholder")||"",x=n.getAttribute("title")||"";return!w||x?x:T}if(!r&&o==="FIELDSET"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(Je(w)==="LEGEND")return xn(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:dn(w)}});return n.getAttribute("title")||""}if(!r&&o==="FIGURE"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(Je(w)==="FIGCAPTION")return xn(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:dn(w)}});return n.getAttribute("title")||""}if(o==="IMG"){e.visitedElements.add(n);const S=n.getAttribute("alt")||"";return ei(S)?S:n.getAttribute("title")||""}if(o==="TABLE"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(Je(w)==="CAPTION")return xn(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:dn(w)}});const S=n.getAttribute("summary")||"";if(S)return S}if(o==="AREA"){e.visitedElements.add(n);const S=n.getAttribute("alt")||"";return ei(S)?S:n.getAttribute("title")||""}if(o==="SVG"||n.ownerSVGElement){e.visitedElements.add(n);for(let S=n.firstElementChild;S;S=S.nextElementSibling)if(Je(S)==="TITLE"&&S.ownerSVGElement)return xn(S,{...i,embeddedInLabelledBy:{element:S,hidden:dn(S)}})}if(n.ownerSVGElement&&o==="A"){const S=n.getAttribute("xlink:title")||"";if(ei(S))return e.visitedElements.add(n),S}}const f=o==="SUMMARY"&&!["presentation","none"].includes(l);if(IE(l,e.embeddedInTargetElement==="descendant")||f||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(n);const S=XE(n,i);if(e.embeddedInTargetElement==="self"?ei(S):S)return S}if(!["presentation","none"].includes(l)||o==="IFRAME"){e.visitedElements.add(n);const S=n.getAttribute("title")||"";if(ei(S))return S}return e.visitedElements.add(n),""}function XE(n,e){const i=[],r=(o,u)=>{var f;if(!(u&&o.assignedSlot))if(o.nodeType===1){const d=((f=Hi(o))==null?void 0:f.display)||"inline";let g=xn(o,e);(d!=="inline"||o.nodeName==="BR")&&(g=" "+g+" "),i.push(g)}else o.nodeType===3&&i.push(o.textContent||"")};i.push(Qa(n,"::before")||"");const l=Qa(n);if(l!==void 0)i.push(l);else{const o=n.nodeName==="SLOT"?n.assignedNodes():[];if(o.length)for(const u of o)r(u,!1);else{for(let u=n.firstChild;u;u=u.nextSibling)r(u,!0);if(n.shadowRoot)for(let u=n.shadowRoot.firstChild;u;u=u.nextSibling)r(u,!0);for(const u of kr(n,n.getAttribute("aria-owns")))r(u,!0)}}return i.push(Qa(n,"::after")||""),i.join("")}const fd=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function av(n){return Je(n)==="OPTION"?n.selected:fd.includes(St(n)||"")?nv(n.getAttribute("aria-selected"))===!0:!1}const hd=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function lv(n){const e=dd(n,!0);return e==="error"?!1:e}function YE(n){return dd(n,!0)}function FE(n){return dd(n,!1)}function dd(n,e){const i=Je(n);if(e&&i==="INPUT"&&n.indeterminate)return"mixed";if(i==="INPUT"&&["checkbox","radio"].includes(n.type))return n.checked;if(hd.includes(St(n)||"")){const r=n.getAttribute("aria-checked");return r==="true"?!0:e&&r==="mixed"?"mixed":!1}return"error"}const QE=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function PE(n){const e=Je(n);return["INPUT","TEXTAREA","SELECT"].includes(e)?n.hasAttribute("readonly"):QE.includes(St(n)||"")?n.getAttribute("aria-readonly")==="true":n.isContentEditable?!1:"error"}const pd=["button"];function ov(n){if(pd.includes(St(n)||"")){const e=n.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const gd=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function cv(n){if(Je(n)==="DETAILS")return n.open;if(gd.includes(St(n)||"")){const e=n.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const md=["heading","listitem","row","treeitem"];function uv(n){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Je(n)];if(e)return e;if(md.includes(St(n)||"")){const i=n.getAttribute("aria-level"),r=i===null?Number.NaN:Number(i);if(Number.isInteger(r)&&r>=1)return r}return 0}const fv=["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 uc(n){return hv(n)||dv(n)}function hv(n){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(Je(n))&&(n.hasAttribute("disabled")||JE(n)||ZE(n))}function JE(n){return Je(n)==="OPTION"&&!!n.closest("OPTGROUP[DISABLED]")}function ZE(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 dv(n,e=!1){if(!n)return!1;if(e||fv.includes(St(n)||"")){const i=(n.getAttribute("aria-disabled")||"").toLowerCase();return i==="true"?!0:i==="false"?!1:dv(xt(n),!0)}return!1}function La(n,e){return[...n].map(i=>xn(i,{...e,embeddedInLabel:{element:i,hidden:dn(i)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(i=>!!i).join(" ")}function WE(n){const e=Ed;let i=n,r;const l=[];for(;i;i=xt(i)){const o=e.get(i);if(o!==void 0){r=o;break}l.push(i);const u=Hi(i);if(!u){r=!0;break}const f=u.pointerEvents;if(f){r=f!=="none";break}}r===void 0&&(r=!0);for(const o of l)e.set(o,r);return r}let yd,bd,vd,Sd,gr,ji,wd,xd,_d,Ed,pv=0;function vc(){od(),++pv,yd??(yd=new Map),bd??(bd=new Map),vd??(vd=new Map),Sd??(Sd=new Map),gr??(gr=new Map),ji??(ji=new Map),wd??(wd=new Map),xd??(xd=new Map),_d??(_d=new Map),Ed??(Ed=new Map)}function Sc(){--pv||(yd=void 0,bd=void 0,vd=void 0,Sd=void 0,gr=void 0,ji=void 0,wd=void 0,xd=void 0,_d=void 0,Ed=void 0),cd()}const eT={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};let tT=0;function gv(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=gv(e),r=new Set,l={root:{role:"fragment",name:"",children:[],props:{},box:cc(n),receivesPointerEvents:!0},elements:new Map,refs:new Map,iframeRefs:[]};Lh(l.root,n);const o=(f,d,g)=>{if(r.has(d))return;if(r.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!g)return;const x=d.nodeValue;f.role!=="textbox"&&x&&f.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const b=d,m=!dn(b);let S=m;if(i.visibility==="ariaOrVisible"&&(S=m||Di(b)),i.visibility==="ariaAndVisible"&&(S=m&&Di(b)),i.visibility==="aria"&&!S)return;const w=[];if(b.hasAttribute("aria-owns")){const x=b.getAttribute("aria-owns").split(/\s+/);for(const _ of x){const A=n.ownerDocument.getElementById(_);A&&w.push(A)}}const T=S?nT(b,i):null;T&&(T.ref&&(l.elements.set(T.ref,b),l.refs.set(b,T.ref),T.role==="iframe"&&l.iframeRefs.push(T.ref)),f.children.push(T)),u(T||f,b,w,S)};function u(f,d,g,b){var T;const S=(((T=Hi(d))==null?void 0:T.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";S&&f.children.push(S),f.children.push(Qa(d,"::before")||"");const w=d.nodeName==="SLOT"?d.assignedNodes():[];if(w.length)for(const x of w)o(f,x,b);else{for(let x=d.firstChild;x;x=x.nextSibling)x.assignedSlot||o(f,x,b);if(d.shadowRoot)for(let x=d.shadowRoot.firstChild;x;x=x.nextSibling)o(f,x,b)}for(const x of g)o(f,x,b);if(f.children.push(Qa(d,"::after")||""),S&&f.children.push(S),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}}vc();try{o(l.root,n,!0)}finally{Sc()}return sT(l.root),iT(l.root),l}function xb(n,e){if(e.refs==="none"||e.refs==="interactable"&&(!n.box.visible||!n.receivesPointerEvents))return;const i=Ad(n);let r=i._ariaRef;(!r||r.role!==n.role||r.name!==n.name)&&(r={role:n.role,name:n.name,ref:(e.refPrefix??"")+"e"+ ++tT},i._ariaRef=r),n.ref=r.ref}function nT(n,e){const i=n.ownerDocument.activeElement===n;if(n.nodeName==="IFRAME"){const g={role:"iframe",name:"",children:[],props:{},box:cc(n),receivesPointerEvents:!0,active:i};return Lh(g,n),xb(g,e),g}const r=e.includeGenericRole?"generic":null,l=St(n)??r;if(!l||l==="presentation"||l==="none")return null;const o=Ot(il(n,!1)||""),u=WE(n),f=cc(n);if(l==="generic"&&f.inline&&n.childNodes.length===1&&n.childNodes[0].nodeType===Node.TEXT_NODE)return null;const d={role:l,name:o,children:[],props:{},box:f,receivesPointerEvents:u,active:i};return Lh(d,n),xb(d,e),hd.includes(l)&&(d.checked=lv(n)),fv.includes(l)&&(d.disabled=uc(n)),gd.includes(l)&&(d.expanded=cv(n)),md.includes(l)&&(d.level=uv(n)),pd.includes(l)&&(d.pressed=ov(n)),fd.includes(l)&&(d.selected=av(n)),(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.type!=="checkbox"&&n.type!=="radio"&&n.type!=="file"&&(d.children=[n.value]),d}function iT(n){const e=i=>{const r=[];for(const o of i.children||[]){if(typeof o=="string"){r.push(o);continue}const u=e(o);r.push(...u)}return i.role==="generic"&&!i.name&&r.length<=1&&r.every(o=>typeof o!="string"&&!!o.ref)?r:(i.children=r,[i])};e(n)}function sT(n){const e=(r,l)=>{if(!r.length)return;const o=Ot(r.join(""));o&&l.push(o),r.length=0},i=r=>{const l=[],o=[];for(const u of r.children||[])typeof u=="string"?o.push(u):(e(o,l),i(u),l.push(u));e(o,l),r.children=l.length?l:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};i(n)}function rT(n,e){return e?n?typeof e=="string"?n===e:!!n.match(new RegExp(e.pattern)):!1:!0}function _b(n,e){if(!(e!=null&&e.normalized))return!0;if(!n)return!1;if(n===e.normalized||n===e.raw)return!0;const i=aT(e);return i?!!n.match(i):!1}const ch=Symbol("cachedRegex");function aT(n){if(n[ch]!==void 0)return n[ch];const{raw:e}=n,i=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let r;try{r=i?new RegExp(e.slice(1,-1)):null}catch{r=null}return n[ch]=r,r}function lT(n,e){const i=Pa(n,{mode:"default"});return{matches:mv(i.root,e,!1,!1),received:{raw:Ja(i,{mode:"default"}).text,regex:Ja(i,{mode:"codegen"}).text}}}function oT(n,e){const i=Pa(n,{mode:"default"}).root;return mv(i,e,!0,!1).map(l=>Ad(l))}function Td(n,e,i){var r;return typeof n=="string"&&e.kind==="text"?_b(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||!rT(n.name,e.name)||!_b(n.props.url,(r=e.props)==null?void 0:r.url)?!1:e.containerMode==="contain"?Tb(n.children||[],e.children||[]):e.containerMode==="equal"?Eb(n.children||[],e.children||[],!1):e.containerMode==="deep-equal"||i?Eb(n.children||[],e.children||[],!0):Tb(n.children||[],e.children||[])}function Eb(n,e,i){if(e.length!==n.length)return!1;for(let r=0;rn.length)return!1;const i=n.slice(),r=e.slice();for(const l of r){let o=i.shift();for(;o&&!Td(o,l,!1);)o=i.shift();if(!o)return!1}return!0}function mv(n,e,i,r){const l=[],o=(u,f)=>{if(Td(u,e,r)){const d=typeof u=="string"?f:u;return d&&l.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),l}function yv(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"&&yv(i,e);return e}function cT(n,e){var o;const i=yv(e==null?void 0:e.root),r=new Map,l=(u,f)=>{let d=u.children.length===(f==null?void 0:f.children.length)&&ME(u,f),g=d;for(let b=0;b{const o=e.get(l);if(o!=="same")if(o==="skip")for(const u of l.children)typeof u!="string"&&r(u);else i.push(l)};for(const l of n)typeof l=="string"?i.push(l):r(l);return i}function jo(n){return" ".repeat(n)}function Ja(n,e,i){const r=gv(e),l=[],o={},u=r.renderStringsAsRegex?hT:()=>!0,f=r.renderStringsAsRegex?fT:T=>T;let d=n.root.role==="fragment"?n.root.children:[n.root];const g=cT(n,i);i&&(d=uT(d,g));const b=(T,x)=>{if(e.depth&&x>e.depth)return;const _=lh(f(T));_&&l.push(jo(x)+"- text: "+_)},m=(T,x)=>{let _=T.role;if(T.name&&T.name.length<=900){const A=f(T.name);if(A){const N=A.startsWith("/")&&A.endsWith("/")?A:JSON.stringify(A);_+=" "+N}}return T.checked==="mixed"&&(_+=" [checked=mixed]"),T.checked===!0&&(_+=" [checked]"),T.disabled&&(_+=" [disabled]"),T.expanded&&(_+=" [expanded]"),T.active&&r.renderActive&&(_+=" [active]"),T.level&&(_+=` [level=${T.level}]`),T.pressed==="mixed"&&(_+=" [pressed=mixed]"),T.pressed===!0&&(_+=" [pressed]"),T.selected===!0&&(_+=" [selected]"),T.ref&&(_+=` [ref=${T.ref}]`,x&&lc(T)&&(_+=" [cursor=pointer]")),_},S=T=>(T==null?void 0:T.children.length)===1&&typeof T.children[0]=="string"&&!Object.keys(T.props).length?T.children[0]:void 0,w=(T,x,_)=>{if(e.depth&&x>e.depth)return;if(T.role==="iframe"&&T.ref&&(o[T.ref]=x),g.get(T)==="same"&&T.ref){l.push(jo(x)+`- ref=${T.ref} [unchanged]`);return}const A=!!i&&!x,N=jo(x)+"- "+(A?" ":"")+RE(m(T,_)),$=S(T),G=!!e.depth&&x===e.depth;if(!$&&(!T.children.length||G)&&!Object.keys(T.props).length)l.push(N);else if($!==void 0)u(T,$)?l.push(N+": "+lh(f($))):l.push(N);else{l.push(N+":");for(const[L,B]of Object.entries(T.props))l.push(jo(x+1)+"- /"+L+": "+lh(B));const U=!!T.ref&&_&&lc(T);for(const L of T.children)typeof L=="string"?b(u(T,L)?L:"",x+1):w(L,x+1,_&&!U)}};for(const T of d)typeof T=="string"?b(T,0):w(T,0,!!r.renderCursorPointer);return{text:l.join(` `),iframeDepths:o}}function fT(n){const e=[{regex:/\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b/,replacement:"[0-9a-fA-F-]+"},{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="",r=0;const l=new RegExp(e.map(o=>"("+o.regex.source+")").join("|"),"g");return n.replace(l,(o,...u)=>{const f=u[u.length-2],d=u.slice(0,-2);i+=rc(n.slice(r,f));for(let g=0;ge.length)return!1;const i=e.length<=200&&n.name.length<=200?t_(e,n.name):"";let r=e;for(;i&&r.includes(i);)r=r.replace(i,"");return r.trim().length/e.length>.1}const bv=Symbol("element");function Ad(n){return n[bv]}function Lh(n,e){n[bv]=e}function dT(n,e){const i=LE(n,e);return i?Ad(i):void 0}const Ab=":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-title{position:absolute;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#00000080;color:#fff;border-radius:6px;padding:6px;font-size:24px;line-height:1.4;white-space:nowrap;-webkit-user-select:none;user-select:none;z-index:3}x-pw-user-overlays,x-pw-user-overlay{position:absolute;top:0;right:0;bottom:0;left:0}@keyframes pw-fade-out{0%{opacity:1}to{opacity:0}}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 Lo{constructor(e){this._renderedEntries=[],this._userOverlays=new Map,this._userOverlayHidden=!1,this._language="javascript",this._injectedScript=e;const i=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=i.createElement("x-pw-glass"),this._glassPaneElement.setAttribute("popover","manual"),this._glassPaneElement.style.inset="0",this._glassPaneElement.style.width="100%",this._glassPaneElement.style.height="100%",this._glassPaneElement.style.maxWidth="none",this._glassPaneElement.style.maxHeight="none",this._glassPaneElement.style.padding="0",this._glassPaneElement.style.margin="0",this._glassPaneElement.style.border="none",this._glassPaneElement.style.overflow="visible",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._titleElement=i.createElement("x-pw-title"),this._titleElement.setAttribute("hidden","true"),this._userOverlayContainer=i.createElement("x-pw-user-overlays"),this._userOverlayContainer.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const r=new this._injectedScript.window.CSSStyleSheet;r.replaceSync(Ab),this._glassPaneShadow.adoptedStyleSheets.push(r)}else{const r=this._injectedScript.document.createElement("style");r.textContent=Ab,this._glassPaneShadow.appendChild(r)}this._glassPaneShadow.appendChild(this._actionPointElement),this._glassPaneShadow.appendChild(this._titleElement),this._glassPaneShadow.appendChild(this._userOverlayContainer)}install(){this._injectedScript.document.documentElement&&((!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement),this._bringToFront())}_bringToFront(){this._glassPaneElement.hidePopover(),this._glassPaneElement.showPopover()}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),r=Ri(this._language,On(e)),l=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:l,tooltipText:r+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,r){this._actionPointElement.style.top=i+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1,r?this._actionPointElement.style.animation=`pw-fade-out ${r}ms ease-out forwards`:this._actionPointElement.style.animation=""}hideActionPoint(){this._actionPointElement.hidden=!0}showActionTitle(e,i,r,l){if(this._titleElement.textContent=e,this._titleElement.hidden=!1,i){const o=i/4;this._titleElement.style.animation=`pw-fade-out ${o}ms ease-out ${i-o}ms forwards`}else this._titleElement.style.animation="";switch(this._titleElement.style.top="",this._titleElement.style.bottom="",this._titleElement.style.left="",this._titleElement.style.right="",this._titleElement.style.transform="",r){case"top-left":this._titleElement.style.top="6px",this._titleElement.style.left="6px";break;case"top":this._titleElement.style.top="6px",this._titleElement.style.left="50%",this._titleElement.style.transform="translateX(-50%)";break;case"bottom-left":this._titleElement.style.bottom="6px",this._titleElement.style.left="6px";break;case"bottom":this._titleElement.style.bottom="6px",this._titleElement.style.left="50%",this._titleElement.style.transform="translateX(-50%)";break;case"bottom-right":this._titleElement.style.bottom="6px",this._titleElement.style.right="6px";break;case"top-right":default:this._titleElement.style.top="6px",this._titleElement.style.right="6px";break}l&&(this._titleElement.style.fontSize=l+"px")}hideActionTitle(){this._titleElement.hidden=!0}addUserOverlay(e,i){const r=this._injectedScript.document.createElement("div");r.className="x-pw-user-overlay",r.innerHTML=i;for(const l of r.querySelectorAll("script"))l.remove();for(const l of r.querySelectorAll("*"))for(const o of[...l.attributes])o.name.startsWith("on")&&l.removeAttribute(o.name);return this._userOverlays.set(e,r),this._userOverlayContainer.appendChild(r),this._userOverlayContainer.hidden=this._userOverlayHidden,e}getUserOverlay(e){return this._userOverlays.get(e)}removeUserOverlay(e){const i=this._userOverlays.get(e);i&&(i.remove(),this._userOverlays.delete(e)),this._userOverlays.size===0&&(this._userOverlayContainer.hidden=!0)}setUserOverlaysVisible(e){this._userOverlayHidden=!e,this._userOverlayContainer.hidden=!e||this._userOverlays.size===0}clearHighlight(){var e,i;for(const r of this._renderedEntries)(e=r.highlightElement)==null||e.remove(),(i=r.tooltipElement)==null||i.remove();this._renderedEntries=[]}maskElements(e,i){this.updateHighlight(e.map(r=>({element:r,color:i})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const i of e){const r=this._createHighlightElement();this._glassPaneShadow.appendChild(r);let l;if(i.tooltipText){l=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(l),l.style.top="0",l.style.left="0",l.style.display="flex";const o=this._injectedScript.document.createElement("x-pw-tooltip-line");o.textContent=i.tooltipText,l.appendChild(o)}this._renderedEntries.push({targetElement:i.element,box:Cb(i.box),color:i.color,borderColor:i.borderColor,fadeDuration:i.fadeDuration,cssStyle:i.cssStyle,tooltipElement:l,highlightElement:r})}for(const i of this._renderedEntries){if(!i.box&&!i.targetElement||(i.box=i.box||i.targetElement.getBoundingClientRect(),!i.tooltipElement))continue;const{anchorLeft:r,anchorTop:l}=this.tooltipPosition(i.box,i.tooltipElement);i.tooltipTop=l,i.tooltipLeft=r}for(const i of this._renderedEntries){i.tooltipElement&&(i.tooltipElement.style.top=i.tooltipTop+"px",i.tooltipElement.style.left=i.tooltipLeft+"px");const r=i.box;i.highlightElement.style.backgroundColor=i.color,i.highlightElement.style.left=r.x+"px",i.highlightElement.style.top=r.y+"px",i.highlightElement.style.width=r.width+"px",i.highlightElement.style.height=r.height+"px",i.highlightElement.style.display="block",i.borderColor&&(i.highlightElement.style.border="2px solid "+i.borderColor),i.fadeDuration&&(i.highlightElement.style.animation=`pw-fade-out ${i.fadeDuration}ms ease-out forwards`),i.cssStyle&&(i.highlightElement.style.cssText+=";"+i.cssStyle),this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:r.x,y:r.y,width:r.width,height:r.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 r=i.offsetWidth,l=i.offsetHeight,o=this._glassPaneElement.offsetWidth,u=this._glassPaneElement.offsetHeight;let f=Math.max(5,e.left);f+r>o-5&&(f=o-r-5);let d=Math.max(0,e.bottom)+5;return d+l>u-5&&(Math.max(0,e.top)>l+5?d=Math.max(0,e.top)-l-5:d=u-5-l),{anchorLeft:f,anchorTop:d}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let i=0;ii))return r+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function gT(n,e,i){const r=e.left-n.right;if(!(r<0||i!==void 0&&r>i))return r+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function mT(n,e,i){const r=e.top-n.bottom;if(!(r<0||i!==void 0&&r>i))return r+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function yT(n,e,i){const r=n.top-e.bottom;if(!(r<0||i!==void 0&&r>i))return r+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function bT(n,e,i){const r=i===void 0?50:i;let l=0;return n.left-e.right>=0&&(l+=n.left-e.right),e.left-n.right>=0&&(l+=e.left-n.right),e.top-n.bottom>=0&&(l+=e.top-n.bottom),n.top-e.bottom>=0&&(l+=n.top-e.bottom),l>r?void 0:l}const vT=["left-of","right-of","above","below","near"];function vv(n,e,i,r){const l=e.getBoundingClientRect(),o={"left-of":gT,"right-of":pT,above:mT,below:yT,near:bT}[n];let u;for(const f of i){if(f===e)continue;const d=o(l,f.getBoundingClientRect(),r);d!==void 0&&(u===void 0||d"?!!i:e.op==="="?r instanceof RegExp?typeof i=="string"&&!!i.match(r):i===r:typeof i!="string"||typeof r!="string"?!1:e.op==="*="?i.includes(r):e.op==="^="?i.startsWith(r):e.op==="$="?i.endsWith(r):e.op==="|="?i===r||i.startsWith(r+"-"):e.op==="~="?i.split(" ").includes(r):!1}function Cd(n){const e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}function Vt(n,e){let i=n.get(e);if(i===void 0){if(i={full:"",normalized:"",immediate:[]},!Cd(e)){let r="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))i={full:e.value,normalized:Ot(e.value),immediate:[e.value]};else{for(let l=e.firstChild;l;l=l.nextSibling)if(l.nodeType===Node.TEXT_NODE)i.full+=l.nodeValue||"",r+=l.nodeValue||"";else{if(l.nodeType===Node.COMMENT_NODE)continue;r&&i.immediate.push(r),r="",l.nodeType===Node.ELEMENT_NODE&&(i.full+=Vt(n,l).full)}r&&i.immediate.push(r),e.shadowRoot&&(i.full+=Vt(n,e.shadowRoot).full),i.full&&(i.normalized=Ot(i.full))}}n.set(e,i)}return i}function wc(n,e,i){if(Cd(e)||!i(Vt(n,e)))return"none";for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&i(Vt(n,r)))return"selfAndChildren";return e.shadowRoot&&i(Vt(n,e.shadowRoot))?"selfAndChildren":"self"}function Sv(n,e){const i=rv(e);if(i)return i.map(o=>Vt(n,o));const r=e.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:Ot(r),immediate:[r]}];const l=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||l){const o=e.labels;if(o)return[...o].map(u=>Vt(n,u))}return[]}const wv=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];wv.sort();function Ra(n,e,i){if(!e.includes(i))throw new Error(`"${n}" attribute is only supported for roles: ${e.slice().sort().map(r=>`"${r}"`).join(", ")}`)}function ar(n,e){if(n.op!==""&&!e.includes(n.value))throw new Error(`"${n.name}" must be one of ${e.map(i=>JSON.stringify(i)).join(", ")}`)}function lr(n,e){if(!e.includes(n.op))throw new Error(`"${n.name}" does not support "${n.op}" matcher`)}function wT(n,e){const i={role:e};for(const r of n)switch(r.name){case"checked":{Ra(r.name,hd,e),ar(r,[!0,!1,"mixed"]),lr(r,["","="]),i.checked=r.op===""?!0:r.value;break}case"pressed":{Ra(r.name,pd,e),ar(r,[!0,!1,"mixed"]),lr(r,["","="]),i.pressed=r.op===""?!0:r.value;break}case"selected":{Ra(r.name,fd,e),ar(r,[!0,!1]),lr(r,["","="]),i.selected=r.op===""?!0:r.value;break}case"expanded":{Ra(r.name,gd,e),ar(r,[!0,!1]),lr(r,["","="]),i.expanded=r.op===""?!0:r.value;break}case"level":{if(Ra(r.name,md,e),typeof r.value=="string"&&(r.value=+r.value),r.op!=="="||typeof r.value!="number"||Number.isNaN(r.value))throw new Error('"level" attribute must be compared to a number');i.level=r.value;break}case"disabled":{ar(r,[!0,!1]),lr(r,["","="]),i.disabled=r.op===""?!0:r.value;break}case"name":{if(r.op==="")throw new Error('"name" attribute must have a value');if(typeof r.value!="string"&&!(r.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');i.name=r.value,i.nameOp=r.op,i.exact=r.caseSensitive;break}case"include-hidden":{ar(r,[!0,!1]),lr(r,["","="]),i.includeHidden=r.op===""?!0:r.value;break}default:throw new Error(`Unknown attribute "${r.name}", must be one of ${wv.map(l=>`"${l}"`).join(", ")}.`)}return i}function xT(n,e,i){const r=[],l=u=>{if(St(u)===e.role&&!(e.selected!==void 0&&av(u)!==e.selected)&&!(e.checked!==void 0&&lv(u)!==e.checked)&&!(e.pressed!==void 0&&ov(u)!==e.pressed)&&!(e.expanded!==void 0&&cv(u)!==e.expanded)&&!(e.level!==void 0&&uv(u)!==e.level)&&!(e.disabled!==void 0&&uc(u)!==e.disabled)&&!(!e.includeHidden&&dn(u))){if(e.name!==void 0){const f=Ot(il(u,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=Ot(e.name)),i&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!ST(f,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}r.push(u)}},o=u=>{const f=[];u.shadowRoot&&f.push(u.shadowRoot);for(const d of u.querySelectorAll("*"))l(d),d.shadowRoot&&f.push(d.shadowRoot);f.forEach(o)};return o(n),r}function Nb(n){return{queryAll:(e,i)=>{const r=Xa(i),l=r.name.toLowerCase();if(!l)throw new Error("Role must not be empty");const o=wT(r.attributes,l);vc();try{return xT(e,o,n)}finally{Sc()}}}}class _T{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",AT),this._engines.set("is",$a),this._engines.set("where",$a),this._engines.set("has",ET),this._engines.set("scope",TT),this._engines.set("light",CT),this._engines.set("visible",NT),this._engines.set("text",kT),this._engines.set("text-is",MT),this._engines.set("text-matches",OT),this._engines.set("has-text",jT),this._engines.set("right-of",Da("right-of")),this._engines.set("left-of",Da("left-of")),this._engines.set("above",Da("above")),this._engines.set("below",Da("below")),this._engines.set("near",Da("near")),this._engines.set("nth-match",LT);const e=[...this._engines.keys()];e.sort();const i=[...N0];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,r,l){e.has(i)||e.set(i,[]);const o=e.get(i),u=o.find(d=>r.every((g,b)=>d.rest[b]===g));if(u)return u.result;const f=l();return o.push({rest:r,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,r){const l=this._checkSelector(i);this.begin();try{return this._cached(this._cacheMatches,e,[l,r.scope,r.pierceShadow,r.originalScope],()=>Array.isArray(l)?this._matchesEngine($a,e,l,r):(this._hasScopeClause(l)&&(r=this._expandContextForScopeMatching(r)),this._matchesSimple(e,l.simples[l.simples.length-1].selector,r)?this._matchesParents(e,l,l.simples.length-2,r):!1))}finally{this.end()}}query(e,i){const r=this._checkSelector(i);this.begin();try{return this._cached(this._cacheQuery,r,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(r))return this._queryEngine($a,e,r);this._hasScopeClause(r)&&(e=this._expandContextForScopeMatching(e));const l=this._scoreMap;this._scoreMap=new Map;let o=this._querySimple(e,r.simples[r.simples.length-1].selector);return o=o.filter(u=>this._matchesParents(u,r,r.simples.length-2,e)),this._scoreMap.size&&o.sort((u,f)=>{const d=this._scoreMap.get(u),g=this._scoreMap.get(f);return d===g?0:d===void 0?1:g===void 0?-1:d-g}),this._scoreMap=l,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(r=>r.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const i=xt(e.scope);return i?{...e,scope:i,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,i,r){return this._cached(this._cacheMatchesSimple,e,[i,r.scope,r.pierceShadow,r.originalScope],()=>{if(e===r.scope||i.css&&!this._matchesCSS(e,i.css))return!1;for(const l of i.functions)if(!this._matchesEngine(this._getEngine(l.name),e,l.args,r))return!1;return!0})}_querySimple(e,i){return i.functions.length?this._cached(this._cacheQuerySimple,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=i.css;const l=i.functions;r==="*"&&l.length&&(r=void 0);let o,u=-1;r!==void 0?o=this._queryCSS(e,r):(u=l.findIndex(f=>this._getEngine(f.name).query!==void 0),u===-1&&(u=0),o=this._queryEngine(this._getEngine(l[u].name),e,l[u].args));for(let f=0;fthis._matchesEngine(d,g,l[f].args,e)))}for(let f=0;fthis._matchesEngine(d,g,l[f].args,e)))}return o}):this._queryCSS(e,i.css||"*")}_matchesParents(e,i,r,l){return r<0?!0:this._cached(this._cacheMatchesParents,e,[i,r,l.scope,l.pierceShadow,l.originalScope],()=>{const{selector:o,combinator:u}=i.simples[r];if(u===">"){const f=Ro(e,l);return!f||!this._matchesSimple(f,o,l)?!1:this._matchesParents(f,i,r-1,l)}if(u==="+"){const f=uh(e,l);return!f||!this._matchesSimple(f,o,l)?!1:this._matchesParents(f,i,r-1,l)}if(u===""){let f=Ro(e,l);for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,r-1,l))return!0;if(i.simples[r-1].combinator==="")break}f=Ro(f,l)}return!1}if(u==="~"){let f=uh(e,l);for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,r-1,l))return!0;if(i.simples[r-1].combinator==="~")break}f=uh(f,l)}return!1}if(u===">="){let f=e;for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,r-1,l))return!0;if(i.simples[r-1].combinator==="")break}f=Ro(f,l)}return!1}throw new Error(`Unsupported combinator "${u}"`)})}_matchesEngine(e,i,r,l){if(e.matches)return this._callMatches(e,i,r,l);if(e.query)return this._callQuery(e,r,l).includes(i);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,i,r){if(e.query)return this._callQuery(e,r,i);if(e.matches)return this._queryCSS(i,"*").filter(l=>this._callMatches(e,l,r,i));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,i,r,l){return this._cached(this._cacheCallMatches,i,[e,l.scope,l.pierceShadow,l.originalScope,...r],()=>e.matches(i,r,l,this))}_callQuery(e,i,r){return this._cached(this._cacheCallQuery,e,[r.scope,r.pierceShadow,r.originalScope,...i],()=>e.query(r,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 r=[];function l(o){if(r=r.concat([...o.querySelectorAll(i)]),!!e.pierceShadow){o.shadowRoot&&l(o.shadowRoot);for(const u of o.querySelectorAll("*"))u.shadowRoot&&l(u.shadowRoot)}}return l(e.scope),r})}_getEngine(e){const i=this._engines.get(e);if(!i)throw new Error(`Unknown selector engine "${e}"`);return i}}const $a={matches(n,e,i,r){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(l=>r.matches(n,l,i))},query(n,e,i){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let r=[];for(const l of e)r=r.concat(i.query(n,l));return e.length===1?r:xv(r)}},ET={matches(n,e,i,r){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return r.query({...i,scope:n},e).length>0}},TT={matches(n,e,i,r){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const l=i.originalScope||i.scope;return l.nodeType===9?n===l.documentElement:n===l},query(n,e,i){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const r=n.originalScope||n.scope;if(r.nodeType===9){const l=r.documentElement;return l?[l]:[]}return r.nodeType===1?[r]:[]}},AT={matches(n,e,i,r){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!r.matches(n,e,i)}},CT={query(n,e,i){return i.query({...n,pierceShadow:!1},e)},matches(n,e,i,r){return r.matches(n,e,{...i,pierceShadow:!1})}},NT={matches(n,e,i,r){if(e.length)throw new Error('"visible" engine expects no arguments');return Di(n)}},kT={matches(n,e,i,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const l=Ot(e[0]).toLowerCase(),o=u=>u.normalized.toLowerCase().includes(l);return wc(r._cacheText,n,o)==="self"}},MT={matches(n,e,i,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const l=Ot(e[0]),o=u=>!l&&!u.immediate.length?!0:u.immediate.some(f=>Ot(f)===l);return wc(r._cacheText,n,o)!=="none"}},OT={matches(n,e,i,r){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 l=new RegExp(e[0],e.length===2?e[1]:void 0),o=u=>l.test(u.full);return wc(r._cacheText,n,o)==="self"}},jT={matches(n,e,i,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(Cd(n))return!1;const l=Ot(e[0]).toLowerCase();return(u=>u.normalized.toLowerCase().includes(l))(Vt(r._cacheText,n))}};function Da(n){return{matches(e,i,r,l){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=l.query(r,u),d=vv(n,e,f,o);return d===void 0?!1:(l._markScore(e,d),!0)}}}const LT={query(n,e,i){let r=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 r!="number"||r<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const l=$a.query(n,e.slice(0,e.length-1),i);return r--,r1){const d=new Set(f.children);f.children=[];let g=u.firstElementChild;for(;g&&f.children.lengthPo(b)))]}else{const f=os(r,n,e,i)||Ia(n,e,i);l=[Po(f)]}}const o=l[0],u=n.parseSelector(o);return{selector:o,selectors:l,elements:n.querySelectorAll(u,i.root??e.ownerDocument)}}finally{cd(),Sc(),n._evaluator.end()}}function os(n,e,i,r){if(r.root&&!jh(r.root,i))throw new Error("Target element must belong to the root's subtree");if(i===r.root)return[{engine:"css",selector:":scope",score:1}];if(i.ownerDocument.documentElement===i)return[{engine:"css",selector:"html",score:1}];let l=null;const o=f=>{(!l||cs(f)cs(f.candidate)-cs(d.candidate));for(const{candidate:f,isTextCandidate:d}of u){const g=e.querySelectorAll(e.parseSelector(Po(f)),r.root??i.ownerDocument);if(!g.includes(i))continue;if(g.length===1){o(f);break}const b=g.indexOf(i);if(!(b>5)&&(o([...f,{engine:"nth",selector:String(b),score:Rh}]),!r.isRecursive))for(let m=xt(i);m&&m!==r.root;m=xt(m)){const S=g.filter($=>jh(m,$)&&$!==m),w=S.indexOf(i);if(S.length>5||w===-1||w===b&&S.length>1)continue;const T=S.length===1?f:[...f,{engine:"nth",selector:String(w),score:Rh}];if(l&&cs([{engine:"",selector:"",score:1},...T])>=cs(l))continue;const _=!!r.noText||d,A=_?n.disallowText:n.allowText;let N=A.get(m);N===void 0&&(N=os(n,e,m,{...r,isRecursive:!0,noText:_})||Ia(e,m,r),A.set(m,N)),N&&o([...N,...T])}}return l}function YT(n,e,i){const r=[];{for(const u of["data-testid","data-test-id","data-test"])u!==i.testIdAttributeName&&e.getAttribute(u)&&r.push({engine:"css",selector:`[${u}=${hr(e.getAttribute(u))}]`,score:RT});if(!i.noCSSId){const u=e.getAttribute("id");u&&!QT(u)&&r.push({engine:"css",selector:Ov(u),score:GT})}r.push({engine:"css",selector:ti(e),score:Mv})}if(e.nodeName==="IFRAME"){for(const u of["name","title"])e.getAttribute(u)&&r.push({engine:"css",selector:`${ti(e)}[${u}=${hr(e.getAttribute(u))}]`,score:DT});return e.getAttribute(i.testIdAttributeName)&&r.push({engine:"css",selector:`[${i.testIdAttributeName}=${hr(e.getAttribute(i.testIdAttributeName))}]`,score:kb}),Dh([r]),r}if(e.getAttribute(i.testIdAttributeName)&&r.push({engine:"internal:testid",selector:`[${i.testIdAttributeName}=${Mt(e.getAttribute(i.testIdAttributeName),!0)}]`,score:kb}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e;if(u.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${Mt(u.placeholder,!0)}]`,score:UT});for(const f of mr(u.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${Mt(f.text,!1)}]`,score:Tv-f.scoreBonus})}}const l=Sv(n._evaluator._cacheText,e);for(const u of l){const f=u.normalized;r.push({engine:"internal:label",selector:$t(f,!0),score:HT});for(const d of mr(f))r.push({engine:"internal:label",selector:$t(d.text,!1),score:Av-d.scoreBonus})}const o=St(e);return o&&!["none","presentation"].includes(o)&&r.push({engine:"internal:role",selector:o,score:kv}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&r.push({engine:"css",selector:`${ti(e)}[name=${hr(e.getAttribute("name"))}]`,score:fh}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&r.push({engine:"css",selector:`${ti(e)}[type=${hr(e.getAttribute("type"))}]`,score:fh}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:ti(e),score:fh+1}),Dh([r]),r}function FT(n,e,i){if(e.nodeName==="SELECT")return[];const r=[],l=e.getAttribute("title");if(l){r.push([{engine:"internal:attr",selector:`[title=${Mt(l,!0)}]`,score:IT}]);for(const g of mr(l))r.push([{engine:"internal:attr",selector:`[title=${Mt(g.text,!1)}]`,score:Nv-g.scoreBonus}])}const o=e.getAttribute("alt");if(o&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${Mt(o,!0)}]`,score:qT}]);for(const g of mr(o))r.push([{engine:"internal:attr",selector:`[alt=${Mt(g.text,!1)}]`,score:Cv-g.scoreBonus}])}const u=Vt(n._evaluator._cacheText,e).normalized,f=u?mr(u):[];if(u){if(i){u.length<=80&&r.push([{engine:"internal:text",selector:$t(u,!0),score:$T}]);for(const b of f)r.push([{engine:"internal:text",selector:$t(b.text,!1),score:Qo-b.scoreBonus}])}const g={engine:"css",selector:ti(e),score:Mv};for(const b of f)r.push([g,{engine:"internal:has-text",selector:$t(b.text,!1),score:Qo-b.scoreBonus}]);if(i&&u.length<=80){const b=new RegExp("^"+rc(u)+"$");r.push([g,{engine:"internal:has-text",selector:$t(b,!1),score:Mb}])}}const d=St(e);if(d&&!["none","presentation"].includes(d)){const g=il(e,!1);if(g&&!g.match(new RegExp("^\\p{Co}+$","u"))){const b={engine:"internal:role",selector:`${d}[name=${Mt(g,!0)}]`,score:BT};r.push([b]);for(const m of mr(g))r.push([{engine:"internal:role",selector:`${d}[name=${Mt(m.text,!1)}]`,score:Ev-m.scoreBonus}])}else{const b={engine:"internal:role",selector:`${d}`,score:kv};for(const m of f)r.push([b,{engine:"internal:has-text",selector:$t(m.text,!1),score:Qo-m.scoreBonus}]);if(i&&u.length<=80){const m=new RegExp("^"+rc(u)+"$");r.push([b,{engine:"internal:has-text",selector:$t(m,!1),score:Mb}])}}}return Dh(r),r}function Ov(n){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(n)?"#"+n:`[id=${hr(n)}]`}function hh(n){return n.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function Ia(n,e,i){const r=i.root??e.ownerDocument,l=[];function o(f){const d=l.slice();f&&d.unshift(f);const g=d.join(" > "),b=n.parseSelector(g);return n.querySelector(b,r,!1)===e?g:void 0}function u(f){const d={engine:"css",selector:f,score:KT},g=n.parseSelector(f),b=n.querySelectorAll(g,r);if(b.length===1)return[d];const m={engine:"nth",selector:String(b.indexOf(e)),score:Rh};return[d,m]}for(let f=e;f&&f!==r;f=xt(f)){let d="";if(f.id&&!i.noCSSId){const m=Ov(f.id),S=o(m);if(S)return u(S);d=m}const g=f.parentNode,b=[...f.classList].map(PT);for(let m=0;m_.nodeName===S).indexOf(f)===0?ti(f):`${ti(f)}:nth-child(${1+m.indexOf(f)})`,x=o(T);if(x)return u(x);d||(d=T)}else d||(d=ti(f));l.unshift(d)}return u(o())}function Dh(n){for(const e of n)for(const i of e)i.score>zT&&i.score>"),i=r,r==="css"?e.push(l):e.push(`${r}=${l}`);return e.join(" ")}function cs(n){let e=0;for(let i=0;i="a"&&l<="z"?o="lower":l>="A"&&l<="Z"?o="upper":l>="0"&&l<="9"?o="digit":o="other",o==="lower"&&e==="upper"){e=o;continue}e&&e!==o&&++i,e=o}}return i>=n.length/4}function Do(n,e){if(n.length<=e)return n;n=n.substring(0,e);const i=n.match(/^(.*)\b(.+?)$/);return i?i[1].trimEnd():""}function mr(n){let e=[];{const i=n.match(/^([\d.,]+)[^.,\w]/),r=i?i[1].length:0;if(r){const l=Do(n.substring(r).trimStart(),80);e.push({text:l,scoreBonus:l.length<=30?2:1})}}{const i=n.match(/[^.,\w]([\d.,]+)$/),r=i?i[1].length:0;if(r){const l=Do(n.substring(0,n.length-r).trimEnd(),80);e.push({text:l,scoreBonus:l.length<=30?2:1})}}return n.length<=30?e.push({text:n,scoreBonus:0}):(e.push({text:Do(n,80),scoreBonus:0}),e.push({text:Do(n,30),scoreBonus:1})),e=e.filter(i=>i.text),e.length||e.push({text:n.substring(0,80),scoreBonus:0}),e}function ti(n){return n.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function PT(n){let e="";for(let 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)}const jb={queryAll(n,e){e.startsWith("/")&&n.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const i=[],r=n.ownerDocument||n;if(!r)return i;const l=r.evaluate(e,n,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let o=l.iterateNext();o;o=l.iterateNext())o.nodeType===Node.ELEMENT_NODE&&i.push(o);return i}};function Nd(n,e,i){return`internal:attr=[${n}=${Mt(e,(i==null?void 0:i.exact)||!1)}]`}function ZT(n,e){return`internal:testid=[${n}=${Mt(e,!0)}]`}function WT(n,e){return"internal:label="+$t(n,!!(e!=null&&e.exact))}function eA(n,e){return Nd("alt",n,e)}function tA(n,e){return Nd("title",n,e)}function nA(n,e){return Nd("placeholder",n,e)}function iA(n,e){return"internal:text="+$t(n,!!(e!=null&&e.exact))}function sA(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",Mt(e.name,!!e.exact)]),e.pressed!==void 0&&i.push(["pressed",String(e.pressed)]),`internal:role=${n}${i.map(([r,l])=>`[${r}=${l}]`).join("")}`}const za=Symbol("selector"),rA=class Va{constructor(e,i,r){if(r!=null&&r.hasText&&(i+=` >> internal:has-text=${$t(r.hasText,!1)}`),r!=null&&r.hasNotText&&(i+=` >> internal:has-not-text=${$t(r.hasNotText,!1)}`),r!=null&&r.has&&(i+=" >> internal:has="+JSON.stringify(r.has[za])),r!=null&&r.hasNot&&(i+=" >> internal:has-not="+JSON.stringify(r.hasNot[za])),(r==null?void 0:r.visible)!==void 0&&(i+=` >> visible=${r.visible?"true":"false"}`),this[za]=i,i){const u=e.parseSelector(i);this.element=e.querySelector(u,e.document,!1),this.elements=e.querySelectorAll(u,e.document)}const l=i,o=this;o.locator=(u,f)=>new Va(e,l?l+" >> "+u:u,f),o.getByTestId=u=>o.locator(ZT(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),u)),o.getByAltText=(u,f)=>o.locator(eA(u,f)),o.getByLabel=(u,f)=>o.locator(WT(u,f)),o.getByPlaceholder=(u,f)=>o.locator(nA(u,f)),o.getByText=(u,f)=>o.locator(iA(u,f)),o.getByTitle=(u,f)=>o.locator(tA(u,f)),o.getByRole=(u,f={})=>o.locator(sA(u,f)),o.filter=u=>new Va(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 Va(e,l+" >> internal:and="+JSON.stringify(u[za])),o.or=u=>new Va(e,l+" >> internal:or="+JSON.stringify(u[za]))}};let aA=rA;class lA{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:"default"}),resume:()=>this._resume(),...new aA(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 r=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(r,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 r=this._injectedScript.generateSelectorSimple(e);return Ri(i||"javascript",r)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function oA(n){try{return n instanceof RegExp||Object.prototype.toString.call(n)==="[object RegExp]"}catch{return!1}}function cA(n){try{return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}catch{return!1}}function uA(n){try{return n instanceof URL||Object.prototype.toString.call(n)==="[object URL]"}catch{return!1}}function fA(n){var e;try{return n instanceof Error||n&&((e=Object.getPrototypeOf(n))==null?void 0:e.name)==="Error"}catch{return!1}}function hA(n,e){try{return n instanceof e||Object.prototype.toString.call(n)===`[object ${e.name}]`}catch{return!1}}function dA(n){try{return n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]"}catch{return!1}}const jv={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function Lb(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 Rb(n,e){const i=atob(n),r=new Uint8Array(i.length);for(let l=0;l";if(typeof globalThis.Document=="function"&&n instanceof globalThis.Document)return"ref: ";if(typeof globalThis.Node=="function"&&n instanceof globalThis.Node)return"ref: "}return Lv(n,e,i)}function Lv(n,e,i){var o;const r=e(n);if("fallThrough"in r)n=r.fallThrough;else return r;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(fA(n)){let u;return(o=n.stack)!=null&&o.startsWith(n.name+": "+n.message)?u=n.stack:u=`${n.name}: ${n.message} ${n.stack}`,{e:{n:n.name,m:n.message,s:u}}}if(cA(n))return{d:n.toJSON()};if(uA(n))return{u:n.toJSON()};if(oA(n))return{r:{p:n.source,f:n.flags}};for(const[u,f]of Object.entries(jv))if(hA(n,f))return{ta:{b:Lb(n),k:u}};if(dA(n))return{ab:{b:Lb(new Uint8Array(n))}};const l=i.visited.get(n);if(l)return{ref:l};if(Array.isArray(n)){const u=[],f=++i.lastId;i.visited.set(n,f);for(let d=0;d({fallThrough:r}))}_promiseAwareJsonValueNoThrow(e){const i=r=>{try{return this.jsonValue(!0,r)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const r=await e;return i(r)})():i(e)}}class Rv{constructor(e,i){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this._lastAriaSnapshotForTrack=new Map,this.utils={asLocator:Ri,cacheNormalizedWhitespaces:Wx,elementText:Vt,getAriaRole:St,getElementAccessibleDescription:wb,getElementAccessibleName:il,isElementVisible:Di,isInsideScope:jh,normalizeWhiteSpace:Ot,parseAriaSnapshot:sd,generateAriaTree:Pa,findNewElement:dT,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=i.isUnderTest,this.utils.builtins=new gA(e,i.isUnderTest).builtins,this._sdkLanguage=i.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=i.testIdAttributeName,this._evaluator=new _T,this.consoleApi=new lA(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",jb),this._engines.set("xpath:light",jb),this._engines.set("role",Nb(!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",Nb(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:r,source:l}of i.customEngines)this._engines.set(r,this.eval(l));this._stableRafCount=i.stableRafCount,this._browserName=i.browserName,this._isUtilityWorld=!!i.isUtilityWorld,DE({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=ol(e);return Jx(i,r=>{if(!this._engines.has(r.name))throw this.createStacklessError(`Unknown engine "${r.name}" while parsing selector ${e}`)}),i}generateSelector(e,i){return Ob(this,e,i)}generateSelectorSimple(e,i){return Ob(this,e,{...i,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,i,r){const l=this.querySelectorAll(e,i);if(r&&l.length>1)throw this.strictModeViolationError(e,l);return this.checkDeprecatedSelectorUsage(e,l),l[0]}_queryNth(e,i){const r=[...e];let l=+i.body;return l===-1&&(l=r.length-1),new Set(r.slice(l,l+1))}_queryLayoutSelector(e,i,r){const l=i.name,o=i.body,u=[],f=this.querySelectorAll(o.parsed,r);for(const d of e){const g=vv(l,d,f,o.distance);g!==void 0&&u.push({element:d,score:g})}return u.sort((d,g)=>d.score-g.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 r=Pa(e,i),l=Ja(r,i);let o;if(i.track){const u=this._lastAriaSnapshotForTrack.get(i.track);u&&(o=Ja(r,i,u).text),this._lastAriaSnapshotForTrack.set(i.track,r)}return this._lastAriaSnapshotForQuery=r,{full:l.text,incremental:o,iframeRefs:r.iframeRefs,iframeDepths:l.iframeDepths}}ariaSnapshotForRecorder(){const e=Pa(this.document.body,{mode:"ai"}),{text:i}=Ja(e,{mode:"ai"});return{ariaSnapshot:i,refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,i){return oT(e.documentElement,i)}querySelectorAll(e,i){if(e.capture!==void 0){if(e.parts.some(l=>l.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const r={parts:e.parts.slice(0,e.capture+1)};if(e.capturer.has(u)))}else if(l.name==="internal:or"){const o=this.querySelectorAll(l.body.parsed,i);r=new Set(xv(new Set([...r,...o])))}else if(vT.includes(l.name))r=this._queryLayoutSelector(r,l,i);else{const o=new Set;for(const u of r){const f=this._queryEngineAll(l,u);for(const d of f)o.add(d)}r=o}return[...r]}finally{this._evaluator.end()}}_queryEngineAll(e,i){const r=this._engines.get(e.name).queryAll(i,e.body);for(const l of r)if(!("nodeName"in l))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(l)}`);return r}_createAttributeEngine(e,i){const r=l=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(l)}]`,functions:[]},combinator:""}]}];return{queryAll:(l,o)=>this._evaluator.query({scope:l,pierceShadow:i},r(o))}}_createCSSEngine(){return{queryAll:(e,i)=>this._evaluator.query({scope:e,pierceShadow:!0},i)}}_createTextEngine(e,i){return{queryAll:(l,o)=>{const{matcher:u,kind:f}=Uo(o,i),d=[];let g=null;const b=S=>{if(f==="lax"&&g&&g.contains(S))return!1;const w=wc(this._evaluator._cacheText,S,u);w==="none"&&(g=S),(w==="self"||w==="selfAndChildren"&&f==="strict"&&!i)&&d.push(S)};l.nodeType===Node.ELEMENT_NODE&&b(l);const m=this._evaluator._queryCSS({scope:l,pierceShadow:e},"*");for(const S of m)b(S);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const r=e,l=Vt(this._evaluator._cacheText,r),{matcher:o}=Uo(i,!0);return o(l)?[r]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const r=e,l=Vt(this._evaluator._cacheText,r),{matcher:o}=Uo(i,!0);return o(l)?[]:[r]}}}_createInternalLabelEngine(){return{queryAll:(e,i)=>{const{matcher:r}=Uo(i,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(o=>Sv(this._evaluator._cacheText,o).some(u=>r(u)))}}}_createNamedAttributeEngine(){return{queryAll:(i,r)=>{const l=Xa(r);if(l.name||l.attributes.length!==1)throw new Error("Malformed attribute selector: "+r);const{name:o,value:u,caseSensitive:f}=l.attributes[0],d=f?null:u.toLowerCase();let g;return u instanceof RegExp?g=m=>!!m.match(u):f?g=m=>m===u:g=m=>m.toLowerCase().includes(d),this._evaluator._queryCSS({scope:i,pierceShadow:!0},`[${o}]`).filter(m=>g(m.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,r)=>i.nodeType!==1?[]:!!this.querySelector(r.parsed,i,!1)?[i]:[]}}_createHasNotEngine(){return{queryAll:(i,r)=>i.nodeType!==1?[]:!!this.querySelector(r.parsed,i,!1)?[]:[i]}}_createVisibleEngine(){return{queryAll:(i,r)=>{if(i.nodeType!==1)return[];const l=r==="true";return Di(i)===l?[i]:[]}}}_createInternalChainEngine(){return{queryAll:(i,r)=>this.querySelectorAll(r.parsed,i)}}extend(e,i){const r=this.window.eval(` (() => { const module = {}; ${e} return module.exports.default(); })()`);return new r(this,i)}async viewportRatio(e){return await new Promise(i=>{const r=new IntersectionObserver(l=>{i(l[0].intersectionRatio),r.disconnect()});r.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 l=e;l;l=xt(l))if(i.getComputedStyle(l).transform!=="none")return"transformed";const r=i.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,i){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(i==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(i==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),i==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const l=r.closest("label");l&&l.control&&(r=l.control)}return r}async checkElementStates(e,i){if(i.includes("stable")){const r=await this._checkElementIsStable(e);if(r===!1)return{missingState:"stable"};if(r==="error:notconnected")return"error:notconnected"}for(const r of i)if(r!=="stable"){const l=this.elementState(e,r);if(l.received==="error:notconnected")return"error:notconnected";if(!l.matches)return{missingState:r}}}async _checkElementIsStable(e){const i=Symbol("continuePolling");let r,l=0,o=0;const u=()=>{const m=this.retarget(e,"no-follow-label");if(!m)return"error:notconnected";const S=this.utils.builtins.performance.now();if(this._stableRafCount>1&&S-o<15)return i;o=S;const w=m.getBoundingClientRect(),T={x:w.top,y:w.left,width:w.width,height:w.height};if(r){if(!(T.x===r.x&&T.y===r.y&&T.width===r.width&&T.height===r.height))return!1;if(++l>=this._stableRafCount)return!0}return r=T,i};let f,d;const g=new Promise((m,S)=>{f=m,d=S}),b=()=>{try{const m=u();m!==i?f(m):this.utils.builtins.requestAnimationFrame(b)}catch(m){d(m)}};return this.utils.builtins.requestAnimationFrame(b),g}_createAriaRefEngine(){return{queryAll:(i,r)=>{var o,u;const l=(u=(o=this._lastAriaSnapshotForQuery)==null?void 0:o.elements)==null?void 0:u.get(r);return l&&l.isConnected?[l]:[]}}}elementState(e,i){const r=this.retarget(e,["visible","hidden"].includes(i)?"none":"follow-label");if(!r||!r.isConnected)return i==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(i==="visible"||i==="hidden"){const l=Di(r);return{matches:i==="visible"?l:!l,received:l?"visible":"hidden"}}if(i==="disabled"||i==="enabled"){const l=uc(r);return{matches:i==="disabled"?l:!l,received:l?"disabled":"enabled"}}if(i==="editable"){const l=uc(r),o=PE(r);if(o==="error")throw this.createStacklessError("Element is not an ,