>=k,p-=k,Sn=1<<32-Yt(i)+p|a<ce?(Ze=oe,oe=null):Ze=oe.sibling;var _e=H(j,oe,M[ce],G);if(_e===null){oe===null&&(oe=Ze);break}r&&oe&&_e.alternate===null&&i(j,oe),A=g(_e,A,ce),ie===null?re=_e:ie.sibling=_e,ie=_e,oe=Ze}if(ce===M.length)return a(j,oe),Oe&&gr(j,ce),re;if(oe===null){for(;cece?(Ze=oe,oe=null):Ze=oe.sibling;var tr=H(j,oe,_e.value,G);if(tr===null){oe===null&&(oe=Ze);break}r&&oe&&tr.alternate===null&&i(j,oe),A=g(tr,A,ce),ie===null?re=tr:ie.sibling=tr,ie=tr,oe=Ze}if(_e.done)return a(j,oe),Oe&&gr(j,ce),re;if(oe===null){for(;!_e.done;ce++,_e=M.next())_e=K(j,_e.value,G),_e!==null&&(A=g(_e,A,ce),ie===null?re=_e:ie.sibling=_e,ie=_e);return Oe&&gr(j,ce),re}for(oe=f(j,oe);!_e.done;ce++,_e=M.next())_e=Y(oe,j,ce,_e.value,G),_e!==null&&(r&&_e.alternate!==null&&oe.delete(_e.key===null?ce:_e.key),A=g(_e,A,ce),ie===null?re=_e:ie.sibling=_e,ie=_e);return r&&oe.forEach(function(ex){return i(j,ex)}),Oe&&gr(j,ce),re}function He(j,A,M,G){if(typeof M=="object"&&M!==null&&M.type===U&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case D:e:{for(var re=M.key,ie=A;ie!==null;){if(ie.key===re){if(re=M.type,re===U){if(ie.tag===7){a(j,ie.sibling),A=p(ie,M.props.children),A.return=j,j=A;break e}}else if(ie.elementType===re||typeof re=="object"&&re!==null&&re.$$typeof===Le&&wh(re)===ie.type){a(j,ie.sibling),A=p(ie,M.props),A.ref=yi(j,ie,M),A.return=j,j=A;break e}a(j,ie);break}else i(j,ie);ie=ie.sibling}M.type===U?(A=br(M.props.children,j.mode,G,M.key),A.return=j,j=A):(G=al(M.type,M.key,M.props,null,j.mode,G),G.ref=yi(j,A,M),G.return=j,j=G)}return k(j);case F:e:{for(ie=M.key;A!==null;){if(A.key===ie)if(A.tag===4&&A.stateNode.containerInfo===M.containerInfo&&A.stateNode.implementation===M.implementation){a(j,A.sibling),A=p(A,M.children||[]),A.return=j,j=A;break e}else{a(j,A);break}else i(j,A);A=A.sibling}A=lu(M,j.mode,G),A.return=j,j=A}return k(j);case Le:return ie=M._init,He(j,A,ie(M._payload),G)}if(vn(M))return te(j,A,M,G);if(se(M))return ne(j,A,M,G);Do(j,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,A!==null&&A.tag===6?(a(j,A.sibling),A=p(A,M),A.return=j,j=A):(a(j,A),A=ou(M,j.mode,G),A.return=j,j=A),k(j)):a(j,A)}return He}var rs=xh(!0),Sh=xh(!1),Fo=Hn(null),zo=null,ss=null,gc=null;function yc(){gc=ss=zo=null}function vc(r){var i=Fo.current;Ie(Fo),r._currentValue=i}function wc(r,i,a){for(;r!==null;){var f=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,f!==null&&(f.childLanes|=i)):f!==null&&(f.childLanes&i)!==i&&(f.childLanes|=i),r===a)break;r=r.return}}function is(r,i){zo=r,gc=ss=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(_t=!0),r.firstContext=null)}function Bt(r){var i=r._currentValue;if(gc!==r)if(r={context:r,memoizedValue:i,next:null},ss===null){if(zo===null)throw Error(n(308));ss=r,zo.dependencies={lanes:0,firstContext:r}}else ss=ss.next=r;return i}var yr=null;function xc(r){yr===null?yr=[r]:yr.push(r)}function _h(r,i,a,f){var p=i.interleaved;return p===null?(a.next=a,xc(i)):(a.next=p.next,p.next=a),i.interleaved=a,kn(r,f)}function kn(r,i){r.lanes|=i;var a=r.alternate;for(a!==null&&(a.lanes|=i),a=r,r=r.return;r!==null;)r.childLanes|=i,a=r.alternate,a!==null&&(a.childLanes|=i),a=r,r=r.return;return a.tag===3?a.stateNode:null}var Kn=!1;function Sc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kh(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function bn(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function Qn(r,i,a){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(we&2)!==0){var p=f.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),f.pending=i,kn(r,a)}return p=f.interleaved,p===null?(i.next=i,xc(f)):(i.next=p.next,p.next=i),f.interleaved=i,kn(r,a)}function Bo(r,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var f=i.lanes;f&=r.pendingLanes,a|=f,i.lanes=a,$a(r,a)}}function bh(r,i){var a=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,a===f)){var p=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var k={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};g===null?p=g=k:g=g.next=k,a=a.next}while(a!==null);g===null?p=g=i:g=g.next=i}else p=g=i;a={baseState:f.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:f.shared,effects:f.effects},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=i:r.next=i,a.lastBaseUpdate=i}function Uo(r,i,a,f){var p=r.updateQueue;Kn=!1;var g=p.firstBaseUpdate,k=p.lastBaseUpdate,E=p.shared.pending;if(E!==null){p.shared.pending=null;var N=E,$=N.next;N.next=null,k===null?g=$:k.next=$,k=N;var V=r.alternate;V!==null&&(V=V.updateQueue,E=V.lastBaseUpdate,E!==k&&(E===null?V.firstBaseUpdate=$:E.next=$,V.lastBaseUpdate=N))}if(g!==null){var K=p.baseState;k=0,V=$=N=null,E=g;do{var H=E.lane,Y=E.eventTime;if((f&H)===H){V!==null&&(V=V.next={eventTime:Y,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var te=r,ne=E;switch(H=i,Y=a,ne.tag){case 1:if(te=ne.payload,typeof te=="function"){K=te.call(Y,K,H);break e}K=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=ne.payload,H=typeof te=="function"?te.call(Y,K,H):te,H==null)break e;K=Z({},K,H);break e;case 2:Kn=!0}}E.callback!==null&&E.lane!==0&&(r.flags|=64,H=p.effects,H===null?p.effects=[E]:H.push(E))}else Y={eventTime:Y,lane:H,tag:E.tag,payload:E.payload,callback:E.callback,next:null},V===null?($=V=Y,N=K):V=V.next=Y,k|=H;if(E=E.next,E===null){if(E=p.shared.pending,E===null)break;H=E,E=H.next,H.next=null,p.lastBaseUpdate=H,p.shared.pending=null}}while(!0);if(V===null&&(N=K),p.baseState=N,p.firstBaseUpdate=$,p.lastBaseUpdate=V,i=p.shared.interleaved,i!==null){p=i;do k|=p.lane,p=p.next;while(p!==i)}else g===null&&(p.shared.lanes=0);xr|=k,r.lanes=k,r.memoizedState=K}}function Eh(r,i,a){if(r=i.effects,i.effects=null,r!==null)for(i=0;ia?a:4,r(!0);var f=Tc.transition;Tc.transition={};try{r(!1),i()}finally{Ee=a,Tc.transition=f}}function Hh(){return Ut().memoizedState}function b0(r,i,a){var f=Yn(r);if(a={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null},Vh(r))Wh(i,a);else if(a=_h(r,i,a,f),a!==null){var p=ht();sn(a,r,f,p),Kh(a,i,f)}}function E0(r,i,a){var f=Yn(r),p={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null};if(Vh(r))Wh(i,p);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var k=i.lastRenderedState,E=g(k,a);if(p.hasEagerState=!0,p.eagerState=E,Zt(E,k)){var N=i.interleaved;N===null?(p.next=p,xc(i)):(p.next=N.next,N.next=p),i.interleaved=p;return}}catch{}finally{}a=_h(r,i,p,f),a!==null&&(p=ht(),sn(a,r,f,p),Kh(a,i,f))}}function Vh(r){var i=r.alternate;return r===Re||i!==null&&i===Re}function Wh(r,i){Si=Vo=!0;var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}function Kh(r,i,a){if((a&4194240)!==0){var f=i.lanes;f&=r.pendingLanes,a|=f,i.lanes=a,$a(r,a)}}var Qo={readContext:Bt,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},T0={readContext:Bt,useCallback:function(r,i){return hn().memoizedState=[r,i===void 0?null:i],r},useContext:Bt,useEffect:Ph,useImperativeHandle:function(r,i,a){return a=a!=null?a.concat([r]):null,Wo(4194308,4,Fh.bind(null,i,r),a)},useLayoutEffect:function(r,i){return Wo(4194308,4,r,i)},useInsertionEffect:function(r,i){return Wo(4,2,r,i)},useMemo:function(r,i){var a=hn();return i=i===void 0?null:i,r=r(),a.memoizedState=[r,i],r},useReducer:function(r,i,a){var f=hn();return i=a!==void 0?a(i):i,f.memoizedState=f.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},f.queue=r,r=r.dispatch=b0.bind(null,Re,r),[f.memoizedState,r]},useRef:function(r){var i=hn();return r={current:r},i.memoizedState=r},useState:Mh,useDebugValue:Oc,useDeferredValue:function(r){return hn().memoizedState=r},useTransition:function(){var r=Mh(!1),i=r[0];return r=k0.bind(null,r[1]),hn().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,a){var f=Re,p=hn();if(Oe){if(a===void 0)throw Error(n(407));a=a()}else{if(a=i(),Ye===null)throw Error(n(349));(wr&30)!==0||Ah(f,i,a)}p.memoizedState=a;var g={value:a,getSnapshot:i};return p.queue=g,Ph(jh.bind(null,f,g,r),[r]),f.flags|=2048,bi(9,Lh.bind(null,f,g,a,i),void 0,null),a},useId:function(){var r=hn(),i=Ye.identifierPrefix;if(Oe){var a=_n,f=Sn;a=(f&~(1<<32-Yt(f)-1)).toString(32)+a,i=":"+i+"R"+a,a=_i++,0<\/script>",r=r.removeChild(r.firstChild)):typeof f.is=="string"?r=k.createElement(a,{is:f.is}):(r=k.createElement(a),a==="select"&&(k=r,f.multiple?k.multiple=!0:f.size&&(k.size=f.size))):r=k.createElementNS(r,a),r[fn]=i,r[mi]=f,hp(r,i,!1,!1),i.stateNode=r;e:{switch(k=Ea(a,f),a){case"dialog":je("cancel",r),je("close",r),p=f;break;case"iframe":case"object":case"embed":je("load",r),p=f;break;case"video":case"audio":for(p=0;pus&&(i.flags|=128,f=!0,Ei(g,!1),i.lanes=4194304)}else{if(!f)if(r=qo(k),r!==null){if(i.flags|=128,f=!0,a=r.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),Ei(g,!0),g.tail===null&&g.tailMode==="hidden"&&!k.alternate&&!Oe)return ot(i),null}else 2*qe()-g.renderingStartTime>us&&a!==1073741824&&(i.flags|=128,f=!0,Ei(g,!1),i.lanes=4194304);g.isBackwards?(k.sibling=i.child,i.child=k):(a=g.last,a!==null?a.sibling=k:i.child=k,g.last=k)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=qe(),i.sibling=null,a=Pe.current,Ae(Pe,f?a&1|2:a&1),i):(ot(i),null);case 22:case 23:return ru(),f=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==f&&(i.flags|=8192),f&&(i.mode&1)!==0?($t&1073741824)!==0&&(ot(i),i.subtreeFlags&6&&(i.flags|=8192)):ot(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function M0(r,i){switch(dc(i),i.tag){case 1:return St(i.type)&&Io(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return os(),Ie(xt),Ie(st),Ec(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return kc(i),null;case 13:if(Ie(Pe),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));ns()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Ie(Pe),null;case 4:return os(),null;case 10:return vc(i.type._context),null;case 22:case 23:return ru(),null;case 24:return null;default:return null}}var Yo=!1,lt=!1,$0=typeof WeakSet=="function"?WeakSet:Set,ee=null;function as(r,i){var a=r.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(f){Be(r,i,f)}else a.current=null}function Vc(r,i,a){try{a()}catch(f){Be(r,i,f)}}var gp=!1;function P0(r,i){if(rc=vo,r=Qd(),Ga(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var f=a.getSelection&&a.getSelection();if(f&&f.rangeCount!==0){a=f.anchorNode;var p=f.anchorOffset,g=f.focusNode;f=f.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var k=0,E=-1,N=-1,$=0,V=0,K=r,H=null;t:for(;;){for(var Y;K!==a||p!==0&&K.nodeType!==3||(E=k+p),K!==g||f!==0&&K.nodeType!==3||(N=k+f),K.nodeType===3&&(k+=K.nodeValue.length),(Y=K.firstChild)!==null;)H=K,K=Y;for(;;){if(K===r)break t;if(H===a&&++$===p&&(E=k),H===g&&++V===f&&(N=k),(Y=K.nextSibling)!==null)break;K=H,H=K.parentNode}K=Y}a=E===-1||N===-1?null:{start:E,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(sc={focusedElem:r,selectionRange:a},vo=!1,ee=i;ee!==null;)if(i=ee,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,ee=r;else for(;ee!==null;){i=ee;try{var te=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(te!==null){var ne=te.memoizedProps,He=te.memoizedState,j=i.stateNode,A=j.getSnapshotBeforeUpdate(i.elementType===i.type?ne:tn(i.type,ne),He);j.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var M=i.stateNode.containerInfo;M.nodeType===1?M.textContent="":M.nodeType===9&&M.documentElement&&M.removeChild(M.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(G){Be(i,i.return,G)}if(r=i.sibling,r!==null){r.return=i.return,ee=r;break}ee=i.return}return te=gp,gp=!1,te}function Ti(r,i,a){var f=i.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var p=f=f.next;do{if((p.tag&r)===r){var g=p.destroy;p.destroy=void 0,g!==void 0&&Vc(i,a,g)}p=p.next}while(p!==f)}}function Zo(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&r)===r){var f=a.create;a.destroy=f()}a=a.next}while(a!==i)}}function Wc(r){var i=r.ref;if(i!==null){var a=r.stateNode;switch(r.tag){case 5:r=a;break;default:r=a}typeof i=="function"?i(r):i.current=r}}function yp(r){var i=r.alternate;i!==null&&(r.alternate=null,yp(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[fn],delete i[mi],delete i[ac],delete i[v0],delete i[w0])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function vp(r){return r.tag===5||r.tag===3||r.tag===4}function wp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||vp(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Kc(r,i,a){var f=r.tag;if(f===5||f===6)r=r.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(r,i):a.insertBefore(r,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(r,a)):(i=a,i.appendChild(r)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Lo));else if(f!==4&&(r=r.child,r!==null))for(Kc(r,i,a),r=r.sibling;r!==null;)Kc(r,i,a),r=r.sibling}function Qc(r,i,a){var f=r.tag;if(f===5||f===6)r=r.stateNode,i?a.insertBefore(r,i):a.appendChild(r);else if(f!==4&&(r=r.child,r!==null))for(Qc(r,i,a),r=r.sibling;r!==null;)Qc(r,i,a),r=r.sibling}var tt=null,nn=!1;function Gn(r,i,a){for(a=a.child;a!==null;)xp(r,i,a),a=a.sibling}function xp(r,i,a){if(un&&typeof un.onCommitFiberUnmount=="function")try{un.onCommitFiberUnmount(fo,a)}catch{}switch(a.tag){case 5:lt||as(a,i);case 6:var f=tt,p=nn;tt=null,Gn(r,i,a),tt=f,nn=p,tt!==null&&(nn?(r=tt,a=a.stateNode,r.nodeType===8?r.parentNode.removeChild(a):r.removeChild(a)):tt.removeChild(a.stateNode));break;case 18:tt!==null&&(nn?(r=tt,a=a.stateNode,r.nodeType===8?lc(r.parentNode,a):r.nodeType===1&&lc(r,a),si(r)):lc(tt,a.stateNode));break;case 4:f=tt,p=nn,tt=a.stateNode.containerInfo,nn=!0,Gn(r,i,a),tt=f,nn=p;break;case 0:case 11:case 14:case 15:if(!lt&&(f=a.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){p=f=f.next;do{var g=p,k=g.destroy;g=g.tag,k!==void 0&&((g&2)!==0||(g&4)!==0)&&Vc(a,i,k),p=p.next}while(p!==f)}Gn(r,i,a);break;case 1:if(!lt&&(as(a,i),f=a.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=a.memoizedProps,f.state=a.memoizedState,f.componentWillUnmount()}catch(E){Be(a,i,E)}Gn(r,i,a);break;case 21:Gn(r,i,a);break;case 22:a.mode&1?(lt=(f=lt)||a.memoizedState!==null,Gn(r,i,a),lt=f):Gn(r,i,a);break;default:Gn(r,i,a)}}function Sp(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var a=r.stateNode;a===null&&(a=r.stateNode=new $0),i.forEach(function(f){var p=V0.bind(null,r,f);a.has(f)||(a.add(f),f.then(p,p))})}}function rn(r,i){var a=i.deletions;if(a!==null)for(var f=0;fp&&(p=k),f&=~g}if(f=p,f=qe()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*D0(f/1960))-f,10r?16:r,Jn===null)var f=!1;else{if(r=Jn,Jn=null,sl=0,(we&6)!==0)throw Error(n(331));var p=we;for(we|=4,ee=r.current;ee!==null;){var g=ee,k=g.child;if((ee.flags&16)!==0){var E=g.deletions;if(E!==null){for(var N=0;Nqe()-Jc?_r(r,0):Xc|=a),bt(r,i)}function Mp(r,i){i===0&&((r.mode&1)===0?i=1:(i=po,po<<=1,(po&130023424)===0&&(po=4194304)));var a=ht();r=kn(r,i),r!==null&&(Zs(r,i,a),bt(r,a))}function H0(r){var i=r.memoizedState,a=0;i!==null&&(a=i.retryLane),Mp(r,a)}function V0(r,i){var a=0;switch(r.tag){case 13:var f=r.stateNode,p=r.memoizedState;p!==null&&(a=p.retryLane);break;case 19:f=r.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(i),Mp(r,a)}var $p;$p=function(r,i,a){if(r!==null)if(r.memoizedProps!==i.pendingProps||xt.current)_t=!0;else{if((r.lanes&a)===0&&(i.flags&128)===0)return _t=!1,I0(r,i,a);_t=(r.flags&131072)!==0}else _t=!1,Oe&&(i.flags&1048576)!==0&&ph(i,Po,i.index);switch(i.lanes=0,i.tag){case 2:var f=i.type;Jo(r,i),r=i.pendingProps;var p=Zr(i,st.current);is(i,a),p=Cc(null,i,f,r,p,a);var g=Ac();return i.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,St(f)?(g=!0,Oo(i)):g=!1,i.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,Sc(i),p.updater=Go,i.stateNode=p,p._reactInternals=i,$c(i,f,r,a),i=Fc(null,i,f,!0,g,a)):(i.tag=0,Oe&&g&&fc(i),dt(null,i,p,a),i=i.child),i;case 16:f=i.elementType;e:{switch(Jo(r,i),r=i.pendingProps,p=f._init,f=p(f._payload),i.type=f,p=i.tag=K0(f),r=tn(f,r),p){case 0:i=Dc(null,i,f,r,a);break e;case 1:i=lp(null,i,f,r,a);break e;case 11:i=np(null,i,f,r,a);break e;case 14:i=rp(null,i,f,tn(f.type,r),a);break e}throw Error(n(306,f,""))}return i;case 0:return f=i.type,p=i.pendingProps,p=i.elementType===f?p:tn(f,p),Dc(r,i,f,p,a);case 1:return f=i.type,p=i.pendingProps,p=i.elementType===f?p:tn(f,p),lp(r,i,f,p,a);case 3:e:{if(ap(i),r===null)throw Error(n(387));f=i.pendingProps,g=i.memoizedState,p=g.element,kh(r,i),Uo(i,f,null,a);var k=i.memoizedState;if(f=k.element,g.isDehydrated)if(g={element:f,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){p=ls(Error(n(423)),i),i=cp(r,i,f,a,p);break e}else if(f!==p){p=ls(Error(n(424)),i),i=cp(r,i,f,a,p);break e}else for(Mt=qn(i.stateNode.containerInfo.firstChild),Ot=i,Oe=!0,en=null,a=Sh(i,null,f,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ns(),f===p){i=En(r,i,a);break e}dt(r,i,f,a)}i=i.child}return i;case 5:return Th(i),r===null&&pc(i),f=i.type,p=i.pendingProps,g=r!==null?r.memoizedProps:null,k=p.children,ic(f,p)?k=null:g!==null&&ic(f,g)&&(i.flags|=32),op(r,i),dt(r,i,k,a),i.child;case 6:return r===null&&pc(i),null;case 13:return up(r,i,a);case 4:return _c(i,i.stateNode.containerInfo),f=i.pendingProps,r===null?i.child=rs(i,null,f,a):dt(r,i,f,a),i.child;case 11:return f=i.type,p=i.pendingProps,p=i.elementType===f?p:tn(f,p),np(r,i,f,p,a);case 7:return dt(r,i,i.pendingProps,a),i.child;case 8:return dt(r,i,i.pendingProps.children,a),i.child;case 12:return dt(r,i,i.pendingProps.children,a),i.child;case 10:e:{if(f=i.type._context,p=i.pendingProps,g=i.memoizedProps,k=p.value,Ae(Fo,f._currentValue),f._currentValue=k,g!==null)if(Zt(g.value,k)){if(g.children===p.children&&!xt.current){i=En(r,i,a);break e}}else for(g=i.child,g!==null&&(g.return=i);g!==null;){var E=g.dependencies;if(E!==null){k=g.child;for(var N=E.firstContext;N!==null;){if(N.context===f){if(g.tag===1){N=bn(-1,a&-a),N.tag=2;var $=g.updateQueue;if($!==null){$=$.shared;var V=$.pending;V===null?N.next=N:(N.next=V.next,V.next=N),$.pending=N}}g.lanes|=a,N=g.alternate,N!==null&&(N.lanes|=a),wc(g.return,a,i),E.lanes|=a;break}N=N.next}}else if(g.tag===10)k=g.type===i.type?null:g.child;else if(g.tag===18){if(k=g.return,k===null)throw Error(n(341));k.lanes|=a,E=k.alternate,E!==null&&(E.lanes|=a),wc(k,a,i),k=g.sibling}else k=g.child;if(k!==null)k.return=g;else for(k=g;k!==null;){if(k===i){k=null;break}if(g=k.sibling,g!==null){g.return=k.return,k=g;break}k=k.return}g=k}dt(r,i,p.children,a),i=i.child}return i;case 9:return p=i.type,f=i.pendingProps.children,is(i,a),p=Bt(p),f=f(p),i.flags|=1,dt(r,i,f,a),i.child;case 14:return f=i.type,p=tn(f,i.pendingProps),p=tn(f.type,p),rp(r,i,f,p,a);case 15:return sp(r,i,i.type,i.pendingProps,a);case 17:return f=i.type,p=i.pendingProps,p=i.elementType===f?p:tn(f,p),Jo(r,i),i.tag=1,St(f)?(r=!0,Oo(i)):r=!1,is(i,a),Gh(i,f,p),$c(i,f,p,a),Fc(null,i,f,!0,r,a);case 19:return dp(r,i,a);case 22:return ip(r,i,a)}throw Error(n(156,i.tag))};function Pp(r,i){return md(r,i)}function W0(r,i,a,f){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ht(r,i,a,f){return new W0(r,i,a,f)}function iu(r){return r=r.prototype,!(!r||!r.isReactComponent)}function K0(r){if(typeof r=="function")return iu(r)?1:0;if(r!=null){if(r=r.$$typeof,r===z)return 11;if(r===Te)return 14}return 2}function er(r,i){var a=r.alternate;return a===null?(a=Ht(r.tag,i,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=i,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&14680064,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,i=r.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a}function al(r,i,a,f,p,g){var k=2;if(f=r,typeof r=="function")iu(r)&&(k=1);else if(typeof r=="string")k=5;else e:switch(r){case U:return br(a.children,p,g,i);case B:k=8,p|=8;break;case I:return r=Ht(12,a,i,p|2),r.elementType=I,r.lanes=g,r;case J:return r=Ht(13,a,i,p),r.elementType=J,r.lanes=g,r;case de:return r=Ht(19,a,i,p),r.elementType=de,r.lanes=g,r;case ye:return cl(a,p,g,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case Q:k=10;break e;case W:k=9;break e;case z:k=11;break e;case Te:k=14;break e;case Le:k=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=Ht(k,a,i,p),i.elementType=r,i.type=f,i.lanes=g,i}function br(r,i,a,f){return r=Ht(7,r,f,i),r.lanes=a,r}function cl(r,i,a,f){return r=Ht(22,r,f,i),r.elementType=ye,r.lanes=a,r.stateNode={isHidden:!1},r}function ou(r,i,a){return r=Ht(6,r,null,i),r.lanes=a,r}function lu(r,i,a){return i=Ht(4,r.children!==null?r.children:[],r.key,i),i.lanes=a,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function Q0(r,i,a,f,p){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ma(0),this.expirationTimes=Ma(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ma(0),this.identifierPrefix=f,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function au(r,i,a,f,p,g,k,E,N){return r=new Q0(r,i,a,E,N),i===1?(i=1,g===!0&&(i|=8)):i=0,g=Ht(3,null,null,i),r.current=g,g.stateNode=r,g.memoizedState={element:f,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sc(g),r}function G0(r,i,a){var f=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),pu.exports=mx(),pu.exports}var Yp;function yx(){if(Yp)return gl;Yp=1;var t=gx();return gl.createRoot=t.createRoot,gl.hydrateRoot=t.hydrateRoot,gl}var vT=yx();const vx="_attach",Bi=Symbol("context"),cg=Symbol("nextInContext"),ug=Symbol("prevByEndTime"),fg=Symbol("nextByStartTime"),Zp=Symbol("events");class wT{constructor(e){xe(this,"startTime");xe(this,"endTime");xe(this,"browserName");xe(this,"channel");xe(this,"platform");xe(this,"wallTime");xe(this,"title");xe(this,"options");xe(this,"pages");xe(this,"actions");xe(this,"attachments");xe(this,"visibleAttachments");xe(this,"events");xe(this,"stdio");xe(this,"errors");xe(this,"errorDescriptors");xe(this,"hasSource");xe(this,"hasStepData");xe(this,"sdkLanguage");xe(this,"testIdAttributeName");xe(this,"sources");xe(this,"resources");e.forEach(s=>wx(s));const n=e.find(s=>s.origin==="library");this.browserName=(n==null?void 0:n.browserName)||"",this.sdkLanguage=n==null?void 0:n.sdkLanguage,this.channel=n==null?void 0:n.channel,this.testIdAttributeName=n==null?void 0:n.testIdAttributeName,this.platform=(n==null?void 0:n.platform)||"",this.title=(n==null?void 0:n.title)||"",this.options=(n==null?void 0:n.options)||{},this.actions=xx(e),this.pages=[].concat(...e.map(s=>s.pages)),this.wallTime=e.map(s=>s.wallTime).reduce((s,o)=>Math.min(s||Number.MAX_VALUE,o),Number.MAX_VALUE),this.startTime=e.map(s=>s.startTime).reduce((s,o)=>Math.min(s,o),Number.MAX_VALUE),this.endTime=e.map(s=>s.endTime).reduce((s,o)=>Math.max(s,o),Number.MIN_VALUE),this.events=[].concat(...e.map(s=>s.events)),this.stdio=[].concat(...e.map(s=>s.stdio)),this.errors=[].concat(...e.map(s=>s.errors)),this.hasSource=e.some(s=>s.hasSource),this.hasStepData=e.some(s=>s.origin==="testRunner"),this.resources=[...e.map(s=>s.resources)].flat(),this.attachments=this.actions.flatMap(s=>{var o;return((o=s.attachments)==null?void 0:o.map(l=>({...l,traceUrl:s.context.traceUrl})))??[]}),this.visibleAttachments=this.attachments.filter(s=>!s.name.startsWith("_")),this.events.sort((s,o)=>s.time-o.time),this.resources.sort((s,o)=>s._monotonicTime-o._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Ax(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(e=>e.error)}_errorDescriptorsFromActions(){var n;const e=[];for(const s of this.actions||[])(n=s.error)!=null&&n.message&&e.push({action:s,stack:s.stack,message:s.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,n)=>({stack:e.stack,message:e.message,context:this.attachments.find(s=>s.name===`_error-context-${n}`)}))}}function wx(t){for(const n of t.pages)n[Bi]=t;for(let n=0;n=0;n--){const s=t.actions[n];s[cg]=e,s.apiName.includes("route.")||(e=s)}for(const n of t.events)n[Bi]=t;for(const n of t.resources)n[Bi]=t}function xx(t){const e=new Map;for(const o of t){const l=o.traceUrl;let c=e.get(l);c||(c=[],e.set(l,c)),c.push(o)}const n=[];let s=0;for(const[,o]of e){e.size>1&&Sx(o,++s);const l=_x(o);n.push(...l)}n.sort((o,l)=>l.parentId===o.callId?1:o.parentId===l.callId?-1:o.endTime-l.endTime);for(let o=1;ol.parentId===o.callId?-1:o.parentId===l.callId?1:o.startTime-l.startTime);for(let o=0;o+1u.origin==="library"),s=t.filter(u=>u.origin==="testRunner");if(!s.length||!n.length)return t.map(u=>u.actions.map(d=>({...d,context:u}))).flat();const o=n.some(u=>u.actions.some(d=>!!d.stepId));for(const u of n)for(const d of u.actions){const h=o?d.stepId:`${d.apiName}@${d.wallTime}`;e.set(h,{...d,context:u})}const l=bx(s,e,o);l&&kx(n,l);const c=new Map;for(const u of s)for(const d of u.actions){const h=o?d.callId:`${d.apiName}@${d.wallTime}`,y=e.get(h);if(y){c.set(d.callId,y.callId),d.error&&(y.error=d.error),d.attachments&&(y.attachments=d.attachments),d.annotations&&(y.annotations=d.annotations),d.parentId&&(y.parentId=c.get(d.parentId)??d.parentId),y.startTime=d.startTime,y.endTime=d.endTime;continue}d.parentId&&(d.parentId=c.get(d.parentId)??d.parentId),e.set(h,{...d,context:u})}return[...e.values()]}function kx(t,e){for(const n of t){n.startTime+=e,n.endTime+=e;for(const s of n.actions)s.startTime&&(s.startTime+=e),s.endTime&&(s.endTime+=e);for(const s of n.events)s.time+=e;for(const s of n.stdio)s.timestamp+=e;for(const s of n.pages)for(const o of s.screencastFrames)o.timestamp+=e;for(const s of n.resources)s._monotonicTime&&(s._monotonicTime+=e)}}function bx(t,e,n){for(const s of t)for(const o of s.actions){if(!o.startTime)continue;const l=n?o.callId:`${o.apiName}@${o.wallTime}`,c=e.get(l);if(c)return o.startTime-c.startTime}return 0}function Ex(t){var s;const e=new Map;for(const o of t)e.set(o.callId,{id:o.callId,parent:void 0,children:[],action:o});const n={id:"",parent:void 0,children:[]};for(const o of e.values()){if((s=o.action)!=null&&s.apiName.startsWith(vx))continue;const l=o.action.parentId&&e.get(o.action.parentId)||n;l.children.push(o),o.parent=l}return{rootItem:n,itemMap:e}}function ql(t){return t[Bi]}function Tx(t){return t[cg]}function em(t){return t[ug]}function tm(t){return t[fg]}function Nx(t){let e=0,n=0;for(const s of Cx(t)){if(s.type==="console"){const o=s.messageType;o==="warning"?++n:o==="error"&&++e}s.type==="event"&&s.method==="pageError"&&++e}return{errors:e,warnings:n}}function Cx(t){let e=t[Zp];if(e)return e;const n=Tx(t);return e=ql(t).events.filter(s=>s.time>=t.startTime&&(!n||s.time{const d=Math.max(o,t)*window.devicePixelRatio,[h,y]=As(l?l+"."+s+":size":void 0,d),[v,m]=As(l?l+"."+s+":size":void 0,d),[w,S]=P.useState(null),[_,b]=Mr();let T;s==="vertical"?(T=v/window.devicePixelRatio,_&&_.heightS({offset:s==="vertical"?O.clientY:O.clientX,size:T}),onMouseUp:()=>S(null),onMouseMove:O=>{if(!O.buttons)S(null);else if(w){const D=(s==="vertical"?O.clientY:O.clientX)-w.offset,F=n?w.size+D:w.size-D,B=O.target.parentElement.getBoundingClientRect(),I=Math.min(Math.max(o,F),(s==="vertical"?B.height:B.width)-o);s==="vertical"?m(I*window.devicePixelRatio):y(I*window.devicePixelRatio)}}})]})};function Vu(t){var e,n,s,o,l,c,u,d,h;if(t=t??globalThis,!t.__playwright_builtins__){const y={setTimeout:(e=t.setTimeout)==null?void 0:e.bind(t),clearTimeout:(n=t.clearTimeout)==null?void 0:n.bind(t),setInterval:(s=t.setInterval)==null?void 0:s.bind(t),clearInterval:(o=t.clearInterval)==null?void 0:o.bind(t),requestAnimationFrame:(l=t.requestAnimationFrame)==null?void 0:l.bind(t),cancelAnimationFrame:(c=t.cancelAnimationFrame)==null?void 0:c.bind(t),requestIdleCallback:(u=t.requestIdleCallback)==null?void 0:u.bind(t),cancelIdleCallback:(d=t.cancelIdleCallback)==null?void 0:d.bind(t),performance:t.performance,eval:(h=t.eval)==null?void 0:h.bind(t),Intl:t.Intl,Date:t.Date,Map:t.Map,Set:t.Set};Object.defineProperty(t,"__playwright_builtins__",{value:y,configurable:!1,enumerable:!1,writable:!1})}return t.__playwright_builtins__}const Dt=Vu();Dt.setTimeout;Dt.clearTimeout;Dt.setInterval;Dt.clearInterval;const Cl=Dt.requestAnimationFrame,nm=Dt.cancelAnimationFrame;Dt.requestIdleCallback;Dt.cancelIdleCallback;const jx=Dt.performance;Dt.Intl;Dt.Date;const be=Dt.Map,ke=Dt.Set,Ke=function(t,e,n){return t>=e&&t<=n};function Tt(t){return Ke(t,48,57)}function rm(t){return Tt(t)||Ke(t,65,70)||Ke(t,97,102)}function Ix(t){return Ke(t,65,90)}function Ox(t){return Ke(t,97,122)}function Mx(t){return Ix(t)||Ox(t)}function $x(t){return t>=128}function Al(t){return Mx(t)||$x(t)||t===95}function sm(t){return Al(t)||Tt(t)||t===45}function Px(t){return Ke(t,0,8)||t===11||Ke(t,14,31)||t===127}function Ll(t){return t===10}function Nn(t){return Ll(t)||t===9||t===32}const Rx=1114111;class hf extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function Dx(t){const e=[];for(let n=0;n=e.length?-1:e[z]},c=function(z){if(z===void 0&&(z=1),z>3)throw"Spec Error: no more than three codepoints of lookahead.";return l(n+z)},u=function(z){return z===void 0&&(z=1),n+=z,o=l(n),!0},d=function(){return n-=1,!0},h=function(z){return z===void 0&&(z=o),z===-1},y=function(){if(v(),u(),Nn(o)){for(;Nn(c());)u();return new Wu}else{if(o===34)return S();if(o===35)if(sm(c())||T(c(1),c(2))){const z=new Tg("");return O(c(1),c(2),c(3))&&(z.type="id"),z.value=U(),z}else return new at(o);else return o===36?c()===61?(u(),new qx):new at(o):o===39?S():o===40?new Sg:o===41?new _g:o===42?c()===61?(u(),new Hx):new at(o):o===43?F()?(d(),m()):new at(o):o===44?new yg:o===45?F()?(d(),m()):c(1)===45&&c(2)===62?(u(2),new pg):R()?(d(),w()):new at(o):o===46?F()?(d(),m()):new at(o):o===58?new mg:o===59?new gg:o===60?c(1)===33&&c(2)===45&&c(3)===45?(u(3),new hg):new at(o):o===64?O(c(1),c(2),c(3))?new Eg(U()):new at(o):o===91?new xg:o===92?C()?(d(),w()):new at(o):o===93?new Ku:o===94?c()===61?(u(),new Ux):new at(o):o===123?new vg:o===124?c()===61?(u(),new Bx):c()===124?(u(),new kg):new at(o):o===125?new wg:o===126?c()===61?(u(),new zx):new at(o):Tt(o)?(d(),m()):Al(o)?(d(),w()):h()?new Il:new at(o)}},v=function(){for(;c(1)===47&&c(2)===42;)for(u(2);;)if(u(),o===42&&c()===47){u();break}else if(h())return},m=function(){const z=B();if(O(c(1),c(2),c(3))){const J=new Vx;return J.value=z.value,J.repr=z.repr,J.type=z.type,J.unit=U(),J}else if(c()===37){u();const J=new Lg;return J.value=z.value,J.repr=z.repr,J}else{const J=new Ag;return J.value=z.value,J.repr=z.repr,J.type=z.type,J}},w=function(){const z=U();if(z.toLowerCase()==="url"&&c()===40){for(u();Nn(c(1))&&Nn(c(2));)u();return c()===34||c()===39?new Ol(z):Nn(c())&&(c(2)===34||c(2)===39)?new Ol(z):_()}else return c()===40?(u(),new Ol(z)):new bg(z)},S=function(z){z===void 0&&(z=o);let J="";for(;u();){if(o===z||h())return new Ng(J);if(Ll(o))return d(),new dg;o===92?h(c())||(Ll(c())?u():J+=Xe(b())):J+=Xe(o)}throw new Error("Internal error")},_=function(){const z=new Cg("");for(;Nn(c());)u();if(h(c()))return z;for(;u();){if(o===41||h())return z;if(Nn(o)){for(;Nn(c());)u();return c()===41||h(c())?(u(),z):(Q(),new jl)}else{if(o===34||o===39||o===40||Px(o))return Q(),new jl;if(o===92)if(C())z.value+=Xe(b());else return Q(),new jl;else z.value+=Xe(o)}}throw new Error("Internal error")},b=function(){if(u(),rm(o)){const z=[o];for(let de=0;de<5&&rm(c());de++)u(),z.push(o);Nn(c())&&u();let J=parseInt(z.map(function(de){return String.fromCharCode(de)}).join(""),16);return J>Rx&&(J=65533),J}else return h()?65533:o},T=function(z,J){return!(z!==92||Ll(J))},C=function(){return T(o,c())},O=function(z,J,de){return z===45?Al(J)||J===45||T(J,de):Al(z)?!0:z===92?T(z,J):!1},R=function(){return O(o,c(1),c(2))},D=function(z,J,de){return z===43||z===45?!!(Tt(J)||J===46&&Tt(de)):z===46?!!Tt(J):!!Tt(z)},F=function(){return D(o,c(1),c(2))},U=function(){let z="";for(;u();)if(sm(o))z+=Xe(o);else if(C())z+=Xe(b());else return d(),z;throw new Error("Internal parse error")},B=function(){let z="",J="integer";for((c()===43||c()===45)&&(u(),z+=Xe(o));Tt(c());)u(),z+=Xe(o);if(c(1)===46&&Tt(c(2)))for(u(),z+=Xe(o),u(),z+=Xe(o),J="number";Tt(c());)u(),z+=Xe(o);const de=c(1),Te=c(2),Le=c(3);if((de===69||de===101)&&Tt(Te))for(u(),z+=Xe(o),u(),z+=Xe(o),J="number";Tt(c());)u(),z+=Xe(o);else if((de===69||de===101)&&(Te===43||Te===45)&&Tt(Le))for(u(),z+=Xe(o),u(),z+=Xe(o),u(),z+=Xe(o),J="number";Tt(c());)u(),z+=Xe(o);const ye=I(z);return{type:J,value:ye,repr:z}},I=function(z){return+z},Q=function(){for(;u();){if(o===41||h())return;C()&&b()}};let W=0;for(;!h(c());)if(s.push(y()),W++,W>e.length*2)throw new Error("I'm infinite-looping!");return s}class Ve{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class dg extends Ve{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class jl extends Ve{constructor(){super(...arguments),this.tokenType="BADURL"}}class Wu extends Ve{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class hg extends Ve{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return""}}class mg extends Ve{constructor(){super(...arguments),this.tokenType=":"}}class gg extends Ve{constructor(){super(...arguments),this.tokenType=";"}}class yg extends Ve{constructor(){super(...arguments),this.tokenType=","}}class Ms extends Ve{constructor(){super(...arguments),this.value="",this.mirror=""}}class vg extends Ms{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class wg extends Ms{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class xg extends Ms{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Ku extends Ms{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class Sg extends Ms{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class _g extends Ms{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class zx extends Ve{constructor(){super(...arguments),this.tokenType="~="}}class Bx extends Ve{constructor(){super(...arguments),this.tokenType="|="}}class Ux extends Ve{constructor(){super(...arguments),this.tokenType="^="}}class qx extends Ve{constructor(){super(...arguments),this.tokenType="$="}}class Hx extends Ve{constructor(){super(...arguments),this.tokenType="*="}}class kg extends Ve{constructor(){super(...arguments),this.tokenType="||"}}class Il extends Ve{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class at extends Ve{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=Xe(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 $s extends Ve{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 bg extends $s{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return eo(this.value)}}class Ol extends $s{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return eo(this.value)+"("}}class Eg extends $s{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+eo(this.value)}}class Tg extends $s{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"?"#"+eo(this.value):"#"+Wx(this.value)}}class Ng extends $s{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+jg(this.value)+'"'}}class Cg extends $s{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+jg(this.value)+'")'}}class Ag extends Ve{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 Lg extends Ve{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 Vx extends Ve{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 n=eo(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||Ke(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),e+n}}function eo(t){t=""+t;let e="";const n=t.charCodeAt(0);for(let s=0;s=128||o===45||o===95||Ke(o,48,57)||Ke(o,65,90)||Ke(o,97,122)?e+=t[s]:e+="\\"+t[s]}return e}function Wx(t){t=""+t;let e="";for(let n=0;n=128||s===45||s===95||Ke(s,48,57)||Ke(s,65,90)||Ke(s,97,122)?e+=t[n]:e+="\\"+s.toString(16)+" "}return e}function jg(t){t=""+t;let e="";for(let n=0;nI instanceof Eg||I instanceof dg||I instanceof jl||I instanceof kg||I instanceof hg||I instanceof pg||I instanceof gg||I instanceof vg||I instanceof wg||I instanceof Cg||I instanceof Lg);if(s)throw new Nt(`Unsupported token "${s.toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`);let o=0;const l=new ke;function c(){return new Nt(`Unexpected token "${n[o].toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`)}function u(){for(;n[o]instanceof Wu;)o++}function d(I=o){return n[I]instanceof bg}function h(I=o){return n[I]instanceof Ng}function y(I=o){return n[I]instanceof Ag}function v(I=o){return n[I]instanceof yg}function m(I=o){return n[I]instanceof Sg}function w(I=o){return n[I]instanceof _g}function S(I=o){return n[I]instanceof Ol}function _(I=o){return n[I]instanceof at&&n[I].value==="*"}function b(I=o){return n[I]instanceof Il}function T(I=o){return n[I]instanceof at&&[">","+","~"].includes(n[I].value)}function C(I=o){return v(I)||w(I)||b(I)||T(I)||n[I]instanceof Wu}function O(){const I=[R()];for(;u(),!!v();)o++,I.push(R());return I}function R(){return u(),y()||h()?n[o++].value:D()}function D(){const I={simples:[]};for(u(),T()?I.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):I.simples.push({selector:F(),combinator:""});;){if(u(),T())I.simples[I.simples.length-1].combinator=n[o++].value,u();else if(C())break;I.simples.push({combinator:"",selector:F()})}return I}function F(){let I="";const Q=[];for(;!C();)if(d()||_())I+=n[o++].toSource();else if(n[o]instanceof Tg)I+=n[o++].toSource();else if(n[o]instanceof at&&n[o].value===".")if(o++,d())I+="."+n[o++].toSource();else throw c();else if(n[o]instanceof mg)if(o++,d())if(!e.has(n[o].value.toLowerCase()))I+=":"+n[o++].toSource();else{const W=n[o++].value.toLowerCase();Q.push({name:W,args:[]}),l.add(W)}else if(S()){const W=n[o++].value.toLowerCase();if(e.has(W)?(Q.push({name:W,args:O()}),l.add(W)):I+=`:${W}(${U()})`,u(),!w())throw c();o++}else throw c();else if(n[o]instanceof xg){for(I+="[",o++;!(n[o]instanceof Ku)&&!b();)I+=n[o++].toSource();if(!(n[o]instanceof Ku))throw c();I+="]",o++}else throw c();if(!I&&!Q.length)throw c();return{css:I||void 0,functions:Q}}function U(){let I="",Q=1;for(;!b()&&((m()||S())&&Q++,w()&&Q--,!!Q);)I+=n[o++].toSource();return I}const B=O();if(!b())throw c();if(B.some(I=>typeof I!="object"||!("simples"in I)))throw new Nt(`Error while parsing css selector "${t}". Did you mean to CSS.escape it?`);return{selector:B,names:Array.from(l)}}const Qu=new ke(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Qx=new ke(["left-of","right-of","above","below","near"]),Ig=new ke(["not","is","where","has","scope","light","visible","text","text-matches","text-is","has-text","above","below","right-of","left-of","near","nth-match"]);function na(t){const e=Jx(t),n=[];for(const s of e.parts){if(s.name==="css"||s.name==="css:light"){s.name==="css:light"&&(s.body=":light("+s.body+")");const o=Kx(s.body,Ig);n.push({name:"css",body:o.selector,source:s.body});continue}if(Qu.has(s.name)){let o,l;try{const h=JSON.parse("["+s.body+"]");if(!Array.isArray(h)||h.length<1||h.length>2||typeof h[0]!="string")throw new Nt(`Malformed selector: ${s.name}=`+s.body);if(o=h[0],h.length===2){if(typeof h[1]!="number"||!Qx.has(s.name))throw new Nt(`Malformed selector: ${s.name}=`+s.body);l=h[1]}}catch{throw new Nt(`Malformed selector: ${s.name}=`+s.body)}const c={name:s.name,source:s.body,body:{parsed:na(o),distance:l}},u=[...c.body.parsed.parts].reverse().find(h=>h.name==="internal:control"&&h.body==="enter-frame"),d=u?c.body.parsed.parts.indexOf(u):-1;d!==-1&&Gx(c.body.parsed.parts.slice(0,d+1),n.slice(0,d+1))&&c.body.parsed.parts.splice(0,d+1),n.push(c);continue}n.push({...s,source:s.body})}if(Qu.has(n[0].name))throw new Nt(`"${n[0].name}" selector cannot be first`);return{capture:e.capture,parts:n}}function Gx(t,e){return jn({parts:t})===jn({parts:e})}function jn(t,e){return typeof t=="string"?t:t.parts.map((n,s)=>{let o=!0;!e&&s!==t.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(o=!1);const l=o?n.name+"=":"";return`${s===t.capture?"*":""}${l}${n.source}`}).join(" >> ")}function Xx(t,e){const n=(s,o)=>{for(const l of s.parts)e(l,o),Qu.has(l.name)&&n(l.body.parsed,!0)};n(t,!1)}function Jx(t){let e=0,n,s=0;const o={parts:[]},l=()=>{const u=t.substring(s,e).trim(),d=u.indexOf("=");let h,y;d!==-1&&u.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(h=u.substring(0,d).trim(),y=u.substring(d+1)):u.length>1&&u[0]==='"'&&u[u.length-1]==='"'||u.length>1&&u[0]==="'"&&u[u.length-1]==="'"?(h="text",y=u):/^\(*\/\//.test(u)||u.startsWith("..")?(h="xpath",y=u):(h="css",y=u);let v=!1;if(h[0]==="*"&&(v=!0,h=h.substring(1)),o.parts.push({name:h,body:y}),v){if(o.capture!==void 0)throw new Nt("Only one of the selectors can capture using * modifier");o.capture=o.parts.length-1}};if(!t.includes(">>"))return e=t.length,l(),o;const c=()=>{const d=t.substring(s,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e"&&t[e+1]===">"?(l(),e+=2,s=e):e++}return l(),o}function Ir(t,e){let n=0,s=t.length===0;const o=()=>t[n]||"",l=()=>{const b=o();return++n,s=n>=t.length,b},c=b=>{throw s?new Nt(`Unexpected end of selector while parsing selector \`${t}\``):new Nt(`Error while parsing selector \`${t}\` - unexpected symbol "${o()}" at position ${n}`+(b?" during "+b:""))};function u(){for(;!s&&/\s/.test(o());)l()}function d(b){return b>=""||b>="0"&&b<="9"||b>="A"&&b<="Z"||b>="a"&&b<="z"||b>="0"&&b<="9"||b==="_"||b==="-"}function h(){let b="";for(u();!s&&d(o());)b+=l();return b}function y(b){let T=l();for(T!==b&&c("parsing quoted string");!s&&o()!==b;)o()==="\\"&&l(),T+=l();return o()!==b&&c("parsing quoted string"),T+=l(),T}function v(){l()!=="/"&&c("parsing regular expression");let b="",T=!1;for(;!s;){if(o()==="\\")b+=l(),s&&c("parsing regular expression");else if(T&&o()==="]")T=!1;else if(!T&&o()==="[")T=!0;else if(!T&&o()==="/")break;b+=l()}l()!=="/"&&c("parsing regular expression");let C="";for(;!s&&o().match(/[dgimsuy]/);)C+=l();try{return new RegExp(b,C)}catch(O){throw new Nt(`Error while parsing selector \`${t}\`: ${O.message}`)}}function m(){let b="";return u(),o()==="'"||o()==='"'?b=y(o()).slice(1,-1):b=h(),b||c("parsing property path"),b}function w(){u();let b="";return s||(b+=l()),!s&&b!=="="&&(b+=l()),["=","*=","^=","$=","|=","~="].includes(b)||c("parsing operator"),b}function S(){l();const b=[];for(b.push(m()),u();o()===".";)l(),b.push(m()),u();if(o()==="]")return l(),{name:b.join("."),jsonPath:b,op:"",value:null,caseSensitive:!1};const T=w();let C,O=!0;if(u(),o()==="/"){if(T!=="=")throw new Nt(`Error while parsing selector \`${t}\` - cannot use ${T} in attribute with regular expression`);C=v()}else if(o()==="'"||o()==='"')C=y(o()).slice(1,-1),u(),o()==="i"||o()==="I"?(O=!1,l()):(o()==="s"||o()==="S")&&(O=!0,l());else{for(C="";!s&&(d(o())||o()==="+"||o()===".");)C+=l();C==="true"?C=!0:C==="false"?C=!1:e||(C=+C,Number.isNaN(C)&&c("parsing attribute value"))}if(u(),o()!=="]"&&c("parsing attribute value"),l(),T!=="="&&typeof C!="string")throw new Nt(`Error while parsing selector \`${t}\` - cannot use ${T} in attribute with non-string matching value - ${C}`);return{name:b.join("."),jsonPath:b,op:T,value:C,caseSensitive:O}}const _={name:"",attributes:[]};for(_.name=h(),u();o()==="[";)_.attributes.push(S()),u();if(s||c(void 0),!_.name&&!_.attributes.length)throw new Nt(`Error while parsing selector \`${t}\` - selector cannot be empty`);return _}function ra(t,e="'"){const n=JSON.stringify(t),s=n.substring(1,n.length-1).replace(/\\"/g,'"');if(e==="'")return e+s.replace(/[']/g,"\\'")+e;if(e==='"')return e+s.replace(/["]/g,'\\"')+e;if(e==="`")return e+s.replace(/[`]/g,"`")+e;throw new Error("Invalid escape char")}function Vl(t){return t.charAt(0).toUpperCase()+t.substring(1)}function Og(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function Kt(t){let e="";for(let n=0;n=1&&n<=31||n>=48&&n<=57&&(e===0||e===1&&t.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":e===0&&n===45&&t.length===1?"\\"+t.charAt(e):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?t.charAt(e):"\\"+t.charAt(e)}let Er;function Zx(){Er=new be}function vt(t){let e=Er==null?void 0:Er.get(t);return e===void 0&&(e=t.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),Er==null||Er.set(t,e)),e}function sa(t){return t.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function Mg(t){return t.unicode||t.unicodeSets?String(t):String(t).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Ct(t,e){return typeof t!="string"?Mg(t):`${JSON.stringify(t)}${e?"s":"i"}`}function mt(t,e){return typeof t!="string"?Mg(t):`"${t.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function e1(t,e,n=""){if(t.length<=e)return t;const s=[...t];return s.length>e?s.slice(0,e-n.length).join("")+n:s.join("")}function im(t,e){return e1(t,e,"…")}function Wl(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function t1(t,e){const n=t.length,s=e.length;let o=0,l=0;const c=Array(n+1).fill(null).map(()=>Array(s+1).fill(0));for(let u=1;u<=n;u++)for(let d=1;d<=s;d++)t[u-1]===e[d-1]&&(c[u][d]=c[u-1][d-1]+1,c[u][d]>o&&(o=c[u][d],l=u));return t.slice(l-o,l)}function or(t,e,n=!1){return $g(t,e,n,1)[0]}function $g(t,e,n=!1,s=20,o){try{return ys(new a1[t](o),na(e),n,s)}catch{return[e]}}function ys(t,e,n=!1,s=20){const o=[...e.parts],l=[];let c=n?"frame-locator":"page";for(let u=0;ut.generateLocator(h,"has",_)));continue}if(d.name==="internal:has-not"){const S=ys(t,d.body.parsed,!1,s);l.push(S.map(_=>t.generateLocator(h,"hasNot",_)));continue}if(d.name==="internal:and"){const S=ys(t,d.body.parsed,!1,s);l.push(S.map(_=>t.generateLocator(h,"and",_)));continue}if(d.name==="internal:or"){const S=ys(t,d.body.parsed,!1,s);l.push(S.map(_=>t.generateLocator(h,"or",_)));continue}if(d.name==="internal:chain"){const S=ys(t,d.body.parsed,!1,s);l.push(S.map(_=>t.generateLocator(h,"chain",_)));continue}if(d.name==="internal:label"){const{exact:S,text:_}=Oi(d.body);l.push([t.generateLocator(h,"label",_,{exact:S})]);continue}if(d.name==="internal:role"){const S=Ir(d.body,!0),_={attrs:[]};for(const b of S.attributes)b.name==="name"?(_.exact=b.caseSensitive,_.name=b.value):(b.name==="level"&&typeof b.value=="string"&&(b.value=+b.value),_.attrs.push({name:b.name==="include-hidden"?"includeHidden":b.name,value:b.value}));l.push([t.generateLocator(h,"role",S.name,_)]);continue}if(d.name==="internal:testid"){const S=Ir(d.body,!0),{value:_}=S.attributes[0];l.push([t.generateLocator(h,"test-id",_)]);continue}if(d.name==="internal:attr"){const S=Ir(d.body,!0),{name:_,value:b,caseSensitive:T}=S.attributes[0],C=b,O=!!T;if(_==="placeholder"){l.push([t.generateLocator(h,"placeholder",C,{exact:O})]);continue}if(_==="alt"){l.push([t.generateLocator(h,"alt",C,{exact:O})]);continue}if(_==="title"){l.push([t.generateLocator(h,"title",C,{exact:O})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const S=l[l.length-1],_=o[u-1],b=S.map(T=>t.chainLocators([T,t.generateLocator(h,"frame","")]));["xpath","css"].includes(_.name)&&b.push(t.generateLocator(h,"frame-locator",jn({parts:[_]})),t.generateLocator(h,"frame-locator",jn({parts:[_]},!0))),S.splice(0,S.length,...b),c="frame-locator";continue}const y=o[u+1],v=jn({parts:[d]}),m=t.generateLocator(h,"default",v);if(y&&["internal:has-text","internal:has-not-text"].includes(y.name)){const{exact:S,text:_}=Oi(y.body);if(!S){const b=t.generateLocator("locator",y.name==="internal:has-text"?"has-text":"has-not-text",_,{exact:S}),T={};y.name==="internal:has-text"?T.hasText=_:T.hasNotText=_;const C=t.generateLocator(h,"default",v,T);l.push([t.chainLocators([m,b]),C]),u++;continue}}let w;if(["xpath","css"].includes(d.name)){const S=jn({parts:[d]},!0);w=t.generateLocator(h,"default",S)}l.push([m,w].filter(Boolean))}return n1(t,l,s)}function n1(t,e,n){const s=e.map(()=>""),o=[],l=c=>{if(c===e.length)return o.push(t.chainLocators(s)),o.lengthJSON.parse(s));for(let s=0;su1(e,u,v.expandedItems,_||0,c),[e,u,v,_,c]),T=P.useRef(null),[C,O]=P.useState(),[R,D]=P.useState(!1);P.useEffect(()=>{y==null||y(C)},[y,C]),P.useEffect(()=>{const U=T.current;if(!U)return;const B=()=>{om.set(t,U.scrollTop)};return U.addEventListener("scroll",B,{passive:!0}),()=>U.removeEventListener("scroll",B)},[t]),P.useEffect(()=>{T.current&&(T.current.scrollTop=om.get(t)||0)},[t]);const F=P.useCallback(U=>{const{expanded:B}=b.get(U);if(B){for(let I=u;I;I=I.parent)if(I===U){h==null||h(U);break}v.expandedItems.set(U.id,!1)}else v.expandedItems.set(U.id,!0);m({...v})},[b,u,h,v,m]);return x.jsx("div",{className:Ue("tree-view vbox",t+"-tree-view"),role:"tree","data-testid":S||t+"-tree",children:x.jsxs("div",{className:Ue("tree-view-content"),tabIndex:0,onKeyDown:U=>{if(u&&U.key==="Enter"){d==null||d(u);return}if(U.key!=="ArrowDown"&&U.key!=="ArrowUp"&&U.key!=="ArrowLeft"&&U.key!=="ArrowRight")return;if(U.stopPropagation(),U.preventDefault(),u&&U.key==="ArrowLeft"){const{expanded:I,parent:Q}=b.get(u);I?(v.expandedItems.set(u.id,!1),m({...v})):Q&&(h==null||h(Q));return}if(u&&U.key==="ArrowRight"){u.children.length&&(v.expandedItems.set(u.id,!0),m({...v}));return}let B=u;if(U.key==="ArrowDown"&&(u?B=b.get(u).next:b.size&&(B=[...b.keys()][0])),U.key==="ArrowUp"){if(u)B=b.get(u).prev;else if(b.size){const I=[...b.keys()];B=I[I.length-1]}}y==null||y(void 0),B&&(D(!0),h==null||h(B)),O(void 0)},ref:T,children:[w&&b.size===0&&x.jsx("div",{className:"tree-view-empty",children:w}),e.children.map(U=>b.get(U)&&x.jsx(Pg,{item:U,treeItems:b,selectedItem:u,onSelected:h,onAccepted:d,isError:l,toggleExpanded:F,highlightedItem:C,setHighlightedItem:O,render:n,icon:o,title:s,isKeyboardNavigation:R,setIsKeyboardNavigation:D},U.id))]})})}function Pg({item:t,treeItems:e,selectedItem:n,onSelected:s,highlightedItem:o,setHighlightedItem:l,isError:c,onAccepted:u,toggleExpanded:d,render:h,title:y,icon:v,isKeyboardNavigation:m,setIsKeyboardNavigation:w}){const S=P.useId(),_=P.useRef(null);P.useEffect(()=>{n===t&&m&&_.current&&(lg(_.current),w(!1))},[t,n,m,w]);const b=e.get(t),T=b.depth,C=b.expanded;let O="codicon-blank";typeof C=="boolean"&&(O=C?"codicon-chevron-down":"codicon-chevron-right");const R=h(t),D=C&&t.children.length?t.children:[],F=y==null?void 0:y(t),U=(v==null?void 0:v(t))||"codicon-blank";return x.jsxs("div",{ref:_,role:"treeitem","aria-selected":t===n,"aria-expanded":C,"aria-controls":S,title:F,className:"vbox",style:{flex:"none"},children:[x.jsxs("div",{onDoubleClick:()=>u==null?void 0:u(t),className:Ue("tree-view-entry",n===t&&"selected",o===t&&"highlighted",(c==null?void 0:c(t))&&"error"),onClick:()=>s==null?void 0:s(t),onMouseEnter:()=>l(t),onMouseLeave:()=>l(void 0),children:[T?new Array(T).fill(0).map((B,I)=>x.jsx("div",{className:"tree-view-indent"},"indent-"+I)):void 0,x.jsx("div",{"aria-hidden":"true",className:"codicon "+O,style:{minWidth:16,marginRight:4},onDoubleClick:B=>{B.preventDefault(),B.stopPropagation()},onClick:B=>{B.stopPropagation(),B.preventDefault(),d(t)}}),v&&x.jsx("div",{className:"codicon "+U,style:{minWidth:16,marginRight:4},"aria-label":"["+U.replace("codicon","icon")+"]"}),typeof R=="string"?x.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:R}):R]}),!!D.length&&x.jsx("div",{id:S,role:"group",children:D.map(B=>e.get(B)&&x.jsx(Pg,{item:B,treeItems:e,selectedItem:n,onSelected:s,onAccepted:u,isError:c,toggleExpanded:d,highlightedItem:o,setHighlightedItem:l,render:h,title:y,icon:v,isKeyboardNavigation:m,setIsKeyboardNavigation:w},B.id))})]})}function u1(t,e,n,s,o=()=>!0){if(!o(t))return new Map;const l=new Map,c=new Set;for(let h=e==null?void 0:e.parent;h;h=h.parent)c.add(h.id);let u=null;const d=(h,y)=>{for(const v of h.children){if(!o(v))continue;const m=c.has(v.id)||n.get(v.id),w=s>y&&l.size<25&&m!==!1,S=v.children.length?m??w:void 0,_={depth:y,expanded:S,parent:t===h?null:h,next:null,prev:u};u&&(l.get(u).next=v),u=v,l.set(v,_),S&&d(v,y+1)}};return d(t,0),l}const Rt=P.forwardRef(function({children:e,title:n="",icon:s,disabled:o=!1,toggled:l=!1,onClick:c=()=>{},style:u,testId:d,className:h,ariaLabel:y},v){return x.jsxs("button",{ref:v,className:Ue(h,"toolbar-button",s,l&&"toggled"),onMouseDown:lm,onClick:c,onDoubleClick:lm,title:n,disabled:!!o,style:u,"data-testid":d,"aria-label":y||n,children:[s&&x.jsx("span",{className:`codicon codicon-${s}`,style:e?{marginRight:5}:{}}),e]})}),lm=t=>{t.stopPropagation(),t.preventDefault()};function Rg(t){return t==="scheduled"?"codicon-clock":t==="running"?"codicon-loading":t==="failed"?"codicon-error":t==="passed"?"codicon-check":t==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function f1(t){return t==="scheduled"?"Pending":t==="running"?"Running":t==="failed"?"Failed":t==="passed"?"Passed":t==="skipped"?"Skipped":"Did not run"}const d1=c1,h1=({actions:t,selectedAction:e,selectedTime:n,setSelectedTime:s,sdkLanguage:o,onSelected:l,onHighlighted:c,revealConsole:u,revealAttachment:d,isLive:h})=>{const[y,v]=P.useState({expandedItems:new Map}),{rootItem:m,itemMap:w}=P.useMemo(()=>Ex(t),[t]),{selectedItem:S}=P.useMemo(()=>({selectedItem:e?w.get(e.callId):void 0}),[w,e]),_=P.useCallback(D=>{var F,U;return!!((U=(F=D.action)==null?void 0:F.error)!=null&&U.message)},[]),b=P.useCallback(D=>s({minimum:D.action.startTime,maximum:D.action.endTime}),[s]),T=P.useCallback(D=>pf(D.action,{sdkLanguage:o,revealConsole:u,revealAttachment:d,isLive:h,showDuration:!0,showBadges:!0}),[h,u,d,o]),C=P.useCallback(D=>!n||!D.action||D.action.startTime<=n.maximum&&D.action.endTime>=n.minimum,[n]),O=P.useCallback(D=>{l==null||l(D.action)},[l]),R=P.useCallback(D=>{c==null||c(D==null?void 0:D.action)},[c]);return x.jsxs("div",{className:"vbox",children:[n&&x.jsxs("div",{className:"action-list-show-all",onClick:()=>s(void 0),children:[x.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),x.jsx(d1,{name:"actions",rootItem:m,treeState:y,setTreeState:v,selectedItem:S,onSelected:O,onHighlighted:R,onAccepted:b,isError:_,isVisible:C,render:T})]})},pf=(t,e)=>{var S,_;const{sdkLanguage:n,revealConsole:s,revealAttachment:o,isLive:l,showDuration:c,showBadges:u}=e,{errors:d,warnings:h}=Nx(t),y=!!((S=t.attachments)!=null&&S.length)&&!!o,v=Dg(t,n||"javascript"),m=t.class==="Test"&&t.method==="step"&&((_=t.annotations)==null?void 0:_.some(b=>b.type==="skip"));let w="";return t.endTime?w=yt(t.endTime-t.startTime):t.error?w="Timed out":l||(w="-"),x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"action-title",title:t.apiName,children:[x.jsx("span",{children:t.apiName}),v&&(v.type==="locator"?x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"action-parameter action-locator-parameter",children:v.value}),v.childDisplayString&&x.jsx("span",{className:"action-parameter action-generic-parameter",children:v.childDisplayString.value})]}):x.jsx("span",{className:"action-parameter action-generic-parameter",children:v.value})),t.method==="goto"&&t.params.url&&x.jsx("div",{className:"action-url",title:t.params.url,children:t.params.url}),t.class==="APIRequestContext"&&t.params.url&&x.jsx("div",{className:"action-url",title:t.params.url,children:p1(t.params.url)})]}),(c||u||y||m)&&x.jsx("div",{className:"spacer"}),y&&x.jsx(Rt,{icon:"attach",title:"Open Attachment",onClick:()=>o(t.attachments[0])}),c&&!m&&x.jsx("div",{className:"action-duration",children:w||x.jsx("span",{className:"codicon codicon-loading"})}),m&&x.jsx("span",{className:Ue("action-skipped","codicon",Rg("skipped")),title:"skipped"}),u&&x.jsxs("div",{className:"action-icons",onClick:()=>s==null?void 0:s(),children:[!!d&&x.jsxs("div",{className:"action-icon",children:[x.jsx("span",{className:"codicon codicon-error"}),x.jsx("span",{className:"action-icon-value",children:d})]}),!!h&&x.jsxs("div",{className:"action-icon",children:[x.jsx("span",{className:"codicon codicon-warning"}),x.jsx("span",{className:"action-icon-value",children:h})]})]})]})};function p1(t){try{const e=new URL(t);return e.pathname+e.search}catch{return t}}const m1=t=>{switch(t.method){case"clockPauseAt":case"clockSetFixedTime":case"clockSetSystemTime":return t.params.timeString===void 0&&t.params.timeNumber===void 0?void 0:{type:"generic",value:new Date(t.params.timeString??t.params.timeNumber).toLocaleString(void 0,{timeZone:"UTC"})};case"clockFastForward":case"clockRunFor":return t.params.ticksNumber===void 0&&t.params.ticksString===void 0?void 0:{type:"generic",value:t.params.ticksString??`${t.params.ticksNumber}ms`}}},g1=t=>{switch(t.method){case"press":case"keyboardPress":case"keyboardDown":case"keyboardUp":return t.params.key===void 0?void 0:{type:"generic",value:t.params.key};case"type":case"fill":case"keyboardType":case"keyboardInsertText":{const e=t.params.text??t.params.value;return e===void 0?void 0:{type:"generic",value:`"${e}"`}}}},y1=t=>{switch(t.method){case"click":case"dblclick":case"mouseClick":case"mouseMove":return t.params.x===void 0||t.params.y===void 0?void 0:{type:"generic",value:`(${t.params.x}, ${t.params.y})`};case"mouseWheel":return t.params.deltaX===void 0||t.params.deltaY===void 0?void 0:{type:"generic",value:`(${t.params.deltaX}, ${t.params.deltaY})`}}},v1=t=>{switch(t.method){case"tap":return t.params.x===void 0||t.params.y===void 0?void 0:{type:"generic",value:`(${t.params.x}, ${t.params.y})`}}},Dg=(t,e,n=!1)=>{const s=t.params;if(!n&&s.selector!==void 0)return{type:"locator",value:or(e,s.selector),childDisplayString:Dg(t,e,!0)};switch(t.class.toLowerCase()){case"browsercontext":return m1(t);case"page":case"frame":case"elementhandle":return g1(t)??y1(t)??v1(t)}},mf=({value:t,description:e})=>{const[n,s]=P.useState("copy"),o=P.useCallback(()=>{(typeof t=="function"?t():Promise.resolve(t)).then(c=>{navigator.clipboard.writeText(c).then(()=>{s("check"),setTimeout(()=>{s("copy")},3e3)},()=>{s("close")})},()=>{s("close")})},[t]);return x.jsx(Rt,{title:e||"Copy",icon:n,onClick:o})},Ml=({value:t,description:e,copiedDescription:n=e,style:s})=>{const[o,l]=P.useState(!1),c=P.useCallback(async()=>{const u=typeof t=="function"?await t():t;await navigator.clipboard.writeText(u),l(!0),setTimeout(()=>l(!1),3e3)},[t]);return x.jsx(Rt,{style:s,title:e,onClick:c,className:"copy-to-clipboard-text-button",children:o?n:e})},$r=({text:t})=>x.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:t}),w1=({action:t,startTimeOffset:e,sdkLanguage:n})=>{const s=P.useMemo(()=>Object.keys((t==null?void 0:t.params)??{}).filter(c=>c!=="info"),[t]);if(!t)return x.jsx($r,{text:"No action selected"});const o=t.startTime-e,l=yt(o);return x.jsxs("div",{className:"call-tab",children:[x.jsx("div",{className:"call-line",children:t.apiName}),x.jsx("div",{className:"call-section",children:"Time"}),x.jsx(am,{name:"start:",value:l}),x.jsx(am,{name:"duration:",value:x1(t)}),!!s.length&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"call-section",children:"Parameters"}),s.map(c=>cm(um(t,c,t.params[c],n)))]}),!!t.result&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(t.result).map(c=>cm(um(t,c,t.result[c],n)))]})]})},am=({name:t,value:e})=>x.jsxs("div",{className:"call-line",children:[t,x.jsx("span",{className:"call-value datetime",title:e,children:e})]});function x1(t){return t.endTime?yt(t.endTime-t.startTime):t.error?"Timed Out":"Running"}function cm(t){let e=t.text.replace(/\n/g,"↵");return t.type==="string"&&(e=`"${e}"`),x.jsxs("div",{className:"call-line",children:[t.name,":",x.jsx("span",{className:Ue("call-value",t.type),title:t.text,children:e}),["string","number","object","locator"].includes(t.type)&&x.jsx(mf,{value:t.text})]},t.name)}function um(t,e,n,s){const o=t.method.includes("eval")||t.method==="waitForFunction";if(e==="files")return{text:"",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&o)&&(n=Kl(n.value,new Array(10).fill({handle:""}))),(e==="value"&&o||e==="received"&&t.method==="expect")&&(n=Kl(n,new Array(10).fill({handle:""}))),e==="selector")return{text:or(s||"javascript",t.params.selector),type:"locator",name:"locator"};const l=typeof n;return l!=="object"||n===null?{text:String(n),type:l,name:e}:n.guid?{text:"",type:"handle",name:e}:{text:JSON.stringify(n).slice(0,1e3),type:"object",name:e}}function Kl(t,e){if(t.n!==void 0)return t.n;if(t.s!==void 0)return t.s;if(t.b!==void 0)return t.b;if(t.v!==void 0){if(t.v==="undefined")return;if(t.v==="null")return null;if(t.v==="NaN")return NaN;if(t.v==="Infinity")return 1/0;if(t.v==="-Infinity")return-1/0;if(t.v==="-0")return-0}if(t.d!==void 0)return new Date(t.d);if(t.r!==void 0)return new RegExp(t.r.p,t.r.f);if(t.a!==void 0)return t.a.map(n=>Kl(n,e));if(t.o!==void 0){const n={};for(const{k:s,v:o}of t.o)n[s]=Kl(o,e);return n}return t.h!==void 0?e===void 0?"