@checkly/playwright-core 1.48.22 → 1.48.24-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/lib/checkly/secretsFilter.js +29 -6
  2. package/lib/client/clientStackTrace.js +65 -0
  3. package/lib/client/fileUtils.js +31 -0
  4. package/lib/client/platform.js +71 -0
  5. package/lib/client/timeoutSettings.js +65 -0
  6. package/lib/client/webSocket.js +106 -0
  7. package/lib/server/callLog.js +79 -0
  8. package/lib/server/harBackend.js +157 -0
  9. package/lib/server/localUtils.js +203 -0
  10. package/lib/server/recorder/chat.js +177 -0
  11. package/lib/server/storageScript.js +160 -0
  12. package/lib/server/timeoutSettings.js +74 -0
  13. package/lib/server/utils/ascii.js +31 -0
  14. package/lib/server/utils/comparators.js +159 -0
  15. package/lib/server/utils/crypto.js +171 -0
  16. package/lib/server/utils/debug.js +38 -0
  17. package/lib/server/utils/debugLogger.js +93 -0
  18. package/lib/server/utils/env.js +53 -0
  19. package/lib/server/utils/eventsHelper.js +38 -0
  20. package/lib/server/utils/expectUtils.js +33 -0
  21. package/lib/server/utils/fileUtils.js +204 -0
  22. package/lib/server/utils/happyEyeballs.js +209 -0
  23. package/lib/server/utils/hostPlatform.js +145 -0
  24. package/lib/server/utils/httpServer.js +233 -0
  25. package/lib/server/utils/image_tools/colorUtils.js +98 -0
  26. package/lib/server/utils/image_tools/compare.js +108 -0
  27. package/lib/server/utils/image_tools/imageChannel.js +70 -0
  28. package/lib/server/utils/image_tools/stats.js +102 -0
  29. package/lib/server/utils/linuxUtils.js +58 -0
  30. package/lib/server/utils/network.js +160 -0
  31. package/lib/server/utils/nodePlatform.js +140 -0
  32. package/lib/server/utils/pipeTransport.js +82 -0
  33. package/lib/server/utils/processLauncher.js +248 -0
  34. package/lib/server/utils/profiler.js +52 -0
  35. package/lib/server/utils/socksProxy.js +570 -0
  36. package/lib/server/utils/spawnAsync.js +45 -0
  37. package/lib/server/utils/task.js +58 -0
  38. package/lib/server/utils/userAgent.js +91 -0
  39. package/lib/server/utils/wsServer.js +128 -0
  40. package/lib/server/utils/zipFile.js +75 -0
  41. package/lib/server/utils/zones.js +54 -0
  42. package/lib/utils/isomorphic/ariaSnapshot.js +392 -0
  43. package/lib/utils/isomorphic/assert.js +25 -0
  44. package/lib/utils/isomorphic/colors.js +65 -0
  45. package/lib/utils/isomorphic/headers.js +52 -0
  46. package/lib/utils/isomorphic/manualPromise.js +107 -0
  47. package/lib/utils/isomorphic/multimap.js +73 -0
  48. package/lib/utils/isomorphic/rtti.js +41 -0
  49. package/lib/utils/isomorphic/semaphore.js +51 -0
  50. package/lib/utils/isomorphic/stackTrace.js +169 -0
  51. package/lib/utils/isomorphic/time.js +25 -0
  52. package/lib/utils/isomorphic/timeoutRunner.js +66 -0
  53. package/lib/utils/isomorphic/types.js +5 -0
  54. package/lib/utils.js +447 -0
  55. package/lib/vite/recorder/assets/codeMirrorModule-xqJWdfrS.js +24 -0
  56. package/lib/vite/recorder/assets/{index-Bxxcmxlu.js → index-DDT9w7gI.js} +2 -2
  57. package/lib/vite/recorder/index.html +1 -1
  58. package/lib/vite/traceViewer/assets/{codeMirrorModule-pBPtArIT.js → codeMirrorModule-Bh1rfd2w.js} +14 -14
  59. package/lib/vite/traceViewer/assets/codeMirrorModule-DZoSgqUd.js +24 -0
  60. package/lib/vite/traceViewer/assets/codeMirrorModule-lDjkI8Ax.js +24 -0
  61. package/lib/vite/{recorder/assets/codeMirrorModule-d0KhC1qL.js → traceViewer/assets/codeMirrorModule-xvopPhZ4.js} +1 -1
  62. package/lib/vite/traceViewer/assets/{inspectorTab-Soeeuvzv.js → inspectorTab-7GHnKvSD.js} +2 -2
  63. package/lib/vite/traceViewer/assets/{inspectorTab-BuJ3wAX_.js → inspectorTab-BHcfR9dD.js} +3 -3
  64. package/lib/vite/traceViewer/assets/inspectorTab-BPzhNk9r.js +64 -0
  65. package/lib/vite/traceViewer/assets/inspectorTab-wfvwpMHs.js +64 -0
  66. package/lib/vite/traceViewer/assets/{workbench-DdmJ9AJV.js → workbench-C6nMfKVy.js} +1 -1
  67. package/lib/vite/traceViewer/assets/{workbench-lypYlf00.js → workbench-DLv_q9ji.js} +1 -1
  68. package/lib/vite/traceViewer/assets/workbench-DZqNXdoV.js +9 -0
  69. package/lib/vite/traceViewer/assets/workbench-LKskf2Iy.js +9 -0
  70. package/lib/vite/traceViewer/{embedded.BkvOrz5Z.js → embedded.BIubxTi3.js} +1 -1
  71. package/lib/vite/traceViewer/{embedded.DInvAijy.js → embedded.BXYl5zRv.js} +1 -1
  72. package/lib/vite/traceViewer/embedded.CShPz96b.js +2 -0
  73. package/lib/vite/traceViewer/embedded.Dxe2heQk.js +2 -0
  74. package/lib/vite/traceViewer/embedded.html +3 -3
  75. package/lib/vite/traceViewer/{index.Dha3cgqs.js → index.BZ9CE8t3.js} +1 -1
  76. package/lib/vite/traceViewer/{index._Iolt-uE.js → index.CB297BuW.js} +1 -1
  77. package/lib/vite/traceViewer/index.DPD22sZn.js +2 -0
  78. package/lib/vite/traceViewer/index.DZkJsFod.js +2 -0
  79. package/lib/vite/traceViewer/index.html +3 -3
  80. package/lib/vite/traceViewer/{recorder.DNMfnSiu.js → recorder.BVExlUUk.js} +1 -1
  81. package/lib/vite/traceViewer/{recorder.DTSaNaly.js → recorder.BaRuS6Pc.js} +1 -1
  82. package/lib/vite/traceViewer/recorder.C4zxcvd2.js +2 -0
  83. package/lib/vite/traceViewer/recorder.C88JDknq.js +2 -0
  84. package/lib/vite/traceViewer/recorder.html +2 -2
  85. package/lib/vite/traceViewer/{uiMode.BM7yhjzl.js → uiMode.2tr9k625.js} +1 -1
  86. package/lib/vite/traceViewer/{uiMode.Cr1tvTWS.js → uiMode.B11wexdJ.js} +1 -1
  87. package/lib/vite/traceViewer/uiMode.DXa41vt9.js +5 -0
  88. package/lib/vite/traceViewer/uiMode.DjTS7tqC.js +5 -0
  89. package/lib/vite/traceViewer/uiMode.html +3 -3
  90. package/package.json +1 -1
  91. package/lib/vite/traceViewer/assets/codeMirrorModule-tzBrK1V4.js +0 -24
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-tzBrK1V4.js","../codeMirrorModule.ez37Vkbh.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-DZoSgqUd.js","../codeMirrorModule.ez37Vkbh.css"])))=>i.map(i=>d[i]);
2
2
  var Cp=Object.defineProperty;var Np=(e,t,n)=>t in e?Cp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var H=(e,t,n)=>Np(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var D1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pc={exports:{}},Eo={},Rc={exports:{}},O={};/**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -39,7 +39,7 @@ var Cp=Object.defineProperty;var Np=(e,t,n)=>t in e?Cp(e,t,{enumerable:!0,config
39
39
  `).replace(wm,"")}function pi(e,t,n){if(t=xu(t),xu(e)!==t&&n)throw Error(C(425))}function to(){}var el=null,tl=null;function nl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var rl=typeof setTimeout=="function"?setTimeout:void 0,xm=typeof clearTimeout=="function"?clearTimeout:void 0,_u=typeof Promise=="function"?Promise:void 0,_m=typeof queueMicrotask=="function"?queueMicrotask:typeof _u<"u"?function(e){return _u.resolve(null).then(e).catch(Sm)}:rl;function Sm(e){setTimeout(function(){throw e})}function us(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),jr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);jr(t)}function Ot(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Su(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Gn=Math.random().toString(36).slice(2),ut="__reactFiber$"+Gn,Ur="__reactProps$"+Gn,xt="__reactContainer$"+Gn,il="__reactEvents$"+Gn,Em="__reactListeners$"+Gn,Tm="__reactHandles$"+Gn;function Jt(e){var t=e[ut];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[ut]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Su(e);e!==null;){if(n=e[ut])return n;e=Su(e)}return t}e=n,n=e.parentNode}return null}function Jr(e){return e=e[ut]||e[xt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function kn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(C(33))}function Ao(e){return e[Ur]||null}var ol=[],Cn=-1;function Bt(e){return{current:e}}function V(e){0>Cn||(e.current=ol[Cn],ol[Cn]=null,Cn--)}function F(e,t){Cn++,ol[Cn]=e.current,e.current=t}var Ut={},ye=Bt(Ut),Ie=Bt(!1),sn=Ut;function Hn(e,t){var n=e.type.contextTypes;if(!n)return Ut;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Me(e){return e=e.childContextTypes,e!=null}function no(){V(Ie),V(ye)}function Eu(e,t,n){if(ye.current!==Ut)throw Error(C(168));F(ye,t),F(Ie,n)}function Hd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(C(108,ag(e)||"Unknown",i));return G({},n,r)}function ro(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ut,sn=ye.current,F(ye,e),F(Ie,Ie.current),!0}function Tu(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=Hd(e,t,sn),r.__reactInternalMemoizedMergedChildContext=e,V(Ie),V(ye),F(ye,e)):V(Ie),F(Ie,n)}var gt=null,Lo=!1,cs=!1;function Ud(e){gt===null?gt=[e]:gt.push(e)}function km(e){Lo=!0,Ud(e)}function qt(){if(!cs&&gt!==null){cs=!0;var e=0,t=z;try{var n=gt;for(z=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}gt=null,Lo=!1}catch(i){throw gt!==null&&(gt=gt.slice(e+1)),hd(Wl,qt),i}finally{z=t,cs=!1}}return null}var Nn=[],bn=0,io=null,oo=0,He=[],Ue=0,ln=null,mt=1,vt="";function Kt(e,t){Nn[bn++]=oo,Nn[bn++]=io,io=e,oo=t}function Vd(e,t,n){He[Ue++]=mt,He[Ue++]=vt,He[Ue++]=ln,ln=e;var r=mt;e=vt;var i=32-tt(r)-1;r&=~(1<<i),n+=1;var o=32-tt(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,mt=1<<32-tt(t)+i|n<<i|r,vt=o+e}else mt=1<<o|n<<i|r,vt=e}function ta(e){e.return!==null&&(Kt(e,1),Vd(e,1,0))}function na(e){for(;e===io;)io=Nn[--bn],Nn[bn]=null,oo=Nn[--bn],Nn[bn]=null;for(;e===ln;)ln=He[--Ue],He[Ue]=null,vt=He[--Ue],He[Ue]=null,mt=He[--Ue],He[Ue]=null}var Oe=null,$e=null,q=!1,Je=null;function Bd(e,t){var n=Be(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ku(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Oe=e,$e=Ot(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Oe=e,$e=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ln!==null?{id:mt,overflow:vt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Be(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Oe=e,$e=null,!0):!1;default:return!1}}function sl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ll(e){if(q){var t=$e;if(t){var n=t;if(!ku(e,t)){if(sl(e))throw Error(C(418));t=Ot(n.nextSibling);var r=Oe;t&&ku(e,t)?Bd(r,n):(e.flags=e.flags&-4097|2,q=!1,Oe=e)}}else{if(sl(e))throw Error(C(418));e.flags=e.flags&-4097|2,q=!1,Oe=e}}}function Cu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Oe=e}function gi(e){if(e!==Oe)return!1;if(!q)return Cu(e),q=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!nl(e.type,e.memoizedProps)),t&&(t=$e)){if(sl(e))throw qd(),Error(C(418));for(;t;)Bd(e,t),t=Ot(t.nextSibling)}if(Cu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(C(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){$e=Ot(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}$e=null}}else $e=Oe?Ot(e.stateNode.nextSibling):null;return!0}function qd(){for(var e=$e;e;)e=Ot(e.nextSibling)}function Un(){$e=Oe=null,q=!1}function ra(e){Je===null?Je=[e]:Je.push(e)}var Cm=Et.ReactCurrentBatchConfig;function Xe(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var so=Bt(null),lo=null,An=null,ia=null;function oa(){ia=An=lo=null}function sa(e){var t=so.current;V(so),e._currentValue=t}function al(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jn(e,t){lo=e,ia=An=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Le=!0),e.firstContext=null)}function Qe(e){var t=e._currentValue;if(ia!==e)if(e={context:e,memoizedValue:t,next:null},An===null){if(lo===null)throw Error(C(308));An=e,lo.dependencies={lanes:0,firstContext:e}}else An=An.next=e;return t}var Zt=null;function la(e){Zt===null?Zt=[e]:Zt.push(e)}function Wd(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,la(t)):(n.next=i.next,i.next=n),t.interleaved=n,_t(e,r)}function _t(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ct=!1;function aa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,j&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,_t(e,n)}return i=r.interleaved,i===null?(t.next=t,la(r)):(t.next=i.next,i.next=t),r.interleaved=t,_t(e,n)}function Mi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ql(e,n)}}function Nu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ao(e,t,n,r){var i=e.updateQueue;Ct=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?o=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(o!==null){var f=i.baseState;s=0,c=u=a=null,l=o;do{var d=l.lane,g=l.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,v=l;switch(d=t,g=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){f=y.call(g,f,d);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,d=typeof y=="function"?y.call(g,f,d):y,d==null)break e;f=G({},f,d);break e;case 2:Ct=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else g={eventTime:g,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=g,a=f):c=c.next=g,s|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);un|=s,e.lanes=s,e.memoizedState=f}}function bu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(C(191,i));i.call(r)}}}var Kd=new Wc.Component().refs;function ul(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:G({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Io={isMounted:function(e){return(e=e._reactInternals)?pn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Se(),i=zt(e),o=yt(r,i);o.payload=t,n!=null&&(o.callback=n),t=jt(e,o,i),t!==null&&(nt(t,e,i,r),Mi(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Se(),i=zt(e),o=yt(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=jt(e,o,i),t!==null&&(nt(t,e,i,r),Mi(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Se(),r=zt(e),i=yt(n,r);i.tag=2,t!=null&&(i.callback=t),t=jt(e,i,r),t!==null&&(nt(t,e,r,n),Mi(t,e,r))}};function Au(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!zr(n,r)||!zr(i,o):!0}function Gd(e,t,n){var r=!1,i=Ut,o=t.contextType;return typeof o=="object"&&o!==null?o=Qe(o):(i=Me(t)?sn:ye.current,r=t.contextTypes,o=(r=r!=null)?Hn(e,i):Ut),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Io,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Lu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Io.enqueueReplaceState(t,t.state,null)}function cl(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Kd,aa(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Qe(o):(o=Me(t)?sn:ye.current,i.context=Hn(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(ul(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Io.enqueueReplaceState(i,i.state,null),ao(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function lr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(C(309));var r=n.stateNode}if(!r)throw Error(C(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var l=i.refs;l===Kd&&(l=i.refs={}),s===null?delete l[o]:l[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(C(284));if(!n._owner)throw Error(C(290,e))}return e}function mi(e,t){throw e=Object.prototype.toString.call(t),Error(C(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Iu(e){var t=e._init;return t(e._payload)}function Xd(e){function t(p,h){if(e){var m=p.deletions;m===null?(p.deletions=[h],p.flags|=16):m.push(h)}}function n(p,h){if(!e)return null;for(;h!==null;)t(p,h),h=h.sibling;return null}function r(p,h){for(p=new Map;h!==null;)h.key!==null?p.set(h.key,h):p.set(h.index,h),h=h.sibling;return p}function i(p,h){return p=Ft(p,h),p.index=0,p.sibling=null,p}function o(p,h,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<h?(p.flags|=2,h):m):(p.flags|=2,h)):(p.flags|=1048576,h)}function s(p){return e&&p.alternate===null&&(p.flags|=2),p}function l(p,h,m,_){return h===null||h.tag!==6?(h=vs(m,p.mode,_),h.return=p,h):(h=i(h,m),h.return=p,h)}function a(p,h,m,_){var T=m.type;return T===_n?c(p,h,m.props.children,_,m.key):h!==null&&(h.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kt&&Iu(T)===h.type)?(_=i(h,m.props),_.ref=lr(p,h,m),_.return=p,_):(_=Di(m.type,m.key,m.props,null,p.mode,_),_.ref=lr(p,h,m),_.return=p,_)}function u(p,h,m,_){return h===null||h.tag!==4||h.stateNode.containerInfo!==m.containerInfo||h.stateNode.implementation!==m.implementation?(h=ys(m,p.mode,_),h.return=p,h):(h=i(h,m.children||[]),h.return=p,h)}function c(p,h,m,_,T){return h===null||h.tag!==7?(h=rn(m,p.mode,_,T),h.return=p,h):(h=i(h,m),h.return=p,h)}function f(p,h,m){if(typeof h=="string"&&h!==""||typeof h=="number")return h=vs(""+h,p.mode,m),h.return=p,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case oi:return m=Di(h.type,h.key,h.props,null,p.mode,m),m.ref=lr(p,null,h),m.return=p,m;case xn:return h=ys(h,p.mode,m),h.return=p,h;case kt:var _=h._init;return f(p,_(h._payload),m)}if(mr(h)||nr(h))return h=rn(h,p.mode,m,null),h.return=p,h;mi(p,h)}return null}function d(p,h,m,_){var T=h!==null?h.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return T!==null?null:l(p,h,""+m,_);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case oi:return m.key===T?a(p,h,m,_):null;case xn:return m.key===T?u(p,h,m,_):null;case kt:return T=m._init,d(p,h,T(m._payload),_)}if(mr(m)||nr(m))return T!==null?null:c(p,h,m,_,null);mi(p,m)}return null}function g(p,h,m,_,T){if(typeof _=="string"&&_!==""||typeof _=="number")return p=p.get(m)||null,l(h,p,""+_,T);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case oi:return p=p.get(_.key===null?m:_.key)||null,a(h,p,_,T);case xn:return p=p.get(_.key===null?m:_.key)||null,u(h,p,_,T);case kt:var E=_._init;return g(p,h,m,E(_._payload),T)}if(mr(_)||nr(_))return p=p.get(m)||null,c(h,p,_,T,null);mi(h,_)}return null}function y(p,h,m,_){for(var T=null,E=null,k=h,b=h=0,S=null;k!==null&&b<m.length;b++){k.index>b?(S=k,k=null):S=k.sibling;var I=d(p,k,m[b],_);if(I===null){k===null&&(k=S);break}e&&k&&I.alternate===null&&t(p,k),h=o(I,h,b),E===null?T=I:E.sibling=I,E=I,k=S}if(b===m.length)return n(p,k),q&&Kt(p,b),T;if(k===null){for(;b<m.length;b++)k=f(p,m[b],_),k!==null&&(h=o(k,h,b),E===null?T=k:E.sibling=k,E=k);return q&&Kt(p,b),T}for(k=r(p,k);b<m.length;b++)S=g(k,p,b,m[b],_),S!==null&&(e&&S.alternate!==null&&k.delete(S.key===null?b:S.key),h=o(S,h,b),E===null?T=S:E.sibling=S,E=S);return e&&k.forEach(function(D){return t(p,D)}),q&&Kt(p,b),T}function v(p,h,m,_){var T=nr(m);if(typeof T!="function")throw Error(C(150));if(m=T.call(m),m==null)throw Error(C(151));for(var E=T=null,k=h,b=h=0,S=null,I=m.next();k!==null&&!I.done;b++,I=m.next()){k.index>b?(S=k,k=null):S=k.sibling;var D=d(p,k,I.value,_);if(D===null){k===null&&(k=S);break}e&&k&&D.alternate===null&&t(p,k),h=o(D,h,b),E===null?T=D:E.sibling=D,E=D,k=S}if(I.done)return n(p,k),q&&Kt(p,b),T;if(k===null){for(;!I.done;b++,I=m.next())I=f(p,I.value,_),I!==null&&(h=o(I,h,b),E===null?T=I:E.sibling=I,E=I);return q&&Kt(p,b),T}for(k=r(p,k);!I.done;b++,I=m.next())I=g(k,p,b,I.value,_),I!==null&&(e&&I.alternate!==null&&k.delete(I.key===null?b:I.key),h=o(I,h,b),E===null?T=I:E.sibling=I,E=I);return e&&k.forEach(function(N){return t(p,N)}),q&&Kt(p,b),T}function w(p,h,m,_){if(typeof m=="object"&&m!==null&&m.type===_n&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case oi:e:{for(var T=m.key,E=h;E!==null;){if(E.key===T){if(T=m.type,T===_n){if(E.tag===7){n(p,E.sibling),h=i(E,m.props.children),h.return=p,p=h;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===kt&&Iu(T)===E.type){n(p,E.sibling),h=i(E,m.props),h.ref=lr(p,E,m),h.return=p,p=h;break e}n(p,E);break}else t(p,E);E=E.sibling}m.type===_n?(h=rn(m.props.children,p.mode,_,m.key),h.return=p,p=h):(_=Di(m.type,m.key,m.props,null,p.mode,_),_.ref=lr(p,h,m),_.return=p,p=_)}return s(p);case xn:e:{for(E=m.key;h!==null;){if(h.key===E)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(p,h.sibling),h=i(h,m.children||[]),h.return=p,p=h;break e}else{n(p,h);break}else t(p,h);h=h.sibling}h=ys(m,p.mode,_),h.return=p,p=h}return s(p);case kt:return E=m._init,w(p,h,E(m._payload),_)}if(mr(m))return y(p,h,m,_);if(nr(m))return v(p,h,m,_);mi(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,h!==null&&h.tag===6?(n(p,h.sibling),h=i(h,m),h.return=p,p=h):(n(p,h),h=vs(m,p.mode,_),h.return=p,p=h),s(p)):n(p,h)}return w}var Vn=Xd(!0),Yd=Xd(!1),Zr={},dt=Bt(Zr),Vr=Bt(Zr),Br=Bt(Zr);function en(e){if(e===Zr)throw Error(C(174));return e}function ua(e,t){switch(F(Br,t),F(Vr,e),F(dt,Zr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Us(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Us(t,e)}V(dt),F(dt,t)}function Bn(){V(dt),V(Vr),V(Br)}function Jd(e){en(Br.current);var t=en(dt.current),n=Us(t,e.type);t!==n&&(F(Vr,e),F(dt,n))}function ca(e){Vr.current===e&&(V(dt),V(Vr))}var Q=Bt(0);function uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ds=[];function da(){for(var e=0;e<ds.length;e++)ds[e]._workInProgressVersionPrimary=null;ds.length=0}var Pi=Et.ReactCurrentDispatcher,fs=Et.ReactCurrentBatchConfig,an=0,K=null,ie=null,le=null,co=!1,br=!1,qr=0,Nm=0;function he(){throw Error(C(321))}function fa(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!rt(e[n],t[n]))return!1;return!0}function ha(e,t,n,r,i,o){if(an=o,K=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pi.current=e===null||e.memoizedState===null?Im:Mm,e=n(r,i),br){o=0;do{if(br=!1,qr=0,25<=o)throw Error(C(301));o+=1,le=ie=null,t.updateQueue=null,Pi.current=Pm,e=n(r,i)}while(br)}if(Pi.current=fo,t=ie!==null&&ie.next!==null,an=0,le=ie=K=null,co=!1,t)throw Error(C(300));return e}function pa(){var e=qr!==0;return qr=0,e}function st(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return le===null?K.memoizedState=le=e:le=le.next=e,le}function Ke(){if(ie===null){var e=K.alternate;e=e!==null?e.memoizedState:null}else e=ie.next;var t=le===null?K.memoizedState:le.next;if(t!==null)le=t,ie=e;else{if(e===null)throw Error(C(310));ie=e,e={memoizedState:ie.memoizedState,baseState:ie.baseState,baseQueue:ie.baseQueue,queue:ie.queue,next:null},le===null?K.memoizedState=le=e:le=le.next=e}return le}function Wr(e,t){return typeof t=="function"?t(e):t}function hs(e){var t=Ke(),n=t.queue;if(n===null)throw Error(C(311));n.lastRenderedReducer=e;var r=ie,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,a=null,u=o;do{var c=u.lane;if((an&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=f,s=r):a=a.next=f,K.lanes|=c,un|=c}u=u.next}while(u!==null&&u!==o);a===null?s=r:a.next=l,rt(r,t.memoizedState)||(Le=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,K.lanes|=o,un|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ps(e){var t=Ke(),n=t.queue;if(n===null)throw Error(C(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);rt(o,t.memoizedState)||(Le=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Zd(){}function ef(e,t){var n=K,r=Ke(),i=t(),o=!rt(r.memoizedState,i);if(o&&(r.memoizedState=i,Le=!0),r=r.queue,ga(rf.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||le!==null&&le.memoizedState.tag&1){if(n.flags|=2048,Qr(9,nf.bind(null,n,r,i,t),void 0,null),ae===null)throw Error(C(349));an&30||tf(n,t,i)}return i}function tf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=K.updateQueue,t===null?(t={lastEffect:null,stores:null},K.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function nf(e,t,n,r){t.value=n,t.getSnapshot=r,of(t)&&sf(e)}function rf(e,t,n){return n(function(){of(t)&&sf(e)})}function of(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rt(e,n)}catch{return!0}}function sf(e){var t=_t(e,1);t!==null&&nt(t,e,1,-1)}function Mu(e){var t=st();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:e},t.queue=e,e=e.dispatch=Lm.bind(null,K,e),[t.memoizedState,e]}function Qr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=K.updateQueue,t===null?(t={lastEffect:null,stores:null},K.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function lf(){return Ke().memoizedState}function Ri(e,t,n,r){var i=st();K.flags|=e,i.memoizedState=Qr(1|t,n,void 0,r===void 0?null:r)}function Mo(e,t,n,r){var i=Ke();r=r===void 0?null:r;var o=void 0;if(ie!==null){var s=ie.memoizedState;if(o=s.destroy,r!==null&&fa(r,s.deps)){i.memoizedState=Qr(t,n,o,r);return}}K.flags|=e,i.memoizedState=Qr(1|t,n,o,r)}function Pu(e,t){return Ri(8390656,8,e,t)}function ga(e,t){return Mo(2048,8,e,t)}function af(e,t){return Mo(4,2,e,t)}function uf(e,t){return Mo(4,4,e,t)}function cf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function df(e,t,n){return n=n!=null?n.concat([e]):null,Mo(4,4,cf.bind(null,t,e),n)}function ma(){}function ff(e,t){var n=Ke();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&fa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hf(e,t){var n=Ke();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&fa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function pf(e,t,n){return an&21?(rt(n,t)||(n=md(),K.lanes|=n,un|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Le=!0),e.memoizedState=n)}function bm(e,t){var n=z;z=n!==0&&4>n?n:4,e(!0);var r=fs.transition;fs.transition={};try{e(!1),t()}finally{z=n,fs.transition=r}}function gf(){return Ke().memoizedState}function Am(e,t,n){var r=zt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},mf(e))vf(t,n);else if(n=Wd(e,t,n,r),n!==null){var i=Se();nt(n,e,r,i),yf(n,t,r)}}function Lm(e,t,n){var r=zt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(mf(e))vf(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,rt(l,s)){var a=t.interleaved;a===null?(i.next=i,la(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Wd(e,t,i,r),n!==null&&(i=Se(),nt(n,e,r,i),yf(n,t,r))}}function mf(e){var t=e.alternate;return e===K||t!==null&&t===K}function vf(e,t){br=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ql(e,n)}}var fo={readContext:Qe,useCallback:he,useContext:he,useEffect:he,useImperativeHandle:he,useInsertionEffect:he,useLayoutEffect:he,useMemo:he,useReducer:he,useRef:he,useState:he,useDebugValue:he,useDeferredValue:he,useTransition:he,useMutableSource:he,useSyncExternalStore:he,useId:he,unstable_isNewReconciler:!1},Im={readContext:Qe,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:Qe,useEffect:Pu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ri(4194308,4,cf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ri(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ri(4,2,e,t)},useMemo:function(e,t){var n=st();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=st();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Am.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:Mu,useDebugValue:ma,useDeferredValue:function(e){return st().memoizedState=e},useTransition:function(){var e=Mu(!1),t=e[0];return e=bm.bind(null,e[1]),st().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,i=st();if(q){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),ae===null)throw Error(C(349));an&30||tf(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Pu(rf.bind(null,r,o,e),[e]),r.flags|=2048,Qr(9,nf.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=st(),t=ae.identifierPrefix;if(q){var n=vt,r=mt;n=(r&~(1<<32-tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=qr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Nm++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Mm={readContext:Qe,useCallback:ff,useContext:Qe,useEffect:ga,useImperativeHandle:df,useInsertionEffect:af,useLayoutEffect:uf,useMemo:hf,useReducer:hs,useRef:lf,useState:function(){return hs(Wr)},useDebugValue:ma,useDeferredValue:function(e){var t=Ke();return pf(t,ie.memoizedState,e)},useTransition:function(){var e=hs(Wr)[0],t=Ke().memoizedState;return[e,t]},useMutableSource:Zd,useSyncExternalStore:ef,useId:gf,unstable_isNewReconciler:!1},Pm={readContext:Qe,useCallback:ff,useContext:Qe,useEffect:ga,useImperativeHandle:df,useInsertionEffect:af,useLayoutEffect:uf,useMemo:hf,useReducer:ps,useRef:lf,useState:function(){return ps(Wr)},useDebugValue:ma,useDeferredValue:function(e){var t=Ke();return ie===null?t.memoizedState=e:pf(t,ie.memoizedState,e)},useTransition:function(){var e=ps(Wr)[0],t=Ke().memoizedState;return[e,t]},useMutableSource:Zd,useSyncExternalStore:ef,useId:gf,unstable_isNewReconciler:!1};function qn(e,t){try{var n="",r=t;do n+=lg(r),r=r.return;while(r);var i=n}catch(o){i=`
40
40
  Error generating stack: `+o.message+`
41
41
  `+o.stack}return{value:e,source:t,stack:i,digest:null}}function gs(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function dl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Rm=typeof WeakMap=="function"?WeakMap:Map;function wf(e,t,n){n=yt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){po||(po=!0,_l=r),dl(e,t)},n}function xf(e,t,n){n=yt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){dl(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){dl(e,t),typeof r!="function"&&(Dt===null?Dt=new Set([this]):Dt.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Ru(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rm;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Km.bind(null,e,t,n),t.then(e,e))}function $u(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ou(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yt(-1,1),t.tag=2,jt(n,t,1))),n.lanes|=1),e)}var $m=Et.ReactCurrentOwner,Le=!1;function we(e,t,n,r){t.child=e===null?Yd(t,null,n,r):Vn(t,e.child,n,r)}function ju(e,t,n,r,i){n=n.render;var o=t.ref;return jn(t,i),r=ha(e,t,n,r,o,i),n=pa(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,St(e,t,i)):(q&&n&&ta(t),t.flags|=1,we(e,t,r,i),t.child)}function Du(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Ta(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,_f(e,t,o,r,i)):(e=Di(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:zr,n(s,r)&&e.ref===t.ref)return St(e,t,i)}return t.flags|=1,e=Ft(o,r),e.ref=t.ref,e.return=t,t.child=e}function _f(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(zr(o,r)&&e.ref===t.ref)if(Le=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Le=!0);else return t.lanes=e.lanes,St(e,t,i)}return fl(e,t,n,r,i)}function Sf(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},F(In,Re),Re|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,F(In,Re),Re|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,F(In,Re),Re|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,F(In,Re),Re|=r;return we(e,t,i,n),t.child}function Ef(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function fl(e,t,n,r,i){var o=Me(n)?sn:ye.current;return o=Hn(t,o),jn(t,i),n=ha(e,t,n,r,o,i),r=pa(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,St(e,t,i)):(q&&r&&ta(t),t.flags|=1,we(e,t,n,i),t.child)}function zu(e,t,n,r,i){if(Me(n)){var o=!0;ro(t)}else o=!1;if(jn(t,i),t.stateNode===null)$i(e,t),Gd(t,n,r),cl(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Qe(u):(u=Me(n)?sn:ye.current,u=Hn(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Lu(t,s,r,u),Ct=!1;var d=t.memoizedState;s.state=d,ao(t,r,s,i),a=t.memoizedState,l!==r||d!==a||Ie.current||Ct?(typeof c=="function"&&(ul(t,n,c,r),a=t.memoizedState),(l=Ct||Au(t,n,l,r,d,a,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Qd(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Xe(t.type,l),s.props=u,f=t.pendingProps,d=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=Qe(a):(a=Me(n)?sn:ye.current,a=Hn(t,a));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==f||d!==a)&&Lu(t,s,r,a),Ct=!1,d=t.memoizedState,s.state=d,ao(t,r,s,i);var y=t.memoizedState;l!==f||d!==y||Ie.current||Ct?(typeof g=="function"&&(ul(t,n,g,r),y=t.memoizedState),(u=Ct||Au(t,n,u,r,d,y,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return hl(e,t,n,r,o,i)}function hl(e,t,n,r,i,o){Ef(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&Tu(t,n,!1),St(e,t,o);r=t.stateNode,$m.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Vn(t,e.child,null,o),t.child=Vn(t,null,l,o)):we(e,t,l,o),t.memoizedState=r.state,i&&Tu(t,n,!0),t.child}function Tf(e){var t=e.stateNode;t.pendingContext?Eu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Eu(e,t.context,!1),ua(e,t.containerInfo)}function Fu(e,t,n,r,i){return Un(),ra(i),t.flags|=256,we(e,t,n,r),t.child}var pl={dehydrated:null,treeContext:null,retryLane:0};function gl(e){return{baseLanes:e,cachePool:null,transitions:null}}function kf(e,t,n){var r=t.pendingProps,i=Q.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),F(Q,i&1),e===null)return ll(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=$o(s,r,0,null),e=rn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=gl(n),t.memoizedState=pl,e):va(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Om(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Ft(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=Ft(l,o):(o=rn(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?gl(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=pl,r}return o=e.child,e=o.sibling,r=Ft(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function va(e,t){return t=$o({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function vi(e,t,n,r){return r!==null&&ra(r),Vn(t,e.child,null,n),e=va(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Om(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=gs(Error(C(422))),vi(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=$o({mode:"visible",children:r.children},i,0,null),o=rn(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Vn(t,e.child,null,s),t.child.memoizedState=gl(s),t.memoizedState=pl,o);if(!(t.mode&1))return vi(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(C(419)),r=gs(o,r,void 0),vi(e,t,s,r)}if(l=(s&e.childLanes)!==0,Le||l){if(r=ae,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,_t(e,i),nt(r,e,i,-1))}return Ea(),r=gs(Error(C(421))),vi(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Gm.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,$e=Ot(i.nextSibling),Oe=t,q=!0,Je=null,e!==null&&(He[Ue++]=mt,He[Ue++]=vt,He[Ue++]=ln,mt=e.id,vt=e.overflow,ln=t),t=va(t,r.children),t.flags|=4096,t)}function Hu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),al(e.return,t,n)}function ms(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Cf(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(we(e,t,r.children,n),r=Q.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hu(e,n,t);else if(e.tag===19)Hu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(F(Q,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&uo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ms(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ms(t,!0,n,null,o);break;case"together":ms(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $i(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function St(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),un|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(C(153));if(t.child!==null){for(e=t.child,n=Ft(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ft(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jm(e,t,n){switch(t.tag){case 3:Tf(t),Un();break;case 5:Jd(t);break;case 1:Me(t.type)&&ro(t);break;case 4:ua(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;F(so,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(F(Q,Q.current&1),t.flags|=128,null):n&t.child.childLanes?kf(e,t,n):(F(Q,Q.current&1),e=St(e,t,n),e!==null?e.sibling:null);F(Q,Q.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Cf(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),F(Q,Q.current),r)break;return null;case 22:case 23:return t.lanes=0,Sf(e,t,n)}return St(e,t,n)}var Nf,ml,bf,Af;Nf=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ml=function(){};bf=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,en(dt.current);var o=null;switch(n){case"input":i=Ds(e,i),r=Ds(e,r),o=[];break;case"select":i=G({},i,{value:void 0}),r=G({},r,{value:void 0}),o=[];break;case"textarea":i=Hs(e,i),r=Hs(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=to)}Vs(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Mr.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Mr.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&U("scroll",e),o||l===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Af=function(e,t,n,r){n!==r&&(t.flags|=4)};function ar(e,t){if(!q)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Dm(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pe(t),null;case 1:return Me(t.type)&&no(),pe(t),null;case 3:return r=t.stateNode,Bn(),V(Ie),V(ye),da(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(gi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Je!==null&&(Tl(Je),Je=null))),ml(e,t),pe(t),null;case 5:ca(t);var i=en(Br.current);if(n=t.type,e!==null&&t.stateNode!=null)bf(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(C(166));return pe(t),null}if(e=en(dt.current),gi(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ut]=t,r[Ur]=o,e=(t.mode&1)!==0,n){case"dialog":U("cancel",r),U("close",r);break;case"iframe":case"object":case"embed":U("load",r);break;case"video":case"audio":for(i=0;i<yr.length;i++)U(yr[i],r);break;case"source":U("error",r);break;case"img":case"image":case"link":U("error",r),U("load",r);break;case"details":U("toggle",r);break;case"input":Xa(r,o),U("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},U("invalid",r);break;case"textarea":Ja(r,o),U("invalid",r)}Vs(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&pi(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&pi(r.textContent,l,e),i=["children",""+l]):Mr.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&U("scroll",r)}switch(n){case"input":si(r),Ya(r,o,!0);break;case"textarea":si(r),Za(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=to)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=td(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ut]=t,e[Ur]=r,Nf(e,t,!1,!1),t.stateNode=e;e:{switch(s=Bs(n,r),n){case"dialog":U("cancel",e),U("close",e),i=r;break;case"iframe":case"object":case"embed":U("load",e),i=r;break;case"video":case"audio":for(i=0;i<yr.length;i++)U(yr[i],e);i=r;break;case"source":U("error",e),i=r;break;case"img":case"image":case"link":U("error",e),U("load",e),i=r;break;case"details":U("toggle",e),i=r;break;case"input":Xa(e,r),i=Ds(e,r),U("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=G({},r,{value:void 0}),U("invalid",e);break;case"textarea":Ja(e,r),i=Hs(e,r),U("invalid",e);break;default:i=r}Vs(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?id(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&nd(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Pr(e,a):typeof a=="number"&&Pr(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Mr.hasOwnProperty(o)?a!=null&&o==="onScroll"&&U("scroll",e):a!=null&&Hl(e,o,a,s))}switch(n){case"input":si(e),Ya(e,r,!1);break;case"textarea":si(e),Za(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ht(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Pn(e,!!r.multiple,o,!1):r.defaultValue!=null&&Pn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=to)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return pe(t),null;case 6:if(e&&t.stateNode!=null)Af(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(C(166));if(n=en(Br.current),en(dt.current),gi(t)){if(r=t.stateNode,n=t.memoizedProps,r[ut]=t,(o=r.nodeValue!==n)&&(e=Oe,e!==null))switch(e.tag){case 3:pi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&pi(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ut]=t,t.stateNode=r}return pe(t),null;case 13:if(V(Q),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(q&&$e!==null&&t.mode&1&&!(t.flags&128))qd(),Un(),t.flags|=98560,o=!1;else if(o=gi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(C(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(C(317));o[ut]=t}else Un(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pe(t),o=!1}else Je!==null&&(Tl(Je),Je=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Q.current&1?oe===0&&(oe=3):Ea())),t.updateQueue!==null&&(t.flags|=4),pe(t),null);case 4:return Bn(),ml(e,t),e===null&&Fr(t.stateNode.containerInfo),pe(t),null;case 10:return sa(t.type._context),pe(t),null;case 17:return Me(t.type)&&no(),pe(t),null;case 19:if(V(Q),o=t.memoizedState,o===null)return pe(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)ar(o,!1);else{if(oe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=uo(e),s!==null){for(t.flags|=128,ar(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return F(Q,Q.current&1|2),t.child}e=e.sibling}o.tail!==null&&Z()>Wn&&(t.flags|=128,r=!0,ar(o,!1),t.lanes=4194304)}else{if(!r)if(e=uo(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ar(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!q)return pe(t),null}else 2*Z()-o.renderingStartTime>Wn&&n!==1073741824&&(t.flags|=128,r=!0,ar(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Z(),t.sibling=null,n=Q.current,F(Q,r?n&1|2:n&1),t):(pe(t),null);case 22:case 23:return Sa(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Re&1073741824&&(pe(t),t.subtreeFlags&6&&(t.flags|=8192)):pe(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function zm(e,t){switch(na(t),t.tag){case 1:return Me(t.type)&&no(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bn(),V(Ie),V(ye),da(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ca(t),null;case 13:if(V(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));Un()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Q),null;case 4:return Bn(),null;case 10:return sa(t.type._context),null;case 22:case 23:return Sa(),null;case 24:return null;default:return null}}var yi=!1,me=!1,Fm=typeof WeakSet=="function"?WeakSet:Set,A=null;function Ln(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){X(e,t,r)}else n.current=null}function vl(e,t,n){try{n()}catch(r){X(e,t,r)}}var Uu=!1;function Hm(e,t){if(el=Ji,e=Md(),ea(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(l=s+i),f!==o||r!==0&&f.nodeType!==3||(a=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(g=f.firstChild)!==null;)d=f,f=g;for(;;){if(f===e)break t;if(d===n&&++u===i&&(l=s),d===o&&++c===r&&(a=s),(g=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=g}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(tl={focusedElem:e,selectionRange:n},Ji=!1,A=t;A!==null;)if(t=A,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,A=e;else for(;A!==null;){t=A;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,w=y.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:Xe(t.type,v),w);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var m=t.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(C(163))}}catch(_){X(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,A=e;break}A=t.return}return y=Uu,Uu=!1,y}function Ar(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&vl(t,n,o)}i=i.next}while(i!==r)}}function Po(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function yl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Lf(e){var t=e.alternate;t!==null&&(e.alternate=null,Lf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ut],delete t[Ur],delete t[il],delete t[Em],delete t[Tm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function If(e){return e.tag===5||e.tag===3||e.tag===4}function Vu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||If(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=to));else if(r!==4&&(e=e.child,e!==null))for(wl(e,t,n),e=e.sibling;e!==null;)wl(e,t,n),e=e.sibling}function xl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(xl(e,t,n),e=e.sibling;e!==null;)xl(e,t,n),e=e.sibling}var ue=null,Ye=!1;function Tt(e,t,n){for(n=n.child;n!==null;)Mf(e,t,n),n=n.sibling}function Mf(e,t,n){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(ko,n)}catch{}switch(n.tag){case 5:me||Ln(n,t);case 6:var r=ue,i=Ye;ue=null,Tt(e,t,n),ue=r,Ye=i,ue!==null&&(Ye?(e=ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ue.removeChild(n.stateNode));break;case 18:ue!==null&&(Ye?(e=ue,n=n.stateNode,e.nodeType===8?us(e.parentNode,n):e.nodeType===1&&us(e,n),jr(e)):us(ue,n.stateNode));break;case 4:r=ue,i=Ye,ue=n.stateNode.containerInfo,Ye=!0,Tt(e,t,n),ue=r,Ye=i;break;case 0:case 11:case 14:case 15:if(!me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&vl(n,t,s),i=i.next}while(i!==r)}Tt(e,t,n);break;case 1:if(!me&&(Ln(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){X(n,t,l)}Tt(e,t,n);break;case 21:Tt(e,t,n);break;case 22:n.mode&1?(me=(r=me)||n.memoizedState!==null,Tt(e,t,n),me=r):Tt(e,t,n);break;default:Tt(e,t,n)}}function Bu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Fm),t.forEach(function(r){var i=Xm.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ge(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:ue=l.stateNode,Ye=!1;break e;case 3:ue=l.stateNode.containerInfo,Ye=!0;break e;case 4:ue=l.stateNode.containerInfo,Ye=!0;break e}l=l.return}if(ue===null)throw Error(C(160));Mf(o,s,i),ue=null,Ye=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){X(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Pf(t,e),t=t.sibling}function Pf(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ge(t,e),ot(e),r&4){try{Ar(3,e,e.return),Po(3,e)}catch(v){X(e,e.return,v)}try{Ar(5,e,e.return)}catch(v){X(e,e.return,v)}}break;case 1:Ge(t,e),ot(e),r&512&&n!==null&&Ln(n,n.return);break;case 5:if(Ge(t,e),ot(e),r&512&&n!==null&&Ln(n,n.return),e.flags&32){var i=e.stateNode;try{Pr(i,"")}catch(v){X(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Zc(i,o),Bs(l,s);var u=Bs(l,o);for(s=0;s<a.length;s+=2){var c=a[s],f=a[s+1];c==="style"?id(i,f):c==="dangerouslySetInnerHTML"?nd(i,f):c==="children"?Pr(i,f):Hl(i,c,f,u)}switch(l){case"input":zs(i,o);break;case"textarea":ed(i,o);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var g=o.value;g!=null?Pn(i,!!o.multiple,g,!1):d!==!!o.multiple&&(o.defaultValue!=null?Pn(i,!!o.multiple,o.defaultValue,!0):Pn(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ur]=o}catch(v){X(e,e.return,v)}}break;case 6:if(Ge(t,e),ot(e),r&4){if(e.stateNode===null)throw Error(C(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(v){X(e,e.return,v)}}break;case 3:if(Ge(t,e),ot(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{jr(t.containerInfo)}catch(v){X(e,e.return,v)}break;case 4:Ge(t,e),ot(e);break;case 13:Ge(t,e),ot(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(xa=Z())),r&4&&Bu(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(me=(u=me)||c,Ge(t,e),me=u):Ge(t,e),ot(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(A=e,c=e.child;c!==null;){for(f=A=c;A!==null;){switch(d=A,g=d.child,d.tag){case 0:case 11:case 14:case 15:Ar(4,d,d.return);break;case 1:Ln(d,d.return);var y=d.stateNode;if(typeof y.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(v){X(r,n,v)}}break;case 5:Ln(d,d.return);break;case 22:if(d.memoizedState!==null){Wu(f);continue}}g!==null?(g.return=d,A=g):Wu(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=f.stateNode,a=f.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=rd("display",s))}catch(v){X(e,e.return,v)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(v){X(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ge(t,e),ot(e),r&4&&Bu(e);break;case 21:break;default:Ge(t,e),ot(e)}}function ot(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(If(n)){var r=n;break e}n=n.return}throw Error(C(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Pr(i,""),r.flags&=-33);var o=Vu(e);xl(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=Vu(e);wl(e,l,s);break;default:throw Error(C(161))}}catch(a){X(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Um(e,t,n){A=e,Rf(e)}function Rf(e,t,n){for(var r=(e.mode&1)!==0;A!==null;){var i=A,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||yi;if(!s){var l=i.alternate,a=l!==null&&l.memoizedState!==null||me;l=yi;var u=me;if(yi=s,(me=a)&&!u)for(A=i;A!==null;)s=A,a=s.child,s.tag===22&&s.memoizedState!==null?Qu(i):a!==null?(a.return=s,A=a):Qu(i);for(;o!==null;)A=o,Rf(o),o=o.sibling;A=i,yi=l,me=u}qu(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,A=o):qu(e)}}function qu(e){for(;A!==null;){var t=A;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:me||Po(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!me)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Xe(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&bu(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}bu(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&jr(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(C(163))}me||t.flags&512&&yl(t)}catch(d){X(t,t.return,d)}}if(t===e){A=null;break}if(n=t.sibling,n!==null){n.return=t.return,A=n;break}A=t.return}}function Wu(e){for(;A!==null;){var t=A;if(t===e){A=null;break}var n=t.sibling;if(n!==null){n.return=t.return,A=n;break}A=t.return}}function Qu(e){for(;A!==null;){var t=A;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Po(4,t)}catch(a){X(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){X(t,i,a)}}var o=t.return;try{yl(t)}catch(a){X(t,o,a)}break;case 5:var s=t.return;try{yl(t)}catch(a){X(t,s,a)}}}catch(a){X(t,t.return,a)}if(t===e){A=null;break}var l=t.sibling;if(l!==null){l.return=t.return,A=l;break}A=t.return}}var Vm=Math.ceil,ho=Et.ReactCurrentDispatcher,ya=Et.ReactCurrentOwner,We=Et.ReactCurrentBatchConfig,j=0,ae=null,ne=null,de=0,Re=0,In=Bt(0),oe=0,Kr=null,un=0,Ro=0,wa=0,Lr=null,Ne=null,xa=0,Wn=1/0,pt=null,po=!1,_l=null,Dt=null,wi=!1,Mt=null,go=0,Ir=0,Sl=null,Oi=-1,ji=0;function Se(){return j&6?Z():Oi!==-1?Oi:Oi=Z()}function zt(e){return e.mode&1?j&2&&de!==0?de&-de:Cm.transition!==null?(ji===0&&(ji=md()),ji):(e=z,e!==0||(e=window.event,e=e===void 0?16:Ed(e.type)),e):1}function nt(e,t,n,r){if(50<Ir)throw Ir=0,Sl=null,Error(C(185));Xr(e,n,r),(!(j&2)||e!==ae)&&(e===ae&&(!(j&2)&&(Ro|=n),oe===4&&Lt(e,de)),Pe(e,r),n===1&&j===0&&!(t.mode&1)&&(Wn=Z()+500,Lo&&qt()))}function Pe(e,t){var n=e.callbackNode;Cg(e,t);var r=Yi(e,e===ae?de:0);if(r===0)n!==null&&nu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&nu(n),t===1)e.tag===0?km(Ku.bind(null,e)):Ud(Ku.bind(null,e)),_m(function(){!(j&6)&&qt()}),n=null;else{switch(vd(r)){case 1:n=Wl;break;case 4:n=pd;break;case 16:n=Xi;break;case 536870912:n=gd;break;default:n=Xi}n=Uf(n,$f.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function $f(e,t){if(Oi=-1,ji=0,j&6)throw Error(C(327));var n=e.callbackNode;if(Dn()&&e.callbackNode!==n)return null;var r=Yi(e,e===ae?de:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=mo(e,r);else{t=r;var i=j;j|=2;var o=jf();(ae!==e||de!==t)&&(pt=null,Wn=Z()+500,nn(e,t));do try{Wm();break}catch(l){Of(e,l)}while(!0);oa(),ho.current=o,j=i,ne!==null?t=0:(ae=null,de=0,t=oe)}if(t!==0){if(t===2&&(i=Gs(e),i!==0&&(r=i,t=El(e,i))),t===1)throw n=Kr,nn(e,0),Lt(e,r),Pe(e,Z()),n;if(t===6)Lt(e,r);else{if(i=e.current.alternate,!(r&30)&&!Bm(i)&&(t=mo(e,r),t===2&&(o=Gs(e),o!==0&&(r=o,t=El(e,o))),t===1))throw n=Kr,nn(e,0),Lt(e,r),Pe(e,Z()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(C(345));case 2:Gt(e,Ne,pt);break;case 3:if(Lt(e,r),(r&130023424)===r&&(t=xa+500-Z(),10<t)){if(Yi(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Se(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=rl(Gt.bind(null,e,Ne,pt),t);break}Gt(e,Ne,pt);break;case 4:if(Lt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-tt(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=Z()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Vm(r/1960))-r,10<r){e.timeoutHandle=rl(Gt.bind(null,e,Ne,pt),r);break}Gt(e,Ne,pt);break;case 5:Gt(e,Ne,pt);break;default:throw Error(C(329))}}}return Pe(e,Z()),e.callbackNode===n?$f.bind(null,e):null}function El(e,t){var n=Lr;return e.current.memoizedState.isDehydrated&&(nn(e,t).flags|=256),e=mo(e,t),e!==2&&(t=Ne,Ne=n,t!==null&&Tl(t)),e}function Tl(e){Ne===null?Ne=e:Ne.push.apply(Ne,e)}function Bm(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!rt(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Lt(e,t){for(t&=~wa,t&=~Ro,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-tt(t),r=1<<n;e[n]=-1,t&=~r}}function Ku(e){if(j&6)throw Error(C(327));Dn();var t=Yi(e,0);if(!(t&1))return Pe(e,Z()),null;var n=mo(e,t);if(e.tag!==0&&n===2){var r=Gs(e);r!==0&&(t=r,n=El(e,r))}if(n===1)throw n=Kr,nn(e,0),Lt(e,t),Pe(e,Z()),n;if(n===6)throw Error(C(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Gt(e,Ne,pt),Pe(e,Z()),null}function _a(e,t){var n=j;j|=1;try{return e(t)}finally{j=n,j===0&&(Wn=Z()+500,Lo&&qt())}}function cn(e){Mt!==null&&Mt.tag===0&&!(j&6)&&Dn();var t=j;j|=1;var n=We.transition,r=z;try{if(We.transition=null,z=1,e)return e()}finally{z=r,We.transition=n,j=t,!(j&6)&&qt()}}function Sa(){Re=In.current,V(In)}function nn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,xm(n)),ne!==null)for(n=ne.return;n!==null;){var r=n;switch(na(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&no();break;case 3:Bn(),V(Ie),V(ye),da();break;case 5:ca(r);break;case 4:Bn();break;case 13:V(Q);break;case 19:V(Q);break;case 10:sa(r.type._context);break;case 22:case 23:Sa()}n=n.return}if(ae=e,ne=e=Ft(e.current,null),de=Re=t,oe=0,Kr=null,wa=Ro=un=0,Ne=Lr=null,Zt!==null){for(t=0;t<Zt.length;t++)if(n=Zt[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}Zt=null}return e}function Of(e,t){do{var n=ne;try{if(oa(),Pi.current=fo,co){for(var r=K.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}co=!1}if(an=0,le=ie=K=null,br=!1,qr=0,ya.current=null,n===null||n.return===null){oe=1,Kr=t,ne=null;break}e:{var o=e,s=n.return,l=n,a=t;if(t=de,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var g=$u(s);if(g!==null){g.flags&=-257,Ou(g,s,l,o,t),g.mode&1&&Ru(o,u,t),t=g,a=u;var y=t.updateQueue;if(y===null){var v=new Set;v.add(a),t.updateQueue=v}else y.add(a);break e}else{if(!(t&1)){Ru(o,u,t),Ea();break e}a=Error(C(426))}}else if(q&&l.mode&1){var w=$u(s);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Ou(w,s,l,o,t),ra(qn(a,l));break e}}o=a=qn(a,l),oe!==4&&(oe=2),Lr===null?Lr=[o]:Lr.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=wf(o,a,t);Nu(o,p);break e;case 1:l=a;var h=o.type,m=o.stateNode;if(!(o.flags&128)&&(typeof h.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Dt===null||!Dt.has(m)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=xf(o,l,t);Nu(o,_);break e}}o=o.return}while(o!==null)}zf(n)}catch(T){t=T,ne===n&&n!==null&&(ne=n=n.return);continue}break}while(!0)}function jf(){var e=ho.current;return ho.current=fo,e===null?fo:e}function Ea(){(oe===0||oe===3||oe===2)&&(oe=4),ae===null||!(un&268435455)&&!(Ro&268435455)||Lt(ae,de)}function mo(e,t){var n=j;j|=2;var r=jf();(ae!==e||de!==t)&&(pt=null,nn(e,t));do try{qm();break}catch(i){Of(e,i)}while(!0);if(oa(),j=n,ho.current=r,ne!==null)throw Error(C(261));return ae=null,de=0,oe}function qm(){for(;ne!==null;)Df(ne)}function Wm(){for(;ne!==null&&!vg();)Df(ne)}function Df(e){var t=Hf(e.alternate,e,Re);e.memoizedProps=e.pendingProps,t===null?zf(e):ne=t,ya.current=null}function zf(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=zm(n,t),n!==null){n.flags&=32767,ne=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{oe=6,ne=null;return}}else if(n=Dm(n,t,Re),n!==null){ne=n;return}if(t=t.sibling,t!==null){ne=t;return}ne=t=e}while(t!==null);oe===0&&(oe=5)}function Gt(e,t,n){var r=z,i=We.transition;try{We.transition=null,z=1,Qm(e,t,n,r)}finally{We.transition=i,z=r}return null}function Qm(e,t,n,r){do Dn();while(Mt!==null);if(j&6)throw Error(C(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(C(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Ng(e,o),e===ae&&(ne=ae=null,de=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||wi||(wi=!0,Uf(Xi,function(){return Dn(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=We.transition,We.transition=null;var s=z;z=1;var l=j;j|=4,ya.current=null,Hm(e,n),Pf(n,e),hm(tl),Ji=!!el,tl=el=null,e.current=n,Um(n),yg(),j=l,z=s,We.transition=o}else e.current=n;if(wi&&(wi=!1,Mt=e,go=i),o=e.pendingLanes,o===0&&(Dt=null),_g(n.stateNode),Pe(e,Z()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(po)throw po=!1,e=_l,_l=null,e;return go&1&&e.tag!==0&&Dn(),o=e.pendingLanes,o&1?e===Sl?Ir++:(Ir=0,Sl=e):Ir=0,qt(),null}function Dn(){if(Mt!==null){var e=vd(go),t=We.transition,n=z;try{if(We.transition=null,z=16>e?16:e,Mt===null)var r=!1;else{if(e=Mt,Mt=null,go=0,j&6)throw Error(C(331));var i=j;for(j|=4,A=e.current;A!==null;){var o=A,s=o.child;if(A.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(A=u;A!==null;){var c=A;switch(c.tag){case 0:case 11:case 15:Ar(8,c,o)}var f=c.child;if(f!==null)f.return=c,A=f;else for(;A!==null;){c=A;var d=c.sibling,g=c.return;if(Lf(c),c===u){A=null;break}if(d!==null){d.return=g,A=d;break}A=g}}}var y=o.alternate;if(y!==null){var v=y.child;if(v!==null){y.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}A=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,A=s;else e:for(;A!==null;){if(o=A,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ar(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,A=p;break e}A=o.return}}var h=e.current;for(A=h;A!==null;){s=A;var m=s.child;if(s.subtreeFlags&2064&&m!==null)m.return=s,A=m;else e:for(s=h;A!==null;){if(l=A,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Po(9,l)}}catch(T){X(l,l.return,T)}if(l===s){A=null;break e}var _=l.sibling;if(_!==null){_.return=l.return,A=_;break e}A=l.return}}if(j=i,qt(),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(ko,e)}catch{}r=!0}return r}finally{z=n,We.transition=t}}return!1}function Gu(e,t,n){t=qn(n,t),t=wf(e,t,1),e=jt(e,t,1),t=Se(),e!==null&&(Xr(e,1,t),Pe(e,t))}function X(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Dt===null||!Dt.has(r))){e=qn(n,e),e=xf(t,e,1),t=jt(t,e,1),e=Se(),t!==null&&(Xr(t,1,e),Pe(t,e));break}}t=t.return}}function Km(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Se(),e.pingedLanes|=e.suspendedLanes&n,ae===e&&(de&n)===n&&(oe===4||oe===3&&(de&130023424)===de&&500>Z()-xa?nn(e,0):wa|=n),Pe(e,t)}function Ff(e,t){t===0&&(e.mode&1?(t=ui,ui<<=1,!(ui&130023424)&&(ui=4194304)):t=1);var n=Se();e=_t(e,t),e!==null&&(Xr(e,t,n),Pe(e,n))}function Gm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ff(e,n)}function Xm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(C(314))}r!==null&&r.delete(t),Ff(e,n)}var Hf;Hf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ie.current)Le=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Le=!1,jm(e,t,n);Le=!!(e.flags&131072)}else Le=!1,q&&t.flags&1048576&&Vd(t,oo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$i(e,t),e=t.pendingProps;var i=Hn(t,ye.current);jn(t,n),i=ha(null,t,r,e,i,n);var o=pa();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Me(r)?(o=!0,ro(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,aa(t),i.updater=Io,t.stateNode=i,i._reactInternals=t,cl(t,r,e,n),t=hl(null,t,r,!0,o,n)):(t.tag=0,q&&o&&ta(t),we(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch($i(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Jm(r),e=Xe(r,e),i){case 0:t=fl(null,t,r,e,n);break e;case 1:t=zu(null,t,r,e,n);break e;case 11:t=ju(null,t,r,e,n);break e;case 14:t=Du(null,t,r,Xe(r.type,e),n);break e}throw Error(C(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xe(r,i),fl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xe(r,i),zu(e,t,r,i,n);case 3:e:{if(Tf(t),e===null)throw Error(C(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Qd(e,t),ao(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=qn(Error(C(423)),t),t=Fu(e,t,r,n,i);break e}else if(r!==i){i=qn(Error(C(424)),t),t=Fu(e,t,r,n,i);break e}else for($e=Ot(t.stateNode.containerInfo.firstChild),Oe=t,q=!0,Je=null,n=Yd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Un(),r===i){t=St(e,t,n);break e}we(e,t,r,n)}t=t.child}return t;case 5:return Jd(t),e===null&&ll(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,nl(r,i)?s=null:o!==null&&nl(r,o)&&(t.flags|=32),Ef(e,t),we(e,t,s,n),t.child;case 6:return e===null&&ll(t),null;case 13:return kf(e,t,n);case 4:return ua(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vn(t,null,r,n):we(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xe(r,i),ju(e,t,r,i,n);case 7:return we(e,t,t.pendingProps,n),t.child;case 8:return we(e,t,t.pendingProps.children,n),t.child;case 12:return we(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,F(so,r._currentValue),r._currentValue=s,o!==null)if(rt(o.value,s)){if(o.children===i.children&&!Ie.current){t=St(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=yt(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),al(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(C(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),al(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}we(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,jn(t,n),i=Qe(i),r=r(i),t.flags|=1,we(e,t,r,n),t.child;case 14:return r=t.type,i=Xe(r,t.pendingProps),i=Xe(r.type,i),Du(e,t,r,i,n);case 15:return _f(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xe(r,i),$i(e,t),t.tag=1,Me(r)?(e=!0,ro(t)):e=!1,jn(t,n),Gd(t,r,i),cl(t,r,i,n),hl(null,t,r,!0,e,n);case 19:return Cf(e,t,n);case 22:return Sf(e,t,n)}throw Error(C(156,t.tag))};function Uf(e,t){return hd(e,t)}function Ym(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Be(e,t,n,r){return new Ym(e,t,n,r)}function Ta(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jm(e){if(typeof e=="function")return Ta(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vl)return 11;if(e===Bl)return 14}return 2}function Ft(e,t){var n=e.alternate;return n===null?(n=Be(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Di(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Ta(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case _n:return rn(n.children,i,o,t);case Ul:s=8,i|=8;break;case Rs:return e=Be(12,n,t,i|2),e.elementType=Rs,e.lanes=o,e;case $s:return e=Be(13,n,t,i),e.elementType=$s,e.lanes=o,e;case Os:return e=Be(19,n,t,i),e.elementType=Os,e.lanes=o,e;case Xc:return $o(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Kc:s=10;break e;case Gc:s=9;break e;case Vl:s=11;break e;case Bl:s=14;break e;case kt:s=16,r=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=Be(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function rn(e,t,n,r){return e=Be(7,e,r,t),e.lanes=n,e}function $o(e,t,n,r){return e=Be(22,e,r,t),e.elementType=Xc,e.lanes=n,e.stateNode={isHidden:!1},e}function vs(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function ys(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zm(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jo(0),this.expirationTimes=Jo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ka(e,t,n,r,i,o,s,l,a){return e=new Zm(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Be(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},aa(o),e}function ev(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Vf(e){if(!e)return Ut;e=e._reactInternals;e:{if(pn(e)!==e||e.tag!==1)throw Error(C(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Me(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(C(171))}if(e.tag===1){var n=e.type;if(Me(n))return Hd(e,n,t)}return t}function Bf(e,t,n,r,i,o,s,l,a){return e=ka(n,r,!0,e,i,o,s,l,a),e.context=Vf(null),n=e.current,r=Se(),i=zt(n),o=yt(r,i),o.callback=t??null,jt(n,o,i),e.current.lanes=i,Xr(e,i,r),Pe(e,r),e}function Oo(e,t,n,r){var i=t.current,o=Se(),s=zt(i);return n=Vf(n),t.context===null?t.context=n:t.pendingContext=n,t=yt(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jt(i,t,s),e!==null&&(nt(e,i,s,o),Mi(e,i,s)),s}function vo(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Xu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ca(e,t){Xu(e,t),(e=e.alternate)&&Xu(e,t)}function tv(){return null}var qf=typeof reportError=="function"?reportError:function(e){console.error(e)};function Na(e){this._internalRoot=e}jo.prototype.render=Na.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(C(409));Oo(e,t,null,null)};jo.prototype.unmount=Na.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cn(function(){Oo(null,e,null,null)}),t[xt]=null}};function jo(e){this._internalRoot=e}jo.prototype.unstable_scheduleHydration=function(e){if(e){var t=xd();e={blockedOn:null,target:e,priority:t};for(var n=0;n<At.length&&t!==0&&t<At[n].priority;n++);At.splice(n,0,e),n===0&&Sd(e)}};function ba(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Do(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Yu(){}function nv(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=vo(s);o.call(u)}}var s=Bf(t,r,e,0,null,!1,!1,"",Yu);return e._reactRootContainer=s,e[xt]=s.current,Fr(e.nodeType===8?e.parentNode:e),cn(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=vo(a);l.call(u)}}var a=ka(e,0,!1,null,null,!1,!1,"",Yu);return e._reactRootContainer=a,e[xt]=a.current,Fr(e.nodeType===8?e.parentNode:e),cn(function(){Oo(t,a,n,r)}),a}function zo(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var a=vo(s);l.call(a)}}Oo(t,s,e,i)}else s=nv(n,t,e,i,r);return vo(s)}yd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=vr(t.pendingLanes);n!==0&&(Ql(t,n|1),Pe(t,Z()),!(j&6)&&(Wn=Z()+500,qt()))}break;case 13:cn(function(){var r=_t(e,1);if(r!==null){var i=Se();nt(r,e,1,i)}}),Ca(e,1)}};Kl=function(e){if(e.tag===13){var t=_t(e,134217728);if(t!==null){var n=Se();nt(t,e,134217728,n)}Ca(e,134217728)}};wd=function(e){if(e.tag===13){var t=zt(e),n=_t(e,t);if(n!==null){var r=Se();nt(n,e,t,r)}Ca(e,t)}};xd=function(){return z};_d=function(e,t){var n=z;try{return z=e,t()}finally{z=n}};Ws=function(e,t,n){switch(t){case"input":if(zs(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Ao(r);if(!i)throw Error(C(90));Jc(r),zs(r,i)}}}break;case"textarea":ed(e,n);break;case"select":t=n.value,t!=null&&Pn(e,!!n.multiple,t,!1)}};ld=_a;ad=cn;var rv={usingClientEntryPoint:!1,Events:[Jr,kn,Ao,od,sd,_a]},ur={findFiberByHostInstance:Jt,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},iv={bundleType:ur.bundleType,version:ur.version,rendererPackageName:ur.rendererPackageName,rendererConfig:ur.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Et.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=dd(e),e===null?null:e.stateNode},findFiberByHostInstance:ur.findFiberByHostInstance||tv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xi.isDisabled&&xi.supportsFiber)try{ko=xi.inject(iv),ct=xi}catch{}}ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rv;ze.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ba(t))throw Error(C(200));return ev(e,t,null,n)};ze.createRoot=function(e,t){if(!ba(e))throw Error(C(299));var n=!1,r="",i=qf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=ka(e,1,!1,null,null,n,!1,r,i),e[xt]=t.current,Fr(e.nodeType===8?e.parentNode:e),new Na(t)};ze.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(C(188)):(e=Object.keys(e).join(","),Error(C(268,e)));return e=dd(t),e=e===null?null:e.stateNode,e};ze.flushSync=function(e){return cn(e)};ze.hydrate=function(e,t,n){if(!Do(t))throw Error(C(200));return zo(null,e,t,!0,n)};ze.hydrateRoot=function(e,t,n){if(!ba(e))throw Error(C(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=qf;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Bf(t,null,e,1,n??null,i,!1,o,s),e[xt]=t.current,Fr(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new jo(t)};ze.render=function(e,t,n){if(!Do(t))throw Error(C(200));return zo(null,e,t,!1,n)};ze.unmountComponentAtNode=function(e){if(!Do(e))throw Error(C(40));return e._reactRootContainer?(cn(function(){zo(null,null,e,!1,function(){e._reactRootContainer=null,e[xt]=null})}),!0):!1};ze.unstable_batchedUpdates=_a;ze.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Do(n))throw Error(C(200));if(e==null||e._reactInternals===void 0)throw Error(C(38));return zo(e,t,n,!1,r)};ze.version="18.2.0-next-9e3b772b8-20220608";function Wf(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Wf)}catch(e){console.error(e)}}Wf(),Vc.exports=ze;var ov=Vc.exports,sv,Ju=ov;sv=Ju.createRoot,Ju.hydrateRoot;const dn=({children:e,title:t="",icon:n,disabled:r=!1,toggled:i=!1,onClick:o=()=>{},style:s,testId:l,className:a,ariaLabel:u})=>x.jsxs("button",{className:et(a,"toolbar-button",n,i&&"toggled"),onMouseDown:Zu,onClick:o,onDoubleClick:Zu,title:t,disabled:!!r,style:s,"data-testid":l,"aria-label":u,children:[n&&x.jsx("span",{className:`codicon codicon-${n}`,style:e?{marginRight:5}:{}}),e]}),q1=({style:e})=>x.jsx("div",{className:"toolbar-separator",style:e}),Zu=e=>{e.stopPropagation(),e.preventDefault()},wr=Symbol("context"),lv=Symbol("page"),Qf=Symbol("next"),Kf=Symbol("prev"),ec=Symbol("events");class W1{constructor(t){H(this,"startTime");H(this,"endTime");H(this,"browserName");H(this,"channel");H(this,"platform");H(this,"wallTime");H(this,"title");H(this,"options");H(this,"pages");H(this,"actions");H(this,"events");H(this,"stdio");H(this,"errors");H(this,"errorDescriptors");H(this,"hasSource");H(this,"hasStepData");H(this,"sdkLanguage");H(this,"testIdAttributeName");H(this,"sources");H(this,"resources");t.forEach(r=>av(r));const n=t.find(r=>r.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=uv(t),this.pages=[].concat(...t.map(r=>r.pages)),this.wallTime=t.map(r=>r.wallTime).reduce((r,i)=>Math.min(r||Number.MAX_VALUE,i),Number.MAX_VALUE),this.startTime=t.map(r=>r.startTime).reduce((r,i)=>Math.min(r,i),Number.MAX_VALUE),this.endTime=t.map(r=>r.endTime).reduce((r,i)=>Math.max(r,i),Number.MIN_VALUE),this.events=[].concat(...t.map(r=>r.events)),this.stdio=[].concat(...t.map(r=>r.stdio)),this.errors=[].concat(...t.map(r=>r.errors)),this.hasSource=t.some(r=>r.hasSource),this.hasStepData=t.some(r=>r.origin==="testRunner"),this.resources=[...t.map(r=>r.resources)].flat(),this.events.sort((r,i)=>r.time-i.time),this.resources.sort((r,i)=>r._monotonicTime-i._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=vv(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(t=>t.error)}_errorDescriptorsFromActions(){var n;const t=[];for(const r of this.actions||[])(n=r.error)!=null&&n.message&&t.push({action:r,stack:r.stack,message:r.error.message});return t}_errorDescriptorsFromTestRunner(){const t=[];for(const n of this.errors||[])n.message&&t.push({stack:n.stack,message:n.message});return t}}function av(e){for(const n of e.pages)n[wr]=e;for(let n=0;n<e.actions.length;++n){const r=e.actions[n];r[wr]=e,r[lv]=e.pages.find(i=>i.pageId===r.pageId)}let t;for(let n=e.actions.length-1;n>=0;n--){const r=e.actions[n];r[Qf]=t,r.apiName.includes("route.")||(t=r)}for(const n of e.events)n[wr]=e;for(const n of e.resources)n[wr]=e}function uv(e){const t=new Map;for(const i of e){const o=i.traceUrl;let s=t.get(o);s||(s=[],t.set(o,s)),s.push(i)}const n=[];let r=0;for(const[,i]of t){t.size>1&&cv(i,++r);const o=dv(i);n.push(...o)}n.sort((i,o)=>o.parentId===i.callId?-1:i.parentId===o.callId?1:i.startTime-o.startTime);for(let i=1;i<n.length;++i)n[i][Kf]=n[i-1];return n}function cv(e,t){for(const n of e)for(const r of n.actions)r.callId&&(r.callId=`${t}:${r.callId}`),r.parentId&&(r.parentId=`${t}:${r.parentId}`)}function dv(e){const t=new Map,n=e.filter(l=>l.origin==="library"),r=e.filter(l=>l.origin==="testRunner");if(!r.length||!n.length)return e.map(l=>l.actions.map(a=>({...a,context:l}))).flat();const i=n.some(l=>l.actions.some(a=>!!a.stepId));for(const l of n)for(const a of l.actions){const u=i?a.stepId:`${a.apiName}@${a.wallTime}`;t.set(u,{...a,context:l})}const o=hv(r,t,i);o&&fv(n,o);const s=new Map;for(const l of r)for(const a of l.actions){const u=i?a.callId:`${a.apiName}@${a.wallTime}`,c=t.get(u);if(c){s.set(a.callId,c.callId),a.error&&(c.error=a.error),a.attachments&&(c.attachments=a.attachments),a.parentId&&(c.parentId=s.get(a.parentId)??a.parentId),c.startTime=a.startTime,c.endTime=a.endTime;continue}a.parentId&&(a.parentId=s.get(a.parentId)??a.parentId),t.set(u,{...a,context:l})}return[...t.values()]}function fv(e,t){for(const n of e){n.startTime+=t,n.endTime+=t;for(const r of n.actions)r.startTime&&(r.startTime+=t),r.endTime&&(r.endTime+=t);for(const r of n.events)r.time+=t;for(const r of n.stdio)r.timestamp+=t;for(const r of n.pages)for(const i of r.screencastFrames)i.timestamp+=t;for(const r of n.resources)r._monotonicTime&&(r._monotonicTime+=t)}}function hv(e,t,n){for(const r of e)for(const i of r.actions){if(!i.startTime)continue;const o=n?i.callId:`${i.apiName}@${i.wallTime}`,s=t.get(o);if(s)return i.startTime-s.startTime}return 0}function Q1(e){const t=new Map;for(const r of e)t.set(r.callId,{id:r.callId,parent:void 0,children:[],action:r});const n={id:"",parent:void 0,children:[]};for(const r of t.values()){const i=r.action.parentId&&t.get(r.action.parentId)||n;i.children.push(r),r.parent=i}return{rootItem:n,itemMap:t}}function yo(e){return e[wr]}function pv(e){return e[Qf]}function gv(e){return e[Kf]}function K1(e){let t=0,n=0;for(const r of mv(e)){if(r.type==="console"){const i=r.messageType;i==="warning"?++n:i==="error"&&++t}r.type==="event"&&r.method==="pageError"&&++t}return{errors:t,warnings:n}}function mv(e){let t=e[ec];if(t)return t;const n=pv(e);return t=yo(e).events.filter(r=>r.time>=e.startTime&&(!n||r.time<n.startTime)),e[ec]=t,t}function vv(e,t){var r;const n=new Map;for(const i of e)for(const o of i.stack||[]){let s=n.get(o.file);s||(s={errors:[],content:void 0},n.set(o.file,s))}for(const i of t){const{action:o,stack:s,message:l}=i;!o||!s||(r=n.get(s[0].file))==null||r.errors.push({line:s[0].line||0,message:l})}return n}const ws=new Set(["page.route","page.routefromhar","page.unroute","page.unrouteall","browsercontext.route","browsercontext.routefromhar","browsercontext.unroute","browsercontext.unrouteall"]);{for(const e of[...ws])ws.add(e+"async");for(const e of["page.route_from_har","page.unroute_all","context.route_from_har","context.unroute_all"])ws.add(e)}const yv=50,Gf=({sidebarSize:e,sidebarHidden:t=!1,sidebarIsFirst:n=!1,orientation:r="vertical",minSidebarSize:i=yv,settingName:o,sidebar:s,main:l})=>{const a=Math.max(i,e)*window.devicePixelRatio,[u,c]=qa(o?o+"."+r+":size":void 0,a),[f,d]=qa(o?o+"."+r+":size":void 0,a),[g,y]=M.useState(null),[v,w]=To();let p;r==="vertical"?(p=f/window.devicePixelRatio,v&&v.height<p&&(p=v.height-10)):(p=u/window.devicePixelRatio,v&&v.width<p&&(p=v.width-10)),document.body.style.userSelect=g?"none":"inherit";let h={};return r==="vertical"?n?h={top:g?0:p-4,bottom:g?0:void 0,height:g?"initial":8}:h={bottom:g?0:p-4,top:g?0:void 0,height:g?"initial":8}:n?h={left:g?0:p-4,right:g?0:void 0,width:g?"initial":8}:h={right:g?0:p-4,left:g?0:void 0,width:g?"initial":8},x.jsxs("div",{className:et("split-view",r,n&&"sidebar-first"),ref:w,children:[x.jsx("div",{className:"split-view-main",children:l}),!t&&x.jsx("div",{style:{flexBasis:p},className:"split-view-sidebar",children:s}),!t&&x.jsx("div",{style:h,className:"split-view-resizer",onMouseDown:m=>y({offset:r==="vertical"?m.clientY:m.clientX,size:p}),onMouseUp:()=>y(null),onMouseMove:m=>{if(!m.buttons)y(null);else if(g){const T=(r==="vertical"?m.clientY:m.clientX)-g.offset,E=n?g.size+T:g.size-T,b=m.target.parentElement.getBoundingClientRect(),S=Math.min(Math.max(i,E),(r==="vertical"?b.height:b.width)-i);r==="vertical"?d(S*window.devicePixelRatio):c(S*window.devicePixelRatio)}}})]})};function Fo(e,t="'"){const n=JSON.stringify(e),r=n.substring(1,n.length-1).replace(/\\"/g,'"');if(t==="'")return t+r.replace(/[']/g,"\\'")+t;if(t==='"')return t+r.replace(/["]/g,'\\"')+t;if(t==="`")return t+r.replace(/[`]/g,"`")+t;throw new Error("Invalid escape char")}function wo(e){return e.charAt(0).toUpperCase()+e.substring(1)}function Xf(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function Ve(e){let t="";for(let n=0;n<e.length;n++)t+=wv(e,n);return t}function cr(e){return`"${Ve(e).replace(/\\ /g," ")}"`}function wv(e,t){const n=e.charCodeAt(t);return n===0?"�":n>=1&&n<=31||n>=48&&n<=57&&(t===0||t===1&&e.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":t===0&&n===45&&e.length===1?"\\"+e.charAt(t):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?e.charAt(t):"\\"+e.charAt(t)}let Xt;function xv(){Xt=new Map}function De(e){let t=Xt==null?void 0:Xt.get(e);return t===void 0&&(t=e.replace(/\u200b/g,"").trim().replace(/\s+/g," "),Xt==null||Xt.set(e,t)),t}function Ho(e){return e.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function Yf(e){return e.unicode||e.unicodeSets?String(e):String(e).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function qe(e,t){return typeof e!="string"?Yf(e):`${JSON.stringify(e)}${t?"s":"i"}`}function xe(e,t){return typeof e!="string"?Yf(e):`"${e.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${t?"s":"i"}`}function _v(e,t,n=""){if(e.length<=t)return e;const r=[...e];return r.length>t?r.slice(0,t-n.length).join("")+n:r.join("")}function tc(e,t){return _v(e,t,"…")}function Sv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Jf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ev(e){return e.replace(/[&<>"']/ug,t=>Jf[t])}function Tv(e){return e.replace(/[&<]/ug,t=>Jf[t])}const te=function(e,t,n){return e>=t&&e<=n};function Ce(e){return te(e,48,57)}function nc(e){return Ce(e)||te(e,65,70)||te(e,97,102)}function kv(e){return te(e,65,90)}function Cv(e){return te(e,97,122)}function Nv(e){return kv(e)||Cv(e)}function bv(e){return e>=128}function zi(e){return Nv(e)||bv(e)||e===95}function rc(e){return zi(e)||Ce(e)||e===45}function Av(e){return te(e,0,8)||e===11||te(e,14,31)||e===127}function Fi(e){return e===10}function ft(e){return Fi(e)||e===9||e===32}const Lv=1114111;class Aa extends Error{constructor(t){super(t),this.name="InvalidCharacterError"}}function Iv(e){const t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===13&&e.charCodeAt(n+1)===10&&(r=10,n++),(r===13||r===12)&&(r=10),r===0&&(r=65533),te(r,55296,56319)&&te(e.charCodeAt(n+1),56320,57343)){const i=r-55296,o=e.charCodeAt(n+1)-56320;r=Math.pow(2,16)+i*Math.pow(2,10)+o,n++}t.push(r)}return t}function re(e){if(e<=65535)return String.fromCharCode(e);e-=Math.pow(2,16);const t=Math.floor(e/Math.pow(2,10))+55296,n=e%Math.pow(2,10)+56320;return String.fromCharCode(t)+String.fromCharCode(n)}function Mv(e){const t=Iv(e);let n=-1;const r=[];let i;const o=function(N){return N>=t.length?-1:t[N]},s=function(N){if(N===void 0&&(N=1),N>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(n+N)},l=function(N){return N===void 0&&(N=1),n+=N,i=o(n),!0},a=function(){return n-=1,!0},u=function(N){return N===void 0&&(N=i),N===-1},c=function(){if(f(),l(),ft(i)){for(;ft(s());)l();return new kl}else{if(i===34)return y();if(i===35)if(rc(s())||p(s(1),s(2))){const N=new hh("");return m(s(1),s(2),s(3))&&(N.type="id"),N.value=k(),N}else return new ge(i);else return i===36?s()===61?(l(),new Ov):new ge(i):i===39?y():i===40?new ah:i===41?new uh:i===42?s()===61?(l(),new jv):new ge(i):i===43?E()?(a(),d()):new ge(i):i===44?new ih:i===45?E()?(a(),d()):s(1)===45&&s(2)===62?(l(2),new th):_()?(a(),g()):new ge(i):i===46?E()?(a(),d()):new ge(i):i===58?new nh:i===59?new rh:i===60?s(1)===33&&s(2)===45&&s(3)===45?(l(3),new eh):new ge(i):i===64?m(s(1),s(2),s(3))?new fh(k()):new ge(i):i===91?new lh:i===92?h()?(a(),g()):new ge(i):i===93?new Cl:i===94?s()===61?(l(),new $v):new ge(i):i===123?new oh:i===124?s()===61?(l(),new Rv):s()===124?(l(),new ch):new ge(i):i===125?new sh:i===126?s()===61?(l(),new Pv):new ge(i):Ce(i)?(a(),d()):zi(i)?(a(),g()):u()?new Ui:new ge(i)}},f=function(){for(;s(1)===47&&s(2)===42;)for(l(2);;)if(l(),i===42&&s()===47){l();break}else if(u())return},d=function(){const N=b();if(m(s(1),s(2),s(3))){const P=new Dv;return P.value=N.value,P.repr=N.repr,P.type=N.type,P.unit=k(),P}else if(s()===37){l();const P=new vh;return P.value=N.value,P.repr=N.repr,P}else{const P=new mh;return P.value=N.value,P.repr=N.repr,P.type=N.type,P}},g=function(){const N=k();if(N.toLowerCase()==="url"&&s()===40){for(l();ft(s(1))&&ft(s(2));)l();return s()===34||s()===39?new Vi(N):ft(s())&&(s(2)===34||s(2)===39)?new Vi(N):v()}else return s()===40?(l(),new Vi(N)):new dh(N)},y=function(N){N===void 0&&(N=i);let P="";for(;l();){if(i===N||u())return new ph(P);if(Fi(i))return a(),new Zf;i===92?u(s())||(Fi(s())?l():P+=re(w())):P+=re(i)}throw new Error("Internal error")},v=function(){const N=new gh("");for(;ft(s());)l();if(u(s()))return N;for(;l();){if(i===41||u())return N;if(ft(i)){for(;ft(s());)l();return s()===41||u(s())?(l(),N):(I(),new Hi)}else{if(i===34||i===39||i===40||Av(i))return I(),new Hi;if(i===92)if(h())N.value+=re(w());else return I(),new Hi;else N.value+=re(i)}}throw new Error("Internal error")},w=function(){if(l(),nc(i)){const N=[i];for(let Y=0;Y<5&&nc(s());Y++)l(),N.push(i);ft(s())&&l();let P=parseInt(N.map(function(Y){return String.fromCharCode(Y)}).join(""),16);return P>Lv&&(P=65533),P}else return u()?65533:i},p=function(N,P){return!(N!==92||Fi(P))},h=function(){return p(i,s())},m=function(N,P,Y){return N===45?zi(P)||P===45||p(P,Y):zi(N)?!0:N===92?p(N,P):!1},_=function(){return m(i,s(1),s(2))},T=function(N,P,Y){return N===43||N===45?!!(Ce(P)||P===46&&Ce(Y)):N===46?!!Ce(P):!!Ce(N)},E=function(){return T(i,s(1),s(2))},k=function(){let N="";for(;l();)if(rc(i))N+=re(i);else if(h())N+=re(w());else return a(),N;throw new Error("Internal parse error")},b=function(){let N="",P="integer";for((s()===43||s()===45)&&(l(),N+=re(i));Ce(s());)l(),N+=re(i);if(s(1)===46&&Ce(s(2)))for(l(),N+=re(i),l(),N+=re(i),P="number";Ce(s());)l(),N+=re(i);const Y=s(1),it=s(2),er=s(3);if((Y===69||Y===101)&&Ce(it))for(l(),N+=re(i),l(),N+=re(i),P="number";Ce(s());)l(),N+=re(i);else if((Y===69||Y===101)&&(it===43||it===45)&&Ce(er))for(l(),N+=re(i),l(),N+=re(i),l(),N+=re(i),P="number";Ce(s());)l(),N+=re(i);const tr=S(N);return{type:P,value:tr,repr:N}},S=function(N){return+N},I=function(){for(;l();){if(i===41||u())return;h()&&w()}};let D=0;for(;!u(s());)if(r.push(c()),D++,D>t.length*2)throw new Error("I'm infinite-looping!");return r}class ee{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class Zf extends ee{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Hi extends ee{constructor(){super(...arguments),this.tokenType="BADURL"}}class kl extends ee{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class eh extends ee{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class th extends ee{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class nh extends ee{constructor(){super(...arguments),this.tokenType=":"}}class rh extends ee{constructor(){super(...arguments),this.tokenType=";"}}class ih extends ee{constructor(){super(...arguments),this.tokenType=","}}class Xn extends ee{constructor(){super(...arguments),this.value="",this.mirror=""}}class oh extends Xn{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class sh extends Xn{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class lh extends Xn{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Cl extends Xn{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class ah extends Xn{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class uh extends Xn{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class Pv extends ee{constructor(){super(...arguments),this.tokenType="~="}}class Rv extends ee{constructor(){super(...arguments),this.tokenType="|="}}class $v extends ee{constructor(){super(...arguments),this.tokenType="^="}}class Ov extends ee{constructor(){super(...arguments),this.tokenType="$="}}class jv extends ee{constructor(){super(...arguments),this.tokenType="*="}}class ch extends ee{constructor(){super(...arguments),this.tokenType="||"}}class Ui extends ee{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class ge extends ee{constructor(t){super(),this.tokenType="DELIM",this.value="",this.value=re(t)}toString(){return"DELIM("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}toSource(){return this.value==="\\"?`\\
42
- `:this.value}}class Yn extends ee{constructor(){super(...arguments),this.value=""}ASCIIMatch(t){return this.value.toLowerCase()===t.toLowerCase()}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}}class dh extends Yn{constructor(t){super(),this.tokenType="IDENT",this.value=t}toString(){return"IDENT("+this.value+")"}toSource(){return ei(this.value)}}class Vi extends Yn{constructor(t){super(),this.tokenType="FUNCTION",this.value=t,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return ei(this.value)+"("}}class fh extends Yn{constructor(t){super(),this.tokenType="AT-KEYWORD",this.value=t}toString(){return"AT("+this.value+")"}toSource(){return"@"+ei(this.value)}}class hh extends Yn{constructor(t){super(),this.tokenType="HASH",this.value=t,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t}toSource(){return this.type==="id"?"#"+ei(this.value):"#"+zv(this.value)}}class ph extends Yn{constructor(t){super(),this.tokenType="STRING",this.value=t}toString(){return'"'+yh(this.value)+'"'}}class gh extends Yn{constructor(t){super(),this.tokenType="URL",this.value=t}toString(){return"URL("+this.value+")"}toSource(){return'url("'+yh(this.value)+'")'}}class mh extends ee{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const t=super.toJSON();return t.value=this.value,t.type=this.type,t.repr=this.repr,t}toSource(){return this.repr}}class vh extends ee{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.repr=this.repr,t}toSource(){return this.repr+"%"}}class Dv extends ee{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t.repr=this.repr,t.unit=this.unit,t}toSource(){const t=this.repr;let n=ei(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||te(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),t+n}}function ei(e){e=""+e;let t="";const n=e.charCodeAt(0);for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(i===0)throw new Aa("Invalid character: the input contains U+0000.");te(i,1,31)||i===127||r===0&&te(i,48,57)||r===1&&te(i,48,57)&&n===45?t+="\\"+i.toString(16)+" ":i>=128||i===45||i===95||te(i,48,57)||te(i,65,90)||te(i,97,122)?t+=e[r]:t+="\\"+e[r]}return t}function zv(e){e=""+e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r===0)throw new Aa("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||te(r,48,57)||te(r,65,90)||te(r,97,122)?t+=e[n]:t+="\\"+r.toString(16)+" "}return t}function yh(e){e=""+e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r===0)throw new Aa("Invalid character: the input contains U+0000.");te(r,1,31)||r===127?t+="\\"+r.toString(16)+" ":r===34||r===92?t+="\\"+e[n]:t+=e[n]}return t}class be extends Error{}function Fv(e,t){let n;try{n=Mv(e),n[n.length-1]instanceof Ui||n.push(new Ui)}catch(S){const I=S.message+` while parsing selector "${e}"`,D=(S.stack||"").indexOf(S.message);throw D!==-1&&(S.stack=S.stack.substring(0,D)+I+S.stack.substring(D+S.message.length)),S.message=I,S}const r=n.find(S=>S instanceof fh||S instanceof Zf||S instanceof Hi||S instanceof ch||S instanceof eh||S instanceof th||S instanceof rh||S instanceof oh||S instanceof sh||S instanceof gh||S instanceof vh);if(r)throw new be(`Unsupported token "${r.toSource()}" while parsing selector "${e}"`);let i=0;const o=new Set;function s(){return new be(`Unexpected token "${n[i].toSource()}" while parsing selector "${e}"`)}function l(){for(;n[i]instanceof kl;)i++}function a(S=i){return n[S]instanceof dh}function u(S=i){return n[S]instanceof ph}function c(S=i){return n[S]instanceof mh}function f(S=i){return n[S]instanceof ih}function d(S=i){return n[S]instanceof ah}function g(S=i){return n[S]instanceof uh}function y(S=i){return n[S]instanceof Vi}function v(S=i){return n[S]instanceof ge&&n[S].value==="*"}function w(S=i){return n[S]instanceof Ui}function p(S=i){return n[S]instanceof ge&&[">","+","~"].includes(n[S].value)}function h(S=i){return f(S)||g(S)||w(S)||p(S)||n[S]instanceof kl}function m(){const S=[_()];for(;l(),!!f();)i++,S.push(_());return S}function _(){return l(),c()||u()?n[i++].value:T()}function T(){const S={simples:[]};for(l(),p()?S.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):S.simples.push({selector:E(),combinator:""});;){if(l(),p())S.simples[S.simples.length-1].combinator=n[i++].value,l();else if(h())break;S.simples.push({combinator:"",selector:E()})}return S}function E(){let S="";const I=[];for(;!h();)if(a()||v())S+=n[i++].toSource();else if(n[i]instanceof hh)S+=n[i++].toSource();else if(n[i]instanceof ge&&n[i].value===".")if(i++,a())S+="."+n[i++].toSource();else throw s();else if(n[i]instanceof nh)if(i++,a())if(!t.has(n[i].value.toLowerCase()))S+=":"+n[i++].toSource();else{const D=n[i++].value.toLowerCase();I.push({name:D,args:[]}),o.add(D)}else if(y()){const D=n[i++].value.toLowerCase();if(t.has(D)?(I.push({name:D,args:m()}),o.add(D)):S+=`:${D}(${k()})`,l(),!g())throw s();i++}else throw s();else if(n[i]instanceof lh){for(S+="[",i++;!(n[i]instanceof Cl)&&!w();)S+=n[i++].toSource();if(!(n[i]instanceof Cl))throw s();S+="]",i++}else throw s();if(!S&&!I.length)throw s();return{css:S||void 0,functions:I}}function k(){let S="",I=1;for(;!w()&&((d()||y())&&I++,g()&&I--,!!I);)S+=n[i++].toSource();return S}const b=m();if(!w())throw s();if(b.some(S=>typeof S!="object"||!("simples"in S)))throw new be(`Error while parsing selector "${e}"`);return{selector:b,names:Array.from(o)}}const Nl=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Hv=new Set(["left-of","right-of","above","below","near"]),wh=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 Uo(e){const t=Bv(e),n=[];for(const r of t.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const i=Fv(r.body,wh);n.push({name:"css",body:i.selector,source:r.body});continue}if(Nl.has(r.name)){let i,o;try{const u=JSON.parse("["+r.body+"]");if(!Array.isArray(u)||u.length<1||u.length>2||typeof u[0]!="string")throw new be(`Malformed selector: ${r.name}=`+r.body);if(i=u[0],u.length===2){if(typeof u[1]!="number"||!Hv.has(r.name))throw new be(`Malformed selector: ${r.name}=`+r.body);o=u[1]}}catch{throw new be(`Malformed selector: ${r.name}=`+r.body)}const s={name:r.name,source:r.body,body:{parsed:Uo(i),distance:o}},l=[...s.body.parsed.parts].reverse().find(u=>u.name==="internal:control"&&u.body==="enter-frame"),a=l?s.body.parsed.parts.indexOf(l):-1;a!==-1&&Uv(s.body.parsed.parts.slice(0,a+1),n.slice(0,a+1))&&s.body.parsed.parts.splice(0,a+1),n.push(s);continue}n.push({...r,source:r.body})}if(Nl.has(n[0].name))throw new be(`"${n[0].name}" selector cannot be first`);return{capture:t.capture,parts:n}}function Uv(e,t){return fn({parts:e})===fn({parts:t})}function fn(e,t){return typeof e=="string"?e:e.parts.map((n,r)=>{let i=!0;!t&&r!==e.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(i=!1);const o=i?n.name+"=":"";return`${r===e.capture?"*":""}${o}${n.source}`}).join(" >> ")}function Vv(e,t){const n=(r,i)=>{for(const o of r.parts)t(o,i),Nl.has(o.name)&&n(o.body.parsed,!0)};n(e,!1)}function Bv(e){let t=0,n,r=0;const i={parts:[]},o=()=>{const l=e.substring(r,t).trim(),a=l.indexOf("=");let u,c;a!==-1&&l.substring(0,a).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(u=l.substring(0,a).trim(),c=l.substring(a+1)):l.length>1&&l[0]==='"'&&l[l.length-1]==='"'||l.length>1&&l[0]==="'"&&l[l.length-1]==="'"?(u="text",c=l):/^\(*\/\//.test(l)||l.startsWith("..")?(u="xpath",c=l):(u="css",c=l);let f=!1;if(u[0]==="*"&&(f=!0,u=u.substring(1)),i.parts.push({name:u,body:c}),f){if(i.capture!==void 0)throw new be("Only one of the selectors can capture using * modifier");i.capture=i.parts.length-1}};if(!e.includes(">>"))return t=e.length,o(),i;const s=()=>{const a=e.substring(r,t).match(/^\s*text\s*=(.*)$/);return!!a&&!!a[1]};for(;t<e.length;){const l=e[t];l==="\\"&&t+1<e.length?t+=2:l===n?(n=void 0,t++):!n&&(l==='"'||l==="'"||l==="`")&&!s()?(n=l,t++):!n&&l===">"&&e[t+1]===">"?(o(),t+=2,r=t):t++}return o(),i}function on(e,t){let n=0,r=e.length===0;const i=()=>e[n]||"",o=()=>{const w=i();return++n,r=n>=e.length,w},s=w=>{throw r?new be(`Unexpected end of selector while parsing selector \`${e}\``):new be(`Error while parsing selector \`${e}\` - unexpected symbol "${i()}" at position ${n}`+(w?" during "+w:""))};function l(){for(;!r&&/\s/.test(i());)o()}function a(w){return w>="€"||w>="0"&&w<="9"||w>="A"&&w<="Z"||w>="a"&&w<="z"||w>="0"&&w<="9"||w==="_"||w==="-"}function u(){let w="";for(l();!r&&a(i());)w+=o();return w}function c(w){let p=o();for(p!==w&&s("parsing quoted string");!r&&i()!==w;)i()==="\\"&&o(),p+=o();return i()!==w&&s("parsing quoted string"),p+=o(),p}function f(){o()!=="/"&&s("parsing regular expression");let w="",p=!1;for(;!r;){if(i()==="\\")w+=o(),r&&s("parsing regular expression");else if(p&&i()==="]")p=!1;else if(!p&&i()==="[")p=!0;else if(!p&&i()==="/")break;w+=o()}o()!=="/"&&s("parsing regular expression");let h="";for(;!r&&i().match(/[dgimsuy]/);)h+=o();try{return new RegExp(w,h)}catch(m){throw new be(`Error while parsing selector \`${e}\`: ${m.message}`)}}function d(){let w="";return l(),i()==="'"||i()==='"'?w=c(i()).slice(1,-1):w=u(),w||s("parsing property path"),w}function g(){l();let w="";return r||(w+=o()),!r&&w!=="="&&(w+=o()),["=","*=","^=","$=","|=","~="].includes(w)||s("parsing operator"),w}function y(){o();const w=[];for(w.push(d()),l();i()===".";)o(),w.push(d()),l();if(i()==="]")return o(),{name:w.join("."),jsonPath:w,op:"<truthy>",value:null,caseSensitive:!1};const p=g();let h,m=!0;if(l(),i()==="/"){if(p!=="=")throw new be(`Error while parsing selector \`${e}\` - cannot use ${p} in attribute with regular expression`);h=f()}else if(i()==="'"||i()==='"')h=c(i()).slice(1,-1),l(),i()==="i"||i()==="I"?(m=!1,o()):(i()==="s"||i()==="S")&&(m=!0,o());else{for(h="";!r&&(a(i())||i()==="+"||i()===".");)h+=o();h==="true"?h=!0:h==="false"?h=!1:t||(h=+h,Number.isNaN(h)&&s("parsing attribute value"))}if(l(),i()!=="]"&&s("parsing attribute value"),o(),p!=="="&&typeof h!="string")throw new be(`Error while parsing selector \`${e}\` - cannot use ${p} in attribute with non-string matching value - ${h}`);return{name:w.join("."),jsonPath:w,op:p,value:h,caseSensitive:m}}const v={name:"",attributes:[]};for(v.name=u(),l();i()==="[";)v.attributes.push(y()),l();if(r||s(void 0),!v.name&&!v.attributes.length)throw new be(`Error while parsing selector \`${e}\` - selector cannot be empty`);return v}function zn(e,t,n=!1){return xh(e,t,n)[0]}function xh(e,t,n=!1,r=20,i){try{return wn(new Yv[e](i),Uo(t),n,r)}catch{return[t]}}function wn(e,t,n=!1,r=20){const i=[...t.parts],o=[];let s=n?"frame-locator":"page";for(let l=0;l<i.length;l++){const a=i[l],u=s;if(s="locator",a.name==="nth"){a.body==="0"?o.push([e.generateLocator(u,"first",""),e.generateLocator(u,"nth","0")]):a.body==="-1"?o.push([e.generateLocator(u,"last",""),e.generateLocator(u,"nth","-1")]):o.push([e.generateLocator(u,"nth",a.body)]);continue}if(a.name==="internal:text"){const{exact:v,text:w}=dr(a.body);o.push([e.generateLocator(u,"text",w,{exact:v})]);continue}if(a.name==="internal:has-text"){const{exact:v,text:w}=dr(a.body);if(!v){o.push([e.generateLocator(u,"has-text",w,{exact:v})]);continue}}if(a.name==="internal:has-not-text"){const{exact:v,text:w}=dr(a.body);if(!v){o.push([e.generateLocator(u,"has-not-text",w,{exact:v})]);continue}}if(a.name==="internal:has"){const v=wn(e,a.body.parsed,!1,r);o.push(v.map(w=>e.generateLocator(u,"has",w)));continue}if(a.name==="internal:has-not"){const v=wn(e,a.body.parsed,!1,r);o.push(v.map(w=>e.generateLocator(u,"hasNot",w)));continue}if(a.name==="internal:and"){const v=wn(e,a.body.parsed,!1,r);o.push(v.map(w=>e.generateLocator(u,"and",w)));continue}if(a.name==="internal:or"){const v=wn(e,a.body.parsed,!1,r);o.push(v.map(w=>e.generateLocator(u,"or",w)));continue}if(a.name==="internal:chain"){const v=wn(e,a.body.parsed,!1,r);o.push(v.map(w=>e.generateLocator(u,"chain",w)));continue}if(a.name==="internal:label"){const{exact:v,text:w}=dr(a.body);o.push([e.generateLocator(u,"label",w,{exact:v})]);continue}if(a.name==="internal:role"){const v=on(a.body,!0),w={attrs:[]};for(const p of v.attributes)p.name==="name"?(w.exact=p.caseSensitive,w.name=p.value):(p.name==="level"&&typeof p.value=="string"&&(p.value=+p.value),w.attrs.push({name:p.name==="include-hidden"?"includeHidden":p.name,value:p.value}));o.push([e.generateLocator(u,"role",v.name,w)]);continue}if(a.name==="internal:testid"){const v=on(a.body,!0),{value:w}=v.attributes[0];o.push([e.generateLocator(u,"test-id",w)]);continue}if(a.name==="internal:attr"){const v=on(a.body,!0),{name:w,value:p,caseSensitive:h}=v.attributes[0],m=p,_=!!h;if(w==="placeholder"){o.push([e.generateLocator(u,"placeholder",m,{exact:_})]);continue}if(w==="alt"){o.push([e.generateLocator(u,"alt",m,{exact:_})]);continue}if(w==="title"){o.push([e.generateLocator(u,"title",m,{exact:_})]);continue}}if(a.name==="internal:control"&&a.body==="enter-frame"){o.push([e.generateLocator(u,"frame","")]),s="frame-locator";continue}let c="default";const f=i[l+1],d=fn({parts:[a]}),g=e.generateLocator(u,c,d);if(f&&["internal:has-text","internal:has-not-text"].includes(f.name)){const{exact:v,text:w}=dr(f.body);if(!v){const p=e.generateLocator("locator",f.name==="internal:has-text"?"has-text":"has-not-text",w,{exact:v}),h={};f.name==="internal:has-text"?h.hasText=w:h.hasNotText=w;const m=e.generateLocator(u,"default",d,h);o.push([e.chainLocators([g,p]),m]),l++;continue}}let y;if(["xpath","css"].includes(a.name)){const v=fn({parts:[a]},!0);y=e.generateLocator(u,c,v)}o.push([g,y].filter(Boolean))}return qv(e,o,r)}function qv(e,t,n){const r=t.map(()=>""),i=[],o=s=>{if(s===t.length)return i.push(e.chainLocators(r)),r.length<n;for(const l of t[s])if(r[s]=l,!o(s+1))return!1;return!0};return o(0),i}function dr(e){let t=!1;const n=e.match(/^\/(.*)\/([igm]*)$/);return n?{text:new RegExp(n[1],n[2])}:(e.endsWith('"')?(e=JSON.parse(e),t=!0):e.endsWith('"s')?(e=JSON.parse(e.substring(0,e.length-1)),t=!0):e.endsWith('"i')&&(e=JSON.parse(e.substring(0,e.length-1)),t=!1),{exact:t,text:e})}class Wv{constructor(t){this.preferredQuote=t}generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(i.hasText)} })`:i.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(i.hasNotText)} })`:`locator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"role":const o=[];ce(i.name)?o.push(`name: ${this.regexToSourceString(i.name)}`):typeof i.name=="string"&&(o.push(`name: ${this.quote(i.name)}`),i.exact&&o.push("exact: true"));for(const{name:l,value:a}of i.attrs)o.push(`${l}: ${typeof a=="string"?this.quote(a):a}`);const s=o.length?`, { ${o.join(", ")} }`:"";return`getByRole(${this.quote(r)}${s})`;case"has-text":return`filter({ hasText: ${this.toHasText(r)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(r)} })`;case"has":return`filter({ has: ${r} })`;case"hasNot":return`filter({ hasNot: ${r} })`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("getByText",r,!!i.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact("getByLabel",r,!!i.exact);case"title":return this.toCallWithExact("getByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToSourceString(t){return Ho(String(t))}toCallWithExact(t,n,r){return ce(n)?`${t}(${this.regexToSourceString(n)})`:r?`${t}(${this.quote(n)}, { exact: true })`:`${t}(${this.quote(n)})`}toHasText(t){return ce(t)?this.regexToSourceString(t):this.quote(t)}toTestIdValue(t){return ce(t)?this.regexToSourceString(t):this.quote(t)}quote(t){return Fo(t,this.preferredQuote??"'")}}class Qv{generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(i.hasText)})`:i.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(i.hasNotText)})`:`locator(${this.quote(r)})`;case"frame":return"content_frame";case"nth":return`nth(${r})`;case"first":return"first";case"last":return"last";case"role":const o=[];ce(i.name)?o.push(`name=${this.regexToString(i.name)}`):typeof i.name=="string"&&(o.push(`name=${this.quote(i.name)}`),i.exact&&o.push("exact=True"));for(const{name:l,value:a}of i.attrs){let u=typeof a=="string"?this.quote(a):a;typeof a=="boolean"&&(u=a?"True":"False"),o.push(`${Xf(l)}=${u}`)}const s=o.length?`, ${o.join(", ")}`:"";return`get_by_role(${this.quote(r)}${s})`;case"has-text":return`filter(has_text=${this.toHasText(r)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(r)})`;case"has":return`filter(has=${r})`;case"hasNot":return`filter(has_not=${r})`;case"and":return`and_(${r})`;case"or":return`or_(${r})`;case"chain":return`locator(${r})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("get_by_text",r,!!i.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!i.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!i.exact);case"label":return this.toCallWithExact("get_by_label",r,!!i.exact);case"title":return this.toCallWithExact("get_by_title",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${Ho(t.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${n})`}toCallWithExact(t,n,r){return ce(n)?`${t}(${this.regexToString(n)})`:r?`${t}(${this.quote(n)}, exact=True)`:`${t}(${this.quote(n)})`}toHasText(t){return ce(t)?this.regexToString(t):`${this.quote(t)}`}toTestIdValue(t){return ce(t)?this.regexToString(t):this.quote(t)}quote(t){return Fo(t,'"')}}class Kv{generateLocator(t,n,r,i={}){let o;switch(t){case"page":o="Page";break;case"frame-locator":o="FrameLocator";break;case"locator":o="Locator";break}switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(i.hasText)}))`:i.hasNotText!==void 0?`locator(${this.quote(r)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(i.hasNotText)}))`:`locator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"role":const s=[];ce(i.name)?s.push(`.setName(${this.regexToString(i.name)})`):typeof i.name=="string"&&(s.push(`.setName(${this.quote(i.name)})`),i.exact&&s.push(".setExact(true)"));for(const{name:a,value:u}of i.attrs)s.push(`.set${wo(a)}(${typeof u=="string"?this.quote(u):u})`);const l=s.length?`, new ${o}.GetByRoleOptions()${s.join("")}`:"";return`getByRole(AriaRole.${Xf(r).toUpperCase()}${l})`;case"has-text":return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${o}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${o}.FilterOptions().setHasNot(${r}))`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact(o,"getByText",r,!!i.exact);case"alt":return this.toCallWithExact(o,"getByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact(o,"getByLabel",r,!!i.exact);case"title":return this.toCallWithExact(o,"getByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(Ho(t.source))}${n})`}toCallWithExact(t,n,r,i){return ce(r)?`${n}(${this.regexToString(r)})`:i?`${n}(${this.quote(r)}, new ${t}.${wo(n)}Options().setExact(true))`:`${n}(${this.quote(r)})`}toHasText(t){return ce(t)?this.regexToString(t):this.quote(t)}toTestIdValue(t){return ce(t)?this.regexToString(t):this.quote(t)}quote(t){return Fo(t,'"')}}class Gv{generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(i.hasText)} })`:i.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(i.hasNotText)} })`:`Locator(${this.quote(r)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${r})`;case"first":return"First";case"last":return"Last";case"role":const o=[];ce(i.name)?o.push(`NameRegex = ${this.regexToString(i.name)}`):typeof i.name=="string"&&(o.push(`Name = ${this.quote(i.name)}`),i.exact&&o.push("Exact = true"));for(const{name:l,value:a}of i.attrs)o.push(`${wo(l)} = ${typeof a=="string"?this.quote(a):a}`);const s=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${wo(r)}${s})`;case"has-text":return`Filter(new() { ${this.toHasText(r)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(r)} })`;case"has":return`Filter(new() { Has = ${r} })`;case"hasNot":return`Filter(new() { HasNot = ${r} })`;case"and":return`And(${r})`;case"or":return`Or(${r})`;case"chain":return`Locator(${r})`;case"test-id":return`GetByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("GetByText",r,!!i.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!i.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(Ho(t.source))}${n})`}toCallWithExact(t,n,r){return ce(n)?`${t}(${this.regexToString(n)})`:r?`${t}(${this.quote(n)}, new() { Exact = true })`:`${t}(${this.quote(n)})`}toHasText(t){return ce(t)?`HasTextRegex = ${this.regexToString(t)}`:`HasText = ${this.quote(t)}`}toTestIdValue(t){return ce(t)?this.regexToString(t):this.quote(t)}toHasNotText(t){return ce(t)?`HasNotTextRegex = ${this.regexToString(t)}`:`HasNotText = ${this.quote(t)}`}quote(t){return Fo(t,'"')}}class Xv{generateLocator(t,n,r,i={}){return JSON.stringify({kind:n,body:r,options:i})}chainLocators(t){const n=t.map(r=>JSON.parse(r));for(let r=0;r<n.length-1;++r)n[r].next=n[r+1];return JSON.stringify(n[0])}}const Yv={javascript:Wv,python:Qv,java:Kv,csharp:Gv,jsonl:Xv};function ce(e){return e instanceof RegExp}const ic=new Map;function La({name:e,items:t=[],id:n,render:r,icon:i,isError:o,isWarning:s,isInfo:l,indent:a,selectedItem:u,onAccepted:c,onSelected:f,onLeftArrow:d,onRightArrow:g,onHighlighted:y,onIconClicked:v,noItemsMessage:w,dataTestId:p,notSelectable:h}){const m=M.useRef(null),[_,T]=M.useState();return M.useEffect(()=>{y==null||y(_)},[y,_]),M.useEffect(()=>{const E=m.current;if(!E)return;const k=()=>{ic.set(e,E.scrollTop)};return E.addEventListener("scroll",k,{passive:!0}),()=>E.removeEventListener("scroll",k)},[e]),M.useEffect(()=>{m.current&&(m.current.scrollTop=ic.get(e)||0)},[e]),x.jsx("div",{className:et("list-view vbox",e+"-list-view"),role:t.length>0?"list":void 0,"data-testid":p||e+"-list",children:x.jsxs("div",{className:et("list-view-content",h&&"not-selectable"),tabIndex:0,onKeyDown:E=>{var I;if(u&&E.key==="Enter"){c==null||c(u,t.indexOf(u));return}if(E.key!=="ArrowDown"&&E.key!=="ArrowUp"&&E.key!=="ArrowLeft"&&E.key!=="ArrowRight")return;if(E.stopPropagation(),E.preventDefault(),u&&E.key==="ArrowLeft"){d==null||d(u,t.indexOf(u));return}if(u&&E.key==="ArrowRight"){g==null||g(u,t.indexOf(u));return}const k=u?t.indexOf(u):-1;let b=k;E.key==="ArrowDown"&&(k===-1?b=0:b=Math.min(k+1,t.length-1)),E.key==="ArrowUp"&&(k===-1?b=t.length-1:b=Math.max(k-1,0));const S=(I=m.current)==null?void 0:I.children.item(b);Jv(S||void 0),y==null||y(void 0),f==null||f(t[b],b),T(void 0)},ref:m,children:[w&&t.length===0&&x.jsx("div",{className:"list-view-empty",children:w}),t.map((E,k)=>{const b=(a==null?void 0:a(E,k))||0,S=r(E,k);return x.jsxs("div",{onDoubleClick:()=>c==null?void 0:c(E,k),role:"listitem",className:et("list-view-entry",u===E&&"selected",!h&&_===E&&"highlighted",(o==null?void 0:o(E,k))&&"error",(s==null?void 0:s(E,k))&&"warning",(l==null?void 0:l(E,k))&&"info"),onClick:()=>f==null?void 0:f(E,k),onMouseEnter:()=>T(E),onMouseLeave:()=>T(void 0),children:[b?new Array(b).fill(0).map(()=>x.jsx("div",{className:"list-view-indent"})):void 0,i&&x.jsx("div",{className:"codicon "+(i(E,k)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:I=>{I.preventDefault(),I.stopPropagation()},onClick:I=>{I.stopPropagation(),I.preventDefault(),v==null||v(E,k)}}),typeof S=="string"?x.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:S}):S]},(n==null?void 0:n(E,k))||k)})]})})}function Jv(e){e&&(e!=null&&e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e==null||e.scrollIntoView())}const Zv=({value:e,description:t})=>{const[n,r]=M.useState("copy"),i=M.useCallback(()=>{(typeof e=="function"?e():Promise.resolve(e)).then(s=>{navigator.clipboard.writeText(s).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[e]);return x.jsx(dn,{title:t||"Copy",icon:n,onClick:i})},oc=({value:e,description:t})=>{const n=M.useCallback(async()=>{const r=typeof e=="function"?await e():e;await navigator.clipboard.writeText(r)},[e]);return x.jsx(dn,{title:t,onClick:n,className:"copy-to-clipboard-text-button",children:t})},_h=({text:e})=>x.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:e});function xo(e){const t=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,n=[];let r,i={};for(;(r=t.exec(e))!==null;){const[,,o,,s]=r;if(o){const l=+o;switch(l){case 0:i={};break;case 1:i["font-weight"]="bold";break;case 2:i.opacity="0.8";break;case 3:i["font-style"]="italic";break;case 4:i["text-decoration"]="underline";break;case 8:i.display="none";break;case 9:i["text-decoration"]="line-through";break;case 22:i={...i,"font-weight":void 0,"font-style":void 0,opacity:void 0,"text-decoration":void 0};break;case 23:i={...i,"font-weight":void 0,"font-style":void 0,opacity:void 0};break;case 24:i={...i,"text-decoration":void 0};break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:i.color=sc[l-30];break;case 39:i={...i,color:void 0};break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:i["background-color"]=sc[l-40];break;case 49:i={...i,"background-color":void 0};break;case 53:i["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:i.color=lc[l-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:i["background-color"]=lc[l-100];break}}else s&&n.push(`<span style="${t0(i)}">${e0(s)}</span>`)}return n.join("")}const sc={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)"},lc={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 e0(e){return e.replace(/[&"<>]/g,t=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[t])}function t0(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}const n0=La;function G1(e,t){const{entries:n}=M.useMemo(()=>{if(!e)return{entries:[]};const i=[];for(const o of e.events){if(o.type==="console"){const s=o.args&&o.args.length?r0(o.args):Sh(o.text),l=o.location.url,u=`${l?l.substring(l.lastIndexOf("/")+1):"<anonymous>"}:${o.location.lineNumber}`;i.push({browserMessage:{body:s,location:u},isError:o.messageType==="error",isWarning:o.messageType==="warning",timestamp:o.time})}o.type==="event"&&o.method==="pageError"&&i.push({browserError:o.params.error,isError:!0,isWarning:!1,timestamp:o.time})}for(const o of e.stdio){let s="";o.text&&(s=xo(o.text.trim())||""),o.base64&&(s=xo(atob(o.base64).trim())||""),i.push({nodeMessage:{html:s},isError:o.type==="stderr",isWarning:!1,timestamp:o.timestamp})}return i.sort((o,s)=>o.timestamp-s.timestamp),{entries:i}},[e]);return{entries:M.useMemo(()=>t?n.filter(i=>i.timestamp>=t.minimum&&i.timestamp<=t.maximum):n,[n,t])}}const X1=({consoleModel:e,boundaries:t,onEntryHovered:n,onAccepted:r})=>e.entries.length?x.jsx("div",{className:"console-tab",children:x.jsx(n0,{name:"console",onAccepted:r,onHighlighted:n,items:e.entries,isError:i=>i.isError,isWarning:i=>i.isWarning,render:i=>{const o=Is(i.timestamp-t.minimum),s=x.jsx("span",{className:"console-time",children:o}),l=i.isError?"status-error":i.isWarning?"status-warning":"status-none",a=i.browserMessage||i.browserError?x.jsx("span",{className:et("codicon","codicon-browser",l),title:"Browser message"}):x.jsx("span",{className:et("codicon","codicon-file",l),title:"Runner message"});let u,c,f,d;const{browserMessage:g,browserError:y,nodeMessage:v}=i;if(g&&(u=g.location,c=g.body),y){const{error:w,value:p}=y;w?(c=w.message,d=w.stack):c=String(p)}return v&&(f=v.html),x.jsxs("div",{className:"console-line",children:[s,a,u&&x.jsx("span",{className:"console-location",children:u}),c&&x.jsx("span",{className:"console-line-message",children:c}),f&&x.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:f}}),d&&x.jsx("div",{className:"console-stack",children:d})]})}})}):x.jsx(_h,{text:"No console entries"});function r0(e){if(e.length===1)return Sh(e[0].preview);const t=typeof e[0].value=="string"&&e[0].value.includes("%"),n=t?e[0].value:"",r=t?e.slice(1):e;let i=0;const o=/%([%sdifoOc])/g;let s;const l=[];let a=[];l.push(x.jsx("span",{children:a}));let u=0;for(;(s=o.exec(n))!==null;){const c=n.substring(u,s.index);a.push(x.jsx("span",{children:c})),u=s.index+2;const f=s[0][1];if(f==="%")a.push(x.jsx("span",{children:"%"}));else if(f==="s"||f==="o"||f==="O"||f==="d"||f==="i"||f==="f"){const d=r[i++],g={};typeof(d==null?void 0:d.value)!="string"&&(g.color="var(--vscode-debugTokenExpression-number)"),a.push(x.jsx("span",{style:g,children:(d==null?void 0:d.preview)||""}))}else if(f==="c"){a=[];const d=r[i++],g=d?i0(d.preview):{};l.push(x.jsx("span",{style:g,children:a}))}}for(u<n.length&&a.push(x.jsx("span",{children:n.substring(u)}));i<r.length;i++){const c=r[i],f={};a.length&&a.push(x.jsx("span",{children:" "})),typeof(c==null?void 0:c.value)!="string"&&(f.color="var(--vscode-debugTokenExpression-number)"),a.push(x.jsx("span",{style:f,children:(c==null?void 0:c.preview)||""}))}return l}function Sh(e){return[x.jsx("span",{dangerouslySetInnerHTML:{__html:xo(e.trim())}})]}function i0(e){try{const t={},n=e.split(";");for(const r of n){const i=r.trim();if(!i)continue;let[o,s]=i.split(":");if(o=o.trim(),s=s.trim(),!o0(o))continue;const l=o.replace(/-([a-z])/g,a=>a[1].toUpperCase());t[l]=s}return t}catch{return{}}}function o0(e){return["background","border","color","font","line","margin","padding","text"].some(n=>e.startsWith(n))}const Ia=({noShadow:e,children:t,noMinHeight:n,className:r,sidebarBackground:i,onClick:o})=>x.jsx("div",{className:et("toolbar",e&&"no-shadow",n&&"no-min-height",r,i&&"toolbar-sidebar-background"),onClick:o,children:t}),s0=({tabs:e,selectedTab:t,setSelectedTab:n,leftToolbar:r,rightToolbar:i,dataTestId:o,mode:s})=>(t||(t=e[0].id),s||(s="default"),x.jsx("div",{className:"tabbed-pane","data-testid":o,children:x.jsxs("div",{className:"vbox",children:[x.jsxs(Ia,{children:[r&&x.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),s==="default"&&x.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},children:[...e.map(l=>x.jsx(Eh,{id:l.id,title:l.title,count:l.count,errorCount:l.errorCount,selected:t===l.id,onSelect:n},l.id))]}),s==="select"&&x.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},children:x.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},onChange:l=>{n==null||n(e[l.currentTarget.selectedIndex].id)},children:e.map(l=>{let a="";return l.count&&(a=` (${l.count})`),l.errorCount&&(a=` (${l.errorCount})`),x.jsxs("option",{value:l.id,selected:l.id===t,children:[l.title,a]},l.id)})})}),i&&x.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...i]})]}),e.map(l=>{const a="tab-content tab-"+l.id;if(l.component)return x.jsx("div",{className:a,style:{display:t===l.id?"inherit":"none"},children:l.component},l.id);if(t===l.id)return x.jsx("div",{className:a,children:l.render()},l.id)})]})})),Eh=({id:e,title:t,count:n,errorCount:r,selected:i,onSelect:o})=>x.jsxs("div",{className:et("tabbed-pane-tab",i&&"selected"),onClick:()=>o==null?void 0:o(e),title:t,children:[x.jsx("div",{className:"tabbed-pane-tab-label",children:t}),!!n&&x.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&x.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]},e),l0="modulepreload",a0=function(e,t){return new URL(e,t).href},ac={},u0=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=a0(u,r),u in ac)return;ac[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let y=s.length-1;y>=0;y--){const v=s[y];if(v.href===u&&(!c||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${f}`))return;const g=document.createElement("link");if(g.rel=c?"stylesheet":l0,c||(g.as="script"),g.crossOrigin="",g.href=u,a&&g.setAttribute("nonce",a),document.head.appendChild(g),c)return new Promise((y,v)=>{g.addEventListener("load",y),g.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Y1=20,Vo=({text:e,language:t,mimeType:n,linkify:r,readOnly:i,highlight:o,revealLine:s,lineNumbers:l,isFocused:a,focusOnChange:u,wrapLines:c,onChange:f})=>{const[d,g]=To(),[y]=M.useState(u0(()=>import("./codeMirrorModule-tzBrK1V4.js"),__vite__mapDeps([0,1]),import.meta.url).then(h=>h.default)),v=M.useRef(null),[w,p]=M.useState();return M.useEffect(()=>{(async()=>{var E,k;const h=await y;d0(h);const m=g.current;if(!m)return;const _=h0(t)||f0(n)||(r?"text/linkified":"");if(v.current&&_===v.current.cm.getOption("mode")&&!!i===v.current.cm.getOption("readOnly")&&l===v.current.cm.getOption("lineNumbers")&&c===v.current.cm.getOption("lineWrapping"))return;(k=(E=v.current)==null?void 0:E.cm)==null||k.getWrapperElement().remove();const T=h(m,{value:"",mode:_,readOnly:!!i,lineNumbers:l,lineWrapping:c});return v.current={cm:T},a&&T.focus(),p(T),T})()},[y,w,g,t,n,r,l,c,i,a]),M.useEffect(()=>{v.current&&v.current.cm.setSize(d.width,d.height)},[d]),M.useLayoutEffect(()=>{var _;if(!w)return;let h=!1;if(w.getValue()!==e&&(w.setValue(e),h=!0,u&&(w.execCommand("selectAll"),w.focus())),h||JSON.stringify(o)!==JSON.stringify(v.current.highlight)){for(const E of v.current.highlight||[])w.removeLineClass(E.line-1,"wrap");for(const E of o||[])w.addLineClass(E.line-1,"wrap",`source-line-${E.type}`);for(const E of v.current.widgets||[])w.removeLineWidget(E);const T=[];for(const E of o||[]){if(E.type!=="error")continue;const k=(_=v.current)==null?void 0:_.cm.getLine(E.line-1);if(k){const S=document.createElement("div");S.className="source-line-error-underline",S.innerHTML="&nbsp;".repeat(k.length||1),T.push(w.addLineWidget(E.line,S,{above:!0,coverGutter:!1}))}const b=document.createElement("div");b.innerHTML=xo(E.message||""),b.className="source-line-error-widget",T.push(w.addLineWidget(E.line,b,{above:!0,coverGutter:!1}))}v.current.highlight=o,v.current.widgets=T}typeof s=="number"&&v.current.cm.lineCount()>=s&&w.scrollIntoView({line:Math.max(0,s-1),ch:0},50);let m;return f&&(m=()=>f(w.getValue()),w.on("change",m)),()=>{m&&w.off("change",m)}},[w,e,o,s,u,f]),x.jsx("div",{className:"cm-wrapper",ref:g,onClick:c0})};function c0(e){var n;if(!(e.target instanceof HTMLElement))return;let t;e.target.classList.contains("cm-linkified")?t=e.target.textContent:e.target.classList.contains("cm-link")&&((n=e.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(t=e.target.nextElementSibling.textContent.slice(1,-1)),t&&(e.preventDefault(),e.stopPropagation(),window.open(t,"_blank"))}let uc=!1;function d0(e){uc||(uc=!0,e.defineSimpleMode("text/linkified",{start:[{regex:eg,token:"linkified"}]}))}function f0(e){if(e){if(e.includes("javascript")||e.includes("json"))return"javascript";if(e.includes("python"))return"python";if(e.includes("csharp"))return"text/x-csharp";if(e.includes("java"))return"text/x-java";if(e.includes("markdown"))return"markdown";if(e.includes("html")||e.includes("svg"))return"htmlmixed";if(e.includes("css"))return"css"}}function h0(e){if(e)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css"}[e]}async function p0(e){const t=navigator.platform.includes("Win")?"win":"unix";let n=[];const r=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function i(f){const d='^"';return d+f.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^
42
+ `:this.value}}class Yn extends ee{constructor(){super(...arguments),this.value=""}ASCIIMatch(t){return this.value.toLowerCase()===t.toLowerCase()}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}}class dh extends Yn{constructor(t){super(),this.tokenType="IDENT",this.value=t}toString(){return"IDENT("+this.value+")"}toSource(){return ei(this.value)}}class Vi extends Yn{constructor(t){super(),this.tokenType="FUNCTION",this.value=t,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return ei(this.value)+"("}}class fh extends Yn{constructor(t){super(),this.tokenType="AT-KEYWORD",this.value=t}toString(){return"AT("+this.value+")"}toSource(){return"@"+ei(this.value)}}class hh extends Yn{constructor(t){super(),this.tokenType="HASH",this.value=t,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t}toSource(){return this.type==="id"?"#"+ei(this.value):"#"+zv(this.value)}}class ph extends Yn{constructor(t){super(),this.tokenType="STRING",this.value=t}toString(){return'"'+yh(this.value)+'"'}}class gh extends Yn{constructor(t){super(),this.tokenType="URL",this.value=t}toString(){return"URL("+this.value+")"}toSource(){return'url("'+yh(this.value)+'")'}}class mh extends ee{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const t=super.toJSON();return t.value=this.value,t.type=this.type,t.repr=this.repr,t}toSource(){return this.repr}}class vh extends ee{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.repr=this.repr,t}toSource(){return this.repr+"%"}}class Dv extends ee{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t.repr=this.repr,t.unit=this.unit,t}toSource(){const t=this.repr;let n=ei(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||te(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),t+n}}function ei(e){e=""+e;let t="";const n=e.charCodeAt(0);for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(i===0)throw new Aa("Invalid character: the input contains U+0000.");te(i,1,31)||i===127||r===0&&te(i,48,57)||r===1&&te(i,48,57)&&n===45?t+="\\"+i.toString(16)+" ":i>=128||i===45||i===95||te(i,48,57)||te(i,65,90)||te(i,97,122)?t+=e[r]:t+="\\"+e[r]}return t}function zv(e){e=""+e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r===0)throw new Aa("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||te(r,48,57)||te(r,65,90)||te(r,97,122)?t+=e[n]:t+="\\"+r.toString(16)+" "}return t}function yh(e){e=""+e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r===0)throw new Aa("Invalid character: the input contains U+0000.");te(r,1,31)||r===127?t+="\\"+r.toString(16)+" ":r===34||r===92?t+="\\"+e[n]:t+=e[n]}return t}class be extends Error{}function Fv(e,t){let n;try{n=Mv(e),n[n.length-1]instanceof Ui||n.push(new Ui)}catch(S){const I=S.message+` while parsing selector "${e}"`,D=(S.stack||"").indexOf(S.message);throw D!==-1&&(S.stack=S.stack.substring(0,D)+I+S.stack.substring(D+S.message.length)),S.message=I,S}const r=n.find(S=>S instanceof fh||S instanceof Zf||S instanceof Hi||S instanceof ch||S instanceof eh||S instanceof th||S instanceof rh||S instanceof oh||S instanceof sh||S instanceof gh||S instanceof vh);if(r)throw new be(`Unsupported token "${r.toSource()}" while parsing selector "${e}"`);let i=0;const o=new Set;function s(){return new be(`Unexpected token "${n[i].toSource()}" while parsing selector "${e}"`)}function l(){for(;n[i]instanceof kl;)i++}function a(S=i){return n[S]instanceof dh}function u(S=i){return n[S]instanceof ph}function c(S=i){return n[S]instanceof mh}function f(S=i){return n[S]instanceof ih}function d(S=i){return n[S]instanceof ah}function g(S=i){return n[S]instanceof uh}function y(S=i){return n[S]instanceof Vi}function v(S=i){return n[S]instanceof ge&&n[S].value==="*"}function w(S=i){return n[S]instanceof Ui}function p(S=i){return n[S]instanceof ge&&[">","+","~"].includes(n[S].value)}function h(S=i){return f(S)||g(S)||w(S)||p(S)||n[S]instanceof kl}function m(){const S=[_()];for(;l(),!!f();)i++,S.push(_());return S}function _(){return l(),c()||u()?n[i++].value:T()}function T(){const S={simples:[]};for(l(),p()?S.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):S.simples.push({selector:E(),combinator:""});;){if(l(),p())S.simples[S.simples.length-1].combinator=n[i++].value,l();else if(h())break;S.simples.push({combinator:"",selector:E()})}return S}function E(){let S="";const I=[];for(;!h();)if(a()||v())S+=n[i++].toSource();else if(n[i]instanceof hh)S+=n[i++].toSource();else if(n[i]instanceof ge&&n[i].value===".")if(i++,a())S+="."+n[i++].toSource();else throw s();else if(n[i]instanceof nh)if(i++,a())if(!t.has(n[i].value.toLowerCase()))S+=":"+n[i++].toSource();else{const D=n[i++].value.toLowerCase();I.push({name:D,args:[]}),o.add(D)}else if(y()){const D=n[i++].value.toLowerCase();if(t.has(D)?(I.push({name:D,args:m()}),o.add(D)):S+=`:${D}(${k()})`,l(),!g())throw s();i++}else throw s();else if(n[i]instanceof lh){for(S+="[",i++;!(n[i]instanceof Cl)&&!w();)S+=n[i++].toSource();if(!(n[i]instanceof Cl))throw s();S+="]",i++}else throw s();if(!S&&!I.length)throw s();return{css:S||void 0,functions:I}}function k(){let S="",I=1;for(;!w()&&((d()||y())&&I++,g()&&I--,!!I);)S+=n[i++].toSource();return S}const b=m();if(!w())throw s();if(b.some(S=>typeof S!="object"||!("simples"in S)))throw new be(`Error while parsing selector "${e}"`);return{selector:b,names:Array.from(o)}}const Nl=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Hv=new Set(["left-of","right-of","above","below","near"]),wh=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 Uo(e){const t=Bv(e),n=[];for(const r of t.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const i=Fv(r.body,wh);n.push({name:"css",body:i.selector,source:r.body});continue}if(Nl.has(r.name)){let i,o;try{const u=JSON.parse("["+r.body+"]");if(!Array.isArray(u)||u.length<1||u.length>2||typeof u[0]!="string")throw new be(`Malformed selector: ${r.name}=`+r.body);if(i=u[0],u.length===2){if(typeof u[1]!="number"||!Hv.has(r.name))throw new be(`Malformed selector: ${r.name}=`+r.body);o=u[1]}}catch{throw new be(`Malformed selector: ${r.name}=`+r.body)}const s={name:r.name,source:r.body,body:{parsed:Uo(i),distance:o}},l=[...s.body.parsed.parts].reverse().find(u=>u.name==="internal:control"&&u.body==="enter-frame"),a=l?s.body.parsed.parts.indexOf(l):-1;a!==-1&&Uv(s.body.parsed.parts.slice(0,a+1),n.slice(0,a+1))&&s.body.parsed.parts.splice(0,a+1),n.push(s);continue}n.push({...r,source:r.body})}if(Nl.has(n[0].name))throw new be(`"${n[0].name}" selector cannot be first`);return{capture:t.capture,parts:n}}function Uv(e,t){return fn({parts:e})===fn({parts:t})}function fn(e,t){return typeof e=="string"?e:e.parts.map((n,r)=>{let i=!0;!t&&r!==e.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(i=!1);const o=i?n.name+"=":"";return`${r===e.capture?"*":""}${o}${n.source}`}).join(" >> ")}function Vv(e,t){const n=(r,i)=>{for(const o of r.parts)t(o,i),Nl.has(o.name)&&n(o.body.parsed,!0)};n(e,!1)}function Bv(e){let t=0,n,r=0;const i={parts:[]},o=()=>{const l=e.substring(r,t).trim(),a=l.indexOf("=");let u,c;a!==-1&&l.substring(0,a).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(u=l.substring(0,a).trim(),c=l.substring(a+1)):l.length>1&&l[0]==='"'&&l[l.length-1]==='"'||l.length>1&&l[0]==="'"&&l[l.length-1]==="'"?(u="text",c=l):/^\(*\/\//.test(l)||l.startsWith("..")?(u="xpath",c=l):(u="css",c=l);let f=!1;if(u[0]==="*"&&(f=!0,u=u.substring(1)),i.parts.push({name:u,body:c}),f){if(i.capture!==void 0)throw new be("Only one of the selectors can capture using * modifier");i.capture=i.parts.length-1}};if(!e.includes(">>"))return t=e.length,o(),i;const s=()=>{const a=e.substring(r,t).match(/^\s*text\s*=(.*)$/);return!!a&&!!a[1]};for(;t<e.length;){const l=e[t];l==="\\"&&t+1<e.length?t+=2:l===n?(n=void 0,t++):!n&&(l==='"'||l==="'"||l==="`")&&!s()?(n=l,t++):!n&&l===">"&&e[t+1]===">"?(o(),t+=2,r=t):t++}return o(),i}function on(e,t){let n=0,r=e.length===0;const i=()=>e[n]||"",o=()=>{const w=i();return++n,r=n>=e.length,w},s=w=>{throw r?new be(`Unexpected end of selector while parsing selector \`${e}\``):new be(`Error while parsing selector \`${e}\` - unexpected symbol "${i()}" at position ${n}`+(w?" during "+w:""))};function l(){for(;!r&&/\s/.test(i());)o()}function a(w){return w>="€"||w>="0"&&w<="9"||w>="A"&&w<="Z"||w>="a"&&w<="z"||w>="0"&&w<="9"||w==="_"||w==="-"}function u(){let w="";for(l();!r&&a(i());)w+=o();return w}function c(w){let p=o();for(p!==w&&s("parsing quoted string");!r&&i()!==w;)i()==="\\"&&o(),p+=o();return i()!==w&&s("parsing quoted string"),p+=o(),p}function f(){o()!=="/"&&s("parsing regular expression");let w="",p=!1;for(;!r;){if(i()==="\\")w+=o(),r&&s("parsing regular expression");else if(p&&i()==="]")p=!1;else if(!p&&i()==="[")p=!0;else if(!p&&i()==="/")break;w+=o()}o()!=="/"&&s("parsing regular expression");let h="";for(;!r&&i().match(/[dgimsuy]/);)h+=o();try{return new RegExp(w,h)}catch(m){throw new be(`Error while parsing selector \`${e}\`: ${m.message}`)}}function d(){let w="";return l(),i()==="'"||i()==='"'?w=c(i()).slice(1,-1):w=u(),w||s("parsing property path"),w}function g(){l();let w="";return r||(w+=o()),!r&&w!=="="&&(w+=o()),["=","*=","^=","$=","|=","~="].includes(w)||s("parsing operator"),w}function y(){o();const w=[];for(w.push(d()),l();i()===".";)o(),w.push(d()),l();if(i()==="]")return o(),{name:w.join("."),jsonPath:w,op:"<truthy>",value:null,caseSensitive:!1};const p=g();let h,m=!0;if(l(),i()==="/"){if(p!=="=")throw new be(`Error while parsing selector \`${e}\` - cannot use ${p} in attribute with regular expression`);h=f()}else if(i()==="'"||i()==='"')h=c(i()).slice(1,-1),l(),i()==="i"||i()==="I"?(m=!1,o()):(i()==="s"||i()==="S")&&(m=!0,o());else{for(h="";!r&&(a(i())||i()==="+"||i()===".");)h+=o();h==="true"?h=!0:h==="false"?h=!1:t||(h=+h,Number.isNaN(h)&&s("parsing attribute value"))}if(l(),i()!=="]"&&s("parsing attribute value"),o(),p!=="="&&typeof h!="string")throw new be(`Error while parsing selector \`${e}\` - cannot use ${p} in attribute with non-string matching value - ${h}`);return{name:w.join("."),jsonPath:w,op:p,value:h,caseSensitive:m}}const v={name:"",attributes:[]};for(v.name=u(),l();i()==="[";)v.attributes.push(y()),l();if(r||s(void 0),!v.name&&!v.attributes.length)throw new be(`Error while parsing selector \`${e}\` - selector cannot be empty`);return v}function zn(e,t,n=!1){return xh(e,t,n)[0]}function xh(e,t,n=!1,r=20,i){try{return wn(new Yv[e](i),Uo(t),n,r)}catch{return[t]}}function wn(e,t,n=!1,r=20){const i=[...t.parts],o=[];let s=n?"frame-locator":"page";for(let l=0;l<i.length;l++){const a=i[l],u=s;if(s="locator",a.name==="nth"){a.body==="0"?o.push([e.generateLocator(u,"first",""),e.generateLocator(u,"nth","0")]):a.body==="-1"?o.push([e.generateLocator(u,"last",""),e.generateLocator(u,"nth","-1")]):o.push([e.generateLocator(u,"nth",a.body)]);continue}if(a.name==="internal:text"){const{exact:v,text:w}=dr(a.body);o.push([e.generateLocator(u,"text",w,{exact:v})]);continue}if(a.name==="internal:has-text"){const{exact:v,text:w}=dr(a.body);if(!v){o.push([e.generateLocator(u,"has-text",w,{exact:v})]);continue}}if(a.name==="internal:has-not-text"){const{exact:v,text:w}=dr(a.body);if(!v){o.push([e.generateLocator(u,"has-not-text",w,{exact:v})]);continue}}if(a.name==="internal:has"){const v=wn(e,a.body.parsed,!1,r);o.push(v.map(w=>e.generateLocator(u,"has",w)));continue}if(a.name==="internal:has-not"){const v=wn(e,a.body.parsed,!1,r);o.push(v.map(w=>e.generateLocator(u,"hasNot",w)));continue}if(a.name==="internal:and"){const v=wn(e,a.body.parsed,!1,r);o.push(v.map(w=>e.generateLocator(u,"and",w)));continue}if(a.name==="internal:or"){const v=wn(e,a.body.parsed,!1,r);o.push(v.map(w=>e.generateLocator(u,"or",w)));continue}if(a.name==="internal:chain"){const v=wn(e,a.body.parsed,!1,r);o.push(v.map(w=>e.generateLocator(u,"chain",w)));continue}if(a.name==="internal:label"){const{exact:v,text:w}=dr(a.body);o.push([e.generateLocator(u,"label",w,{exact:v})]);continue}if(a.name==="internal:role"){const v=on(a.body,!0),w={attrs:[]};for(const p of v.attributes)p.name==="name"?(w.exact=p.caseSensitive,w.name=p.value):(p.name==="level"&&typeof p.value=="string"&&(p.value=+p.value),w.attrs.push({name:p.name==="include-hidden"?"includeHidden":p.name,value:p.value}));o.push([e.generateLocator(u,"role",v.name,w)]);continue}if(a.name==="internal:testid"){const v=on(a.body,!0),{value:w}=v.attributes[0];o.push([e.generateLocator(u,"test-id",w)]);continue}if(a.name==="internal:attr"){const v=on(a.body,!0),{name:w,value:p,caseSensitive:h}=v.attributes[0],m=p,_=!!h;if(w==="placeholder"){o.push([e.generateLocator(u,"placeholder",m,{exact:_})]);continue}if(w==="alt"){o.push([e.generateLocator(u,"alt",m,{exact:_})]);continue}if(w==="title"){o.push([e.generateLocator(u,"title",m,{exact:_})]);continue}}if(a.name==="internal:control"&&a.body==="enter-frame"){o.push([e.generateLocator(u,"frame","")]),s="frame-locator";continue}let c="default";const f=i[l+1],d=fn({parts:[a]}),g=e.generateLocator(u,c,d);if(f&&["internal:has-text","internal:has-not-text"].includes(f.name)){const{exact:v,text:w}=dr(f.body);if(!v){const p=e.generateLocator("locator",f.name==="internal:has-text"?"has-text":"has-not-text",w,{exact:v}),h={};f.name==="internal:has-text"?h.hasText=w:h.hasNotText=w;const m=e.generateLocator(u,"default",d,h);o.push([e.chainLocators([g,p]),m]),l++;continue}}let y;if(["xpath","css"].includes(a.name)){const v=fn({parts:[a]},!0);y=e.generateLocator(u,c,v)}o.push([g,y].filter(Boolean))}return qv(e,o,r)}function qv(e,t,n){const r=t.map(()=>""),i=[],o=s=>{if(s===t.length)return i.push(e.chainLocators(r)),r.length<n;for(const l of t[s])if(r[s]=l,!o(s+1))return!1;return!0};return o(0),i}function dr(e){let t=!1;const n=e.match(/^\/(.*)\/([igm]*)$/);return n?{text:new RegExp(n[1],n[2])}:(e.endsWith('"')?(e=JSON.parse(e),t=!0):e.endsWith('"s')?(e=JSON.parse(e.substring(0,e.length-1)),t=!0):e.endsWith('"i')&&(e=JSON.parse(e.substring(0,e.length-1)),t=!1),{exact:t,text:e})}class Wv{constructor(t){this.preferredQuote=t}generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(i.hasText)} })`:i.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(i.hasNotText)} })`:`locator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"role":const o=[];ce(i.name)?o.push(`name: ${this.regexToSourceString(i.name)}`):typeof i.name=="string"&&(o.push(`name: ${this.quote(i.name)}`),i.exact&&o.push("exact: true"));for(const{name:l,value:a}of i.attrs)o.push(`${l}: ${typeof a=="string"?this.quote(a):a}`);const s=o.length?`, { ${o.join(", ")} }`:"";return`getByRole(${this.quote(r)}${s})`;case"has-text":return`filter({ hasText: ${this.toHasText(r)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(r)} })`;case"has":return`filter({ has: ${r} })`;case"hasNot":return`filter({ hasNot: ${r} })`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("getByText",r,!!i.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact("getByLabel",r,!!i.exact);case"title":return this.toCallWithExact("getByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToSourceString(t){return Ho(String(t))}toCallWithExact(t,n,r){return ce(n)?`${t}(${this.regexToSourceString(n)})`:r?`${t}(${this.quote(n)}, { exact: true })`:`${t}(${this.quote(n)})`}toHasText(t){return ce(t)?this.regexToSourceString(t):this.quote(t)}toTestIdValue(t){return ce(t)?this.regexToSourceString(t):this.quote(t)}quote(t){return Fo(t,this.preferredQuote??"'")}}class Qv{generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(i.hasText)})`:i.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(i.hasNotText)})`:`locator(${this.quote(r)})`;case"frame":return"content_frame";case"nth":return`nth(${r})`;case"first":return"first";case"last":return"last";case"role":const o=[];ce(i.name)?o.push(`name=${this.regexToString(i.name)}`):typeof i.name=="string"&&(o.push(`name=${this.quote(i.name)}`),i.exact&&o.push("exact=True"));for(const{name:l,value:a}of i.attrs){let u=typeof a=="string"?this.quote(a):a;typeof a=="boolean"&&(u=a?"True":"False"),o.push(`${Xf(l)}=${u}`)}const s=o.length?`, ${o.join(", ")}`:"";return`get_by_role(${this.quote(r)}${s})`;case"has-text":return`filter(has_text=${this.toHasText(r)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(r)})`;case"has":return`filter(has=${r})`;case"hasNot":return`filter(has_not=${r})`;case"and":return`and_(${r})`;case"or":return`or_(${r})`;case"chain":return`locator(${r})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("get_by_text",r,!!i.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!i.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!i.exact);case"label":return this.toCallWithExact("get_by_label",r,!!i.exact);case"title":return this.toCallWithExact("get_by_title",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${Ho(t.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${n})`}toCallWithExact(t,n,r){return ce(n)?`${t}(${this.regexToString(n)})`:r?`${t}(${this.quote(n)}, exact=True)`:`${t}(${this.quote(n)})`}toHasText(t){return ce(t)?this.regexToString(t):`${this.quote(t)}`}toTestIdValue(t){return ce(t)?this.regexToString(t):this.quote(t)}quote(t){return Fo(t,'"')}}class Kv{generateLocator(t,n,r,i={}){let o;switch(t){case"page":o="Page";break;case"frame-locator":o="FrameLocator";break;case"locator":o="Locator";break}switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(i.hasText)}))`:i.hasNotText!==void 0?`locator(${this.quote(r)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(i.hasNotText)}))`:`locator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"role":const s=[];ce(i.name)?s.push(`.setName(${this.regexToString(i.name)})`):typeof i.name=="string"&&(s.push(`.setName(${this.quote(i.name)})`),i.exact&&s.push(".setExact(true)"));for(const{name:a,value:u}of i.attrs)s.push(`.set${wo(a)}(${typeof u=="string"?this.quote(u):u})`);const l=s.length?`, new ${o}.GetByRoleOptions()${s.join("")}`:"";return`getByRole(AriaRole.${Xf(r).toUpperCase()}${l})`;case"has-text":return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${o}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${o}.FilterOptions().setHasNot(${r}))`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact(o,"getByText",r,!!i.exact);case"alt":return this.toCallWithExact(o,"getByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact(o,"getByLabel",r,!!i.exact);case"title":return this.toCallWithExact(o,"getByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(Ho(t.source))}${n})`}toCallWithExact(t,n,r,i){return ce(r)?`${n}(${this.regexToString(r)})`:i?`${n}(${this.quote(r)}, new ${t}.${wo(n)}Options().setExact(true))`:`${n}(${this.quote(r)})`}toHasText(t){return ce(t)?this.regexToString(t):this.quote(t)}toTestIdValue(t){return ce(t)?this.regexToString(t):this.quote(t)}quote(t){return Fo(t,'"')}}class Gv{generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(i.hasText)} })`:i.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(i.hasNotText)} })`:`Locator(${this.quote(r)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${r})`;case"first":return"First";case"last":return"Last";case"role":const o=[];ce(i.name)?o.push(`NameRegex = ${this.regexToString(i.name)}`):typeof i.name=="string"&&(o.push(`Name = ${this.quote(i.name)}`),i.exact&&o.push("Exact = true"));for(const{name:l,value:a}of i.attrs)o.push(`${wo(l)} = ${typeof a=="string"?this.quote(a):a}`);const s=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${wo(r)}${s})`;case"has-text":return`Filter(new() { ${this.toHasText(r)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(r)} })`;case"has":return`Filter(new() { Has = ${r} })`;case"hasNot":return`Filter(new() { HasNot = ${r} })`;case"and":return`And(${r})`;case"or":return`Or(${r})`;case"chain":return`Locator(${r})`;case"test-id":return`GetByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("GetByText",r,!!i.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!i.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(Ho(t.source))}${n})`}toCallWithExact(t,n,r){return ce(n)?`${t}(${this.regexToString(n)})`:r?`${t}(${this.quote(n)}, new() { Exact = true })`:`${t}(${this.quote(n)})`}toHasText(t){return ce(t)?`HasTextRegex = ${this.regexToString(t)}`:`HasText = ${this.quote(t)}`}toTestIdValue(t){return ce(t)?this.regexToString(t):this.quote(t)}toHasNotText(t){return ce(t)?`HasNotTextRegex = ${this.regexToString(t)}`:`HasNotText = ${this.quote(t)}`}quote(t){return Fo(t,'"')}}class Xv{generateLocator(t,n,r,i={}){return JSON.stringify({kind:n,body:r,options:i})}chainLocators(t){const n=t.map(r=>JSON.parse(r));for(let r=0;r<n.length-1;++r)n[r].next=n[r+1];return JSON.stringify(n[0])}}const Yv={javascript:Wv,python:Qv,java:Kv,csharp:Gv,jsonl:Xv};function ce(e){return e instanceof RegExp}const ic=new Map;function La({name:e,items:t=[],id:n,render:r,icon:i,isError:o,isWarning:s,isInfo:l,indent:a,selectedItem:u,onAccepted:c,onSelected:f,onLeftArrow:d,onRightArrow:g,onHighlighted:y,onIconClicked:v,noItemsMessage:w,dataTestId:p,notSelectable:h}){const m=M.useRef(null),[_,T]=M.useState();return M.useEffect(()=>{y==null||y(_)},[y,_]),M.useEffect(()=>{const E=m.current;if(!E)return;const k=()=>{ic.set(e,E.scrollTop)};return E.addEventListener("scroll",k,{passive:!0}),()=>E.removeEventListener("scroll",k)},[e]),M.useEffect(()=>{m.current&&(m.current.scrollTop=ic.get(e)||0)},[e]),x.jsx("div",{className:et("list-view vbox",e+"-list-view"),role:t.length>0?"list":void 0,"data-testid":p||e+"-list",children:x.jsxs("div",{className:et("list-view-content",h&&"not-selectable"),tabIndex:0,onKeyDown:E=>{var I;if(u&&E.key==="Enter"){c==null||c(u,t.indexOf(u));return}if(E.key!=="ArrowDown"&&E.key!=="ArrowUp"&&E.key!=="ArrowLeft"&&E.key!=="ArrowRight")return;if(E.stopPropagation(),E.preventDefault(),u&&E.key==="ArrowLeft"){d==null||d(u,t.indexOf(u));return}if(u&&E.key==="ArrowRight"){g==null||g(u,t.indexOf(u));return}const k=u?t.indexOf(u):-1;let b=k;E.key==="ArrowDown"&&(k===-1?b=0:b=Math.min(k+1,t.length-1)),E.key==="ArrowUp"&&(k===-1?b=t.length-1:b=Math.max(k-1,0));const S=(I=m.current)==null?void 0:I.children.item(b);Jv(S||void 0),y==null||y(void 0),f==null||f(t[b],b),T(void 0)},ref:m,children:[w&&t.length===0&&x.jsx("div",{className:"list-view-empty",children:w}),t.map((E,k)=>{const b=(a==null?void 0:a(E,k))||0,S=r(E,k);return x.jsxs("div",{onDoubleClick:()=>c==null?void 0:c(E,k),role:"listitem",className:et("list-view-entry",u===E&&"selected",!h&&_===E&&"highlighted",(o==null?void 0:o(E,k))&&"error",(s==null?void 0:s(E,k))&&"warning",(l==null?void 0:l(E,k))&&"info"),onClick:()=>f==null?void 0:f(E,k),onMouseEnter:()=>T(E),onMouseLeave:()=>T(void 0),children:[b?new Array(b).fill(0).map(()=>x.jsx("div",{className:"list-view-indent"})):void 0,i&&x.jsx("div",{className:"codicon "+(i(E,k)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:I=>{I.preventDefault(),I.stopPropagation()},onClick:I=>{I.stopPropagation(),I.preventDefault(),v==null||v(E,k)}}),typeof S=="string"?x.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:S}):S]},(n==null?void 0:n(E,k))||k)})]})})}function Jv(e){e&&(e!=null&&e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e==null||e.scrollIntoView())}const Zv=({value:e,description:t})=>{const[n,r]=M.useState("copy"),i=M.useCallback(()=>{(typeof e=="function"?e():Promise.resolve(e)).then(s=>{navigator.clipboard.writeText(s).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[e]);return x.jsx(dn,{title:t||"Copy",icon:n,onClick:i})},oc=({value:e,description:t})=>{const n=M.useCallback(async()=>{const r=typeof e=="function"?await e():e;await navigator.clipboard.writeText(r)},[e]);return x.jsx(dn,{title:t,onClick:n,className:"copy-to-clipboard-text-button",children:t})},_h=({text:e})=>x.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:e});function xo(e){const t=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,n=[];let r,i={};for(;(r=t.exec(e))!==null;){const[,,o,,s]=r;if(o){const l=+o;switch(l){case 0:i={};break;case 1:i["font-weight"]="bold";break;case 2:i.opacity="0.8";break;case 3:i["font-style"]="italic";break;case 4:i["text-decoration"]="underline";break;case 8:i.display="none";break;case 9:i["text-decoration"]="line-through";break;case 22:i={...i,"font-weight":void 0,"font-style":void 0,opacity:void 0,"text-decoration":void 0};break;case 23:i={...i,"font-weight":void 0,"font-style":void 0,opacity:void 0};break;case 24:i={...i,"text-decoration":void 0};break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:i.color=sc[l-30];break;case 39:i={...i,color:void 0};break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:i["background-color"]=sc[l-40];break;case 49:i={...i,"background-color":void 0};break;case 53:i["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:i.color=lc[l-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:i["background-color"]=lc[l-100];break}}else s&&n.push(`<span style="${t0(i)}">${e0(s)}</span>`)}return n.join("")}const sc={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)"},lc={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 e0(e){return e.replace(/[&"<>]/g,t=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[t])}function t0(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}const n0=La;function G1(e,t){const{entries:n}=M.useMemo(()=>{if(!e)return{entries:[]};const i=[];for(const o of e.events){if(o.type==="console"){const s=o.args&&o.args.length?r0(o.args):Sh(o.text),l=o.location.url,u=`${l?l.substring(l.lastIndexOf("/")+1):"<anonymous>"}:${o.location.lineNumber}`;i.push({browserMessage:{body:s,location:u},isError:o.messageType==="error",isWarning:o.messageType==="warning",timestamp:o.time})}o.type==="event"&&o.method==="pageError"&&i.push({browserError:o.params.error,isError:!0,isWarning:!1,timestamp:o.time})}for(const o of e.stdio){let s="";o.text&&(s=xo(o.text.trim())||""),o.base64&&(s=xo(atob(o.base64).trim())||""),i.push({nodeMessage:{html:s},isError:o.type==="stderr",isWarning:!1,timestamp:o.timestamp})}return i.sort((o,s)=>o.timestamp-s.timestamp),{entries:i}},[e]);return{entries:M.useMemo(()=>t?n.filter(i=>i.timestamp>=t.minimum&&i.timestamp<=t.maximum):n,[n,t])}}const X1=({consoleModel:e,boundaries:t,onEntryHovered:n,onAccepted:r})=>e.entries.length?x.jsx("div",{className:"console-tab",children:x.jsx(n0,{name:"console",onAccepted:r,onHighlighted:n,items:e.entries,isError:i=>i.isError,isWarning:i=>i.isWarning,render:i=>{const o=Is(i.timestamp-t.minimum),s=x.jsx("span",{className:"console-time",children:o}),l=i.isError?"status-error":i.isWarning?"status-warning":"status-none",a=i.browserMessage||i.browserError?x.jsx("span",{className:et("codicon","codicon-browser",l),title:"Browser message"}):x.jsx("span",{className:et("codicon","codicon-file",l),title:"Runner message"});let u,c,f,d;const{browserMessage:g,browserError:y,nodeMessage:v}=i;if(g&&(u=g.location,c=g.body),y){const{error:w,value:p}=y;w?(c=w.message,d=w.stack):c=String(p)}return v&&(f=v.html),x.jsxs("div",{className:"console-line",children:[s,a,u&&x.jsx("span",{className:"console-location",children:u}),c&&x.jsx("span",{className:"console-line-message",children:c}),f&&x.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:f}}),d&&x.jsx("div",{className:"console-stack",children:d})]})}})}):x.jsx(_h,{text:"No console entries"});function r0(e){if(e.length===1)return Sh(e[0].preview);const t=typeof e[0].value=="string"&&e[0].value.includes("%"),n=t?e[0].value:"",r=t?e.slice(1):e;let i=0;const o=/%([%sdifoOc])/g;let s;const l=[];let a=[];l.push(x.jsx("span",{children:a}));let u=0;for(;(s=o.exec(n))!==null;){const c=n.substring(u,s.index);a.push(x.jsx("span",{children:c})),u=s.index+2;const f=s[0][1];if(f==="%")a.push(x.jsx("span",{children:"%"}));else if(f==="s"||f==="o"||f==="O"||f==="d"||f==="i"||f==="f"){const d=r[i++],g={};typeof(d==null?void 0:d.value)!="string"&&(g.color="var(--vscode-debugTokenExpression-number)"),a.push(x.jsx("span",{style:g,children:(d==null?void 0:d.preview)||""}))}else if(f==="c"){a=[];const d=r[i++],g=d?i0(d.preview):{};l.push(x.jsx("span",{style:g,children:a}))}}for(u<n.length&&a.push(x.jsx("span",{children:n.substring(u)}));i<r.length;i++){const c=r[i],f={};a.length&&a.push(x.jsx("span",{children:" "})),typeof(c==null?void 0:c.value)!="string"&&(f.color="var(--vscode-debugTokenExpression-number)"),a.push(x.jsx("span",{style:f,children:(c==null?void 0:c.preview)||""}))}return l}function Sh(e){return[x.jsx("span",{dangerouslySetInnerHTML:{__html:xo(e.trim())}})]}function i0(e){try{const t={},n=e.split(";");for(const r of n){const i=r.trim();if(!i)continue;let[o,s]=i.split(":");if(o=o.trim(),s=s.trim(),!o0(o))continue;const l=o.replace(/-([a-z])/g,a=>a[1].toUpperCase());t[l]=s}return t}catch{return{}}}function o0(e){return["background","border","color","font","line","margin","padding","text"].some(n=>e.startsWith(n))}const Ia=({noShadow:e,children:t,noMinHeight:n,className:r,sidebarBackground:i,onClick:o})=>x.jsx("div",{className:et("toolbar",e&&"no-shadow",n&&"no-min-height",r,i&&"toolbar-sidebar-background"),onClick:o,children:t}),s0=({tabs:e,selectedTab:t,setSelectedTab:n,leftToolbar:r,rightToolbar:i,dataTestId:o,mode:s})=>(t||(t=e[0].id),s||(s="default"),x.jsx("div",{className:"tabbed-pane","data-testid":o,children:x.jsxs("div",{className:"vbox",children:[x.jsxs(Ia,{children:[r&&x.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),s==="default"&&x.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},children:[...e.map(l=>x.jsx(Eh,{id:l.id,title:l.title,count:l.count,errorCount:l.errorCount,selected:t===l.id,onSelect:n},l.id))]}),s==="select"&&x.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},children:x.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},onChange:l=>{n==null||n(e[l.currentTarget.selectedIndex].id)},children:e.map(l=>{let a="";return l.count&&(a=` (${l.count})`),l.errorCount&&(a=` (${l.errorCount})`),x.jsxs("option",{value:l.id,selected:l.id===t,children:[l.title,a]},l.id)})})}),i&&x.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...i]})]}),e.map(l=>{const a="tab-content tab-"+l.id;if(l.component)return x.jsx("div",{className:a,style:{display:t===l.id?"inherit":"none"},children:l.component},l.id);if(t===l.id)return x.jsx("div",{className:a,children:l.render()},l.id)})]})})),Eh=({id:e,title:t,count:n,errorCount:r,selected:i,onSelect:o})=>x.jsxs("div",{className:et("tabbed-pane-tab",i&&"selected"),onClick:()=>o==null?void 0:o(e),title:t,children:[x.jsx("div",{className:"tabbed-pane-tab-label",children:t}),!!n&&x.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&x.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]},e),l0="modulepreload",a0=function(e,t){return new URL(e,t).href},ac={},u0=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=a0(u,r),u in ac)return;ac[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let y=s.length-1;y>=0;y--){const v=s[y];if(v.href===u&&(!c||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${f}`))return;const g=document.createElement("link");if(g.rel=c?"stylesheet":l0,c||(g.as="script"),g.crossOrigin="",g.href=u,a&&g.setAttribute("nonce",a),document.head.appendChild(g),c)return new Promise((y,v)=>{g.addEventListener("load",y),g.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Y1=20,Vo=({text:e,language:t,mimeType:n,linkify:r,readOnly:i,highlight:o,revealLine:s,lineNumbers:l,isFocused:a,focusOnChange:u,wrapLines:c,onChange:f})=>{const[d,g]=To(),[y]=M.useState(u0(()=>import("./codeMirrorModule-DZoSgqUd.js"),__vite__mapDeps([0,1]),import.meta.url).then(h=>h.default)),v=M.useRef(null),[w,p]=M.useState();return M.useEffect(()=>{(async()=>{var E,k;const h=await y;d0(h);const m=g.current;if(!m)return;const _=h0(t)||f0(n)||(r?"text/linkified":"");if(v.current&&_===v.current.cm.getOption("mode")&&!!i===v.current.cm.getOption("readOnly")&&l===v.current.cm.getOption("lineNumbers")&&c===v.current.cm.getOption("lineWrapping"))return;(k=(E=v.current)==null?void 0:E.cm)==null||k.getWrapperElement().remove();const T=h(m,{value:"",mode:_,readOnly:!!i,lineNumbers:l,lineWrapping:c});return v.current={cm:T},a&&T.focus(),p(T),T})()},[y,w,g,t,n,r,l,c,i,a]),M.useEffect(()=>{v.current&&v.current.cm.setSize(d.width,d.height)},[d]),M.useLayoutEffect(()=>{var _;if(!w)return;let h=!1;if(w.getValue()!==e&&(w.setValue(e),h=!0,u&&(w.execCommand("selectAll"),w.focus())),h||JSON.stringify(o)!==JSON.stringify(v.current.highlight)){for(const E of v.current.highlight||[])w.removeLineClass(E.line-1,"wrap");for(const E of o||[])w.addLineClass(E.line-1,"wrap",`source-line-${E.type}`);for(const E of v.current.widgets||[])w.removeLineWidget(E);const T=[];for(const E of o||[]){if(E.type!=="error")continue;const k=(_=v.current)==null?void 0:_.cm.getLine(E.line-1);if(k){const S=document.createElement("div");S.className="source-line-error-underline",S.innerHTML="&nbsp;".repeat(k.length||1),T.push(w.addLineWidget(E.line,S,{above:!0,coverGutter:!1}))}const b=document.createElement("div");b.innerHTML=xo(E.message||""),b.className="source-line-error-widget",T.push(w.addLineWidget(E.line,b,{above:!0,coverGutter:!1}))}v.current.highlight=o,v.current.widgets=T}typeof s=="number"&&v.current.cm.lineCount()>=s&&w.scrollIntoView({line:Math.max(0,s-1),ch:0},50);let m;return f&&(m=()=>f(w.getValue()),w.on("change",m)),()=>{m&&w.off("change",m)}},[w,e,o,s,u,f]),x.jsx("div",{className:"cm-wrapper",ref:g,onClick:c0})};function c0(e){var n;if(!(e.target instanceof HTMLElement))return;let t;e.target.classList.contains("cm-linkified")?t=e.target.textContent:e.target.classList.contains("cm-link")&&((n=e.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(t=e.target.nextElementSibling.textContent.slice(1,-1)),t&&(e.preventDefault(),e.stopPropagation(),window.open(t,"_blank"))}let uc=!1;function d0(e){uc||(uc=!0,e.defineSimpleMode("text/linkified",{start:[{regex:eg,token:"linkified"}]}))}function f0(e){if(e){if(e.includes("javascript")||e.includes("json"))return"javascript";if(e.includes("python"))return"python";if(e.includes("csharp"))return"text/x-csharp";if(e.includes("java"))return"text/x-java";if(e.includes("markdown"))return"markdown";if(e.includes("html")||e.includes("svg"))return"htmlmixed";if(e.includes("css"))return"css"}}function h0(e){if(e)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css"}[e]}async function p0(e){const t=navigator.platform.includes("Win")?"win":"unix";let n=[];const r=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function i(f){const d='^"';return d+f.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^
43
43
 
44
44
  `)+d}function o(f){function d(g){let v=g.charCodeAt(0).toString(16);for(;v.length<4;)v="0"+v;return"\\u"+v}return/[\0-\x1F\x7F-\x9F!]|\'/.test(f)?"$'"+f.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,d)+"'":"'"+f+"'"}const s=t==="win"?i:o;n.push(s(e.request.url).replace(/[[{}\]]/g,"\\$&"));let l="GET";const a=[],u=await Th(e);u&&(a.push("--data-raw "+s(u)),r.add("content-length"),l="POST"),e.request.method!==l&&n.push("-X "+s(e.request.method));const c=e.request.headers;for(let f=0;f<c.length;f++){const d=c[f],g=d.name.replace(/^:/,"");r.has(g.toLowerCase())||(d.value.trim()?n.push("-H "+s(g+": "+d.value)):n.push("-H "+s(g+";")))}return n=n.concat(a),"curl "+n.join(n.length>=3?t==="win"?` ^
45
45
  `:` \\
@@ -61,4 +61,4 @@ Error generating stack: `+o.message+`
61
61
  body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
62
62
  body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
63
63
  `),this.installListeners(),t.utils.cacheNormalizedWhitespaces(),t.isUnderTest&&console.error("Recorder script ready for test")}installListeners(){var r;_p(this._listeners),this._listeners=[W(this.document,"click",i=>this._onClick(i),!0),W(this.document,"auxclick",i=>this._onClick(i),!0),W(this.document,"dblclick",i=>this._onDblClick(i),!0),W(this.document,"contextmenu",i=>this._onContextMenu(i),!0),W(this.document,"dragstart",i=>this._onDragStart(i),!0),W(this.document,"input",i=>this._onInput(i),!0),W(this.document,"keydown",i=>this._onKeyDown(i),!0),W(this.document,"keyup",i=>this._onKeyUp(i),!0),W(this.document,"pointerdown",i=>this._onPointerDown(i),!0),W(this.document,"pointerup",i=>this._onPointerUp(i),!0),W(this.document,"mousedown",i=>this._onMouseDown(i),!0),W(this.document,"mouseup",i=>this._onMouseUp(i),!0),W(this.document,"mousemove",i=>this._onMouseMove(i),!0),W(this.document,"mouseleave",i=>this._onMouseLeave(i),!0),W(this.document,"mouseenter",i=>this._onMouseEnter(i),!0),W(this.document,"focus",i=>this._onFocus(i),!0),W(this.document,"scroll",i=>this._onScroll(i),!0)],this.highlight.install();let t;const n=()=>{this.highlight.install(),t=this.injectedScript.builtinSetTimeout(n,500)};t=this.injectedScript.builtinSetTimeout(n,500),this._listeners.push(()=>this.injectedScript.builtinClearTimeout(t)),(r=this.overlay)==null||r.install(),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var n,r,i;const t=this._tools[this.state.mode];t!==this._currentTool&&((r=(n=this._currentTool).cleanup)==null||r.call(n),this.clearHighlight(),this._currentTool=t,(i=this.injectedScript.document.body)==null||i.setAttribute("data-pw-cursor",t.cursor()))}setUIState(t,n){var r,i,o,s;this._delegate=n,t.actionPoint&&this.state.actionPoint&&t.actionPoint.x===this.state.actionPoint.x&&t.actionPoint.y===this.state.actionPoint.y||!t.actionPoint&&!this.state.actionPoint||(t.actionPoint?this.highlight.showActionPoint(t.actionPoint.x,t.actionPoint.y):this.highlight.hideActionPoint()),this.state=t,this.highlight.setLanguage(t.language),this._switchCurrentTool(),(r=this.overlay)==null||r.setUIState(t),(i=this._actionSelectorModel)!=null&&i.selector&&!((o=this._actionSelectorModel)!=null&&o.elements.length)&&(this._actionSelectorModel=null),t.actionSelector!==((s=this._actionSelectorModel)==null?void 0:s.selector)&&(this._actionSelectorModel=t.actionSelector?f1(this.injectedScript,t.actionSelector,this.document):null),(this.state.mode==="none"||this.state.mode==="standby")&&this.updateHighlight(this._actionSelectorModel,!1)}clearHighlight(){var t,n;(n=(t=this._currentTool).cleanup)==null||n.call(t),this.updateHighlight(null,!1)}_onClick(t){var n,r,i;t.isTrusted&&((n=this.overlay)!=null&&n.onClick(t)||this._ignoreOverlayEvent(t)||(i=(r=this._currentTool).onClick)==null||i.call(r,t))}_onDblClick(t){var n,r,i;t.isTrusted&&((n=this.overlay)!=null&&n.onDblClick(t)||this._ignoreOverlayEvent(t)||(i=(r=this._currentTool).onDblClick)==null||i.call(r,t))}_onContextMenu(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onContextMenu)==null||r.call(n,t))}_onDragStart(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onDragStart)==null||r.call(n,t))}_onPointerDown(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onPointerDown)==null||r.call(n,t))}_onPointerUp(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onPointerUp)==null||r.call(n,t))}_onMouseDown(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onMouseDown)==null||r.call(n,t))}_onMouseUp(t){var n,r,i;t.isTrusted&&((n=this.overlay)!=null&&n.onMouseUp(t)||this._ignoreOverlayEvent(t)||(i=(r=this._currentTool).onMouseUp)==null||i.call(r,t))}_onMouseMove(t){var n,r,i;t.isTrusted&&((n=this.overlay)!=null&&n.onMouseMove(t)||this._ignoreOverlayEvent(t)||(i=(r=this._currentTool).onMouseMove)==null||i.call(r,t))}_onMouseEnter(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onMouseEnter)==null||r.call(n,t))}_onMouseLeave(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onMouseLeave)==null||r.call(n,t))}_onFocus(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onFocus)==null||r.call(n,t))}_onScroll(t){var n,r;t.isTrusted&&(this.highlight.hideActionPoint(),(r=(n=this._currentTool).onScroll)==null||r.call(n,t))}_onInput(t){var n,r;this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onInput)==null||r.call(n,t)}_onKeyDown(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onKeyDown)==null||r.call(n,t))}_onKeyUp(t){var n,r;t.isTrusted&&(this._ignoreOverlayEvent(t)||(r=(n=this._currentTool).onKeyUp)==null||r.call(n,t))}updateHighlight(t,n){var i,o;let r=t==null?void 0:t.tooltipText;r===void 0&&!(t!=null&&t.tooltipList)&&(t!=null&&t.selector)&&(r=this.injectedScript.utils.asLocator(this.state.language,t.selector)),this.highlight.updateHighlight((t==null?void 0:t.elements)||[],{...t,tooltipText:r}),n&&((o=(i=this._delegate).highlightUpdated)==null||o.call(i))}_ignoreOverlayEvent(t){return t.composedPath().some(n=>(n.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(t){var n;for(const r of t.composedPath())if(!((n=this.overlay)!=null&&n.contains(r)))return r;return t.composedPath()[0]}setMode(t){var n,r;(r=(n=this._delegate).setMode)==null||r.call(n,t)}async performAction(t){var n,r;await((r=(n=this._delegate).performAction)==null?void 0:r.call(n,t).catch(()=>{}))}recordAction(t){var n,r;(r=(n=this._delegate).recordAction)==null||r.call(n,t)}setOverlayState(t){var n,r;(r=(n=this._delegate).setOverlayState)==null||r.call(n,t)}setSelector(t){var n,r;(r=(n=this._delegate).setSelector)==null||r.call(n,t)}}class c1{constructor(t){this._dialogElement=null,this._recorder=t}isShowing(){return!!this._dialogElement}show(t){const n=this._recorder.document.createElement("x-pw-tool-item");n.title="Accept",n.classList.add("accept"),n.appendChild(this._recorder.document.createElement("x-div")),n.addEventListener("click",()=>t.onCommit());const r=this._recorder.document.createElement("x-pw-tool-item");r.title="Close",r.classList.add("cancel"),r.appendChild(this._recorder.document.createElement("x-div")),r.addEventListener("click",()=>{var l;this.close(),(l=t.onCancel)==null||l.call(t)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),this._keyboardListener=l=>{var a;if(l.key==="Escape"){this.close(),(a=t.onCancel)==null||a.call(t);return}if(l.key==="Enter"&&(l.ctrlKey||l.metaKey)){this._dialogElement&&t.onCommit();return}},this._recorder.document.addEventListener("keydown",this._keyboardListener,!0);const i=this._recorder.document.createElement("x-pw-tools-list"),o=this._recorder.document.createElement("label");o.textContent=t.label,i.appendChild(o),i.appendChild(this._recorder.document.createElement("x-spacer")),i.appendChild(n),i.appendChild(r),this._dialogElement.appendChild(i);const s=this._recorder.document.createElement("x-pw-dialog-body");return s.appendChild(t.body),this._dialogElement.appendChild(s),this._recorder.highlight.appendChild(this._dialogElement),this._dialogElement}moveTo(t,n){this._dialogElement&&(this._dialogElement.style.top=t+"px",this._dialogElement.style.left=n+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}}function d1(e){let t=e.activeElement;for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function Ns(e){return(e.altKey?1:0)|(e.ctrlKey?2:0)|(e.metaKey?4:0)|(e.shiftKey?8:0)}function bc(e){switch(e.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function bs(e){if(e.target.nodeName==="CANVAS")return{x:e.offsetX,y:e.offsetY}}function B(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}function As(e){if(!e||e.nodeName!=="INPUT")return null;const t=e;return["checkbox","radio"].includes(t.type)?t:null}function Ls(e){return!e||e.nodeName!=="INPUT"?!1:e.type.toLowerCase()==="range"}function W(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function _p(e){for(const t of e)t();e.splice(0,e.length)}function f1(e,t,n){try{const r=e.parseSelector(t);return{selector:t,elements:e.querySelectorAll(r,n)}}catch{return{selector:t,elements:[]}}}function Sp(e,{tagName:t,attrs:n,children:r}){const i=e.createElementNS("http://www.w3.org/2000/svg",t);if(n)for(const[o,s]of Object.entries(n))i.setAttribute(o,s);if(r)for(const o of r)i.appendChild(Sp(e,o));return i}function Ha(e,t,n){return`internal:attr=[${e}=${xe(t,(n==null?void 0:n.exact)||!1)}]`}function h1(e,t){return`internal:testid=[${e}=${xe(t,!0)}]`}function p1(e,t){return"internal:label="+qe(e,!!(t!=null&&t.exact))}function g1(e,t){return Ha("alt",e,t)}function m1(e,t){return Ha("title",e,t)}function v1(e,t){return Ha("placeholder",e,t)}function y1(e,t){return"internal:text="+qe(e,!!(t!=null&&t.exact))}function w1(e,t={}){const n=[];return t.checked!==void 0&&n.push(["checked",String(t.checked)]),t.disabled!==void 0&&n.push(["disabled",String(t.disabled)]),t.selected!==void 0&&n.push(["selected",String(t.selected)]),t.expanded!==void 0&&n.push(["expanded",String(t.expanded)]),t.includeHidden!==void 0&&n.push(["include-hidden",String(t.includeHidden)]),t.level!==void 0&&n.push(["level",String(t.level)]),t.name!==void 0&&n.push(["name",xe(t.name,!!t.exact)]),t.pressed!==void 0&&n.push(["pressed",String(t.pressed)]),`internal:role=${e}${n.map(([r,i])=>`[${r}=${i}]`).join("")}`}const pr=Symbol("selector"),x1=class Sr{constructor(t,n,r){if(r!=null&&r.hasText&&(n+=` >> internal:has-text=${qe(r.hasText,!1)}`),r!=null&&r.hasNotText&&(n+=` >> internal:has-not-text=${qe(r.hasNotText,!1)}`),r!=null&&r.has&&(n+=" >> internal:has="+JSON.stringify(r.has[pr])),r!=null&&r.hasNot&&(n+=" >> internal:has-not="+JSON.stringify(r.hasNot[pr])),this[pr]=n,n){const s=t.parseSelector(n);this.element=t.querySelector(s,t.document,!1),this.elements=t.querySelectorAll(s,t.document)}const i=n,o=this;o.locator=(s,l)=>new Sr(t,i?i+" >> "+s:s,l),o.getByTestId=s=>o.locator(h1(t.testIdAttributeNameForStrictErrorAndConsoleCodegen(),s)),o.getByAltText=(s,l)=>o.locator(g1(s,l)),o.getByLabel=(s,l)=>o.locator(p1(s,l)),o.getByPlaceholder=(s,l)=>o.locator(v1(s,l)),o.getByText=(s,l)=>o.locator(y1(s,l)),o.getByTitle=(s,l)=>o.locator(m1(s,l)),o.getByRole=(s,l={})=>o.locator(w1(s,l)),o.filter=s=>new Sr(t,n,s),o.first=()=>o.locator("nth=0"),o.last=()=>o.locator("nth=-1"),o.nth=s=>o.locator(`nth=${s}`),o.and=s=>new Sr(t,i+" >> internal:and="+JSON.stringify(s[pr])),o.or=s=>new Sr(t,i+" >> internal:or="+JSON.stringify(s[pr]))}};let _1=x1;class S1{constructor(t){this._injectedScript=t,!this._injectedScript.window.playwright&&(this._injectedScript.window.playwright={$:(n,r)=>this._querySelector(n,!!r),$$:n=>this._querySelectorAll(n),inspect:n=>this._inspect(n),selector:n=>this._selector(n),generateLocator:(n,r)=>this._generateLocator(n,r),resume:()=>this._resume(),...new _1(t,"")},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(t,n){if(typeof t!="string")throw new Error("Usage: playwright.query('Playwright >> selector').");const r=this._injectedScript.parseSelector(t);return this._injectedScript.querySelector(r,this._injectedScript.document,n)}_querySelectorAll(t){if(typeof t!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const n=this._injectedScript.parseSelector(t);return this._injectedScript.querySelectorAll(n,this._injectedScript.document)}_inspect(t){if(typeof t!="string")throw new Error("Usage: playwright.inspect('Playwright >> selector').");this._injectedScript.window.inspect(this._querySelector(t,!1))}_selector(t){if(!(t instanceof Element))throw new Error("Usage: playwright.selector(element).");return this._injectedScript.generateSelectorSimple(t)}_generateLocator(t,n){if(!(t instanceof Element))throw new Error("Usage: playwright.locator(element).");const r=this._injectedScript.generateSelectorSimple(t);return zn(n||"javascript",r)}_resume(){this._injectedScript.window.__pw_resume().catch(()=>{})}}function E1(e,t){e=e.replace(/AriaRole\s*\.\s*([\w]+)/g,(o,s)=>s.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(o,s,l)=>`${s}(${l.toLowerCase()}`);const n=[];let r="";for(let o=0;o<e.length;++o){const s=e[o];if(s!=='"'&&s!=="'"&&s!=="`"&&s!=="/"){r+=s;continue}const l=e[o-1]==="r"||e[o]==="/";++o;let a="";for(;o<e.length;){if(e[o]==="\\"){l?(e[o+1]!==s&&(a+=e[o]),++o,a+=e[o]):(++o,e[o]==="n"?a+=`
64
- `:e[o]==="r"?a+="\r":e[o]==="t"?a+=" ":a+=e[o]),++o;continue}if(e[o]!==s){a+=e[o++];continue}break}n.push({quote:s,text:a}),r+=(s==="/"?"r":"")+"$"+n.length}r=r.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",");const i=n.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:Ep(r,n,t),preferredQuote:i}}function Ac(e){return[...e.matchAll(/\$\d+/g)].length}function Lc(e,t){return e.replace(/\$(\d+)/g,(n,r)=>`$${r-t}`)}function Ep(e,t,n){for(;;){const i=e.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!i)break;const o=i.index+i[0].length;let s=0,l=o;for(;l<e.length&&(e[l]==="("?s++:e[l]===")"&&s--,!(s<0));l++);let a=e.substring(0,o),u=0;["sethas(","sethasnot("].includes(i[1])&&(u=1,a=a.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const c=Ac(e.substring(0,o)),f=Lc(e.substring(o,l),c),d=Ac(f),g=t.slice(c,c+d),y=JSON.stringify(Ep(f,g,n));e=a.replace(/=$/,"2=")+`$${c+1}`+Lc(e.substring(l+u),d-1);const v=t.slice(0,c),w=t.slice(c+d);t=v.concat([{quote:'"',text:y}]).concat(w)}e=e.replace(/\,set([\w]+)\(([^)]+)\)/g,(i,o,s)=>","+o.toLowerCase()+"="+s.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${n}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/\,/g,"][");const r=e.split(".");for(let i=0;i<r.length-1;i++)if(r[i]==="internal:control=enter-frame"&&r[i+1].startsWith("nth=")){const[o]=r.splice(i,1);r.splice(i+1,0,o)}return r.map(i=>!i.startsWith("internal:")||i==="internal:control"?i.replace(/\$(\d+)/g,(o,s)=>t[+s-1].text):(i=i.includes("[")?i.replace(/\]/,"")+"]":i,i=i.replace(/(?:r)\$(\d+)(i)?/g,(o,s,l)=>{const a=t[+s-1];return i.startsWith("internal:attr")||i.startsWith("internal:testid")||i.startsWith("internal:role")?xe(new RegExp(a.text),!1)+(l||""):qe(new RegExp(a.text,l),!1)}).replace(/\$(\d+)(i|s)?/g,(o,s,l)=>{const a=t[+s-1];return i.startsWith("internal:has=")||i.startsWith("internal:has-not=")?a.text:i.startsWith("internal:testid")?xe(a.text,!0):i.startsWith("internal:attr")||i.startsWith("internal:role")?xe(a.text,l==="s"):qe(a.text,l==="s")}),i)).join(" >> ")}function T1(e,t,n){try{return Uo(t),t}catch{}try{const{selector:r,preferredQuote:i}=E1(t,n),o=xh(e,r,void 0,void 0,i),s=Ic(e,t);if(o.some(l=>Ic(e,l)===s))return r}catch{}return""}function Ic(e,t){return t=t.replace(/\s/g,""),e==="javascript"&&(t=t.replace(/\\?["`]/g,"'")),t}const k1=({url:e})=>x.jsxs("div",{className:"browser-frame-header",children:[x.jsxs("div",{style:{whiteSpace:"nowrap"},children:[x.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),x.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),x.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),x.jsx("div",{className:"browser-frame-address-bar",title:e||"about:blank",children:e||"about:blank"}),x.jsx("div",{style:{marginLeft:"auto"},children:x.jsxs("div",{children:[x.jsx("span",{className:"browser-frame-menu-bar"}),x.jsx("span",{className:"browser-frame-menu-bar"}),x.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),ew=({action:e,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedLocator:o,setHighlightedLocator:s,openPage:l})=>{const[a,u]=M.useState("action"),c=!1,f=M.useMemo(()=>A1(e),[e]),d=M.useMemo(()=>{const g=f[a];return g?L1(g):void 0},[f,a]);return x.jsxs("div",{className:"snapshot-tab vbox",children:[x.jsxs(Ia,{children:[x.jsx(dn,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:r,onClick:()=>i(!r),disabled:c}),["action","before","after"].map(g=>x.jsx(Eh,{id:g,title:b1(g),selected:a===g,onSelect:()=>u(g)},g)),x.jsx("div",{style:{flex:"auto"}}),x.jsx(dn,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(d!=null&&d.popoutUrl)||c,onClick:()=>{l||(l=window.open);const g=l((d==null?void 0:d.popoutUrl)||"","_blank");g==null||g.addEventListener("DOMContentLoaded",()=>{const y=new vp(g,!1,t,n,1,"chromium",[]);new S1(y)})}})]}),x.jsx(C1,{snapshotUrls:d,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedLocator:o,setHighlightedLocator:s}),c]})},C1=({snapshotUrls:e,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedLocator:o,setHighlightedLocator:s})=>{const l=M.useRef(null),a=M.useRef(null),[u,c]=M.useState({viewport:kp,url:""}),f=M.useRef({iteration:0,visibleIframe:0});return M.useEffect(()=>{(async()=>{const d=f.current.iteration+1,g=1-f.current.visibleIframe;f.current.iteration=d;const y=await I1(e==null?void 0:e.snapshotInfoUrl);if(f.current.iteration!==d)return;const v=[l,a][g].current;if(v){let w=()=>{};const p=new Promise(h=>w=h);try{v.addEventListener("load",w),v.addEventListener("error",w);const h=(e==null?void 0:e.snapshotUrl)||M1;v.contentWindow?v.contentWindow.location.replace(h):v.src=h,await p}catch{}finally{v.removeEventListener("load",w),v.removeEventListener("error",w)}}f.current.iteration===d&&(f.current.visibleIframe=g,c(y))})()},[e]),x.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:d=>{d.key==="Escape"&&r&&i(!1)},children:[x.jsx(Mc,{isInspecting:r,sdkLanguage:t,testIdAttributeName:n,highlightedLocator:o,setHighlightedLocator:s,iframe:l.current,iteration:f.current.iteration}),x.jsx(Mc,{isInspecting:r,sdkLanguage:t,testIdAttributeName:n,highlightedLocator:o,setHighlightedLocator:s,iframe:a.current,iteration:f.current.iteration}),x.jsx(N1,{snapshotInfo:u,children:x.jsxs("div",{className:"snapshot-switcher",children:[x.jsx("iframe",{ref:l,name:"snapshot",title:"DOM Snapshot",className:et(f.current.visibleIframe===0&&"snapshot-visible")}),x.jsx("iframe",{ref:a,name:"snapshot",title:"DOM Snapshot",className:et(f.current.visibleIframe===1&&"snapshot-visible")})]})})]})},N1=({snapshotInfo:e,children:t})=>{const[n,r]=To(),o={width:e.viewport.width,height:e.viewport.height+40},s=Math.min(n.width/o.width,n.height/o.height,1),l={x:(n.width-o.width)/2,y:(n.height-o.height)/2};return x.jsx("div",{ref:r,className:"snapshot-wrapper",children:x.jsxs("div",{className:"snapshot-container",style:{width:o.width+"px",height:o.height+"px",transform:`translate(${l.x}px, ${l.y}px) scale(${s})`},children:[x.jsx(k1,{url:e.url}),t]})})};function b1(e){return e==="before"?"Before":e==="after"?"After":e==="action"?"Action":e}const Mc=({iframe:e,isInspecting:t,sdkLanguage:n,testIdAttributeName:r,highlightedLocator:i,setHighlightedLocator:o,iteration:s})=>(M.useEffect(()=>{const l=[],a=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{Tp(l,n,r,a,"",e==null?void 0:e.contentWindow)}catch{}for(const{recorder:u,frameSelector:c}of l){const f=T1(n,i,r);u.setUIState({mode:t?"inspecting":"none",actionSelector:f.startsWith(c)?f.substring(c.length).trim():void 0,language:n,testIdAttributeName:r,overlay:{offsetX:0}},{async setSelector(d){o(zn(n,c+d))},highlightUpdated(){for(const d of l)d.recorder!==u&&d.recorder.clearHighlight()}})}},[e,t,i,o,n,r,s]),x.jsx(x.Fragment,{}));function Tp(e,t,n,r,i,o){if(!o)return;const s=o;if(!s._recorder){const l=new vp(o,r,t,n,1,"chromium",[]),a=new u1(l);s._injectedScript=l,s._recorder={recorder:a,frameSelector:i},r&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(a)))}e.push(s._recorder);for(let l=0;l<o.frames.length;++l){const a=o.frames[l],u=a.frameElement?s._injectedScript.generateSelectorSimple(a.frameElement,{omitInternalEngines:!0,testIdAttributeName:n})+" >> internal:control=enter-frame >> ":"";Tp(e,t,n,r,i+u,a)}}function A1(e){if(!e)return{};let t=e.beforeSnapshot?{action:e,snapshotName:e.beforeSnapshot}:void 0,n=e;for(;!t&&n;)n=gv(n),t=n!=null&&n.afterSnapshot?{action:n,snapshotName:n==null?void 0:n.afterSnapshot}:void 0;const r=e.afterSnapshot?{action:e,snapshotName:e.afterSnapshot}:t,i=e.inputSnapshot?{action:e,snapshotName:e.inputSnapshot,hasInputTarget:!0}:r;return i&&(i.point=e.point),{action:i,before:t,after:r}}function L1(e){const t=new URLSearchParams;t.set("trace",yo(e.action).traceUrl),t.set("name",e.snapshotName),e.point&&(t.set("pointX",String(e.point.x)),t.set("pointY",String(e.point.y)),e.hasInputTarget&&t.set("hasInputTarget","1"));const n=new URL(`snapshot/${e.action.pageId}?${t.toString()}`,window.location.href).toString(),r=new URL(`snapshotInfo/${e.action.pageId}?${t.toString()}`,window.location.href).toString(),i=new URLSearchParams;i.set("r",n),i.set("trace",yo(e.action).traceUrl),e.point&&(i.set("pointX",String(e.point.x)),i.set("pointY",String(e.point.y)),e.hasInputTarget&&t.set("hasInputTarget","1"));const o=new URL(`snapshot.html?${i.toString()}`,window.location.href).toString();return{snapshotInfoUrl:r,snapshotUrl:n,popoutUrl:o}}async function I1(e){const t={url:"",viewport:kp,timestamp:void 0,wallTime:void 0};if(e){const r=await(await fetch(e)).json();r.error||(t.url=r.url,t.viewport=r.viewport,t.timestamp=r.timestamp,t.wallTime=r.wallTime)}return t}const kp={width:1280,height:720},M1='data:text/html,<body style="background: #ddd"></body>',P1=La,R1=({stack:e,setSelectedFrame:t,selectedFrame:n})=>{const r=e||[];return x.jsx(P1,{name:"stack-trace",items:r,selectedItem:r[n],render:i=>{const o=i.file[1]===":"?"\\":"/";return x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"stack-trace-frame-function",children:i.function||"(anonymous)"}),x.jsx("span",{className:"stack-trace-frame-location",children:i.file.split(o).pop()}),x.jsx("span",{className:"stack-trace-frame-line",children:":"+i.line})]})},onSelected:i=>t(r.indexOf(i))})},tw=({stack:e,sources:t,rootDir:n,fallbackLocation:r,stackFrameLocation:i,onOpenExternally:o})=>{const[s,l]=M.useState(),[a,u]=M.useState(0);M.useEffect(()=>{s!==e&&(l(e),u(0))},[e,s,l,u]);const{source:c,highlight:f,targetLine:d,fileName:g,location:y}=Xp(async()=>{var I,D,N,P;const h=e==null?void 0:e[a],m=!(h!=null&&h.file);if(m&&!r)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const _=m?r.file:h.file;let T=t.get(_);T||(T={errors:((I=r==null?void 0:r.source)==null?void 0:I.errors)||[],content:(D=r==null?void 0:r.source)==null?void 0:D.content},t.set(_,T));const E=m?r:h,k=m?(r==null?void 0:r.line)||((N=T.errors[0])==null?void 0:N.line)||0:h.line,b=n&&_.startsWith(n)?_.substring(n.length+1):_,S=T.errors.map(Y=>({type:"error",line:Y.line,message:Y.message}));if(S.push({line:k,type:"running"}),((P=r==null?void 0:r.source)==null?void 0:P.content)!==void 0)T.content=r.source.content;else if(T.content===void 0||m){const Y=await $1(_);try{let it=await fetch(`sha1/src@${Y}.txt`);it.status===404&&(it=await fetch(`file?path=${encodeURIComponent(_)}`)),it.status>=400?T.content=`<Unable to read "${_}">`:T.content=await it.text()}catch{T.content=`<Unable to read "${_}">`}}return{source:T,highlight:S,targetLine:k,fileName:b,location:E}},[e,a,n,r],{source:{errors:[],content:"Loading…"},highlight:[]}),v=M.useCallback(()=>{y&&(o?o(y):window.location.href=`vscode://file//${y.file}:${y.line}`)},[o,y]),w=((e==null?void 0:e.length)??0)>1,p=O1(g);return x.jsx(Gf,{sidebarSize:200,orientation:i==="bottom"?"vertical":"horizontal",sidebarHidden:!w,main:x.jsxs("div",{className:"vbox","data-testid":"source-code",children:[g&&x.jsxs(Ia,{children:[x.jsx("div",{className:"source-tab-file-name",title:g,children:x.jsx("div",{children:p})}),x.jsx(Zv,{description:"Copy filename",value:p}),y&&x.jsx(dn,{icon:"link-external",title:"Open in VS Code",onClick:v})]}),x.jsx(Vo,{text:c.content||"",language:"javascript",highlight:f,revealLine:d,readOnly:!0,lineNumbers:!0})]}),sidebar:x.jsx(R1,{stack:e,selectedFrame:a,setSelectedFrame:u})})};async function $1(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-1",t),r=[],i=new DataView(n);for(let o=0;o<i.byteLength;o+=1){const s=i.getUint8(o).toString(16).padStart(2,"0");r.push(s)}return r.join("")}function O1(e){if(!e)return"";const t=e!=null&&e.includes("/")?"/":"\\";return(e==null?void 0:e.split(t).pop())??""}const nw=({showScreenshot:e,sdkLanguage:t,setIsInspecting:n,highlightedLocator:r,setHighlightedLocator:i})=>x.jsxs("div",{className:"vbox",style:{backgroundColor:"var(--vscode-sideBar-background)"},children:[x.jsx("div",{style:{margin:"10px 0px 10px 10px",color:"var(--vscode-editorCodeLens-foreground)",flex:"none"},children:"Locator"}),x.jsx("div",{style:{margin:"0 10px 10px",flex:"auto"},children:x.jsx(Vo,{text:e?'/* disable "show screenshot" setting to pick locator */':r,language:t,focusOnChange:!0,isFocused:!0,wrapLines:!0,onChange:o=>{i(o),n(!1)}})}),x.jsx("div",{style:{position:"absolute",right:5,top:5},children:x.jsx(dn,{icon:"files",title:"Copy locator",onClick:()=>{Jp(r)}})})]});export{X1 as A,ew as B,Zv as C,s0 as D,tw as E,F1 as F,S0 as G,q1 as H,nw as I,Jp as J,A1 as K,La as L,W1 as M,Z1 as N,L1 as O,_h as P,C1 as Q,Ze as R,Gf as S,dn as T,bp as U,D1 as V,u0 as _,H1 as a,Ms as b,sv as c,U1 as d,V1 as e,et as f,Ia as g,qa as h,B1 as i,x as j,Q1 as k,K1 as l,Is as m,zn as n,xo as o,z1 as p,T0 as q,M as r,Yt as s,tg as t,To as u,eg as v,Y1 as w,Vo as x,G1 as y,J1 as z};
64
+ `:e[o]==="r"?a+="\r":e[o]==="t"?a+=" ":a+=e[o]),++o;continue}if(e[o]!==s){a+=e[o++];continue}break}n.push({quote:s,text:a}),r+=(s==="/"?"r":"")+"$"+n.length}r=r.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",");const i=n.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:Ep(r,n,t),preferredQuote:i}}function Ac(e){return[...e.matchAll(/\$\d+/g)].length}function Lc(e,t){return e.replace(/\$(\d+)/g,(n,r)=>`$${r-t}`)}function Ep(e,t,n){for(;;){const i=e.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!i)break;const o=i.index+i[0].length;let s=0,l=o;for(;l<e.length&&(e[l]==="("?s++:e[l]===")"&&s--,!(s<0));l++);let a=e.substring(0,o),u=0;["sethas(","sethasnot("].includes(i[1])&&(u=1,a=a.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const c=Ac(e.substring(0,o)),f=Lc(e.substring(o,l),c),d=Ac(f),g=t.slice(c,c+d),y=JSON.stringify(Ep(f,g,n));e=a.replace(/=$/,"2=")+`$${c+1}`+Lc(e.substring(l+u),d-1);const v=t.slice(0,c),w=t.slice(c+d);t=v.concat([{quote:'"',text:y}]).concat(w)}e=e.replace(/\,set([\w]+)\(([^)]+)\)/g,(i,o,s)=>","+o.toLowerCase()+"="+s.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${n}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/\,/g,"][");const r=e.split(".");for(let i=0;i<r.length-1;i++)if(r[i]==="internal:control=enter-frame"&&r[i+1].startsWith("nth=")){const[o]=r.splice(i,1);r.splice(i+1,0,o)}return r.map(i=>!i.startsWith("internal:")||i==="internal:control"?i.replace(/\$(\d+)/g,(o,s)=>t[+s-1].text):(i=i.includes("[")?i.replace(/\]/,"")+"]":i,i=i.replace(/(?:r)\$(\d+)(i)?/g,(o,s,l)=>{const a=t[+s-1];return i.startsWith("internal:attr")||i.startsWith("internal:testid")||i.startsWith("internal:role")?xe(new RegExp(a.text),!1)+(l||""):qe(new RegExp(a.text,l),!1)}).replace(/\$(\d+)(i|s)?/g,(o,s,l)=>{const a=t[+s-1];return i.startsWith("internal:has=")||i.startsWith("internal:has-not=")?a.text:i.startsWith("internal:testid")?xe(a.text,!0):i.startsWith("internal:attr")||i.startsWith("internal:role")?xe(a.text,l==="s"):qe(a.text,l==="s")}),i)).join(" >> ")}function T1(e,t,n){try{return Uo(t),t}catch{}try{const{selector:r,preferredQuote:i}=E1(t,n),o=xh(e,r,void 0,void 0,i),s=Ic(e,t);if(o.some(l=>Ic(e,l)===s))return r}catch{}return""}function Ic(e,t){return t=t.replace(/\s/g,""),e==="javascript"&&(t=t.replace(/\\?["`]/g,"'")),t}const k1=({url:e})=>x.jsxs("div",{className:"browser-frame-header",children:[x.jsxs("div",{style:{whiteSpace:"nowrap"},children:[x.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),x.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),x.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),x.jsx("div",{className:"browser-frame-address-bar",title:e||"about:blank",children:e||"about:blank"}),x.jsx("div",{style:{marginLeft:"auto"},children:x.jsxs("div",{children:[x.jsx("span",{className:"browser-frame-menu-bar"}),x.jsx("span",{className:"browser-frame-menu-bar"}),x.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),ew=({action:e,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedLocator:o,setHighlightedLocator:s,openPage:l})=>{const[a,u]=M.useState("action"),c=!1,f=M.useMemo(()=>A1(e),[e]),d=M.useMemo(()=>{const g=f[a];return g?L1(g):void 0},[f,a]);return x.jsxs("div",{className:"snapshot-tab vbox",children:[x.jsxs(Ia,{children:[x.jsx(dn,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:r,onClick:()=>i(!r),disabled:c}),["action","before","after"].map(g=>x.jsx(Eh,{id:g,title:b1(g),selected:a===g,onSelect:()=>u(g)},g)),x.jsx("div",{style:{flex:"auto"}}),x.jsx(dn,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(d!=null&&d.popoutUrl)||c,onClick:()=>{l||(l=window.open);const g=l((d==null?void 0:d.popoutUrl)||"","_blank");g==null||g.addEventListener("DOMContentLoaded",()=>{const y=new vp(g,!1,t,n,1,"chromium",[]);new S1(y)})}})]}),x.jsx(C1,{snapshotUrls:d,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedLocator:o,setHighlightedLocator:s}),c]})},C1=({snapshotUrls:e,sdkLanguage:t,testIdAttributeName:n,isInspecting:r,setIsInspecting:i,highlightedLocator:o,setHighlightedLocator:s})=>{const l=M.useRef(null),a=M.useRef(null),[u,c]=M.useState({viewport:kp,url:""}),f=M.useRef({iteration:0,visibleIframe:0});return M.useEffect(()=>{(async()=>{const d=f.current.iteration+1,g=1-f.current.visibleIframe;f.current.iteration=d;const y=await I1(e==null?void 0:e.snapshotInfoUrl);if(f.current.iteration!==d)return;const v=[l,a][g].current;if(v){let w=()=>{};const p=new Promise(h=>w=h);try{v.addEventListener("load",w),v.addEventListener("error",w);const h=(e==null?void 0:e.snapshotUrl)||M1;v.contentWindow?v.contentWindow.location.replace(h):v.src=h,await p}catch{}finally{v.removeEventListener("load",w),v.removeEventListener("error",w)}}f.current.iteration===d&&(f.current.visibleIframe=g,c(y))})()},[e]),x.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:d=>{d.key==="Escape"&&r&&i(!1)},children:[x.jsx(Mc,{isInspecting:r,sdkLanguage:t,testIdAttributeName:n,highlightedLocator:o,setHighlightedLocator:s,iframe:l.current,iteration:f.current.iteration}),x.jsx(Mc,{isInspecting:r,sdkLanguage:t,testIdAttributeName:n,highlightedLocator:o,setHighlightedLocator:s,iframe:a.current,iteration:f.current.iteration}),x.jsx(N1,{snapshotInfo:u,children:x.jsxs("div",{className:"snapshot-switcher",children:[x.jsx("iframe",{ref:l,name:"snapshot",title:"DOM Snapshot",className:et(f.current.visibleIframe===0&&"snapshot-visible")}),x.jsx("iframe",{ref:a,name:"snapshot",title:"DOM Snapshot",className:et(f.current.visibleIframe===1&&"snapshot-visible")})]})})]})},N1=({snapshotInfo:e,children:t})=>{const[n,r]=To(),o={width:e.viewport.width,height:e.viewport.height+40},s=Math.min(n.width/o.width,n.height/o.height,1),l={x:(n.width-o.width)/2,y:(n.height-o.height)/2};return x.jsx("div",{ref:r,className:"snapshot-wrapper",children:x.jsxs("div",{className:"snapshot-container",style:{width:o.width+"px",height:o.height+"px",transform:`translate(${l.x}px, ${l.y}px) scale(${s})`},children:[x.jsx(k1,{url:e.url}),t]})})};function b1(e){return e==="before"?"Before":e==="after"?"After":e==="action"?"Action":e}const Mc=({iframe:e,isInspecting:t,sdkLanguage:n,testIdAttributeName:r,highlightedLocator:i,setHighlightedLocator:o,iteration:s})=>(M.useEffect(()=>{const l=[],a=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{Tp(l,n,r,a,"",e==null?void 0:e.contentWindow)}catch{}for(const{recorder:u,frameSelector:c}of l){const f=T1(n,i,r);u.setUIState({mode:t?"inspecting":"none",actionSelector:f.startsWith(c)?f.substring(c.length).trim():void 0,language:n,testIdAttributeName:r,overlay:{offsetX:0}},{async setSelector(d){o(zn(n,c+d))},highlightUpdated(){for(const d of l)d.recorder!==u&&d.recorder.clearHighlight()}})}},[e,t,i,o,n,r,s]),x.jsx(x.Fragment,{}));function Tp(e,t,n,r,i,o){if(!o)return;const s=o;if(!s._recorder){const l=new vp(o,r,t,n,1,"chromium",[]),a=new u1(l);s._injectedScript=l,s._recorder={recorder:a,frameSelector:i},r&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(a)))}e.push(s._recorder);for(let l=0;l<o.frames.length;++l){const a=o.frames[l],u=a.frameElement?s._injectedScript.generateSelectorSimple(a.frameElement,{omitInternalEngines:!0,testIdAttributeName:n})+" >> internal:control=enter-frame >> ":"";Tp(e,t,n,r,i+u,a)}}function A1(e){if(!e)return{};let t=e.beforeSnapshot?{action:e,snapshotName:e.beforeSnapshot}:void 0,n=e;for(;!t&&n;)n=gv(n),t=n!=null&&n.afterSnapshot?{action:n,snapshotName:n==null?void 0:n.afterSnapshot}:void 0;const r=e.afterSnapshot?{action:e,snapshotName:e.afterSnapshot}:t,i=e.inputSnapshot?{action:e,snapshotName:e.inputSnapshot,hasInputTarget:!0}:r;return i&&(i.point=e.point),{action:i,before:t,after:r}}function L1(e){const t=new URLSearchParams;t.set("trace",yo(e.action).traceUrl),t.set("name",e.snapshotName),e.point&&(t.set("pointX",String(e.point.x)),t.set("pointY",String(e.point.y)),e.hasInputTarget&&t.set("hasInputTarget","1"));const n=new URL(`snapshot/${e.action.pageId}?${t.toString()}`,window.location.href).toString(),r=new URL(`snapshotInfo/${e.action.pageId}?${t.toString()}`,window.location.href).toString(),i=new URLSearchParams;i.set("r",n),i.set("trace",yo(e.action).traceUrl),e.point&&(i.set("pointX",String(e.point.x)),i.set("pointY",String(e.point.y)),e.hasInputTarget&&t.set("hasInputTarget","1"));const o=new URL(`snapshot.html?${i.toString()}`,window.location.href).toString();return{snapshotInfoUrl:r,snapshotUrl:n,popoutUrl:o}}async function I1(e){const t={url:"",viewport:kp,timestamp:void 0,wallTime:void 0};if(e){const r=await(await fetch(e)).json();r.error||(t.url=r.url,t.viewport=r.viewport,t.timestamp=r.timestamp,t.wallTime=r.wallTime)}return t}const kp={width:1280,height:720},M1='data:text/html,<body style="background: #ddd"></body>',P1=La,R1=({stack:e,setSelectedFrame:t,selectedFrame:n})=>{const r=e||[];return x.jsx(P1,{name:"stack-trace",items:r,selectedItem:r[n],render:i=>{const o=i.file[1]===":"?"\\":"/";return x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"stack-trace-frame-function",children:i.function||"(anonymous)"}),x.jsx("span",{className:"stack-trace-frame-location",children:i.file.split(o).pop()}),x.jsx("span",{className:"stack-trace-frame-line",children:":"+i.line})]})},onSelected:i=>t(r.indexOf(i))})},tw=({stack:e,sources:t,rootDir:n,fallbackLocation:r,stackFrameLocation:i,onOpenExternally:o})=>{const[s,l]=M.useState(),[a,u]=M.useState(0);M.useEffect(()=>{s!==e&&(l(e),u(0))},[e,s,l,u]);const{source:c,highlight:f,targetLine:d,fileName:g,location:y}=Xp(async()=>{var I,D,N,P;const h=e==null?void 0:e[a],m=!(h!=null&&h.file);if(m&&!r)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const _=m?r.file:h.file;let T=t.get(_);T||(T={errors:((I=r==null?void 0:r.source)==null?void 0:I.errors)||[],content:(D=r==null?void 0:r.source)==null?void 0:D.content},t.set(_,T));const E=m?r:h,k=m?(r==null?void 0:r.line)||((N=T.errors[0])==null?void 0:N.line)||0:h.line,b=n&&_.startsWith(n)?_.substring(n.length+1):_,S=T.errors.map(Y=>({type:"error",line:Y.line,message:Y.message}));if(S.push({line:k,type:"running"}),((P=r==null?void 0:r.source)==null?void 0:P.content)!==void 0)T.content=r.source.content;else if(T.content===void 0||m){const Y=await $1(_);try{let it=await fetch(`sha1/src@${Y}.txt`);it.status===404&&(it=await fetch(`file?path=${encodeURIComponent(_)}`)),it.status>=400?T.content=`<Unable to read "${_}">`:T.content=await it.text()}catch{T.content=`<Unable to read "${_}">`}}return{source:T,highlight:S,targetLine:k,fileName:b,location:E}},[e,a,n,r],{source:{errors:[],content:"Loading…"},highlight:[]}),v=M.useCallback(()=>{y&&(o?o(y):window.location.href=`vscode://file//${y.file}:${y.line}`)},[o,y]),w=((e==null?void 0:e.length)??0)>1,p=O1(g);return x.jsx(Gf,{sidebarSize:200,orientation:i==="bottom"?"vertical":"horizontal",sidebarHidden:!w,main:x.jsxs("div",{className:"vbox","data-testid":"source-code",children:[g&&x.jsxs(Ia,{children:[x.jsx("div",{className:"source-tab-file-name",title:g,children:x.jsx("div",{children:p})}),x.jsx(Zv,{description:"Copy filename",value:p}),y&&x.jsx(dn,{icon:"link-external",title:"Open in VS Code",onClick:v})]}),x.jsx(Vo,{text:c.content||"",language:"javascript",highlight:f,revealLine:d,readOnly:!0,lineNumbers:!0})]}),sidebar:x.jsx(R1,{stack:e,selectedFrame:a,setSelectedFrame:u})})};async function $1(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-1",t),r=[],i=new DataView(n);for(let o=0;o<i.byteLength;o+=1){const s=i.getUint8(o).toString(16).padStart(2,"0");r.push(s)}return r.join("")}function O1(e){if(!e)return"";const t=e!=null&&e.includes("/")?"/":"\\";return(e==null?void 0:e.split(t).pop())??""}const nw=({showScreenshot:e,sdkLanguage:t,setIsInspecting:n,highlightedLocator:r,setHighlightedLocator:i})=>x.jsxs("div",{className:"vbox",style:{backgroundColor:"var(--vscode-sideBar-background)"},children:[x.jsx("div",{style:{margin:"10px 0px 10px 10px",color:"var(--vscode-editorCodeLens-foreground)",flex:"none"},children:"Locator"}),x.jsx("div",{style:{margin:"0 10px 10px",flex:"auto"},children:x.jsx(Vo,{text:e?'/* disable "show screenshot" setting to pick locator */':r,language:t,focusOnChange:!0,isFocused:!0,wrapLines:!0,onChange:o=>{i(o),n(!1)}})}),x.jsx("div",{style:{position:"absolute",right:5,top:5},children:x.jsx(dn,{icon:"files",title:"Copy locator",onClick:()=>{Jp(r)}})})]});export{X1 as A,ew as B,Zv as C,s0 as D,tw as E,F1 as F,S0 as G,q1 as H,nw as I,Jp as J,A1 as K,La as L,W1 as M,Z1 as N,L1 as O,_h as P,C1 as Q,Ze as R,Gf as S,dn as T,D1 as U,bp as V,u0 as _,H1 as a,Ms as b,sv as c,U1 as d,V1 as e,et as f,Ia as g,qa as h,B1 as i,x as j,Q1 as k,K1 as l,Is as m,zn as n,xo as o,z1 as p,T0 as q,M as r,Yt as s,tg as t,To as u,eg as v,Y1 as w,Vo as x,G1 as y,J1 as z};