@openremote/manager 1.9.0-snapshot.20250930100254 → 1.9.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 (107) hide show
  1. package/app-test-report/data/0209f4fad4f5692d18994251fba0a2972ea3f421.webm +0 -0
  2. package/app-test-report/data/09c5ce1e9b722c96417945abadb9577875c40dfd.webm +0 -0
  3. package/app-test-report/data/17771569940c05c0e731dc77c4a1c1f3e46eba35.webm +0 -0
  4. package/app-test-report/data/1f3816a13d6e44df811aef1fab84ec5d91a5c008.webm +0 -0
  5. package/app-test-report/data/2b6decb5aa2f6e7c7d550fa995901b62aa50edc1.webm +0 -0
  6. package/app-test-report/data/37a0507a7d92e0d9e6f8186c28221ba3a295c61d.webm +0 -0
  7. package/app-test-report/data/4470a365d2f2bd0c479196c1e39abc7b7b5205f8.webm +0 -0
  8. package/app-test-report/data/5509c7e56e3cc249aab5f036e057e926ffc5628e.webm +0 -0
  9. package/app-test-report/data/5ce92480d9cab3f1782ec573aaaf366eee50a026.webm +0 -0
  10. package/app-test-report/data/61c3fa761fd65def99b3fc3a5c41e70d9d77a152.webm +0 -0
  11. package/app-test-report/data/653b33c1bd93a220c3b6e824d8e21220afcf3e5f.webm +0 -0
  12. package/app-test-report/data/7eafae0a7fd9b203c9ffc0a0b7d5fae0f93fbacc.webm +0 -0
  13. package/app-test-report/data/8a80ddc970d27a4f85b6ad68774dff4a0cd6f984.webm +0 -0
  14. package/app-test-report/data/a19aa25bc748d49d15cac698906b9066ebdab3fe.webm +0 -0
  15. package/app-test-report/data/a32ac371010318ef85fffa47ab8fbdda1a24432f.webm +0 -0
  16. package/app-test-report/data/a4544ea355859a7102af8ac25bd147a4c4ea0088.webm +0 -0
  17. package/app-test-report/data/a571ee82d165881ddc494cd94666c16141fdd8a6.webm +0 -0
  18. package/app-test-report/data/aa9ec504e8a7cb2d3c6039a219acc55152f7b82c.webm +0 -0
  19. package/app-test-report/data/adb644839cac86a01d84e59cc5203907cb85ded0.webm +0 -0
  20. package/app-test-report/data/bc2240ffa52fa561c325d99d2bd3c01d2c795ae7.webm +0 -0
  21. package/app-test-report/data/bdc214485f10aabe16d6820878c116fa9e75f635.webm +0 -0
  22. package/app-test-report/data/c7ed6fc06625aef66cbc4aafaaa72b739d3527f7.webm +0 -0
  23. package/app-test-report/data/d0393e879f50113ab8655a82569b7b9395407ca2.webm +0 -0
  24. package/app-test-report/data/d190e48f74cbc6dc193322945f72c9a6b80d8ddf.webm +0 -0
  25. package/app-test-report/data/ddf741170a85c30ea232bbc96e56dcb570aac14f.webm +0 -0
  26. package/app-test-report/data/eb364099413559ead3d81d72018875c7c28b73e8.webm +0 -0
  27. package/app-test-report/data/f21ba690e2bf8ccfeb17d884c8da2f3cd5c5b39e.webm +0 -0
  28. package/app-test-report/index.html +1 -1
  29. package/dist/{bundle.f334183bd96cb464.js → bundle.33ed96eb118bf522.js} +4 -4
  30. package/dist/{bundle.1e8d8c993fd2da7c.js → bundle.c42788f9ca3298d2.js} +4 -4
  31. package/dist/index.html +1 -1
  32. package/package.json +6 -6
  33. package/test-results/assets-Add-all-primitive-configuration-items-chromium/video.webm +0 -0
  34. package/test-results/assets-Add-new-Battery-asset-and-configure-its-attributes-chromium/video.webm +0 -0
  35. package/test-results/assets-Add-new-Solar-Panel-e5652-nd-configure-its-attributes-chromium/video.webm +0 -0
  36. package/test-results/assets-Delete-specified-assets-and-verify-they-are-removed-chromium/video.webm +0 -0
  37. package/test-results/assets-Open-browser-tab-directly-to-the-Battery-asset-chromium/video.webm +0 -0
  38. package/test-results/assets-Open-browser-tab-directly-to-the-Solar-Panel-asset-chromium/video.webm +0 -0
  39. package/test-results/assets-Search-by-Asset-ID-and-select-the-Battery-asset-chromium/video.webm +0 -0
  40. package/test-results/assets-Search-by-Asset-ID-and-select-the-Solar-Panel-asset-chromium/video.webm +0 -0
  41. package/test-results/assets-Search-for-and-select-a-Battery-asset-chromium/video.webm +0 -0
  42. package/test-results/assets-Search-for-and-select-a-Solar-Panel-asset-chromium/video.webm +0 -0
  43. package/test-results/assets-Set-ruleState-and-s-2e442-olar-Panel-asset-attributes-chromium/video.webm +0 -0
  44. package/test-results/assets-Set-ruleState-and-s-8e0b7-or-Battery-asset-attributes-chromium/video.webm +0 -0
  45. package/test-results/assets-Toggle-read-only-fo-6c2bd-tributes-on-a-Battery-asset-chromium/video.webm +0 -0
  46. package/test-results/assets-Toggle-read-only-fo-70b73-utes-on-a-Solar-Panel-asset-chromium/video.webm +0 -0
  47. package/test-results/assets-Update-a-Battery-asset-s-attributes-and-location-chromium/video.webm +0 -0
  48. package/test-results/assets-Update-a-Solar-Panel-asset-s-attributes-and-location-chromium/video.webm +0 -0
  49. package/test-results/map-Verify-that-asset-mark-4c130--map-and-navigate-correctly-chromium/video.webm +0 -0
  50. package/test-results/roles-Create-a-new-role-as-0988c-user-and-verify-permissions-chromium/video.webm +0 -0
  51. package/test-results/roles-Delete-an-existing-r-be22b-verify-it-no-longer-appears-chromium/video.webm +0 -0
  52. package/test-results/rules-Create-a-Flow-rule-for-an-asset-with-logic-connections-chromium/video.webm +0 -0
  53. package/test-results/rules-Create-a-When-Then-r-a1797-t-with-a-trigger-and-action-chromium/video.webm +0 -0
  54. package/test-results/test-test.cleanup.ts-Delete-the-smartcity-realm-cleanup-manager/video.webm +0 -0
  55. package/test-results/test-test.cleanup.ts-Delete-the-smartcity-user-cleanup-manager/video.webm +0 -0
  56. package/test-results/test-test.setup.ts-Add-realm-called-smartcity--setup-manager/video.webm +0 -0
  57. package/test-results/test-test.setup.ts-Add-user-called-smartcity--setup-manager/video.webm +0 -0
  58. package/test-results/test-test.setup.ts-Login-as-admin-user-setup-manager/video.webm +0 -0
  59. package/test-results/test-test.setup.ts-Login-as-smartcity-user-setup-manager/video.webm +0 -0
  60. package/app-test-report/data/0de678cd39a1923b7ed7006215d034746a972aed.webm +0 -0
  61. package/app-test-report/data/169841187df052cffa1aed30562753ffeeeafeae.webm +0 -0
  62. package/app-test-report/data/2831e71de549a995259f2c95c0198d39dad51dd6.webm +0 -0
  63. package/app-test-report/data/2db8b7e9c18164308b83ff3184193d2981423588.webm +0 -0
  64. package/app-test-report/data/2fd299837630291e259ae40a6c054adc33201317.webm +0 -0
  65. package/app-test-report/data/31288f71a5723aaecc1d49ef1ef5c48b0466a455.webm +0 -0
  66. package/app-test-report/data/3132c0f774c1de3f72a6d68a1aebd829542b9e4a.webm +0 -0
  67. package/app-test-report/data/32e9bc1018388677f7e9a31e4d8f93019bfd0282.webm +0 -0
  68. package/app-test-report/data/580aa62f4cc1af0d2b124690e0cfd85ba34b3784.md +0 -18
  69. package/app-test-report/data/58a426136fb83edf7b853582d393ae0c75a66254.webm +0 -0
  70. package/app-test-report/data/5f59f6cb7c65b047831f2ca41afbfe96240a4a7f.webm +0 -0
  71. package/app-test-report/data/6bb8a8f4f343df0ad7e014ee36b7821fb6c69f66.webm +0 -0
  72. package/app-test-report/data/71368fa611afbdbd0b55a2243f8a0ff0413df166.webm +0 -0
  73. package/app-test-report/data/751231026f95131d9bdcd809090c48b8dc17b374.webm +0 -0
  74. package/app-test-report/data/7b35a606b8641e43252d673e3950869bb64612e5.webm +0 -0
  75. package/app-test-report/data/7e5676dcb07b40bb0df38620072bfb99b0f3adbb.webm +0 -0
  76. package/app-test-report/data/8181270710bf05c09da94f559fc8ec6f4db3ade1.webm +0 -0
  77. package/app-test-report/data/8a3bc73dfe36f318d381113f54dc1a06ec5f6baa.webm +0 -0
  78. package/app-test-report/data/9d2767b2880b6a471f3ce30f6fbe3098fcb426b0.webm +0 -0
  79. package/app-test-report/data/a707221faef39dc58885ded99567d173a88269ce.webm +0 -0
  80. package/app-test-report/data/ad46278b01368a9a7cb8ffb15ef44114a77b5332.webm +0 -0
  81. package/app-test-report/data/bbc8cd2e3e9034091d9b7ac7bbfbd2688c6c144f.webm +0 -0
  82. package/app-test-report/data/bcc8dca52a8915be209c54977a34a6104e836653.zip +0 -0
  83. package/app-test-report/data/c24ca21a2393a8608f3e7365169f290a12e05ba9.webm +0 -0
  84. package/app-test-report/data/d12d5c3e588f6d2de1e8d69c42952c9c5ec64e6f.webm +0 -0
  85. package/app-test-report/data/d634093490baf87c7b9d8ec58f6b7b3467496080.webm +0 -0
  86. package/app-test-report/data/e15db5e457bb9636c24922a9ce4f68c5d8a8834e.webm +0 -0
  87. package/app-test-report/data/e4c873944124010f1dac46e0d704087ea2615ca7.webm +0 -0
  88. package/app-test-report/data/e89f4be6db3ce7b2fae4fdc9d7341ea711c8b674.webm +0 -0
  89. package/app-test-report/data/f96086f7bdd66ed2fb281bcfc74560b447bf93c4.webm +0 -0
  90. package/app-test-report/trace/assets/codeMirrorModule-rKSJ91kC.js +0 -24
  91. package/app-test-report/trace/assets/defaultSettingsView-CUd-tHFm.js +0 -256
  92. package/app-test-report/trace/codeMirrorModule.C3UTv-Ge.css +0 -1
  93. package/app-test-report/trace/codicon.DCmgc-ay.ttf +0 -0
  94. package/app-test-report/trace/defaultSettingsView.NYBT19Ch.css +0 -1
  95. package/app-test-report/trace/index.CFOW-Ezb.css +0 -1
  96. package/app-test-report/trace/index.Cu8n3rOi.js +0 -2
  97. package/app-test-report/trace/index.html +0 -43
  98. package/app-test-report/trace/playwright-logo.svg +0 -9
  99. package/app-test-report/trace/snapshot.html +0 -21
  100. package/app-test-report/trace/sw.bundle.js +0 -3
  101. package/app-test-report/trace/uiMode.BCbdHUa5.js +0 -5
  102. package/app-test-report/trace/uiMode.BatfzHMG.css +0 -1
  103. package/app-test-report/trace/uiMode.html +0 -17
  104. package/app-test-report/trace/xtermModule.Beg8tuEN.css +0 -32
  105. package/test-results/assets-Set-ruleState-and-s-8e0b7-or-Battery-asset-attributes-chromium/error-context.md +0 -18
  106. package/test-results/assets-Set-ruleState-and-s-8e0b7-or-Battery-asset-attributes-chromium/trace.zip +0 -0
  107. package/test-results/assets-Set-ruleState-and-s-8e0b7-or-Battery-asset-attributes-chromium-retry1/video.webm +0 -0
@@ -1,256 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-rKSJ91kC.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
2
- var p0=Object.defineProperty;var m0=(t,e,n)=>e in t?p0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Ee=(t,e,n)=>m0(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function g0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var au={exports:{}},bi={},cu={exports:{}},me={};/**
3
- * @license React
4
- * react.production.min.js
5
- *
6
- * Copyright (c) Facebook, Inc. and its affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var Ep;function y0(){if(Ep)return me;Ep=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,_={};function E(I,U,de){this.props=I,this.context=U,this.refs=_,this.updater=de||S}E.prototype.isReactComponent={},E.prototype.setState=function(I,U){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,U,"setState")},E.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function C(){}C.prototype=E.prototype;function A(I,U,de){this.props=I,this.context=U,this.refs=_,this.updater=de||S}var B=A.prototype=new C;B.constructor=A,k(B,E.prototype),B.isPureReactComponent=!0;var R=Array.isArray,D=Object.prototype.hasOwnProperty,z={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function F(I,U,de){var fe,pe={},ye=null,Se=null;if(U!=null)for(fe in U.ref!==void 0&&(Se=U.ref),U.key!==void 0&&(ye=""+U.key),U)D.call(U,fe)&&!H.hasOwnProperty(fe)&&(pe[fe]=U[fe]);var he=arguments.length-2;if(he===1)pe.children=de;else if(1<he){for(var _e=Array(he),ct=0;ct<he;ct++)_e[ct]=arguments[ct+2];pe.children=_e}if(I&&I.defaultProps)for(fe in he=I.defaultProps,he)pe[fe]===void 0&&(pe[fe]=he[fe]);return{$$typeof:t,type:I,key:ye,ref:Se,props:pe,_owner:z.current}}function M(I,U){return{$$typeof:t,type:I.type,key:U,ref:I.ref,props:I.props,_owner:I._owner}}function G(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function K(I){var U={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(de){return U[de]})}var O=/\/+/g;function X(I,U){return typeof I=="object"&&I!==null&&I.key!=null?K(""+I.key):U.toString(36)}function ce(I,U,de,fe,pe){var ye=typeof I;(ye==="undefined"||ye==="boolean")&&(I=null);var Se=!1;if(I===null)Se=!0;else switch(ye){case"string":case"number":Se=!0;break;case"object":switch(I.$$typeof){case t:case e:Se=!0}}if(Se)return Se=I,pe=pe(Se),I=fe===""?"."+X(Se,0):fe,R(pe)?(de="",I!=null&&(de=I.replace(O,"$&/")+"/"),ce(pe,U,de,"",function(ct){return ct})):pe!=null&&(G(pe)&&(pe=M(pe,de+(!pe.key||Se&&Se.key===pe.key?"":(""+pe.key).replace(O,"$&/")+"/")+I)),U.push(pe)),1;if(Se=0,fe=fe===""?".":fe+":",R(I))for(var he=0;he<I.length;he++){ye=I[he];var _e=fe+X(ye,he);Se+=ce(ye,U,de,_e,pe)}else if(_e=v(I),typeof _e=="function")for(I=_e.call(I),he=0;!(ye=I.next()).done;)ye=ye.value,_e=fe+X(ye,he++),Se+=ce(ye,U,de,_e,pe);else if(ye==="object")throw U=String(I),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return Se}function Ae(I,U,de){if(I==null)return I;var fe=[],pe=0;return ce(I,fe,"","",function(ye){return U.call(de,ye,pe++)}),fe}function be(I){if(I._status===-1){var U=I._result;U=U(),U.then(function(de){(I._status===0||I._status===-1)&&(I._status=1,I._result=de)},function(de){(I._status===0||I._status===-1)&&(I._status=2,I._result=de)}),I._status===-1&&(I._status=0,I._result=U)}if(I._status===1)return I._result.default;throw I._result}var ge={current:null},J={transition:null},se={ReactCurrentDispatcher:ge,ReactCurrentBatchConfig:J,ReactCurrentOwner:z};function Z(){throw Error("act(...) is not supported in production builds of React.")}return me.Children={map:Ae,forEach:function(I,U,de){Ae(I,function(){U.apply(this,arguments)},de)},count:function(I){var U=0;return Ae(I,function(){U++}),U},toArray:function(I){return Ae(I,function(U){return U})||[]},only:function(I){if(!G(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},me.Component=E,me.Fragment=n,me.Profiler=o,me.PureComponent=A,me.StrictMode=r,me.Suspense=d,me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,me.act=Z,me.cloneElement=function(I,U,de){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var fe=k({},I.props),pe=I.key,ye=I.ref,Se=I._owner;if(U!=null){if(U.ref!==void 0&&(ye=U.ref,Se=z.current),U.key!==void 0&&(pe=""+U.key),I.type&&I.type.defaultProps)var he=I.type.defaultProps;for(_e in U)D.call(U,_e)&&!H.hasOwnProperty(_e)&&(fe[_e]=U[_e]===void 0&&he!==void 0?he[_e]:U[_e])}var _e=arguments.length-2;if(_e===1)fe.children=de;else if(1<_e){he=Array(_e);for(var ct=0;ct<_e;ct++)he[ct]=arguments[ct+2];fe.children=he}return{$$typeof:t,type:I.type,key:pe,ref:ye,props:fe,_owner:Se}},me.createContext=function(I){return I={$$typeof:c,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:l,_context:I},I.Consumer=I},me.createElement=F,me.createFactory=function(I){var U=F.bind(null,I);return U.type=I,U},me.createRef=function(){return{current:null}},me.forwardRef=function(I){return{$$typeof:u,render:I}},me.isValidElement=G,me.lazy=function(I){return{$$typeof:g,_payload:{_status:-1,_result:I},_init:be}},me.memo=function(I,U){return{$$typeof:p,type:I,compare:U===void 0?null:U}},me.startTransition=function(I){var U=J.transition;J.transition={};try{I()}finally{J.transition=U}},me.unstable_act=Z,me.useCallback=function(I,U){return ge.current.useCallback(I,U)},me.useContext=function(I){return ge.current.useContext(I)},me.useDebugValue=function(){},me.useDeferredValue=function(I){return ge.current.useDeferredValue(I)},me.useEffect=function(I,U){return ge.current.useEffect(I,U)},me.useId=function(){return ge.current.useId()},me.useImperativeHandle=function(I,U,de){return ge.current.useImperativeHandle(I,U,de)},me.useInsertionEffect=function(I,U){return ge.current.useInsertionEffect(I,U)},me.useLayoutEffect=function(I,U){return ge.current.useLayoutEffect(I,U)},me.useMemo=function(I,U){return ge.current.useMemo(I,U)},me.useReducer=function(I,U,de){return ge.current.useReducer(I,U,de)},me.useRef=function(I){return ge.current.useRef(I)},me.useState=function(I){return ge.current.useState(I)},me.useSyncExternalStore=function(I,U,de){return ge.current.useSyncExternalStore(I,U,de)},me.useTransition=function(){return ge.current.useTransition()},me.version="18.3.1",me}var kp;function Ku(){return kp||(kp=1,cu.exports=y0()),cu.exports}/**
11
- * @license React
12
- * react-jsx-runtime.production.min.js
13
- *
14
- * Copyright (c) Facebook, Inc. and its affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var bp;function v0(){if(bp)return bi;bp=1;var t=Ku(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(u,d,p){var g,y={},v=null,S=null;p!==void 0&&(v=""+p),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(S=d.ref);for(g in d)r.call(d,g)&&!l.hasOwnProperty(g)&&(y[g]=d[g]);if(u&&u.defaultProps)for(g in d=u.defaultProps,d)y[g]===void 0&&(y[g]=d[g]);return{$$typeof:e,type:u,key:v,ref:S,props:y,_owner:o.current}}return bi.Fragment=n,bi.jsx=c,bi.jsxs=c,bi}var Tp;function w0(){return Tp||(Tp=1,au.exports=v0()),au.exports}var w=w0(),$=Ku();const Mt=g0($);function $l(t,e,n,r){const[o,l]=Mt.useState(n);return Mt.useEffect(()=>{let c=!1;return t().then(u=>{c||l(u)}),()=>{c=!0}},e),o}function Ar(){const t=Mt.useRef(null),[e,n]=Mt.useState(new DOMRect(0,0,10,10));return Mt.useLayoutEffect(()=>{const r=t.current;if(!r)return;const o=r.getBoundingClientRect();n(new DOMRect(0,0,o.width,o.height));const l=new ResizeObserver(c=>{const u=c[c.length-1];u&&u.contentRect&&n(u.contentRect)});return l.observe(r),()=>l.disconnect()},[t]),[e,t]}function pt(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0)+"ms";const e=t/1e3;if(e<60)return e.toFixed(1)+"s";const n=e/60;if(n<60)return n.toFixed(1)+"m";const r=n/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function S0(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0);const e=t/1024;if(e<1e3)return e.toFixed(1)+"K";const n=e/1024;return n<1e3?n.toFixed(1)+"M":(n/1024).toFixed(1)+"G"}function jm(t,e,n,r,o){let l=0,c=t.length;for(;l<c;){const u=l+c>>1;n(e,t[u])>=0?l=u+1:c=u}return c}function Cp(t){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function Ts(t,e){t&&(e=wr.getObject(t,e));const[n,r]=Mt.useState(e),o=Mt.useCallback(l=>{t?wr.setObject(t,l):r(l)},[t,r]);return Mt.useEffect(()=>{if(t){const l=()=>r(wr.getObject(t,e));return wr.onChangeEmitter.addEventListener(t,l),()=>wr.onChangeEmitter.removeEventListener(t,l)}},[e,t]),[n,o]}class x0{constructor(){this.onChangeEmitter=new EventTarget}getString(e,n){return localStorage[e]||n}setString(e,n){var r;localStorage[e]=n,this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}getObject(e,n){if(!localStorage[e])return n;try{return JSON.parse(localStorage[e])}catch{return n}}setObject(e,n){var r;localStorage[e]=JSON.stringify(n),this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}}const wr=new x0;function Be(...t){return t.filter(Boolean).join(" ")}function Pm(t){t&&(t!=null&&t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t==null||t.scrollIntoView())}const Np="\\u0000-\\u0020\\u007f-\\u009f",Om=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Np+'"]{2,}[^\\s'+Np+`"')}\\],:;.!?]`,"ug");function _0(){const[t,e]=Mt.useState(!1),n=Mt.useCallback(()=>{const r=[];return e(o=>(r.push(setTimeout(()=>e(!1),1e3)),o?(r.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>r.forEach(clearTimeout)},[e]);return[t,n]}function Ck(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",r=>{r.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",r=>{document.body.classList.add("inactive")},!1);const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark-mode":"light-mode";wr.getString("theme",e)==="dark-mode"&&document.body.classList.add("dark-mode")}const Gu=new Set;function E0(){const t=Lu(),e=t==="dark-mode"?"light-mode":"dark-mode";t&&document.body.classList.remove(t),document.body.classList.add(e),wr.setString("theme",e);for(const n of Gu)n(e)}function Nk(t){Gu.add(t)}function Ak(t){Gu.delete(t)}function Lu(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}function k0(){const[t,e]=Mt.useState(Lu()==="dark-mode");return[t,n=>{Lu()==="dark-mode"!==n&&E0(),e(n)}]}var hl={},uu={exports:{}},xt={},fu={exports:{}},du={};/**
19
- * @license React
20
- * scheduler.production.min.js
21
- *
22
- * Copyright (c) Facebook, Inc. and its affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */var Ap;function b0(){return Ap||(Ap=1,function(t){function e(J,se){var Z=J.length;J.push(se);e:for(;0<Z;){var I=Z-1>>>1,U=J[I];if(0<o(U,se))J[I]=se,J[Z]=U,Z=I;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var se=J[0],Z=J.pop();if(Z!==se){J[0]=Z;e:for(var I=0,U=J.length,de=U>>>1;I<de;){var fe=2*(I+1)-1,pe=J[fe],ye=fe+1,Se=J[ye];if(0>o(pe,Z))ye<U&&0>o(Se,pe)?(J[I]=Se,J[ye]=Z,I=ye):(J[I]=pe,J[fe]=Z,I=fe);else if(ye<U&&0>o(Se,Z))J[I]=Se,J[ye]=Z,I=ye;else break e}}return se}function o(J,se){var Z=J.sortIndex-se.sortIndex;return Z!==0?Z:J.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var c=Date,u=c.now();t.unstable_now=function(){return c.now()-u}}var d=[],p=[],g=1,y=null,v=3,S=!1,k=!1,_=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B(J){for(var se=n(p);se!==null;){if(se.callback===null)r(p);else if(se.startTime<=J)r(p),se.sortIndex=se.expirationTime,e(d,se);else break;se=n(p)}}function R(J){if(_=!1,B(J),!k)if(n(d)!==null)k=!0,be(D);else{var se=n(p);se!==null&&ge(R,se.startTime-J)}}function D(J,se){k=!1,_&&(_=!1,C(F),F=-1),S=!0;var Z=v;try{for(B(se),y=n(d);y!==null&&(!(y.expirationTime>se)||J&&!K());){var I=y.callback;if(typeof I=="function"){y.callback=null,v=y.priorityLevel;var U=I(y.expirationTime<=se);se=t.unstable_now(),typeof U=="function"?y.callback=U:y===n(d)&&r(d),B(se)}else r(d);y=n(d)}if(y!==null)var de=!0;else{var fe=n(p);fe!==null&&ge(R,fe.startTime-se),de=!1}return de}finally{y=null,v=Z,S=!1}}var z=!1,H=null,F=-1,M=5,G=-1;function K(){return!(t.unstable_now()-G<M)}function O(){if(H!==null){var J=t.unstable_now();G=J;var se=!0;try{se=H(!0,J)}finally{se?X():(z=!1,H=null)}}else z=!1}var X;if(typeof A=="function")X=function(){A(O)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,Ae=ce.port2;ce.port1.onmessage=O,X=function(){Ae.postMessage(null)}}else X=function(){E(O,0)};function be(J){H=J,z||(z=!0,X())}function ge(J,se){F=E(function(){J(t.unstable_now())},se)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(J){J.callback=null},t.unstable_continueExecution=function(){k||S||(k=!0,be(D))},t.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<J?Math.floor(1e3/J):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return n(d)},t.unstable_next=function(J){switch(v){case 1:case 2:case 3:var se=3;break;default:se=v}var Z=v;v=se;try{return J()}finally{v=Z}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(J,se){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var Z=v;v=J;try{return se()}finally{v=Z}},t.unstable_scheduleCallback=function(J,se,Z){var I=t.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?I+Z:I):Z=I,J){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=Z+U,J={id:g++,callback:se,priorityLevel:J,startTime:Z,expirationTime:U,sortIndex:-1},Z>I?(J.sortIndex=Z,e(p,J),n(d)===null&&J===n(p)&&(_?(C(F),F=-1):_=!0,ge(R,Z-I))):(J.sortIndex=U,e(d,J),k||S||(k=!0,be(D))),J},t.unstable_shouldYield=K,t.unstable_wrapCallback=function(J){var se=v;return function(){var Z=v;v=se;try{return J.apply(this,arguments)}finally{v=Z}}}}(du)),du}var Ip;function T0(){return Ip||(Ip=1,fu.exports=b0()),fu.exports}/**
27
- * @license React
28
- * react-dom.production.min.js
29
- *
30
- * Copyright (c) Facebook, Inc. and its affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- */var Lp;function C0(){if(Lp)return xt;Lp=1;var t=Ku(),e=T0();function n(s){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+s,a=1;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+s+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function l(s,i){c(s,i),c(s+"Capture",i)}function c(s,i){for(o[s]=i,s=0;s<i.length;s++)r.add(i[s])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},y={};function v(s){return d.call(y,s)?!0:d.call(g,s)?!1:p.test(s)?y[s]=!0:(g[s]=!0,!1)}function S(s,i,a,f){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return f?!1:a!==null?!a.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function k(s,i,a,f){if(i===null||typeof i>"u"||S(s,i,a,f))return!0;if(f)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function _(s,i,a,f,h,m,x){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=f,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=s,this.type=i,this.sanitizeURL=m,this.removeEmptyString=x}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){E[s]=new _(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var i=s[0];E[i]=new _(i,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){E[s]=new _(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){E[s]=new _(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){E[s]=new _(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){E[s]=new _(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){E[s]=new _(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){E[s]=new _(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){E[s]=new _(s,5,!1,s.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function A(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var i=s.replace(C,A);E[i]=new _(i,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var i=s.replace(C,A);E[i]=new _(i,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var i=s.replace(C,A);E[i]=new _(i,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){E[s]=new _(s,1,!1,s.toLowerCase(),null,!1,!1)}),E.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){E[s]=new _(s,1,!1,s.toLowerCase(),null,!0,!0)});function B(s,i,a,f){var h=E.hasOwnProperty(i)?E[i]:null;(h!==null?h.type!==0:f||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(k(i,a,h,f)&&(a=null),f||h===null?v(i)&&(a===null?s.removeAttribute(i):s.setAttribute(i,""+a)):h.mustUseProperty?s[h.propertyName]=a===null?h.type===3?!1:"":a:(i=h.attributeName,f=h.attributeNamespace,a===null?s.removeAttribute(i):(h=h.type,a=h===3||h===4&&a===!0?"":""+a,f?s.setAttributeNS(f,i,a):s.setAttribute(i,a))))}var R=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),z=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),G=Symbol.for("react.provider"),K=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),Ae=Symbol.for("react.memo"),be=Symbol.for("react.lazy"),ge=Symbol.for("react.offscreen"),J=Symbol.iterator;function se(s){return s===null||typeof s!="object"?null:(s=J&&s[J]||s["@@iterator"],typeof s=="function"?s:null)}var Z=Object.assign,I;function U(s){if(I===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);I=i&&i[1]||""}return`
35
- `+I+s}var de=!1;function fe(s,i){if(!s||de)return"";de=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(P){var f=P}Reflect.construct(s,[],i)}else{try{i.call()}catch(P){f=P}s.call(i.prototype)}else{try{throw Error()}catch(P){f=P}s()}}catch(P){if(P&&f&&typeof P.stack=="string"){for(var h=P.stack.split(`
36
- `),m=f.stack.split(`
37
- `),x=h.length-1,b=m.length-1;1<=x&&0<=b&&h[x]!==m[b];)b--;for(;1<=x&&0<=b;x--,b--)if(h[x]!==m[b]){if(x!==1||b!==1)do if(x--,b--,0>b||h[x]!==m[b]){var T=`
38
- `+h[x].replace(" at new "," at ");return s.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",s.displayName)),T}while(1<=x&&0<=b);break}}}finally{de=!1,Error.prepareStackTrace=a}return(s=s?s.displayName||s.name:"")?U(s):""}function pe(s){switch(s.tag){case 5:return U(s.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return s=fe(s.type,!1),s;case 11:return s=fe(s.type.render,!1),s;case 1:return s=fe(s.type,!0),s;default:return""}}function ye(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case H:return"Fragment";case z:return"Portal";case M:return"Profiler";case F:return"StrictMode";case X:return"Suspense";case ce:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case K:return(s.displayName||"Context")+".Consumer";case G:return(s._context.displayName||"Context")+".Provider";case O:var i=s.render;return s=s.displayName,s||(s=i.displayName||i.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case Ae:return i=s.displayName||null,i!==null?i:ye(s.type)||"Memo";case be:i=s._payload,s=s._init;try{return ye(s(i))}catch{}}return null}function Se(s){var i=s.type;switch(s.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=i.render,s=s.displayName||s.name||"",i.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(i);case 8:return i===F?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function he(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function _e(s){var i=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ct(s){var i=_e(s)?"checked":"value",a=Object.getOwnPropertyDescriptor(s.constructor.prototype,i),f=""+s[i];if(!s.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,m=a.set;return Object.defineProperty(s,i,{configurable:!0,get:function(){return h.call(this)},set:function(x){f=""+x,m.call(this,x)}}),Object.defineProperty(s,i,{enumerable:a.enumerable}),{getValue:function(){return f},setValue:function(x){f=""+x},stopTracking:function(){s._valueTracker=null,delete s[i]}}}}function jr(s){s._valueTracker||(s._valueTracker=ct(s))}function Pr(s){if(!s)return!1;var i=s._valueTracker;if(!i)return!0;var a=i.getValue(),f="";return s&&(f=_e(s)?s.checked?"true":"false":s.value),s=f,s!==a?(i.setValue(s),!0):!1}function sr(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Or(s,i){var a=i.checked;return Z({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??s._wrapperState.initialChecked})}function hn(s,i){var a=i.defaultValue==null?"":i.defaultValue,f=i.checked!=null?i.checked:i.defaultChecked;a=he(i.value!=null?i.value:a),s._wrapperState={initialChecked:f,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function eo(s,i){i=i.checked,i!=null&&B(s,"checked",i,!1)}function Bs(s,i){eo(s,i);var a=he(i.value),f=i.type;if(a!=null)f==="number"?(a===0&&s.value===""||s.value!=a)&&(s.value=""+a):s.value!==""+a&&(s.value=""+a);else if(f==="submit"||f==="reset"){s.removeAttribute("value");return}i.hasOwnProperty("value")?zs(s,i.type,a):i.hasOwnProperty("defaultValue")&&zs(s,i.type,he(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(s.defaultChecked=!!i.defaultChecked)}function to(s,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var f=i.type;if(!(f!=="submit"&&f!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+s._wrapperState.initialValue,a||i===s.value||(s.value=i),s.defaultValue=i}a=s.name,a!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,a!==""&&(s.name=a)}function zs(s,i,a){(i!=="number"||sr(s.ownerDocument)!==s)&&(a==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+a&&(s.defaultValue=""+a))}var An=Array.isArray;function nn(s,i,a,f){if(s=s.options,i){i={};for(var h=0;h<a.length;h++)i["$"+a[h]]=!0;for(a=0;a<s.length;a++)h=i.hasOwnProperty("$"+s[a].value),s[a].selected!==h&&(s[a].selected=h),h&&f&&(s[a].defaultSelected=!0)}else{for(a=""+he(a),i=null,h=0;h<s.length;h++){if(s[h].value===a){s[h].selected=!0,f&&(s[h].defaultSelected=!0);return}i!==null||s[h].disabled||(i=s[h])}i!==null&&(i.selected=!0)}}function Hs(s,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return Z({},i,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function no(s,i){var a=i.value;if(a==null){if(a=i.children,i=i.defaultValue,a!=null){if(i!=null)throw Error(n(92));if(An(a)){if(1<a.length)throw Error(n(93));a=a[0]}i=a}i==null&&(i=""),a=i}s._wrapperState={initialValue:he(a)}}function ro(s,i){var a=he(i.value),f=he(i.defaultValue);a!=null&&(a=""+a,a!==s.value&&(s.value=a),i.defaultValue==null&&s.defaultValue!==a&&(s.defaultValue=a)),f!=null&&(s.defaultValue=""+f)}function In(s){var i=s.textContent;i===s._wrapperState.initialValue&&i!==""&&i!==null&&(s.value=i)}function $r(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ln(s,i){return s==null||s==="http://www.w3.org/1999/xhtml"?$r(i):s==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var Rr,so=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,a,f,h){MSApp.execUnsafeLocalFunction(function(){return s(i,a,f,h)})}:s}(function(s,i){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=i;else{for(Rr=Rr||document.createElement("div"),Rr.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=Rr.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;i.firstChild;)s.appendChild(i.firstChild)}});function Mn(s,i){if(i){var a=s.firstChild;if(a&&a===s.lastChild&&a.nodeType===3){a.nodeValue=i;return}}s.textContent=i}var le={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rn=["Webkit","ms","Moz","O"];Object.keys(le).forEach(function(s){rn.forEach(function(i){i=i+s.charAt(0).toUpperCase()+s.substring(1),le[i]=le[s]})});function jt(s,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||le.hasOwnProperty(s)&&le[s]?(""+i).trim():i+"px"}function Ff(s,i){s=s.style;for(var a in i)if(i.hasOwnProperty(a)){var f=a.indexOf("--")===0,h=jt(a,i[a],f);a==="float"&&(a="cssFloat"),f?s.setProperty(a,h):s[a]=h}}var wv=Z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Sa(s,i){if(i){if(wv[s]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function xa(s,i){if(s.indexOf("-")===-1)return typeof i.is=="string";switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _a=null;function Ea(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var ka=null,Dr=null,Fr=null;function Bf(s){if(s=ui(s)){if(typeof ka!="function")throw Error(n(280));var i=s.stateNode;i&&(i=No(i),ka(s.stateNode,s.type,i))}}function zf(s){Dr?Fr?Fr.push(s):Fr=[s]:Dr=s}function Hf(){if(Dr){var s=Dr,i=Fr;if(Fr=Dr=null,Bf(s),i)for(s=0;s<i.length;s++)Bf(i[s])}}function Uf(s,i){return s(i)}function qf(){}var ba=!1;function Vf(s,i,a){if(ba)return s(i,a);ba=!0;try{return Uf(s,i,a)}finally{ba=!1,(Dr!==null||Fr!==null)&&(qf(),Hf())}}function Us(s,i){var a=s.stateNode;if(a===null)return null;var f=No(a);if(f===null)return null;a=f[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(s=s.type,f=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!f;break e;default:s=!1}if(s)return null;if(a&&typeof a!="function")throw Error(n(231,i,typeof a));return a}var Ta=!1;if(u)try{var qs={};Object.defineProperty(qs,"passive",{get:function(){Ta=!0}}),window.addEventListener("test",qs,qs),window.removeEventListener("test",qs,qs)}catch{Ta=!1}function Sv(s,i,a,f,h,m,x,b,T){var P=Array.prototype.slice.call(arguments,3);try{i.apply(a,P)}catch(V){this.onError(V)}}var Vs=!1,io=null,oo=!1,Ca=null,xv={onError:function(s){Vs=!0,io=s}};function _v(s,i,a,f,h,m,x,b,T){Vs=!1,io=null,Sv.apply(xv,arguments)}function Ev(s,i,a,f,h,m,x,b,T){if(_v.apply(this,arguments),Vs){if(Vs){var P=io;Vs=!1,io=null}else throw Error(n(198));oo||(oo=!0,Ca=P)}}function ir(s){var i=s,a=s;if(s.alternate)for(;i.return;)i=i.return;else{s=i;do i=s,(i.flags&4098)!==0&&(a=i.return),s=i.return;while(s)}return i.tag===3?a:null}function Wf(s){if(s.tag===13){var i=s.memoizedState;if(i===null&&(s=s.alternate,s!==null&&(i=s.memoizedState)),i!==null)return i.dehydrated}return null}function Kf(s){if(ir(s)!==s)throw Error(n(188))}function kv(s){var i=s.alternate;if(!i){if(i=ir(s),i===null)throw Error(n(188));return i!==s?null:s}for(var a=s,f=i;;){var h=a.return;if(h===null)break;var m=h.alternate;if(m===null){if(f=h.return,f!==null){a=f;continue}break}if(h.child===m.child){for(m=h.child;m;){if(m===a)return Kf(h),s;if(m===f)return Kf(h),i;m=m.sibling}throw Error(n(188))}if(a.return!==f.return)a=h,f=m;else{for(var x=!1,b=h.child;b;){if(b===a){x=!0,a=h,f=m;break}if(b===f){x=!0,f=h,a=m;break}b=b.sibling}if(!x){for(b=m.child;b;){if(b===a){x=!0,a=m,f=h;break}if(b===f){x=!0,f=m,a=h;break}b=b.sibling}if(!x)throw Error(n(189))}}if(a.alternate!==f)throw Error(n(190))}if(a.tag!==3)throw Error(n(188));return a.stateNode.current===a?s:i}function Gf(s){return s=kv(s),s!==null?Qf(s):null}function Qf(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var i=Qf(s);if(i!==null)return i;s=s.sibling}return null}var Jf=e.unstable_scheduleCallback,Xf=e.unstable_cancelCallback,bv=e.unstable_shouldYield,Tv=e.unstable_requestPaint,De=e.unstable_now,Cv=e.unstable_getCurrentPriorityLevel,Na=e.unstable_ImmediatePriority,Yf=e.unstable_UserBlockingPriority,lo=e.unstable_NormalPriority,Nv=e.unstable_LowPriority,Zf=e.unstable_IdlePriority,ao=null,sn=null;function Av(s){if(sn&&typeof sn.onCommitFiberRoot=="function")try{sn.onCommitFiberRoot(ao,s,void 0,(s.current.flags&128)===128)}catch{}}var Wt=Math.clz32?Math.clz32:Mv,Iv=Math.log,Lv=Math.LN2;function Mv(s){return s>>>=0,s===0?32:31-(Iv(s)/Lv|0)|0}var co=64,uo=4194304;function Ws(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function fo(s,i){var a=s.pendingLanes;if(a===0)return 0;var f=0,h=s.suspendedLanes,m=s.pingedLanes,x=a&268435455;if(x!==0){var b=x&~h;b!==0?f=Ws(b):(m&=x,m!==0&&(f=Ws(m)))}else x=a&~h,x!==0?f=Ws(x):m!==0&&(f=Ws(m));if(f===0)return 0;if(i!==0&&i!==f&&(i&h)===0&&(h=f&-f,m=i&-i,h>=m||h===16&&(m&4194240)!==0))return i;if((f&4)!==0&&(f|=a&16),i=s.entangledLanes,i!==0)for(s=s.entanglements,i&=f;0<i;)a=31-Wt(i),h=1<<a,f|=s[a],i&=~h;return f}function jv(s,i){switch(s){case 1:case 2:case 4:return i+250;case 8:case 16:case 32: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:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pv(s,i){for(var a=s.suspendedLanes,f=s.pingedLanes,h=s.expirationTimes,m=s.pendingLanes;0<m;){var x=31-Wt(m),b=1<<x,T=h[x];T===-1?((b&a)===0||(b&f)!==0)&&(h[x]=jv(b,i)):T<=i&&(s.expiredLanes|=b),m&=~b}}function Aa(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function ed(){var s=co;return co<<=1,(co&4194240)===0&&(co=64),s}function Ia(s){for(var i=[],a=0;31>a;a++)i.push(s);return i}function Ks(s,i,a){s.pendingLanes|=i,i!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,i=31-Wt(i),s[i]=a}function Ov(s,i){var a=s.pendingLanes&~i;s.pendingLanes=i,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=i,s.mutableReadLanes&=i,s.entangledLanes&=i,i=s.entanglements;var f=s.eventTimes;for(s=s.expirationTimes;0<a;){var h=31-Wt(a),m=1<<h;i[h]=0,f[h]=-1,s[h]=-1,a&=~m}}function La(s,i){var a=s.entangledLanes|=i;for(s=s.entanglements;a;){var f=31-Wt(a),h=1<<f;h&i|s[f]&i&&(s[f]|=i),a&=~h}}var xe=0;function td(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var nd,Ma,rd,sd,id,ja=!1,ho=[],jn=null,Pn=null,On=null,Gs=new Map,Qs=new Map,$n=[],$v="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function od(s,i){switch(s){case"focusin":case"focusout":jn=null;break;case"dragenter":case"dragleave":Pn=null;break;case"mouseover":case"mouseout":On=null;break;case"pointerover":case"pointerout":Gs.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qs.delete(i.pointerId)}}function Js(s,i,a,f,h,m){return s===null||s.nativeEvent!==m?(s={blockedOn:i,domEventName:a,eventSystemFlags:f,nativeEvent:m,targetContainers:[h]},i!==null&&(i=ui(i),i!==null&&Ma(i)),s):(s.eventSystemFlags|=f,i=s.targetContainers,h!==null&&i.indexOf(h)===-1&&i.push(h),s)}function Rv(s,i,a,f,h){switch(i){case"focusin":return jn=Js(jn,s,i,a,f,h),!0;case"dragenter":return Pn=Js(Pn,s,i,a,f,h),!0;case"mouseover":return On=Js(On,s,i,a,f,h),!0;case"pointerover":var m=h.pointerId;return Gs.set(m,Js(Gs.get(m)||null,s,i,a,f,h)),!0;case"gotpointercapture":return m=h.pointerId,Qs.set(m,Js(Qs.get(m)||null,s,i,a,f,h)),!0}return!1}function ld(s){var i=or(s.target);if(i!==null){var a=ir(i);if(a!==null){if(i=a.tag,i===13){if(i=Wf(a),i!==null){s.blockedOn=i,id(s.priority,function(){rd(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){s.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}s.blockedOn=null}function po(s){if(s.blockedOn!==null)return!1;for(var i=s.targetContainers;0<i.length;){var a=Oa(s.domEventName,s.eventSystemFlags,i[0],s.nativeEvent);if(a===null){a=s.nativeEvent;var f=new a.constructor(a.type,a);_a=f,a.target.dispatchEvent(f),_a=null}else return i=ui(a),i!==null&&Ma(i),s.blockedOn=a,!1;i.shift()}return!0}function ad(s,i,a){po(s)&&a.delete(i)}function Dv(){ja=!1,jn!==null&&po(jn)&&(jn=null),Pn!==null&&po(Pn)&&(Pn=null),On!==null&&po(On)&&(On=null),Gs.forEach(ad),Qs.forEach(ad)}function Xs(s,i){s.blockedOn===i&&(s.blockedOn=null,ja||(ja=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Dv)))}function Ys(s){function i(h){return Xs(h,s)}if(0<ho.length){Xs(ho[0],s);for(var a=1;a<ho.length;a++){var f=ho[a];f.blockedOn===s&&(f.blockedOn=null)}}for(jn!==null&&Xs(jn,s),Pn!==null&&Xs(Pn,s),On!==null&&Xs(On,s),Gs.forEach(i),Qs.forEach(i),a=0;a<$n.length;a++)f=$n[a],f.blockedOn===s&&(f.blockedOn=null);for(;0<$n.length&&(a=$n[0],a.blockedOn===null);)ld(a),a.blockedOn===null&&$n.shift()}var Br=R.ReactCurrentBatchConfig,mo=!0;function Fv(s,i,a,f){var h=xe,m=Br.transition;Br.transition=null;try{xe=1,Pa(s,i,a,f)}finally{xe=h,Br.transition=m}}function Bv(s,i,a,f){var h=xe,m=Br.transition;Br.transition=null;try{xe=4,Pa(s,i,a,f)}finally{xe=h,Br.transition=m}}function Pa(s,i,a,f){if(mo){var h=Oa(s,i,a,f);if(h===null)Ya(s,i,f,go,a),od(s,f);else if(Rv(h,s,i,a,f))f.stopPropagation();else if(od(s,f),i&4&&-1<$v.indexOf(s)){for(;h!==null;){var m=ui(h);if(m!==null&&nd(m),m=Oa(s,i,a,f),m===null&&Ya(s,i,f,go,a),m===h)break;h=m}h!==null&&f.stopPropagation()}else Ya(s,i,f,null,a)}}var go=null;function Oa(s,i,a,f){if(go=null,s=Ea(f),s=or(s),s!==null)if(i=ir(s),i===null)s=null;else if(a=i.tag,a===13){if(s=Wf(i),s!==null)return s;s=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;s=null}else i!==s&&(s=null);return go=s,null}function cd(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Cv()){case Na:return 1;case Yf:return 4;case lo:case Nv:return 16;case Zf:return 536870912;default:return 16}default:return 16}}var Rn=null,$a=null,yo=null;function ud(){if(yo)return yo;var s,i=$a,a=i.length,f,h="value"in Rn?Rn.value:Rn.textContent,m=h.length;for(s=0;s<a&&i[s]===h[s];s++);var x=a-s;for(f=1;f<=x&&i[a-f]===h[m-f];f++);return yo=h.slice(s,1<f?1-f:void 0)}function vo(s){var i=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&i===13&&(s=13)):s=i,s===10&&(s=13),32<=s||s===13?s:0}function wo(){return!0}function fd(){return!1}function Ct(s){function i(a,f,h,m,x){this._reactName=a,this._targetInst=h,this.type=f,this.nativeEvent=m,this.target=x,this.currentTarget=null;for(var b in s)s.hasOwnProperty(b)&&(a=s[b],this[b]=a?a(m):m[b]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?wo:fd,this.isPropagationStopped=fd,this}return Z(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=wo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=wo)},persist:function(){},isPersistent:wo}),i}var zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ra=Ct(zr),Zs=Z({},zr,{view:0,detail:0}),zv=Ct(Zs),Da,Fa,ei,So=Z({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:za,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==ei&&(ei&&s.type==="mousemove"?(Da=s.screenX-ei.screenX,Fa=s.screenY-ei.screenY):Fa=Da=0,ei=s),Da)},movementY:function(s){return"movementY"in s?s.movementY:Fa}}),dd=Ct(So),Hv=Z({},So,{dataTransfer:0}),Uv=Ct(Hv),qv=Z({},Zs,{relatedTarget:0}),Ba=Ct(qv),Vv=Z({},zr,{animationName:0,elapsedTime:0,pseudoElement:0}),Wv=Ct(Vv),Kv=Z({},zr,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Gv=Ct(Kv),Qv=Z({},zr,{data:0}),hd=Ct(Qv),Jv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Yv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zv(s){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(s):(s=Yv[s])?!!i[s]:!1}function za(){return Zv}var ew=Z({},Zs,{key:function(s){if(s.key){var i=Jv[s.key]||s.key;if(i!=="Unidentified")return i}return s.type==="keypress"?(s=vo(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Xv[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:za,charCode:function(s){return s.type==="keypress"?vo(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?vo(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),tw=Ct(ew),nw=Z({},So,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pd=Ct(nw),rw=Z({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:za}),sw=Ct(rw),iw=Z({},zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),ow=Ct(iw),lw=Z({},So,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),aw=Ct(lw),cw=[9,13,27,32],Ha=u&&"CompositionEvent"in window,ti=null;u&&"documentMode"in document&&(ti=document.documentMode);var uw=u&&"TextEvent"in window&&!ti,md=u&&(!Ha||ti&&8<ti&&11>=ti),gd=" ",yd=!1;function vd(s,i){switch(s){case"keyup":return cw.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wd(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Hr=!1;function fw(s,i){switch(s){case"compositionend":return wd(i);case"keypress":return i.which!==32?null:(yd=!0,gd);case"textInput":return s=i.data,s===gd&&yd?null:s;default:return null}}function dw(s,i){if(Hr)return s==="compositionend"||!Ha&&vd(s,i)?(s=ud(),yo=$a=Rn=null,Hr=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return md&&i.locale!=="ko"?null:i.data;default:return null}}var hw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Sd(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i==="input"?!!hw[s.type]:i==="textarea"}function xd(s,i,a,f){zf(f),i=bo(i,"onChange"),0<i.length&&(a=new Ra("onChange","change",null,a,f),s.push({event:a,listeners:i}))}var ni=null,ri=null;function pw(s){Fd(s,0)}function xo(s){var i=Kr(s);if(Pr(i))return s}function mw(s,i){if(s==="change")return i}var _d=!1;if(u){var Ua;if(u){var qa="oninput"in document;if(!qa){var Ed=document.createElement("div");Ed.setAttribute("oninput","return;"),qa=typeof Ed.oninput=="function"}Ua=qa}else Ua=!1;_d=Ua&&(!document.documentMode||9<document.documentMode)}function kd(){ni&&(ni.detachEvent("onpropertychange",bd),ri=ni=null)}function bd(s){if(s.propertyName==="value"&&xo(ri)){var i=[];xd(i,ri,s,Ea(s)),Vf(pw,i)}}function gw(s,i,a){s==="focusin"?(kd(),ni=i,ri=a,ni.attachEvent("onpropertychange",bd)):s==="focusout"&&kd()}function yw(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return xo(ri)}function vw(s,i){if(s==="click")return xo(i)}function ww(s,i){if(s==="input"||s==="change")return xo(i)}function Sw(s,i){return s===i&&(s!==0||1/s===1/i)||s!==s&&i!==i}var Kt=typeof Object.is=="function"?Object.is:Sw;function si(s,i){if(Kt(s,i))return!0;if(typeof s!="object"||s===null||typeof i!="object"||i===null)return!1;var a=Object.keys(s),f=Object.keys(i);if(a.length!==f.length)return!1;for(f=0;f<a.length;f++){var h=a[f];if(!d.call(i,h)||!Kt(s[h],i[h]))return!1}return!0}function Td(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Cd(s,i){var a=Td(s);s=0;for(var f;a;){if(a.nodeType===3){if(f=s+a.textContent.length,s<=i&&f>=i)return{node:a,offset:i-s};s=f}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Td(a)}}function Nd(s,i){return s&&i?s===i?!0:s&&s.nodeType===3?!1:i&&i.nodeType===3?Nd(s,i.parentNode):"contains"in s?s.contains(i):s.compareDocumentPosition?!!(s.compareDocumentPosition(i)&16):!1:!1}function Ad(){for(var s=window,i=sr();i instanceof s.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)s=i.contentWindow;else break;i=sr(s.document)}return i}function Va(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i&&(i==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||i==="textarea"||s.contentEditable==="true")}function xw(s){var i=Ad(),a=s.focusedElem,f=s.selectionRange;if(i!==a&&a&&a.ownerDocument&&Nd(a.ownerDocument.documentElement,a)){if(f!==null&&Va(a)){if(i=f.start,s=f.end,s===void 0&&(s=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(s,a.value.length);else if(s=(i=a.ownerDocument||document)&&i.defaultView||window,s.getSelection){s=s.getSelection();var h=a.textContent.length,m=Math.min(f.start,h);f=f.end===void 0?m:Math.min(f.end,h),!s.extend&&m>f&&(h=f,f=m,m=h),h=Cd(a,m);var x=Cd(a,f);h&&x&&(s.rangeCount!==1||s.anchorNode!==h.node||s.anchorOffset!==h.offset||s.focusNode!==x.node||s.focusOffset!==x.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),s.removeAllRanges(),m>f?(s.addRange(i),s.extend(x.node,x.offset)):(i.setEnd(x.node,x.offset),s.addRange(i)))}}for(i=[],s=a;s=s.parentNode;)s.nodeType===1&&i.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<i.length;a++)s=i[a],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var _w=u&&"documentMode"in document&&11>=document.documentMode,Ur=null,Wa=null,ii=null,Ka=!1;function Id(s,i,a){var f=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ka||Ur==null||Ur!==sr(f)||(f=Ur,"selectionStart"in f&&Va(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),ii&&si(ii,f)||(ii=f,f=bo(Wa,"onSelect"),0<f.length&&(i=new Ra("onSelect","select",null,i,a),s.push({event:i,listeners:f}),i.target=Ur)))}function _o(s,i){var a={};return a[s.toLowerCase()]=i.toLowerCase(),a["Webkit"+s]="webkit"+i,a["Moz"+s]="moz"+i,a}var qr={animationend:_o("Animation","AnimationEnd"),animationiteration:_o("Animation","AnimationIteration"),animationstart:_o("Animation","AnimationStart"),transitionend:_o("Transition","TransitionEnd")},Ga={},Ld={};u&&(Ld=document.createElement("div").style,"AnimationEvent"in window||(delete qr.animationend.animation,delete qr.animationiteration.animation,delete qr.animationstart.animation),"TransitionEvent"in window||delete qr.transitionend.transition);function Eo(s){if(Ga[s])return Ga[s];if(!qr[s])return s;var i=qr[s],a;for(a in i)if(i.hasOwnProperty(a)&&a in Ld)return Ga[s]=i[a];return s}var Md=Eo("animationend"),jd=Eo("animationiteration"),Pd=Eo("animationstart"),Od=Eo("transitionend"),$d=new Map,Rd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Dn(s,i){$d.set(s,i),l(i,[s])}for(var Qa=0;Qa<Rd.length;Qa++){var Ja=Rd[Qa],Ew=Ja.toLowerCase(),kw=Ja[0].toUpperCase()+Ja.slice(1);Dn(Ew,"on"+kw)}Dn(Md,"onAnimationEnd"),Dn(jd,"onAnimationIteration"),Dn(Pd,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(Od,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),bw=new Set("cancel close invalid load scroll toggle".split(" ").concat(oi));function Dd(s,i,a){var f=s.type||"unknown-event";s.currentTarget=a,Ev(f,i,void 0,s),s.currentTarget=null}function Fd(s,i){i=(i&4)!==0;for(var a=0;a<s.length;a++){var f=s[a],h=f.event;f=f.listeners;e:{var m=void 0;if(i)for(var x=f.length-1;0<=x;x--){var b=f[x],T=b.instance,P=b.currentTarget;if(b=b.listener,T!==m&&h.isPropagationStopped())break e;Dd(h,b,P),m=T}else for(x=0;x<f.length;x++){if(b=f[x],T=b.instance,P=b.currentTarget,b=b.listener,T!==m&&h.isPropagationStopped())break e;Dd(h,b,P),m=T}}}if(oo)throw s=Ca,oo=!1,Ca=null,s}function Ce(s,i){var a=i[sc];a===void 0&&(a=i[sc]=new Set);var f=s+"__bubble";a.has(f)||(Bd(i,s,2,!1),a.add(f))}function Xa(s,i,a){var f=0;i&&(f|=4),Bd(a,s,f,i)}var ko="_reactListening"+Math.random().toString(36).slice(2);function li(s){if(!s[ko]){s[ko]=!0,r.forEach(function(a){a!=="selectionchange"&&(bw.has(a)||Xa(a,!1,s),Xa(a,!0,s))});var i=s.nodeType===9?s:s.ownerDocument;i===null||i[ko]||(i[ko]=!0,Xa("selectionchange",!1,i))}}function Bd(s,i,a,f){switch(cd(i)){case 1:var h=Fv;break;case 4:h=Bv;break;default:h=Pa}a=h.bind(null,i,a,s),h=void 0,!Ta||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(h=!0),f?h!==void 0?s.addEventListener(i,a,{capture:!0,passive:h}):s.addEventListener(i,a,!0):h!==void 0?s.addEventListener(i,a,{passive:h}):s.addEventListener(i,a,!1)}function Ya(s,i,a,f,h){var m=f;if((i&1)===0&&(i&2)===0&&f!==null)e:for(;;){if(f===null)return;var x=f.tag;if(x===3||x===4){var b=f.stateNode.containerInfo;if(b===h||b.nodeType===8&&b.parentNode===h)break;if(x===4)for(x=f.return;x!==null;){var T=x.tag;if((T===3||T===4)&&(T=x.stateNode.containerInfo,T===h||T.nodeType===8&&T.parentNode===h))return;x=x.return}for(;b!==null;){if(x=or(b),x===null)return;if(T=x.tag,T===5||T===6){f=m=x;continue e}b=b.parentNode}}f=f.return}Vf(function(){var P=m,V=Ea(a),W=[];e:{var q=$d.get(s);if(q!==void 0){var Y=Ra,te=s;switch(s){case"keypress":if(vo(a)===0)break e;case"keydown":case"keyup":Y=tw;break;case"focusin":te="focus",Y=Ba;break;case"focusout":te="blur",Y=Ba;break;case"beforeblur":case"afterblur":Y=Ba;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=dd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=Uv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=sw;break;case Md:case jd:case Pd:Y=Wv;break;case Od:Y=ow;break;case"scroll":Y=zv;break;case"wheel":Y=aw;break;case"copy":case"cut":case"paste":Y=Gv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=pd}var ne=(i&4)!==0,Fe=!ne&&s==="scroll",L=ne?q!==null?q+"Capture":null:q;ne=[];for(var N=P,j;N!==null;){j=N;var Q=j.stateNode;if(j.tag===5&&Q!==null&&(j=Q,L!==null&&(Q=Us(N,L),Q!=null&&ne.push(ai(N,Q,j)))),Fe)break;N=N.return}0<ne.length&&(q=new Y(q,te,null,a,V),W.push({event:q,listeners:ne}))}}if((i&7)===0){e:{if(q=s==="mouseover"||s==="pointerover",Y=s==="mouseout"||s==="pointerout",q&&a!==_a&&(te=a.relatedTarget||a.fromElement)&&(or(te)||te[pn]))break e;if((Y||q)&&(q=V.window===V?V:(q=V.ownerDocument)?q.defaultView||q.parentWindow:window,Y?(te=a.relatedTarget||a.toElement,Y=P,te=te?or(te):null,te!==null&&(Fe=ir(te),te!==Fe||te.tag!==5&&te.tag!==6)&&(te=null)):(Y=null,te=P),Y!==te)){if(ne=dd,Q="onMouseLeave",L="onMouseEnter",N="mouse",(s==="pointerout"||s==="pointerover")&&(ne=pd,Q="onPointerLeave",L="onPointerEnter",N="pointer"),Fe=Y==null?q:Kr(Y),j=te==null?q:Kr(te),q=new ne(Q,N+"leave",Y,a,V),q.target=Fe,q.relatedTarget=j,Q=null,or(V)===P&&(ne=new ne(L,N+"enter",te,a,V),ne.target=j,ne.relatedTarget=Fe,Q=ne),Fe=Q,Y&&te)t:{for(ne=Y,L=te,N=0,j=ne;j;j=Vr(j))N++;for(j=0,Q=L;Q;Q=Vr(Q))j++;for(;0<N-j;)ne=Vr(ne),N--;for(;0<j-N;)L=Vr(L),j--;for(;N--;){if(ne===L||L!==null&&ne===L.alternate)break t;ne=Vr(ne),L=Vr(L)}ne=null}else ne=null;Y!==null&&zd(W,q,Y,ne,!1),te!==null&&Fe!==null&&zd(W,Fe,te,ne,!0)}}e:{if(q=P?Kr(P):window,Y=q.nodeName&&q.nodeName.toLowerCase(),Y==="select"||Y==="input"&&q.type==="file")var re=mw;else if(Sd(q))if(_d)re=ww;else{re=yw;var ie=gw}else(Y=q.nodeName)&&Y.toLowerCase()==="input"&&(q.type==="checkbox"||q.type==="radio")&&(re=vw);if(re&&(re=re(s,P))){xd(W,re,a,V);break e}ie&&ie(s,q,P),s==="focusout"&&(ie=q._wrapperState)&&ie.controlled&&q.type==="number"&&zs(q,"number",q.value)}switch(ie=P?Kr(P):window,s){case"focusin":(Sd(ie)||ie.contentEditable==="true")&&(Ur=ie,Wa=P,ii=null);break;case"focusout":ii=Wa=Ur=null;break;case"mousedown":Ka=!0;break;case"contextmenu":case"mouseup":case"dragend":Ka=!1,Id(W,a,V);break;case"selectionchange":if(_w)break;case"keydown":case"keyup":Id(W,a,V)}var oe;if(Ha)e:{switch(s){case"compositionstart":var ae="onCompositionStart";break e;case"compositionend":ae="onCompositionEnd";break e;case"compositionupdate":ae="onCompositionUpdate";break e}ae=void 0}else Hr?vd(s,a)&&(ae="onCompositionEnd"):s==="keydown"&&a.keyCode===229&&(ae="onCompositionStart");ae&&(md&&a.locale!=="ko"&&(Hr||ae!=="onCompositionStart"?ae==="onCompositionEnd"&&Hr&&(oe=ud()):(Rn=V,$a="value"in Rn?Rn.value:Rn.textContent,Hr=!0)),ie=bo(P,ae),0<ie.length&&(ae=new hd(ae,s,null,a,V),W.push({event:ae,listeners:ie}),oe?ae.data=oe:(oe=wd(a),oe!==null&&(ae.data=oe)))),(oe=uw?fw(s,a):dw(s,a))&&(P=bo(P,"onBeforeInput"),0<P.length&&(V=new hd("onBeforeInput","beforeinput",null,a,V),W.push({event:V,listeners:P}),V.data=oe))}Fd(W,i)})}function ai(s,i,a){return{instance:s,listener:i,currentTarget:a}}function bo(s,i){for(var a=i+"Capture",f=[];s!==null;){var h=s,m=h.stateNode;h.tag===5&&m!==null&&(h=m,m=Us(s,a),m!=null&&f.unshift(ai(s,m,h)),m=Us(s,i),m!=null&&f.push(ai(s,m,h))),s=s.return}return f}function Vr(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function zd(s,i,a,f,h){for(var m=i._reactName,x=[];a!==null&&a!==f;){var b=a,T=b.alternate,P=b.stateNode;if(T!==null&&T===f)break;b.tag===5&&P!==null&&(b=P,h?(T=Us(a,m),T!=null&&x.unshift(ai(a,T,b))):h||(T=Us(a,m),T!=null&&x.push(ai(a,T,b)))),a=a.return}x.length!==0&&s.push({event:i,listeners:x})}var Tw=/\r\n?/g,Cw=/\u0000|\uFFFD/g;function Hd(s){return(typeof s=="string"?s:""+s).replace(Tw,`
39
- `).replace(Cw,"")}function To(s,i,a){if(i=Hd(i),Hd(s)!==i&&a)throw Error(n(425))}function Co(){}var Za=null,ec=null;function tc(s,i){return s==="textarea"||s==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var nc=typeof setTimeout=="function"?setTimeout:void 0,Nw=typeof clearTimeout=="function"?clearTimeout:void 0,Ud=typeof Promise=="function"?Promise:void 0,Aw=typeof queueMicrotask=="function"?queueMicrotask:typeof Ud<"u"?function(s){return Ud.resolve(null).then(s).catch(Iw)}:nc;function Iw(s){setTimeout(function(){throw s})}function rc(s,i){var a=i,f=0;do{var h=a.nextSibling;if(s.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"){if(f===0){s.removeChild(h),Ys(i);return}f--}else a!=="$"&&a!=="$?"&&a!=="$!"||f++;a=h}while(a);Ys(i)}function Fn(s){for(;s!=null;s=s.nextSibling){var i=s.nodeType;if(i===1||i===3)break;if(i===8){if(i=s.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return s}function qd(s){s=s.previousSibling;for(var i=0;s;){if(s.nodeType===8){var a=s.data;if(a==="$"||a==="$!"||a==="$?"){if(i===0)return s;i--}else a==="/$"&&i++}s=s.previousSibling}return null}var Wr=Math.random().toString(36).slice(2),on="__reactFiber$"+Wr,ci="__reactProps$"+Wr,pn="__reactContainer$"+Wr,sc="__reactEvents$"+Wr,Lw="__reactListeners$"+Wr,Mw="__reactHandles$"+Wr;function or(s){var i=s[on];if(i)return i;for(var a=s.parentNode;a;){if(i=a[pn]||a[on]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(s=qd(s);s!==null;){if(a=s[on])return a;s=qd(s)}return i}s=a,a=s.parentNode}return null}function ui(s){return s=s[on]||s[pn],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Kr(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function No(s){return s[ci]||null}var ic=[],Gr=-1;function Bn(s){return{current:s}}function Ne(s){0>Gr||(s.current=ic[Gr],ic[Gr]=null,Gr--)}function Te(s,i){Gr++,ic[Gr]=s.current,s.current=i}var zn={},rt=Bn(zn),gt=Bn(!1),lr=zn;function Qr(s,i){var a=s.type.contextTypes;if(!a)return zn;var f=s.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===i)return f.__reactInternalMemoizedMaskedChildContext;var h={},m;for(m in a)h[m]=i[m];return f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=i,s.__reactInternalMemoizedMaskedChildContext=h),h}function yt(s){return s=s.childContextTypes,s!=null}function Ao(){Ne(gt),Ne(rt)}function Vd(s,i,a){if(rt.current!==zn)throw Error(n(168));Te(rt,i),Te(gt,a)}function Wd(s,i,a){var f=s.stateNode;if(i=i.childContextTypes,typeof f.getChildContext!="function")return a;f=f.getChildContext();for(var h in f)if(!(h in i))throw Error(n(108,Se(s)||"Unknown",h));return Z({},a,f)}function Io(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||zn,lr=rt.current,Te(rt,s),Te(gt,gt.current),!0}function Kd(s,i,a){var f=s.stateNode;if(!f)throw Error(n(169));a?(s=Wd(s,i,lr),f.__reactInternalMemoizedMergedChildContext=s,Ne(gt),Ne(rt),Te(rt,s)):Ne(gt),Te(gt,a)}var mn=null,Lo=!1,oc=!1;function Gd(s){mn===null?mn=[s]:mn.push(s)}function jw(s){Lo=!0,Gd(s)}function Hn(){if(!oc&&mn!==null){oc=!0;var s=0,i=xe;try{var a=mn;for(xe=1;s<a.length;s++){var f=a[s];do f=f(!0);while(f!==null)}mn=null,Lo=!1}catch(h){throw mn!==null&&(mn=mn.slice(s+1)),Jf(Na,Hn),h}finally{xe=i,oc=!1}}return null}var Jr=[],Xr=0,Mo=null,jo=0,Pt=[],Ot=0,ar=null,gn=1,yn="";function cr(s,i){Jr[Xr++]=jo,Jr[Xr++]=Mo,Mo=s,jo=i}function Qd(s,i,a){Pt[Ot++]=gn,Pt[Ot++]=yn,Pt[Ot++]=ar,ar=s;var f=gn;s=yn;var h=32-Wt(f)-1;f&=~(1<<h),a+=1;var m=32-Wt(i)+h;if(30<m){var x=h-h%5;m=(f&(1<<x)-1).toString(32),f>>=x,h-=x,gn=1<<32-Wt(i)+h|a<<h|f,yn=m+s}else gn=1<<m|a<<h|f,yn=s}function lc(s){s.return!==null&&(cr(s,1),Qd(s,1,0))}function ac(s){for(;s===Mo;)Mo=Jr[--Xr],Jr[Xr]=null,jo=Jr[--Xr],Jr[Xr]=null;for(;s===ar;)ar=Pt[--Ot],Pt[Ot]=null,yn=Pt[--Ot],Pt[Ot]=null,gn=Pt[--Ot],Pt[Ot]=null}var Nt=null,At=null,Ie=!1,Gt=null;function Jd(s,i){var a=Ft(5,null,null,0);a.elementType="DELETED",a.stateNode=i,a.return=s,i=s.deletions,i===null?(s.deletions=[a],s.flags|=16):i.push(a)}function Xd(s,i){switch(s.tag){case 5:var a=s.type;return i=i.nodeType!==1||a.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(s.stateNode=i,Nt=s,At=Fn(i.firstChild),!0):!1;case 6:return i=s.pendingProps===""||i.nodeType!==3?null:i,i!==null?(s.stateNode=i,Nt=s,At=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(a=ar!==null?{id:gn,overflow:yn}:null,s.memoizedState={dehydrated:i,treeContext:a,retryLane:1073741824},a=Ft(18,null,null,0),a.stateNode=i,a.return=s,s.child=a,Nt=s,At=null,!0):!1;default:return!1}}function cc(s){return(s.mode&1)!==0&&(s.flags&128)===0}function uc(s){if(Ie){var i=At;if(i){var a=i;if(!Xd(s,i)){if(cc(s))throw Error(n(418));i=Fn(a.nextSibling);var f=Nt;i&&Xd(s,i)?Jd(f,a):(s.flags=s.flags&-4097|2,Ie=!1,Nt=s)}}else{if(cc(s))throw Error(n(418));s.flags=s.flags&-4097|2,Ie=!1,Nt=s}}}function Yd(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Nt=s}function Po(s){if(s!==Nt)return!1;if(!Ie)return Yd(s),Ie=!0,!1;var i;if((i=s.tag!==3)&&!(i=s.tag!==5)&&(i=s.type,i=i!=="head"&&i!=="body"&&!tc(s.type,s.memoizedProps)),i&&(i=At)){if(cc(s))throw Zd(),Error(n(418));for(;i;)Jd(s,i),i=Fn(i.nextSibling)}if(Yd(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,i=0;s;){if(s.nodeType===8){var a=s.data;if(a==="/$"){if(i===0){At=Fn(s.nextSibling);break e}i--}else a!=="$"&&a!=="$!"&&a!=="$?"||i++}s=s.nextSibling}At=null}}else At=Nt?Fn(s.stateNode.nextSibling):null;return!0}function Zd(){for(var s=At;s;)s=Fn(s.nextSibling)}function Yr(){At=Nt=null,Ie=!1}function fc(s){Gt===null?Gt=[s]:Gt.push(s)}var Pw=R.ReactCurrentBatchConfig;function fi(s,i,a){if(s=a.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(n(309));var f=a.stateNode}if(!f)throw Error(n(147,s));var h=f,m=""+s;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===m?i.ref:(i=function(x){var b=h.refs;x===null?delete b[m]:b[m]=x},i._stringRef=m,i)}if(typeof s!="string")throw Error(n(284));if(!a._owner)throw Error(n(290,s))}return s}function Oo(s,i){throw s=Object.prototype.toString.call(i),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s))}function eh(s){var i=s._init;return i(s._payload)}function th(s){function i(L,N){if(s){var j=L.deletions;j===null?(L.deletions=[N],L.flags|=16):j.push(N)}}function a(L,N){if(!s)return null;for(;N!==null;)i(L,N),N=N.sibling;return null}function f(L,N){for(L=new Map;N!==null;)N.key!==null?L.set(N.key,N):L.set(N.index,N),N=N.sibling;return L}function h(L,N){return L=Jn(L,N),L.index=0,L.sibling=null,L}function m(L,N,j){return L.index=j,s?(j=L.alternate,j!==null?(j=j.index,j<N?(L.flags|=2,N):j):(L.flags|=2,N)):(L.flags|=1048576,N)}function x(L){return s&&L.alternate===null&&(L.flags|=2),L}function b(L,N,j,Q){return N===null||N.tag!==6?(N=nu(j,L.mode,Q),N.return=L,N):(N=h(N,j),N.return=L,N)}function T(L,N,j,Q){var re=j.type;return re===H?V(L,N,j.props.children,Q,j.key):N!==null&&(N.elementType===re||typeof re=="object"&&re!==null&&re.$$typeof===be&&eh(re)===N.type)?(Q=h(N,j.props),Q.ref=fi(L,N,j),Q.return=L,Q):(Q=il(j.type,j.key,j.props,null,L.mode,Q),Q.ref=fi(L,N,j),Q.return=L,Q)}function P(L,N,j,Q){return N===null||N.tag!==4||N.stateNode.containerInfo!==j.containerInfo||N.stateNode.implementation!==j.implementation?(N=ru(j,L.mode,Q),N.return=L,N):(N=h(N,j.children||[]),N.return=L,N)}function V(L,N,j,Q,re){return N===null||N.tag!==7?(N=yr(j,L.mode,Q,re),N.return=L,N):(N=h(N,j),N.return=L,N)}function W(L,N,j){if(typeof N=="string"&&N!==""||typeof N=="number")return N=nu(""+N,L.mode,j),N.return=L,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case D:return j=il(N.type,N.key,N.props,null,L.mode,j),j.ref=fi(L,null,N),j.return=L,j;case z:return N=ru(N,L.mode,j),N.return=L,N;case be:var Q=N._init;return W(L,Q(N._payload),j)}if(An(N)||se(N))return N=yr(N,L.mode,j,null),N.return=L,N;Oo(L,N)}return null}function q(L,N,j,Q){var re=N!==null?N.key:null;if(typeof j=="string"&&j!==""||typeof j=="number")return re!==null?null:b(L,N,""+j,Q);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case D:return j.key===re?T(L,N,j,Q):null;case z:return j.key===re?P(L,N,j,Q):null;case be:return re=j._init,q(L,N,re(j._payload),Q)}if(An(j)||se(j))return re!==null?null:V(L,N,j,Q,null);Oo(L,j)}return null}function Y(L,N,j,Q,re){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return L=L.get(j)||null,b(N,L,""+Q,re);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case D:return L=L.get(Q.key===null?j:Q.key)||null,T(N,L,Q,re);case z:return L=L.get(Q.key===null?j:Q.key)||null,P(N,L,Q,re);case be:var ie=Q._init;return Y(L,N,j,ie(Q._payload),re)}if(An(Q)||se(Q))return L=L.get(j)||null,V(N,L,Q,re,null);Oo(N,Q)}return null}function te(L,N,j,Q){for(var re=null,ie=null,oe=N,ae=N=0,Je=null;oe!==null&&ae<j.length;ae++){oe.index>ae?(Je=oe,oe=null):Je=oe.sibling;var we=q(L,oe,j[ae],Q);if(we===null){oe===null&&(oe=Je);break}s&&oe&&we.alternate===null&&i(L,oe),N=m(we,N,ae),ie===null?re=we:ie.sibling=we,ie=we,oe=Je}if(ae===j.length)return a(L,oe),Ie&&cr(L,ae),re;if(oe===null){for(;ae<j.length;ae++)oe=W(L,j[ae],Q),oe!==null&&(N=m(oe,N,ae),ie===null?re=oe:ie.sibling=oe,ie=oe);return Ie&&cr(L,ae),re}for(oe=f(L,oe);ae<j.length;ae++)Je=Y(oe,L,ae,j[ae],Q),Je!==null&&(s&&Je.alternate!==null&&oe.delete(Je.key===null?ae:Je.key),N=m(Je,N,ae),ie===null?re=Je:ie.sibling=Je,ie=Je);return s&&oe.forEach(function(Xn){return i(L,Xn)}),Ie&&cr(L,ae),re}function ne(L,N,j,Q){var re=se(j);if(typeof re!="function")throw Error(n(150));if(j=re.call(j),j==null)throw Error(n(151));for(var ie=re=null,oe=N,ae=N=0,Je=null,we=j.next();oe!==null&&!we.done;ae++,we=j.next()){oe.index>ae?(Je=oe,oe=null):Je=oe.sibling;var Xn=q(L,oe,we.value,Q);if(Xn===null){oe===null&&(oe=Je);break}s&&oe&&Xn.alternate===null&&i(L,oe),N=m(Xn,N,ae),ie===null?re=Xn:ie.sibling=Xn,ie=Xn,oe=Je}if(we.done)return a(L,oe),Ie&&cr(L,ae),re;if(oe===null){for(;!we.done;ae++,we=j.next())we=W(L,we.value,Q),we!==null&&(N=m(we,N,ae),ie===null?re=we:ie.sibling=we,ie=we);return Ie&&cr(L,ae),re}for(oe=f(L,oe);!we.done;ae++,we=j.next())we=Y(oe,L,ae,we.value,Q),we!==null&&(s&&we.alternate!==null&&oe.delete(we.key===null?ae:we.key),N=m(we,N,ae),ie===null?re=we:ie.sibling=we,ie=we);return s&&oe.forEach(function(h0){return i(L,h0)}),Ie&&cr(L,ae),re}function Fe(L,N,j,Q){if(typeof j=="object"&&j!==null&&j.type===H&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case D:e:{for(var re=j.key,ie=N;ie!==null;){if(ie.key===re){if(re=j.type,re===H){if(ie.tag===7){a(L,ie.sibling),N=h(ie,j.props.children),N.return=L,L=N;break e}}else if(ie.elementType===re||typeof re=="object"&&re!==null&&re.$$typeof===be&&eh(re)===ie.type){a(L,ie.sibling),N=h(ie,j.props),N.ref=fi(L,ie,j),N.return=L,L=N;break e}a(L,ie);break}else i(L,ie);ie=ie.sibling}j.type===H?(N=yr(j.props.children,L.mode,Q,j.key),N.return=L,L=N):(Q=il(j.type,j.key,j.props,null,L.mode,Q),Q.ref=fi(L,N,j),Q.return=L,L=Q)}return x(L);case z:e:{for(ie=j.key;N!==null;){if(N.key===ie)if(N.tag===4&&N.stateNode.containerInfo===j.containerInfo&&N.stateNode.implementation===j.implementation){a(L,N.sibling),N=h(N,j.children||[]),N.return=L,L=N;break e}else{a(L,N);break}else i(L,N);N=N.sibling}N=ru(j,L.mode,Q),N.return=L,L=N}return x(L);case be:return ie=j._init,Fe(L,N,ie(j._payload),Q)}if(An(j))return te(L,N,j,Q);if(se(j))return ne(L,N,j,Q);Oo(L,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,N!==null&&N.tag===6?(a(L,N.sibling),N=h(N,j),N.return=L,L=N):(a(L,N),N=nu(j,L.mode,Q),N.return=L,L=N),x(L)):a(L,N)}return Fe}var Zr=th(!0),nh=th(!1),$o=Bn(null),Ro=null,es=null,dc=null;function hc(){dc=es=Ro=null}function pc(s){var i=$o.current;Ne($o),s._currentValue=i}function mc(s,i,a){for(;s!==null;){var f=s.alternate;if((s.childLanes&i)!==i?(s.childLanes|=i,f!==null&&(f.childLanes|=i)):f!==null&&(f.childLanes&i)!==i&&(f.childLanes|=i),s===a)break;s=s.return}}function ts(s,i){Ro=s,dc=es=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&i)!==0&&(vt=!0),s.firstContext=null)}function $t(s){var i=s._currentValue;if(dc!==s)if(s={context:s,memoizedValue:i,next:null},es===null){if(Ro===null)throw Error(n(308));es=s,Ro.dependencies={lanes:0,firstContext:s}}else es=es.next=s;return i}var ur=null;function gc(s){ur===null?ur=[s]:ur.push(s)}function rh(s,i,a,f){var h=i.interleaved;return h===null?(a.next=a,gc(i)):(a.next=h.next,h.next=a),i.interleaved=a,vn(s,f)}function vn(s,i){s.lanes|=i;var a=s.alternate;for(a!==null&&(a.lanes|=i),a=s,s=s.return;s!==null;)s.childLanes|=i,a=s.alternate,a!==null&&(a.childLanes|=i),a=s,s=s.return;return a.tag===3?a.stateNode:null}var Un=!1;function yc(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sh(s,i){s=s.updateQueue,i.updateQueue===s&&(i.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function wn(s,i){return{eventTime:s,lane:i,tag:0,payload:null,callback:null,next:null}}function qn(s,i,a){var f=s.updateQueue;if(f===null)return null;if(f=f.shared,(ve&2)!==0){var h=f.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),f.pending=i,vn(s,a)}return h=f.interleaved,h===null?(i.next=i,gc(f)):(i.next=h.next,h.next=i),f.interleaved=i,vn(s,a)}function Do(s,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var f=i.lanes;f&=s.pendingLanes,a|=f,i.lanes=a,La(s,a)}}function ih(s,i){var a=s.updateQueue,f=s.alternate;if(f!==null&&(f=f.updateQueue,a===f)){var h=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var x={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};m===null?h=m=x:m=m.next=x,a=a.next}while(a!==null);m===null?h=m=i:m=m.next=i}else h=m=i;a={baseState:f.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:f.shared,effects:f.effects},s.updateQueue=a;return}s=a.lastBaseUpdate,s===null?a.firstBaseUpdate=i:s.next=i,a.lastBaseUpdate=i}function Fo(s,i,a,f){var h=s.updateQueue;Un=!1;var m=h.firstBaseUpdate,x=h.lastBaseUpdate,b=h.shared.pending;if(b!==null){h.shared.pending=null;var T=b,P=T.next;T.next=null,x===null?m=P:x.next=P,x=T;var V=s.alternate;V!==null&&(V=V.updateQueue,b=V.lastBaseUpdate,b!==x&&(b===null?V.firstBaseUpdate=P:b.next=P,V.lastBaseUpdate=T))}if(m!==null){var W=h.baseState;x=0,V=P=T=null,b=m;do{var q=b.lane,Y=b.eventTime;if((f&q)===q){V!==null&&(V=V.next={eventTime:Y,lane:0,tag:b.tag,payload:b.payload,callback:b.callback,next:null});e:{var te=s,ne=b;switch(q=i,Y=a,ne.tag){case 1:if(te=ne.payload,typeof te=="function"){W=te.call(Y,W,q);break e}W=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=ne.payload,q=typeof te=="function"?te.call(Y,W,q):te,q==null)break e;W=Z({},W,q);break e;case 2:Un=!0}}b.callback!==null&&b.lane!==0&&(s.flags|=64,q=h.effects,q===null?h.effects=[b]:q.push(b))}else Y={eventTime:Y,lane:q,tag:b.tag,payload:b.payload,callback:b.callback,next:null},V===null?(P=V=Y,T=W):V=V.next=Y,x|=q;if(b=b.next,b===null){if(b=h.shared.pending,b===null)break;q=b,b=q.next,q.next=null,h.lastBaseUpdate=q,h.shared.pending=null}}while(!0);if(V===null&&(T=W),h.baseState=T,h.firstBaseUpdate=P,h.lastBaseUpdate=V,i=h.shared.interleaved,i!==null){h=i;do x|=h.lane,h=h.next;while(h!==i)}else m===null&&(h.shared.lanes=0);hr|=x,s.lanes=x,s.memoizedState=W}}function oh(s,i,a){if(s=i.effects,i.effects=null,s!==null)for(i=0;i<s.length;i++){var f=s[i],h=f.callback;if(h!==null){if(f.callback=null,f=a,typeof h!="function")throw Error(n(191,h));h.call(f)}}}var di={},ln=Bn(di),hi=Bn(di),pi=Bn(di);function fr(s){if(s===di)throw Error(n(174));return s}function vc(s,i){switch(Te(pi,i),Te(hi,s),Te(ln,di),s=i.nodeType,s){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:Ln(null,"");break;default:s=s===8?i.parentNode:i,i=s.namespaceURI||null,s=s.tagName,i=Ln(i,s)}Ne(ln),Te(ln,i)}function ns(){Ne(ln),Ne(hi),Ne(pi)}function lh(s){fr(pi.current);var i=fr(ln.current),a=Ln(i,s.type);i!==a&&(Te(hi,s),Te(ln,a))}function wc(s){hi.current===s&&(Ne(ln),Ne(hi))}var je=Bn(0);function Bo(s){for(var i=s;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Sc=[];function xc(){for(var s=0;s<Sc.length;s++)Sc[s]._workInProgressVersionPrimary=null;Sc.length=0}var zo=R.ReactCurrentDispatcher,_c=R.ReactCurrentBatchConfig,dr=0,Pe=null,Ve=null,Ge=null,Ho=!1,mi=!1,gi=0,Ow=0;function st(){throw Error(n(321))}function Ec(s,i){if(i===null)return!1;for(var a=0;a<i.length&&a<s.length;a++)if(!Kt(s[a],i[a]))return!1;return!0}function kc(s,i,a,f,h,m){if(dr=m,Pe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,zo.current=s===null||s.memoizedState===null?Fw:Bw,s=a(f,h),mi){m=0;do{if(mi=!1,gi=0,25<=m)throw Error(n(301));m+=1,Ge=Ve=null,i.updateQueue=null,zo.current=zw,s=a(f,h)}while(mi)}if(zo.current=Vo,i=Ve!==null&&Ve.next!==null,dr=0,Ge=Ve=Pe=null,Ho=!1,i)throw Error(n(300));return s}function bc(){var s=gi!==0;return gi=0,s}function an(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?Pe.memoizedState=Ge=s:Ge=Ge.next=s,Ge}function Rt(){if(Ve===null){var s=Pe.alternate;s=s!==null?s.memoizedState:null}else s=Ve.next;var i=Ge===null?Pe.memoizedState:Ge.next;if(i!==null)Ge=i,Ve=s;else{if(s===null)throw Error(n(310));Ve=s,s={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},Ge===null?Pe.memoizedState=Ge=s:Ge=Ge.next=s}return Ge}function yi(s,i){return typeof i=="function"?i(s):i}function Tc(s){var i=Rt(),a=i.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=s;var f=Ve,h=f.baseQueue,m=a.pending;if(m!==null){if(h!==null){var x=h.next;h.next=m.next,m.next=x}f.baseQueue=h=m,a.pending=null}if(h!==null){m=h.next,f=f.baseState;var b=x=null,T=null,P=m;do{var V=P.lane;if((dr&V)===V)T!==null&&(T=T.next={lane:0,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),f=P.hasEagerState?P.eagerState:s(f,P.action);else{var W={lane:V,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null};T===null?(b=T=W,x=f):T=T.next=W,Pe.lanes|=V,hr|=V}P=P.next}while(P!==null&&P!==m);T===null?x=f:T.next=b,Kt(f,i.memoizedState)||(vt=!0),i.memoizedState=f,i.baseState=x,i.baseQueue=T,a.lastRenderedState=f}if(s=a.interleaved,s!==null){h=s;do m=h.lane,Pe.lanes|=m,hr|=m,h=h.next;while(h!==s)}else h===null&&(a.lanes=0);return[i.memoizedState,a.dispatch]}function Cc(s){var i=Rt(),a=i.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=s;var f=a.dispatch,h=a.pending,m=i.memoizedState;if(h!==null){a.pending=null;var x=h=h.next;do m=s(m,x.action),x=x.next;while(x!==h);Kt(m,i.memoizedState)||(vt=!0),i.memoizedState=m,i.baseQueue===null&&(i.baseState=m),a.lastRenderedState=m}return[m,f]}function ah(){}function ch(s,i){var a=Pe,f=Rt(),h=i(),m=!Kt(f.memoizedState,h);if(m&&(f.memoizedState=h,vt=!0),f=f.queue,Nc(dh.bind(null,a,f,s),[s]),f.getSnapshot!==i||m||Ge!==null&&Ge.memoizedState.tag&1){if(a.flags|=2048,vi(9,fh.bind(null,a,f,h,i),void 0,null),Qe===null)throw Error(n(349));(dr&30)!==0||uh(a,i,h)}return h}function uh(s,i,a){s.flags|=16384,s={getSnapshot:i,value:a},i=Pe.updateQueue,i===null?(i={lastEffect:null,stores:null},Pe.updateQueue=i,i.stores=[s]):(a=i.stores,a===null?i.stores=[s]:a.push(s))}function fh(s,i,a,f){i.value=a,i.getSnapshot=f,hh(i)&&ph(s)}function dh(s,i,a){return a(function(){hh(i)&&ph(s)})}function hh(s){var i=s.getSnapshot;s=s.value;try{var a=i();return!Kt(s,a)}catch{return!0}}function ph(s){var i=vn(s,1);i!==null&&Yt(i,s,1,-1)}function mh(s){var i=an();return typeof s=="function"&&(s=s()),i.memoizedState=i.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yi,lastRenderedState:s},i.queue=s,s=s.dispatch=Dw.bind(null,Pe,s),[i.memoizedState,s]}function vi(s,i,a,f){return s={tag:s,create:i,destroy:a,deps:f,next:null},i=Pe.updateQueue,i===null?(i={lastEffect:null,stores:null},Pe.updateQueue=i,i.lastEffect=s.next=s):(a=i.lastEffect,a===null?i.lastEffect=s.next=s:(f=a.next,a.next=s,s.next=f,i.lastEffect=s)),s}function gh(){return Rt().memoizedState}function Uo(s,i,a,f){var h=an();Pe.flags|=s,h.memoizedState=vi(1|i,a,void 0,f===void 0?null:f)}function qo(s,i,a,f){var h=Rt();f=f===void 0?null:f;var m=void 0;if(Ve!==null){var x=Ve.memoizedState;if(m=x.destroy,f!==null&&Ec(f,x.deps)){h.memoizedState=vi(i,a,m,f);return}}Pe.flags|=s,h.memoizedState=vi(1|i,a,m,f)}function yh(s,i){return Uo(8390656,8,s,i)}function Nc(s,i){return qo(2048,8,s,i)}function vh(s,i){return qo(4,2,s,i)}function wh(s,i){return qo(4,4,s,i)}function Sh(s,i){if(typeof i=="function")return s=s(),i(s),function(){i(null)};if(i!=null)return s=s(),i.current=s,function(){i.current=null}}function xh(s,i,a){return a=a!=null?a.concat([s]):null,qo(4,4,Sh.bind(null,i,s),a)}function Ac(){}function _h(s,i){var a=Rt();i=i===void 0?null:i;var f=a.memoizedState;return f!==null&&i!==null&&Ec(i,f[1])?f[0]:(a.memoizedState=[s,i],s)}function Eh(s,i){var a=Rt();i=i===void 0?null:i;var f=a.memoizedState;return f!==null&&i!==null&&Ec(i,f[1])?f[0]:(s=s(),a.memoizedState=[s,i],s)}function kh(s,i,a){return(dr&21)===0?(s.baseState&&(s.baseState=!1,vt=!0),s.memoizedState=a):(Kt(a,i)||(a=ed(),Pe.lanes|=a,hr|=a,s.baseState=!0),i)}function $w(s,i){var a=xe;xe=a!==0&&4>a?a:4,s(!0);var f=_c.transition;_c.transition={};try{s(!1),i()}finally{xe=a,_c.transition=f}}function bh(){return Rt().memoizedState}function Rw(s,i,a){var f=Gn(s);if(a={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null},Th(s))Ch(i,a);else if(a=rh(s,i,a,f),a!==null){var h=ft();Yt(a,s,f,h),Nh(a,i,f)}}function Dw(s,i,a){var f=Gn(s),h={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null};if(Th(s))Ch(i,h);else{var m=s.alternate;if(s.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var x=i.lastRenderedState,b=m(x,a);if(h.hasEagerState=!0,h.eagerState=b,Kt(b,x)){var T=i.interleaved;T===null?(h.next=h,gc(i)):(h.next=T.next,T.next=h),i.interleaved=h;return}}catch{}finally{}a=rh(s,i,h,f),a!==null&&(h=ft(),Yt(a,s,f,h),Nh(a,i,f))}}function Th(s){var i=s.alternate;return s===Pe||i!==null&&i===Pe}function Ch(s,i){mi=Ho=!0;var a=s.pending;a===null?i.next=i:(i.next=a.next,a.next=i),s.pending=i}function Nh(s,i,a){if((a&4194240)!==0){var f=i.lanes;f&=s.pendingLanes,a|=f,i.lanes=a,La(s,a)}}var Vo={readContext:$t,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useInsertionEffect:st,useLayoutEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useMutableSource:st,useSyncExternalStore:st,useId:st,unstable_isNewReconciler:!1},Fw={readContext:$t,useCallback:function(s,i){return an().memoizedState=[s,i===void 0?null:i],s},useContext:$t,useEffect:yh,useImperativeHandle:function(s,i,a){return a=a!=null?a.concat([s]):null,Uo(4194308,4,Sh.bind(null,i,s),a)},useLayoutEffect:function(s,i){return Uo(4194308,4,s,i)},useInsertionEffect:function(s,i){return Uo(4,2,s,i)},useMemo:function(s,i){var a=an();return i=i===void 0?null:i,s=s(),a.memoizedState=[s,i],s},useReducer:function(s,i,a){var f=an();return i=a!==void 0?a(i):i,f.memoizedState=f.baseState=i,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:i},f.queue=s,s=s.dispatch=Rw.bind(null,Pe,s),[f.memoizedState,s]},useRef:function(s){var i=an();return s={current:s},i.memoizedState=s},useState:mh,useDebugValue:Ac,useDeferredValue:function(s){return an().memoizedState=s},useTransition:function(){var s=mh(!1),i=s[0];return s=$w.bind(null,s[1]),an().memoizedState=s,[i,s]},useMutableSource:function(){},useSyncExternalStore:function(s,i,a){var f=Pe,h=an();if(Ie){if(a===void 0)throw Error(n(407));a=a()}else{if(a=i(),Qe===null)throw Error(n(349));(dr&30)!==0||uh(f,i,a)}h.memoizedState=a;var m={value:a,getSnapshot:i};return h.queue=m,yh(dh.bind(null,f,m,s),[s]),f.flags|=2048,vi(9,fh.bind(null,f,m,a,i),void 0,null),a},useId:function(){var s=an(),i=Qe.identifierPrefix;if(Ie){var a=yn,f=gn;a=(f&~(1<<32-Wt(f)-1)).toString(32)+a,i=":"+i+"R"+a,a=gi++,0<a&&(i+="H"+a.toString(32)),i+=":"}else a=Ow++,i=":"+i+"r"+a.toString(32)+":";return s.memoizedState=i},unstable_isNewReconciler:!1},Bw={readContext:$t,useCallback:_h,useContext:$t,useEffect:Nc,useImperativeHandle:xh,useInsertionEffect:vh,useLayoutEffect:wh,useMemo:Eh,useReducer:Tc,useRef:gh,useState:function(){return Tc(yi)},useDebugValue:Ac,useDeferredValue:function(s){var i=Rt();return kh(i,Ve.memoizedState,s)},useTransition:function(){var s=Tc(yi)[0],i=Rt().memoizedState;return[s,i]},useMutableSource:ah,useSyncExternalStore:ch,useId:bh,unstable_isNewReconciler:!1},zw={readContext:$t,useCallback:_h,useContext:$t,useEffect:Nc,useImperativeHandle:xh,useInsertionEffect:vh,useLayoutEffect:wh,useMemo:Eh,useReducer:Cc,useRef:gh,useState:function(){return Cc(yi)},useDebugValue:Ac,useDeferredValue:function(s){var i=Rt();return Ve===null?i.memoizedState=s:kh(i,Ve.memoizedState,s)},useTransition:function(){var s=Cc(yi)[0],i=Rt().memoizedState;return[s,i]},useMutableSource:ah,useSyncExternalStore:ch,useId:bh,unstable_isNewReconciler:!1};function Qt(s,i){if(s&&s.defaultProps){i=Z({},i),s=s.defaultProps;for(var a in s)i[a]===void 0&&(i[a]=s[a]);return i}return i}function Ic(s,i,a,f){i=s.memoizedState,a=a(f,i),a=a==null?i:Z({},i,a),s.memoizedState=a,s.lanes===0&&(s.updateQueue.baseState=a)}var Wo={isMounted:function(s){return(s=s._reactInternals)?ir(s)===s:!1},enqueueSetState:function(s,i,a){s=s._reactInternals;var f=ft(),h=Gn(s),m=wn(f,h);m.payload=i,a!=null&&(m.callback=a),i=qn(s,m,h),i!==null&&(Yt(i,s,h,f),Do(i,s,h))},enqueueReplaceState:function(s,i,a){s=s._reactInternals;var f=ft(),h=Gn(s),m=wn(f,h);m.tag=1,m.payload=i,a!=null&&(m.callback=a),i=qn(s,m,h),i!==null&&(Yt(i,s,h,f),Do(i,s,h))},enqueueForceUpdate:function(s,i){s=s._reactInternals;var a=ft(),f=Gn(s),h=wn(a,f);h.tag=2,i!=null&&(h.callback=i),i=qn(s,h,f),i!==null&&(Yt(i,s,f,a),Do(i,s,f))}};function Ah(s,i,a,f,h,m,x){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(f,m,x):i.prototype&&i.prototype.isPureReactComponent?!si(a,f)||!si(h,m):!0}function Ih(s,i,a){var f=!1,h=zn,m=i.contextType;return typeof m=="object"&&m!==null?m=$t(m):(h=yt(i)?lr:rt.current,f=i.contextTypes,m=(f=f!=null)?Qr(s,h):zn),i=new i(a,m),s.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Wo,s.stateNode=i,i._reactInternals=s,f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=h,s.__reactInternalMemoizedMaskedChildContext=m),i}function Lh(s,i,a,f){s=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,f),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,f),i.state!==s&&Wo.enqueueReplaceState(i,i.state,null)}function Lc(s,i,a,f){var h=s.stateNode;h.props=a,h.state=s.memoizedState,h.refs={},yc(s);var m=i.contextType;typeof m=="object"&&m!==null?h.context=$t(m):(m=yt(i)?lr:rt.current,h.context=Qr(s,m)),h.state=s.memoizedState,m=i.getDerivedStateFromProps,typeof m=="function"&&(Ic(s,i,m,a),h.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(i=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),i!==h.state&&Wo.enqueueReplaceState(h,h.state,null),Fo(s,a,h,f),h.state=s.memoizedState),typeof h.componentDidMount=="function"&&(s.flags|=4194308)}function rs(s,i){try{var a="",f=i;do a+=pe(f),f=f.return;while(f);var h=a}catch(m){h=`
40
- Error generating stack: `+m.message+`
41
- `+m.stack}return{value:s,source:i,stack:h,digest:null}}function Mc(s,i,a){return{value:s,source:null,stack:a??null,digest:i??null}}function jc(s,i){try{console.error(i.value)}catch(a){setTimeout(function(){throw a})}}var Hw=typeof WeakMap=="function"?WeakMap:Map;function Mh(s,i,a){a=wn(-1,a),a.tag=3,a.payload={element:null};var f=i.value;return a.callback=function(){Zo||(Zo=!0,Gc=f),jc(s,i)},a}function jh(s,i,a){a=wn(-1,a),a.tag=3;var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var h=i.value;a.payload=function(){return f(h)},a.callback=function(){jc(s,i)}}var m=s.stateNode;return m!==null&&typeof m.componentDidCatch=="function"&&(a.callback=function(){jc(s,i),typeof f!="function"&&(Wn===null?Wn=new Set([this]):Wn.add(this));var x=i.stack;this.componentDidCatch(i.value,{componentStack:x!==null?x:""})}),a}function Ph(s,i,a){var f=s.pingCache;if(f===null){f=s.pingCache=new Hw;var h=new Set;f.set(i,h)}else h=f.get(i),h===void 0&&(h=new Set,f.set(i,h));h.has(a)||(h.add(a),s=n0.bind(null,s,i,a),i.then(s,s))}function Oh(s){do{var i;if((i=s.tag===13)&&(i=s.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return s;s=s.return}while(s!==null);return null}function $h(s,i,a,f,h){return(s.mode&1)===0?(s===i?s.flags|=65536:(s.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(i=wn(-1,1),i.tag=2,qn(a,i,1))),a.lanes|=1),s):(s.flags|=65536,s.lanes=h,s)}var Uw=R.ReactCurrentOwner,vt=!1;function ut(s,i,a,f){i.child=s===null?nh(i,null,a,f):Zr(i,s.child,a,f)}function Rh(s,i,a,f,h){a=a.render;var m=i.ref;return ts(i,h),f=kc(s,i,a,f,m,h),a=bc(),s!==null&&!vt?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~h,Sn(s,i,h)):(Ie&&a&&lc(i),i.flags|=1,ut(s,i,f,h),i.child)}function Dh(s,i,a,f,h){if(s===null){var m=a.type;return typeof m=="function"&&!tu(m)&&m.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(i.tag=15,i.type=m,Fh(s,i,m,f,h)):(s=il(a.type,null,f,i,i.mode,h),s.ref=i.ref,s.return=i,i.child=s)}if(m=s.child,(s.lanes&h)===0){var x=m.memoizedProps;if(a=a.compare,a=a!==null?a:si,a(x,f)&&s.ref===i.ref)return Sn(s,i,h)}return i.flags|=1,s=Jn(m,f),s.ref=i.ref,s.return=i,i.child=s}function Fh(s,i,a,f,h){if(s!==null){var m=s.memoizedProps;if(si(m,f)&&s.ref===i.ref)if(vt=!1,i.pendingProps=f=m,(s.lanes&h)!==0)(s.flags&131072)!==0&&(vt=!0);else return i.lanes=s.lanes,Sn(s,i,h)}return Pc(s,i,a,f,h)}function Bh(s,i,a){var f=i.pendingProps,h=f.children,m=s!==null?s.memoizedState:null;if(f.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},Te(is,It),It|=a;else{if((a&1073741824)===0)return s=m!==null?m.baseLanes|a:a,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:s,cachePool:null,transitions:null},i.updateQueue=null,Te(is,It),It|=s,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=m!==null?m.baseLanes:a,Te(is,It),It|=f}else m!==null?(f=m.baseLanes|a,i.memoizedState=null):f=a,Te(is,It),It|=f;return ut(s,i,h,a),i.child}function zh(s,i){var a=i.ref;(s===null&&a!==null||s!==null&&s.ref!==a)&&(i.flags|=512,i.flags|=2097152)}function Pc(s,i,a,f,h){var m=yt(a)?lr:rt.current;return m=Qr(i,m),ts(i,h),a=kc(s,i,a,f,m,h),f=bc(),s!==null&&!vt?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~h,Sn(s,i,h)):(Ie&&f&&lc(i),i.flags|=1,ut(s,i,a,h),i.child)}function Hh(s,i,a,f,h){if(yt(a)){var m=!0;Io(i)}else m=!1;if(ts(i,h),i.stateNode===null)Go(s,i),Ih(i,a,f),Lc(i,a,f,h),f=!0;else if(s===null){var x=i.stateNode,b=i.memoizedProps;x.props=b;var T=x.context,P=a.contextType;typeof P=="object"&&P!==null?P=$t(P):(P=yt(a)?lr:rt.current,P=Qr(i,P));var V=a.getDerivedStateFromProps,W=typeof V=="function"||typeof x.getSnapshotBeforeUpdate=="function";W||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(b!==f||T!==P)&&Lh(i,x,f,P),Un=!1;var q=i.memoizedState;x.state=q,Fo(i,f,x,h),T=i.memoizedState,b!==f||q!==T||gt.current||Un?(typeof V=="function"&&(Ic(i,a,V,f),T=i.memoizedState),(b=Un||Ah(i,a,b,f,q,T,P))?(W||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(i.flags|=4194308)):(typeof x.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=f,i.memoizedState=T),x.props=f,x.state=T,x.context=P,f=b):(typeof x.componentDidMount=="function"&&(i.flags|=4194308),f=!1)}else{x=i.stateNode,sh(s,i),b=i.memoizedProps,P=i.type===i.elementType?b:Qt(i.type,b),x.props=P,W=i.pendingProps,q=x.context,T=a.contextType,typeof T=="object"&&T!==null?T=$t(T):(T=yt(a)?lr:rt.current,T=Qr(i,T));var Y=a.getDerivedStateFromProps;(V=typeof Y=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(b!==W||q!==T)&&Lh(i,x,f,T),Un=!1,q=i.memoizedState,x.state=q,Fo(i,f,x,h);var te=i.memoizedState;b!==W||q!==te||gt.current||Un?(typeof Y=="function"&&(Ic(i,a,Y,f),te=i.memoizedState),(P=Un||Ah(i,a,P,f,q,te,T)||!1)?(V||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(f,te,T),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(f,te,T)),typeof x.componentDidUpdate=="function"&&(i.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof x.componentDidUpdate!="function"||b===s.memoizedProps&&q===s.memoizedState||(i.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||b===s.memoizedProps&&q===s.memoizedState||(i.flags|=1024),i.memoizedProps=f,i.memoizedState=te),x.props=f,x.state=te,x.context=T,f=P):(typeof x.componentDidUpdate!="function"||b===s.memoizedProps&&q===s.memoizedState||(i.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||b===s.memoizedProps&&q===s.memoizedState||(i.flags|=1024),f=!1)}return Oc(s,i,a,f,m,h)}function Oc(s,i,a,f,h,m){zh(s,i);var x=(i.flags&128)!==0;if(!f&&!x)return h&&Kd(i,a,!1),Sn(s,i,m);f=i.stateNode,Uw.current=i;var b=x&&typeof a.getDerivedStateFromError!="function"?null:f.render();return i.flags|=1,s!==null&&x?(i.child=Zr(i,s.child,null,m),i.child=Zr(i,null,b,m)):ut(s,i,b,m),i.memoizedState=f.state,h&&Kd(i,a,!0),i.child}function Uh(s){var i=s.stateNode;i.pendingContext?Vd(s,i.pendingContext,i.pendingContext!==i.context):i.context&&Vd(s,i.context,!1),vc(s,i.containerInfo)}function qh(s,i,a,f,h){return Yr(),fc(h),i.flags|=256,ut(s,i,a,f),i.child}var $c={dehydrated:null,treeContext:null,retryLane:0};function Rc(s){return{baseLanes:s,cachePool:null,transitions:null}}function Vh(s,i,a){var f=i.pendingProps,h=je.current,m=!1,x=(i.flags&128)!==0,b;if((b=x)||(b=s!==null&&s.memoizedState===null?!1:(h&2)!==0),b?(m=!0,i.flags&=-129):(s===null||s.memoizedState!==null)&&(h|=1),Te(je,h&1),s===null)return uc(i),s=i.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((i.mode&1)===0?i.lanes=1:s.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(x=f.children,s=f.fallback,m?(f=i.mode,m=i.child,x={mode:"hidden",children:x},(f&1)===0&&m!==null?(m.childLanes=0,m.pendingProps=x):m=ol(x,f,0,null),s=yr(s,f,a,null),m.return=i,s.return=i,m.sibling=s,i.child=m,i.child.memoizedState=Rc(a),i.memoizedState=$c,s):Dc(i,x));if(h=s.memoizedState,h!==null&&(b=h.dehydrated,b!==null))return qw(s,i,x,f,b,h,a);if(m){m=f.fallback,x=i.mode,h=s.child,b=h.sibling;var T={mode:"hidden",children:f.children};return(x&1)===0&&i.child!==h?(f=i.child,f.childLanes=0,f.pendingProps=T,i.deletions=null):(f=Jn(h,T),f.subtreeFlags=h.subtreeFlags&14680064),b!==null?m=Jn(b,m):(m=yr(m,x,a,null),m.flags|=2),m.return=i,f.return=i,f.sibling=m,i.child=f,f=m,m=i.child,x=s.child.memoizedState,x=x===null?Rc(a):{baseLanes:x.baseLanes|a,cachePool:null,transitions:x.transitions},m.memoizedState=x,m.childLanes=s.childLanes&~a,i.memoizedState=$c,f}return m=s.child,s=m.sibling,f=Jn(m,{mode:"visible",children:f.children}),(i.mode&1)===0&&(f.lanes=a),f.return=i,f.sibling=null,s!==null&&(a=i.deletions,a===null?(i.deletions=[s],i.flags|=16):a.push(s)),i.child=f,i.memoizedState=null,f}function Dc(s,i){return i=ol({mode:"visible",children:i},s.mode,0,null),i.return=s,s.child=i}function Ko(s,i,a,f){return f!==null&&fc(f),Zr(i,s.child,null,a),s=Dc(i,i.pendingProps.children),s.flags|=2,i.memoizedState=null,s}function qw(s,i,a,f,h,m,x){if(a)return i.flags&256?(i.flags&=-257,f=Mc(Error(n(422))),Ko(s,i,x,f)):i.memoizedState!==null?(i.child=s.child,i.flags|=128,null):(m=f.fallback,h=i.mode,f=ol({mode:"visible",children:f.children},h,0,null),m=yr(m,h,x,null),m.flags|=2,f.return=i,m.return=i,f.sibling=m,i.child=f,(i.mode&1)!==0&&Zr(i,s.child,null,x),i.child.memoizedState=Rc(x),i.memoizedState=$c,m);if((i.mode&1)===0)return Ko(s,i,x,null);if(h.data==="$!"){if(f=h.nextSibling&&h.nextSibling.dataset,f)var b=f.dgst;return f=b,m=Error(n(419)),f=Mc(m,f,void 0),Ko(s,i,x,f)}if(b=(x&s.childLanes)!==0,vt||b){if(f=Qe,f!==null){switch(x&-x){case 4:h=2;break;case 16:h=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:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(f.suspendedLanes|x))!==0?0:h,h!==0&&h!==m.retryLane&&(m.retryLane=h,vn(s,h),Yt(f,s,h,-1))}return eu(),f=Mc(Error(n(421))),Ko(s,i,x,f)}return h.data==="$?"?(i.flags|=128,i.child=s.child,i=r0.bind(null,s),h._reactRetry=i,null):(s=m.treeContext,At=Fn(h.nextSibling),Nt=i,Ie=!0,Gt=null,s!==null&&(Pt[Ot++]=gn,Pt[Ot++]=yn,Pt[Ot++]=ar,gn=s.id,yn=s.overflow,ar=i),i=Dc(i,f.children),i.flags|=4096,i)}function Wh(s,i,a){s.lanes|=i;var f=s.alternate;f!==null&&(f.lanes|=i),mc(s.return,i,a)}function Fc(s,i,a,f,h){var m=s.memoizedState;m===null?s.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:f,tail:a,tailMode:h}:(m.isBackwards=i,m.rendering=null,m.renderingStartTime=0,m.last=f,m.tail=a,m.tailMode=h)}function Kh(s,i,a){var f=i.pendingProps,h=f.revealOrder,m=f.tail;if(ut(s,i,f.children,a),f=je.current,(f&2)!==0)f=f&1|2,i.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=i.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Wh(s,a,i);else if(s.tag===19)Wh(s,a,i);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}f&=1}if(Te(je,f),(i.mode&1)===0)i.memoizedState=null;else switch(h){case"forwards":for(a=i.child,h=null;a!==null;)s=a.alternate,s!==null&&Bo(s)===null&&(h=a),a=a.sibling;a=h,a===null?(h=i.child,i.child=null):(h=a.sibling,a.sibling=null),Fc(i,!1,h,a,m);break;case"backwards":for(a=null,h=i.child,i.child=null;h!==null;){if(s=h.alternate,s!==null&&Bo(s)===null){i.child=h;break}s=h.sibling,h.sibling=a,a=h,h=s}Fc(i,!0,a,null,m);break;case"together":Fc(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function Go(s,i){(i.mode&1)===0&&s!==null&&(s.alternate=null,i.alternate=null,i.flags|=2)}function Sn(s,i,a){if(s!==null&&(i.dependencies=s.dependencies),hr|=i.lanes,(a&i.childLanes)===0)return null;if(s!==null&&i.child!==s.child)throw Error(n(153));if(i.child!==null){for(s=i.child,a=Jn(s,s.pendingProps),i.child=a,a.return=i;s.sibling!==null;)s=s.sibling,a=a.sibling=Jn(s,s.pendingProps),a.return=i;a.sibling=null}return i.child}function Vw(s,i,a){switch(i.tag){case 3:Uh(i),Yr();break;case 5:lh(i);break;case 1:yt(i.type)&&Io(i);break;case 4:vc(i,i.stateNode.containerInfo);break;case 10:var f=i.type._context,h=i.memoizedProps.value;Te($o,f._currentValue),f._currentValue=h;break;case 13:if(f=i.memoizedState,f!==null)return f.dehydrated!==null?(Te(je,je.current&1),i.flags|=128,null):(a&i.child.childLanes)!==0?Vh(s,i,a):(Te(je,je.current&1),s=Sn(s,i,a),s!==null?s.sibling:null);Te(je,je.current&1);break;case 19:if(f=(a&i.childLanes)!==0,(s.flags&128)!==0){if(f)return Kh(s,i,a);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Te(je,je.current),f)break;return null;case 22:case 23:return i.lanes=0,Bh(s,i,a)}return Sn(s,i,a)}var Gh,Bc,Qh,Jh;Gh=function(s,i){for(var a=i.child;a!==null;){if(a.tag===5||a.tag===6)s.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Bc=function(){},Qh=function(s,i,a,f){var h=s.memoizedProps;if(h!==f){s=i.stateNode,fr(ln.current);var m=null;switch(a){case"input":h=Or(s,h),f=Or(s,f),m=[];break;case"select":h=Z({},h,{value:void 0}),f=Z({},f,{value:void 0}),m=[];break;case"textarea":h=Hs(s,h),f=Hs(s,f),m=[];break;default:typeof h.onClick!="function"&&typeof f.onClick=="function"&&(s.onclick=Co)}Sa(a,f);var x;a=null;for(P in h)if(!f.hasOwnProperty(P)&&h.hasOwnProperty(P)&&h[P]!=null)if(P==="style"){var b=h[P];for(x in b)b.hasOwnProperty(x)&&(a||(a={}),a[x]="")}else P!=="dangerouslySetInnerHTML"&&P!=="children"&&P!=="suppressContentEditableWarning"&&P!=="suppressHydrationWarning"&&P!=="autoFocus"&&(o.hasOwnProperty(P)?m||(m=[]):(m=m||[]).push(P,null));for(P in f){var T=f[P];if(b=h!=null?h[P]:void 0,f.hasOwnProperty(P)&&T!==b&&(T!=null||b!=null))if(P==="style")if(b){for(x in b)!b.hasOwnProperty(x)||T&&T.hasOwnProperty(x)||(a||(a={}),a[x]="");for(x in T)T.hasOwnProperty(x)&&b[x]!==T[x]&&(a||(a={}),a[x]=T[x])}else a||(m||(m=[]),m.push(P,a)),a=T;else P==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,b=b?b.__html:void 0,T!=null&&b!==T&&(m=m||[]).push(P,T)):P==="children"?typeof T!="string"&&typeof T!="number"||(m=m||[]).push(P,""+T):P!=="suppressContentEditableWarning"&&P!=="suppressHydrationWarning"&&(o.hasOwnProperty(P)?(T!=null&&P==="onScroll"&&Ce("scroll",s),m||b===T||(m=[])):(m=m||[]).push(P,T))}a&&(m=m||[]).push("style",a);var P=m;(i.updateQueue=P)&&(i.flags|=4)}},Jh=function(s,i,a,f){a!==f&&(i.flags|=4)};function wi(s,i){if(!Ie)switch(s.tailMode){case"hidden":i=s.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?s.tail=null:a.sibling=null;break;case"collapsed":a=s.tail;for(var f=null;a!==null;)a.alternate!==null&&(f=a),a=a.sibling;f===null?i||s.tail===null?s.tail=null:s.tail.sibling=null:f.sibling=null}}function it(s){var i=s.alternate!==null&&s.alternate.child===s.child,a=0,f=0;if(i)for(var h=s.child;h!==null;)a|=h.lanes|h.childLanes,f|=h.subtreeFlags&14680064,f|=h.flags&14680064,h.return=s,h=h.sibling;else for(h=s.child;h!==null;)a|=h.lanes|h.childLanes,f|=h.subtreeFlags,f|=h.flags,h.return=s,h=h.sibling;return s.subtreeFlags|=f,s.childLanes=a,i}function Ww(s,i,a){var f=i.pendingProps;switch(ac(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(i),null;case 1:return yt(i.type)&&Ao(),it(i),null;case 3:return f=i.stateNode,ns(),Ne(gt),Ne(rt),xc(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(s===null||s.child===null)&&(Po(i)?i.flags|=4:s===null||s.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Gt!==null&&(Xc(Gt),Gt=null))),Bc(s,i),it(i),null;case 5:wc(i);var h=fr(pi.current);if(a=i.type,s!==null&&i.stateNode!=null)Qh(s,i,a,f,h),s.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!f){if(i.stateNode===null)throw Error(n(166));return it(i),null}if(s=fr(ln.current),Po(i)){f=i.stateNode,a=i.type;var m=i.memoizedProps;switch(f[on]=i,f[ci]=m,s=(i.mode&1)!==0,a){case"dialog":Ce("cancel",f),Ce("close",f);break;case"iframe":case"object":case"embed":Ce("load",f);break;case"video":case"audio":for(h=0;h<oi.length;h++)Ce(oi[h],f);break;case"source":Ce("error",f);break;case"img":case"image":case"link":Ce("error",f),Ce("load",f);break;case"details":Ce("toggle",f);break;case"input":hn(f,m),Ce("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!m.multiple},Ce("invalid",f);break;case"textarea":no(f,m),Ce("invalid",f)}Sa(a,m),h=null;for(var x in m)if(m.hasOwnProperty(x)){var b=m[x];x==="children"?typeof b=="string"?f.textContent!==b&&(m.suppressHydrationWarning!==!0&&To(f.textContent,b,s),h=["children",b]):typeof b=="number"&&f.textContent!==""+b&&(m.suppressHydrationWarning!==!0&&To(f.textContent,b,s),h=["children",""+b]):o.hasOwnProperty(x)&&b!=null&&x==="onScroll"&&Ce("scroll",f)}switch(a){case"input":jr(f),to(f,m,!0);break;case"textarea":jr(f),In(f);break;case"select":case"option":break;default:typeof m.onClick=="function"&&(f.onclick=Co)}f=h,i.updateQueue=f,f!==null&&(i.flags|=4)}else{x=h.nodeType===9?h:h.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=$r(a)),s==="http://www.w3.org/1999/xhtml"?a==="script"?(s=x.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof f.is=="string"?s=x.createElement(a,{is:f.is}):(s=x.createElement(a),a==="select"&&(x=s,f.multiple?x.multiple=!0:f.size&&(x.size=f.size))):s=x.createElementNS(s,a),s[on]=i,s[ci]=f,Gh(s,i,!1,!1),i.stateNode=s;e:{switch(x=xa(a,f),a){case"dialog":Ce("cancel",s),Ce("close",s),h=f;break;case"iframe":case"object":case"embed":Ce("load",s),h=f;break;case"video":case"audio":for(h=0;h<oi.length;h++)Ce(oi[h],s);h=f;break;case"source":Ce("error",s),h=f;break;case"img":case"image":case"link":Ce("error",s),Ce("load",s),h=f;break;case"details":Ce("toggle",s),h=f;break;case"input":hn(s,f),h=Or(s,f),Ce("invalid",s);break;case"option":h=f;break;case"select":s._wrapperState={wasMultiple:!!f.multiple},h=Z({},f,{value:void 0}),Ce("invalid",s);break;case"textarea":no(s,f),h=Hs(s,f),Ce("invalid",s);break;default:h=f}Sa(a,h),b=h;for(m in b)if(b.hasOwnProperty(m)){var T=b[m];m==="style"?Ff(s,T):m==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,T!=null&&so(s,T)):m==="children"?typeof T=="string"?(a!=="textarea"||T!=="")&&Mn(s,T):typeof T=="number"&&Mn(s,""+T):m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&m!=="autoFocus"&&(o.hasOwnProperty(m)?T!=null&&m==="onScroll"&&Ce("scroll",s):T!=null&&B(s,m,T,x))}switch(a){case"input":jr(s),to(s,f,!1);break;case"textarea":jr(s),In(s);break;case"option":f.value!=null&&s.setAttribute("value",""+he(f.value));break;case"select":s.multiple=!!f.multiple,m=f.value,m!=null?nn(s,!!f.multiple,m,!1):f.defaultValue!=null&&nn(s,!!f.multiple,f.defaultValue,!0);break;default:typeof h.onClick=="function"&&(s.onclick=Co)}switch(a){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return it(i),null;case 6:if(s&&i.stateNode!=null)Jh(s,i,s.memoizedProps,f);else{if(typeof f!="string"&&i.stateNode===null)throw Error(n(166));if(a=fr(pi.current),fr(ln.current),Po(i)){if(f=i.stateNode,a=i.memoizedProps,f[on]=i,(m=f.nodeValue!==a)&&(s=Nt,s!==null))switch(s.tag){case 3:To(f.nodeValue,a,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&To(f.nodeValue,a,(s.mode&1)!==0)}m&&(i.flags|=4)}else f=(a.nodeType===9?a:a.ownerDocument).createTextNode(f),f[on]=i,i.stateNode=f}return it(i),null;case 13:if(Ne(je),f=i.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Ie&&At!==null&&(i.mode&1)!==0&&(i.flags&128)===0)Zd(),Yr(),i.flags|=98560,m=!1;else if(m=Po(i),f!==null&&f.dehydrated!==null){if(s===null){if(!m)throw Error(n(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(n(317));m[on]=i}else Yr(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;it(i),m=!1}else Gt!==null&&(Xc(Gt),Gt=null),m=!0;if(!m)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=a,i):(f=f!==null,f!==(s!==null&&s.memoizedState!==null)&&f&&(i.child.flags|=8192,(i.mode&1)!==0&&(s===null||(je.current&1)!==0?We===0&&(We=3):eu())),i.updateQueue!==null&&(i.flags|=4),it(i),null);case 4:return ns(),Bc(s,i),s===null&&li(i.stateNode.containerInfo),it(i),null;case 10:return pc(i.type._context),it(i),null;case 17:return yt(i.type)&&Ao(),it(i),null;case 19:if(Ne(je),m=i.memoizedState,m===null)return it(i),null;if(f=(i.flags&128)!==0,x=m.rendering,x===null)if(f)wi(m,!1);else{if(We!==0||s!==null&&(s.flags&128)!==0)for(s=i.child;s!==null;){if(x=Bo(s),x!==null){for(i.flags|=128,wi(m,!1),f=x.updateQueue,f!==null&&(i.updateQueue=f,i.flags|=4),i.subtreeFlags=0,f=a,a=i.child;a!==null;)m=a,s=f,m.flags&=14680066,x=m.alternate,x===null?(m.childLanes=0,m.lanes=s,m.child=null,m.subtreeFlags=0,m.memoizedProps=null,m.memoizedState=null,m.updateQueue=null,m.dependencies=null,m.stateNode=null):(m.childLanes=x.childLanes,m.lanes=x.lanes,m.child=x.child,m.subtreeFlags=0,m.deletions=null,m.memoizedProps=x.memoizedProps,m.memoizedState=x.memoizedState,m.updateQueue=x.updateQueue,m.type=x.type,s=x.dependencies,m.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a=a.sibling;return Te(je,je.current&1|2),i.child}s=s.sibling}m.tail!==null&&De()>os&&(i.flags|=128,f=!0,wi(m,!1),i.lanes=4194304)}else{if(!f)if(s=Bo(x),s!==null){if(i.flags|=128,f=!0,a=s.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),wi(m,!0),m.tail===null&&m.tailMode==="hidden"&&!x.alternate&&!Ie)return it(i),null}else 2*De()-m.renderingStartTime>os&&a!==1073741824&&(i.flags|=128,f=!0,wi(m,!1),i.lanes=4194304);m.isBackwards?(x.sibling=i.child,i.child=x):(a=m.last,a!==null?a.sibling=x:i.child=x,m.last=x)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=De(),i.sibling=null,a=je.current,Te(je,f?a&1|2:a&1),i):(it(i),null);case 22:case 23:return Zc(),f=i.memoizedState!==null,s!==null&&s.memoizedState!==null!==f&&(i.flags|=8192),f&&(i.mode&1)!==0?(It&1073741824)!==0&&(it(i),i.subtreeFlags&6&&(i.flags|=8192)):it(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function Kw(s,i){switch(ac(i),i.tag){case 1:return yt(i.type)&&Ao(),s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 3:return ns(),Ne(gt),Ne(rt),xc(),s=i.flags,(s&65536)!==0&&(s&128)===0?(i.flags=s&-65537|128,i):null;case 5:return wc(i),null;case 13:if(Ne(je),s=i.memoizedState,s!==null&&s.dehydrated!==null){if(i.alternate===null)throw Error(n(340));Yr()}return s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 19:return Ne(je),null;case 4:return ns(),null;case 10:return pc(i.type._context),null;case 22:case 23:return Zc(),null;case 24:return null;default:return null}}var Qo=!1,ot=!1,Gw=typeof WeakSet=="function"?WeakSet:Set,ee=null;function ss(s,i){var a=s.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(f){Re(s,i,f)}else a.current=null}function zc(s,i,a){try{a()}catch(f){Re(s,i,f)}}var Xh=!1;function Qw(s,i){if(Za=mo,s=Ad(),Va(s)){if("selectionStart"in s)var a={start:s.selectionStart,end:s.selectionEnd};else e:{a=(a=s.ownerDocument)&&a.defaultView||window;var f=a.getSelection&&a.getSelection();if(f&&f.rangeCount!==0){a=f.anchorNode;var h=f.anchorOffset,m=f.focusNode;f=f.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var x=0,b=-1,T=-1,P=0,V=0,W=s,q=null;t:for(;;){for(var Y;W!==a||h!==0&&W.nodeType!==3||(b=x+h),W!==m||f!==0&&W.nodeType!==3||(T=x+f),W.nodeType===3&&(x+=W.nodeValue.length),(Y=W.firstChild)!==null;)q=W,W=Y;for(;;){if(W===s)break t;if(q===a&&++P===h&&(b=x),q===m&&++V===f&&(T=x),(Y=W.nextSibling)!==null)break;W=q,q=W.parentNode}W=Y}a=b===-1||T===-1?null:{start:b,end:T}}else a=null}a=a||{start:0,end:0}}else a=null;for(ec={focusedElem:s,selectionRange:a},mo=!1,ee=i;ee!==null;)if(i=ee,s=i.child,(i.subtreeFlags&1028)!==0&&s!==null)s.return=i,ee=s;else for(;ee!==null;){i=ee;try{var te=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(te!==null){var ne=te.memoizedProps,Fe=te.memoizedState,L=i.stateNode,N=L.getSnapshotBeforeUpdate(i.elementType===i.type?ne:Qt(i.type,ne),Fe);L.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var j=i.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Q){Re(i,i.return,Q)}if(s=i.sibling,s!==null){s.return=i.return,ee=s;break}ee=i.return}return te=Xh,Xh=!1,te}function Si(s,i,a){var f=i.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var h=f=f.next;do{if((h.tag&s)===s){var m=h.destroy;h.destroy=void 0,m!==void 0&&zc(i,a,m)}h=h.next}while(h!==f)}}function Jo(s,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&s)===s){var f=a.create;a.destroy=f()}a=a.next}while(a!==i)}}function Hc(s){var i=s.ref;if(i!==null){var a=s.stateNode;switch(s.tag){case 5:s=a;break;default:s=a}typeof i=="function"?i(s):i.current=s}}function Yh(s){var i=s.alternate;i!==null&&(s.alternate=null,Yh(i)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(i=s.stateNode,i!==null&&(delete i[on],delete i[ci],delete i[sc],delete i[Lw],delete i[Mw])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Zh(s){return s.tag===5||s.tag===3||s.tag===4}function ep(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Zh(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Uc(s,i,a){var f=s.tag;if(f===5||f===6)s=s.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(s,i):a.insertBefore(s,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(s,a)):(i=a,i.appendChild(s)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Co));else if(f!==4&&(s=s.child,s!==null))for(Uc(s,i,a),s=s.sibling;s!==null;)Uc(s,i,a),s=s.sibling}function qc(s,i,a){var f=s.tag;if(f===5||f===6)s=s.stateNode,i?a.insertBefore(s,i):a.appendChild(s);else if(f!==4&&(s=s.child,s!==null))for(qc(s,i,a),s=s.sibling;s!==null;)qc(s,i,a),s=s.sibling}var Ye=null,Jt=!1;function Vn(s,i,a){for(a=a.child;a!==null;)tp(s,i,a),a=a.sibling}function tp(s,i,a){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(ao,a)}catch{}switch(a.tag){case 5:ot||ss(a,i);case 6:var f=Ye,h=Jt;Ye=null,Vn(s,i,a),Ye=f,Jt=h,Ye!==null&&(Jt?(s=Ye,a=a.stateNode,s.nodeType===8?s.parentNode.removeChild(a):s.removeChild(a)):Ye.removeChild(a.stateNode));break;case 18:Ye!==null&&(Jt?(s=Ye,a=a.stateNode,s.nodeType===8?rc(s.parentNode,a):s.nodeType===1&&rc(s,a),Ys(s)):rc(Ye,a.stateNode));break;case 4:f=Ye,h=Jt,Ye=a.stateNode.containerInfo,Jt=!0,Vn(s,i,a),Ye=f,Jt=h;break;case 0:case 11:case 14:case 15:if(!ot&&(f=a.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){h=f=f.next;do{var m=h,x=m.destroy;m=m.tag,x!==void 0&&((m&2)!==0||(m&4)!==0)&&zc(a,i,x),h=h.next}while(h!==f)}Vn(s,i,a);break;case 1:if(!ot&&(ss(a,i),f=a.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=a.memoizedProps,f.state=a.memoizedState,f.componentWillUnmount()}catch(b){Re(a,i,b)}Vn(s,i,a);break;case 21:Vn(s,i,a);break;case 22:a.mode&1?(ot=(f=ot)||a.memoizedState!==null,Vn(s,i,a),ot=f):Vn(s,i,a);break;default:Vn(s,i,a)}}function np(s){var i=s.updateQueue;if(i!==null){s.updateQueue=null;var a=s.stateNode;a===null&&(a=s.stateNode=new Gw),i.forEach(function(f){var h=s0.bind(null,s,f);a.has(f)||(a.add(f),f.then(h,h))})}}function Xt(s,i){var a=i.deletions;if(a!==null)for(var f=0;f<a.length;f++){var h=a[f];try{var m=s,x=i,b=x;e:for(;b!==null;){switch(b.tag){case 5:Ye=b.stateNode,Jt=!1;break e;case 3:Ye=b.stateNode.containerInfo,Jt=!0;break e;case 4:Ye=b.stateNode.containerInfo,Jt=!0;break e}b=b.return}if(Ye===null)throw Error(n(160));tp(m,x,h),Ye=null,Jt=!1;var T=h.alternate;T!==null&&(T.return=null),h.return=null}catch(P){Re(h,i,P)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)rp(i,s),i=i.sibling}function rp(s,i){var a=s.alternate,f=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Xt(i,s),cn(s),f&4){try{Si(3,s,s.return),Jo(3,s)}catch(ne){Re(s,s.return,ne)}try{Si(5,s,s.return)}catch(ne){Re(s,s.return,ne)}}break;case 1:Xt(i,s),cn(s),f&512&&a!==null&&ss(a,a.return);break;case 5:if(Xt(i,s),cn(s),f&512&&a!==null&&ss(a,a.return),s.flags&32){var h=s.stateNode;try{Mn(h,"")}catch(ne){Re(s,s.return,ne)}}if(f&4&&(h=s.stateNode,h!=null)){var m=s.memoizedProps,x=a!==null?a.memoizedProps:m,b=s.type,T=s.updateQueue;if(s.updateQueue=null,T!==null)try{b==="input"&&m.type==="radio"&&m.name!=null&&eo(h,m),xa(b,x);var P=xa(b,m);for(x=0;x<T.length;x+=2){var V=T[x],W=T[x+1];V==="style"?Ff(h,W):V==="dangerouslySetInnerHTML"?so(h,W):V==="children"?Mn(h,W):B(h,V,W,P)}switch(b){case"input":Bs(h,m);break;case"textarea":ro(h,m);break;case"select":var q=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!m.multiple;var Y=m.value;Y!=null?nn(h,!!m.multiple,Y,!1):q!==!!m.multiple&&(m.defaultValue!=null?nn(h,!!m.multiple,m.defaultValue,!0):nn(h,!!m.multiple,m.multiple?[]:"",!1))}h[ci]=m}catch(ne){Re(s,s.return,ne)}}break;case 6:if(Xt(i,s),cn(s),f&4){if(s.stateNode===null)throw Error(n(162));h=s.stateNode,m=s.memoizedProps;try{h.nodeValue=m}catch(ne){Re(s,s.return,ne)}}break;case 3:if(Xt(i,s),cn(s),f&4&&a!==null&&a.memoizedState.isDehydrated)try{Ys(i.containerInfo)}catch(ne){Re(s,s.return,ne)}break;case 4:Xt(i,s),cn(s);break;case 13:Xt(i,s),cn(s),h=s.child,h.flags&8192&&(m=h.memoizedState!==null,h.stateNode.isHidden=m,!m||h.alternate!==null&&h.alternate.memoizedState!==null||(Kc=De())),f&4&&np(s);break;case 22:if(V=a!==null&&a.memoizedState!==null,s.mode&1?(ot=(P=ot)||V,Xt(i,s),ot=P):Xt(i,s),cn(s),f&8192){if(P=s.memoizedState!==null,(s.stateNode.isHidden=P)&&!V&&(s.mode&1)!==0)for(ee=s,V=s.child;V!==null;){for(W=ee=V;ee!==null;){switch(q=ee,Y=q.child,q.tag){case 0:case 11:case 14:case 15:Si(4,q,q.return);break;case 1:ss(q,q.return);var te=q.stateNode;if(typeof te.componentWillUnmount=="function"){f=q,a=q.return;try{i=f,te.props=i.memoizedProps,te.state=i.memoizedState,te.componentWillUnmount()}catch(ne){Re(f,a,ne)}}break;case 5:ss(q,q.return);break;case 22:if(q.memoizedState!==null){op(W);continue}}Y!==null?(Y.return=q,ee=Y):op(W)}V=V.sibling}e:for(V=null,W=s;;){if(W.tag===5){if(V===null){V=W;try{h=W.stateNode,P?(m=h.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none"):(b=W.stateNode,T=W.memoizedProps.style,x=T!=null&&T.hasOwnProperty("display")?T.display:null,b.style.display=jt("display",x))}catch(ne){Re(s,s.return,ne)}}}else if(W.tag===6){if(V===null)try{W.stateNode.nodeValue=P?"":W.memoizedProps}catch(ne){Re(s,s.return,ne)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===s)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===s)break e;for(;W.sibling===null;){if(W.return===null||W.return===s)break e;V===W&&(V=null),W=W.return}V===W&&(V=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:Xt(i,s),cn(s),f&4&&np(s);break;case 21:break;default:Xt(i,s),cn(s)}}function cn(s){var i=s.flags;if(i&2){try{e:{for(var a=s.return;a!==null;){if(Zh(a)){var f=a;break e}a=a.return}throw Error(n(160))}switch(f.tag){case 5:var h=f.stateNode;f.flags&32&&(Mn(h,""),f.flags&=-33);var m=ep(s);qc(s,m,h);break;case 3:case 4:var x=f.stateNode.containerInfo,b=ep(s);Uc(s,b,x);break;default:throw Error(n(161))}}catch(T){Re(s,s.return,T)}s.flags&=-3}i&4096&&(s.flags&=-4097)}function Jw(s,i,a){ee=s,sp(s)}function sp(s,i,a){for(var f=(s.mode&1)!==0;ee!==null;){var h=ee,m=h.child;if(h.tag===22&&f){var x=h.memoizedState!==null||Qo;if(!x){var b=h.alternate,T=b!==null&&b.memoizedState!==null||ot;b=Qo;var P=ot;if(Qo=x,(ot=T)&&!P)for(ee=h;ee!==null;)x=ee,T=x.child,x.tag===22&&x.memoizedState!==null?lp(h):T!==null?(T.return=x,ee=T):lp(h);for(;m!==null;)ee=m,sp(m),m=m.sibling;ee=h,Qo=b,ot=P}ip(s)}else(h.subtreeFlags&8772)!==0&&m!==null?(m.return=h,ee=m):ip(s)}}function ip(s){for(;ee!==null;){var i=ee;if((i.flags&8772)!==0){var a=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:ot||Jo(5,i);break;case 1:var f=i.stateNode;if(i.flags&4&&!ot)if(a===null)f.componentDidMount();else{var h=i.elementType===i.type?a.memoizedProps:Qt(i.type,a.memoizedProps);f.componentDidUpdate(h,a.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var m=i.updateQueue;m!==null&&oh(i,m,f);break;case 3:var x=i.updateQueue;if(x!==null){if(a=null,i.child!==null)switch(i.child.tag){case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}oh(i,x,a)}break;case 5:var b=i.stateNode;if(a===null&&i.flags&4){a=b;var T=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":T.autoFocus&&a.focus();break;case"img":T.src&&(a.src=T.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var P=i.alternate;if(P!==null){var V=P.memoizedState;if(V!==null){var W=V.dehydrated;W!==null&&Ys(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}ot||i.flags&512&&Hc(i)}catch(q){Re(i,i.return,q)}}if(i===s){ee=null;break}if(a=i.sibling,a!==null){a.return=i.return,ee=a;break}ee=i.return}}function op(s){for(;ee!==null;){var i=ee;if(i===s){ee=null;break}var a=i.sibling;if(a!==null){a.return=i.return,ee=a;break}ee=i.return}}function lp(s){for(;ee!==null;){var i=ee;try{switch(i.tag){case 0:case 11:case 15:var a=i.return;try{Jo(4,i)}catch(T){Re(i,a,T)}break;case 1:var f=i.stateNode;if(typeof f.componentDidMount=="function"){var h=i.return;try{f.componentDidMount()}catch(T){Re(i,h,T)}}var m=i.return;try{Hc(i)}catch(T){Re(i,m,T)}break;case 5:var x=i.return;try{Hc(i)}catch(T){Re(i,x,T)}}}catch(T){Re(i,i.return,T)}if(i===s){ee=null;break}var b=i.sibling;if(b!==null){b.return=i.return,ee=b;break}ee=i.return}}var Xw=Math.ceil,Xo=R.ReactCurrentDispatcher,Vc=R.ReactCurrentOwner,Dt=R.ReactCurrentBatchConfig,ve=0,Qe=null,He=null,Ze=0,It=0,is=Bn(0),We=0,xi=null,hr=0,Yo=0,Wc=0,_i=null,wt=null,Kc=0,os=1/0,xn=null,Zo=!1,Gc=null,Wn=null,el=!1,Kn=null,tl=0,Ei=0,Qc=null,nl=-1,rl=0;function ft(){return(ve&6)!==0?De():nl!==-1?nl:nl=De()}function Gn(s){return(s.mode&1)===0?1:(ve&2)!==0&&Ze!==0?Ze&-Ze:Pw.transition!==null?(rl===0&&(rl=ed()),rl):(s=xe,s!==0||(s=window.event,s=s===void 0?16:cd(s.type)),s)}function Yt(s,i,a,f){if(50<Ei)throw Ei=0,Qc=null,Error(n(185));Ks(s,a,f),((ve&2)===0||s!==Qe)&&(s===Qe&&((ve&2)===0&&(Yo|=a),We===4&&Qn(s,Ze)),St(s,f),a===1&&ve===0&&(i.mode&1)===0&&(os=De()+500,Lo&&Hn()))}function St(s,i){var a=s.callbackNode;Pv(s,i);var f=fo(s,s===Qe?Ze:0);if(f===0)a!==null&&Xf(a),s.callbackNode=null,s.callbackPriority=0;else if(i=f&-f,s.callbackPriority!==i){if(a!=null&&Xf(a),i===1)s.tag===0?jw(cp.bind(null,s)):Gd(cp.bind(null,s)),Aw(function(){(ve&6)===0&&Hn()}),a=null;else{switch(td(f)){case 1:a=Na;break;case 4:a=Yf;break;case 16:a=lo;break;case 536870912:a=Zf;break;default:a=lo}a=yp(a,ap.bind(null,s))}s.callbackPriority=i,s.callbackNode=a}}function ap(s,i){if(nl=-1,rl=0,(ve&6)!==0)throw Error(n(327));var a=s.callbackNode;if(ls()&&s.callbackNode!==a)return null;var f=fo(s,s===Qe?Ze:0);if(f===0)return null;if((f&30)!==0||(f&s.expiredLanes)!==0||i)i=sl(s,f);else{i=f;var h=ve;ve|=2;var m=fp();(Qe!==s||Ze!==i)&&(xn=null,os=De()+500,mr(s,i));do try{e0();break}catch(b){up(s,b)}while(!0);hc(),Xo.current=m,ve=h,He!==null?i=0:(Qe=null,Ze=0,i=We)}if(i!==0){if(i===2&&(h=Aa(s),h!==0&&(f=h,i=Jc(s,h))),i===1)throw a=xi,mr(s,0),Qn(s,f),St(s,De()),a;if(i===6)Qn(s,f);else{if(h=s.current.alternate,(f&30)===0&&!Yw(h)&&(i=sl(s,f),i===2&&(m=Aa(s),m!==0&&(f=m,i=Jc(s,m))),i===1))throw a=xi,mr(s,0),Qn(s,f),St(s,De()),a;switch(s.finishedWork=h,s.finishedLanes=f,i){case 0:case 1:throw Error(n(345));case 2:gr(s,wt,xn);break;case 3:if(Qn(s,f),(f&130023424)===f&&(i=Kc+500-De(),10<i)){if(fo(s,0)!==0)break;if(h=s.suspendedLanes,(h&f)!==f){ft(),s.pingedLanes|=s.suspendedLanes&h;break}s.timeoutHandle=nc(gr.bind(null,s,wt,xn),i);break}gr(s,wt,xn);break;case 4:if(Qn(s,f),(f&4194240)===f)break;for(i=s.eventTimes,h=-1;0<f;){var x=31-Wt(f);m=1<<x,x=i[x],x>h&&(h=x),f&=~m}if(f=h,f=De()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*Xw(f/1960))-f,10<f){s.timeoutHandle=nc(gr.bind(null,s,wt,xn),f);break}gr(s,wt,xn);break;case 5:gr(s,wt,xn);break;default:throw Error(n(329))}}}return St(s,De()),s.callbackNode===a?ap.bind(null,s):null}function Jc(s,i){var a=_i;return s.current.memoizedState.isDehydrated&&(mr(s,i).flags|=256),s=sl(s,i),s!==2&&(i=wt,wt=a,i!==null&&Xc(i)),s}function Xc(s){wt===null?wt=s:wt.push.apply(wt,s)}function Yw(s){for(var i=s;;){if(i.flags&16384){var a=i.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var f=0;f<a.length;f++){var h=a[f],m=h.getSnapshot;h=h.value;try{if(!Kt(m(),h))return!1}catch{return!1}}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Qn(s,i){for(i&=~Wc,i&=~Yo,s.suspendedLanes|=i,s.pingedLanes&=~i,s=s.expirationTimes;0<i;){var a=31-Wt(i),f=1<<a;s[a]=-1,i&=~f}}function cp(s){if((ve&6)!==0)throw Error(n(327));ls();var i=fo(s,0);if((i&1)===0)return St(s,De()),null;var a=sl(s,i);if(s.tag!==0&&a===2){var f=Aa(s);f!==0&&(i=f,a=Jc(s,f))}if(a===1)throw a=xi,mr(s,0),Qn(s,i),St(s,De()),a;if(a===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=i,gr(s,wt,xn),St(s,De()),null}function Yc(s,i){var a=ve;ve|=1;try{return s(i)}finally{ve=a,ve===0&&(os=De()+500,Lo&&Hn())}}function pr(s){Kn!==null&&Kn.tag===0&&(ve&6)===0&&ls();var i=ve;ve|=1;var a=Dt.transition,f=xe;try{if(Dt.transition=null,xe=1,s)return s()}finally{xe=f,Dt.transition=a,ve=i,(ve&6)===0&&Hn()}}function Zc(){It=is.current,Ne(is)}function mr(s,i){s.finishedWork=null,s.finishedLanes=0;var a=s.timeoutHandle;if(a!==-1&&(s.timeoutHandle=-1,Nw(a)),He!==null)for(a=He.return;a!==null;){var f=a;switch(ac(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Ao();break;case 3:ns(),Ne(gt),Ne(rt),xc();break;case 5:wc(f);break;case 4:ns();break;case 13:Ne(je);break;case 19:Ne(je);break;case 10:pc(f.type._context);break;case 22:case 23:Zc()}a=a.return}if(Qe=s,He=s=Jn(s.current,null),Ze=It=i,We=0,xi=null,Wc=Yo=hr=0,wt=_i=null,ur!==null){for(i=0;i<ur.length;i++)if(a=ur[i],f=a.interleaved,f!==null){a.interleaved=null;var h=f.next,m=a.pending;if(m!==null){var x=m.next;m.next=h,f.next=x}a.pending=f}ur=null}return s}function up(s,i){do{var a=He;try{if(hc(),zo.current=Vo,Ho){for(var f=Pe.memoizedState;f!==null;){var h=f.queue;h!==null&&(h.pending=null),f=f.next}Ho=!1}if(dr=0,Ge=Ve=Pe=null,mi=!1,gi=0,Vc.current=null,a===null||a.return===null){We=1,xi=i,He=null;break}e:{var m=s,x=a.return,b=a,T=i;if(i=Ze,b.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){var P=T,V=b,W=V.tag;if((V.mode&1)===0&&(W===0||W===11||W===15)){var q=V.alternate;q?(V.updateQueue=q.updateQueue,V.memoizedState=q.memoizedState,V.lanes=q.lanes):(V.updateQueue=null,V.memoizedState=null)}var Y=Oh(x);if(Y!==null){Y.flags&=-257,$h(Y,x,b,m,i),Y.mode&1&&Ph(m,P,i),i=Y,T=P;var te=i.updateQueue;if(te===null){var ne=new Set;ne.add(T),i.updateQueue=ne}else te.add(T);break e}else{if((i&1)===0){Ph(m,P,i),eu();break e}T=Error(n(426))}}else if(Ie&&b.mode&1){var Fe=Oh(x);if(Fe!==null){(Fe.flags&65536)===0&&(Fe.flags|=256),$h(Fe,x,b,m,i),fc(rs(T,b));break e}}m=T=rs(T,b),We!==4&&(We=2),_i===null?_i=[m]:_i.push(m),m=x;do{switch(m.tag){case 3:m.flags|=65536,i&=-i,m.lanes|=i;var L=Mh(m,T,i);ih(m,L);break e;case 1:b=T;var N=m.type,j=m.stateNode;if((m.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(Wn===null||!Wn.has(j)))){m.flags|=65536,i&=-i,m.lanes|=i;var Q=jh(m,b,i);ih(m,Q);break e}}m=m.return}while(m!==null)}hp(a)}catch(re){i=re,He===a&&a!==null&&(He=a=a.return);continue}break}while(!0)}function fp(){var s=Xo.current;return Xo.current=Vo,s===null?Vo:s}function eu(){(We===0||We===3||We===2)&&(We=4),Qe===null||(hr&268435455)===0&&(Yo&268435455)===0||Qn(Qe,Ze)}function sl(s,i){var a=ve;ve|=2;var f=fp();(Qe!==s||Ze!==i)&&(xn=null,mr(s,i));do try{Zw();break}catch(h){up(s,h)}while(!0);if(hc(),ve=a,Xo.current=f,He!==null)throw Error(n(261));return Qe=null,Ze=0,We}function Zw(){for(;He!==null;)dp(He)}function e0(){for(;He!==null&&!bv();)dp(He)}function dp(s){var i=gp(s.alternate,s,It);s.memoizedProps=s.pendingProps,i===null?hp(s):He=i,Vc.current=null}function hp(s){var i=s;do{var a=i.alternate;if(s=i.return,(i.flags&32768)===0){if(a=Ww(a,i,It),a!==null){He=a;return}}else{if(a=Kw(a,i),a!==null){a.flags&=32767,He=a;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{We=6,He=null;return}}if(i=i.sibling,i!==null){He=i;return}He=i=s}while(i!==null);We===0&&(We=5)}function gr(s,i,a){var f=xe,h=Dt.transition;try{Dt.transition=null,xe=1,t0(s,i,a,f)}finally{Dt.transition=h,xe=f}return null}function t0(s,i,a,f){do ls();while(Kn!==null);if((ve&6)!==0)throw Error(n(327));a=s.finishedWork;var h=s.finishedLanes;if(a===null)return null;if(s.finishedWork=null,s.finishedLanes=0,a===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var m=a.lanes|a.childLanes;if(Ov(s,m),s===Qe&&(He=Qe=null,Ze=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||el||(el=!0,yp(lo,function(){return ls(),null})),m=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||m){m=Dt.transition,Dt.transition=null;var x=xe;xe=1;var b=ve;ve|=4,Vc.current=null,Qw(s,a),rp(a,s),xw(ec),mo=!!Za,ec=Za=null,s.current=a,Jw(a),Tv(),ve=b,xe=x,Dt.transition=m}else s.current=a;if(el&&(el=!1,Kn=s,tl=h),m=s.pendingLanes,m===0&&(Wn=null),Av(a.stateNode),St(s,De()),i!==null)for(f=s.onRecoverableError,a=0;a<i.length;a++)h=i[a],f(h.value,{componentStack:h.stack,digest:h.digest});if(Zo)throw Zo=!1,s=Gc,Gc=null,s;return(tl&1)!==0&&s.tag!==0&&ls(),m=s.pendingLanes,(m&1)!==0?s===Qc?Ei++:(Ei=0,Qc=s):Ei=0,Hn(),null}function ls(){if(Kn!==null){var s=td(tl),i=Dt.transition,a=xe;try{if(Dt.transition=null,xe=16>s?16:s,Kn===null)var f=!1;else{if(s=Kn,Kn=null,tl=0,(ve&6)!==0)throw Error(n(331));var h=ve;for(ve|=4,ee=s.current;ee!==null;){var m=ee,x=m.child;if((ee.flags&16)!==0){var b=m.deletions;if(b!==null){for(var T=0;T<b.length;T++){var P=b[T];for(ee=P;ee!==null;){var V=ee;switch(V.tag){case 0:case 11:case 15:Si(8,V,m)}var W=V.child;if(W!==null)W.return=V,ee=W;else for(;ee!==null;){V=ee;var q=V.sibling,Y=V.return;if(Yh(V),V===P){ee=null;break}if(q!==null){q.return=Y,ee=q;break}ee=Y}}}var te=m.alternate;if(te!==null){var ne=te.child;if(ne!==null){te.child=null;do{var Fe=ne.sibling;ne.sibling=null,ne=Fe}while(ne!==null)}}ee=m}}if((m.subtreeFlags&2064)!==0&&x!==null)x.return=m,ee=x;else e:for(;ee!==null;){if(m=ee,(m.flags&2048)!==0)switch(m.tag){case 0:case 11:case 15:Si(9,m,m.return)}var L=m.sibling;if(L!==null){L.return=m.return,ee=L;break e}ee=m.return}}var N=s.current;for(ee=N;ee!==null;){x=ee;var j=x.child;if((x.subtreeFlags&2064)!==0&&j!==null)j.return=x,ee=j;else e:for(x=N;ee!==null;){if(b=ee,(b.flags&2048)!==0)try{switch(b.tag){case 0:case 11:case 15:Jo(9,b)}}catch(re){Re(b,b.return,re)}if(b===x){ee=null;break e}var Q=b.sibling;if(Q!==null){Q.return=b.return,ee=Q;break e}ee=b.return}}if(ve=h,Hn(),sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(ao,s)}catch{}f=!0}return f}finally{xe=a,Dt.transition=i}}return!1}function pp(s,i,a){i=rs(a,i),i=Mh(s,i,1),s=qn(s,i,1),i=ft(),s!==null&&(Ks(s,1,i),St(s,i))}function Re(s,i,a){if(s.tag===3)pp(s,s,a);else for(;i!==null;){if(i.tag===3){pp(i,s,a);break}else if(i.tag===1){var f=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Wn===null||!Wn.has(f))){s=rs(a,s),s=jh(i,s,1),i=qn(i,s,1),s=ft(),i!==null&&(Ks(i,1,s),St(i,s));break}}i=i.return}}function n0(s,i,a){var f=s.pingCache;f!==null&&f.delete(i),i=ft(),s.pingedLanes|=s.suspendedLanes&a,Qe===s&&(Ze&a)===a&&(We===4||We===3&&(Ze&130023424)===Ze&&500>De()-Kc?mr(s,0):Wc|=a),St(s,i)}function mp(s,i){i===0&&((s.mode&1)===0?i=1:(i=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var a=ft();s=vn(s,i),s!==null&&(Ks(s,i,a),St(s,a))}function r0(s){var i=s.memoizedState,a=0;i!==null&&(a=i.retryLane),mp(s,a)}function s0(s,i){var a=0;switch(s.tag){case 13:var f=s.stateNode,h=s.memoizedState;h!==null&&(a=h.retryLane);break;case 19:f=s.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(i),mp(s,a)}var gp;gp=function(s,i,a){if(s!==null)if(s.memoizedProps!==i.pendingProps||gt.current)vt=!0;else{if((s.lanes&a)===0&&(i.flags&128)===0)return vt=!1,Vw(s,i,a);vt=(s.flags&131072)!==0}else vt=!1,Ie&&(i.flags&1048576)!==0&&Qd(i,jo,i.index);switch(i.lanes=0,i.tag){case 2:var f=i.type;Go(s,i),s=i.pendingProps;var h=Qr(i,rt.current);ts(i,a),h=kc(null,i,f,s,h,a);var m=bc();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,yt(f)?(m=!0,Io(i)):m=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,yc(i),h.updater=Wo,i.stateNode=h,h._reactInternals=i,Lc(i,f,s,a),i=Oc(null,i,f,!0,m,a)):(i.tag=0,Ie&&m&&lc(i),ut(null,i,h,a),i=i.child),i;case 16:f=i.elementType;e:{switch(Go(s,i),s=i.pendingProps,h=f._init,f=h(f._payload),i.type=f,h=i.tag=o0(f),s=Qt(f,s),h){case 0:i=Pc(null,i,f,s,a);break e;case 1:i=Hh(null,i,f,s,a);break e;case 11:i=Rh(null,i,f,s,a);break e;case 14:i=Dh(null,i,f,Qt(f.type,s),a);break e}throw Error(n(306,f,""))}return i;case 0:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Qt(f,h),Pc(s,i,f,h,a);case 1:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Qt(f,h),Hh(s,i,f,h,a);case 3:e:{if(Uh(i),s===null)throw Error(n(387));f=i.pendingProps,m=i.memoizedState,h=m.element,sh(s,i),Fo(i,f,null,a);var x=i.memoizedState;if(f=x.element,m.isDehydrated)if(m={element:f,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){h=rs(Error(n(423)),i),i=qh(s,i,f,a,h);break e}else if(f!==h){h=rs(Error(n(424)),i),i=qh(s,i,f,a,h);break e}else for(At=Fn(i.stateNode.containerInfo.firstChild),Nt=i,Ie=!0,Gt=null,a=nh(i,null,f,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Yr(),f===h){i=Sn(s,i,a);break e}ut(s,i,f,a)}i=i.child}return i;case 5:return lh(i),s===null&&uc(i),f=i.type,h=i.pendingProps,m=s!==null?s.memoizedProps:null,x=h.children,tc(f,h)?x=null:m!==null&&tc(f,m)&&(i.flags|=32),zh(s,i),ut(s,i,x,a),i.child;case 6:return s===null&&uc(i),null;case 13:return Vh(s,i,a);case 4:return vc(i,i.stateNode.containerInfo),f=i.pendingProps,s===null?i.child=Zr(i,null,f,a):ut(s,i,f,a),i.child;case 11:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Qt(f,h),Rh(s,i,f,h,a);case 7:return ut(s,i,i.pendingProps,a),i.child;case 8:return ut(s,i,i.pendingProps.children,a),i.child;case 12:return ut(s,i,i.pendingProps.children,a),i.child;case 10:e:{if(f=i.type._context,h=i.pendingProps,m=i.memoizedProps,x=h.value,Te($o,f._currentValue),f._currentValue=x,m!==null)if(Kt(m.value,x)){if(m.children===h.children&&!gt.current){i=Sn(s,i,a);break e}}else for(m=i.child,m!==null&&(m.return=i);m!==null;){var b=m.dependencies;if(b!==null){x=m.child;for(var T=b.firstContext;T!==null;){if(T.context===f){if(m.tag===1){T=wn(-1,a&-a),T.tag=2;var P=m.updateQueue;if(P!==null){P=P.shared;var V=P.pending;V===null?T.next=T:(T.next=V.next,V.next=T),P.pending=T}}m.lanes|=a,T=m.alternate,T!==null&&(T.lanes|=a),mc(m.return,a,i),b.lanes|=a;break}T=T.next}}else if(m.tag===10)x=m.type===i.type?null:m.child;else if(m.tag===18){if(x=m.return,x===null)throw Error(n(341));x.lanes|=a,b=x.alternate,b!==null&&(b.lanes|=a),mc(x,a,i),x=m.sibling}else x=m.child;if(x!==null)x.return=m;else for(x=m;x!==null;){if(x===i){x=null;break}if(m=x.sibling,m!==null){m.return=x.return,x=m;break}x=x.return}m=x}ut(s,i,h.children,a),i=i.child}return i;case 9:return h=i.type,f=i.pendingProps.children,ts(i,a),h=$t(h),f=f(h),i.flags|=1,ut(s,i,f,a),i.child;case 14:return f=i.type,h=Qt(f,i.pendingProps),h=Qt(f.type,h),Dh(s,i,f,h,a);case 15:return Fh(s,i,i.type,i.pendingProps,a);case 17:return f=i.type,h=i.pendingProps,h=i.elementType===f?h:Qt(f,h),Go(s,i),i.tag=1,yt(f)?(s=!0,Io(i)):s=!1,ts(i,a),Ih(i,f,h),Lc(i,f,h,a),Oc(null,i,f,!0,s,a);case 19:return Kh(s,i,a);case 22:return Bh(s,i,a)}throw Error(n(156,i.tag))};function yp(s,i){return Jf(s,i)}function i0(s,i,a,f){this.tag=s,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(s,i,a,f){return new i0(s,i,a,f)}function tu(s){return s=s.prototype,!(!s||!s.isReactComponent)}function o0(s){if(typeof s=="function")return tu(s)?1:0;if(s!=null){if(s=s.$$typeof,s===O)return 11;if(s===Ae)return 14}return 2}function Jn(s,i){var a=s.alternate;return a===null?(a=Ft(s.tag,i,s.key,s.mode),a.elementType=s.elementType,a.type=s.type,a.stateNode=s.stateNode,a.alternate=s,s.alternate=a):(a.pendingProps=i,a.type=s.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=s.flags&14680064,a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,i=s.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=s.sibling,a.index=s.index,a.ref=s.ref,a}function il(s,i,a,f,h,m){var x=2;if(f=s,typeof s=="function")tu(s)&&(x=1);else if(typeof s=="string")x=5;else e:switch(s){case H:return yr(a.children,h,m,i);case F:x=8,h|=8;break;case M:return s=Ft(12,a,i,h|2),s.elementType=M,s.lanes=m,s;case X:return s=Ft(13,a,i,h),s.elementType=X,s.lanes=m,s;case ce:return s=Ft(19,a,i,h),s.elementType=ce,s.lanes=m,s;case ge:return ol(a,h,m,i);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case G:x=10;break e;case K:x=9;break e;case O:x=11;break e;case Ae:x=14;break e;case be:x=16,f=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return i=Ft(x,a,i,h),i.elementType=s,i.type=f,i.lanes=m,i}function yr(s,i,a,f){return s=Ft(7,s,f,i),s.lanes=a,s}function ol(s,i,a,f){return s=Ft(22,s,f,i),s.elementType=ge,s.lanes=a,s.stateNode={isHidden:!1},s}function nu(s,i,a){return s=Ft(6,s,null,i),s.lanes=a,s}function ru(s,i,a){return i=Ft(4,s.children!==null?s.children:[],s.key,i),i.lanes=a,i.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},i}function l0(s,i,a,f,h){this.tag=i,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ia(0),this.expirationTimes=Ia(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ia(0),this.identifierPrefix=f,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function su(s,i,a,f,h,m,x,b,T){return s=new l0(s,i,a,b,T),i===1?(i=1,m===!0&&(i|=8)):i=0,m=Ft(3,null,null,i),s.current=m,m.stateNode=s,m.memoizedState={element:f,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},yc(m),s}function a0(s,i,a){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:z,key:f==null?null:""+f,children:s,containerInfo:i,implementation:a}}function vp(s){if(!s)return zn;s=s._reactInternals;e:{if(ir(s)!==s||s.tag!==1)throw Error(n(170));var i=s;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(yt(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(s.tag===1){var a=s.type;if(yt(a))return Wd(s,a,i)}return i}function wp(s,i,a,f,h,m,x,b,T){return s=su(a,f,!0,s,h,m,x,b,T),s.context=vp(null),a=s.current,f=ft(),h=Gn(a),m=wn(f,h),m.callback=i??null,qn(a,m,h),s.current.lanes=h,Ks(s,h,f),St(s,f),s}function ll(s,i,a,f){var h=i.current,m=ft(),x=Gn(h);return a=vp(a),i.context===null?i.context=a:i.pendingContext=a,i=wn(m,x),i.payload={element:s},f=f===void 0?null:f,f!==null&&(i.callback=f),s=qn(h,i,x),s!==null&&(Yt(s,h,x,m),Do(s,h,x)),x}function al(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function Sp(s,i){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var a=s.retryLane;s.retryLane=a!==0&&a<i?a:i}}function iu(s,i){Sp(s,i),(s=s.alternate)&&Sp(s,i)}function c0(){return null}var xp=typeof reportError=="function"?reportError:function(s){console.error(s)};function ou(s){this._internalRoot=s}cl.prototype.render=ou.prototype.render=function(s){var i=this._internalRoot;if(i===null)throw Error(n(409));ll(s,i,null,null)},cl.prototype.unmount=ou.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var i=s.containerInfo;pr(function(){ll(null,s,null,null)}),i[pn]=null}};function cl(s){this._internalRoot=s}cl.prototype.unstable_scheduleHydration=function(s){if(s){var i=sd();s={blockedOn:null,target:s,priority:i};for(var a=0;a<$n.length&&i!==0&&i<$n[a].priority;a++);$n.splice(a,0,s),a===0&&ld(s)}};function lu(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function ul(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function _p(){}function u0(s,i,a,f,h){if(h){if(typeof f=="function"){var m=f;f=function(){var P=al(x);m.call(P)}}var x=wp(i,f,s,0,null,!1,!1,"",_p);return s._reactRootContainer=x,s[pn]=x.current,li(s.nodeType===8?s.parentNode:s),pr(),x}for(;h=s.lastChild;)s.removeChild(h);if(typeof f=="function"){var b=f;f=function(){var P=al(T);b.call(P)}}var T=su(s,0,!1,null,null,!1,!1,"",_p);return s._reactRootContainer=T,s[pn]=T.current,li(s.nodeType===8?s.parentNode:s),pr(function(){ll(i,T,a,f)}),T}function fl(s,i,a,f,h){var m=a._reactRootContainer;if(m){var x=m;if(typeof h=="function"){var b=h;h=function(){var T=al(x);b.call(T)}}ll(i,x,s,h)}else x=u0(a,i,s,h,f);return al(x)}nd=function(s){switch(s.tag){case 3:var i=s.stateNode;if(i.current.memoizedState.isDehydrated){var a=Ws(i.pendingLanes);a!==0&&(La(i,a|1),St(i,De()),(ve&6)===0&&(os=De()+500,Hn()))}break;case 13:pr(function(){var f=vn(s,1);if(f!==null){var h=ft();Yt(f,s,1,h)}}),iu(s,1)}},Ma=function(s){if(s.tag===13){var i=vn(s,134217728);if(i!==null){var a=ft();Yt(i,s,134217728,a)}iu(s,134217728)}},rd=function(s){if(s.tag===13){var i=Gn(s),a=vn(s,i);if(a!==null){var f=ft();Yt(a,s,i,f)}iu(s,i)}},sd=function(){return xe},id=function(s,i){var a=xe;try{return xe=s,i()}finally{xe=a}},ka=function(s,i,a){switch(i){case"input":if(Bs(s,a),i=a.name,a.type==="radio"&&i!=null){for(a=s;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<a.length;i++){var f=a[i];if(f!==s&&f.form===s.form){var h=No(f);if(!h)throw Error(n(90));Pr(f),Bs(f,h)}}}break;case"textarea":ro(s,a);break;case"select":i=a.value,i!=null&&nn(s,!!a.multiple,i,!1)}},Uf=Yc,qf=pr;var f0={usingClientEntryPoint:!1,Events:[ui,Kr,No,zf,Hf,Yc]},ki={findFiberByHostInstance:or,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},d0={bundleType:ki.bundleType,version:ki.version,rendererPackageName:ki.rendererPackageName,rendererConfig:ki.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Gf(s),s===null?null:s.stateNode},findFiberByHostInstance:ki.findFiberByHostInstance||c0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var dl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dl.isDisabled&&dl.supportsFiber)try{ao=dl.inject(d0),sn=dl}catch{}}return xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f0,xt.createPortal=function(s,i){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!lu(i))throw Error(n(200));return a0(s,i,null,a)},xt.createRoot=function(s,i){if(!lu(s))throw Error(n(299));var a=!1,f="",h=xp;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onRecoverableError!==void 0&&(h=i.onRecoverableError)),i=su(s,1,!1,null,null,a,!1,f,h),s[pn]=i.current,li(s.nodeType===8?s.parentNode:s),new ou(i)},xt.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var i=s._reactInternals;if(i===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=Gf(i),s=s===null?null:s.stateNode,s},xt.flushSync=function(s){return pr(s)},xt.hydrate=function(s,i,a){if(!ul(i))throw Error(n(200));return fl(null,s,i,!0,a)},xt.hydrateRoot=function(s,i,a){if(!lu(s))throw Error(n(405));var f=a!=null&&a.hydratedSources||null,h=!1,m="",x=xp;if(a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),i=wp(i,null,s,1,a??null,h,!1,m,x),s[pn]=i.current,li(s),f)for(s=0;s<f.length;s++)a=f[s],h=a._getVersion,h=h(a._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[a,h]:i.mutableSourceEagerHydrationData.push(a,h);return new cl(i)},xt.render=function(s,i,a){if(!ul(i))throw Error(n(200));return fl(null,s,i,!1,a)},xt.unmountComponentAtNode=function(s){if(!ul(s))throw Error(n(40));return s._reactRootContainer?(pr(function(){fl(null,null,s,!1,function(){s._reactRootContainer=null,s[pn]=null})}),!0):!1},xt.unstable_batchedUpdates=Yc,xt.unstable_renderSubtreeIntoContainer=function(s,i,a,f){if(!ul(a))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return fl(s,i,a,!1,f)},xt.version="18.3.1-next-f1338f8080-20240426",xt}var Mp;function N0(){if(Mp)return uu.exports;Mp=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),uu.exports=C0(),uu.exports}var jp;function A0(){if(jp)return hl;jp=1;var t=N0();return hl.createRoot=t.createRoot,hl.hydrateRoot=t.hydrateRoot,hl}var Ik=A0();const ji=Symbol("context"),$m=Symbol("nextInContext"),Rm=Symbol("prevByEndTime"),Dm=Symbol("nextByStartTime"),Pp=Symbol("events");class Lk{constructor(e){Ee(this,"startTime");Ee(this,"endTime");Ee(this,"browserName");Ee(this,"channel");Ee(this,"platform");Ee(this,"wallTime");Ee(this,"title");Ee(this,"options");Ee(this,"pages");Ee(this,"actions");Ee(this,"attachments");Ee(this,"visibleAttachments");Ee(this,"events");Ee(this,"stdio");Ee(this,"errors");Ee(this,"errorDescriptors");Ee(this,"hasSource");Ee(this,"hasStepData");Ee(this,"sdkLanguage");Ee(this,"testIdAttributeName");Ee(this,"sources");Ee(this,"resources");e.forEach(r=>I0(r));const n=e.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=L0(e),this.pages=[].concat(...e.map(r=>r.pages)),this.wallTime=e.map(r=>r.wallTime).reduce((r,o)=>Math.min(r||Number.MAX_VALUE,o),Number.MAX_VALUE),this.startTime=e.map(r=>r.startTime).reduce((r,o)=>Math.min(r,o),Number.MAX_VALUE),this.endTime=e.map(r=>r.endTime).reduce((r,o)=>Math.max(r,o),Number.MIN_VALUE),this.events=[].concat(...e.map(r=>r.events)),this.stdio=[].concat(...e.map(r=>r.stdio)),this.errors=[].concat(...e.map(r=>r.errors)),this.hasSource=e.some(r=>r.hasSource),this.hasStepData=e.some(r=>r.origin==="testRunner"),this.resources=[...e.map(r=>r.resources)].flat(),this.attachments=this.actions.flatMap(r=>{var o;return((o=r.attachments)==null?void 0:o.map(l=>({...l,traceUrl:r.context.traceUrl})))??[]}),this.visibleAttachments=this.attachments.filter(r=>!r.name.startsWith("_")),this.events.sort((r,o)=>r.time-o.time),this.resources.sort((r,o)=>r._monotonicTime-o._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=B0(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(e=>e.error)}_errorDescriptorsFromActions(){var n;const e=[];for(const r of this.actions||[])(n=r.error)!=null&&n.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,n)=>({stack:e.stack,message:e.message}))}}function I0(t){for(const n of t.pages)n[ji]=t;for(let n=0;n<t.actions.length;++n){const r=t.actions[n];r[ji]=t}let e;for(let n=t.actions.length-1;n>=0;n--){const r=t.actions[n];r[$m]=e,r.class!=="Route"&&(e=r)}for(const n of t.events)n[ji]=t;for(const n of t.resources)n[ji]=t}function L0(t){const e=new Map;for(const o of t){const l=o.traceUrl;let c=e.get(l);c||(c=[],e.set(l,c)),c.push(o)}const n=[];let r=0;for(const[,o]of e){e.size>1&&M0(o,++r);const l=j0(o);n.push(...l)}n.sort((o,l)=>l.parentId===o.callId?1:o.parentId===l.callId?-1:o.endTime-l.endTime);for(let o=1;o<n.length;++o)n[o][Rm]=n[o-1];n.sort((o,l)=>l.parentId===o.callId?-1:o.parentId===l.callId?1:o.startTime-l.startTime);for(let o=0;o+1<n.length;++o)n[o][Dm]=n[o+1];return n}function M0(t,e){for(const n of t)for(const r of n.actions)r.callId&&(r.callId=`${e}:${r.callId}`),r.parentId&&(r.parentId=`${e}:${r.parentId}`)}let Op=0;function j0(t){const e=new Map,n=t.filter(c=>c.origin==="library"),r=t.filter(c=>c.origin==="testRunner");if(!r.length||!n.length)return t.map(c=>c.actions.map(u=>({...u,context:c}))).flat();for(const c of n)for(const u of c.actions)e.set(u.stepId||`tmp-step@${++Op}`,{...u,context:c});const o=O0(r,e);o&&P0(n,o);const l=new Map;for(const c of r)for(const u of c.actions){const d=u.stepId&&e.get(u.stepId);if(d){l.set(u.callId,d.callId),u.error&&(d.error=u.error),u.attachments&&(d.attachments=u.attachments),u.annotations&&(d.annotations=u.annotations),u.parentId&&(d.parentId=l.get(u.parentId)??u.parentId),d.startTime=u.startTime,d.endTime=u.endTime;continue}u.parentId&&(u.parentId=l.get(u.parentId)??u.parentId),e.set(u.stepId||`tmp-step@${++Op}`,{...u,context:c})}return[...e.values()]}function P0(t,e){for(const n of t){n.startTime+=e,n.endTime+=e;for(const r of n.actions)r.startTime&&(r.startTime+=e),r.endTime&&(r.endTime+=e);for(const r of n.events)r.time+=e;for(const r of n.stdio)r.timestamp+=e;for(const r of n.pages)for(const o of r.screencastFrames)o.timestamp+=e;for(const r of n.resources)r._monotonicTime&&(r._monotonicTime+=e)}}function O0(t,e){for(const n of t)for(const r of n.actions){if(!r.startTime)continue;const o=r.stepId?e.get(r.stepId):void 0;if(o)return r.startTime-o.startTime}return 0}function $0(t){const e=new Map;for(const r of t)e.set(r.callId,{id:r.callId,parent:void 0,children:[],action:r});const n={id:"",parent:void 0,children:[]};for(const r of e.values()){const o=r.action.parentId&&e.get(r.action.parentId)||n;o.children.push(r),r.parent=o}return{rootItem:n,itemMap:e}}function Rl(t){return t[ji]}function R0(t){return t[$m]}function $p(t){return t[Rm]}function Rp(t){return t[Dm]}function D0(t){let e=0,n=0;for(const r of F0(t)){if(r.type==="console"){const o=r.messageType;o==="warning"?++n:o==="error"&&++e}r.type==="event"&&r.method==="pageError"&&++e}return{errors:e,warnings:n}}function F0(t){let e=t[Pp];if(e)return e;const n=R0(t);return e=Rl(t).events.filter(r=>r.time>=t.startTime&&(!n||r.time<n.startTime)),t[Pp]=e,e}function B0(t,e){var r;const n=new Map;for(const o of t)for(const l of o.stack||[]){let c=n.get(l.file);c||(c={errors:[],content:void 0},n.set(l.file,c))}for(const o of e){const{action:l,stack:c,message:u}=o;!l||!c||(r=n.get(c[0].file))==null||r.errors.push({line:c[0].line||0,message:u})}return n}const hu=new Set(["page.route","page.routefromhar","page.unroute","page.unrouteall","browsercontext.route","browsercontext.routefromhar","browsercontext.unroute","browsercontext.unrouteall"]);{for(const t of[...hu])hu.add(t+"async");for(const t of["page.route_from_har","page.unroute_all","context.route_from_har","context.unroute_all"])hu.add(t)}const z0=50,Dl=({sidebarSize:t,sidebarHidden:e=!1,sidebarIsFirst:n=!1,orientation:r="vertical",minSidebarSize:o=z0,settingName:l,sidebar:c,main:u})=>{const d=Math.max(o,t)*window.devicePixelRatio,[p,g]=Ts(l?l+"."+r+":size":void 0,d),[y,v]=Ts(l?l+"."+r+":size":void 0,d),[S,k]=$.useState(null),[_,E]=Ar();let C;r==="vertical"?(C=y/window.devicePixelRatio,_&&_.height<C&&(C=_.height-10)):(C=p/window.devicePixelRatio,_&&_.width<C&&(C=_.width-10)),document.body.style.userSelect=S?"none":"inherit";let A={};return r==="vertical"?n?A={top:S?0:C-4,bottom:S?0:void 0,height:S?"initial":8}:A={bottom:S?0:C-4,top:S?0:void 0,height:S?"initial":8}:n?A={left:S?0:C-4,right:S?0:void 0,width:S?"initial":8}:A={right:S?0:C-4,left:S?0:void 0,width:S?"initial":8},w.jsxs("div",{className:Be("split-view",r,n&&"sidebar-first"),ref:E,children:[w.jsx("div",{className:"split-view-main",children:u}),!e&&w.jsx("div",{style:{flexBasis:C},className:"split-view-sidebar",children:c}),!e&&w.jsx("div",{style:A,className:"split-view-resizer",onMouseDown:B=>k({offset:r==="vertical"?B.clientY:B.clientX,size:C}),onMouseUp:()=>k(null),onMouseMove:B=>{if(!B.buttons)k(null);else if(S){const D=(r==="vertical"?B.clientY:B.clientX)-S.offset,z=n?S.size+D:S.size-D,F=B.target.parentElement.getBoundingClientRect(),M=Math.min(Math.max(o,z),(r==="vertical"?F.height:F.width)-o);r==="vertical"?v(M*window.devicePixelRatio):g(M*window.devicePixelRatio)}}})]})},qe=function(t,e,n){return t>=e&&t<=n};function _t(t){return qe(t,48,57)}function Dp(t){return _t(t)||qe(t,65,70)||qe(t,97,102)}function H0(t){return qe(t,65,90)}function U0(t){return qe(t,97,122)}function q0(t){return H0(t)||U0(t)}function V0(t){return t>=128}function kl(t){return q0(t)||V0(t)||t===95}function Fp(t){return kl(t)||_t(t)||t===45}function W0(t){return qe(t,0,8)||t===11||qe(t,14,31)||t===127}function bl(t){return t===10}function _n(t){return bl(t)||t===9||t===32}const K0=1114111;class Qu extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function G0(t){const e=[];for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(r===13&&t.charCodeAt(n+1)===10&&(r=10,n++),(r===13||r===12)&&(r=10),r===0&&(r=65533),qe(r,55296,56319)&&qe(t.charCodeAt(n+1),56320,57343)){const o=r-55296,l=t.charCodeAt(n+1)-56320;r=Math.pow(2,16)+o*Math.pow(2,10)+l,n++}e.push(r)}return e}function Ke(t){if(t<=65535)return String.fromCharCode(t);t-=Math.pow(2,16);const e=Math.floor(t/Math.pow(2,10))+55296,n=t%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(n)}function Fm(t){const e=G0(t);let n=-1;const r=[];let o;const l=function(O){return O>=e.length?-1:e[O]},c=function(O){if(O===void 0&&(O=1),O>3)throw"Spec Error: no more than three codepoints of lookahead.";return l(n+O)},u=function(O){return O===void 0&&(O=1),n+=O,o=l(n),!0},d=function(){return n-=1,!0},p=function(O){return O===void 0&&(O=o),O===-1},g=function(){if(y(),u(),_n(o)){for(;_n(c());)u();return new Fl}else{if(o===34)return k();if(o===35)if(Fp(c())||C(c(1),c(2))){const O=new Ym("");return B(c(1),c(2),c(3))&&(O.type="id"),O.value=H(),O}else return new et(o);else return o===36?c()===61?(u(),new Y0):new et(o):o===39?k():o===40?new Qm:o===41?new Ju:o===42?c()===61?(u(),new Z0):new et(o):o===43?z()?(d(),v()):new et(o):o===44?new Vm:o===45?z()?(d(),v()):c(1)===45&&c(2)===62?(u(2),new Hm):R()?(d(),S()):new et(o):o===46?z()?(d(),v()):new et(o):o===58?new Um:o===59?new qm:o===60?c(1)===33&&c(2)===45&&c(3)===45?(u(3),new zm):new et(o):o===64?B(c(1),c(2),c(3))?new Xm(H()):new et(o):o===91?new Gm:o===92?A()?(d(),S()):new et(o):o===93?new Mu:o===94?c()===61?(u(),new X0):new et(o):o===123?new Wm:o===124?c()===61?(u(),new J0):c()===124?(u(),new Jm):new et(o):o===125?new Km:o===126?c()===61?(u(),new Q0):new et(o):_t(o)?(d(),v()):kl(o)?(d(),S()):p()?new Cl:new et(o)}},y=function(){for(;c(1)===47&&c(2)===42;)for(u(2);;)if(u(),o===42&&c()===47){u();break}else if(p())return},v=function(){const O=F();if(B(c(1),c(2),c(3))){const X=new e1;return X.value=O.value,X.repr=O.repr,X.type=O.type,X.unit=H(),X}else if(c()===37){u();const X=new tg;return X.value=O.value,X.repr=O.repr,X}else{const X=new eg;return X.value=O.value,X.repr=O.repr,X.type=O.type,X}},S=function(){const O=H();if(O.toLowerCase()==="url"&&c()===40){for(u();_n(c(1))&&_n(c(2));)u();return c()===34||c()===39?new Di(O):_n(c())&&(c(2)===34||c(2)===39)?new Di(O):_()}else return c()===40?(u(),new Di(O)):new Xu(O)},k=function(O){O===void 0&&(O=o);let X="";for(;u();){if(o===O||p())return new Yu(X);if(bl(o))return d(),new Bm;o===92?p(c())||(bl(c())?u():X+=Ke(E())):X+=Ke(o)}throw new Error("Internal error")},_=function(){const O=new Zm("");for(;_n(c());)u();if(p(c()))return O;for(;u();){if(o===41||p())return O;if(_n(o)){for(;_n(c());)u();return c()===41||p(c())?(u(),O):(G(),new Tl)}else{if(o===34||o===39||o===40||W0(o))return G(),new Tl;if(o===92)if(A())O.value+=Ke(E());else return G(),new Tl;else O.value+=Ke(o)}}throw new Error("Internal error")},E=function(){if(u(),Dp(o)){const O=[o];for(let ce=0;ce<5&&Dp(c());ce++)u(),O.push(o);_n(c())&&u();let X=parseInt(O.map(function(ce){return String.fromCharCode(ce)}).join(""),16);return X>K0&&(X=65533),X}else return p()?65533:o},C=function(O,X){return!(O!==92||bl(X))},A=function(){return C(o,c())},B=function(O,X,ce){return O===45?kl(X)||X===45||C(X,ce):kl(O)?!0:O===92?C(O,X):!1},R=function(){return B(o,c(1),c(2))},D=function(O,X,ce){return O===43||O===45?!!(_t(X)||X===46&&_t(ce)):O===46?!!_t(X):!!_t(O)},z=function(){return D(o,c(1),c(2))},H=function(){let O="";for(;u();)if(Fp(o))O+=Ke(o);else if(A())O+=Ke(E());else return d(),O;throw new Error("Internal parse error")},F=function(){let O="",X="integer";for((c()===43||c()===45)&&(u(),O+=Ke(o));_t(c());)u(),O+=Ke(o);if(c(1)===46&&_t(c(2)))for(u(),O+=Ke(o),u(),O+=Ke(o),X="number";_t(c());)u(),O+=Ke(o);const ce=c(1),Ae=c(2),be=c(3);if((ce===69||ce===101)&&_t(Ae))for(u(),O+=Ke(o),u(),O+=Ke(o),X="number";_t(c());)u(),O+=Ke(o);else if((ce===69||ce===101)&&(Ae===43||Ae===45)&&_t(be))for(u(),O+=Ke(o),u(),O+=Ke(o),u(),O+=Ke(o),X="number";_t(c());)u(),O+=Ke(o);const ge=M(O);return{type:X,value:ge,repr:O}},M=function(O){return+O},G=function(){for(;u();){if(o===41||p())return;A()&&E()}};let K=0;for(;!p(c());)if(r.push(g()),K++,K>e.length*2)throw new Error("I'm infinite-looping!");return r}class ze{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class Bm extends ze{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Tl extends ze{constructor(){super(...arguments),this.tokenType="BADURL"}}class Fl extends ze{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class zm extends ze{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class Hm extends ze{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class Um extends ze{constructor(){super(...arguments),this.tokenType=":"}}class qm extends ze{constructor(){super(...arguments),this.tokenType=";"}}class Vm extends ze{constructor(){super(...arguments),this.tokenType=","}}class Is extends ze{constructor(){super(...arguments),this.value="",this.mirror=""}}class Wm extends Is{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class Km extends Is{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class Gm extends Is{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Mu extends Is{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class Qm extends Is{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Ju extends Is{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class Q0 extends ze{constructor(){super(...arguments),this.tokenType="~="}}class J0 extends ze{constructor(){super(...arguments),this.tokenType="|="}}class X0 extends ze{constructor(){super(...arguments),this.tokenType="^="}}class Y0 extends ze{constructor(){super(...arguments),this.tokenType="$="}}class Z0 extends ze{constructor(){super(...arguments),this.tokenType="*="}}class Jm extends ze{constructor(){super(...arguments),this.tokenType="||"}}class Cl extends ze{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class et extends ze{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=Ke(e)}toString(){return"DELIM("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}toSource(){return this.value==="\\"?`\\
42
- `:this.value}}class Ls extends ze{constructor(){super(...arguments),this.value=""}ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}}class Xu extends Ls{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return Qi(this.value)}}class Di extends Ls{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return Qi(this.value)+"("}}class Xm extends Ls{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+Qi(this.value)}}class Ym extends Ls{constructor(e){super(),this.tokenType="HASH",this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+Qi(this.value):"#"+t1(this.value)}}class Yu extends Ls{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+ng(this.value)+'"'}}class Zm extends Ls{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+ng(this.value)+'")'}}class eg extends ze{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}}class tg extends ze{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}}class e1 extends ze{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){const e=this.repr;let n=Qi(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||qe(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),e+n}}function Qi(t){t=""+t;let e="";const n=t.charCodeAt(0);for(let r=0;r<t.length;r++){const o=t.charCodeAt(r);if(o===0)throw new Qu("Invalid character: the input contains U+0000.");qe(o,1,31)||o===127||r===0&&qe(o,48,57)||r===1&&qe(o,48,57)&&n===45?e+="\\"+o.toString(16)+" ":o>=128||o===45||o===95||qe(o,48,57)||qe(o,65,90)||qe(o,97,122)?e+=t[r]:e+="\\"+t[r]}return e}function t1(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new Qu("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||qe(r,48,57)||qe(r,65,90)||qe(r,97,122)?e+=t[n]:e+="\\"+r.toString(16)+" "}return e}function ng(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new Qu("Invalid character: the input contains U+0000.");qe(r,1,31)||r===127?e+="\\"+r.toString(16)+" ":r===34||r===92?e+="\\"+t[n]:e+=t[n]}return e}class Et extends Error{}function n1(t,e){let n;try{n=Fm(t),n[n.length-1]instanceof Cl||n.push(new Cl)}catch(M){const G=M.message+` while parsing css selector "${t}". Did you mean to CSS.escape it?`,K=(M.stack||"").indexOf(M.message);throw K!==-1&&(M.stack=M.stack.substring(0,K)+G+M.stack.substring(K+M.message.length)),M.message=G,M}const r=n.find(M=>M instanceof Xm||M instanceof Bm||M instanceof Tl||M instanceof Jm||M instanceof zm||M instanceof Hm||M instanceof qm||M instanceof Wm||M instanceof Km||M instanceof Zm||M instanceof tg);if(r)throw new Et(`Unsupported token "${r.toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`);let o=0;const l=new Set;function c(){return new Et(`Unexpected token "${n[o].toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`)}function u(){for(;n[o]instanceof Fl;)o++}function d(M=o){return n[M]instanceof Xu}function p(M=o){return n[M]instanceof Yu}function g(M=o){return n[M]instanceof eg}function y(M=o){return n[M]instanceof Vm}function v(M=o){return n[M]instanceof Qm}function S(M=o){return n[M]instanceof Ju}function k(M=o){return n[M]instanceof Di}function _(M=o){return n[M]instanceof et&&n[M].value==="*"}function E(M=o){return n[M]instanceof Cl}function C(M=o){return n[M]instanceof et&&[">","+","~"].includes(n[M].value)}function A(M=o){return y(M)||S(M)||E(M)||C(M)||n[M]instanceof Fl}function B(){const M=[R()];for(;u(),!!y();)o++,M.push(R());return M}function R(){return u(),g()||p()?n[o++].value:D()}function D(){const M={simples:[]};for(u(),C()?M.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):M.simples.push({selector:z(),combinator:""});;){if(u(),C())M.simples[M.simples.length-1].combinator=n[o++].value,u();else if(A())break;M.simples.push({combinator:"",selector:z()})}return M}function z(){let M="";const G=[];for(;!A();)if(d()||_())M+=n[o++].toSource();else if(n[o]instanceof Ym)M+=n[o++].toSource();else if(n[o]instanceof et&&n[o].value===".")if(o++,d())M+="."+n[o++].toSource();else throw c();else if(n[o]instanceof Um)if(o++,d())if(!e.has(n[o].value.toLowerCase()))M+=":"+n[o++].toSource();else{const K=n[o++].value.toLowerCase();G.push({name:K,args:[]}),l.add(K)}else if(k()){const K=n[o++].value.toLowerCase();if(e.has(K)?(G.push({name:K,args:B()}),l.add(K)):M+=`:${K}(${H()})`,u(),!S())throw c();o++}else throw c();else if(n[o]instanceof Gm){for(M+="[",o++;!(n[o]instanceof Mu)&&!E();)M+=n[o++].toSource();if(!(n[o]instanceof Mu))throw c();M+="]",o++}else throw c();if(!M&&!G.length)throw c();return{css:M||void 0,functions:G}}function H(){let M="",G=1;for(;!E()&&((v()||k())&&G++,S()&&G--,!!G);)M+=n[o++].toSource();return M}const F=B();if(!E())throw c();if(F.some(M=>typeof M!="object"||!("simples"in M)))throw new Et(`Error while parsing css selector "${t}". Did you mean to CSS.escape it?`);return{selector:F,names:Array.from(l)}}const ju=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),r1=new Set(["left-of","right-of","above","below","near"]),rg=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 Ji(t){const e=o1(t),n=[];for(const r of e.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const o=n1(r.body,rg);n.push({name:"css",body:o.selector,source:r.body});continue}if(ju.has(r.name)){let o,l;try{const p=JSON.parse("["+r.body+"]");if(!Array.isArray(p)||p.length<1||p.length>2||typeof p[0]!="string")throw new Et(`Malformed selector: ${r.name}=`+r.body);if(o=p[0],p.length===2){if(typeof p[1]!="number"||!r1.has(r.name))throw new Et(`Malformed selector: ${r.name}=`+r.body);l=p[1]}}catch{throw new Et(`Malformed selector: ${r.name}=`+r.body)}const c={name:r.name,source:r.body,body:{parsed:Ji(o),distance:l}},u=[...c.body.parsed.parts].reverse().find(p=>p.name==="internal:control"&&p.body==="enter-frame"),d=u?c.body.parsed.parts.indexOf(u):-1;d!==-1&&s1(c.body.parsed.parts.slice(0,d+1),n.slice(0,d+1))&&c.body.parsed.parts.splice(0,d+1),n.push(c);continue}n.push({...r,source:r.body})}if(ju.has(n[0].name))throw new Et(`"${n[0].name}" selector cannot be first`);return{capture:e.capture,parts:n}}function s1(t,e){return Tn({parts:t})===Tn({parts:e})}function Tn(t,e){return typeof t=="string"?t:t.parts.map((n,r)=>{let o=!0;!e&&r!==t.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(o=!1);const l=o?n.name+"=":"";return`${r===t.capture?"*":""}${l}${n.source}`}).join(" >> ")}function i1(t,e){const n=(r,o)=>{for(const l of r.parts)e(l,o),ju.has(l.name)&&n(l.body.parsed,!0)};n(t,!1)}function o1(t){let e=0,n,r=0;const o={parts:[]},l=()=>{const u=t.substring(r,e).trim(),d=u.indexOf("=");let p,g;d!==-1&&u.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(p=u.substring(0,d).trim(),g=u.substring(d+1)):u.length>1&&u[0]==='"'&&u[u.length-1]==='"'||u.length>1&&u[0]==="'"&&u[u.length-1]==="'"?(p="text",g=u):/^\(*\/\//.test(u)||u.startsWith("..")?(p="xpath",g=u):(p="css",g=u);let y=!1;if(p[0]==="*"&&(y=!0,p=p.substring(1)),o.parts.push({name:p,body:g}),y){if(o.capture!==void 0)throw new Et("Only one of the selectors can capture using * modifier");o.capture=o.parts.length-1}};if(!t.includes(">>"))return e=t.length,l(),o;const c=()=>{const d=t.substring(r,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e<t.length;){const u=t[e];u==="\\"&&e+1<t.length?e+=2:u===n?(n=void 0,e++):!n&&(u==='"'||u==="'"||u==="`")&&!c()?(n=u,e++):!n&&u===">"&&t[e+1]===">"?(l(),e+=2,r=e):e++}return l(),o}function br(t,e){let n=0,r=t.length===0;const o=()=>t[n]||"",l=()=>{const E=o();return++n,r=n>=t.length,E},c=E=>{throw r?new Et(`Unexpected end of selector while parsing selector \`${t}\``):new Et(`Error while parsing selector \`${t}\` - unexpected symbol "${o()}" at position ${n}`+(E?" during "+E:""))};function u(){for(;!r&&/\s/.test(o());)l()}function d(E){return E>="€"||E>="0"&&E<="9"||E>="A"&&E<="Z"||E>="a"&&E<="z"||E>="0"&&E<="9"||E==="_"||E==="-"}function p(){let E="";for(u();!r&&d(o());)E+=l();return E}function g(E){let C=l();for(C!==E&&c("parsing quoted string");!r&&o()!==E;)o()==="\\"&&l(),C+=l();return o()!==E&&c("parsing quoted string"),C+=l(),C}function y(){l()!=="/"&&c("parsing regular expression");let E="",C=!1;for(;!r;){if(o()==="\\")E+=l(),r&&c("parsing regular expression");else if(C&&o()==="]")C=!1;else if(!C&&o()==="[")C=!0;else if(!C&&o()==="/")break;E+=l()}l()!=="/"&&c("parsing regular expression");let A="";for(;!r&&o().match(/[dgimsuy]/);)A+=l();try{return new RegExp(E,A)}catch(B){throw new Et(`Error while parsing selector \`${t}\`: ${B.message}`)}}function v(){let E="";return u(),o()==="'"||o()==='"'?E=g(o()).slice(1,-1):E=p(),E||c("parsing property path"),E}function S(){u();let E="";return r||(E+=l()),!r&&E!=="="&&(E+=l()),["=","*=","^=","$=","|=","~="].includes(E)||c("parsing operator"),E}function k(){l();const E=[];for(E.push(v()),u();o()===".";)l(),E.push(v()),u();if(o()==="]")return l(),{name:E.join("."),jsonPath:E,op:"<truthy>",value:null,caseSensitive:!1};const C=S();let A,B=!0;if(u(),o()==="/"){if(C!=="=")throw new Et(`Error while parsing selector \`${t}\` - cannot use ${C} in attribute with regular expression`);A=y()}else if(o()==="'"||o()==='"')A=g(o()).slice(1,-1),u(),o()==="i"||o()==="I"?(B=!1,l()):(o()==="s"||o()==="S")&&(B=!0,l());else{for(A="";!r&&(d(o())||o()==="+"||o()===".");)A+=l();A==="true"?A=!0:A==="false"?A=!1:e||(A=+A,Number.isNaN(A)&&c("parsing attribute value"))}if(u(),o()!=="]"&&c("parsing attribute value"),l(),C!=="="&&typeof A!="string")throw new Et(`Error while parsing selector \`${t}\` - cannot use ${C} in attribute with non-string matching value - ${A}`);return{name:E.join("."),jsonPath:E,op:C,value:A,caseSensitive:B}}const _={name:"",attributes:[]};for(_.name=p(),u();o()==="[";)_.attributes.push(k()),u();if(r||c(void 0),!_.name&&!_.attributes.length)throw new Et(`Error while parsing selector \`${t}\` - selector cannot be empty`);return _}function ea(t,e="'"){const n=JSON.stringify(t),r=n.substring(1,n.length-1).replace(/\\"/g,'"');if(e==="'")return e+r.replace(/[']/g,"\\'")+e;if(e==='"')return e+r.replace(/["]/g,'\\"')+e;if(e==="`")return e+r.replace(/[`]/g,"`")+e;throw new Error("Invalid escape char")}function Bl(t){return t.charAt(0).toUpperCase()+t.substring(1)}function sg(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function ps(t){return`"${t.replace(/["\\]/g,e=>"\\"+e)}"`}let vr;function l1(){vr=new Map}function mt(t){let e=vr==null?void 0:vr.get(t);return e===void 0&&(e=t.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),vr==null||vr.set(t,e)),e}function ta(t){return t.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function ig(t){return t.unicode||t.unicodeSets?String(t):String(t).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function kt(t,e){return typeof t!="string"?ig(t):`${JSON.stringify(t)}${e?"s":"i"}`}function ht(t,e){return typeof t!="string"?ig(t):`"${t.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function a1(t,e,n=""){if(t.length<=e)return t;const r=[...t];return r.length>e?r.slice(0,e-n.length).join("")+n:r.join("")}function Bp(t,e){return a1(t,e,"…")}function zl(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c1(t,e){const n=t.length,r=e.length;let o=0,l=0;const c=Array(n+1).fill(null).map(()=>Array(r+1).fill(0));for(let u=1;u<=n;u++)for(let d=1;d<=r;d++)t[u-1]===e[d-1]&&(c[u][d]=c[u-1][d-1]+1,c[u][d]>o&&(o=c[u][d],l=u));return t.slice(l-o,l)}function u1(t,e){try{const n=Ji(e),r=n.parts[n.parts.length-1];if((r==null?void 0:r.name)==="internal:describe"){const o=JSON.parse(r.body);if(typeof o=="string")return o}return Sr(new lg[t],n,!1,1)[0]}catch{return e}}function Tr(t,e,n=!1){return og(t,e,n,1)[0]}function og(t,e,n=!1,r=20,o){try{return Sr(new lg[t](o),Ji(e),n,r)}catch{return[e]}}function Sr(t,e,n=!1,r=20){const o=[...e.parts],l=[];let c=n?"frame-locator":"page";for(let u=0;u<o.length;u++){const d=o[u],p=c;if(c="locator",d.name==="internal:describe")continue;if(d.name==="nth"){d.body==="0"?l.push([t.generateLocator(p,"first",""),t.generateLocator(p,"nth","0")]):d.body==="-1"?l.push([t.generateLocator(p,"last",""),t.generateLocator(p,"nth","-1")]):l.push([t.generateLocator(p,"nth",d.body)]);continue}if(d.name==="visible"){l.push([t.generateLocator(p,"visible",d.body),t.generateLocator(p,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:k,text:_}=Ti(d.body);l.push([t.generateLocator(p,"text",_,{exact:k})]);continue}if(d.name==="internal:has-text"){const{exact:k,text:_}=Ti(d.body);if(!k){l.push([t.generateLocator(p,"has-text",_,{exact:k})]);continue}}if(d.name==="internal:has-not-text"){const{exact:k,text:_}=Ti(d.body);if(!k){l.push([t.generateLocator(p,"has-not-text",_,{exact:k})]);continue}}if(d.name==="internal:has"){const k=Sr(t,d.body.parsed,!1,r);l.push(k.map(_=>t.generateLocator(p,"has",_)));continue}if(d.name==="internal:has-not"){const k=Sr(t,d.body.parsed,!1,r);l.push(k.map(_=>t.generateLocator(p,"hasNot",_)));continue}if(d.name==="internal:and"){const k=Sr(t,d.body.parsed,!1,r);l.push(k.map(_=>t.generateLocator(p,"and",_)));continue}if(d.name==="internal:or"){const k=Sr(t,d.body.parsed,!1,r);l.push(k.map(_=>t.generateLocator(p,"or",_)));continue}if(d.name==="internal:chain"){const k=Sr(t,d.body.parsed,!1,r);l.push(k.map(_=>t.generateLocator(p,"chain",_)));continue}if(d.name==="internal:label"){const{exact:k,text:_}=Ti(d.body);l.push([t.generateLocator(p,"label",_,{exact:k})]);continue}if(d.name==="internal:role"){const k=br(d.body,!0),_={attrs:[]};for(const E of k.attributes)E.name==="name"?(_.exact=E.caseSensitive,_.name=E.value):(E.name==="level"&&typeof E.value=="string"&&(E.value=+E.value),_.attrs.push({name:E.name==="include-hidden"?"includeHidden":E.name,value:E.value}));l.push([t.generateLocator(p,"role",k.name,_)]);continue}if(d.name==="internal:testid"){const k=br(d.body,!0),{value:_}=k.attributes[0];l.push([t.generateLocator(p,"test-id",_)]);continue}if(d.name==="internal:attr"){const k=br(d.body,!0),{name:_,value:E,caseSensitive:C}=k.attributes[0],A=E,B=!!C;if(_==="placeholder"){l.push([t.generateLocator(p,"placeholder",A,{exact:B})]);continue}if(_==="alt"){l.push([t.generateLocator(p,"alt",A,{exact:B})]);continue}if(_==="title"){l.push([t.generateLocator(p,"title",A,{exact:B})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const k=l[l.length-1],_=o[u-1],E=k.map(C=>t.chainLocators([C,t.generateLocator(p,"frame","")]));["xpath","css"].includes(_.name)&&E.push(t.generateLocator(p,"frame-locator",Tn({parts:[_]})),t.generateLocator(p,"frame-locator",Tn({parts:[_]},!0))),k.splice(0,k.length,...E),c="frame-locator";continue}const g=o[u+1],y=Tn({parts:[d]}),v=t.generateLocator(p,"default",y);if(g&&["internal:has-text","internal:has-not-text"].includes(g.name)){const{exact:k,text:_}=Ti(g.body);if(!k){const E=t.generateLocator("locator",g.name==="internal:has-text"?"has-text":"has-not-text",_,{exact:k}),C={};g.name==="internal:has-text"?C.hasText=_:C.hasNotText=_;const A=t.generateLocator(p,"default",y,C);l.push([t.chainLocators([v,E]),A]),u++;continue}}let S;if(["xpath","css"].includes(d.name)){const k=Tn({parts:[d]},!0);S=t.generateLocator(p,"default",k)}l.push([v,S].filter(Boolean))}return f1(t,l,r)}function f1(t,e,n){const r=e.map(()=>""),o=[],l=c=>{if(c===e.length)return o.push(t.chainLocators(r)),o.length<n;for(const u of e[c])if(r[c]=u,!l(c+1))return!1;return!0};return l(0),o}function Ti(t){let e=!1;const n=t.match(/^\/(.*)\/([igm]*)$/);return n?{text:new RegExp(n[1],n[2])}:(t.endsWith('"')?(t=JSON.parse(t),e=!0):t.endsWith('"s')?(t=JSON.parse(t.substring(0,t.length-1)),e=!0):t.endsWith('"i')&&(t=JSON.parse(t.substring(0,t.length-1)),e=!1),{exact:e,text:t})}class d1{constructor(e){this.preferredQuote=e}generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(o.hasNotText)} })`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${r==="true"?"true":"false"} })`;case"role":const l=[];tt(o.name)?l.push(`name: ${this.regexToSourceString(o.name)}`):typeof o.name=="string"&&(l.push(`name: ${this.quote(o.name)}`),o.exact&&l.push("exact: true"));for(const{name:u,value:d}of o.attrs)l.push(`${u}: ${typeof d=="string"?this.quote(d):d}`);const c=l.length?`, { ${l.join(", ")} }`:"";return`getByRole(${this.quote(r)}${c})`;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,!!o.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact("getByLabel",r,!!o.exact);case"title":return this.toCallWithExact("getByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return ta(String(e))}toCallWithExact(e,n,r){return tt(n)?`${e}(${this.regexToSourceString(n)})`:r?`${e}(${this.quote(n)}, { exact: true })`:`${e}(${this.quote(n)})`}toHasText(e){return tt(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return tt(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return ea(e,this.preferredQuote??"'")}}class h1{generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(o.hasText)})`:o.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(o.hasNotText)})`:`locator(${this.quote(r)})`;case"frame-locator":return`frame_locator(${this.quote(r)})`;case"frame":return"content_frame";case"nth":return`nth(${r})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${r==="true"?"True":"False"})`;case"role":const l=[];tt(o.name)?l.push(`name=${this.regexToString(o.name)}`):typeof o.name=="string"&&(l.push(`name=${this.quote(o.name)}`),o.exact&&l.push("exact=True"));for(const{name:u,value:d}of o.attrs){let p=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(p=d?"True":"False"),l.push(`${sg(u)}=${p}`)}const c=l.length?`, ${l.join(", ")}`:"";return`get_by_role(${this.quote(r)}${c})`;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,!!o.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!o.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!o.exact);case"label":return this.toCallWithExact("get_by_label",r,!!o.exact);case"title":return this.toCallWithExact("get_by_title",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${ta(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${n})`}toCallWithExact(e,n,r){return tt(n)?`${e}(${this.regexToString(n)})`:r?`${e}(${this.quote(n)}, exact=True)`:`${e}(${this.quote(n)})`}toHasText(e){return tt(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return tt(e)?this.regexToString(e):this.quote(e)}quote(e){return ea(e,'"')}}class p1{generateLocator(e,n,r,o={}){let l;switch(e){case"page":l="Page";break;case"frame-locator":l="FrameLocator";break;case"locator":l="Locator";break}switch(n){case"default":return o.hasText!==void 0?`locator(${this.quote(r)}, new ${l}.LocatorOptions().setHasText(${this.toHasText(o.hasText)}))`:o.hasNotText!==void 0?`locator(${this.quote(r)}, new ${l}.LocatorOptions().setHasNotText(${this.toHasText(o.hasNotText)}))`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${l}.FilterOptions().setVisible(${r==="true"?"true":"false"}))`;case"role":const c=[];tt(o.name)?c.push(`.setName(${this.regexToString(o.name)})`):typeof o.name=="string"&&(c.push(`.setName(${this.quote(o.name)})`),o.exact&&c.push(".setExact(true)"));for(const{name:d,value:p}of o.attrs)c.push(`.set${Bl(d)}(${typeof p=="string"?this.quote(p):p})`);const u=c.length?`, new ${l}.GetByRoleOptions()${c.join("")}`:"";return`getByRole(AriaRole.${sg(r).toUpperCase()}${u})`;case"has-text":return`filter(new ${l}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${l}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${l}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${l}.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(l,"getByText",r,!!o.exact);case"alt":return this.toCallWithExact(l,"getByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact(l,"getByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact(l,"getByLabel",r,!!o.exact);case"title":return this.toCallWithExact(l,"getByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(ta(e.source))}${n})`}toCallWithExact(e,n,r,o){return tt(r)?`${n}(${this.regexToString(r)})`:o?`${n}(${this.quote(r)}, new ${e}.${Bl(n)}Options().setExact(true))`:`${n}(${this.quote(r)})`}toHasText(e){return tt(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return tt(e)?this.regexToString(e):this.quote(e)}quote(e){return ea(e,'"')}}class m1{generateLocator(e,n,r,o={}){switch(n){case"default":return o.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(o.hasNotText)} })`:`Locator(${this.quote(r)})`;case"frame-locator":return`FrameLocator(${this.quote(r)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${r})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${r==="true"?"true":"false"} })`;case"role":const l=[];tt(o.name)?l.push(`NameRegex = ${this.regexToString(o.name)}`):typeof o.name=="string"&&(l.push(`Name = ${this.quote(o.name)}`),o.exact&&l.push("Exact = true"));for(const{name:u,value:d}of o.attrs)l.push(`${Bl(u)} = ${typeof d=="string"?this.quote(d):d}`);const c=l.length?`, new() { ${l.join(", ")} }`:"";return`GetByRole(AriaRole.${Bl(r)}${c})`;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,!!o.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!o.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!o.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!o.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!o.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(ta(e.source))}${n})`}toCallWithExact(e,n,r){return tt(n)?`${e}(${this.regexToString(n)})`:r?`${e}(${this.quote(n)}, new() { Exact = true })`:`${e}(${this.quote(n)})`}toHasText(e){return tt(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return tt(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return tt(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return ea(e,'"')}}class g1{generateLocator(e,n,r,o={}){return JSON.stringify({kind:n,body:r,options:o})}chainLocators(e){const n=e.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 lg={javascript:d1,python:h1,java:p1,csharp:m1,jsonl:g1};function tt(t){return t instanceof RegExp}const zp=new Map;function y1({name:t,rootItem:e,render:n,title:r,icon:o,isError:l,isVisible:c,selectedItem:u,onAccepted:d,onSelected:p,onHighlighted:g,treeState:y,setTreeState:v,noItemsMessage:S,dataTestId:k,autoExpandDepth:_}){const E=$.useMemo(()=>v1(e,u,y.expandedItems,_||0,c),[e,u,y,_,c]),C=$.useRef(null),[A,B]=$.useState(),[R,D]=$.useState(!1);$.useEffect(()=>{g==null||g(A)},[g,A]),$.useEffect(()=>{const H=C.current;if(!H)return;const F=()=>{zp.set(t,H.scrollTop)};return H.addEventListener("scroll",F,{passive:!0}),()=>H.removeEventListener("scroll",F)},[t]),$.useEffect(()=>{C.current&&(C.current.scrollTop=zp.get(t)||0)},[t]);const z=$.useCallback(H=>{const{expanded:F}=E.get(H);if(F){for(let M=u;M;M=M.parent)if(M===H){p==null||p(H);break}y.expandedItems.set(H.id,!1)}else y.expandedItems.set(H.id,!0);v({...y})},[E,u,p,y,v]);return w.jsx("div",{className:Be("tree-view vbox",t+"-tree-view"),role:"tree","data-testid":k||t+"-tree",children:w.jsxs("div",{className:Be("tree-view-content"),tabIndex:0,onKeyDown:H=>{if(u&&H.key==="Enter"){d==null||d(u);return}if(H.key!=="ArrowDown"&&H.key!=="ArrowUp"&&H.key!=="ArrowLeft"&&H.key!=="ArrowRight")return;if(H.stopPropagation(),H.preventDefault(),u&&H.key==="ArrowLeft"){const{expanded:M,parent:G}=E.get(u);M?(y.expandedItems.set(u.id,!1),v({...y})):G&&(p==null||p(G));return}if(u&&H.key==="ArrowRight"){u.children.length&&(y.expandedItems.set(u.id,!0),v({...y}));return}let F=u;if(H.key==="ArrowDown"&&(u?F=E.get(u).next:E.size&&(F=[...E.keys()][0])),H.key==="ArrowUp"){if(u)F=E.get(u).prev;else if(E.size){const M=[...E.keys()];F=M[M.length-1]}}g==null||g(void 0),F&&(D(!0),p==null||p(F)),B(void 0)},ref:C,children:[S&&E.size===0&&w.jsx("div",{className:"tree-view-empty",children:S}),e.children.map(H=>E.get(H)&&w.jsx(ag,{item:H,treeItems:E,selectedItem:u,onSelected:p,onAccepted:d,isError:l,toggleExpanded:z,highlightedItem:A,setHighlightedItem:B,render:n,icon:o,title:r,isKeyboardNavigation:R,setIsKeyboardNavigation:D},H.id))]})})}function ag({item:t,treeItems:e,selectedItem:n,onSelected:r,highlightedItem:o,setHighlightedItem:l,isError:c,onAccepted:u,toggleExpanded:d,render:p,title:g,icon:y,isKeyboardNavigation:v,setIsKeyboardNavigation:S}){const k=$.useId(),_=$.useRef(null);$.useEffect(()=>{n===t&&v&&_.current&&(Pm(_.current),S(!1))},[t,n,v,S]);const E=e.get(t),C=E.depth,A=E.expanded;let B="codicon-blank";typeof A=="boolean"&&(B=A?"codicon-chevron-down":"codicon-chevron-right");const R=p(t),D=A&&t.children.length?t.children:[],z=g==null?void 0:g(t),H=(y==null?void 0:y(t))||"codicon-blank";return w.jsxs("div",{ref:_,role:"treeitem","aria-selected":t===n,"aria-expanded":A,"aria-controls":k,title:z,className:"vbox",style:{flex:"none"},children:[w.jsxs("div",{onDoubleClick:()=>u==null?void 0:u(t),className:Be("tree-view-entry",n===t&&"selected",o===t&&"highlighted",(c==null?void 0:c(t))&&"error"),onClick:()=>r==null?void 0:r(t),onMouseEnter:()=>l(t),onMouseLeave:()=>l(void 0),children:[C?new Array(C).fill(0).map((F,M)=>w.jsx("div",{className:"tree-view-indent"},"indent-"+M)):void 0,w.jsx("div",{"aria-hidden":"true",className:"codicon "+B,style:{minWidth:16,marginRight:4},onDoubleClick:F=>{F.preventDefault(),F.stopPropagation()},onClick:F=>{F.stopPropagation(),F.preventDefault(),d(t)}}),y&&w.jsx("div",{className:"codicon "+H,style:{minWidth:16,marginRight:4},"aria-label":"["+H.replace("codicon","icon")+"]"}),typeof R=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:R}):R]}),!!D.length&&w.jsx("div",{id:k,role:"group",children:D.map(F=>e.get(F)&&w.jsx(ag,{item:F,treeItems:e,selectedItem:n,onSelected:r,onAccepted:u,isError:c,toggleExpanded:d,highlightedItem:o,setHighlightedItem:l,render:p,title:g,icon:y,isKeyboardNavigation:v,setIsKeyboardNavigation:S},F.id))})]})}function v1(t,e,n,r,o=()=>!0){if(!o(t))return new Map;const l=new Map,c=new Set;for(let p=e==null?void 0:e.parent;p;p=p.parent)c.add(p.id);let u=null;const d=(p,g)=>{for(const y of p.children){if(!o(y))continue;const v=c.has(y.id)||n.get(y.id),S=r>g&&l.size<25&&v!==!1,k=y.children.length?v??S:void 0,_={depth:g,expanded:k,parent:t===p?null:p,next:null,prev:u};u&&(l.get(u).next=y),u=y,l.set(y,_),k&&d(y,g+1)}};return d(t,0),l}const qt=$.forwardRef(function({children:e,title:n="",icon:r,disabled:o=!1,toggled:l=!1,onClick:c=()=>{},style:u,testId:d,className:p,ariaLabel:g},y){return w.jsxs("button",{ref:y,className:Be(p,"toolbar-button",r,l&&"toggled"),onMouseDown:Hp,onClick:c,onDoubleClick:Hp,title:n,disabled:!!o,style:u,"data-testid":d,"aria-label":g||n,children:[r&&w.jsx("span",{className:`codicon codicon-${r}`,style:e?{marginRight:5}:{}}),e]})}),Hp=t=>{t.stopPropagation(),t.preventDefault()};function cg(t){return t==="scheduled"?"codicon-clock":t==="running"?"codicon-loading":t==="failed"?"codicon-error":t==="passed"?"codicon-check":t==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function w1(t){return t==="scheduled"?"Pending":t==="running"?"Running":t==="failed"?"Failed":t==="passed"?"Passed":t==="skipped"?"Skipped":"Did not run"}const S1=new Map([["APIRequestContext.fetch",{title:'{method} "{url}"'}],["APIRequestContext.fetchResponseBody",{internal:!0}],["APIRequestContext.fetchLog",{internal:!0}],["APIRequestContext.storageState",{internal:!0}],["APIRequestContext.disposeAPIResponse",{internal:!0}],["APIRequestContext.dispose",{internal:!0}],["LocalUtils.zip",{internal:!0}],["LocalUtils.harOpen",{internal:!0}],["LocalUtils.harLookup",{internal:!0}],["LocalUtils.harClose",{internal:!0}],["LocalUtils.harUnzip",{internal:!0}],["LocalUtils.connect",{internal:!0}],["LocalUtils.tracingStarted",{internal:!0}],["LocalUtils.addStackToTracingNoReply",{internal:!0}],["LocalUtils.traceDiscarded",{internal:!0}],["LocalUtils.globToRegex",{internal:!0}],["Root.initialize",{internal:!0}],["Playwright.newRequest",{title:"Create request context"}],["DebugController.initialize",{internal:!0}],["DebugController.setReportStateChanged",{internal:!0}],["DebugController.resetForReuse",{internal:!0}],["DebugController.navigate",{internal:!0}],["DebugController.setRecorderMode",{internal:!0}],["DebugController.highlight",{internal:!0}],["DebugController.hideHighlight",{internal:!0}],["DebugController.resume",{internal:!0}],["DebugController.kill",{internal:!0}],["DebugController.closeAllBrowsers",{internal:!0}],["SocksSupport.socksConnected",{internal:!0}],["SocksSupport.socksFailed",{internal:!0}],["SocksSupport.socksData",{internal:!0}],["SocksSupport.socksError",{internal:!0}],["SocksSupport.socksEnd",{internal:!0}],["BrowserType.launch",{title:"Launch browser"}],["BrowserType.launchPersistentContext",{title:"Launch persistent context"}],["BrowserType.connectOverCDP",{title:"Connect over CDP"}],["Browser.close",{title:"Close browser"}],["Browser.killForTests",{internal:!0}],["Browser.defaultUserAgentForTest",{internal:!0}],["Browser.newContext",{title:"Create context"}],["Browser.newContextForReuse",{internal:!0}],["Browser.disconnectFromReusedContext",{internal:!0}],["Browser.newBrowserCDPSession",{internal:!0,title:"Create CDP session"}],["Browser.startTracing",{internal:!0}],["Browser.stopTracing",{internal:!0}],["EventTarget.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Page.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.addCookies",{title:"Add cookies"}],["BrowserContext.addInitScript",{title:"Add init script"}],["BrowserContext.clearCookies",{title:"Clear cookies"}],["BrowserContext.clearPermissions",{title:"Clear permissions"}],["BrowserContext.close",{title:"Close context"}],["BrowserContext.cookies",{title:"Get cookies"}],["BrowserContext.exposeBinding",{title:"Expose binding"}],["BrowserContext.grantPermissions",{title:"Grant permissions"}],["BrowserContext.newPage",{title:"Create page"}],["BrowserContext.registerSelectorEngine",{internal:!0}],["BrowserContext.setTestIdAttributeName",{internal:!0}],["BrowserContext.setExtraHTTPHeaders",{title:"Set extra HTTP headers"}],["BrowserContext.setGeolocation",{title:"Set geolocation"}],["BrowserContext.setHTTPCredentials",{title:"Set HTTP credentials"}],["BrowserContext.setNetworkInterceptionPatterns",{internal:!0}],["BrowserContext.setWebSocketInterceptionPatterns",{internal:!0}],["BrowserContext.setOffline",{title:"Set offline mode"}],["BrowserContext.storageState",{title:"Get storage state"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.newCDPSession",{internal:!0}],["BrowserContext.harStart",{internal:!0}],["BrowserContext.harExport",{internal:!0}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber}{ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber}{timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber}{timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber}{ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber}{timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber}{timeString}"'}],["Page.addInitScript",{}],["Page.close",{title:"Close"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0}],["Page.exposeBinding",{title:"Expose binding"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0}],["Page.requestGC",{title:"Request garbage collection"}],["Page.registerLocatorHandler",{title:"Register locator handler"}],["Page.resolveLocatorHandlerNoReply",{internal:!0}],["Page.unregisterLocatorHandler",{title:"Unregister locator handler"}],["Page.reload",{title:"Reload",slowMo:!0,snapshot:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0}],["Page.setExtraHTTPHeaders",{title:"Set extra HTTP headers"}],["Page.setNetworkInterceptionPatterns",{internal:!0}],["Page.setWebSocketInterceptionPatterns",{internal:!0}],["Page.setViewportSize",{title:"Set viewport size",snapshot:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0}],["Page.accessibilitySnapshot",{internal:!0,snapshot:!0}],["Page.pdf",{title:"PDF"}],["Page.snapshotForAI",{internal:!0,snapshot:!0}],["Page.startJSCoverage",{internal:!0}],["Page.stopJSCoverage",{internal:!0}],["Page.startCSSCoverage",{internal:!0}],["Page.stopCSSCoverage",{internal:!0}],["Page.bringToFront",{title:"Bring to front"}],["Page.updateSubscription",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",snapshot:!0}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.content",{title:"Get content",snapshot:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0}],["Frame.frameElement",{internal:!0}],["Frame.generateLocatorString",{internal:!0}],["Frame.highlight",{internal:!0}],["Frame.getAttribute",{internal:!0,snapshot:!0}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0}],["Frame.innerText",{title:"Get inner text",snapshot:!0}],["Frame.inputValue",{title:"Get input value",snapshot:!0}],["Frame.isChecked",{title:"Is checked",snapshot:!0}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0}],["Frame.isHidden",{title:"Is hidden",snapshot:!0}],["Frame.isVisible",{title:"Is visible",snapshot:!0}],["Frame.isEditable",{title:"Is editable",snapshot:!0}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.setContent",{title:"Set content",snapshot:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0}],["Frame.title",{internal:!0}],["Frame.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["JSHandle.dispose",{}],["ElementHandle.dispose",{}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0}],["JSHandle.getPropertyList",{internal:!0}],["ElementHandle.getPropertyList",{internal:!0}],["JSHandle.getProperty",{internal:!0}],["ElementHandle.getProperty",{internal:!0}],["JSHandle.jsonValue",{internal:!0}],["ElementHandle.jsonValue",{internal:!0}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.contentFrame",{internal:!0,snapshot:!0}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0}],["ElementHandle.getAttribute",{internal:!0}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0}],["ElementHandle.ownerFrame",{title:"Get owner frame"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{}],["Route.continue",{internal:!0}],["Route.fulfill",{internal:!0}],["WebSocketRoute.connect",{internal:!0}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{internal:!0}],["WebSocketRoute.sendToServer",{internal:!0}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{internal:!0}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{internal:!0}],["Tracing.tracingStartChunk",{internal:!0}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{internal:!0}],["Tracing.tracingStop",{internal:!0}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["CDPSession.send",{internal:!0}],["CDPSession.detach",{internal:!0}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{internal:!0}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{internal:!0}],["AndroidDevice.close",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}]]);function x1(t,e){if(!t)return"";if(e==="url")try{const n=new URL(t[e]);return n.protocol==="data:"?n.protocol:n.protocol==="about:"?t[e]:n.pathname+n.search}catch{return t[e]}return e==="timeNumber"?new Date(t[e]).toString():_1(t,e)}function _1(t,e){const n=e.split(".");let r=t;for(const o of n){if(typeof r!="object"||r===null)return"";r=r[o]}return r===void 0?"":String(r)}const E1=y1,k1=({actions:t,selectedAction:e,selectedTime:n,setSelectedTime:r,sdkLanguage:o,onSelected:l,onHighlighted:c,revealConsole:u,revealAttachment:d,isLive:p})=>{const[g,y]=$.useState({expandedItems:new Map}),{rootItem:v,itemMap:S}=$.useMemo(()=>$0(t),[t]),{selectedItem:k}=$.useMemo(()=>({selectedItem:e?S.get(e.callId):void 0}),[S,e]),_=$.useCallback(D=>{var z,H;return!!((H=(z=D.action)==null?void 0:z.error)!=null&&H.message)},[]),E=$.useCallback(D=>r({minimum:D.action.startTime,maximum:D.action.endTime}),[r]),C=$.useCallback(D=>Zu(D.action,{sdkLanguage:o,revealConsole:u,revealAttachment:d,isLive:p,showDuration:!0,showBadges:!0}),[p,u,d,o]),A=$.useCallback(D=>!n||!D.action||D.action.startTime<=n.maximum&&D.action.endTime>=n.minimum,[n]),B=$.useCallback(D=>{l==null||l(D.action)},[l]),R=$.useCallback(D=>{c==null||c(D==null?void 0:D.action)},[c]);return w.jsxs("div",{className:"vbox",children:[n&&w.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[w.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),w.jsx(E1,{name:"actions",rootItem:v,treeState:g,setTreeState:y,selectedItem:k,onSelected:B,onHighlighted:R,onAccepted:E,isError:_,isVisible:A,render:C})]})},Zu=(t,e)=>{var E,C;const{sdkLanguage:n,revealConsole:r,revealAttachment:o,isLive:l,showDuration:c,showBadges:u}=e,{errors:d,warnings:p}=D0(t),g=!!((E=t.attachments)!=null&&E.length)&&!!o,y=t.params.selector?u1(n||"javascript",t.params.selector):void 0,v=t.class==="Test"&&t.method==="step"&&((C=t.annotations)==null?void 0:C.some(A=>A.type==="skip"));let S="";t.endTime?S=pt(t.endTime-t.startTime):t.error?S="Timed out":l||(S="-");const{elements:k,title:_}=b1(t);return w.jsxs("div",{className:"action-title vbox",children:[w.jsxs("div",{className:"hbox",children:[w.jsx("span",{className:"action-title-method",title:_,children:k}),(c||u||g||v)&&w.jsx("div",{className:"spacer"}),g&&w.jsx(qt,{icon:"attach",title:"Open Attachment",onClick:()=>o(t.attachments[0])}),c&&!v&&w.jsx("div",{className:"action-duration",children:S||w.jsx("span",{className:"codicon codicon-loading"})}),v&&w.jsx("span",{className:Be("action-skipped","codicon",cg("skipped")),title:"skipped"}),u&&w.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!d&&w.jsxs("div",{className:"action-icon",children:[w.jsx("span",{className:"codicon codicon-error"}),w.jsx("span",{className:"action-icon-value",children:d})]}),!!p&&w.jsxs("div",{className:"action-icon",children:[w.jsx("span",{className:"codicon codicon-warning"}),w.jsx("span",{className:"action-icon-value",children:p})]})]})]}),y&&w.jsx("div",{className:"action-title-selector",title:y,children:y})]})};function b1(t){var u;const e=t.title??((u=S1.get(t.class+"."+t.method))==null?void 0:u.title)??t.method,n=[],r=[];let o=0;const l=/\{([^}]+)\}/g;let c;for(;(c=l.exec(e))!==null;){const[d,p]=c,g=e.slice(o,c.index);n.push(g),r.push(g);const y=x1(t.params,p);c.index===0?n.push(y):n.push(w.jsx("span",{className:"action-title-param",children:y})),r.push(y),o=c.index+d.length}if(o<e.length){const d=e.slice(o);n.push(d),r.push(d)}return{elements:n,title:r.join("")}}const ef=({value:t,description:e})=>{const[n,r]=$.useState("copy"),o=$.useCallback(()=>{(typeof t=="function"?t():Promise.resolve(t)).then(c=>{navigator.clipboard.writeText(c).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[t]);return w.jsx(qt,{title:e||"Copy",icon:n,onClick:o})},Nl=({value:t,description:e,copiedDescription:n=e,style:r})=>{const[o,l]=$.useState(!1),c=$.useCallback(async()=>{const u=typeof t=="function"?await t():t;await navigator.clipboard.writeText(u),l(!0),setTimeout(()=>l(!1),3e3)},[t]);return w.jsx(qt,{style:r,title:e,onClick:c,className:"copy-to-clipboard-text-button",children:o?n:e})},Ir=({text:t})=>w.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:t}),T1=({action:t,startTimeOffset:e,sdkLanguage:n})=>{const r=$.useMemo(()=>Object.keys((t==null?void 0:t.params)??{}).filter(c=>c!=="info"),[t]);if(!t)return w.jsx(Ir,{text:"No action selected"});const o=t.startTime-e,l=pt(o);return w.jsxs("div",{className:"call-tab",children:[w.jsx("div",{className:"call-line",children:t.title}),w.jsx("div",{className:"call-section",children:"Time"}),w.jsx(Up,{name:"start:",value:l}),w.jsx(Up,{name:"duration:",value:C1(t)}),!!r.length&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",children:"Parameters"}),r.map(c=>qp(Vp(t,c,t.params[c],n)))]}),!!t.result&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(t.result).map(c=>qp(Vp(t,c,t.result[c],n)))]})]})},Up=({name:t,value:e})=>w.jsxs("div",{className:"call-line",children:[t,w.jsx("span",{className:"call-value datetime",title:e,children:e})]});function C1(t){return t.endTime?pt(t.endTime-t.startTime):t.error?"Timed Out":"Running"}function qp(t){let e=t.text.replace(/\n/g,"↵");return t.type==="string"&&(e=`"${e}"`),w.jsxs("div",{className:"call-line",children:[t.name,":",w.jsx("span",{className:Be("call-value",t.type),title:t.text,children:e}),["string","number","object","locator"].includes(t.type)&&w.jsx(ef,{value:t.text})]},t.name)}function Vp(t,e,n,r){const o=t.method.includes("eval")||t.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&o)&&(n=Hl(n.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&o||e==="received"&&t.method==="expect")&&(n=Hl(n,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:Tr(r||"javascript",t.params.selector),type:"locator",name:"locator"};const l=typeof n;return l!=="object"||n===null?{text:String(n),type:l,name:e}:n.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(n).slice(0,1e3),type:"object",name:e}}function Hl(t,e){if(t.n!==void 0)return t.n;if(t.s!==void 0)return t.s;if(t.b!==void 0)return t.b;if(t.v!==void 0){if(t.v==="undefined")return;if(t.v==="null")return null;if(t.v==="NaN")return NaN;if(t.v==="Infinity")return 1/0;if(t.v==="-Infinity")return-1/0;if(t.v==="-0")return-0}if(t.d!==void 0)return new Date(t.d);if(t.r!==void 0)return new RegExp(t.r.p,t.r.f);if(t.a!==void 0)return t.a.map(n=>Hl(n,e));if(t.o!==void 0){const n={};for(const{k:r,v:o}of t.o)n[r]=Hl(o,e);return n}return t.h!==void 0?e===void 0?"<object>":e[t.h]:"<object>"}const Wp=new Map;function na({name:t,items:e=[],id:n,render:r,icon:o,isError:l,isWarning:c,isInfo:u,selectedItem:d,onAccepted:p,onSelected:g,onHighlighted:y,onIconClicked:v,noItemsMessage:S,dataTestId:k,notSelectable:_,ariaLabel:E}){const C=$.useRef(null),[A,B]=$.useState();return $.useEffect(()=>{y==null||y(A)},[y,A]),$.useEffect(()=>{const R=C.current;if(!R)return;const D=()=>{Wp.set(t,R.scrollTop)};return R.addEventListener("scroll",D,{passive:!0}),()=>R.removeEventListener("scroll",D)},[t]),$.useEffect(()=>{C.current&&(C.current.scrollTop=Wp.get(t)||0)},[t]),w.jsx("div",{className:Be("list-view vbox",t+"-list-view"),role:e.length>0?"list":void 0,"aria-label":E,children:w.jsxs("div",{className:Be("list-view-content",_&&"not-selectable"),tabIndex:0,onKeyDown:R=>{var F;if(d&&R.key==="Enter"){p==null||p(d,e.indexOf(d));return}if(R.key!=="ArrowDown"&&R.key!=="ArrowUp")return;R.stopPropagation(),R.preventDefault();const D=d?e.indexOf(d):-1;let z=D;R.key==="ArrowDown"&&(D===-1?z=0:z=Math.min(D+1,e.length-1)),R.key==="ArrowUp"&&(D===-1?z=e.length-1:z=Math.max(D-1,0));const H=(F=C.current)==null?void 0:F.children.item(z);Pm(H||void 0),y==null||y(void 0),g==null||g(e[z],z),B(void 0)},ref:C,children:[S&&e.length===0&&w.jsx("div",{className:"list-view-empty",children:S}),e.map((R,D)=>{const z=r(R,D);return w.jsxs("div",{onDoubleClick:()=>p==null?void 0:p(R,D),role:"listitem",className:Be("list-view-entry",d===R&&"selected",!_&&A===R&&"highlighted",(l==null?void 0:l(R,D))&&"error",(c==null?void 0:c(R,D))&&"warning",(u==null?void 0:u(R,D))&&"info"),"aria-selected":d===R,onClick:()=>g==null?void 0:g(R,D),onMouseEnter:()=>B(R),onMouseLeave:()=>B(void 0),children:[o&&w.jsx("div",{className:"codicon "+(o(R,D)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:H=>{H.preventDefault(),H.stopPropagation()},onClick:H=>{H.stopPropagation(),H.preventDefault(),v==null||v(R,D)}}),typeof z=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:z}):z]},(n==null?void 0:n(R,D))||D)})]})})}const N1=na,A1=({action:t,isLive:e})=>{const n=$.useMemo(()=>{var c;if(!t||!t.log.length)return[];const r=t.log,o=t.context.wallTime-t.context.startTime,l=[];for(let u=0;u<r.length;++u){let d="";if(r[u].time!==-1){const p=(c=r[u])==null?void 0:c.time;u+1<r.length?d=pt(r[u+1].time-p):t.endTime>0?d=pt(t.endTime-p):e?d=pt(Date.now()-o-p):d="-"}l.push({message:r[u].message,time:d})}return l},[t,e]);return n.length?w.jsx(N1,{name:"log",ariaLabel:"Log entries",items:n,render:r=>w.jsxs("div",{className:"log-list-item",children:[w.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):w.jsx(Ir,{text:"No log entries"})};function qi(t,e){const n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let o,l={},c=!1,u=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(o=n.exec(t))!==null;){const[,,p,,g]=o;if(p){const y=+p;switch(y){case 0:l={};break;case 1:l["font-weight"]="bold";break;case 2:l.opacity="0.8";break;case 3:l["font-style"]="italic";break;case 4:l["text-decoration"]="underline";break;case 7:c=!0;break;case 8:l.display="none";break;case 9:l["text-decoration"]="line-through";break;case 22:delete l["font-weight"],delete l["font-style"],delete l.opacity,delete l["text-decoration"];break;case 23:delete l["font-weight"],delete l["font-style"],delete l.opacity;break;case 24:delete l["text-decoration"];break;case 27:c=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:u=Kp[y-30];break;case 39:u=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:d=Kp[y-40];break;case 49:d=e==null?void 0:e.bg;break;case 53:l["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:u=Gp[y-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=Gp[y-100];break}}else if(g){const y={...l},v=c?d:u;v!==void 0&&(y.color=v);const S=c?u:d;S!==void 0&&(y["background-color"]=S),r.push(`<span style="${L1(y)}">${I1(g)}</span>`)}}return r.join("")}const Kp={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)"},Gp={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 I1(t){return t.replace(/[&"<>]/g,e=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[e])}function L1(t){return Object.entries(t).map(([e,n])=>`${e}: ${n}`).join("; ")}const M1=({error:t})=>{const e=$.useMemo(()=>qi(t),[t]);return w.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},ug=({cursor:t,onPaneMouseMove:e,onPaneMouseUp:n,onPaneDoubleClick:r})=>(Mt.useEffect(()=>{const o=document.createElement("div");return o.style.position="fixed",o.style.top="0",o.style.right="0",o.style.bottom="0",o.style.left="0",o.style.zIndex="9999",o.style.cursor=t,document.body.appendChild(o),e&&o.addEventListener("mousemove",e),n&&o.addEventListener("mouseup",n),r&&document.body.addEventListener("dblclick",r),()=>{e&&o.removeEventListener("mousemove",e),n&&o.removeEventListener("mouseup",n),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(o)}},[t,e,n,r]),w.jsx(w.Fragment,{})),j1={position:"absolute",top:0,right:0,bottom:0,left:0},fg=({orientation:t,offsets:e,setOffsets:n,resizerColor:r,resizerWidth:o,minColumnWidth:l})=>{const c=l||0,[u,d]=Mt.useState(null),[p,g]=Ar(),y={position:"absolute",right:t==="horizontal"?void 0:0,bottom:t==="horizontal"?0:void 0,width:t==="horizontal"?7:void 0,height:t==="horizontal"?void 0:7,borderTopWidth:t==="horizontal"?void 0:(7-o)/2,borderRightWidth:t==="horizontal"?(7-o)/2:void 0,borderBottomWidth:t==="horizontal"?void 0:(7-o)/2,borderLeftWidth:t==="horizontal"?(7-o)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:t==="horizontal"?"ew-resize":"ns-resize"};return w.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-o)/2,zIndex:100,pointerEvents:"none"},ref:g,children:[!!u&&w.jsx(ug,{cursor:t==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:v=>{if(!v.buttons)d(null);else if(u){const S=t==="horizontal"?v.clientX-u.clientX:v.clientY-u.clientY,k=u.offset+S,_=u.index>0?e[u.index-1]:0,E=t==="horizontal"?p.width:p.height,C=Math.min(Math.max(_+c,k),E-c)-e[u.index];for(let A=u.index;A<e.length;++A)e[A]=e[A]+C;n([...e])}}}),e.map((v,S)=>w.jsx("div",{style:{...y,top:t==="horizontal"?0:v,left:t==="horizontal"?v:0,pointerEvents:"initial"},onMouseDown:k=>d({clientX:k.clientX,clientY:k.clientY,offset:v,index:S}),children:w.jsx("div",{style:{...j1,background:r}})},S))]})};async function pu(t){const e=new Image;return t&&(e.src=t,await new Promise((n,r)=>{e.onload=n,e.onerror=n})),e}const Pu={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
43
- linear-gradient(-45deg, #80808020 25%, transparent 25%),
44
- linear-gradient(45deg, transparent 75%, #80808020 75%),
45
- linear-gradient(-45deg, transparent 75%, #80808020 75%)`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px",boxShadow:`rgb(0 0 0 / 10%) 0px 1.8px 1.9px,
46
- rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
47
- rgb(0 0 0 / 10%) 0px -2px 4px,
48
- rgb(0 0 0 / 15%) 0px -6.1px 12px,
49
- rgb(0 0 0 / 25%) 0px 6px 12px`},P1=({diff:t,noTargetBlank:e,hideDetails:n})=>{const[r,o]=$.useState(t.diff?"diff":"actual"),[l,c]=$.useState(!1),[u,d]=$.useState(null),[p,g]=$.useState("Expected"),[y,v]=$.useState(null),[S,k]=$.useState(null),[_,E]=Ar();$.useEffect(()=>{(async()=>{var M,G,K,O;d(await pu((M=t.expected)==null?void 0:M.attachment.path)),g(((G=t.expected)==null?void 0:G.title)||"Expected"),v(await pu((K=t.actual)==null?void 0:K.attachment.path)),k(await pu((O=t.diff)==null?void 0:O.attachment.path))})()},[t]);const C=u&&y&&S,A=C?Math.max(u.naturalWidth,y.naturalWidth,200):500,B=C?Math.max(u.naturalHeight,y.naturalHeight,200):500,R=Math.min(1,(_.width-30)/A),D=Math.min(1,(_.width-50)/A/2),z=A*R,H=B*R,F={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return w.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:E,children:C&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[t.diff&&w.jsx("div",{style:{...F,fontWeight:r==="diff"?600:"initial"},onClick:()=>o("diff"),children:"Diff"}),w.jsx("div",{style:{...F,fontWeight:r==="actual"?600:"initial"},onClick:()=>o("actual"),children:"Actual"}),w.jsx("div",{style:{...F,fontWeight:r==="expected"?600:"initial"},onClick:()=>o("expected"),children:p}),w.jsx("div",{style:{...F,fontWeight:r==="sxs"?600:"initial"},onClick:()=>o("sxs"),children:"Side by side"}),w.jsx("div",{style:{...F,fontWeight:r==="slider"?600:"initial"},onClick:()=>o("slider"),children:"Slider"})]}),w.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:H+60},children:[t.diff&&r==="diff"&&w.jsx(En,{image:S,alt:"Diff",hideSize:n,canvasWidth:z,canvasHeight:H,scale:R}),t.diff&&r==="actual"&&w.jsx(En,{image:y,alt:"Actual",hideSize:n,canvasWidth:z,canvasHeight:H,scale:R}),t.diff&&r==="expected"&&w.jsx(En,{image:u,alt:p,hideSize:n,canvasWidth:z,canvasHeight:H,scale:R}),t.diff&&r==="slider"&&w.jsx(O1,{expectedImage:u,actualImage:y,hideSize:n,canvasWidth:z,canvasHeight:H,scale:R,expectedTitle:p}),t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:D*A,canvasHeight:D*B,scale:D}),w.jsx(En,{image:l?S:y,title:l?"Diff":"Actual",onClick:()=>c(!l),hideSize:n,canvasWidth:D*A,canvasHeight:D*B,scale:D})]}),!t.diff&&r==="actual"&&w.jsx(En,{image:y,title:"Actual",hideSize:n,canvasWidth:z,canvasHeight:H,scale:R}),!t.diff&&r==="expected"&&w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:z,canvasHeight:H,scale:R}),!t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,canvasWidth:D*A,canvasHeight:D*B,scale:D}),w.jsx(En,{image:y,title:"Actual",canvasWidth:D*A,canvasHeight:D*B,scale:D})]})]}),!n&&w.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[w.jsx("div",{children:t.diff&&w.jsx("a",{target:"_blank",href:t.diff.attachment.path,rel:"noreferrer",children:t.diff.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.actual.attachment.path,rel:"noreferrer",children:t.actual.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.expected.attachment.path,rel:"noreferrer",children:t.expected.attachment.name})})]})]})})},O1=({expectedImage:t,actualImage:e,canvasWidth:n,canvasHeight:r,scale:o,expectedTitle:l,hideSize:c})=>{const u={position:"absolute",top:0,left:0},[d,p]=$.useState(n/2),g=t.naturalWidth===e.naturalWidth&&t.naturalHeight===e.naturalHeight;return w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&w.jsxs("div",{style:{margin:5},children:[!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!g&&w.jsx("span",{children:e.naturalWidth}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!g&&w.jsx("span",{children:e.naturalHeight})]}),w.jsxs("div",{style:{position:"relative",width:n,height:r,margin:15,...Pu},children:[w.jsx(fg,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),w.jsx("img",{alt:l,style:{width:t.naturalWidth*o,height:t.naturalHeight*o},draggable:"false",src:t.src}),w.jsx("div",{style:{...u,bottom:0,overflow:"hidden",width:d,...Pu},children:w.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*o,height:e.naturalHeight*o},draggable:"false",src:e.src})})]})]})},En=({image:t,title:e,alt:n,hideSize:r,canvasWidth:o,canvasHeight:l,scale:c,onClick:u})=>w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&w.jsxs("div",{style:{margin:5},children:[e&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight})]}),w.jsx("div",{style:{display:"flex",flex:"none",width:o,height:l,margin:15,...Pu},children:w.jsx("img",{width:t.naturalWidth*c,height:t.naturalHeight*c,alt:e||n,style:{cursor:u?"pointer":"initial"},draggable:"false",src:t.src,onClick:u})})]}),$1="modulepreload",R1=function(t,e){return new URL(t,e).href},Qp={},D1=function(e,n,r){let o=Promise.resolve();if(n&&n.length>0){let c=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const u=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=c(n.map(g=>{if(g=R1(g,r),g in Qp)return;Qp[g]=!0;const y=g.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(!!r)for(let _=u.length-1;_>=0;_--){const E=u[_];if(E.href===g&&(!y||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${v}`))return;const k=document.createElement("link");if(k.rel=y?"stylesheet":$1,y||(k.as="script"),k.crossOrigin="",k.href=g,p&&k.setAttribute("nonce",p),document.head.appendChild(k),y)return new Promise((_,E)=>{k.addEventListener("load",_),k.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${g}`)))})}))}function l(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return o.then(c=>{for(const u of c||[])u.status==="rejected"&&l(u.reason);return e().catch(l)})},F1=20,Cs=({text:t,language:e,mimeType:n,linkify:r,readOnly:o,highlight:l,revealLine:c,lineNumbers:u,isFocused:d,focusOnChange:p,wrapLines:g,onChange:y,dataTestId:v,placeholder:S})=>{const[k,_]=Ar(),[E]=$.useState(D1(()=>import("./codeMirrorModule-rKSJ91kC.js"),__vite__mapDeps([0,1]),import.meta.url).then(R=>R.default)),C=$.useRef(null),[A,B]=$.useState();return $.useEffect(()=>{(async()=>{var F,M;const R=await E;z1(R);const D=_.current;if(!D)return;const z=U1(e)||H1(n)||(r?"text/linkified":"");if(C.current&&z===C.current.cm.getOption("mode")&&!!o===C.current.cm.getOption("readOnly")&&u===C.current.cm.getOption("lineNumbers")&&g===C.current.cm.getOption("lineWrapping")&&S===C.current.cm.getOption("placeholder"))return;(M=(F=C.current)==null?void 0:F.cm)==null||M.getWrapperElement().remove();const H=R(D,{value:"",mode:z,readOnly:!!o,lineNumbers:u,lineWrapping:g,placeholder:S});return C.current={cm:H},d&&H.focus(),B(H),H})()},[E,A,_,e,n,r,u,g,o,d,S]),$.useEffect(()=>{C.current&&C.current.cm.setSize(k.width,k.height)},[k]),$.useLayoutEffect(()=>{var z;if(!A)return;let R=!1;if(A.getValue()!==t&&(A.setValue(t),R=!0,p&&(A.execCommand("selectAll"),A.focus())),R||JSON.stringify(l)!==JSON.stringify(C.current.highlight)){for(const M of C.current.highlight||[])A.removeLineClass(M.line-1,"wrap");for(const M of l||[])A.addLineClass(M.line-1,"wrap",`source-line-${M.type}`);for(const M of C.current.widgets||[])A.removeLineWidget(M);for(const M of C.current.markers||[])M.clear();const H=[],F=[];for(const M of l||[]){if(M.type!=="subtle-error"&&M.type!=="error")continue;const G=(z=C.current)==null?void 0:z.cm.getLine(M.line-1);if(G){const K={};K.title=M.message||"",F.push(A.markText({line:M.line-1,ch:0},{line:M.line-1,ch:M.column||G.length},{className:"source-line-error-underline",attributes:K}))}if(M.type==="error"){const K=document.createElement("div");K.innerHTML=qi(M.message||""),K.className="source-line-error-widget",H.push(A.addLineWidget(M.line,K,{above:!0,coverGutter:!1}))}}C.current.highlight=l,C.current.widgets=H,C.current.markers=F}typeof c=="number"&&C.current.cm.lineCount()>=c&&A.scrollIntoView({line:Math.max(0,c-1),ch:0},50);let D;return y&&(D=()=>y(A.getValue()),A.on("change",D)),()=>{D&&A.off("change",D)}},[A,t,l,c,p,y]),w.jsx("div",{"data-testid":v,className:"cm-wrapper",ref:_,onClick:B1})};function B1(t){var n;if(!(t.target instanceof HTMLElement))return;let e;t.target.classList.contains("cm-linkified")?e=t.target.textContent:t.target.classList.contains("cm-link")&&((n=t.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(e=t.target.nextElementSibling.textContent.slice(1,-1)),e&&(t.preventDefault(),t.stopPropagation(),window.open(e,"_blank"))}let Jp=!1;function z1(t){Jp||(Jp=!0,t.defineSimpleMode("text/linkified",{start:[{regex:Om,token:"linkified"}]}))}function H1(t){if(t){if(t.includes("javascript")||t.includes("json"))return"javascript";if(t.includes("python"))return"python";if(t.includes("csharp"))return"text/x-csharp";if(t.includes("java"))return"text/x-java";if(t.includes("markdown"))return"markdown";if(t.includes("html")||t.includes("svg"))return"htmlmixed";if(t.includes("css"))return"css"}}function U1(t){if(t)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[t]}function q1(t){return!!t.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const V1=({title:t,children:e,setExpanded:n,expanded:r,expandOnTitleClick:o})=>{const l=$.useId();return w.jsxs("div",{className:Be("expandable",r&&"expanded"),children:[w.jsxs("div",{role:"button","aria-expanded":r,"aria-controls":l,className:"expandable-title",onClick:()=>o&&n(!r),children:[w.jsx("div",{className:Be("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:()=>!o&&n(!r)}),t]}),r&&w.jsx("div",{id:l,role:"region",style:{marginLeft:25},children:e})]})};function dg(t){const e=[];let n=0,r;for(;(r=Om.exec(t))!==null;){const l=t.substring(n,r.index);l&&e.push(l);const c=r[0];e.push(W1(c)),n=r.index+c.length}const o=t.substring(n);return o&&e.push(o),e}function W1(t){let e=t;return e.startsWith("www.")&&(e="https://"+e),w.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})}const K1=({attachment:t,reveal:e})=>{const[n,r]=$.useState(!1),[o,l]=$.useState(null),[c,u]=$.useState(null),[d,p]=_0(),g=$.useRef(null),y=q1(t.contentType),v=!!t.sha1||!!t.path;$.useEffect(()=>{var _;if(e)return(_=g.current)==null||_.scrollIntoView({behavior:"smooth"}),p()},[e,p]),$.useEffect(()=>{n&&o===null&&c===null&&(u("Loading ..."),fetch(ra(t)).then(_=>_.text()).then(_=>{l(_),u(null)}).catch(_=>{u("Failed to load: "+_.message)}))},[n,o,c,t]);const S=$.useMemo(()=>{const _=o?o.split(`
50
- `).length:0;return Math.min(Math.max(5,_),20)*F1},[o]),k=w.jsxs("span",{style:{marginLeft:5},ref:g,"aria-label":t.name,children:[w.jsx("span",{children:dg(t.name)}),v&&w.jsx("a",{style:{marginLeft:5},href:Al(t),children:"download"})]});return!y||!v?w.jsx("div",{style:{marginLeft:20},children:k}):w.jsxs("div",{className:Be(d&&"yellow-flash"),children:[w.jsx(V1,{title:k,expanded:n,setExpanded:r,expandOnTitleClick:!0,children:c&&w.jsx("i",{children:c})}),n&&o!==null&&w.jsx("div",{className:"vbox",style:{height:S},children:w.jsx(Cs,{text:o,readOnly:!0,mimeType:t.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},G1=({model:t,revealedAttachment:e})=>{const{diffMap:n,screenshots:r,attachments:o}=$.useMemo(()=>{const l=new Set((t==null?void 0:t.visibleAttachments)??[]),c=new Set,u=new Map;for(const d of l){if(!d.path&&!d.sha1)continue;const p=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(p){const g=p[1],y=p[2],v=u.get(g)||{expected:void 0,actual:void 0,diff:void 0};v[y]=d,u.set(g,v),l.delete(d)}else d.contentType.startsWith("image/")&&(c.add(d),l.delete(d))}return{diffMap:u,attachments:l,screenshots:c}},[t]);return!n.size&&!r.size&&!o.size?w.jsx(Ir,{text:"No attachments"}):w.jsxs("div",{className:"attachments-tab",children:[[...n.values()].map(({expected:l,actual:c,diff:u})=>w.jsxs(w.Fragment,{children:[l&&c&&w.jsx("div",{className:"attachments-section",children:"Image diff"}),l&&c&&w.jsx(P1,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...l,path:Al(l)},title:"Expected"},actual:{attachment:{...c,path:Al(c)}},diff:u?{attachment:{...u,path:Al(u)}}:void 0}})]})),r.size?w.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((l,c)=>{const u=ra(l);return w.jsxs("div",{className:"attachment-item",children:[w.jsx("div",{children:w.jsx("img",{draggable:"false",src:u})}),w.jsx("div",{children:w.jsx("a",{target:"_blank",href:u,rel:"noreferrer",children:l.name})})]},`screenshot-${c}`)}),o.size?w.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...o.values()].map((l,c)=>w.jsx("div",{className:"attachment-item",children:w.jsx(K1,{attachment:l,reveal:e&&Q1(l,e[0])?e:void 0})},J1(l,c)))]})};function Q1(t,e){return t.name===e.name&&t.path===e.path&&t.sha1===e.sha1}function ra(t,e={}){const n=new URLSearchParams(e);return t.sha1?(n.set("trace",t.traceUrl),"sha1/"+t.sha1+"?"+n.toString()):(n.set("path",t.path),"file?"+n.toString())}function Al(t){const e={dn:t.name};return t.contentType&&(e.dct=t.contentType),ra(t,e)}function J1(t,e){return e+"-"+(t.sha1?"sha1-"+t.sha1:"path-"+t.path)}const X1=`
51
- # Instructions
52
-
53
- - Following Playwright test failed.
54
- - Explain why, be concise, respect Playwright best practices.
55
- - Provide a snippet of code with the fix, if possible.
56
- `.trimStart();async function Y1({testInfo:t,metadata:e,errorContext:n,errors:r,buildCodeFrame:o}){var p;const l=new Set(r.filter(g=>g.message&&!g.message.includes(`
57
- `)).map(g=>g.message));for(const g of r)for(const y of l.keys())(p=g.message)!=null&&p.includes(y)&&l.delete(y);const c=r.filter(g=>!(!g.message||!g.message.includes(`
58
- `)&&!l.has(g.message)));if(!c.length)return;const u=[X1,"# Test info","",t,"","# Error details"];for(const g of c)u.push("","```",hg(g.message||""),"```");n&&u.push(n);const d=await o(c[c.length-1]);return d&&u.push("","# Test source","","```ts",d,"```"),e!=null&&e.gitDiff&&u.push("","# Local changes","","```diff",e.gitDiff,"```"),u.join(`
59
- `)}const Z1=new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))","g");function hg(t){return t.replace(Z1,"")}const eS=na,tS=({stack:t,setSelectedFrame:e,selectedFrame:n})=>{const r=t||[];return w.jsx(eS,{name:"stack-trace",ariaLabel:"Stack trace",items:r,selectedItem:r[n],render:o=>{const l=o.file[1]===":"?"\\":"/";return w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"stack-trace-frame-function",children:o.function||"(anonymous)"}),w.jsx("span",{className:"stack-trace-frame-location",children:o.file.split(l).pop()}),w.jsx("span",{className:"stack-trace-frame-line",children:":"+o.line})]})},onSelected:o=>e(r.indexOf(o))})},tf=({noShadow:t,children:e,noMinHeight:n,className:r,sidebarBackground:o,onClick:l})=>w.jsx("div",{className:Be("toolbar",t&&"no-shadow",n&&"no-min-height",r,o&&"toolbar-sidebar-background"),onClick:l,children:e});function nS(t,e,n,r,o){return $l(async()=>{var v,S,k,_;const l=t==null?void 0:t[e],c=l!=null&&l.file?l:o;if(!c)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const u=c.file;let d=n.get(u);d||(d={errors:((v=o==null?void 0:o.source)==null?void 0:v.errors)||[],content:(S=o==null?void 0:o.source)==null?void 0:S.content},n.set(u,d));const p=(c==null?void 0:c.line)||((k=d.errors[0])==null?void 0:k.line)||0,g=r&&u.startsWith(r)?u.substring(r.length+1):u,y=d.errors.map(E=>({type:"error",line:E.line,message:E.message}));if(y.push({line:p,type:"running"}),((_=o==null?void 0:o.source)==null?void 0:_.content)!==void 0)d.content=o.source.content;else if(d.content===void 0||c===o){const E=await pg(u);try{let C=await fetch(`sha1/src@${E}.txt`);C.status===404&&(C=await fetch(`file?path=${encodeURIComponent(u)}`)),C.status>=400?d.content=`<Unable to read "${u}">`:d.content=await C.text()}catch{d.content=`<Unable to read "${u}">`}}return{source:d,highlight:y,targetLine:p,fileName:g,location:c}},[t,e,r,o],{source:{errors:[],content:"Loading…"},highlight:[]})}const rS=({stack:t,sources:e,rootDir:n,fallbackLocation:r,stackFrameLocation:o,onOpenExternally:l})=>{const[c,u]=$.useState(),[d,p]=$.useState(0);$.useEffect(()=>{c!==t&&(u(t),p(0))},[t,c,u,p]);const{source:g,highlight:y,targetLine:v,fileName:S,location:k}=nS(t,d,e,n,r),_=$.useCallback(()=>{k&&(l?l(k):window.location.href=`vscode://file//${k.file}:${k.line}`)},[l,k]),E=((t==null?void 0:t.length)??0)>1,C=sS(S);return w.jsx(Dl,{sidebarSize:200,orientation:o==="bottom"?"vertical":"horizontal",sidebarHidden:!E,main:w.jsxs("div",{className:"vbox","data-testid":"source-code",children:[S&&w.jsxs(tf,{children:[w.jsx("div",{className:"source-tab-file-name",title:S,children:w.jsx("div",{children:C})}),w.jsx(ef,{description:"Copy filename",value:C}),k&&w.jsx(qt,{icon:"link-external",title:"Open in VS Code",onClick:_})]}),w.jsx(Cs,{text:g.content||"",language:"javascript",highlight:y,revealLine:v,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:w.jsx(tS,{stack:t,selectedFrame:d,setSelectedFrame:p})})};async function pg(t){const e=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-1",e),r=[],o=new DataView(n);for(let l=0;l<o.byteLength;l+=1){const c=o.getUint8(l).toString(16).padStart(2,"0");r.push(c)}return r.join("")}function sS(t){if(!t)return"";const e=t!=null&&t.includes("/")?"/":"\\";return(t==null?void 0:t.split(e).pop())??""}const iS=({prompt:t})=>w.jsx(Nl,{value:t,description:"Copy prompt",copiedDescription:w.jsxs(w.Fragment,{children:["Copied ",w.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function oS(t){return $.useMemo(()=>{if(!t)return{errors:new Map};const e=new Map;for(const n of t.errorDescriptors)e.set(n.message,n);return{errors:e}},[t])}function lS({message:t,error:e,sdkLanguage:n,revealInSource:r}){var u;let o,l;const c=(u=e.stack)==null?void 0:u[0];return c&&(o=c.file.replace(/.*[/\\](.*)/,"$1")+":"+c.line,l=c.file+":"+c.line),w.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[w.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&Zu(e.action,{sdkLanguage:n}),o&&w.jsxs("div",{className:"action-location",children:["@ ",w.jsx("span",{title:l,onClick:()=>r(e),children:o})]})]}),w.jsx(M1,{error:t})]})}const aS=({errorsModel:t,model:e,sdkLanguage:n,revealInSource:r,wallTime:o,testRunMetadata:l})=>{const c=$l(async()=>{const p=e==null?void 0:e.attachments.find(g=>g.name==="error-context");if(p)return await fetch(ra(p)).then(g=>g.text())},[e],void 0),u=$.useCallback(async p=>{var S;const g=(S=p.stack)==null?void 0:S[0];if(!g)return;let y=await fetch(`sha1/src@${await pg(g.file)}.txt`);if(y.status===404&&(y=await fetch(`file?path=${encodeURIComponent(g.file)}`)),y.status>=400)return;const v=await y.text();return cS({source:v,message:hg(p.message).split(`
60
- `)[0]||void 0,location:g,linesAbove:100,linesBelow:100})},[]),d=$l(()=>Y1({testInfo:(e==null?void 0:e.title)??"",metadata:l,errorContext:c,errors:(e==null?void 0:e.errorDescriptors)??[],buildCodeFrame:u}),[c,l,e,u],void 0);return t.errors.size?w.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[w.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:d&&w.jsx(iS,{prompt:d})}),[...t.errors.entries()].map(([p,g])=>{const y=`error-${o}-${p}`;return w.jsx(lS,{message:p,error:g,revealInSource:r,sdkLanguage:n},y)})]}):w.jsx(Ir,{text:"No errors"})};function cS({source:t,message:e,location:n,linesAbove:r,linesBelow:o}){const l=t.split(`
61
- `).slice(),c=Math.max(0,n.line-r-1),u=Math.min(l.length,n.line+o),d=l.slice(c,u),p=String(u).length,g=d.map((y,v)=>`${c+v+1===n.line?"> ":" "}${(c+v+1).toString().padEnd(p," ")} | ${y}`);return e&&g.splice(n.line-c,0,`${" ".repeat(p+2)} | ${" ".repeat(n.column-2)} ^ ${e}`),g.join(`
62
- `)}const uS=na;function fS(t,e){const{entries:n}=$.useMemo(()=>{if(!t)return{entries:[]};const o=[];function l(u){var g,y,v,S,k,_;const d=o[o.length-1];d&&((g=u.browserMessage)==null?void 0:g.bodyString)===((y=d.browserMessage)==null?void 0:y.bodyString)&&((v=u.browserMessage)==null?void 0:v.location)===((S=d.browserMessage)==null?void 0:S.location)&&u.browserError===d.browserError&&((k=u.nodeMessage)==null?void 0:k.html)===((_=d.nodeMessage)==null?void 0:_.html)&&u.isError===d.isError&&u.isWarning===d.isWarning&&u.timestamp-d.timestamp<1e3?d.repeat++:o.push({...u,repeat:1})}const c=[...t.events,...t.stdio].sort((u,d)=>{const p="time"in u?u.time:u.timestamp,g="time"in d?d.time:d.timestamp;return p-g});for(const u of c){if(u.type==="console"){const d=u.args&&u.args.length?hS(u.args):mg(u.text),p=u.location.url,y=`${p?p.substring(p.lastIndexOf("/")+1):"<anonymous>"}:${u.location.lineNumber}`;l({browserMessage:{body:d,bodyString:u.text,location:y},isError:u.messageType==="error",isWarning:u.messageType==="warning",timestamp:u.time})}if(u.type==="event"&&u.method==="pageError"&&l({browserError:u.params.error,isError:!0,isWarning:!1,timestamp:u.time}),u.type==="stderr"||u.type==="stdout"){let d="";u.text&&(d=qi(u.text.trim())||""),u.base64&&(d=qi(atob(u.base64).trim())||""),l({nodeMessage:{html:d},isError:u.type==="stderr",isWarning:!1,timestamp:u.timestamp})}}return{entries:o}},[t]);return{entries:$.useMemo(()=>e?n.filter(o=>o.timestamp>=e.minimum&&o.timestamp<=e.maximum):n,[n,e])}}const dS=({consoleModel:t,boundaries:e,onEntryHovered:n,onAccepted:r})=>t.entries.length?w.jsx("div",{className:"console-tab",children:w.jsx(uS,{name:"console",onAccepted:r,onHighlighted:n,items:t.entries,isError:o=>o.isError,isWarning:o=>o.isWarning,render:o=>{const l=pt(o.timestamp-e.minimum),c=w.jsx("span",{className:"console-time",children:l}),u=o.isError?"status-error":o.isWarning?"status-warning":"status-none",d=o.browserMessage||o.browserError?w.jsx("span",{className:Be("codicon","codicon-browser",u),title:"Browser message"}):w.jsx("span",{className:Be("codicon","codicon-file",u),title:"Runner message"});let p,g,y,v;const{browserMessage:S,browserError:k,nodeMessage:_}=o;if(S&&(p=S.location,g=S.body),k){const{error:E,value:C}=k;E?(g=E.message,v=E.stack):g=String(C)}return _&&(y=_.html),w.jsxs("div",{className:"console-line",children:[c,d,p&&w.jsx("span",{className:"console-location",children:p}),o.repeat>1&&w.jsx("span",{className:"console-repeat",children:o.repeat}),g&&w.jsx("span",{className:"console-line-message",children:g}),y&&w.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),v&&w.jsx("div",{className:"console-stack",children:v})]})}})}):w.jsx(Ir,{text:"No console entries"});function hS(t){if(t.length===1)return mg(t[0].preview);const e=typeof t[0].value=="string"&&t[0].value.includes("%"),n=e?t[0].value:"",r=e?t.slice(1):t;let o=0;const l=/%([%sdifoOc])/g;let c;const u=[];let d=[];u.push(w.jsx("span",{children:d},u.length+1));let p=0;for(;(c=l.exec(n))!==null;){const g=n.substring(p,c.index);d.push(w.jsx("span",{children:g},d.length+1)),p=c.index+2;const y=c[0][1];if(y==="%")d.push(w.jsx("span",{children:"%"},d.length+1));else if(y==="s"||y==="o"||y==="O"||y==="d"||y==="i"||y==="f"){const v=r[o++],S={};typeof(v==null?void 0:v.value)!="string"&&(S.color="var(--vscode-debugTokenExpression-number)"),d.push(w.jsx("span",{style:S,children:(v==null?void 0:v.preview)||""},d.length+1))}else if(y==="c"){d=[];const v=r[o++],S=v?pS(v.preview):{};u.push(w.jsx("span",{style:S,children:d},u.length+1))}}for(p<n.length&&d.push(w.jsx("span",{children:n.substring(p)},d.length+1));o<r.length;o++){const g=r[o],y={};d.length&&d.push(w.jsx("span",{children:" "},d.length+1)),typeof(g==null?void 0:g.value)!="string"&&(y.color="var(--vscode-debugTokenExpression-number)"),d.push(w.jsx("span",{style:y,children:(g==null?void 0:g.preview)||""},d.length+1))}return u}function mg(t){return[w.jsx("span",{dangerouslySetInnerHTML:{__html:qi(t.trim())}})]}function pS(t){try{const e={},n=t.split(";");for(const r of n){const o=r.trim();if(!o)continue;let[l,c]=o.split(":");if(l=l.trim(),c=c.trim(),!mS(l))continue;const u=l.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[u]=c}return e}catch{return{}}}function mS(t){return["background","border","color","font","line","margin","padding","text"].some(n=>t.startsWith(n))}const Ou=({tabs:t,selectedTab:e,setSelectedTab:n,leftToolbar:r,rightToolbar:o,dataTestId:l,mode:c})=>{const u=$.useId();return e||(e=t[0].id),c||(c="default"),w.jsx("div",{className:"tabbed-pane","data-testid":l,children:w.jsxs("div",{className:"vbox",children:[w.jsxs(tf,{children:[r&&w.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),c==="default"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...t.map(d=>w.jsx(gg,{id:d.id,ariaControls:`${u}-${d.id}`,title:d.title,count:d.count,errorCount:d.errorCount,selected:e===d.id,onSelect:n},d.id))]}),c==="select"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:w.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:e,onChange:d=>{n==null||n(t[d.currentTarget.selectedIndex].id)},children:t.map(d=>{let p="";return d.count&&(p=` (${d.count})`),d.errorCount&&(p=` (${d.errorCount})`),w.jsxs("option",{value:d.id,role:"tab","aria-controls":`${u}-${d.id}`,children:[d.title,p]},d.id)})})}),o&&w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...o]})]}),t.map(d=>{const p="tab-content tab-"+d.id;if(d.component)return w.jsx("div",{id:`${u}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,style:{display:e===d.id?"inherit":"none"},children:d.component},d.id);if(e===d.id)return w.jsx("div",{id:`${u}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,children:d.render()},d.id)})]})})},gg=({id:t,title:e,count:n,errorCount:r,selected:o,onSelect:l,ariaControls:c})=>w.jsxs("div",{className:Be("tabbed-pane-tab",o&&"selected"),onClick:()=>l==null?void 0:l(t),role:"tab",title:e,"aria-controls":c,children:[w.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!n&&w.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&w.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]});async function gS(t){const e=navigator.platform.includes("Win")?"win":"unix";let n=[];const r=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function o(y){const v='^"';return v+y.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^
63
-
64
- `)+v}function l(y){function v(S){let _=S.charCodeAt(0).toString(16);for(;_.length<4;)_="0"+_;return"\\u"+_}return/[\0-\x1F\x7F-\x9F!]|\'/.test(y)?"$'"+y.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,v)+"'":"'"+y+"'"}const c=e==="win"?o:l;n.push(c(t.request.url).replace(/[[{}\]]/g,"\\$&"));let u="GET";const d=[],p=await yg(t);p&&(d.push("--data-raw "+c(p)),r.add("content-length"),u="POST"),t.request.method!==u&&n.push("-X "+c(t.request.method));const g=t.request.headers;for(let y=0;y<g.length;y++){const v=g[y],S=v.name.replace(/^:/,"");r.has(S.toLowerCase())||(v.value.trim()?n.push("-H "+c(S+": "+v.value)):n.push("-H "+c(S+";")))}return n=n.concat(d),"curl "+n.join(n.length>=3?e==="win"?` ^
65
- `:` \\
66
- `:" ")}async function yS(t,e=0){const n=new Set(["method","path","scheme","version","accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via","user-agent"]),r=new Set(["cookie","authorization"]),o=JSON.stringify(t.request.url),l=t.request.headers,c=l.reduce((k,_)=>{const E=_.name;return!n.has(E.toLowerCase())&&!E.includes(":")&&k.append(E,_.value),k},new Headers),u={};for(const k of c)u[k[0]]=k[1];const d=t.request.cookies.length||l.some(({name:k})=>r.has(k.toLowerCase()))?"include":"omit",p=l.find(({name:k})=>k.toLowerCase()==="referer"),g=p?p.value:void 0,y=await yg(t),v={headers:Object.keys(u).length?u:void 0,referrer:g,body:y,method:t.request.method,mode:"cors"};if(e===1){const k=l.find(E=>E.name.toLowerCase()==="cookie"),_={};delete v.mode,k&&(_.cookie=k.value),g&&(delete v.referrer,_.Referer=g),Object.keys(_).length&&(v.headers={...u,..._})}else v.credentials=d;const S=JSON.stringify(v,null,2);return`fetch(${o}, ${S});`}async function yg(t){var e,n;return(e=t.request.postData)!=null&&e._sha1?await fetch(`sha1/${t.request.postData._sha1}`).then(r=>r.text()):(n=t.request.postData)==null?void 0:n.text}class vS{generatePlaywrightRequestCall(e,n){let r=e.method.toLowerCase();const o=new URL(e.url),l=`${o.origin}${o.pathname}`,c={};["delete","get","head","post","put","patch"].includes(r)||(c.method=r,r="fetch"),o.searchParams.size&&(c.params=Object.fromEntries(o.searchParams.entries())),n&&(c.data=n),e.headers.length&&(c.headers=Object.fromEntries(e.headers.map(p=>[p.name,p.value])));const u=[`'${l}'`];return Object.keys(c).length>0&&u.push(this.prettyPrintObject(c)),`await page.request.${r}(${u.join(", ")});`}prettyPrintObject(e,n=2,r=0){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const u=" ".repeat(r*n),d=" ".repeat((r+1)*n);return`[
67
- ${e.map(g=>`${d}${this.prettyPrintObject(g,n,r+1)}`).join(`,
68
- `)}
69
- ${u}]`}if(Object.keys(e).length===0)return"{}";const o=" ".repeat(r*n),l=" ".repeat((r+1)*n);return`{
70
- ${Object.entries(e).map(([u,d])=>{const p=this.prettyPrintObject(d,n,r+1),g=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(u)?u:this.stringLiteral(u);return`${l}${g}: ${p}`}).join(`,
71
- `)}
72
- ${o}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
73
- `)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class wS{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),l=[`"${`${r.origin}${r.pathname}`}"`];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(l.push(`method="${c}"`),c="fetch"),r.searchParams.size&&l.push(`params=${this.prettyPrintObject(Object.fromEntries(r.searchParams.entries()))}`),n&&l.push(`data=${this.prettyPrintObject(n)}`),e.headers.length&&l.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(d=>[d.name,d.value])))}`);const u=l.length===1?l[0]:`
74
- ${l.map(d=>this.indent(d,2)).join(`,
75
- `)}
76
- `;return`await page.request.${c}(${u})`}indent(e,n){return e.split(`
77
- `).map(r=>" ".repeat(n)+r).join(`
78
- `)}prettyPrintObject(e,n=2,r=0){if(e===null||e===void 0)return"None";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"True":"False":String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const u=" ".repeat(r*n),d=" ".repeat((r+1)*n);return`[
79
- ${e.map(g=>`${d}${this.prettyPrintObject(g,n,r+1)}`).join(`,
80
- `)}
81
- ${u}]`}if(Object.keys(e).length===0)return"{}";const o=" ".repeat(r*n),l=" ".repeat((r+1)*n);return`{
82
- ${Object.entries(e).map(([u,d])=>{const p=this.prettyPrintObject(d,n,r+1);return`${l}${this.stringLiteral(u)}: ${p}`}).join(`,
83
- `)}
84
- ${o}}`}stringLiteral(e){return JSON.stringify(e)}}class SS{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),o=`${r.origin}${r.pathname}`,l={},c=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(l.Method=u,u="fetch"),r.searchParams.size&&(l.Params=Object.fromEntries(r.searchParams.entries())),n&&(l.Data=n),e.headers.length&&(l.Headers=Object.fromEntries(e.headers.map(g=>[g.name,g.value])));const d=[`"${o}"`];return Object.keys(l).length>0&&d.push(this.prettyPrintObject(l)),`${c.join(`
85
- `)}${c.length?`
86
- `:""}await request.${this.toFunctionName(u)}(${d.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,n=2,r=0){if(e===null||e===void 0)return"null";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"true":"false":String(e);if(Array.isArray(e)){if(e.length===0)return"new object[] {}";const u=" ".repeat(r*n),d=" ".repeat((r+1)*n);return`new object[] {
87
- ${e.map(g=>`${d}${this.prettyPrintObject(g,n,r+1)}`).join(`,
88
- `)}
89
- ${u}}`}if(Object.keys(e).length===0)return"new {}";const o=" ".repeat(r*n),l=" ".repeat((r+1)*n);return`new() {
90
- ${Object.entries(e).map(([u,d])=>{const p=this.prettyPrintObject(d,n,r+1),g=r===0?u:`[${this.stringLiteral(u)}]`;return`${l}${g} = ${p}`}).join(`,
91
- `)}
92
- ${o}}`}stringLiteral(e){return JSON.stringify(e)}}class xS{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),o=[`"${r.origin}${r.pathname}"`],l=[];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(l.push(`setMethod("${c}")`),c="fetch");for(const[u,d]of r.searchParams)l.push(`setQueryParam(${this.stringLiteral(u)}, ${this.stringLiteral(d)})`);n&&l.push(`setData(${this.stringLiteral(n)})`);for(const u of e.headers)l.push(`setHeader(${this.stringLiteral(u.name)}, ${this.stringLiteral(u.value)})`);return l.length>0&&o.push(`RequestOptions.create()
93
- .${l.join(`
94
- .`)}
95
- `),`request.${c}(${o.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function _S(t){if(t==="javascript")return new vS;if(t==="python")return new wS;if(t==="csharp")return new SS;if(t==="java")return new xS;throw new Error("Unsupported language: "+t)}const ES=({resource:t,sdkLanguage:e,startTimeOffset:n,onClose:r})=>{const[o,l]=$.useState("request"),c=$l(async()=>{if(t.request.postData){const u=t.request.headers.find(p=>p.name.toLowerCase()==="content-type"),d=u?u.value:"";if(t.request.postData._sha1){const p=await fetch(`sha1/${t.request.postData._sha1}`);return{text:$u(await p.text(),d),mimeType:d}}else return{text:$u(t.request.postData.text,d),mimeType:d}}else return null},[t],null);return w.jsx(Ou,{dataTestId:"network-request-details",leftToolbar:[w.jsx(qt,{icon:"close",title:"Close",onClick:r},"close")],rightToolbar:[w.jsx(kS,{requestBody:c,resource:t,sdkLanguage:e},"dropdown")],tabs:[{id:"request",title:"Request",render:()=>w.jsx(bS,{resource:t,startTimeOffset:n,requestBody:c})},{id:"response",title:"Response",render:()=>w.jsx(TS,{resource:t})},{id:"body",title:"Body",render:()=>w.jsx(CS,{resource:t})}],selectedTab:o,setSelectedTab:l})},kS=({resource:t,sdkLanguage:e,requestBody:n})=>{const r=w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>_S(e).generatePlaywrightRequestCall(t.request,n==null?void 0:n.text);return w.jsxs("div",{className:"copy-request-dropdown",children:[w.jsxs(qt,{className:"copy-request-dropdown-toggle",children:[w.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",w.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),w.jsxs("div",{className:"copy-request-dropdown-menu",children:[w.jsx(Nl,{description:"Copy as cURL",copiedDescription:r,value:()=>gS(t)}),w.jsx(Nl,{description:"Copy as Fetch",copiedDescription:r,value:()=>yS(t)}),w.jsx(Nl,{description:"Copy as Playwright",copiedDescription:r,value:o})]})]})},bS=({resource:t,startTimeOffset:e,requestBody:n})=>w.jsxs("div",{className:"network-request-details-tab",children:[w.jsx("div",{className:"network-request-details-header",children:"General"}),w.jsx("div",{className:"network-request-details-url",children:`URL: ${t.request.url}`}),w.jsx("div",{className:"network-request-details-general",children:`Method: ${t.request.method}`}),t.response.status!==-1&&w.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",w.jsx("span",{className:AS(t.response.status),style:{display:"inline-flex"},children:`${t.response.status} ${t.response.statusText}`})]}),t.request.queryString.length?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),w.jsx("div",{className:"network-request-details-headers",children:t.request.queryString.map(r=>`${r.name}: ${r.value}`).join(`
96
- `)})]}):null,w.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),w.jsx("div",{className:"network-request-details-headers",children:t.request.headers.map(r=>`${r.name}: ${r.value}`).join(`
97
- `)}),w.jsx("div",{className:"network-request-details-header",children:"Time"}),w.jsx("div",{className:"network-request-details-general",children:`Start: ${pt(e)}`}),w.jsx("div",{className:"network-request-details-general",children:`Duration: ${pt(t.time)}`}),n&&w.jsx("div",{className:"network-request-details-header",children:"Request Body"}),n&&w.jsx(Cs,{text:n.text,mimeType:n.mimeType,readOnly:!0,lineNumbers:!0})]}),TS=({resource:t})=>w.jsxs("div",{className:"network-request-details-tab",children:[w.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),w.jsx("div",{className:"network-request-details-headers",children:t.response.headers.map(e=>`${e.name}: ${e.value}`).join(`
98
- `)})]}),CS=({resource:t})=>{const[e,n]=$.useState(null);return $.useEffect(()=>{(async()=>{if(t.response.content._sha1){const o=t.response.content.mimeType.includes("image"),l=t.response.content.mimeType.includes("font"),c=await fetch(`sha1/${t.response.content._sha1}`);if(o){const u=await c.blob(),d=new FileReader,p=new Promise(g=>d.onload=g);d.readAsDataURL(u),n({dataUrl:(await p).target.result})}else if(l){const u=await c.arrayBuffer();n({font:u})}else{const u=$u(await c.text(),t.response.content.mimeType);n({text:u,mimeType:t.response.content.mimeType})}}else n(null)})()},[t]),w.jsxs("div",{className:"network-request-details-tab",children:[!t.response.content._sha1&&w.jsx("div",{children:"Response body is not available for this request."}),e&&e.font&&w.jsx(NS,{font:e.font}),e&&e.dataUrl&&w.jsx("img",{draggable:"false",src:e.dataUrl}),e&&e.text&&w.jsx(Cs,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})]})},NS=({font:t})=>{const[e,n]=$.useState(!1);return $.useEffect(()=>{let r;try{r=new FontFace("font-preview",t),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&n(!0)}catch{n(!0)}return()=>{document.fonts.delete(r)}},[t]),e?w.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):w.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",w.jsx("br",{}),"NOPQRSTUVWXYZ",w.jsx("br",{}),"abcdefghijklm",w.jsx("br",{}),"nopqrstuvwxyz",w.jsx("br",{}),"1234567890"]})};function AS(t){return t<300||t===304?"green-circle":t<400?"yellow-circle":"red-circle"}function $u(t,e){if(t===null)return"Loading...";const n=t;if(n==="")return"<Empty>";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(n),null,2)}catch{return n}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(n):n}function IS(t){const[e,n]=$.useState([]);$.useEffect(()=>{const l=[];for(let c=0;c<t.columns.length-1;++c){const u=t.columns[c];l[c]=(l[c-1]||0)+t.columnWidths.get(u)}n(l)},[t.columns,t.columnWidths]);function r(l){const c=new Map(t.columnWidths.entries());for(let u=0;u<l.length;++u){const d=l[u]-(l[u-1]||0),p=t.columns[u];c.set(p,d)}t.setColumnWidths(c)}const o=$.useCallback(l=>{var c,u;(u=t.setSorting)==null||u.call(t,{by:l,negate:((c=t.sorting)==null?void 0:c.by)===l?!t.sorting.negate:!1})},[t]);return w.jsxs("div",{className:`grid-view ${t.name}-grid-view`,children:[w.jsx(fg,{orientation:"horizontal",offsets:e,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),w.jsxs("div",{className:"vbox",children:[w.jsx("div",{className:"grid-view-header",children:t.columns.map((l,c)=>w.jsxs("div",{className:"grid-view-header-cell "+LS(l,t.sorting),style:{width:c<t.columns.length-1?t.columnWidths.get(l):void 0},onClick:()=>t.setSorting&&o(l),children:[w.jsx("span",{className:"grid-view-header-cell-title",children:t.columnTitle(l)}),w.jsx("span",{className:"codicon codicon-triangle-up"}),w.jsx("span",{className:"codicon codicon-triangle-down"})]},t.columnTitle(l)))}),w.jsx(na,{name:t.name,items:t.items,ariaLabel:t.ariaLabel,id:t.id,render:(l,c)=>w.jsx(w.Fragment,{children:t.columns.map((u,d)=>{const{body:p,title:g}=t.render(l,u,c);return w.jsx("div",{className:`grid-view-cell grid-view-column-${String(u)}`,title:g,style:{width:d<t.columns.length-1?t.columnWidths.get(u):void 0},children:p},t.columnTitle(u))})}),icon:t.icon,isError:t.isError,isWarning:t.isWarning,isInfo:t.isInfo,selectedItem:t.selectedItem,onAccepted:t.onAccepted,onSelected:t.onSelected,onHighlighted:t.onHighlighted,onIconClicked:t.onIconClicked,noItemsMessage:t.noItemsMessage,dataTestId:t.dataTestId,notSelectable:t.notSelectable})]})]})}function LS(t,e){return t===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const MS=["All","Fetch","HTML","JS","CSS","Font","Image"],jS={searchValue:"",resourceType:"All"},PS=({filterState:t,onFilterStateChange:e})=>w.jsxs("div",{className:"network-filters",children:[w.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:t.searchValue,onChange:n=>e({...t,searchValue:n.target.value})}),w.jsx("div",{className:"network-filters-resource-types",children:MS.map(n=>w.jsx("div",{title:n,onClick:()=>e({...t,resourceType:n}),className:`network-filters-resource-type ${t.resourceType===n?"selected":""}`,children:n},n))})]}),OS=IS;function $S(t,e){const n=$.useMemo(()=>((t==null?void 0:t.resources)||[]).filter(c=>e?!!c._monotonicTime&&c._monotonicTime>=e.minimum&&c._monotonicTime<=e.maximum:!0),[t,e]),r=$.useMemo(()=>new HS(t),[t]);return{resources:n,contextIdMap:r}}const RS=({boundaries:t,networkModel:e,onEntryHovered:n,sdkLanguage:r})=>{const[o,l]=$.useState(void 0),[c,u]=$.useState(void 0),[d,p]=$.useState(jS),{renderedEntries:g}=$.useMemo(()=>{const _=e.resources.map(E=>US(E,t,e.contextIdMap)).filter(GS(d));return o&&VS(_,o),{renderedEntries:_}},[e.resources,e.contextIdMap,d,o,t]),[y,v]=$.useState(()=>new Map(vg().map(_=>[_,FS(_)]))),S=$.useCallback(_=>{p(_),u(void 0)},[]);if(!e.resources.length)return w.jsx(Ir,{text:"No network calls"});const k=w.jsx(OS,{name:"network",ariaLabel:"Network requests",items:g,selectedItem:c,onSelected:_=>u(_),onHighlighted:_=>n==null?void 0:n(_==null?void 0:_.resource),columns:BS(!!c,g),columnTitle:DS,columnWidths:y,setColumnWidths:v,isError:_=>_.status.code>=400||_.status.code===-1,isInfo:_=>!!_.route,render:(_,E)=>zS(_,E),sorting:o,setSorting:l});return w.jsxs(w.Fragment,{children:[w.jsx(PS,{filterState:d,onFilterStateChange:S}),!c&&k,c&&w.jsx(Dl,{sidebarSize:y.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:w.jsx(ES,{resource:c.resource,sdkLanguage:r,startTimeOffset:c.start,onClose:()=>u(void 0)}),sidebar:k})]})},DS=t=>t==="contextId"?"Source":t==="name"?"Name":t==="method"?"Method":t==="status"?"Status":t==="contentType"?"Content Type":t==="duration"?"Duration":t==="size"?"Size":t==="start"?"Start":t==="route"?"Route":"",FS=t=>t==="name"?200:t==="method"||t==="status"?60:t==="contentType"?200:t==="contextId"?60:100;function BS(t,e){if(t){const r=["name"];return Xp(e)&&r.unshift("contextId"),r}let n=vg();return Xp(e)||(n=n.filter(r=>r!=="contextId")),n}function vg(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const zS=(t,e)=>e==="contextId"?{body:t.contextId,title:t.name.url}:e==="name"?{body:t.name.name,title:t.name.url}:e==="method"?{body:t.method}:e==="status"?{body:t.status.code>0?t.status.code:"",title:t.status.text}:e==="contentType"?{body:t.contentType}:e==="duration"?{body:pt(t.duration)}:e==="size"?{body:S0(t.size)}:e==="start"?{body:pt(t.start)}:e==="route"?{body:t.route}:{body:""};class HS{constructor(e){Ee(this,"_pagerefToShortId",new Map);Ee(this,"_contextToId",new Map);Ee(this,"_lastPageId",0);Ee(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let n=this._pagerefToShortId.get(e);return n||(++this._lastPageId,n="page#"+this._lastPageId,this._pagerefToShortId.set(e,n)),n}_apiRequestContextId(e){const n=Rl(e);if(!n)return"";let r=this._contextToId.get(n);return r||(++this._lastApiRequestContextId,r="api#"+this._lastApiRequestContextId,this._contextToId.set(n,r)),r}}function Xp(t){const e=new Set;for(const n of t)if(e.add(n.contextId),e.size>1)return!0;return!1}const US=(t,e,n)=>{const r=qS(t);let o;try{const u=new URL(t.request.url);o=u.pathname.substring(u.pathname.lastIndexOf("/")+1),o||(o=u.host),u.search&&(o+=u.search)}catch{o=t.request.url}let l=t.response.content.mimeType;const c=l.match(/^(.*);\s*charset=.*$/);return c&&(l=c[1]),{name:{name:o,url:t.request.url},method:t.request.method,status:{code:t.response.status,text:t.response.statusText},contentType:l,duration:t.time,size:t.response._transferSize>0?t.response._transferSize:t.response.bodySize,start:t._monotonicTime-e.minimum,route:r,resource:t,contextId:n.contextId(t)}};function qS(t){return t._wasAborted?"aborted":t._wasContinued?"continued":t._wasFulfilled?"fulfilled":t._apiRequest?"api":""}function VS(t,e){const n=WS(e==null?void 0:e.by);n&&t.sort(n),e.negate&&t.reverse()}function WS(t){if(t==="start")return(e,n)=>e.start-n.start;if(t==="duration")return(e,n)=>e.duration-n.duration;if(t==="status")return(e,n)=>e.status.code-n.status.code;if(t==="method")return(e,n)=>{const r=e.method,o=n.method;return r.localeCompare(o)};if(t==="size")return(e,n)=>e.size-n.size;if(t==="contentType")return(e,n)=>e.contentType.localeCompare(n.contentType);if(t==="name")return(e,n)=>e.name.name.localeCompare(n.name.name);if(t==="route")return(e,n)=>e.route.localeCompare(n.route);if(t==="contextId")return(e,n)=>e.contextId.localeCompare(n.contextId)}const KS={All:()=>!0,Fetch:t=>t==="application/json",HTML:t=>t==="text/html",CSS:t=>t==="text/css",JS:t=>t.includes("javascript"),Font:t=>t.includes("font"),Image:t=>t.includes("image")};function GS({searchValue:t,resourceType:e}){return n=>{const r=KS[e];return r(n.contentType)&&n.name.url.toLowerCase().includes(t.toLowerCase())}}function nf(t,e,n={}){var v;const r=new t.LineCounter,o={keepSourceTokens:!0,lineCounter:r,...n},l=t.parseDocument(e,o),c=[],u=S=>[r.linePos(S[0]),r.linePos(S[1])],d=S=>{c.push({message:S.message,range:[r.linePos(S.pos[0]),r.linePos(S.pos[1])]})},p=(S,k)=>{for(const _ of k.items){if(_ instanceof t.Scalar&&typeof _.value=="string"){const A=Ul.parse(_,o,c);A&&(S.children=S.children||[],S.children.push(A));continue}if(_ instanceof t.YAMLMap){g(S,_);continue}c.push({message:"Sequence items should be strings or maps",range:u(_.range||k.range)})}},g=(S,k)=>{for(const _ of k.items){if(S.children=S.children||[],!(_.key instanceof t.Scalar&&typeof _.key.value=="string")){c.push({message:"Only string keys are supported",range:u(_.key.range||k.range)});continue}const C=_.key,A=_.value;if(C.value==="text"){if(!(A instanceof t.Scalar&&typeof A.value=="string")){c.push({message:"Text value should be a string",range:u(_.value.range||k.range)});continue}S.children.push({kind:"text",text:mu(A.value)});continue}if(C.value==="/children"){if(!(A instanceof t.Scalar&&typeof A.value=="string")||A.value!=="contain"&&A.value!=="equal"&&A.value!=="deep-equal"){c.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:u(_.value.range||k.range)});continue}S.containerMode=A.value;continue}if(C.value.startsWith("/")){if(!(A instanceof t.Scalar&&typeof A.value=="string")){c.push({message:"Property value should be a string",range:u(_.value.range||k.range)});continue}S.props=S.props??{},S.props[C.value.slice(1)]=mu(A.value);continue}const B=Ul.parse(C,o,c);if(!B)continue;if(A instanceof t.Scalar){const z=typeof A.value;if(z!=="string"&&z!=="number"&&z!=="boolean"){c.push({message:"Node value should be a string or a sequence",range:u(_.value.range||k.range)});continue}S.children.push({...B,children:[{kind:"text",text:mu(String(A.value))}]});continue}if(A instanceof t.YAMLSeq){S.children.push(B),p(B,A);continue}c.push({message:"Map values should be strings or sequences",range:u(_.value.range||k.range)})}},y={kind:"role",role:"fragment"};return l.errors.forEach(d),c.length?{errors:c,fragment:y}:(l.contents instanceof t.YAMLSeq||c.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:l.contents?u(l.contents.range):[{line:0,col:0},{line:0,col:0}]}),c.length?{errors:c,fragment:y}:(p(y,l.contents),c.length?{errors:c,fragment:QS}:((v=y.children)==null?void 0:v.length)===1&&(!y.containerMode||y.containerMode==="contain")?{fragment:y.children[0],errors:[]}:{fragment:y,errors:[]}))}const QS={kind:"role",role:"fragment"};function wg(t){return t.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function mu(t){return t.startsWith("/")&&t.endsWith("/")&&t.length>1?{pattern:t.slice(1,-1)}:wg(t)}class Ul{static parse(e,n,r){try{return new Ul(e.value)._parse()}catch(o){if(o instanceof Yp){const l=n.prettyErrors===!1?o.message:o.message+`:
99
-
100
- `+e.value+`
101
- `+" ".repeat(o.pos)+`^
102
- `;return r.push({message:l,range:[n.lineCounter.linePos(e.range[0]),n.lineCounter.linePos(e.range[0]+o.pos)]}),null}throw o}}constructor(e){this._input=e,this._pos=0,this._length=e.length}_peek(){return this._input[this._pos]||""}_next(){return this._pos<this._length?this._input[this._pos++]:null}_eof(){return this._pos>=this._length}_isWhitespace(){return!this._eof()&&/\s/.test(this._peek())}_skipWhitespace(){for(;this._isWhitespace();)this._pos++}_readIdentifier(e){this._eof()&&this._throwError(`Unexpected end of input when expecting ${e}`);const n=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(n,this._pos)}_readString(){let e="",n=!1;for(;!this._eof();){const r=this._next();if(n)e+=r,n=!1;else if(r==="\\")n=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,n=0){throw new Yp(e,n||this._pos)}_readRegex(){let e="",n=!1,r=!1;for(;!this._eof();){const o=this._next();if(n)e+=o,n=!1;else if(o==="\\")n=!0,e+=o;else{if(o==="/"&&!r)return{pattern:e};o==="["?(r=!0,e+=o):o==="]"&&r?(e+=o,r=!1):e+=o}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),wg(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let n=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),n=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let o="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),n=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)o+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,r,o||"true",n)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const n=this._readStringOrRegex()||"",r={kind:"role",role:e,name:n};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,n,r,o){if(n==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',o),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',o),e.disabled=r==="true";return}if(n==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',o),e.expanded=r==="true";return}if(n==="active"){this._assert(r==="true"||r==="false",'Value of "active" attribute must be a boolean',o),e.active=r==="true";return}if(n==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',o),e.level=Number(r);return}if(n==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',o),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',o),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${n}]`,o)}_assert(e,n,r){e||this._throwError(n||"Assertion error",r)}}class Yp extends Error{constructor(e,n){super(e),this.pos=n}}let Sg={};function JS(t){Sg=t}function sa(t,e){for(;e;){if(t.contains(e))return!0;e=_g(e)}return!1}function lt(t){if(t.parentElement)return t.parentElement;if(t.parentNode&&t.parentNode.nodeType===11&&t.parentNode.host)return t.parentNode.host}function xg(t){let e=t;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function _g(t){for(;t.parentElement;)t=t.parentElement;return lt(t)}function Pi(t,e,n){for(;t;){const r=t.closest(e);if(n&&r!==n&&(r!=null&&r.contains(n)))return;if(r)return r;t=_g(t)}}function rr(t,e){return t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,e):void 0}function Eg(t,e){if(e=e??rr(t),!e)return!0;if(Element.prototype.checkVisibility&&Sg.browserNameForWorkarounds!=="webkit"){if(!t.checkVisibility())return!1}else{const n=t.closest("details,summary");if(n!==t&&(n==null?void 0:n.nodeName)==="DETAILS"&&!n.open)return!1}return e.visibility==="visible"}function ql(t){const e=rr(t);if(!e)return{visible:!0};if(e.display==="contents"){for(let r=t.firstChild;r;r=r.nextSibling){if(r.nodeType===1&&Cr(r))return{visible:!0,style:e};if(r.nodeType===3&&kg(r))return{visible:!0,style:e}}return{visible:!1,style:e}}if(!Eg(t,e))return{style:e,visible:!1};const n=t.getBoundingClientRect();return{rect:n,style:e,visible:n.width>0&&n.height>0}}function Cr(t){return ql(t).visible}function kg(t){const e=t.ownerDocument.createRange();e.selectNode(t);const n=e.getBoundingClientRect();return n.width>0&&n.height>0}function Xe(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function Zp(t){return t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")}const em="article:not([role]), aside:not([role]), main:not([role]), nav:not([role]), section:not([role]), [role=article], [role=complementary], [role=main], [role=navigation], [role=region]",XS=[["aria-atomic",void 0],["aria-busy",void 0],["aria-controls",void 0],["aria-current",void 0],["aria-describedby",void 0],["aria-details",void 0],["aria-dropeffect",void 0],["aria-flowto",void 0],["aria-grabbed",void 0],["aria-hidden",void 0],["aria-keyshortcuts",void 0],["aria-label",["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"]],["aria-labelledby",["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"]],["aria-live",void 0],["aria-owns",void 0],["aria-relevant",void 0],["aria-roledescription",["generic"]]];function bg(t,e){return XS.some(([n,r])=>!(r!=null&&r.includes(e||""))&&t.hasAttribute(n))}function Tg(t){return!Number.isNaN(Number(String(t.getAttribute("tabindex"))))}function YS(t){return!Dg(t)&&(ZS(t)||Tg(t))}function ZS(t){const e=Xe(t);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?t.hasAttribute("href"):e==="INPUT"?!t.hidden:!1}const gu={A:t=>t.hasAttribute("href")?"link":null,AREA:t=>t.hasAttribute("href")?"link":null,ARTICLE:()=>"article",ASIDE:()=>"complementary",BLOCKQUOTE:()=>"blockquote",BUTTON:()=>"button",CAPTION:()=>"caption",CODE:()=>"code",DATALIST:()=>"listbox",DD:()=>"definition",DEL:()=>"deletion",DETAILS:()=>"group",DFN:()=>"term",DIALOG:()=>"dialog",DT:()=>"term",EM:()=>"emphasis",FIELDSET:()=>"group",FIGURE:()=>"figure",FOOTER:t=>Pi(t,em)?null:"contentinfo",FORM:t=>Zp(t)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:t=>Pi(t,em)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:t=>t.getAttribute("alt")===""&&!t.getAttribute("title")&&!bg(t)&&!Tg(t)?"presentation":"img",INPUT:t=>{const e=t.type.toLowerCase();if(e==="search")return t.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const n=Ms(t,t.getAttribute("list"))[0];return n&&Xe(n)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":mx[e]||"textbox"},INS:()=>"insertion",LI:()=>"listitem",MAIN:()=>"main",MARK:()=>"mark",MATH:()=>"math",MENU:()=>"list",METER:()=>"meter",NAV:()=>"navigation",OL:()=>"list",OPTGROUP:()=>"group",OPTION:()=>"option",OUTPUT:()=>"status",P:()=>"paragraph",PROGRESS:()=>"progressbar",SEARCH:()=>"search",SECTION:t=>Zp(t)?"region":null,SELECT:t=>t.hasAttribute("multiple")||t.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:t=>{const e=Pi(t,"table"),n=e?Vl(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:t=>{if(t.getAttribute("scope")==="col")return"columnheader";if(t.getAttribute("scope")==="row")return"rowheader";const e=Pi(t,"table"),n=e?Vl(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},ex={DD:["DL","DIV"],DIV:["DL"],DT:["DL","DIV"],LI:["OL","UL"],TBODY:["TABLE"],TD:["TR"],TFOOT:["TABLE"],TH:["TR"],THEAD:["TABLE"],TR:["THEAD","TBODY","TFOOT","TABLE"]};function tm(t){var r;const e=((r=gu[Xe(t)])==null?void 0:r.call(gu,t))||"";if(!e)return null;let n=t;for(;n;){const o=lt(n),l=ex[Xe(n)];if(!l||!o||!l.includes(Xe(o)))break;const c=Vl(o);if((c==="none"||c==="presentation")&&!Cg(o,c))return c;n=o}return e}const tx=["alert","alertdialog","application","article","banner","blockquote","button","caption","cell","checkbox","code","columnheader","combobox","complementary","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","grid","gridcell","group","heading","img","insertion","link","list","listbox","listitem","log","main","mark","marquee","math","meter","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","paragraph","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","strong","subscript","superscript","switch","tab","table","tablist","tabpanel","term","textbox","time","timer","toolbar","tooltip","tree","treegrid","treeitem"];function Vl(t){return(t.getAttribute("role")||"").split(" ").map(n=>n.trim()).find(n=>tx.includes(n))||null}function Cg(t,e){return bg(t,e)||YS(t)}function nt(t){const e=Vl(t);if(!e)return tm(t);if(e==="none"||e==="presentation"){const n=tm(t);if(Cg(t,n))return n}return e}function Ng(t){return t===null?void 0:t.toLowerCase()==="true"}function Ag(t){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Xe(t))}function zt(t){if(Ag(t))return!0;const e=rr(t),n=t.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!n){for(let o=t.firstChild;o;o=o.nextSibling)if(o.nodeType===1&&!zt(o)||o.nodeType===3&&kg(o))return!1;return!0}return!(t.nodeName==="OPTION"&&!!t.closest("select"))&&!n&&!Eg(t,e)?!0:Ig(t)}function Ig(t){let e=Yn==null?void 0:Yn.get(t);if(e===void 0){if(e=!1,t.parentElement&&t.parentElement.shadowRoot&&!t.assignedSlot&&(e=!0),!e){const n=rr(t);e=!n||n.display==="none"||Ng(t.getAttribute("aria-hidden"))===!0}if(!e){const n=lt(t);n&&(e=Ig(n))}Yn==null||Yn.set(t,e)}return e}function Ms(t,e){if(!e)return[];const n=xg(t);if(!n)return[];try{const r=e.split(" ").filter(l=>!!l),o=[];for(const l of r){const c=n.querySelector("#"+CSS.escape(l));c&&!o.includes(c)&&o.push(c)}return o}catch{return[]}}function kn(t){return t.trim()}function Fi(t){return t.split(" ").map(e=>e.replace(/\r\n/g,`
103
- `).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function nm(t,e){const n=[...t.querySelectorAll(e)];for(const r of Ms(t,t.getAttribute("aria-owns")))r.matches(e)&&n.push(r),n.push(...r.querySelectorAll(e));return n}function Bi(t,e){const n=e==="::before"?mf:e==="::after"?gf:pf;if(n!=null&&n.has(t))return n==null?void 0:n.get(t);const r=rr(t,e);let o;return r&&r.display!=="none"&&r.visibility!=="hidden"&&(o=nx(t,r.content,!!e)),e&&o!==void 0&&((r==null?void 0:r.display)||"inline")!=="inline"&&(o=" "+o+" "),n&&n.set(t,o),o}function nx(t,e,n){if(!(!e||e==="none"||e==="normal"))try{let r=Fm(e).filter(u=>!(u instanceof Fl));const o=r.findIndex(u=>u instanceof et&&u.value==="/");if(o!==-1)r=r.slice(o+1);else if(!n)return;const l=[];let c=0;for(;c<r.length;)if(r[c]instanceof Yu)l.push(r[c].value),c++;else if(c+2<r.length&&r[c]instanceof Di&&r[c].value==="attr"&&r[c+1]instanceof Xu&&r[c+2]instanceof Ju){const u=r[c+1].value;l.push(t.getAttribute(u)||""),c+=3}else return;return l.join("")}catch{}}function Lg(t){const e=t.getAttribute("aria-labelledby");if(e===null)return null;const n=Ms(t,e);return n.length?n:null}function rx(t,e){const n=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(t),r=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(t);return n||r}function Vi(t,e){const n=e?ff:uf;let r=n==null?void 0:n.get(t);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(nt(t)||"")||(r=Fi(en(t,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),n==null||n.set(t,r)),r}function rm(t,e){const n=e?hf:df;let r=n==null?void 0:n.get(t);if(r===void 0){if(r="",t.hasAttribute("aria-describedby")){const o=Ms(t,t.getAttribute("aria-describedby"));r=Fi(o.map(l=>en(l,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:l,hidden:zt(l)}})).join(" "))}else t.hasAttribute("aria-description")?r=Fi(t.getAttribute("aria-description")||""):r=Fi(t.getAttribute("title")||"");n==null||n.set(t,r)}return r}function sx(t){const e=t.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function ix(t){if("validity"in t){const e=t.validity;return(e==null?void 0:e.valid)===!1}return!1}function ox(t){const e=gs;let n=gs==null?void 0:gs.get(t);if(n===void 0){n="";const r=sx(t)!=="false",o=ix(t);if(r||o){const l=t.getAttribute("aria-errormessage");n=Ms(t,l).map(d=>Fi(en(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:zt(d)}}))).join(" ").trim()}e==null||e.set(t,n)}return n}function en(t,e){var d,p,g,y;if(e.visitedElements.has(t))return"";const n={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const v=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((p=e.embeddedInDescribedBy)!=null&&p.hidden)||!!((g=e.embeddedInNativeTextAlternative)!=null&&g.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if(Ag(t)||!v&&zt(t))return e.visitedElements.add(t),""}const r=Lg(t);if(!e.embeddedInLabelledBy){const v=(r||[]).map(S=>en(S,{...e,embeddedInLabelledBy:{element:S,hidden:zt(S)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(v)return v}const o=nt(t)||"",l=Xe(t);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const v=[...t.labels||[]].includes(t),S=(r||[]).includes(t);if(!v&&!S){if(o==="textbox")return e.visitedElements.add(t),l==="INPUT"||l==="TEXTAREA"?t.value:t.textContent||"";if(["combobox","listbox"].includes(o)){e.visitedElements.add(t);let k;if(l==="SELECT")k=[...t.selectedOptions],!k.length&&t.options.length&&k.push(t.options[0]);else{const _=o==="combobox"?nm(t,"*").find(E=>nt(E)==="listbox"):t;k=_?nm(_,'[aria-selected="true"]').filter(E=>nt(E)==="option"):[]}return!k.length&&l==="INPUT"?t.value:k.map(_=>en(_,n)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(o))return e.visitedElements.add(t),t.hasAttribute("aria-valuetext")?t.getAttribute("aria-valuetext")||"":t.hasAttribute("aria-valuenow")?t.getAttribute("aria-valuenow")||"":t.getAttribute("value")||"";if(["menu"].includes(o))return e.visitedElements.add(t),""}}const c=t.getAttribute("aria-label")||"";if(kn(c))return e.visitedElements.add(t),c;if(!["presentation","none"].includes(o)){if(l==="INPUT"&&["button","submit","reset"].includes(t.type)){e.visitedElements.add(t);const v=t.value||"";return kn(v)?v:t.type==="submit"?"Submit":t.type==="reset"?"Reset":t.getAttribute("title")||""}if(l==="INPUT"&&t.type==="file"){e.visitedElements.add(t);const v=t.labels||[];return v.length&&!e.embeddedInLabelledBy?Ci(v,e):"Choose File"}if(l==="INPUT"&&t.type==="image"){e.visitedElements.add(t);const v=t.labels||[];if(v.length&&!e.embeddedInLabelledBy)return Ci(v,e);const S=t.getAttribute("alt")||"";if(kn(S))return S;const k=t.getAttribute("title")||"";return kn(k)?k:"Submit"}if(!r&&l==="BUTTON"){e.visitedElements.add(t);const v=t.labels||[];if(v.length)return Ci(v,e)}if(!r&&l==="OUTPUT"){e.visitedElements.add(t);const v=t.labels||[];return v.length?Ci(v,e):t.getAttribute("title")||""}if(!r&&(l==="TEXTAREA"||l==="SELECT"||l==="INPUT")){e.visitedElements.add(t);const v=t.labels||[];if(v.length)return Ci(v,e);const S=l==="INPUT"&&["text","password","search","tel","email","url"].includes(t.type)||l==="TEXTAREA",k=t.getAttribute("placeholder")||"",_=t.getAttribute("title")||"";return!S||_?_:k}if(!r&&l==="FIELDSET"){e.visitedElements.add(t);for(let S=t.firstElementChild;S;S=S.nextElementSibling)if(Xe(S)==="LEGEND")return en(S,{...n,embeddedInNativeTextAlternative:{element:S,hidden:zt(S)}});return t.getAttribute("title")||""}if(!r&&l==="FIGURE"){e.visitedElements.add(t);for(let S=t.firstElementChild;S;S=S.nextElementSibling)if(Xe(S)==="FIGCAPTION")return en(S,{...n,embeddedInNativeTextAlternative:{element:S,hidden:zt(S)}});return t.getAttribute("title")||""}if(l==="IMG"){e.visitedElements.add(t);const v=t.getAttribute("alt")||"";return kn(v)?v:t.getAttribute("title")||""}if(l==="TABLE"){e.visitedElements.add(t);for(let S=t.firstElementChild;S;S=S.nextElementSibling)if(Xe(S)==="CAPTION")return en(S,{...n,embeddedInNativeTextAlternative:{element:S,hidden:zt(S)}});const v=t.getAttribute("summary")||"";if(v)return v}if(l==="AREA"){e.visitedElements.add(t);const v=t.getAttribute("alt")||"";return kn(v)?v:t.getAttribute("title")||""}if(l==="SVG"||t.ownerSVGElement){e.visitedElements.add(t);for(let v=t.firstElementChild;v;v=v.nextElementSibling)if(Xe(v)==="TITLE"&&v.ownerSVGElement)return en(v,{...n,embeddedInLabelledBy:{element:v,hidden:zt(v)}})}if(t.ownerSVGElement&&l==="A"){const v=t.getAttribute("xlink:title")||"";if(kn(v))return e.visitedElements.add(t),v}}const u=l==="SUMMARY"&&!["presentation","none"].includes(o);if(rx(o,e.embeddedInTargetElement==="descendant")||u||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(t);const v=lx(t,n);if(e.embeddedInTargetElement==="self"?kn(v):v)return v}if(!["presentation","none"].includes(o)||l==="IFRAME"){e.visitedElements.add(t);const v=t.getAttribute("title")||"";if(kn(v))return v}return e.visitedElements.add(t),""}function lx(t,e){const n=[],r=(l,c)=>{var u;if(!(c&&l.assignedSlot))if(l.nodeType===1){const d=((u=rr(l))==null?void 0:u.display)||"inline";let p=en(l,e);(d!=="inline"||l.nodeName==="BR")&&(p=" "+p+" "),n.push(p)}else l.nodeType===3&&n.push(l.textContent||"")};n.push(Bi(t,"::before")||"");const o=Bi(t);if(o!==void 0)n.push(o);else{const l=t.nodeName==="SLOT"?t.assignedNodes():[];if(l.length)for(const c of l)r(c,!1);else{for(let c=t.firstChild;c;c=c.nextSibling)r(c,!0);if(t.shadowRoot)for(let c=t.shadowRoot.firstChild;c;c=c.nextSibling)r(c,!0);for(const c of Ms(t,t.getAttribute("aria-owns")))r(c,!0)}}return n.push(Bi(t,"::after")||""),n.join("")}const rf=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function Mg(t){return Xe(t)==="OPTION"?t.selected:rf.includes(nt(t)||"")?Ng(t.getAttribute("aria-selected"))===!0:!1}const sf=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function jg(t){const e=of(t,!0);return e==="error"?!1:e}function ax(t){return of(t,!0)}function cx(t){return of(t,!1)}function of(t,e){const n=Xe(t);if(e&&n==="INPUT"&&t.indeterminate)return"mixed";if(n==="INPUT"&&["checkbox","radio"].includes(t.type))return t.checked;if(sf.includes(nt(t)||"")){const r=t.getAttribute("aria-checked");return r==="true"?!0:e&&r==="mixed"?"mixed":!1}return"error"}const ux=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function fx(t){const e=Xe(t);return["INPUT","TEXTAREA","SELECT"].includes(e)?t.hasAttribute("readonly"):ux.includes(nt(t)||"")?t.getAttribute("aria-readonly")==="true":t.isContentEditable?!1:"error"}const lf=["button"];function Pg(t){if(lf.includes(nt(t)||"")){const e=t.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const af=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function Og(t){if(Xe(t)==="DETAILS")return t.open;if(af.includes(nt(t)||"")){const e=t.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const cf=["heading","listitem","row","treeitem"];function $g(t){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Xe(t)];if(e)return e;if(cf.includes(nt(t)||"")){const n=t.getAttribute("aria-level"),r=n===null?Number.NaN:Number(n);if(Number.isInteger(r)&&r>=1)return r}return 0}const Rg=["application","button","composite","gridcell","group","input","link","menuitem","scrollbar","separator","tab","checkbox","columnheader","combobox","grid","listbox","menu","menubar","menuitemcheckbox","menuitemradio","option","radio","radiogroup","row","rowheader","searchbox","select","slider","spinbutton","switch","tablist","textbox","toolbar","tree","treegrid","treeitem"];function Wl(t){return Dg(t)||Fg(t)}function Dg(t){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(Xe(t))&&(t.hasAttribute("disabled")||dx(t)||hx(t))}function dx(t){return Xe(t)==="OPTION"&&!!t.closest("OPTGROUP[DISABLED]")}function hx(t){const e=t==null?void 0:t.closest("FIELDSET[DISABLED]");if(!e)return!1;const n=e.querySelector(":scope > LEGEND");return!n||!n.contains(t)}function Fg(t,e=!1){if(!t)return!1;if(e||Rg.includes(nt(t)||"")){const n=(t.getAttribute("aria-disabled")||"").toLowerCase();return n==="true"?!0:n==="false"?!1:Fg(lt(t),!0)}return!1}function Ci(t,e){return[...t].map(n=>en(n,{...e,embeddedInLabel:{element:n,hidden:zt(n)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(n=>!!n).join(" ")}function px(t){const e=yf;let n=t,r;const o=[];for(;n;n=lt(n)){const l=e.get(n);if(l!==void 0){r=l;break}o.push(n);const c=rr(n);if(!c){r=!0;break}const u=c.pointerEvents;if(u){r=u!=="none";break}}r===void 0&&(r=!0);for(const l of o)e.set(l,r);return r}let uf,ff,df,hf,gs,Yn,pf,mf,gf,yf,Bg=0;function vf(){++Bg,uf??(uf=new Map),ff??(ff=new Map),df??(df=new Map),hf??(hf=new Map),gs??(gs=new Map),Yn??(Yn=new Map),pf??(pf=new Map),mf??(mf=new Map),gf??(gf=new Map),yf??(yf=new Map)}function wf(){--Bg||(uf=void 0,ff=void 0,df=void 0,hf=void 0,gs=void 0,Yn=void 0,pf=void 0,mf=void 0,gf=void 0,yf=void 0)}const mx={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function gx(t){return zg(t)?"'"+t.replace(/'/g,"''")+"'":t}function yu(t){return zg(t)?'"'+t.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
104
- `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':t}function zg(t){return!!(t.length===0||/^\s|\s$/.test(t)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(t)||/^-/.test(t)||/[\n:](\s|$)/.test(t)||/\s#/.test(t)||/[\n\r]/.test(t)||/^[&*\],?!>|@"'#%]/.test(t)||/[{}`]/.test(t)||/^\[/.test(t)||!isNaN(Number(t))||["y","n","yes","no","true","false","on","off","null"].includes(t.toLowerCase()))}let yx=0;function Kl(t,e){const n=new Set,r={root:{role:"fragment",name:"",children:[],element:t,props:{},box:ql(t),receivesPointerEvents:!0},elements:new Map,refs:new Map},o=(c,u,d)=>{if(n.has(u))return;if(n.add(u),u.nodeType===Node.TEXT_NODE&&u.nodeValue){if(!d)return;const k=u.nodeValue;c.role!=="textbox"&&k&&c.children.push(u.nodeValue||"");return}if(u.nodeType!==Node.ELEMENT_NODE)return;const p=u,g=zt(p);if(g&&!(e!=null&&e.forAI))return;const y=[];if(p.hasAttribute("aria-owns")){const k=p.getAttribute("aria-owns").split(/\s+/);for(const _ of k){const E=t.ownerDocument.getElementById(_);E&&y.push(E)}}const v=!g||Cr(p),S=v?vx(p,e):null;S&&(S.ref&&(r.elements.set(S.ref,p),r.refs.set(p,S.ref)),c.children.push(S)),l(S||c,p,y,v)};function l(c,u,d,p){var S;const y=(((S=rr(u))==null?void 0:S.display)||"inline")!=="inline"||u.nodeName==="BR"?" ":"";y&&c.children.push(y),c.children.push(Bi(u,"::before")||"");const v=u.nodeName==="SLOT"?u.assignedNodes():[];if(v.length)for(const k of v)o(c,k,p);else{for(let k=u.firstChild;k;k=k.nextSibling)k.assignedSlot||o(c,k,p);if(u.shadowRoot)for(let k=u.shadowRoot.firstChild;k;k=k.nextSibling)o(c,k,p)}for(const k of d)o(c,k,p);if(c.children.push(Bi(u,"::after")||""),y&&c.children.push(y),c.children.length===1&&c.name===c.children[0]&&(c.children=[]),c.role==="link"&&u.hasAttribute("href")){const k=u.getAttribute("href");c.props.url=k}}vf();try{o(r.root,t,!0)}finally{wf()}return Sx(r.root),wx(r.root),r}function sm(t,e,n,r){if(!(r!=null&&r.forAI))return;let o;return o=t._ariaRef,(!o||o.role!==e||o.name!==n)&&(o={role:e,name:n,ref:((r==null?void 0:r.refPrefix)??"")+"e"+ ++yx},t._ariaRef=o),o.ref}function vx(t,e){const n=t.ownerDocument.activeElement===t;if(t.nodeName==="IFRAME")return{role:"iframe",name:"",ref:sm(t,"iframe","",e),children:[],props:{},element:t,box:ql(t),receivesPointerEvents:!0,active:n};const r=e!=null&&e.forAI?"generic":null,o=nt(t)??r;if(!o||o==="presentation"||o==="none")return null;const l=mt(Vi(t,!1)||""),c=px(t),u={role:o,name:l,ref:sm(t,o,l,e),children:[],props:{},element:t,box:ql(t),receivesPointerEvents:c,active:n};return sf.includes(o)&&(u.checked=jg(t)),Rg.includes(o)&&(u.disabled=Wl(t)),af.includes(o)&&(u.expanded=Og(t)),cf.includes(o)&&(u.level=$g(t)),lf.includes(o)&&(u.pressed=Pg(t)),rf.includes(o)&&(u.selected=Mg(t)),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.type!=="checkbox"&&t.type!=="radio"&&t.type!=="file"&&(u.children=[t.value]),u}function wx(t){const e=n=>{const r=[];for(const l of n.children||[]){if(typeof l=="string"){r.push(l);continue}const c=e(l);r.push(...c)}return n.role==="generic"&&r.length<=1&&r.every(l=>typeof l!="string"&&Ug(l))?r:(n.children=r,[n])};e(t)}function Sx(t){const e=(r,o)=>{if(!r.length)return;const l=mt(r.join(""));l&&o.push(l),r.length=0},n=r=>{const o=[],l=[];for(const c of r.children||[])typeof c=="string"?l.push(c):(e(l,o),n(c),o.push(c));e(l,o),r.children=o.length?o:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};n(t)}function Sf(t,e){return e?t?typeof e=="string"?t===e:!!t.match(new RegExp(e.pattern)):!1:!0}function xx(t,e){return Sf(t,e.text)}function _x(t,e){return Sf(t,e.name)}function Ex(t,e){const n=Kl(t);return{matches:Hg(n.root,e,!1,!1),received:{raw:Gl(n,{mode:"raw"}),regex:Gl(n,{mode:"regex"})}}}function kx(t,e){const n=Kl(t).root;return Hg(n,e,!0,!1).map(o=>o.element)}function xf(t,e,n){var r;return typeof t=="string"&&e.kind==="text"?xx(t,e):t===null||typeof t!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==t.role||e.checked!==void 0&&e.checked!==t.checked||e.disabled!==void 0&&e.disabled!==t.disabled||e.expanded!==void 0&&e.expanded!==t.expanded||e.level!==void 0&&e.level!==t.level||e.pressed!==void 0&&e.pressed!==t.pressed||e.selected!==void 0&&e.selected!==t.selected||!_x(t.name,e)||!Sf(t.props.url,(r=e.props)==null?void 0:r.url)?!1:e.containerMode==="contain"?om(t.children||[],e.children||[]):e.containerMode==="equal"?im(t.children||[],e.children||[],!1):e.containerMode==="deep-equal"||n?im(t.children||[],e.children||[],!0):om(t.children||[],e.children||[])}function im(t,e,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!xf(t[r],e[r],n))return!1;return!0}function om(t,e){if(e.length>t.length)return!1;const n=t.slice(),r=e.slice();for(const o of r){let l=n.shift();for(;l&&!xf(l,o,!1);)l=n.shift();if(!l)return!1}return!0}function Hg(t,e,n,r){const o=[],l=(c,u)=>{if(xf(c,e,r)){const d=typeof c=="string"?u:c;return d&&o.push(d),!n}if(typeof c=="string")return!1;for(const d of c.children||[])if(l(d,c))return!0;return!1};return l(t,null),o}function Gl(t,e){const n=[],r=(e==null?void 0:e.mode)==="regex"?Tx:()=>!0,o=(e==null?void 0:e.mode)==="regex"?bx:u=>u,l=(u,d,p)=>{if(typeof u=="string"){if(d&&!r(d,u))return;const S=yu(o(u));S&&n.push(p+"- text: "+S);return}let g=u.role;if(u.name&&u.name.length<=900){const S=o(u.name);if(S){const k=S.startsWith("/")&&S.endsWith("/")?S:JSON.stringify(S);g+=" "+k}}if(u.checked==="mixed"&&(g+=" [checked=mixed]"),u.checked===!0&&(g+=" [checked]"),u.disabled&&(g+=" [disabled]"),u.expanded&&(g+=" [expanded]"),u.active&&(e!=null&&e.forAI)&&(g+=" [active]"),u.level&&(g+=` [level=${u.level}]`),u.pressed==="mixed"&&(g+=" [pressed=mixed]"),u.pressed===!0&&(g+=" [pressed]"),u.selected===!0&&(g+=" [selected]"),e!=null&&e.forAI&&Ug(u)){const S=u.ref,k=Cx(u)?" [cursor=pointer]":"";S&&(g+=` [ref=${S}]${k}`)}const y=p+"- "+gx(g),v=!!Object.keys(u.props).length;if(!u.children.length&&!v)n.push(y);else if(u.children.length===1&&typeof u.children[0]=="string"&&!v){const S=r(u,u.children[0])?o(u.children[0]):null;S?n.push(y+": "+yu(S)):n.push(y)}else{n.push(y+":");for(const[S,k]of Object.entries(u.props))n.push(p+" - /"+S+": "+yu(k));for(const S of u.children||[])l(S,u,p+" ")}},c=t.root;if(c.role==="fragment")for(const u of c.children||[])l(u,c,"");else l(c,null,"");return n.join(`
105
- `)}function bx(t){const e=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let n="",r=0;const o=new RegExp(e.map(l=>"("+l.regex.source+")").join("|"),"g");return t.replace(o,(l,...c)=>{const u=c[c.length-2],d=c.slice(0,-2);n+=zl(t.slice(r,u));for(let p=0;p<d.length;p++)if(d[p]){const{replacement:g}=e[p];n+=g;break}return r=u+l.length,l}),n?(n+=zl(t.slice(r)),String(new RegExp(n))):t}function Tx(t,e){if(!e.length)return!1;if(!t.name)return!0;if(t.name.length>e.length)return!1;const n=e.length<=200&&t.name.length<=200?c1(e,t.name):"";let r=e;for(;n&&r.includes(n);)r=r.replace(n,"");return r.trim().length/e.length>.1}function Ug(t){return t.box.visible&&t.receivesPointerEvents}function Cx(t){var e;return((e=t.box.style)==null?void 0:e.cursor)==="pointer"}const lm=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-line.selectable:hover{background-color:#f2f2f2;overflow:hidden}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;width:400px;height:150px;z-index:10;font-size:13px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-item.succeeded>x-div{clip-path:url(#icon-pass);background-color:#388a34!important}x-pw-overlay{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}";class vu{constructor(e){this._renderedEntries=[],this._language="javascript",this._injectedScript=e;const n=e.document;this._isUnderTest=e.isUnderTest,this._glassPaneElement=n.createElement("x-pw-glass"),this._glassPaneElement.style.position="fixed",this._glassPaneElement.style.top="0",this._glassPaneElement.style.right="0",this._glassPaneElement.style.bottom="0",this._glassPaneElement.style.left="0",this._glassPaneElement.style.zIndex="2147483647",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent";for(const r of["click","auxclick","dragstart","input","keydown","keyup","pointerdown","pointerup","mousedown","mouseup","mouseleave","focus","scroll"])this._glassPaneElement.addEventListener(r,o=>{o.stopPropagation(),o.stopImmediatePropagation()});if(this._actionPointElement=n.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const r=new this._injectedScript.window.CSSStyleSheet;r.replaceSync(lm),this._glassPaneShadow.adoptedStyleSheets.push(r)}else{const r=this._injectedScript.document.createElement("style");r.textContent=lm,this._glassPaneShadow.appendChild(r)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&(!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest);const n=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),r=Tr(this._language,Tn(e)),o=n.length>1?"#f6b26b7f":"#6fa8dc7f";this.updateHighlight(n.map((l,c)=>{const u=n.length>1?` [${c+1} of ${n.length}]`:"";return{element:l,color:o,tooltipText:r+u}})),this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(()=>this.runHighlightOnRaf(e))}uninstall(){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),this._glassPaneElement.remove()}showActionPoint(e,n){this._actionPointElement.style.top=n+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,n;for(const r of this._renderedEntries)(e=r.highlightElement)==null||e.remove(),(n=r.tooltipElement)==null||n.remove();this._renderedEntries=[]}maskElements(e,n){this.updateHighlight(e.map(r=>({element:r,color:n})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const n of e){const r=this._createHighlightElement();this._glassPaneShadow.appendChild(r);let o;if(n.tooltipText){o=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(o),o.style.top="0",o.style.left="0",o.style.display="flex";const l=this._injectedScript.document.createElement("x-pw-tooltip-line");l.textContent=n.tooltipText,o.appendChild(l)}this._renderedEntries.push({targetElement:n.element,color:n.color,tooltipElement:o,highlightElement:r})}for(const n of this._renderedEntries){if(n.box=n.targetElement.getBoundingClientRect(),!n.tooltipElement)continue;const{anchorLeft:r,anchorTop:o}=this.tooltipPosition(n.box,n.tooltipElement);n.tooltipTop=o,n.tooltipLeft=r}for(const n of this._renderedEntries){n.tooltipElement&&(n.tooltipElement.style.top=n.tooltipTop+"px",n.tooltipElement.style.left=n.tooltipLeft+"px");const r=n.box;n.highlightElement.style.backgroundColor=n.color,n.highlightElement.style.left=r.x+"px",n.highlightElement.style.top=r.y+"px",n.highlightElement.style.width=r.width+"px",n.highlightElement.style.height=r.height+"px",n.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:r.x,y:r.y,width:r.width,height:r.height}))}}}firstBox(){var e;return(e=this._renderedEntries[0])==null?void 0:e.box}tooltipPosition(e,n){const r=n.offsetWidth,o=n.offsetHeight,l=this._glassPaneElement.offsetWidth,c=this._glassPaneElement.offsetHeight;let u=e.left;u+r>l-5&&(u=l-r-5);let d=e.bottom+5;return d+o>c-5&&(e.top>o+5?d=e.top-o-5:d=c-5-o),{anchorLeft:u,anchorTop:d}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let n=0;n<this._renderedEntries.length;++n){if(e[n].element!==this._renderedEntries[n].targetElement||e[n].color!==this._renderedEntries[n].color)return!1;const r=this._renderedEntries[n].box;if(!r)return!1;const o=e[n].element.getBoundingClientRect();if(o.top!==r.top||o.right!==r.right||o.bottom!==r.bottom||o.left!==r.left)return!1}return!0}_createHighlightElement(){return this._injectedScript.document.createElement("x-pw-highlight")}appendChild(e){this._glassPaneShadow.appendChild(e)}}function Nx(t,e,n){const r=t.left-e.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function Ax(t,e,n){const r=e.left-t.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function Ix(t,e,n){const r=e.top-t.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function Lx(t,e,n){const r=t.top-e.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function Mx(t,e,n){const r=n===void 0?50:n;let o=0;return t.left-e.right>=0&&(o+=t.left-e.right),e.left-t.right>=0&&(o+=e.left-t.right),e.top-t.bottom>=0&&(o+=e.top-t.bottom),t.top-e.bottom>=0&&(o+=t.top-e.bottom),o>r?void 0:o}const jx=["left-of","right-of","above","below","near"];function qg(t,e,n,r){const o=e.getBoundingClientRect(),l={"left-of":Ax,"right-of":Nx,above:Ix,below:Lx,near:Mx}[t];let c;for(const u of n){if(u===e)continue;const d=l(o,u.getBoundingClientRect(),r);d!==void 0&&(c===void 0||d<c)&&(c=d)}return c}function Vg(t,e){for(const n of e.jsonPath)t!=null&&(t=t[n]);return Wg(t,e)}function Wg(t,e){const n=typeof t=="string"&&!e.caseSensitive?t.toUpperCase():t,r=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!n:e.op==="="?r instanceof RegExp?typeof n=="string"&&!!n.match(r):n===r:typeof n!="string"||typeof r!="string"?!1:e.op==="*="?n.includes(r):e.op==="^="?n.startsWith(r):e.op==="$="?n.endsWith(r):e.op==="|="?n===r||n.startsWith(r+"-"):e.op==="~="?n.split(" ").includes(r):!1}function _f(t){const e=t.ownerDocument;return t.nodeName==="SCRIPT"||t.nodeName==="NOSCRIPT"||t.nodeName==="STYLE"||e.head&&e.head.contains(t)}function Tt(t,e){let n=t.get(e);if(n===void 0){if(n={full:"",normalized:"",immediate:[]},!_f(e)){let r="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))n={full:e.value,normalized:mt(e.value),immediate:[e.value]};else{for(let o=e.firstChild;o;o=o.nextSibling)if(o.nodeType===Node.TEXT_NODE)n.full+=o.nodeValue||"",r+=o.nodeValue||"";else{if(o.nodeType===Node.COMMENT_NODE)continue;r&&n.immediate.push(r),r="",o.nodeType===Node.ELEMENT_NODE&&(n.full+=Tt(t,o).full)}r&&n.immediate.push(r),e.shadowRoot&&(n.full+=Tt(t,e.shadowRoot).full),n.full&&(n.normalized=mt(n.full))}}t.set(e,n)}return n}function ia(t,e,n){if(_f(e)||!n(Tt(t,e)))return"none";for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&n(Tt(t,r)))return"selfAndChildren";return e.shadowRoot&&n(Tt(t,e.shadowRoot))?"selfAndChildren":"self"}function Kg(t,e){const n=Lg(e);if(n)return n.map(l=>Tt(t,l));const r=e.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:mt(r),immediate:[r]}];const o=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||o){const l=e.labels;if(l)return[...l].map(c=>Tt(t,c))}return[]}function am(t){return t.displayName||t.name||"Anonymous"}function Px(t){if(t.type)switch(typeof t.type){case"function":return am(t.type);case"string":return t.type;case"object":return t.type.displayName||(t.type.render?am(t.type.render):"")}if(t._currentElement){const e=t._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function Ox(t){var e;return t.key??((e=t._currentElement)==null?void 0:e.key)}function $x(t){if(t.child){const n=[];for(let r=t.child;r;r=r.sibling)n.push(r);return n}if(!t._currentElement)return[];const e=n=>{var o;const r=(o=n._currentElement)==null?void 0:o.type;return typeof r=="function"||typeof r=="string"};if(t._renderedComponent){const n=t._renderedComponent;return e(n)?[n]:[]}return t._renderedChildren?[...Object.values(t._renderedChildren)].filter(e):[]}function Rx(t){var r;const e=t.memoizedProps||((r=t._currentElement)==null?void 0:r.props);if(!e||typeof e=="string")return e;const n={...e};return delete n.children,n}function Gg(t){var r;const e={key:Ox(t),name:Px(t),children:$x(t).map(Gg),rootElements:[],props:Rx(t)},n=t.stateNode||t._hostNode||((r=t._renderedComponent)==null?void 0:r._hostNode);if(n instanceof Element)e.rootElements.push(n);else for(const o of e.children)e.rootElements.push(...o.rootElements);return e}function Qg(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)Qg(r,e,n);return n}function Jg(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);do{const o=r.currentNode,l=o,c=Object.keys(l).find(d=>d.startsWith("__reactContainer")&&l[d]!==null);if(c)e.push(l[c].stateNode.current);else{const d="_reactRootContainer";l.hasOwnProperty(d)&&l[d]!==null&&e.push(l[d]._internalRoot.current)}if(o instanceof Element&&o.hasAttribute("data-reactroot"))for(const d of Object.keys(o))(d.startsWith("__reactInternalInstance")||d.startsWith("__reactFiber"))&&e.push(o[d]);const u=o instanceof Element?o.shadowRoot:null;u&&Jg(u,e)}while(r.nextNode());return e}const Dx=()=>({queryAll(t,e){const{name:n,attributes:r}=br(e,!1),c=Jg(t.ownerDocument||t).map(d=>Gg(d)).map(d=>Qg(d,p=>{const g=p.props??{};if(p.key!==void 0&&(g.key=p.key),n&&p.name!==n||p.rootElements.some(y=>!sa(t,y)))return!1;for(const y of r)if(!Vg(g,y))return!1;return!0})).flat(),u=new Set;for(const d of c)for(const p of d.rootElements)u.add(p);return[...u]}}),Xg=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];Xg.sort();function Ni(t,e,n){if(!e.includes(n))throw new Error(`"${t}" attribute is only supported for roles: ${e.slice().sort().map(r=>`"${r}"`).join(", ")}`)}function as(t,e){if(t.op!=="<truthy>"&&!e.includes(t.value))throw new Error(`"${t.name}" must be one of ${e.map(n=>JSON.stringify(n)).join(", ")}`)}function cs(t,e){if(!e.includes(t.op))throw new Error(`"${t.name}" does not support "${t.op}" matcher`)}function Fx(t,e){const n={role:e};for(const r of t)switch(r.name){case"checked":{Ni(r.name,sf,e),as(r,[!0,!1,"mixed"]),cs(r,["<truthy>","="]),n.checked=r.op==="<truthy>"?!0:r.value;break}case"pressed":{Ni(r.name,lf,e),as(r,[!0,!1,"mixed"]),cs(r,["<truthy>","="]),n.pressed=r.op==="<truthy>"?!0:r.value;break}case"selected":{Ni(r.name,rf,e),as(r,[!0,!1]),cs(r,["<truthy>","="]),n.selected=r.op==="<truthy>"?!0:r.value;break}case"expanded":{Ni(r.name,af,e),as(r,[!0,!1]),cs(r,["<truthy>","="]),n.expanded=r.op==="<truthy>"?!0:r.value;break}case"level":{if(Ni(r.name,cf,e),typeof r.value=="string"&&(r.value=+r.value),r.op!=="="||typeof r.value!="number"||Number.isNaN(r.value))throw new Error('"level" attribute must be compared to a number');n.level=r.value;break}case"disabled":{as(r,[!0,!1]),cs(r,["<truthy>","="]),n.disabled=r.op==="<truthy>"?!0:r.value;break}case"name":{if(r.op==="<truthy>")throw new Error('"name" attribute must have a value');if(typeof r.value!="string"&&!(r.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');n.name=r.value,n.nameOp=r.op,n.exact=r.caseSensitive;break}case"include-hidden":{as(r,[!0,!1]),cs(r,["<truthy>","="]),n.includeHidden=r.op==="<truthy>"?!0:r.value;break}default:throw new Error(`Unknown attribute "${r.name}", must be one of ${Xg.map(o=>`"${o}"`).join(", ")}.`)}return n}function Bx(t,e,n){const r=[],o=c=>{if(nt(c)===e.role&&!(e.selected!==void 0&&Mg(c)!==e.selected)&&!(e.checked!==void 0&&jg(c)!==e.checked)&&!(e.pressed!==void 0&&Pg(c)!==e.pressed)&&!(e.expanded!==void 0&&Og(c)!==e.expanded)&&!(e.level!==void 0&&$g(c)!==e.level)&&!(e.disabled!==void 0&&Wl(c)!==e.disabled)&&!(!e.includeHidden&&zt(c))){if(e.name!==void 0){const u=mt(Vi(c,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=mt(e.name)),n&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!Wg(u,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}r.push(c)}},l=c=>{const u=[];c.shadowRoot&&u.push(c.shadowRoot);for(const d of c.querySelectorAll("*"))o(d),d.shadowRoot&&u.push(d.shadowRoot);u.forEach(l)};return l(t),r}function cm(t){return{queryAll:(e,n)=>{const r=br(n,!0),o=r.name.toLowerCase();if(!o)throw new Error("Role must not be empty");const l=Fx(r.attributes,o);vf();try{return Bx(e,l,t)}finally{wf()}}}}class zx{constructor(){this._retainCacheCounter=0,this._cacheText=new Map,this._cacheQueryCSS=new Map,this._cacheMatches=new Map,this._cacheQuery=new Map,this._cacheMatchesSimple=new Map,this._cacheMatchesParents=new Map,this._cacheCallMatches=new Map,this._cacheCallQuery=new Map,this._cacheQuerySimple=new Map,this._engines=new Map,this._engines.set("not",qx),this._engines.set("is",Oi),this._engines.set("where",Oi),this._engines.set("has",Hx),this._engines.set("scope",Ux),this._engines.set("light",Vx),this._engines.set("visible",Wx),this._engines.set("text",Kx),this._engines.set("text-is",Gx),this._engines.set("text-matches",Qx),this._engines.set("has-text",Jx),this._engines.set("right-of",Ai("right-of")),this._engines.set("left-of",Ai("left-of")),this._engines.set("above",Ai("above")),this._engines.set("below",Ai("below")),this._engines.set("near",Ai("near")),this._engines.set("nth-match",Xx);const e=[...this._engines.keys()];e.sort();const n=[...rg];if(n.sort(),e.join("|")!==n.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${n.join("|")}`)}begin(){++this._retainCacheCounter}end(){--this._retainCacheCounter,this._retainCacheCounter||(this._cacheQueryCSS.clear(),this._cacheMatches.clear(),this._cacheQuery.clear(),this._cacheMatchesSimple.clear(),this._cacheMatchesParents.clear(),this._cacheCallMatches.clear(),this._cacheCallQuery.clear(),this._cacheQuerySimple.clear(),this._cacheText.clear())}_cached(e,n,r,o){e.has(n)||e.set(n,[]);const l=e.get(n),c=l.find(d=>r.every((p,g)=>d.rest[g]===p));if(c)return c.result;const u=o();return l.push({rest:r,result:u}),u}_checkSelector(e){if(!(typeof e=="object"&&e&&(Array.isArray(e)||"simples"in e&&e.simples.length)))throw new Error(`Malformed selector "${e}"`);return e}matches(e,n,r){const o=this._checkSelector(n);this.begin();try{return this._cached(this._cacheMatches,e,[o,r.scope,r.pierceShadow,r.originalScope],()=>Array.isArray(o)?this._matchesEngine(Oi,e,o,r):(this._hasScopeClause(o)&&(r=this._expandContextForScopeMatching(r)),this._matchesSimple(e,o.simples[o.simples.length-1].selector,r)?this._matchesParents(e,o,o.simples.length-2,r):!1))}finally{this.end()}}query(e,n){const r=this._checkSelector(n);this.begin();try{return this._cached(this._cacheQuery,r,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(r))return this._queryEngine(Oi,e,r);this._hasScopeClause(r)&&(e=this._expandContextForScopeMatching(e));const o=this._scoreMap;this._scoreMap=new Map;let l=this._querySimple(e,r.simples[r.simples.length-1].selector);return l=l.filter(c=>this._matchesParents(c,r,r.simples.length-2,e)),this._scoreMap.size&&l.sort((c,u)=>{const d=this._scoreMap.get(c),p=this._scoreMap.get(u);return d===p?0:d===void 0?1:p===void 0?-1:d-p}),this._scoreMap=o,l})}finally{this.end()}}_markScore(e,n){this._scoreMap&&this._scoreMap.set(e,n)}_hasScopeClause(e){return e.simples.some(n=>n.selector.functions.some(r=>r.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const n=lt(e.scope);return n?{...e,scope:n,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,n,r){return this._cached(this._cacheMatchesSimple,e,[n,r.scope,r.pierceShadow,r.originalScope],()=>{if(e===r.scope||n.css&&!this._matchesCSS(e,n.css))return!1;for(const o of n.functions)if(!this._matchesEngine(this._getEngine(o.name),e,o.args,r))return!1;return!0})}_querySimple(e,n){return n.functions.length?this._cached(this._cacheQuerySimple,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=n.css;const o=n.functions;r==="*"&&o.length&&(r=void 0);let l,c=-1;r!==void 0?l=this._queryCSS(e,r):(c=o.findIndex(u=>this._getEngine(u.name).query!==void 0),c===-1&&(c=0),l=this._queryEngine(this._getEngine(o[c].name),e,o[c].args));for(let u=0;u<o.length;u++){if(u===c)continue;const d=this._getEngine(o[u].name);d.matches!==void 0&&(l=l.filter(p=>this._matchesEngine(d,p,o[u].args,e)))}for(let u=0;u<o.length;u++){if(u===c)continue;const d=this._getEngine(o[u].name);d.matches===void 0&&(l=l.filter(p=>this._matchesEngine(d,p,o[u].args,e)))}return l}):this._queryCSS(e,n.css||"*")}_matchesParents(e,n,r,o){return r<0?!0:this._cached(this._cacheMatchesParents,e,[n,r,o.scope,o.pierceShadow,o.originalScope],()=>{const{selector:l,combinator:c}=n.simples[r];if(c===">"){const u=pl(e,o);return!u||!this._matchesSimple(u,l,o)?!1:this._matchesParents(u,n,r-1,o)}if(c==="+"){const u=wu(e,o);return!u||!this._matchesSimple(u,l,o)?!1:this._matchesParents(u,n,r-1,o)}if(c===""){let u=pl(e,o);for(;u;){if(this._matchesSimple(u,l,o)){if(this._matchesParents(u,n,r-1,o))return!0;if(n.simples[r-1].combinator==="")break}u=pl(u,o)}return!1}if(c==="~"){let u=wu(e,o);for(;u;){if(this._matchesSimple(u,l,o)){if(this._matchesParents(u,n,r-1,o))return!0;if(n.simples[r-1].combinator==="~")break}u=wu(u,o)}return!1}if(c===">="){let u=e;for(;u;){if(this._matchesSimple(u,l,o)){if(this._matchesParents(u,n,r-1,o))return!0;if(n.simples[r-1].combinator==="")break}u=pl(u,o)}return!1}throw new Error(`Unsupported combinator "${c}"`)})}_matchesEngine(e,n,r,o){if(e.matches)return this._callMatches(e,n,r,o);if(e.query)return this._callQuery(e,r,o).includes(n);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,n,r){if(e.query)return this._callQuery(e,r,n);if(e.matches)return this._queryCSS(n,"*").filter(o=>this._callMatches(e,o,r,n));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,n,r,o){return this._cached(this._cacheCallMatches,n,[e,o.scope,o.pierceShadow,o.originalScope,...r],()=>e.matches(n,r,o,this))}_callQuery(e,n,r){return this._cached(this._cacheCallQuery,e,[r.scope,r.pierceShadow,r.originalScope,...n],()=>e.query(r,n,this))}_matchesCSS(e,n){return e.matches(n)}_queryCSS(e,n){return this._cached(this._cacheQueryCSS,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=[];function o(l){if(r=r.concat([...l.querySelectorAll(n)]),!!e.pierceShadow){l.shadowRoot&&o(l.shadowRoot);for(const c of l.querySelectorAll("*"))c.shadowRoot&&o(c.shadowRoot)}}return o(e.scope),r})}_getEngine(e){const n=this._engines.get(e);if(!n)throw new Error(`Unknown selector engine "${e}"`);return n}}const Oi={matches(t,e,n,r){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(o=>r.matches(t,o,n))},query(t,e,n){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let r=[];for(const o of e)r=r.concat(n.query(t,o));return e.length===1?r:Yg(r)}},Hx={matches(t,e,n,r){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return r.query({...n,scope:t},e).length>0}},Ux={matches(t,e,n,r){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const o=n.originalScope||n.scope;return o.nodeType===9?t===o.documentElement:t===o},query(t,e,n){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const r=t.originalScope||t.scope;if(r.nodeType===9){const o=r.documentElement;return o?[o]:[]}return r.nodeType===1?[r]:[]}},qx={matches(t,e,n,r){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!r.matches(t,e,n)}},Vx={query(t,e,n){return n.query({...t,pierceShadow:!1},e)},matches(t,e,n,r){return r.matches(t,e,{...n,pierceShadow:!1})}},Wx={matches(t,e,n,r){if(e.length)throw new Error('"visible" engine expects no arguments');return Cr(t)}},Kx={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const o=mt(e[0]).toLowerCase(),l=c=>c.normalized.toLowerCase().includes(o);return ia(r._cacheText,t,l)==="self"}},Gx={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const o=mt(e[0]),l=c=>!o&&!c.immediate.length?!0:c.immediate.some(u=>mt(u)===o);return ia(r._cacheText,t,l)!=="none"}},Qx={matches(t,e,n,r){if(e.length===0||typeof e[0]!="string"||e.length>2||e.length===2&&typeof e[1]!="string")throw new Error('"text-matches" engine expects a regexp body and optional regexp flags');const o=new RegExp(e[0],e.length===2?e[1]:void 0),l=c=>o.test(c.full);return ia(r._cacheText,t,l)==="self"}},Jx={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(_f(t))return!1;const o=mt(e[0]).toLowerCase();return(c=>c.normalized.toLowerCase().includes(o))(Tt(r._cacheText,t))}};function Ai(t){return{matches(e,n,r,o){const l=n.length&&typeof n[n.length-1]=="number"?n[n.length-1]:void 0,c=l===void 0?n:n.slice(0,n.length-1);if(n.length<1+(l===void 0?0:1))throw new Error(`"${t}" engine expects a selector list and optional maximum distance in pixels`);const u=o.query(r,c),d=qg(t,e,u,l);return d===void 0?!1:(o._markScore(e,d),!0)}}}const Xx={query(t,e,n){let r=e[e.length-1];if(e.length<2)throw new Error('"nth-match" engine expects non-empty selector list and an index argument');if(typeof r!="number"||r<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const o=Oi.query(t,e.slice(0,e.length-1),n);return r--,r<o.length?[o[r]]:[]}};function pl(t,e){if(t!==e.scope)return e.pierceShadow?lt(t):t.parentElement||void 0}function wu(t,e){if(t!==e.scope)return t.previousElementSibling||void 0}function Yg(t){const e=new Map,n=[],r=[];function o(c){let u=e.get(c);if(u)return u;const d=lt(c);return d?o(d).children.push(c):n.push(c),u={children:[],taken:!1},e.set(c,u),u}for(const c of t)o(c).taken=!0;function l(c){const u=e.get(c);if(u.taken&&r.push(c),u.children.length>1){const d=new Set(u.children);u.children=[];let p=c.firstElementChild;for(;p&&u.children.length<d.size;)d.has(p)&&u.children.push(p),p=p.nextElementSibling;for(p=c.shadowRoot?c.shadowRoot.firstElementChild:null;p&&u.children.length<d.size;)d.has(p)&&u.children.push(p),p=p.nextElementSibling}u.children.forEach(l)}return n.forEach(l),r}const Zg=10,js=Zg/2,um=1,Yx=2,Zx=10,e_=50,ey=100,ty=120,ny=140,ry=160,Il=180,sy=200,fm=250,t_=ty+js,n_=ny+js,r_=ey+js,s_=ry+js,i_=Il+js,o_=sy+js,l_=300,a_=500,iy=510,Su=520,oy=530,ly=1e4,c_=1e7,u_=1e3;function dm(t,e,n){t._evaluator.begin();const r={allowText:new Map,disallowText:new Map};vf();try{let o=[];if(n.forTextExpect){let u=ml(t,e.ownerDocument.documentElement,n);for(let d=e;d;d=lt(d)){const p=us(r,t,d,{...n,noText:!0});if(!p)continue;if(Zn(p)<=u_){u=p;break}}o=[Ll(u)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const u=Pi(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",n.root);u&&Cr(u)&&(e=u)}if(n.multiple){const u=us(r,t,e,n),d=us(r,t,e,{...n,noText:!0});let p=[u,d];if(r.allowText.clear(),r.disallowText.clear(),u&&xu(u)&&p.push(us(r,t,e,{...n,noCSSId:!0})),d&&xu(d)&&p.push(us(r,t,e,{...n,noText:!0,noCSSId:!0})),p=p.filter(Boolean),!p.length){const g=ml(t,e,n);p.push(g),xu(g)&&p.push(ml(t,e,{...n,noCSSId:!0}))}o=[...new Set(p.map(g=>Ll(g)))]}else{const u=us(r,t,e,n)||ml(t,e,n);o=[Ll(u)]}}const l=o[0],c=t.parseSelector(l);return{selector:l,selectors:o,elements:t.querySelectorAll(c,n.root??e.ownerDocument)}}finally{wf(),t._evaluator.end()}}function hm(t){return t.filter(e=>e[0].selector[0]!=="/")}function us(t,e,n,r){if(r.root&&!sa(r.root,n))throw new Error("Target element must belong to the root's subtree");if(n===r.root)return[{engine:"css",selector:":scope",score:1}];if(n.ownerDocument.documentElement===n)return[{engine:"css",selector:"html",score:1}];const o=(c,u)=>{const d=c===n;let p=u?d_(e,c,c===n):[];c!==n&&(p=hm(p));const g=f_(e,c,r).filter(S=>!r.omitInternalEngines||!S.engine.startsWith("internal:")).map(S=>[S]);let y=pm(e,r.root??n.ownerDocument,c,[...p,...g],d);p=hm(p);const v=S=>{const k=u&&!S.length,_=[...S,...g].filter(C=>y?Zn(C)<Zn(y):!0);let E=_[0];if(E)for(let C=lt(c);C&&C!==r.root;C=lt(C)){const A=l(C,k);if(!A||y&&Zn([...A,...E])>=Zn(y))continue;if(E=pm(e,C,c,_,d),!E)return;const B=[...A,...E];(!y||Zn(B)<Zn(y))&&(y=B)}};return v(p),c===n&&p.length&&v([]),y},l=(c,u)=>{const d=u?t.allowText:t.disallowText;let p=d.get(c);return p===void 0&&(p=o(c,u),d.set(c,p)),p};return o(n,!r.noText)}function f_(t,e,n){const r=[];{for(const c of["data-testid","data-test-id","data-test"])c!==n.testIdAttributeName&&e.getAttribute(c)&&r.push({engine:"css",selector:`[${c}=${ps(e.getAttribute(c))}]`,score:Yx});if(!n.noCSSId){const c=e.getAttribute("id");c&&!h_(c)&&r.push({engine:"css",selector:ay(c),score:a_})}r.push({engine:"css",selector:bn(e),score:oy})}if(e.nodeName==="IFRAME"){for(const c of["name","title"])e.getAttribute(c)&&r.push({engine:"css",selector:`${bn(e)}[${c}=${ps(e.getAttribute(c))}]`,score:Zx});return e.getAttribute(n.testIdAttributeName)&&r.push({engine:"css",selector:`[${n.testIdAttributeName}=${ps(e.getAttribute(n.testIdAttributeName))}]`,score:um}),Ru([r]),r}if(e.getAttribute(n.testIdAttributeName)&&r.push({engine:"internal:testid",selector:`[${n.testIdAttributeName}=${ht(e.getAttribute(n.testIdAttributeName),!0)}]`,score:um}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e;if(c.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${ht(c.placeholder,!0)}]`,score:t_});for(const u of ys(c.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${ht(u.text,!1)}]`,score:ty-u.scoreBonus})}}const o=Kg(t._evaluator._cacheText,e);for(const c of o){const u=c.normalized;r.push({engine:"internal:label",selector:kt(u,!0),score:n_});for(const d of ys(u))r.push({engine:"internal:label",selector:kt(d.text,!1),score:ny-d.scoreBonus})}const l=nt(e);return l&&!["none","presentation"].includes(l)&&r.push({engine:"internal:role",selector:l,score:iy}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&r.push({engine:"css",selector:`${bn(e)}[name=${ps(e.getAttribute("name"))}]`,score:Su}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&r.push({engine:"css",selector:`${bn(e)}[type=${ps(e.getAttribute("type"))}]`,score:Su}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:bn(e),score:Su+1}),Ru([r]),r}function d_(t,e,n){if(e.nodeName==="SELECT")return[];const r=[],o=e.getAttribute("title");if(o){r.push([{engine:"internal:attr",selector:`[title=${ht(o,!0)}]`,score:o_}]);for(const p of ys(o))r.push([{engine:"internal:attr",selector:`[title=${ht(p.text,!1)}]`,score:sy-p.scoreBonus}])}const l=e.getAttribute("alt");if(l&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${ht(l,!0)}]`,score:s_}]);for(const p of ys(l))r.push([{engine:"internal:attr",selector:`[alt=${ht(p.text,!1)}]`,score:ry-p.scoreBonus}])}const c=Tt(t._evaluator._cacheText,e).normalized,u=c?ys(c):[];if(c){if(n){c.length<=80&&r.push([{engine:"internal:text",selector:kt(c,!0),score:i_}]);for(const g of u)r.push([{engine:"internal:text",selector:kt(g.text,!1),score:Il-g.scoreBonus}])}const p={engine:"css",selector:bn(e),score:oy};for(const g of u)r.push([p,{engine:"internal:has-text",selector:kt(g.text,!1),score:Il-g.scoreBonus}]);if(c.length<=80){const g=new RegExp("^"+zl(c)+"$");r.push([p,{engine:"internal:has-text",selector:kt(g,!1),score:fm}])}}const d=nt(e);if(d&&!["none","presentation"].includes(d)){const p=Vi(e,!1);if(p){const g={engine:"internal:role",selector:`${d}[name=${ht(p,!0)}]`,score:r_};r.push([g]);for(const y of ys(p))r.push([{engine:"internal:role",selector:`${d}[name=${ht(y.text,!1)}]`,score:ey-y.scoreBonus}])}else{const g={engine:"internal:role",selector:`${d}`,score:iy};for(const y of u)r.push([g,{engine:"internal:has-text",selector:kt(y.text,!1),score:Il-y.scoreBonus}]);if(c.length<=80){const y=new RegExp("^"+zl(c)+"$");r.push([g,{engine:"internal:has-text",selector:kt(y,!1),score:fm}])}}}return Ru(r),r}function ay(t){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(t)?"#"+t:`[id=${ps(t)}]`}function xu(t){return t.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function ml(t,e,n){const r=n.root??e.ownerDocument,o=[];function l(u){const d=o.slice();u&&d.unshift(u);const p=d.join(" > "),g=t.parseSelector(p);return t.querySelector(g,r,!1)===e?p:void 0}function c(u){const d={engine:"css",selector:u,score:c_},p=t.parseSelector(u),g=t.querySelectorAll(p,r);if(g.length===1)return[d];const y={engine:"nth",selector:String(g.indexOf(e)),score:ly};return[d,y]}for(let u=e;u&&u!==r;u=lt(u)){let d="";if(u.id&&!n.noCSSId){const y=ay(u.id),v=l(y);if(v)return c(v);d=y}const p=u.parentNode,g=[...u.classList].map(p_);for(let y=0;y<g.length;++y){const v="."+g.slice(0,y+1).join("."),S=l(v);if(S)return c(S);!d&&p&&p.querySelectorAll(v).length===1&&(d=v)}if(p){const y=[...p.children],v=u.nodeName,k=y.filter(E=>E.nodeName===v).indexOf(u)===0?bn(u):`${bn(u)}:nth-child(${1+y.indexOf(u)})`,_=l(k);if(_)return c(_);d||(d=k)}else d||(d=bn(u));o.unshift(d)}return c(l())}function Ru(t){for(const e of t)for(const n of e)n.score>e_&&n.score<l_&&(n.score+=Math.min(Zg,n.selector.length/10|0))}function Ll(t){const e=[];let n="";for(const{engine:r,selector:o}of t)e.length&&(n!=="css"||r!=="css"||o.startsWith(":nth-match("))&&e.push(">>"),n=r,r==="css"?e.push(o):e.push(`${r}=${o}`);return e.join(" ")}function Zn(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n].score*(t.length-n);return e}function pm(t,e,n,r,o){const l=r.map(u=>({tokens:u,score:Zn(u)}));l.sort((u,d)=>u.score-d.score);let c=null;for(const{tokens:u}of l){const d=t.parseSelector(Ll(u)),p=t.querySelectorAll(d,e);if(p[0]===n&&p.length===1)return u;const g=p.indexOf(n);if(!o||c||g===-1||p.length>5)continue;const y={engine:"nth",selector:String(g),score:ly};c=[...u,y]}return c}function h_(t){let e,n=0;for(let r=0;r<t.length;++r){const o=t[r];let l;if(!(o==="-"||o==="_")){if(o>="a"&&o<="z"?l="lower":o>="A"&&o<="Z"?l="upper":o>="0"&&o<="9"?l="digit":l="other",l==="lower"&&e==="upper"){e=l;continue}e&&e!==l&&++n,e=l}}return n>=t.length/4}function gl(t,e){if(t.length<=e)return t;t=t.substring(0,e);const n=t.match(/^(.*)\b(.+?)$/);return n?n[1].trimEnd():""}function ys(t){let e=[];{const n=t.match(/^([\d.,]+)[^.,\w]/),r=n?n[1].length:0;if(r){const o=gl(t.substring(r).trimStart(),80);e.push({text:o,scoreBonus:o.length<=30?2:1})}}{const n=t.match(/[^.,\w]([\d.,]+)$/),r=n?n[1].length:0;if(r){const o=gl(t.substring(0,t.length-r).trimEnd(),80);e.push({text:o,scoreBonus:o.length<=30?2:1})}}return t.length<=30?e.push({text:t,scoreBonus:0}):(e.push({text:gl(t,80),scoreBonus:0}),e.push({text:gl(t,30),scoreBonus:1})),e=e.filter(n=>n.text),e.length||e.push({text:t.substring(0,80),scoreBonus:0}),e}function bn(t){return t.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function p_(t){let e="";for(let n=0;n<t.length;n++)e+=m_(t,n);return e}function m_(t,e){const n=t.charCodeAt(e);return n===0?"�":n>=1&&n<=31||n>=48&&n<=57&&(e===0||e===1&&t.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":e===0&&n===45&&t.length===1?"\\"+t.charAt(e):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?t.charAt(e):"\\"+t.charAt(e)}function cy(t,e){const n=t.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let r=n.substring(n.lastIndexOf("/")+1);return r.endsWith(e)&&(r=r.substring(0,r.length-e.length)),r}function g_(t,e){return e?e.toUpperCase():""}const y_=/(?:^|[-_/])(\w)/g,uy=t=>t&&t.replace(y_,g_);function v_(t){function e(g){const y=g.name||g._componentTag||g.__playwright_guessedName;if(y)return y;const v=g.__file;if(v)return uy(cy(v,".vue"))}function n(g,y){return g.type.__playwright_guessedName=y,y}function r(g){var v,S,k,_;const y=e(g.type||{});if(y)return y;if(g.root===g)return"Root";for(const E in(S=(v=g.parent)==null?void 0:v.type)==null?void 0:S.components)if(((k=g.parent)==null?void 0:k.type.components[E])===g.type)return n(g,E);for(const E in(_=g.appContext)==null?void 0:_.components)if(g.appContext.components[E]===g.type)return n(g,E);return"Anonymous Component"}function o(g){return g._isBeingDestroyed||g.isUnmounted}function l(g){return g.subTree.type.toString()==="Symbol(Fragment)"}function c(g){const y=[];return g.component&&y.push(g.component),g.suspense&&y.push(...c(g.suspense.activeBranch)),Array.isArray(g.children)&&g.children.forEach(v=>{v.component?y.push(v.component):y.push(...c(v))}),y.filter(v=>{var S;return!o(v)&&!((S=v.type.devtools)!=null&&S.hide)})}function u(g){return l(g)?d(g.subTree):[g.subTree.el]}function d(g){if(!g.children)return[];const y=[];for(let v=0,S=g.children.length;v<S;v++){const k=g.children[v];k.component?y.push(...u(k.component)):k.el&&y.push(k.el)}return y}function p(g){return{name:r(g),children:c(g.subTree).map(p),rootElements:u(g),props:g.props}}return p(t)}function w_(t){function e(l){const c=l.displayName||l.name||l._componentTag;if(c)return c;const u=l.__file;if(u)return uy(cy(u,".vue"))}function n(l){const c=e(l.$options||l.fnOptions||{});return c||(l.$root===l?"Root":"Anonymous Component")}function r(l){return l.$children?l.$children:Array.isArray(l.subTree.children)?l.subTree.children.filter(c=>!!c.component).map(c=>c.component):[]}function o(l){return{name:n(l),children:r(l).map(o),rootElements:[l.$el],props:l._props}}return o(t)}function fy(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)fy(r,e,n);return n}function dy(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT),o=new Set;do{const l=r.currentNode;l.__vue__&&o.add(l.__vue__.$root),l.__vue_app__&&l._vnode&&l._vnode.component&&e.push({root:l._vnode.component,version:3});const c=l instanceof Element?l.shadowRoot:null;c&&dy(c,e)}while(r.nextNode());for(const l of o)e.push({version:2,root:l});return e}const S_=()=>({queryAll(t,e){const n=t.ownerDocument||t,{name:r,attributes:o}=br(e,!1),u=dy(n).map(p=>p.version===3?v_(p.root):w_(p.root)).map(p=>fy(p,g=>{if(r&&g.name!==r||g.rootElements.some(y=>!sa(t,y)))return!1;for(const y of o)if(!Vg(g.props,y))return!1;return!0})).flat(),d=new Set;for(const p of u)for(const g of p.rootElements)d.add(g);return[...d]}}),mm={queryAll(t,e){e.startsWith("/")&&t.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const n=[],r=t.ownerDocument||t;if(!r)return n;const o=r.evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let l=o.iterateNext();l;l=o.iterateNext())l.nodeType===Node.ELEMENT_NODE&&n.push(l);return n}};function Ef(t,e,n){return`internal:attr=[${t}=${ht(e,(n==null?void 0:n.exact)||!1)}]`}function x_(t,e){return`internal:testid=[${t}=${ht(e,!0)}]`}function __(t,e){return"internal:label="+kt(t,!!(e!=null&&e.exact))}function E_(t,e){return Ef("alt",t,e)}function k_(t,e){return Ef("title",t,e)}function b_(t,e){return Ef("placeholder",t,e)}function T_(t,e){return"internal:text="+kt(t,!!(e!=null&&e.exact))}function C_(t,e={}){const n=[];return e.checked!==void 0&&n.push(["checked",String(e.checked)]),e.disabled!==void 0&&n.push(["disabled",String(e.disabled)]),e.selected!==void 0&&n.push(["selected",String(e.selected)]),e.expanded!==void 0&&n.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&n.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&n.push(["level",String(e.level)]),e.name!==void 0&&n.push(["name",ht(e.name,!!e.exact)]),e.pressed!==void 0&&n.push(["pressed",String(e.pressed)]),`internal:role=${t}${n.map(([r,o])=>`[${r}=${o}]`).join("")}`}const Ii=Symbol("selector"),N_=class $i{constructor(e,n,r){if(r!=null&&r.hasText&&(n+=` >> internal:has-text=${kt(r.hasText,!1)}`),r!=null&&r.hasNotText&&(n+=` >> internal:has-not-text=${kt(r.hasNotText,!1)}`),r!=null&&r.has&&(n+=" >> internal:has="+JSON.stringify(r.has[Ii])),r!=null&&r.hasNot&&(n+=" >> internal:has-not="+JSON.stringify(r.hasNot[Ii])),(r==null?void 0:r.visible)!==void 0&&(n+=` >> visible=${r.visible?"true":"false"}`),this[Ii]=n,n){const c=e.parseSelector(n);this.element=e.querySelector(c,e.document,!1),this.elements=e.querySelectorAll(c,e.document)}const o=n,l=this;l.locator=(c,u)=>new $i(e,o?o+" >> "+c:c,u),l.getByTestId=c=>l.locator(x_(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),c)),l.getByAltText=(c,u)=>l.locator(E_(c,u)),l.getByLabel=(c,u)=>l.locator(__(c,u)),l.getByPlaceholder=(c,u)=>l.locator(b_(c,u)),l.getByText=(c,u)=>l.locator(T_(c,u)),l.getByTitle=(c,u)=>l.locator(k_(c,u)),l.getByRole=(c,u={})=>l.locator(C_(c,u)),l.filter=c=>new $i(e,n,c),l.first=()=>l.locator("nth=0"),l.last=()=>l.locator("nth=-1"),l.nth=c=>l.locator(`nth=${c}`),l.and=c=>new $i(e,o+" >> internal:and="+JSON.stringify(c[Ii])),l.or=c=>new $i(e,o+" >> internal:or="+JSON.stringify(c[Ii]))}};let A_=N_;class I_{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,n)=>this._querySelector(e,!!n),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,n)=>this._generateLocator(e,n),ariaSnapshot:(e,n)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,n),resume:()=>this._resume(),...new A_(this._injectedScript,"")},delete this._injectedScript.window.playwright.filter,delete this._injectedScript.window.playwright.first,delete this._injectedScript.window.playwright.last,delete this._injectedScript.window.playwright.nth,delete this._injectedScript.window.playwright.and,delete this._injectedScript.window.playwright.or)}_querySelector(e,n){if(typeof e!="string")throw new Error("Usage: playwright.query('Playwright >> selector').");const r=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(r,this._injectedScript.document,n)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const n=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(n,this._injectedScript.document)}_inspect(e){if(typeof e!="string")throw new Error("Usage: playwright.inspect('Playwright >> selector').");this._injectedScript.window.inspect(this._querySelector(e,!1))}_selector(e){if(!(e instanceof Element))throw new Error("Usage: playwright.selector(element).");return this._injectedScript.generateSelectorSimple(e)}_generateLocator(e,n){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const r=this._injectedScript.generateSelectorSimple(e);return Tr(n||"javascript",r)}_resume(){this._injectedScript.window.__pw_resume().catch(()=>{})}}function L_(t){try{return t instanceof RegExp||Object.prototype.toString.call(t)==="[object RegExp]"}catch{return!1}}function M_(t){try{return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}catch{return!1}}function j_(t){try{return t instanceof URL||Object.prototype.toString.call(t)==="[object URL]"}catch{return!1}}function P_(t){var e;try{return t instanceof Error||t&&((e=Object.getPrototypeOf(t))==null?void 0:e.name)==="Error"}catch{return!1}}function O_(t,e){try{return t instanceof e||Object.prototype.toString.call(t)===`[object ${e.name}]`}catch{return!1}}const hy={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function $_(t){if("toBase64"in t)return t.toBase64();const e=Array.from(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)).map(n=>String.fromCharCode(n)).join("");return btoa(e)}function R_(t,e){const n=atob(t),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return new e(r.buffer)}function Du(t,e=[],n=new Map){if(!Object.is(t,void 0)){if(typeof t=="object"&&t){if("ref"in t)return n.get(t.ref);if("v"in t)return t.v==="undefined"?void 0:t.v==="null"?null:t.v==="NaN"?NaN:t.v==="Infinity"?1/0:t.v==="-Infinity"?-1/0:t.v==="-0"?-0:void 0;if("d"in t)return new Date(t.d);if("u"in t)return new URL(t.u);if("bi"in t)return BigInt(t.bi);if("e"in t){const r=new Error(t.e.m);return r.name=t.e.n,r.stack=t.e.s,r}if("r"in t)return new RegExp(t.r.p,t.r.f);if("a"in t){const r=[];n.set(t.id,r);for(const o of t.a)r.push(Du(o,e,n));return r}if("o"in t){const r={};n.set(t.id,r);for(const{k:o,v:l}of t.o)o!=="__proto__"&&(r[o]=Du(l,e,n));return r}if("h"in t)return e[t.h];if("ta"in t)return R_(t.ta.b,hy[t.ta.k])}return t}}function D_(t,e){return Fu(t,e,{visited:new Map,lastId:0})}function Fu(t,e,n){if(t&&typeof t=="object"){if(typeof globalThis.Window=="function"&&t instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&t instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&t instanceof globalThis.Node)return"ref: <Node>"}return py(t,e,n)}function py(t,e,n){var l;const r=e(t);if("fallThrough"in r)t=r.fallThrough;else return r;if(typeof t=="symbol")return{v:"undefined"};if(Object.is(t,void 0))return{v:"undefined"};if(Object.is(t,null))return{v:"null"};if(Object.is(t,NaN))return{v:"NaN"};if(Object.is(t,1/0))return{v:"Infinity"};if(Object.is(t,-1/0))return{v:"-Infinity"};if(Object.is(t,-0))return{v:"-0"};if(typeof t=="boolean"||typeof t=="number"||typeof t=="string")return t;if(typeof t=="bigint")return{bi:t.toString()};if(P_(t)){let c;return(l=t.stack)!=null&&l.startsWith(t.name+": "+t.message)?c=t.stack:c=`${t.name}: ${t.message}
106
- ${t.stack}`,{e:{n:t.name,m:t.message,s:c}}}if(M_(t))return{d:t.toJSON()};if(j_(t))return{u:t.toJSON()};if(L_(t))return{r:{p:t.source,f:t.flags}};for(const[c,u]of Object.entries(hy))if(O_(t,u))return{ta:{b:$_(t),k:c}};const o=n.visited.get(t);if(o)return{ref:o};if(Array.isArray(t)){const c=[],u=++n.lastId;n.visited.set(t,u);for(let d=0;d<t.length;++d)c.push(Fu(t[d],e,n));return{a:c,id:u}}if(typeof t=="object"){const c=[],u=++n.lastId;n.visited.set(t,u);for(const p of Object.keys(t)){let g;try{g=t[p]}catch{continue}p==="toJSON"&&typeof g=="function"?c.push({k:p,v:{o:[],id:0}}):c.push({k:p,v:Fu(g,e,n)})}let d;try{c.length===0&&t.toJSON&&typeof t.toJSON=="function"&&(d={value:t.toJSON()})}catch{}return d?py(d.value,e,n):{o:c,id:u}}}class F_{constructor(e,n){var r,o,l,c,u,d,p,g;this.global=e,this.isUnderTest=n,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(r=e.setTimeout)==null?void 0:r.bind(e),clearTimeout:(o=e.clearTimeout)==null?void 0:o.bind(e),setInterval:(l=e.setInterval)==null?void 0:l.bind(e),clearInterval:(c=e.clearInterval)==null?void 0:c.bind(e),requestAnimationFrame:(u=e.requestAnimationFrame)==null?void 0:u.bind(e),cancelAnimationFrame:(d=e.cancelAnimationFrame)==null?void 0:d.bind(e),requestIdleCallback:(p=e.requestIdleCallback)==null?void 0:p.bind(e),cancelIdleCallback:(g=e.cancelIdleCallback)==null?void 0:g.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,n,r,o,...l){const c=l.slice(0,o),u=l.slice(o),d=[];for(let g=0;g<c.length;g++)d[g]=Du(c[g],u);let p=this.global.eval(r);return e===!0?p=p(...d):e===!1?p=p:typeof p=="function"&&(p=p(...d)),n?this._promiseAwareJsonValueNoThrow(p):p}jsonValue(e,n){if(n!==void 0)return D_(n,r=>({fallThrough:r}))}_promiseAwareJsonValueNoThrow(e){const n=r=>{try{return this.jsonValue(!0,r)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const r=await e;return n(r)})():n(e)}}class my{constructor(e,n){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Tr,cacheNormalizedWhitespaces:l1,elementText:Tt,getAriaRole:nt,getElementAccessibleDescription:rm,getElementAccessibleName:Vi,isElementVisible:Cr,isInsideScope:sa,normalizeWhiteSpace:mt,parseAriaSnapshot:nf,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=n.isUnderTest,this.utils.builtins=new F_(e,n.isUnderTest).builtins,this._sdkLanguage=n.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=n.testIdAttributeName,this._evaluator=new zx,this.consoleApi=new I_(this),this.onGlobalListenersRemoved=new Set,this._autoClosingTags=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]),this._booleanAttributes=new Set(["checked","selected","disabled","readonly","multiple"]),this._eventTypes=new Map([["auxclick","mouse"],["click","mouse"],["dblclick","mouse"],["mousedown","mouse"],["mouseeenter","mouse"],["mouseleave","mouse"],["mousemove","mouse"],["mouseout","mouse"],["mouseover","mouse"],["mouseup","mouse"],["mouseleave","mouse"],["mousewheel","mouse"],["keydown","keyboard"],["keyup","keyboard"],["keypress","keyboard"],["textInput","keyboard"],["touchstart","touch"],["touchmove","touch"],["touchend","touch"],["touchcancel","touch"],["pointerover","pointer"],["pointerout","pointer"],["pointerenter","pointer"],["pointerleave","pointer"],["pointerdown","pointer"],["pointerup","pointer"],["pointermove","pointer"],["pointercancel","pointer"],["gotpointercapture","pointer"],["lostpointercapture","pointer"],["focus","focus"],["blur","focus"],["drag","drag"],["dragstart","drag"],["dragend","drag"],["dragover","drag"],["dragenter","drag"],["dragleave","drag"],["dragexit","drag"],["drop","drag"],["wheel","wheel"],["deviceorientation","deviceorientation"],["deviceorientationabsolute","deviceorientation"],["devicemotion","devicemotion"]]),this._hoverHitTargetInterceptorEvents=new Set(["mousemove"]),this._tapHitTargetInterceptorEvents=new Set(["pointerdown","pointerup","touchstart","touchend","touchcancel"]),this._mouseHitTargetInterceptorEvents=new Set(["mousedown","mouseup","pointerdown","pointerup","click","auxclick","dblclick","contextmenu"]),this._allHitTargetInterceptorEvents=new Set([...this._hoverHitTargetInterceptorEvents,...this._tapHitTargetInterceptorEvents,...this._mouseHitTargetInterceptorEvents]),this._engines=new Map,this._engines.set("xpath",mm),this._engines.set("xpath:light",mm),this._engines.set("_react",Dx()),this._engines.set("_vue",S_()),this._engines.set("role",cm(!1)),this._engines.set("text",this._createTextEngine(!0,!1)),this._engines.set("text:light",this._createTextEngine(!1,!1)),this._engines.set("id",this._createAttributeEngine("id",!0)),this._engines.set("id:light",this._createAttributeEngine("id",!1)),this._engines.set("data-testid",this._createAttributeEngine("data-testid",!0)),this._engines.set("data-testid:light",this._createAttributeEngine("data-testid",!1)),this._engines.set("data-test-id",this._createAttributeEngine("data-test-id",!0)),this._engines.set("data-test-id:light",this._createAttributeEngine("data-test-id",!1)),this._engines.set("data-test",this._createAttributeEngine("data-test",!0)),this._engines.set("data-test:light",this._createAttributeEngine("data-test",!1)),this._engines.set("css",this._createCSSEngine()),this._engines.set("nth",{queryAll:()=>[]}),this._engines.set("visible",this._createVisibleEngine()),this._engines.set("internal:control",this._createControlEngine()),this._engines.set("internal:has",this._createHasEngine()),this._engines.set("internal:has-not",this._createHasNotEngine()),this._engines.set("internal:and",{queryAll:()=>[]}),this._engines.set("internal:or",{queryAll:()=>[]}),this._engines.set("internal:chain",this._createInternalChainEngine()),this._engines.set("internal:label",this._createInternalLabelEngine()),this._engines.set("internal:text",this._createTextEngine(!0,!0)),this._engines.set("internal:has-text",this._createInternalHasTextEngine()),this._engines.set("internal:has-not-text",this._createInternalHasNotTextEngine()),this._engines.set("internal:attr",this._createNamedAttributeEngine()),this._engines.set("internal:testid",this._createNamedAttributeEngine()),this._engines.set("internal:role",cm(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:r,source:o}of n.customEngines)this._engines.set(r,this.eval(o));this._stableRafCount=n.stableRafCount,this._browserName=n.browserName,JS({browserNameForWorkarounds:n.browserName}),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),this.isUnderTest&&(this.window.__injectedScript=this)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){const n=Ji(e);return i1(n,r=>{if(!this._engines.has(r.name))throw this.createStacklessError(`Unknown engine "${r.name}" while parsing selector ${e}`)}),n}generateSelector(e,n){return dm(this,e,n)}generateSelectorSimple(e,n){return dm(this,e,{...n,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,n,r){const o=this.querySelectorAll(e,n);if(r&&o.length>1)throw this.strictModeViolationError(e,o);return o[0]}_queryNth(e,n){const r=[...e];let o=+n.body;return o===-1&&(o=r.length-1),new Set(r.slice(o,o+1))}_queryLayoutSelector(e,n,r){const o=n.name,l=n.body,c=[],u=this.querySelectorAll(l.parsed,r);for(const d of e){const p=qg(o,d,u,l.distance);p!==void 0&&c.push({element:d,score:p})}return c.sort((d,p)=>d.score-p.score),new Set(c.map(d=>d.element))}ariaSnapshot(e,n){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");return this._lastAriaSnapshot=Kl(e,n),Gl(this._lastAriaSnapshot,n)}ariaSnapshotForRecorder(){const e=Kl(this.document.body,{forAI:!0});return{ariaSnapshot:Gl(e,{forAI:!0}),refs:e.refs}}getAllByAria(e,n){return kx(e.documentElement,n)}querySelectorAll(e,n){if(e.capture!==void 0){if(e.parts.some(o=>o.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const r={parts:e.parts.slice(0,e.capture+1)};if(e.capture<e.parts.length-1){const o={parts:e.parts.slice(e.capture+1)},l={name:"internal:has",body:{parsed:o},source:Tn(o)};r.parts.push(l)}return this.querySelectorAll(r,n)}if(!n.querySelectorAll)throw this.createStacklessError("Node is not queryable.");if(e.capture!==void 0)throw this.createStacklessError("Internal error: there should not be a capture in the selector.");if(n.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[n];this._evaluator.begin();try{let r=new Set([n]);for(const o of e.parts)if(o.name==="nth")r=this._queryNth(r,o);else if(o.name==="internal:and"){const l=this.querySelectorAll(o.body.parsed,n);r=new Set(l.filter(c=>r.has(c)))}else if(o.name==="internal:or"){const l=this.querySelectorAll(o.body.parsed,n);r=new Set(Yg(new Set([...r,...l])))}else if(jx.includes(o.name))r=this._queryLayoutSelector(r,o,n);else{const l=new Set;for(const c of r){const u=this._queryEngineAll(o,c);for(const d of u)l.add(d)}r=l}return[...r]}finally{this._evaluator.end()}}_queryEngineAll(e,n){const r=this._engines.get(e.name).queryAll(n,e.body);for(const o of r)if(!("nodeName"in o))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(o)}`);return r}_createAttributeEngine(e,n){const r=o=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(o)}]`,functions:[]},combinator:""}]}];return{queryAll:(o,l)=>this._evaluator.query({scope:o,pierceShadow:n},r(l))}}_createCSSEngine(){return{queryAll:(e,n)=>this._evaluator.query({scope:e,pierceShadow:!0},n)}}_createTextEngine(e,n){return{queryAll:(o,l)=>{const{matcher:c,kind:u}=vl(l,n),d=[];let p=null;const g=v=>{if(u==="lax"&&p&&p.contains(v))return!1;const S=ia(this._evaluator._cacheText,v,c);S==="none"&&(p=v),(S==="self"||S==="selfAndChildren"&&u==="strict"&&!n)&&d.push(v)};o.nodeType===Node.ELEMENT_NODE&&g(o);const y=this._evaluator._queryCSS({scope:o,pierceShadow:e},"*");for(const v of y)g(v);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,o=Tt(this._evaluator._cacheText,r),{matcher:l}=vl(n,!0);return l(o)?[r]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,o=Tt(this._evaluator._cacheText,r),{matcher:l}=vl(n,!0);return l(o)?[]:[r]}}}_createInternalLabelEngine(){return{queryAll:(e,n)=>{const{matcher:r}=vl(n,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(l=>Kg(this._evaluator._cacheText,l).some(c=>r(c)))}}}_createNamedAttributeEngine(){return{queryAll:(n,r)=>{const o=br(r,!0);if(o.name||o.attributes.length!==1)throw new Error("Malformed attribute selector: "+r);const{name:l,value:c,caseSensitive:u}=o.attributes[0],d=u?null:c.toLowerCase();let p;return c instanceof RegExp?p=y=>!!y.match(c):u?p=y=>y===c:p=y=>y.toLowerCase().includes(d),this._evaluator._queryCSS({scope:n,pierceShadow:!0},`[${l}]`).filter(y=>p(y.getAttribute(l)))}}}_createDescribeEngine(){return{queryAll:n=>n.nodeType!==1?[]:[n]}}_createControlEngine(){return{queryAll(e,n){if(n==="enter-frame")return[];if(n==="return-empty")return[];if(n==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${n}`)}}}_createHasEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[n]:[]}}_createHasNotEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[]:[n]}}_createVisibleEngine(){return{queryAll:(n,r)=>{if(n.nodeType!==1)return[];const o=r==="true";return Cr(n)===o?[n]:[]}}}_createInternalChainEngine(){return{queryAll:(n,r)=>this.querySelectorAll(r.parsed,n)}}extend(e,n){const r=this.window.eval(`
107
- (() => {
108
- const module = {};
109
- ${e}
110
- return module.exports.default();
111
- })()`);return new r(this,n)}async viewportRatio(e){return await new Promise(n=>{const r=new IntersectionObserver(o=>{n(o[0].intersectionRatio),r.disconnect()});r.observe(e),this.utils.builtins.requestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const n=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(n.borderLeftWidth||"",10),top:parseInt(n.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const n=e.ownerDocument.defaultView;for(let o=e;o;o=lt(o))if(n.getComputedStyle(o).transform!=="none")return"transformed";const r=n.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,n){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(n==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(n==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),n==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const o=r.closest("label");o&&o.control&&(r=o.control)}return r}async checkElementStates(e,n){if(n.includes("stable")){const r=await this._checkElementIsStable(e);if(r===!1)return{missingState:"stable"};if(r==="error:notconnected")return"error:notconnected"}for(const r of n)if(r!=="stable"){const o=this.elementState(e,r);if(o.received==="error:notconnected")return"error:notconnected";if(!o.matches)return{missingState:r}}}async _checkElementIsStable(e){const n=Symbol("continuePolling");let r,o=0,l=0;const c=()=>{const y=this.retarget(e,"no-follow-label");if(!y)return"error:notconnected";const v=this.utils.builtins.performance.now();if(this._stableRafCount>1&&v-l<15)return n;l=v;const S=y.getBoundingClientRect(),k={x:S.top,y:S.left,width:S.width,height:S.height};if(r){if(!(k.x===r.x&&k.y===r.y&&k.width===r.width&&k.height===r.height))return!1;if(++o>=this._stableRafCount)return!0}return r=k,n};let u,d;const p=new Promise((y,v)=>{u=y,d=v}),g=()=>{try{const y=c();y!==n?u(y):this.utils.builtins.requestAnimationFrame(g)}catch(y){d(y)}};return this.utils.builtins.requestAnimationFrame(g),p}_createAriaRefEngine(){return{queryAll:(n,r)=>{var l,c;const o=(c=(l=this._lastAriaSnapshot)==null?void 0:l.elements)==null?void 0:c.get(r);return o&&o.isConnected?[o]:[]}}}elementState(e,n){const r=this.retarget(e,["visible","hidden"].includes(n)?"none":"follow-label");if(!r||!r.isConnected)return n==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(n==="visible"||n==="hidden"){const o=Cr(r);return{matches:n==="visible"?o:!o,received:o?"visible":"hidden"}}if(n==="disabled"||n==="enabled"){const o=Wl(r);return{matches:n==="disabled"?o:!o,received:o?"disabled":"enabled"}}if(n==="editable"){const o=Wl(r),l=fx(r);if(l==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!o&&!l,received:o?"disabled":l?"readOnly":"editable"}}if(n==="checked"||n==="unchecked"){const o=n==="checked",l=cx(r);if(l==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:o===l,received:l?"checked":"unchecked"}}if(n==="indeterminate"){const o=ax(r);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:o==="mixed",received:o===!0?"checked":o===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${n}"`)}selectOptions(e,n){const r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const o=r,l=[...o.options],c=[];let u=n.slice();for(let d=0;d<l.length;d++){const p=l[d],g=y=>{if(y instanceof Node)return p===y;let v=!0;return y.valueOrLabel!==void 0&&(v=v&&(y.valueOrLabel===p.value||y.valueOrLabel===p.label)),y.value!==void 0&&(v=v&&y.value===p.value),y.label!==void 0&&(v=v&&y.label===p.label),y.index!==void 0&&(v=v&&y.index===d),v};if(u.some(g)){if(!this.elementState(p,"enabled").matches)return"error:optionnotenabled";if(c.push(p),o.multiple)u=u.filter(y=>!g(y));else{u=[];break}}}return u.length?"error:optionsnotfound":(o.value=void 0,c.forEach(d=>d.selected=!0),o.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),o.dispatchEvent(new Event("change",{bubbles:!0})),c.map(d=>d.value))}fill(e,n){const r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()==="input"){const o=r,l=o.type.toLowerCase(),c=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(l)&&!c.has(l))throw this.createStacklessError(`Input of type "${l}" cannot be filled`);if(l==="number"&&(n=n.trim(),isNaN(Number(n))))throw this.createStacklessError("Cannot type text into input[type=number]");if(c.has(l)){if(n=n.trim(),o.focus(),o.value=n,o.value!==n)throw this.createStacklessError("Malformed value");return r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),r.dispatchEvent(new Event("change",{bubbles:!0})),"done"}}else if(r.nodeName.toLowerCase()!=="textarea"){if(!r.isContentEditable)throw this.createStacklessError("Element is not an <input>, <textarea> or [contenteditable] element")}return this.selectText(r),"needsinput"}selectText(e){const n=this.retarget(e,"follow-label");if(!n)return"error:notconnected";if(n.nodeName.toLowerCase()==="input"){const l=n;return l.select(),l.focus(),"done"}if(n.nodeName.toLowerCase()==="textarea"){const l=n;return l.selectionStart=0,l.selectionEnd=l.value.length,l.focus(),"done"}const r=n.ownerDocument.createRange();r.selectNodeContents(n);const o=n.ownerDocument.defaultView.getSelection();return o&&(o.removeAllRanges(),o.addRange(r)),n.focus(),"done"}_activelyFocused(e){const n=e.getRootNode().activeElement,r=n===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:n,isFocused:r}}focusNode(e,n){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:r,isFocused:o}=this._activelyFocused(e);if(e.isContentEditable&&!o&&r&&r.blur&&r.blur(),e.focus(),e.focus(),n&&!o&&e.nodeName.toLowerCase()==="input")try{e.setSelectionRange(0,0)}catch{}return"done"}blurNode(e){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");return e.blur(),"done"}setInputFiles(e,n){if(e.nodeType!==Node.ELEMENT_NODE)return"Node is not of type HTMLElement";const r=e;if(r.nodeName!=="INPUT")return"Not an <input> element";const o=r;if((o.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const c=n.map(d=>{const p=Uint8Array.from(atob(d.buffer),g=>g.charCodeAt(0));return new File([p],d.name,{type:d.mimeType,lastModified:d.lastModifiedMs})}),u=new DataTransfer;for(const d of c)u.items.add(d);o.files=u.files,o.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),o.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,n){const r=[];let o=n;for(;o;){const g=xg(o);if(!g||(r.push(g),g.nodeType===9))break;o=g.host}let l;for(let g=r.length-1;g>=0;g--){const y=r[g],v=y.elementsFromPoint(e.x,e.y),S=y.elementFromPoint(e.x,e.y);if(S&&v[0]&&lt(S)===v[0]){const _=this.window.getComputedStyle(S);(_==null?void 0:_.display)==="contents"&&v.unshift(S)}v[0]&&v[0].shadowRoot===y&&v[1]===S&&v.shift();const k=v[0];if(!k||(l=k,g&&k!==r[g-1].host))break}const c=[];for(;l&&l!==n;)c.push(l),l=lt(l);if(l===n)return"done";const u=this.previewNode(c[0]||this.document.documentElement);let d,p=n;for(;p;){const g=c.indexOf(p);if(g!==-1){g>1&&(d=this.previewNode(c[g-1]));break}p=lt(p)}return d?{hitTargetDescription:`${u} from ${d} subtree`}:{hitTargetDescription:u}}setupHitTargetInterceptor(e,n,r,o){const l=this.retarget(e,"button-link");if(!l||!l.isConnected)return"error:notconnected";if(r){const g=this.expectHitTarget(r,l);if(g!=="done")return g.hitTargetDescription}if(n==="drag")return{stop:()=>"done"};const c={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[n];let u;const d=g=>{if(!c.has(g.type)||!g.isTrusted)return;const y=this.window.TouchEvent&&g instanceof this.window.TouchEvent?g.touches[0]:g;u===void 0&&y&&(u=this.expectHitTarget({x:y.clientX,y:y.clientY},l)),(o||u!=="done"&&u!==void 0)&&(g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation())},p=()=>(this._hitTargetInterceptor===d&&(this._hitTargetInterceptor=void 0),u||"done");return this._hitTargetInterceptor=d,{stop:p}}dispatchEvent(e,n,r){var c,u,d;let o;const l={bubbles:!0,cancelable:!0,composed:!0,...r};switch(this._eventTypes.get(n)){case"mouse":o=new MouseEvent(n,l);break;case"keyboard":o=new KeyboardEvent(n,l);break;case"touch":{if(this._browserName==="webkit"){const p=y=>{var k,_;if(y instanceof Touch)return y;let v=y.pageX;v===void 0&&y.clientX!==void 0&&(v=y.clientX+(((k=this.document.scrollingElement)==null?void 0:k.scrollLeft)||0));let S=y.pageY;return S===void 0&&y.clientY!==void 0&&(S=y.clientY+(((_=this.document.scrollingElement)==null?void 0:_.scrollTop)||0)),this.document.createTouch(this.window,y.target??e,y.identifier,v,S,y.screenX,y.screenY,y.radiusX,y.radiusY,y.rotationAngle,y.force)},g=y=>y instanceof TouchList||!y?y:this.document.createTouchList(...y.map(p));l.target??(l.target=e),l.touches=g(l.touches),l.targetTouches=g(l.targetTouches),l.changedTouches=g(l.changedTouches),o=new TouchEvent(n,l)}else l.target??(l.target=e),l.touches=(c=l.touches)==null?void 0:c.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),l.targetTouches=(u=l.targetTouches)==null?void 0:u.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),l.changedTouches=(d=l.changedTouches)==null?void 0:d.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o=new TouchEvent(n,l);break}case"pointer":o=new PointerEvent(n,l);break;case"focus":o=new FocusEvent(n,l);break;case"drag":o=new DragEvent(n,l);break;case"wheel":o=new WheelEvent(n,l);break;case"deviceorientation":try{o=new DeviceOrientationEvent(n,l)}catch{const{bubbles:p,cancelable:g,alpha:y,beta:v,gamma:S,absolute:k}=l;o=this.document.createEvent("DeviceOrientationEvent"),o.initDeviceOrientationEvent(n,p,g,y,v,S,k)}break;case"devicemotion":try{o=new DeviceMotionEvent(n,l)}catch{const{bubbles:p,cancelable:g,acceleration:y,accelerationIncludingGravity:v,rotationRate:S,interval:k}=l;o=this.document.createEvent("DeviceMotionEvent"),o.initDeviceMotionEvent(n,p,g,y,v,S,k)}break;default:o=new Event(n,l);break}e.dispatchEvent(o)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return yl(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return yl(`<${e.nodeName.toLowerCase()} />`);const n=e,r=[];for(let d=0;d<n.attributes.length;d++){const{name:p,value:g}=n.attributes[d];p!=="style"&&(!g&&this._booleanAttributes.has(p)?r.push(` ${p}`):r.push(` ${p}="${g}"`))}r.sort((d,p)=>d.length-p.length);const o=Bp(r.join(""),500);if(this._autoClosingTags.has(n.nodeName))return yl(`<${n.nodeName.toLowerCase()}${o}/>`);const l=n.childNodes;let c=!1;if(l.length<=5){c=!0;for(let d=0;d<l.length;d++)c=c&&l[d].nodeType===Node.TEXT_NODE}const u=c?n.textContent||"":l.length?"…":"";return yl(`<${n.nodeName.toLowerCase()}${o}>${Bp(u,50)}</${n.nodeName.toLowerCase()}>`)}strictModeViolationError(e,n){const r=n.slice(0,10).map(l=>({preview:this.previewNode(l),selector:this.generateSelectorSimple(l)})),o=r.map((l,c)=>`
112
- ${c+1}) ${l.preview} aka ${Tr(this._sdkLanguage,l.selector)}`);return r.length<n.length&&o.push(`
113
- ...`),this.createStacklessError(`strict mode violation: ${Tr(this._sdkLanguage,Tn(e))} resolved to ${n.length} elements:${o.join("")}
114
- `)}createStacklessError(e){if(this._browserName==="firefox"){const r=new Error("Error: "+e);return r.stack="",r}const n=new Error(e);return delete n.stack,n}createHighlight(){return new vu(this)}maskSelectors(e,n){this._highlight&&this.hideHighlight(),this._highlight=new vu(this),this._highlight.install();const r=[];for(const o of e)r.push(this.querySelectorAll(o,this.document.documentElement));this._highlight.maskElements(r.flat(),n)}highlight(e){this._highlight||(this._highlight=new vu(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,n){var c,u;((c=this._markedElements)==null?void 0:c.callId)!==n&&(this._markedElements=void 0);const r=((u=this._markedElements)==null?void 0:u.elements)||new Set,o=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:n,composed:!0});for(const d of r)e.has(d)||d.dispatchEvent(o);const l=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:n,composed:!0});for(const d of e)r.has(d)||d.dispatchEvent(l);this._markedElements={callId:n,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let n=!1;const r=()=>n=!0;this.window.addEventListener(e,r),new MutationObserver(o=>{if(o.some(c=>Array.from(c.addedNodes).includes(this.document.documentElement))&&(n=!1,this.window.dispatchEvent(new CustomEvent(e)),!n)){this.window.addEventListener(e,r);for(const c of this.onGlobalListenersRemoved)c()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=r=>{var o;return(o=this._hitTargetInterceptor)==null?void 0:o.call(this,r)},n=()=>{for(const r of this._allHitTargetInterceptorEvents)this.window.addEventListener(r,e,{capture:!0,passive:!1})};n(),this.onGlobalListenersRemoved.add(n)}async expect(e,n,r){var l,c;if(n.expression==="to.have.count"||n.expression.endsWith(".array"))return this.expectArray(r,n);if(!e){if(!n.isNot&&n.expression==="to.be.hidden")return{matches:!0};if(n.isNot&&n.expression==="to.be.visible")return{matches:!1};if(!n.isNot&&n.expression==="to.be.detached")return{matches:!0};if(n.isNot&&n.expression==="to.be.attached")return{matches:!1};if(n.isNot&&n.expression==="to.be.in.viewport")return{matches:!1};if(n.expression==="to.have.title"&&((l=n==null?void 0:n.expectedText)!=null&&l[0])){const u=new fs(n.expectedText[0]),d=this.document.title;return{received:d,matches:u.matches(d)}}if(n.expression==="to.have.url"&&((c=n==null?void 0:n.expectedText)!=null&&c[0])){const u=new fs(n.expectedText[0]),d=this.document.location.href;return{received:d,matches:u.matches(d)}}return{matches:n.isNot,missingReceived:!0}}return await this.expectSingleElement(e,n)}async expectSingleElement(e,n){var o;const r=n.expression;{let l;if(r==="to.have.attribute"){const c=e.hasAttribute(n.expressionArg);l={matches:c,received:c?"attribute present":"attribute not present"}}else if(r==="to.be.checked"){const{checked:c,indeterminate:u}=n.expectedValue;if(u){if(c!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");l=this.elementState(e,"indeterminate")}else l=this.elementState(e,c===!1?"unchecked":"checked")}else if(r==="to.be.disabled")l=this.elementState(e,"disabled");else if(r==="to.be.editable")l=this.elementState(e,"editable");else if(r==="to.be.readonly")l=this.elementState(e,"editable"),l.matches=!l.matches;else if(r==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e.value;l={matches:!c,received:c?"notEmpty":"empty"}}else{const c=(o=e.textContent)==null?void 0:o.trim();l={matches:!c,received:c?"notEmpty":"empty"}}else if(r==="to.be.enabled")l=this.elementState(e,"enabled");else if(r==="to.be.focused"){const c=this._activelyFocused(e).isFocused;l={matches:c,received:c?"focused":"inactive"}}else r==="to.be.hidden"?l=this.elementState(e,"hidden"):r==="to.be.visible"?l=this.elementState(e,"visible"):r==="to.be.attached"?l={matches:!0,received:"attached"}:r==="to.be.detached"&&(l={matches:!1,received:"attached"});if(l){if(l.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return l}}if(r==="to.have.property"){let l=e;const c=n.expressionArg.split(".");for(let p=0;p<c.length-1;p++){if(typeof l!="object"||!(c[p]in l))return{received:void 0,matches:!1};l=l[c[p]]}const u=l[c[c.length-1]],d=Bu(u,n.expectedValue);return{received:u,matches:d}}if(r==="to.be.in.viewport"){const l=await this.viewportRatio(e);return{received:`viewport ratio ${l}`,matches:l>0&&l>(n.expectedNumber??0)-1e-9}}if(r==="to.have.values"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="SELECT"||!e.multiple)throw this.createStacklessError("Not a select element with a multiple attribute");const l=[...e.selectedOptions].map(c=>c.value);return l.length!==n.expectedText.length?{received:l,matches:!1}:{received:l,matches:l.map((c,u)=>new fs(n.expectedText[u]).matches(c)).every(Boolean)}}if(r==="to.match.aria"){const l=Ex(e,n.expectedValue);return{received:l.received,matches:!!l.matches.length}}{let l;if(r==="to.have.attribute.value"){const c=e.getAttribute(n.expressionArg);if(c===null)return{received:null,matches:!1};l=c}else if(["to.have.class","to.contain.class"].includes(r)){if(!n.expectedText)throw this.createStacklessError("Expected text is not provided for "+r);return{received:e.classList.toString(),matches:new fs(n.expectedText[0]).matchesClassList(this,e.classList,r==="to.contain.class")}}else if(r==="to.have.css")l=this.window.getComputedStyle(e).getPropertyValue(n.expressionArg);else if(r==="to.have.id")l=e.id;else if(r==="to.have.text")l=n.useInnerText?e.innerText:Tt(new Map,e).full;else if(r==="to.have.accessible.name")l=Vi(e,!1);else if(r==="to.have.accessible.description")l=rm(e,!1);else if(r==="to.have.accessible.error.message")l=ox(e);else if(r==="to.have.role")l=nt(e)||"";else if(r==="to.have.value"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"&&e.nodeName!=="SELECT")throw this.createStacklessError("Not an input element");l=e.value}if(l!==void 0&&n.expectedText){const c=new fs(n.expectedText[0]);return{received:l,matches:c.matches(l)}}}throw this.createStacklessError("Unknown expect matcher: "+r)}expectArray(e,n){const r=n.expression;if(r==="to.have.count"){const d=e.length,p=d===n.expectedNumber;return{received:d,matches:p}}if(!n.expectedText)throw this.createStacklessError("Expected text is not provided for "+r);if(["to.have.class.array","to.contain.class.array"].includes(r)){const d=e.map(y=>y.classList),p=d.map(String);if(d.length!==n.expectedText.length)return{received:p,matches:!1};const g=this._matchSequentially(n.expectedText,d,(y,v)=>y.matchesClassList(this,v,r==="to.contain.class.array"));return{received:p,matches:g}}if(!["to.contain.text.array","to.have.text.array"].includes(r))throw this.createStacklessError("Unknown expect matcher: "+r);const o=e.map(d=>n.useInnerText?d.innerText:Tt(new Map,d).full),l=r!=="to.contain.text.array";if(!(o.length===n.expectedText.length||!l))return{received:o,matches:!1};const u=this._matchSequentially(n.expectedText,o,(d,p)=>d.matches(p));return{received:o,matches:u}}_matchSequentially(e,n,r){const o=e.map(u=>new fs(u));let l=0,c=0;for(;l<o.length&&c<n.length;)r(o[l],n[c])&&++l,++c;return l===o.length}}function yl(t){return t.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function B_(t){if(t=t.substring(1,t.length-1),!t.includes("\\"))return t;const e=[];let n=0;for(;n<t.length;)t[n]==="\\"&&n+1<t.length&&n++,e.push(t[n++]);return e.join("")}function vl(t,e){if(t[0]==="/"&&t.lastIndexOf("/")>0){const o=t.lastIndexOf("/"),l=new RegExp(t.substring(1,o),t.substring(o+1));return{matcher:c=>l.test(c.full),kind:"regex"}}const n=e?JSON.parse.bind(JSON):B_;let r=!1;return t.length>1&&t[0]==='"'&&t[t.length-1]==='"'?(t=n(t),r=!0):e&&t.length>1&&t[0]==='"'&&t[t.length-2]==='"'&&t[t.length-1]==="i"?(t=n(t.substring(0,t.length-1)),r=!1):e&&t.length>1&&t[0]==='"'&&t[t.length-2]==='"'&&t[t.length-1]==="s"?(t=n(t.substring(0,t.length-1)),r=!0):t.length>1&&t[0]==="'"&&t[t.length-1]==="'"&&(t=n(t),r=!0),t=mt(t),r?e?{kind:"strict",matcher:l=>l.normalized===t}:{matcher:l=>!t&&!l.immediate.length?!0:l.immediate.some(c=>mt(c)===t),kind:"strict"}:(t=t.toLowerCase(),{kind:"lax",matcher:o=>o.normalized.toLowerCase().includes(t)})}class fs{constructor(e){if(this._normalizeWhiteSpace=e.normalizeWhiteSpace,this._ignoreCase=e.ignoreCase,this._string=e.matchSubstring?void 0:this.normalize(e.string),this._substring=e.matchSubstring?this.normalize(e.string):void 0,e.regexSource){const n=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&n.delete("i"),e.ignoreCase===!0&&n.add("i"),this._regex=new RegExp(e.regexSource,[...n].join(""))}}matches(e){return this._regex||(e=this.normalize(e)),this._string!==void 0?e===this._string:this._substring!==void 0?e.includes(this._substring):this._regex?!!this._regex.test(e):!1}matchesClassList(e,n,r){if(r){if(this._regex)throw e.createStacklessError("Partial matching does not support regular expressions. Please provide a string value.");return this._string.split(/\s+/g).filter(Boolean).every(o=>n.contains(o))}return this.matches(n.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=mt(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function Bu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!Bu(t[r],e[r]))return!1;return!0}if(t instanceof RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(let r=0;r<n.length;++r)if(!e.hasOwnProperty(n[r]))return!1;for(const r of n)if(!Bu(t[r],e[r]))return!1;return!0}return typeof t=="number"&&typeof e=="number"?isNaN(t)&&isNaN(e):!1}const z_={tagName:"svg",children:[{tagName:"defs",children:[{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gripper"},children:[{tagName:"path",attrs:{d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-circle-large-filled"},children:[{tagName:"path",attrs:{d:"M8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674 7.157 7.157 0 0 1-2.516 2.509 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-inspect"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 3l1-1h12l1 1v6h-1V3H2v8h5v1H2l-1-1V3zm14.707 9.707L9 6v9.414l2.707-2.707h4zM10 13V8.414l3.293 3.293h-2L10 13z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-whole-word"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 11H1V13H15V11H16V14H15H1H0V11Z"}},{tagName:"path",attrs:{d:"M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z"}},{tagName:"path",attrs:{d:"M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-eye"},children:[{tagName:"path",attrs:{d:"M7.99993 6.00316C9.47266 6.00316 10.6666 7.19708 10.6666 8.66981C10.6666 10.1426 9.47266 11.3365 7.99993 11.3365C6.52715 11.3365 5.33324 10.1426 5.33324 8.66981C5.33324 7.19708 6.52715 6.00316 7.99993 6.00316ZM7.99993 7.00315C7.07946 7.00315 6.33324 7.74935 6.33324 8.66981C6.33324 9.59028 7.07946 10.3365 7.99993 10.3365C8.9204 10.3365 9.6666 9.59028 9.6666 8.66981C9.6666 7.74935 8.9204 7.00315 7.99993 7.00315ZM7.99993 3.66675C11.0756 3.66675 13.7307 5.76675 14.4673 8.70968C14.5344 8.97755 14.3716 9.24908 14.1037 9.31615C13.8358 9.38315 13.5643 9.22041 13.4973 8.95248C12.8713 6.45205 10.6141 4.66675 7.99993 4.66675C5.38454 4.66675 3.12664 6.45359 2.50182 8.95555C2.43491 9.22341 2.16348 9.38635 1.89557 9.31948C1.62766 9.25255 1.46471 8.98115 1.53162 8.71321C2.26701 5.76856 4.9229 3.66675 7.99993 3.66675Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-symbol-constant"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 6h8v1H4V6zm8 3H4v1h8V9z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 4l1-1h12l1 1v8l-1 1H2l-1-1V4zm1 0v8h12V4H2z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-check"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-close"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-pass"},children:[{tagName:"path",attrs:{d:"M6.27 10.87h.71l4.56-4.56-.71-.71-4.2 4.21-1.92-1.92L4 8.6l2.27 2.27z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gist"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.57 1.14l3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13l.5-.5h7.72l.35.14zM10 5h3l-3-3v3zM3 2v12h10V6H9.5L9 5.5V2H3zm2.062 7.533l1.817-1.828L6.17 7 4 9.179v.707l2.171 2.174.707-.707-1.816-1.82zM8.8 7.714l.7-.709 2.189 2.175v.709L9.5 12.062l-.705-.709 1.831-1.82L8.8 7.714z"}}]}]}]},Ht={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f"};class gm{cursor(){return"default"}}class _u{constructor(e,n){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=n}cursor(){return"pointer"}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){var n;Ue(e),e.button===0&&(n=this._hoveredModel)!=null&&n.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){Ue(e)}onPointerUp(e){Ue(e)}onMouseDown(e){Ue(e)}onMouseUp(e){Ue(e)}onMouseMove(e){var o;Ue(e);let n=this._recorder.deepEventTarget(e);if(n.isConnected||(n=null),this._hoveredElement===n)return;this._hoveredElement=n;let r=null;if(this._hoveredElement){const l=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});r={selector:l.selector,elements:l.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,l.selector),color:this._assertVisibility?Ht.assert:Ht.single}}((o=this._hoveredModel)==null?void 0:o.selector)!==(r==null?void 0:r.selector)&&(this._hoveredModel=r,this._recorder.updateHighlight(r,!0))}onMouseEnter(e){Ue(e)}onMouseLeave(e){Ue(e);const n=this._recorder.injectedScript.window;n.top!==n&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){Ue(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){Ue(e)}onScroll(e){this._reset(!1)}_commit(e,n){var r;this._assertVisibility?(this._recorder.recordAction({name:"assertVisible",selector:e,signals:[]}),this._recorder.setMode("recording"),(r=this._recorder.overlay)==null||r.flashToolSucceeded("assertingVisibility")):this._recorder.elementPicked(e,n)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class H_{constructor(e){this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._observer=null,this._recorder=e,this._performingActions=new Set}cursor(){return"pointer"}_installObserverIfNeeded(){var e;this._observer||(e=this._recorder.injectedScript.document)!=null&&e.body&&(this._observer=new MutationObserver(n=>{if(this._hoveredElement)for(const r of n)for(const o of r.removedNodes)(o===this._hoveredElement||o.contains(this._hoveredElement))&&this._resetHoveredModel()}),this._observer.observe(this._recorder.injectedScript.document.body,{childList:!0,subtree:!0}))}uninstall(){var e;(e=this._observer)==null||e.disconnect(),this._observer=null,this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1}onClick(e){if(Es(this._hoveredElement)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel))return;const n=Hi(this._recorder.deepEventTarget(e));if(n&&e.detail===1){this._performAction({name:n.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[]});return}this._cancelPendingClickAction(),e.detail===1&&(this._pendingClickAction={action:{name:"click",selector:this._hoveredModel.selector,position:zi(e),signals:[],button:Ql(e),modifiers:_s(e),clickCount:e.detail},timeout:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){Es(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:zi(e),signals:[],button:Ql(e),modifiers:_s(e),clickCount:e.detail}))}_commitPendingClickAction(){this._pendingClickAction&&this._performAction(this._pendingClickAction.action),this._cancelPendingClickAction()}_cancelPendingClickAction(){this._pendingClickAction&&this._recorder.injectedScript.utils.builtins.clearTimeout(this._pendingClickAction.timeout),this._pendingClickAction=void 0}onContextMenu(e){this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||this._performAction({name:"click",selector:this._hoveredModel.selector,position:zi(e),signals:[],button:"right",modifiers:0,clickCount:0})}onPointerDown(e){this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onPointerUp(e){this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseDown(e){this._shouldIgnoreMouseEvent(e)||(this._consumeWhenAboutToPerform(e),this._activeModel=this._hoveredModel)}onMouseUp(e){this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseMove(e){const n=this._recorder.deepEventTarget(e);this._hoveredElement!==n&&(this._hoveredElement=n,this._updateModelForHoveredElement())}onMouseLeave(e){const n=this._recorder.injectedScript.window;n.top!==n&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredElement=null,this._updateModelForHoveredElement())}onFocus(e){this._onFocus(!0)}onInput(e){const n=this._recorder.deepEventTarget(e);if(n.nodeName==="INPUT"&&n.type.toLowerCase()==="file"){this._recorder.recordAction({name:"setInputFiles",selector:this._activeModel.selector,signals:[],files:[...n.files||[]].map(r=>r.name)});return}if(Es(n)){this._recorder.recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:n.value});return}if(["INPUT","TEXTAREA"].includes(n.nodeName)||n.isContentEditable){if(n.nodeName==="INPUT"&&["checkbox","radio"].includes(n.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recorder.recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:n.isContentEditable?n.innerText:n.value})}if(n.nodeName==="SELECT"){const r=n;this._recorder.recordAction({name:"select",selector:this._activeModel.selector,options:[...r.selectedOptions].map(o=>o.value),signals:[]})}}onKeyDown(e){if(this._shouldGenerateKeyPressFor(e)){if(this._actionInProgress(e)){this._expectProgrammaticKeyUp=!0;return}if(!this._consumedDueWrongTarget(e)){if(e.key===" "){const n=Hi(this._recorder.deepEventTarget(e));if(n&&e.detail===0){this._performAction({name:n.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[]});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:_s(e)})}}}onKeyUp(e){if(this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){Ue(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._resetHoveredModel()}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const n=K_(this._recorder.document);if(e&&n===this._recorder.document.body)return;const r=n?this._recorder.injectedScript.generateSelector(n,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=r&&r.selector?{...r,color:Ht.action}:null,e&&(this._hoveredElement=n,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const n=this._recorder.deepEventTarget(e),r=n.nodeName;return!!(r==="SELECT"||r==="OPTION"||r==="INPUT"&&["date","range"].includes(n.type))}_actionInProgress(e){const n=e instanceof KeyboardEvent,r=e instanceof MouseEvent||e instanceof PointerEvent;for(const o of this._performingActions)if(n&&o.name==="press"&&e.key===o.key||r&&(o.name==="click"||o.name==="check"||o.name==="uncheck"))return!0;return Ue(e),!1}_consumedDueToNoModel(e,n){return n?!1:(Ue(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(Ue(e),!0)}_consumeWhenAboutToPerform(e){this._performingActions.size||Ue(e)}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e);const n=this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1)});this._recorder.injectedScript.isUnderTest&&n.then(()=>{console.error("Action performed for test: "+JSON.stringify({hovered:this._hoveredModel?this._hoveredModel.selector:null,active:this._activeModel?this._activeModel.selector:null}))})}_shouldGenerateKeyPressFor(e){if(typeof e.key!="string"||e.key==="Enter"&&(this._recorder.deepEventTarget(e).nodeName==="TEXTAREA"||this._recorder.deepEventTarget(e).isContentEditable)||["Backspace","Delete","AltGraph"].includes(e.key)||e.key==="@"&&e.code==="KeyL")return!1;if(navigator.platform.includes("Mac")){if(e.key==="v"&&e.metaKey)return!1}else if(e.key==="v"&&e.ctrlKey||e.key==="Insert"&&e.shiftKey)return!1;if(["Shift","Control","Meta","Alt","Process"].includes(e.key))return!1;const n=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!n?!!Hi(this._recorder.deepEventTarget(e)):!0}_updateModelForHoveredElement(){if(this._installObserverIfNeeded(),this._performingActions.size)return;if(!this._hoveredElement||!this._hoveredElement.isConnected){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!0);return}const{selector:e,elements:n}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoveredModel&&this._hoveredModel.selector===e||(this._hoveredModel=e?{selector:e,elements:n,color:Ht.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class U_{constructor(e){this._recorder=e}cursor(){return"pointer"}onClick(e){const n=this._recorder.deepEventTarget(e);if(Es(n)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const r=Hi(n),{ariaSnapshot:o,selector:l}=this._ariaSnapshot(n);if(r&&e.detail===1){this._recorder.recordAction({name:r.checked?"check":"uncheck",selector:l,signals:[],ariaSnapshot:o});return}this._recorder.recordAction({name:"click",selector:l,ariaSnapshot:o,position:zi(e),signals:[],button:Ql(e),modifiers:_s(e),clickCount:e.detail})}onDblClick(e){const n=this._recorder.deepEventTarget(e);if(Es(n)||this._shouldIgnoreMouseEvent(e))return;const{ariaSnapshot:r,selector:o}=this._ariaSnapshot(n);this._recorder.recordAction({name:"click",selector:o,ariaSnapshot:r,position:zi(e),signals:[],button:Ql(e),modifiers:_s(e),clickCount:e.detail})}onInput(e){const n=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:o}=this._ariaSnapshot(n);if(Es(n)){this._recorder.recordAction({name:"fill",selector:o,ariaSnapshot:r,signals:[],text:n.value});return}if(["INPUT","TEXTAREA"].includes(n.nodeName)||n.isContentEditable){if(n.nodeName==="INPUT"&&["checkbox","radio"].includes(n.type.toLowerCase()))return;this._recorder.recordAction({name:"fill",selector:o,ariaSnapshot:r,signals:[],text:n.isContentEditable?n.innerText:n.value});return}if(n.nodeName==="SELECT"){const l=n;this._recorder.recordAction({name:"select",selector:o,ariaSnapshot:r,options:[...l.selectedOptions].map(c=>c.value),signals:[]});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const n=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:o}=this._ariaSnapshot(n);if(e.key===" "){const l=Hi(n);if(l&&e.detail===0){this._recorder.recordAction({name:l.checked?"uncheck":"check",selector:o,ariaSnapshot:r,signals:[]});return}}this._recorder.recordAction({name:"press",selector:o,ariaSnapshot:r,signals:[],key:e.key,modifiers:_s(e)})}_shouldIgnoreMouseEvent(e){const n=this._recorder.deepEventTarget(e),r=n.nodeName;return!!(r==="SELECT"||r==="OPTION"||r==="INPUT"&&["date","range"].includes(n.type))}_shouldGenerateKeyPressFor(e){if(typeof e.key!="string"||e.key==="Enter"&&(this._recorder.deepEventTarget(e).nodeName==="TEXTAREA"||this._recorder.deepEventTarget(e).isContentEditable)||["Backspace","Delete","AltGraph"].includes(e.key)||e.key==="@"&&e.code==="KeyL")return!1;if(navigator.platform.includes("Mac")){if(e.key==="v"&&e.metaKey)return!1}else if(e.key==="v"&&e.ctrlKey||e.key==="Insert"&&e.shiftKey)return!1;if(["Shift","Control","Meta","Alt","Process"].includes(e.key))return!1;const n=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!n?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"||e.isContentEditable)}_ariaSnapshot(e){const{ariaSnapshot:n,refs:r}=this._recorder.injectedScript.ariaSnapshotForRecorder(),o=e?r.get(e):void 0,l=o?`aria-ref=${o}`:void 0;return{ariaSnapshot:n,selector:l}}}class Eu{constructor(e,n){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=n,this._dialog=new W_(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){Ue(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const n=this._recorder.deepEventTarget(e);this._elementHasValue(n)&&e.preventDefault()}onPointerUp(e){var r;const n=(r=this._hoverHighlight)==null?void 0:r.elements[0];this._kind==="value"&&n&&(n.nodeName==="INPUT"||n.nodeName==="SELECT")&&n.disabled&&this._commitAssertValue()}onMouseMove(e){var r;if(this._dialog.isShowing())return;const n=this._recorder.deepEventTarget(e);if(((r=this._hoverHighlight)==null?void 0:r.elements[0])!==n){if(this._kind==="text"||this._kind==="snapshot")this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,n).full?{elements:[n],selector:"",color:Ht.assert}:null;else if(this._elementHasValue(n)){const o=this._recorder.injectedScript.generateSelector(n,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:o.selector,elements:o.elements,color:Ht.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),Ue(e)}onScroll(e){this._recorder.updateHighlight(this._hoverHighlight,!1)}_elementHasValue(e){return e.nodeName==="TEXTAREA"||e.nodeName==="SELECT"||e.nodeName==="INPUT"&&!["button","image","reset","submit"].includes(e.type)}_generateAction(){var n;this._textCache.clear();const e=(n=this._hoverHighlight)==null?void 0:n.elements[0];if(!e)return null;if(this._kind==="value"){if(!this._elementHasValue(e))return null;const{selector:r}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName==="INPUT"&&["checkbox","radio"].includes(e.type.toLowerCase())?{name:"assertChecked",selector:r,signals:[],checked:!e.checked}:{name:"assertValue",selector:r,signals:[],value:e.value}}else if(this._kind==="snapshot"){const r=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:r.selector,elements:r.elements,color:Ht.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"regex"})}}else{const r=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:r.selector,elements:r.elements,color:Ht.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertText",selector:this._hoverHighlight.selector,signals:[],text:this._recorder.injectedScript.utils.elementText(this._textCache,e).normalized,substring:!0}}}_renderValue(e){return(e==null?void 0:e.name)==="assertText"?this._recorder.injectedScript.utils.normalizeWhiteSpace(e.text):(e==null?void 0:e.name)==="assertChecked"?String(e.checked):(e==null?void 0:e.name)==="assertValue"?e.value:(e==null?void 0:e.name)==="assertSnapshot"?e.ariaSnapshot:""}_commit(){!this._action||!this._dialog.isShowing()||(this._dialog.close(),this._recorder.recordAction(this._action),this._recorder.setMode("recording"))}_showDialog(){var e,n,r,o;(e=this._hoverHighlight)!=null&&e.elements[0]&&(this._action=this._generateAction(),((n=this._action)==null?void 0:n.name)==="assertText"?this._showTextDialog(this._action):((r=this._action)==null?void 0:r.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(o=this._recorder.overlay)==null||o.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const n=this._recorder.document.createElement("textarea");n.setAttribute("spellcheck","false"),n.value=this._renderValue(e),n.classList.add("text-editor");const r=()=>{var y;const u=this._recorder.injectedScript.utils.normalizeWhiteSpace(n.value),d=(y=this._hoverHighlight)==null?void 0:y.elements[0];if(!d)return;e.text=u;const p=this._recorder.injectedScript.utils.elementText(this._textCache,d).normalized,g=u&&p.includes(u);n.classList.toggle("does-not-match",!g)};n.addEventListener("input",r);const l=this._dialog.show({label:"Assert that element contains text",body:n,onCommit:()=>this._commit()}),c=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),l);this._dialog.moveTo(c.anchorTop,c.anchorLeft),n.focus()}_commitAssertValue(){var n;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(n=this._recorder.overlay)==null||n.flashToolSucceeded("assertingValue"))}}class q_{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._recorder=e;const n=this._recorder.document;this._overlayElement=n.createElement("x-pw-overlay");const r=n.createElement("x-pw-tools-list");this._overlayElement.appendChild(r),this._dragHandle=n.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(n.createElement("x-div")),r.appendChild(this._dragHandle),this._recordToggle=this._recorder.document.createElement("x-pw-tool-item"),this._recordToggle.title="Record",this._recordToggle.classList.add("record"),this._recordToggle.appendChild(this._recorder.document.createElement("x-div")),r.appendChild(this._recordToggle),this._pickLocatorToggle=this._recorder.document.createElement("x-pw-tool-item"),this._pickLocatorToggle.title="Pick locator",this._pickLocatorToggle.classList.add("pick-locator"),this._pickLocatorToggle.appendChild(this._recorder.document.createElement("x-div")),r.appendChild(this._pickLocatorToggle),this._assertVisibilityToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertVisibilityToggle.title="Assert visibility",this._assertVisibilityToggle.classList.add("visibility"),this._assertVisibilityToggle.appendChild(this._recorder.document.createElement("x-div")),r.appendChild(this._assertVisibilityToggle),this._assertTextToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertTextToggle.title="Assert text",this._assertTextToggle.classList.add("text"),this._assertTextToggle.appendChild(this._recorder.document.createElement("x-div")),r.appendChild(this._assertTextToggle),this._assertValuesToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertValuesToggle.title="Assert value",this._assertValuesToggle.classList.add("value"),this._assertValuesToggle.appendChild(this._recorder.document.createElement("x-div")),r.appendChild(this._assertValuesToggle),this._assertSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertSnapshotToggle.title="Assert snapshot",this._assertSnapshotToggle.classList.add("snapshot"),this._assertSnapshotToggle.appendChild(this._recorder.document.createElement("x-div")),r.appendChild(this._assertSnapshotToggle),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){gy(this._listeners),this._listeners=[Le(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),Le(this._recordToggle,"click",()=>{this._recordToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="none"||this._recorder.state.mode==="standby"||this._recorder.state.mode==="inspecting"?"recording":"standby")}),Le(this._pickLocatorToggle,"click",()=>{if(this._pickLocatorToggle.classList.contains("disabled"))return;const e={inspecting:"standby",none:"inspecting",standby:"inspecting",recording:"recording-inspecting","recording-inspecting":"recording",assertingText:"recording-inspecting",assertingVisibility:"recording-inspecting",assertingValue:"recording-inspecting",assertingSnapshot:"recording-inspecting"};this._recorder.setMode(e[this._recorder.state.mode])}),Le(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),Le(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),Le(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),Le(this._assertSnapshotToggle,"click",()=>{this._assertSnapshotToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingSnapshot"?"recording":"assertingSnapshot")})]}install(){this._recorder.highlight.appendChild(this._overlayElement),this._refreshListeners(),this._updateVisualPosition()}contains(e){return this._recorder.injectedScript.utils.isInsideScope(this._overlayElement,e)}setUIState(e){this._recordToggle.classList.toggle("toggled",e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="recording-inspecting"),this._pickLocatorToggle.classList.toggle("toggled",e.mode==="inspecting"||e.mode==="recording-inspecting"),this._assertVisibilityToggle.classList.toggle("toggled",e.mode==="assertingVisibility"),this._assertVisibilityToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertTextToggle.classList.toggle("toggled",e.mode==="assertingText"),this._assertTextToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertValuesToggle.classList.toggle("toggled",e.mode==="assertingValue"),this._assertValuesToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertSnapshotToggle.classList.toggle("toggled",e.mode==="assertingSnapshot"),this._assertSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._offsetX!==e.overlay.offsetX&&(this._offsetX=e.overlay.offsetX,this._updateVisualPosition()),e.mode==="none"?this._hideOverlay():this._showOverlay()}flashToolSucceeded(e){let n;e==="assertingVisibility"?n=this._assertVisibilityToggle:e==="assertingSnapshot"?n=this._assertSnapshotToggle:n=this._assertValuesToggle,n.classList.add("succeeded"),this._recorder.injectedScript.utils.builtins.setTimeout(()=>n.classList.remove("succeeded"),2e3)}_hideOverlay(){this._overlayElement.setAttribute("hidden","true")}_showOverlay(){this._overlayElement.hasAttribute("hidden")&&(this._overlayElement.removeAttribute("hidden"),this._updateVisualPosition())}_updateVisualPosition(){this._measure=this._overlayElement.getBoundingClientRect(),this._overlayElement.style.left=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2+this._offsetX+"px"}onMouseMove(e){if(!e.buttons)return this._dragState=void 0,!1;if(this._dragState){this._offsetX=this._dragState.offsetX+e.clientX-this._dragState.dragStart.x;const n=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-n,Math.min(n,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),Ue(e),!0}return!1}onMouseUp(e){return this._dragState?(Ue(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,Ue(e),!0):!1}onDblClick(e){return!1}}class V_{constructor(e,n){var r,o;this._listeners=[],this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.state={mode:"none",testIdAttributeName:"data-testid",language:"javascript",overlay:{offsetX:0}},this._delegate={},this.document=e.document,this.injectedScript=e,this.highlight=e.createHighlight(),this._tools={none:new gm,standby:new gm,inspecting:new _u(this,!1),recording:(n==null?void 0:n.recorderMode)==="api"?new U_(this):new H_(this),"recording-inspecting":new _u(this,!1),assertingText:new Eu(this,"text"),assertingVisibility:new _u(this,!0),assertingValue:new Eu(this,"value"),assertingSnapshot:new Eu(this,"snapshot")},this._currentTool=this._tools.none,(o=(r=this._currentTool).install)==null||o.call(r),e.window.top===e.window&&(this.overlay=new q_(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
115
- body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
116
- body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
117
- `),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var r,o,l;gy(this._listeners),this._listeners=[Le(this.document,"click",c=>this._onClick(c),!0),Le(this.document,"auxclick",c=>this._onClick(c),!0),Le(this.document,"dblclick",c=>this._onDblClick(c),!0),Le(this.document,"contextmenu",c=>this._onContextMenu(c),!0),Le(this.document,"dragstart",c=>this._onDragStart(c),!0),Le(this.document,"input",c=>this._onInput(c),!0),Le(this.document,"keydown",c=>this._onKeyDown(c),!0),Le(this.document,"keyup",c=>this._onKeyUp(c),!0),Le(this.document,"pointerdown",c=>this._onPointerDown(c),!0),Le(this.document,"pointerup",c=>this._onPointerUp(c),!0),Le(this.document,"mousedown",c=>this._onMouseDown(c),!0),Le(this.document,"mouseup",c=>this._onMouseUp(c),!0),Le(this.document,"mousemove",c=>this._onMouseMove(c),!0),Le(this.document,"mouseleave",c=>this._onMouseLeave(c),!0),Le(this.document,"mouseenter",c=>this._onMouseEnter(c),!0),Le(this.document,"focus",c=>this._onFocus(c),!0),Le(this.document,"scroll",c=>this._onScroll(c),!0)],this.highlight.install();let e;const n=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(n,500)};e=this.injectedScript.utils.builtins.setTimeout(n,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(yy(this.document,z_)),(r=this.overlay)==null||r.install(),(l=(o=this._currentTool)==null?void 0:o.install)==null||l.call(o),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var n,r,o,l,c;const e=this._tools[this.state.mode];e!==this._currentTool&&((r=(n=this._currentTool).uninstall)==null||r.call(n),this.clearHighlight(),this._currentTool=e,(l=(o=this._currentTool).install)==null||l.call(o),(c=this.injectedScript.document.body)==null||c.setAttribute("data-pw-cursor",e.cursor()))}setUIState(e,n){var l;this._delegate=n,e.actionPoint&&this.state.actionPoint&&e.actionPoint.x===this.state.actionPoint.x&&e.actionPoint.y===this.state.actionPoint.y||!e.actionPoint&&!this.state.actionPoint||(e.actionPoint?this.highlight.showActionPoint(e.actionPoint.x,e.actionPoint.y):this.highlight.hideActionPoint()),this.state=e,this.highlight.setLanguage(e.language),this._switchCurrentTool(),(l=this.overlay)==null||l.setUIState(e);let r="noop";if(e.actionSelector!==this._lastHighlightedSelector){const c=e.actionSelector?G_(this.injectedScript,e.language,e.actionSelector,this.document):null;r=c!=null&&c.length?c:"clear",this._lastHighlightedSelector=c!=null&&c.length?e.actionSelector:void 0}const o=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==o){const c=e.ariaTemplate?this.injectedScript.getAllByAria(this.document,e.ariaTemplate):[];if(c.length){const u=c.length>1?Ht.multiple:Ht.single;r=c.map(d=>({element:d,color:u})),this._lastHighlightedAriaTemplateJSON=o}else this._lastHighlightedSelector||(r="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}r==="clear"?this.highlight.clearHighlight():r!=="noop"&&this.highlight.updateHighlight(r)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onClick(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onClick)==null||o.call(r,e))}_onDblClick(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onDblClick(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onDblClick)==null||o.call(r,e))}_onContextMenu(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onContextMenu)==null||r.call(n,e))}_onDragStart(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onDragStart)==null||r.call(n,e))}_onPointerDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onPointerDown)==null||r.call(n,e))}_onPointerUp(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onPointerUp)==null||r.call(n,e))}_onMouseDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseDown)==null||r.call(n,e))}_onMouseUp(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onMouseUp(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onMouseUp)==null||o.call(r,e))}_onMouseMove(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onMouseMove(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onMouseMove)==null||o.call(r,e))}_onMouseEnter(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseEnter)==null||r.call(n,e))}_onMouseLeave(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseLeave)==null||r.call(n,e))}_onFocus(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onFocus)==null||r.call(n,e))}_onScroll(e){var n,r;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(r=(n=this._currentTool).onScroll)==null||r.call(n,e))}_onInput(e){var n,r;this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onInput)==null||r.call(n,e)}_onKeyDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onKeyDown)==null||r.call(n,e))}_onKeyUp(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onKeyUp)==null||r.call(n,e))}updateHighlight(e,n){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,n)}_updateHighlight(e,n){var o,l;let r=e==null?void 0:e.tooltipText;r===void 0&&(e!=null&&e.selector)&&(r=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(c=>({element:c,color:e.color,tooltipText:r}))):this.highlight.clearHighlight(),n&&((l=(o=this._delegate).highlightUpdated)==null||l.call(o))}_ignoreOverlayEvent(e){return e.composedPath().some(n=>(n.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var n;for(const r of e.composedPath())if(!((n=this.overlay)!=null&&n.contains(r)))return r;return e.composedPath()[0]}setMode(e){var n,r;(r=(n=this._delegate).setMode)==null||r.call(n,e)}async performAction(e){var n,r;await((r=(n=this._delegate).performAction)==null?void 0:r.call(n,e).catch(()=>{}))}recordAction(e){var n,r;(r=(n=this._delegate).recordAction)==null||r.call(n,e)}setOverlayState(e){var n,r;(r=(n=this._delegate).setOverlayState)==null||r.call(n,e)}elementPicked(e,n){var o,l;const r=this.injectedScript.ariaSnapshot(n.elements[0]);(l=(o=this._delegate).elementPicked)==null||l.call(o,{selector:e,ariaSnapshot:r})}}class W_{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){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",()=>e.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 u;this.close(),(u=e.onCancel)==null||u.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),this._keyboardListener=u=>{var d;if(u.key==="Escape"){this.close(),(d=e.onCancel)==null||d.call(e);return}if(u.key==="Enter"&&(u.ctrlKey||u.metaKey)){this._dialogElement&&e.onCommit();return}},this._recorder.document.addEventListener("keydown",this._keyboardListener,!0);const o=this._recorder.document.createElement("x-pw-tools-list"),l=this._recorder.document.createElement("label");l.textContent=e.label,o.appendChild(l),o.appendChild(this._recorder.document.createElement("x-spacer")),o.appendChild(n),o.appendChild(r),this._dialogElement.appendChild(o);const c=this._recorder.document.createElement("x-pw-dialog-body");return c.appendChild(e.body),this._dialogElement.appendChild(c),this._recorder.highlight.appendChild(this._dialogElement),this._dialogElement}moveTo(e,n){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=n+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}}function K_(t){let e=t.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function _s(t){return(t.altKey?1:0)|(t.ctrlKey?2:0)|(t.metaKey?4:0)|(t.shiftKey?8:0)}function Ql(t){switch(t.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function zi(t){if(t.target.nodeName==="CANVAS")return{x:t.offsetX,y:t.offsetY}}function Ue(t){t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()}function Hi(t){if(!t||t.nodeName!=="INPUT")return null;const e=t;return["checkbox","radio"].includes(e.type)?e:null}function Es(t){return!t||t.nodeName!=="INPUT"?!1:t.type.toLowerCase()==="range"}function Le(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function gy(t){for(const e of t)e();t.splice(0,t.length)}function G_(t,e,n,r){try{const o=t.parseSelector(n),l=t.querySelectorAll(o,r),c=l.length>1?Ht.multiple:Ht.single,u=t.utils.asLocator(e,n);return l.map((d,p)=>{const g=l.length>1?` [${p+1} of ${l.length}]`:"";return{element:d,color:c,tooltipText:u+g}})}catch{return[]}}function yy(t,{tagName:e,attrs:n,children:r}){const o=t.createElementNS("http://www.w3.org/2000/svg",e);if(n)for(const[l,c]of Object.entries(n))o.setAttribute(l,c);if(r)for(const l of r)o.appendChild(yy(t,l));return o}function Q_(t,e){t=t.replace(/AriaRole\s*\.\s*([\w]+)/g,(l,c)=>c.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(l,c,u)=>`${c}(${u.toLowerCase()}`);const n=[];let r="";for(let l=0;l<t.length;++l){const c=t[l];if(c!=='"'&&c!=="'"&&c!=="`"&&c!=="/"){r+=c;continue}const u=t[l-1]==="r"||t[l]==="/";++l;let d="";for(;l<t.length;){if(t[l]==="\\"){u?(t[l+1]!==c&&(d+=t[l]),++l,d+=t[l]):(++l,t[l]==="n"?d+=`
118
- `:t[l]==="r"?d+="\r":t[l]==="t"?d+=" ":d+=t[l]),++l;continue}if(t[l]!==c){d+=t[l++];continue}break}n.push({quote:c,text:d}),r+=(c==="/"?"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,",").replace(/,\)/g,")");const o=n.map(l=>l.quote).filter(l=>"'\"`".includes(l))[0];return{selector:vy(r,n,e),preferredQuote:o}}function ym(t){return[...t.matchAll(/\$\d+/g)].length}function vm(t,e){return t.replace(/\$(\d+)/g,(n,r)=>`$${r-e}`)}function vy(t,e,n){for(;;){const o=t.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!o)break;const l=o.index+o[0].length;let c=0,u=l;for(;u<t.length&&(t[u]==="("?c++:t[u]===")"&&c--,!(c<0));u++);let d=t.substring(0,l),p=0;["sethas(","sethasnot("].includes(o[1])&&(p=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const g=ym(t.substring(0,l)),y=vm(t.substring(l,u),g),v=ym(y),S=e.slice(g,g+v),k=JSON.stringify(vy(y,S,n));t=d.replace(/=$/,"2=")+`$${g+1}`+vm(t.substring(u+p),v-1);const _=e.slice(0,g),E=e.slice(g+v);e=_.concat([{quote:'"',text:k}]).concat(E)}t=t.replace(/\,set([\w]+)\(([^)]+)\)/g,(o,l,c)=>","+l.toLowerCase()+"="+c.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${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\(,?visible=true\)/g,"visible=true").replace(/filter\(,?visible=false\)/g,"visible=false").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const r=t.split(".");for(let o=0;o<r.length-1;o++)if(r[o]==="internal:control=enter-frame"&&r[o+1].startsWith("nth=")){const[l]=r.splice(o,1);r.splice(o+1,0,l)}return r.map(o=>!o.startsWith("internal:")||o==="internal:control"?o.replace(/\$(\d+)/g,(l,c)=>e[+c-1].text):(o=o.includes("[")?o.replace(/\]/,"")+"]":o,o=o.replace(/(?:r)\$(\d+)(i)?/g,(l,c,u)=>{const d=e[+c-1];return o.startsWith("internal:attr")||o.startsWith("internal:testid")||o.startsWith("internal:role")?ht(new RegExp(d.text),!1)+(u||""):kt(new RegExp(d.text,u),!1)}).replace(/\$(\d+)(i|s)?/g,(l,c,u)=>{const d=e[+c-1];return o.startsWith("internal:has=")||o.startsWith("internal:has-not=")?d.text:o.startsWith("internal:testid")?ht(d.text,!0):o.startsWith("internal:attr")||o.startsWith("internal:role")?ht(d.text,u==="s"):kt(d.text,u==="s")}),o)).join(" >> ")}function J_(t,e,n){try{return X_(t,e,n)}catch{return""}}function X_(t,e,n){try{return Ji(e),e}catch{}const{selector:r,preferredQuote:o}=Q_(e,n),l=og(t,r,void 0,void 0,o),c=wm(t,e);return l.some(u=>wm(t,u)===c)?r:""}function wm(t,e){return e=e.replace(/\s/g,""),t==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const Y_=({url:t})=>w.jsxs("div",{className:"browser-frame-header",children:[w.jsxs("div",{style:{whiteSpace:"nowrap"},children:[w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),w.jsxs("div",{className:"browser-frame-address-bar",title:t||"about:blank",children:[t||"about:blank",t&&w.jsx(ef,{value:t})]}),w.jsx("div",{style:{marginLeft:"auto"},children:w.jsxs("div",{children:[w.jsx("span",{className:"browser-frame-menu-bar"}),w.jsx("span",{className:"browser-frame-menu-bar"}),w.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),kf=Symbol.for("yaml.alias"),zu=Symbol.for("yaml.document"),er=Symbol.for("yaml.map"),wy=Symbol.for("yaml.pair"),dn=Symbol.for("yaml.scalar"),Ps=Symbol.for("yaml.seq"),Vt=Symbol.for("yaml.node.type"),Lr=t=>!!t&&typeof t=="object"&&t[Vt]===kf,Mr=t=>!!t&&typeof t=="object"&&t[Vt]===zu,Os=t=>!!t&&typeof t=="object"&&t[Vt]===er,Me=t=>!!t&&typeof t=="object"&&t[Vt]===wy,ke=t=>!!t&&typeof t=="object"&&t[Vt]===dn,$s=t=>!!t&&typeof t=="object"&&t[Vt]===Ps;function Oe(t){if(t&&typeof t=="object")switch(t[Vt]){case er:case Ps:return!0}return!1}function $e(t){if(t&&typeof t=="object")switch(t[Vt]){case kf:case er:case dn:case Ps:return!0}return!1}const Z_=t=>(ke(t)||Oe(t))&&!!t.anchor,bt=Symbol("break visit"),Sy=Symbol("skip children"),fn=Symbol("remove node");function tr(t,e){const n=xy(e);Mr(t)?vs(null,t.contents,n,Object.freeze([t]))===fn&&(t.contents=null):vs(null,t,n,Object.freeze([]))}tr.BREAK=bt;tr.SKIP=Sy;tr.REMOVE=fn;function vs(t,e,n,r){const o=_y(t,e,n,r);if($e(o)||Me(o))return Ey(t,r,o),vs(t,o,n,r);if(typeof o!="symbol"){if(Oe(e)){r=Object.freeze(r.concat(e));for(let l=0;l<e.items.length;++l){const c=vs(l,e.items[l],n,r);if(typeof c=="number")l=c-1;else{if(c===bt)return bt;c===fn&&(e.items.splice(l,1),l-=1)}}}else if(Me(e)){r=Object.freeze(r.concat(e));const l=vs("key",e.key,n,r);if(l===bt)return bt;l===fn&&(e.key=null);const c=vs("value",e.value,n,r);if(c===bt)return bt;c===fn&&(e.value=null)}}return o}async function oa(t,e){const n=xy(e);Mr(t)?await ws(null,t.contents,n,Object.freeze([t]))===fn&&(t.contents=null):await ws(null,t,n,Object.freeze([]))}oa.BREAK=bt;oa.SKIP=Sy;oa.REMOVE=fn;async function ws(t,e,n,r){const o=await _y(t,e,n,r);if($e(o)||Me(o))return Ey(t,r,o),ws(t,o,n,r);if(typeof o!="symbol"){if(Oe(e)){r=Object.freeze(r.concat(e));for(let l=0;l<e.items.length;++l){const c=await ws(l,e.items[l],n,r);if(typeof c=="number")l=c-1;else{if(c===bt)return bt;c===fn&&(e.items.splice(l,1),l-=1)}}}else if(Me(e)){r=Object.freeze(r.concat(e));const l=await ws("key",e.key,n,r);if(l===bt)return bt;l===fn&&(e.key=null);const c=await ws("value",e.value,n,r);if(c===bt)return bt;c===fn&&(e.value=null)}}return o}function xy(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function _y(t,e,n,r){var o,l,c,u,d;if(typeof n=="function")return n(t,e,r);if(Os(e))return(o=n.Map)==null?void 0:o.call(n,t,e,r);if($s(e))return(l=n.Seq)==null?void 0:l.call(n,t,e,r);if(Me(e))return(c=n.Pair)==null?void 0:c.call(n,t,e,r);if(ke(e))return(u=n.Scalar)==null?void 0:u.call(n,t,e,r);if(Lr(e))return(d=n.Alias)==null?void 0:d.call(n,t,e,r)}function Ey(t,e,n){const r=e[e.length-1];if(Oe(r))r.items[t]=n;else if(Me(r))t==="key"?r.key=n:r.value=n;else if(Mr(r))r.contents=n;else{const o=Lr(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const eE={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},tE=t=>t.replace(/[!,[\]{}]/g,e=>eE[e]);class dt{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},dt.defaultYaml,e),this.tags=Object.assign({},dt.defaultTags,n)}clone(){const e=new dt(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new dt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:dt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},dt.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:dt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},dt.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),o=r.shift();switch(o){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[l,c]=r;return this.tags[l]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[l]=r;if(l==="1.1"||l==="1.2")return this.yaml.version=l,!0;{const c=/^\d+\.\d+$/.test(l);return n(6,`Unsupported YAML version ${l}`,c),!1}}default:return n(0,`Unknown directive ${o}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const c=e.slice(2,-1);return c==="!"||c==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),c)}const[,r,o]=e.match(/^(.*!)([^!]*)$/s);o||n(`The ${e} tag has no suffix`);const l=this.tags[r];if(l)try{return l+decodeURIComponent(o)}catch(c){return n(String(c)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+tE(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let o;if(e&&r.length>0&&$e(e.contents)){const l={};tr(e.contents,(c,u)=>{$e(u)&&u.tag&&(l[u.tag]=!0)}),o=Object.keys(l)}else o=[];for(const[l,c]of r)l==="!!"&&c==="tag:yaml.org,2002:"||(!e||o.some(u=>u.startsWith(c)))&&n.push(`%TAG ${l} ${c}`);return n.join(`
119
- `)}}dt.defaultYaml={explicit:!1,version:"1.2"};dt.defaultTags={"!!":"tag:yaml.org,2002:"};function ky(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function by(t){const e=new Set;return tr(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function Ty(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function nE(t,e){const n=[],r=new Map;let o=null;return{onAnchor:l=>{n.push(l),o||(o=by(t));const c=Ty(e,o);return o.add(c),c},setAnchors:()=>{for(const l of n){const c=r.get(l);if(typeof c=="object"&&c.anchor&&(ke(c.node)||Oe(c.node)))c.node.anchor=c.anchor;else{const u=new Error("Failed to resolve repeated object (this should not happen)");throw u.source=l,u}}},sourceObjects:r}}function Ss(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let o=0,l=r.length;o<l;++o){const c=r[o],u=Ss(t,r,String(o),c);u===void 0?delete r[o]:u!==c&&(r[o]=u)}else if(r instanceof Map)for(const o of Array.from(r.keys())){const l=r.get(o),c=Ss(t,r,o,l);c===void 0?r.delete(o):c!==l&&r.set(o,c)}else if(r instanceof Set)for(const o of Array.from(r)){const l=Ss(t,r,o,o);l===void 0?r.delete(o):l!==o&&(r.delete(o),r.add(l))}else for(const[o,l]of Object.entries(r)){const c=Ss(t,r,o,l);c===void 0?delete r[o]:c!==l&&(r[o]=c)}return t.call(e,n,r)}function Ut(t,e,n){if(Array.isArray(t))return t.map((r,o)=>Ut(r,String(o),n));if(t&&typeof t.toJSON=="function"){if(!n||!Z_(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=l=>{r.res=l,delete n.onCreate};const o=t.toJSON(e,n);return n.onCreate&&n.onCreate(o),o}return typeof t=="bigint"&&!(n!=null&&n.keep)?Number(t):t}class bf{constructor(e){Object.defineProperty(this,Vt,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:o,reviver:l}={}){if(!Mr(e))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},u=Ut(this,"",c);if(typeof o=="function")for(const{count:d,res:p}of c.anchors.values())o(p,d);return typeof l=="function"?Ss(l,{"":u},"",u):u}}class la extends bf{constructor(e){super(kf),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return tr(e,{Node:(r,o)=>{if(o===this)return tr.BREAK;o.anchor===this.source&&(n=o)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:o,maxAliasCount:l}=n,c=this.resolve(o);if(!c){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let u=r.get(c);if(u||(Ut(c,null,n),u=r.get(c)),!u||u.res===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(l>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=Ml(o,c,r)),u.count*u.aliasCount>l)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return u.res}toString(e,n,r){const o=`*${this.source}`;if(e){if(ky(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(l)}if(e.implicitKey)return`${o} `}return o}}function Ml(t,e,n){if(Lr(e)){const r=e.resolve(t),o=n&&r&&n.get(r);return o?o.count*o.aliasCount:0}else if(Oe(e)){let r=0;for(const o of e.items){const l=Ml(t,o,n);l>r&&(r=l)}return r}else if(Me(e)){const r=Ml(t,e.key,n),o=Ml(t,e.value,n);return Math.max(r,o)}return 1}const Cy=t=>!t||typeof t!="function"&&typeof t!="object";class ue extends bf{constructor(e){super(dn),this.value=e}toJSON(e,n){return n!=null&&n.keep?this.value:Ut(this.value,e,n)}toString(){return String(this.value)}}ue.BLOCK_FOLDED="BLOCK_FOLDED";ue.BLOCK_LITERAL="BLOCK_LITERAL";ue.PLAIN="PLAIN";ue.QUOTE_DOUBLE="QUOTE_DOUBLE";ue.QUOTE_SINGLE="QUOTE_SINGLE";const rE="tag:yaml.org,2002:";function sE(t,e,n){if(e){const r=n.filter(l=>l.tag===e),o=r.find(l=>!l.format)??r[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return n.find(r=>{var o;return((o=r.identify)==null?void 0:o.call(r,t))&&!r.format})}function Wi(t,e,n){var y,v,S;if(Mr(t)&&(t=t.contents),$e(t))return t;if(Me(t)){const k=(v=(y=n.schema[er]).createNode)==null?void 0:v.call(y,n.schema,null,n);return k.items.push(t),k}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:o,onTagObj:l,schema:c,sourceObjects:u}=n;let d;if(r&&t&&typeof t=="object"){if(d=u.get(t),d)return d.anchor||(d.anchor=o(t)),new la(d.anchor);d={anchor:null,node:null},u.set(t,d)}e!=null&&e.startsWith("!!")&&(e=rE+e.slice(2));let p=sE(t,e,c.tags);if(!p){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const k=new ue(t);return d&&(d.node=k),k}p=t instanceof Map?c[er]:Symbol.iterator in Object(t)?c[Ps]:c[er]}l&&(l(p),delete n.onTagObj);const g=p!=null&&p.createNode?p.createNode(n.schema,t,n):typeof((S=p==null?void 0:p.nodeClass)==null?void 0:S.from)=="function"?p.nodeClass.from(n.schema,t,n):new ue(t);return e?g.tag=e:p.default||(g.tag=p.tag),d&&(d.node=g),g}function Jl(t,e,n){let r=n;for(let o=e.length-1;o>=0;--o){const l=e[o];if(typeof l=="number"&&Number.isInteger(l)&&l>=0){const c=[];c[l]=r,r=c}else r=new Map([[l,r]])}return Wi(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const Ri=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class Ny extends bf{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>$e(r)||Me(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(Ri(e))this.add(n);else{const[r,...o]=e,l=this.get(r,!0);if(Oe(l))l.addIn(o,n);else if(l===void 0&&this.schema)this.set(r,Jl(this.schema,o,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${o}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const o=this.get(n,!0);if(Oe(o))return o.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...o]=e,l=this.get(r,!0);return o.length===0?!n&&ke(l)?l.value:l:Oe(l)?l.getIn(o,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!Me(n))return!1;const r=n.value;return r==null||e&&ke(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const o=this.get(n,!0);return Oe(o)?o.hasIn(r):!1}setIn(e,n){const[r,...o]=e;if(o.length===0)this.set(r,n);else{const l=this.get(r,!0);if(Oe(l))l.setIn(o,n);else if(l===void 0&&this.schema)this.set(r,Jl(this.schema,o,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${o}`)}}}const iE=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Cn(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const _r=(t,e,n)=>t.endsWith(`
120
- `)?Cn(n,e):n.includes(`
121
- `)?`
122
- `+Cn(n,e):(t.endsWith(" ")?"":" ")+n,Ay="flow",Hu="block",jl="quoted";function aa(t,e,n="flow",{indentAtStart:r,lineWidth:o=80,minContentWidth:l=20,onFold:c,onOverflow:u}={}){if(!o||o<0)return t;o<l&&(l=0);const d=Math.max(1+l,1+o-e.length);if(t.length<=d)return t;const p=[],g={};let y=o-e.length;typeof r=="number"&&(r>o-Math.max(2,l)?p.push(0):y=o-r);let v,S,k=!1,_=-1,E=-1,C=-1;n===Hu&&(_=Sm(t,_,e.length),_!==-1&&(y=_+d));for(let B;B=t[_+=1];){if(n===jl&&B==="\\"){switch(E=_,t[_+1]){case"x":_+=3;break;case"u":_+=5;break;case"U":_+=9;break;default:_+=1}C=_}if(B===`
123
- `)n===Hu&&(_=Sm(t,_,e.length)),y=_+e.length+d,v=void 0;else{if(B===" "&&S&&S!==" "&&S!==`
124
- `&&S!==" "){const R=t[_+1];R&&R!==" "&&R!==`
125
- `&&R!==" "&&(v=_)}if(_>=y)if(v)p.push(v),y=v+d,v=void 0;else if(n===jl){for(;S===" "||S===" ";)S=B,B=t[_+=1],k=!0;const R=_>C+1?_-2:E-1;if(g[R])return t;p.push(R),g[R]=!0,y=R+d,v=void 0}else k=!0}S=B}if(k&&u&&u(),p.length===0)return t;c&&c();let A=t.slice(0,p[0]);for(let B=0;B<p.length;++B){const R=p[B],D=p[B+1]||t.length;R===0?A=`
126
- ${e}${t.slice(0,D)}`:(n===jl&&g[R]&&(A+=`${t[R]}\\`),A+=`
127
- ${e}${t.slice(R+1,D)}`)}return A}function Sm(t,e,n){let r=e,o=e+1,l=t[o];for(;l===" "||l===" ";)if(e<o+n)l=t[++e];else{do l=t[++e];while(l&&l!==`
128
- `);r=e,o=e+1,l=t[o]}return r}const ca=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),ua=t=>/^(%|---|\.\.\.)/m.test(t);function oE(t,e,n){if(!e||e<0)return!1;const r=e-n,o=t.length;if(o<=r)return!1;for(let l=0,c=0;l<o;++l)if(t[l]===`
129
- `){if(l-c>r)return!0;if(c=l+1,o-c<=r)return!1}return!0}function Ui(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=e,o=e.options.doubleQuotedMinMultiLineLength,l=e.indent||(ua(t)?" ":"");let c="",u=0;for(let d=0,p=n[d];p;p=n[++d])if(p===" "&&n[d+1]==="\\"&&n[d+2]==="n"&&(c+=n.slice(u,d)+"\\ ",d+=1,u=d,p="\\"),p==="\\")switch(n[d+1]){case"u":{c+=n.slice(u,d);const g=n.substr(d+2,4);switch(g){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:g.substr(0,2)==="00"?c+="\\x"+g.substr(2):c+=n.substr(d,6)}d+=5,u=d+1}break;case"n":if(r||n[d+2]==='"'||n.length<o)d+=1;else{for(c+=n.slice(u,d)+`
130
-
131
- `;n[d+2]==="\\"&&n[d+3]==="n"&&n[d+4]!=='"';)c+=`
132
- `,d+=2;c+=l,n[d+2]===" "&&(c+="\\"),d+=1,u=d+1}break;default:d+=1}return c=u?c+n.slice(u):n,r?c:aa(c,l,jl,ca(e,!1))}function Uu(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
133
- `)||/[ \t]\n|\n[ \t]/.test(t))return Ui(t,e);const n=e.indent||(ua(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
134
- ${n}`)+"'";return e.implicitKey?r:aa(r,n,Ay,ca(e,!1))}function xs(t,e){const{singleQuote:n}=e.options;let r;if(n===!1)r=Ui;else{const o=t.includes('"'),l=t.includes("'");o&&!l?r=Uu:l&&!o?r=Ui:r=n?Uu:Ui}return r(t,e)}let qu;try{qu=new RegExp(`(^|(?<!
135
- ))
136
- +(?!
137
- |$)`,"g")}catch{qu=/\n+(?!\n|$)/g}function Pl({comment:t,type:e,value:n},r,o,l){const{blockQuote:c,commentString:u,lineWidth:d}=r.options;if(!c||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return xs(n,r);const p=r.indent||(r.forceBlockIndent||ua(n)?" ":""),g=c==="literal"?!0:c==="folded"||e===ue.BLOCK_FOLDED?!1:e===ue.BLOCK_LITERAL?!0:!oE(n,d,p.length);if(!n)return g?`|
138
- `:`>
139
- `;let y,v;for(v=n.length;v>0;--v){const z=n[v-1];if(z!==`
140
- `&&z!==" "&&z!==" ")break}let S=n.substring(v);const k=S.indexOf(`
141
- `);k===-1?y="-":n===S||k!==S.length-1?(y="+",l&&l()):y="",S&&(n=n.slice(0,-S.length),S[S.length-1]===`
142
- `&&(S=S.slice(0,-1)),S=S.replace(qu,`$&${p}`));let _=!1,E,C=-1;for(E=0;E<n.length;++E){const z=n[E];if(z===" ")_=!0;else if(z===`
143
- `)C=E;else break}let A=n.substring(0,C<E?C+1:E);A&&(n=n.substring(A.length),A=A.replace(/\n+/g,`$&${p}`));let R=(g?"|":">")+(_?p?"2":"1":"")+y;if(t&&(R+=" "+u(t.replace(/ ?[\r\n]+/g," ")),o&&o()),g)return n=n.replace(/\n+/g,`$&${p}`),`${R}
144
- ${p}${A}${n}${S}`;n=n.replace(/\n+/g,`
145
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);const D=aa(`${A}${n}${S}`,p,Hu,ca(r,!0));return`${R}
146
- ${p}${D}`}function lE(t,e,n,r){const{type:o,value:l}=t,{actualString:c,implicitKey:u,indent:d,indentStep:p,inFlow:g}=e;if(u&&l.includes(`
147
- `)||g&&/[[\]{},]/.test(l))return xs(l,e);if(!l||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l))return u||g||!l.includes(`
148
- `)?xs(l,e):Pl(t,e,n,r);if(!u&&!g&&o!==ue.PLAIN&&l.includes(`
149
- `))return Pl(t,e,n,r);if(ua(l)){if(d==="")return e.forceBlockIndent=!0,Pl(t,e,n,r);if(u&&d===p)return xs(l,e)}const y=l.replace(/\n+/g,`$&
150
- ${d}`);if(c){const v=_=>{var E;return _.default&&_.tag!=="tag:yaml.org,2002:str"&&((E=_.test)==null?void 0:E.test(y))},{compat:S,tags:k}=e.doc.schema;if(k.some(v)||S!=null&&S.some(v))return xs(l,e)}return u?y:aa(y,d,Ay,ca(e,!1))}function Xi(t,e,n,r){const{implicitKey:o,inFlow:l}=e,c=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:u}=t;u!==ue.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(u=ue.QUOTE_DOUBLE);const d=g=>{switch(g){case ue.BLOCK_FOLDED:case ue.BLOCK_LITERAL:return o||l?xs(c.value,e):Pl(c,e,n,r);case ue.QUOTE_DOUBLE:return Ui(c.value,e);case ue.QUOTE_SINGLE:return Uu(c.value,e);case ue.PLAIN:return lE(c,e,n,r);default:return null}};let p=d(u);if(p===null){const{defaultKeyType:g,defaultStringType:y}=e.options,v=o&&g||y;if(p=d(v),p===null)throw new Error(`Unsupported default string type ${v}`)}return p}function Iy(t,e){const n=Object.assign({blockQuote:!0,commentString:iE,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function aE(t,e){var o;if(e.tag){const l=t.filter(c=>c.tag===e.tag);if(l.length>0)return l.find(c=>c.format===e.format)??l[0]}let n,r;if(ke(e)){r=e.value;let l=t.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,r)});if(l.length>1){const c=l.filter(u=>u.test);c.length>0&&(l=c)}n=l.find(c=>c.format===e.format)??l.find(c=>!c.format)}else r=e,n=t.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!n){const l=((o=r==null?void 0:r.constructor)==null?void 0:o.name)??typeof r;throw new Error(`Tag not resolved for ${l} value`)}return n}function cE(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const o=[],l=(ke(t)||Oe(t))&&t.anchor;l&&ky(l)&&(n.add(l),o.push(`&${l}`));const c=t.tag?t.tag:e.default?null:e.tag;return c&&o.push(r.directives.tagString(c)),o.join(" ")}function Ns(t,e,n,r){var d;if(Me(t))return t.toString(e,n,r);if(Lr(t)){if(e.doc.directives)return t.toString(e);if((d=e.resolvedAliases)!=null&&d.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let o;const l=$e(t)?t:e.doc.createNode(t,{onTagObj:p=>o=p});o||(o=aE(e.doc.schema.tags,l));const c=cE(l,o,e);c.length>0&&(e.indentAtStart=(e.indentAtStart??0)+c.length+1);const u=typeof o.stringify=="function"?o.stringify(l,e,n,r):ke(l)?Xi(l,e,n,r):l.toString(e,n,r);return c?ke(l)||u[0]==="{"||u[0]==="["?`${c} ${u}`:`${c}
151
- ${e.indent}${u}`:u}function uE({key:t,value:e},n,r,o){const{allNullValues:l,doc:c,indent:u,indentStep:d,options:{commentString:p,indentSeq:g,simpleKeys:y}}=n;let v=$e(t)&&t.comment||null;if(y){if(v)throw new Error("With simple keys, key nodes cannot have comments");if(Oe(t)||!$e(t)&&typeof t=="object"){const H="With simple keys, collection cannot be used as a key value";throw new Error(H)}}let S=!y&&(!t||v&&e==null&&!n.inFlow||Oe(t)||(ke(t)?t.type===ue.BLOCK_FOLDED||t.type===ue.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!S&&(y||!l),indent:u+d});let k=!1,_=!1,E=Ns(t,n,()=>k=!0,()=>_=!0);if(!S&&!n.inFlow&&E.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");S=!0}if(n.inFlow){if(l||e==null)return k&&r&&r(),E===""?"?":S?`? ${E}`:E}else if(l&&!y||e==null&&S)return E=`? ${E}`,v&&!k?E+=_r(E,n.indent,p(v)):_&&o&&o(),E;k&&(v=null),S?(v&&(E+=_r(E,n.indent,p(v))),E=`? ${E}
152
- ${u}:`):(E=`${E}:`,v&&(E+=_r(E,n.indent,p(v))));let C,A,B;$e(e)?(C=!!e.spaceBefore,A=e.commentBefore,B=e.comment):(C=!1,A=null,B=null,e&&typeof e=="object"&&(e=c.createNode(e))),n.implicitKey=!1,!S&&!v&&ke(e)&&(n.indentAtStart=E.length+1),_=!1,!g&&d.length>=2&&!n.inFlow&&!S&&$s(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let R=!1;const D=Ns(e,n,()=>R=!0,()=>_=!0);let z=" ";if(v||C||A){if(z=C?`
153
- `:"",A){const H=p(A);z+=`
154
- ${Cn(H,n.indent)}`}D===""&&!n.inFlow?z===`
155
- `&&(z=`
156
-
157
- `):z+=`
158
- ${n.indent}`}else if(!S&&Oe(e)){const H=D[0],F=D.indexOf(`
159
- `),M=F!==-1,G=n.inFlow??e.flow??e.items.length===0;if(M||!G){let K=!1;if(M&&(H==="&"||H==="!")){let O=D.indexOf(" ");H==="&"&&O!==-1&&O<F&&D[O+1]==="!"&&(O=D.indexOf(" ",O+1)),(O===-1||F<O)&&(K=!0)}K||(z=`
160
- ${n.indent}`)}}else(D===""||D[0]===`
161
- `)&&(z="");return E+=z+D,n.inFlow?R&&r&&r():B&&!R?E+=_r(E,n.indent,p(B)):_&&o&&o(),E}function Ly(t,e){(t==="debug"||t==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const wl="<<",Nn={identify:t=>t===wl||typeof t=="symbol"&&t.description===wl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ue(Symbol(wl)),{addToJSMap:My}),stringify:()=>wl},fE=(t,e)=>(Nn.identify(e)||ke(e)&&(!e.type||e.type===ue.PLAIN)&&Nn.identify(e.value))&&(t==null?void 0:t.doc.schema.tags.some(n=>n.tag===Nn.tag&&n.default));function My(t,e,n){if(n=t&&Lr(n)?n.resolve(t.doc):n,$s(n))for(const r of n.items)ku(t,e,r);else if(Array.isArray(n))for(const r of n)ku(t,e,r);else ku(t,e,n)}function ku(t,e,n){const r=t&&Lr(n)?n.resolve(t.doc):n;if(!Os(r))throw new Error("Merge sources must be maps or map aliases");const o=r.toJSON(null,t,Map);for(const[l,c]of o)e instanceof Map?e.has(l)||e.set(l,c):e instanceof Set?e.add(l):Object.prototype.hasOwnProperty.call(e,l)||Object.defineProperty(e,l,{value:c,writable:!0,enumerable:!0,configurable:!0});return e}function jy(t,e,{key:n,value:r}){if($e(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(fE(t,n))My(t,e,r);else{const o=Ut(n,"",t);if(e instanceof Map)e.set(o,Ut(r,o,t));else if(e instanceof Set)e.add(o);else{const l=dE(n,o,t),c=Ut(r,l,t);l in e?Object.defineProperty(e,l,{value:c,writable:!0,enumerable:!0,configurable:!0}):e[l]=c}}return e}function dE(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if($e(t)&&(n!=null&&n.doc)){const r=Iy(n.doc,{});r.anchors=new Set;for(const l of n.anchors.keys())r.anchors.add(l.anchor);r.inFlow=!0,r.inStringifyKey=!0;const o=t.toString(r);if(!n.mapKeyWarned){let l=JSON.stringify(o);l.length>40&&(l=l.substring(0,36)+'..."'),Ly(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${l}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return o}return JSON.stringify(e)}function Tf(t,e,n){const r=Wi(t,void 0,n),o=Wi(e,void 0,n);return new at(r,o)}class at{constructor(e,n=null){Object.defineProperty(this,Vt,{value:wy}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return $e(n)&&(n=n.clone(e)),$e(r)&&(r=r.clone(e)),new at(n,r)}toJSON(e,n){const r=n!=null&&n.mapAsMap?new Map:{};return jy(n,r,this)}toString(e,n,r){return e!=null&&e.doc?uE(this,e,n,r):JSON.stringify(this)}}function Py(t,e,n){return(e.inFlow??t.flow?pE:hE)(t,e,n)}function hE({comment:t,items:e},n,{blockItemPrefix:r,flowChars:o,itemIndent:l,onChompKeep:c,onComment:u}){const{indent:d,options:{commentString:p}}=n,g=Object.assign({},n,{indent:l,type:null});let y=!1;const v=[];for(let k=0;k<e.length;++k){const _=e[k];let E=null;if($e(_))!y&&_.spaceBefore&&v.push(""),Xl(n,v,_.commentBefore,y),_.comment&&(E=_.comment);else if(Me(_)){const A=$e(_.key)?_.key:null;A&&(!y&&A.spaceBefore&&v.push(""),Xl(n,v,A.commentBefore,y))}y=!1;let C=Ns(_,g,()=>E=null,()=>y=!0);E&&(C+=_r(C,l,p(E))),y&&E&&(y=!1),v.push(r+C)}let S;if(v.length===0)S=o.start+o.end;else{S=v[0];for(let k=1;k<v.length;++k){const _=v[k];S+=_?`
162
- ${d}${_}`:`
163
- `}}return t?(S+=`
164
- `+Cn(p(t),d),u&&u()):y&&c&&c(),S}function pE({items:t},e,{flowChars:n,itemIndent:r}){const{indent:o,indentStep:l,flowCollectionPadding:c,options:{commentString:u}}=e;r+=l;const d=Object.assign({},e,{indent:r,inFlow:!0,type:null});let p=!1,g=0;const y=[];for(let k=0;k<t.length;++k){const _=t[k];let E=null;if($e(_))_.spaceBefore&&y.push(""),Xl(e,y,_.commentBefore,!1),_.comment&&(E=_.comment);else if(Me(_)){const A=$e(_.key)?_.key:null;A&&(A.spaceBefore&&y.push(""),Xl(e,y,A.commentBefore,!1),A.comment&&(p=!0));const B=$e(_.value)?_.value:null;B?(B.comment&&(E=B.comment),B.commentBefore&&(p=!0)):_.value==null&&(A!=null&&A.comment)&&(E=A.comment)}E&&(p=!0);let C=Ns(_,d,()=>E=null);k<t.length-1&&(C+=","),E&&(C+=_r(C,r,u(E))),!p&&(y.length>g||C.includes(`
165
- `))&&(p=!0),y.push(C),g=y.length}const{start:v,end:S}=n;if(y.length===0)return v+S;if(!p){const k=y.reduce((_,E)=>_+E.length+2,2);p=e.options.lineWidth>0&&k>e.options.lineWidth}if(p){let k=v;for(const _ of y)k+=_?`
166
- ${l}${o}${_}`:`
167
- `;return`${k}
168
- ${o}${S}`}else return`${v}${c}${y.join(" ")}${c}${S}`}function Xl({indent:t,options:{commentString:e}},n,r,o){if(r&&o&&(r=r.replace(/^\n+/,"")),r){const l=Cn(e(r),t);n.push(l.trimStart())}}function Er(t,e){const n=ke(e)?e.value:e;for(const r of t)if(Me(r)&&(r.key===e||r.key===n||ke(r.key)&&r.key.value===n))return r}class Lt extends Ny{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(er,e),this.items=[]}static from(e,n,r){const{keepUndefined:o,replacer:l}=r,c=new this(e),u=(d,p)=>{if(typeof l=="function")p=l.call(n,d,p);else if(Array.isArray(l)&&!l.includes(d))return;(p!==void 0||o)&&c.items.push(Tf(d,p,r))};if(n instanceof Map)for(const[d,p]of n)u(d,p);else if(n&&typeof n=="object")for(const d of Object.keys(n))u(d,n[d]);return typeof e.sortMapEntries=="function"&&c.items.sort(e.sortMapEntries),c}add(e,n){var c;let r;Me(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new at(e,e==null?void 0:e.value):r=new at(e.key,e.value);const o=Er(this.items,r.key),l=(c=this.schema)==null?void 0:c.sortMapEntries;if(o){if(!n)throw new Error(`Key ${r.key} already set`);ke(o.value)&&Cy(r.value)?o.value.value=r.value:o.value=r.value}else if(l){const u=this.items.findIndex(d=>l(r,d)<0);u===-1?this.items.push(r):this.items.splice(u,0,r)}else this.items.push(r)}delete(e){const n=Er(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const r=Er(this.items,e),o=r==null?void 0:r.value;return(!n&&ke(o)?o.value:o)??void 0}has(e){return!!Er(this.items,e)}set(e,n){this.add(new at(e,n),!0)}toJSON(e,n,r){const o=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(o);for(const l of this.items)jy(n,o,l);return o}toString(e,n,r){if(!e)return JSON.stringify(this);for(const o of this.items)if(!Me(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Py(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const Rs={collection:"map",default:!0,nodeClass:Lt,tag:"tag:yaml.org,2002:map",resolve(t,e){return Os(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>Lt.from(t,e,n)};class nr extends Ny{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ps,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=Sl(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=Sl(e);if(typeof r!="number")return;const o=this.items[r];return!n&&ke(o)?o.value:o}has(e){const n=Sl(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=Sl(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[r];ke(o)&&Cy(n)?o.value=n:this.items[r]=n}toJSON(e,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let o=0;for(const l of this.items)r.push(Ut(l,String(o++),n));return r}toString(e,n,r){return e?Py(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:o}=r,l=new this(e);if(n&&Symbol.iterator in Object(n)){let c=0;for(let u of n){if(typeof o=="function"){const d=n instanceof Set?u:String(c++);u=o.call(n,d,u)}l.items.push(Wi(u,void 0,r))}}return l}}function Sl(t){let e=ke(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Ds={collection:"seq",default:!0,nodeClass:nr,tag:"tag:yaml.org,2002:seq",resolve(t,e){return $s(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>nr.from(t,e,n)},fa={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Xi(t,e,n,r)}},da={identify:t=>t==null,createNode:()=>new ue(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ue(null),stringify:({source:t},e)=>typeof t=="string"&&da.test.test(t)?t:e.options.nullStr},Cf={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new ue(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Cf.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function tn({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const o=typeof r=="number"?r:Number(r);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let l=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(l)){let c=l.indexOf(".");c<0&&(c=l.length,l+=".");let u=e-(l.length-c-1);for(;u-- >0;)l+="0"}return l}const Oy={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:tn},$y={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():tn(t)}},Ry={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new ue(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:tn},ha=t=>typeof t=="bigint"||Number.isInteger(t),Nf=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function Dy(t,e,n){const{value:r}=t;return ha(r)&&r>=0?n+r.toString(e):tn(t)}const Fy={identify:t=>ha(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>Nf(t,2,8,n),stringify:t=>Dy(t,8,"0o")},By={identify:ha,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>Nf(t,0,10,n),stringify:tn},zy={identify:t=>ha(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>Nf(t,2,16,n),stringify:t=>Dy(t,16,"0x")},mE=[Rs,Ds,fa,da,Cf,Fy,By,zy,Oy,$y,Ry];function xm(t){return typeof t=="bigint"||Number.isInteger(t)}const xl=({value:t})=>JSON.stringify(t),gE=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:xl},{identify:t=>t==null,createNode:()=>new ue(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:xl},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:xl},{identify:xm,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>xm(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:xl}],yE={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},vE=[Rs,Ds].concat(gE,yE),Af={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof Buffer=="function")return Buffer.from(t,"base64");if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let o=0;o<n.length;++o)r[o]=n.charCodeAt(o);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,o,l){const c=n;let u;if(typeof Buffer=="function")u=c instanceof Buffer?c.toString("base64"):Buffer.from(c.buffer).toString("base64");else if(typeof btoa=="function"){let d="";for(let p=0;p<c.length;++p)d+=String.fromCharCode(c[p]);u=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=ue.BLOCK_LITERAL),e!==ue.QUOTE_DOUBLE){const d=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),p=Math.ceil(u.length/d),g=new Array(p);for(let y=0,v=0;y<p;++y,v+=d)g[y]=u.substr(v,d);u=g.join(e===ue.BLOCK_LITERAL?`
169
- `:" ")}return Xi({comment:t,type:e,value:u},r,o,l)}};function Hy(t,e){if($s(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!Me(r)){if(Os(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const o=r.items[0]||new at(new ue(null));if(r.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${r.commentBefore}
170
- ${o.key.commentBefore}`:r.commentBefore),r.comment){const l=o.value??o.key;l.comment=l.comment?`${r.comment}
171
- ${l.comment}`:r.comment}r=o}t.items[n]=Me(r)?r:new at(r)}}else e("Expected a sequence for this tag");return t}function Uy(t,e,n){const{replacer:r}=n,o=new nr(t);o.tag="tag:yaml.org,2002:pairs";let l=0;if(e&&Symbol.iterator in Object(e))for(let c of e){typeof r=="function"&&(c=r.call(e,String(l++),c));let u,d;if(Array.isArray(c))if(c.length===2)u=c[0],d=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const p=Object.keys(c);if(p.length===1)u=p[0],d=c[u];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else u=c;o.items.push(Tf(u,d,n))}return o}const If={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Hy,createNode:Uy};class ks extends nr{constructor(){super(),this.add=Lt.prototype.add.bind(this),this.delete=Lt.prototype.delete.bind(this),this.get=Lt.prototype.get.bind(this),this.has=Lt.prototype.has.bind(this),this.set=Lt.prototype.set.bind(this),this.tag=ks.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const o of this.items){let l,c;if(Me(o)?(l=Ut(o.key,"",n),c=Ut(o.value,l,n)):l=Ut(o,"",n),r.has(l))throw new Error("Ordered maps must not include duplicate keys");r.set(l,c)}return r}static from(e,n,r){const o=Uy(e,n,r),l=new this;return l.items=o.items,l}}ks.tag="tag:yaml.org,2002:omap";const Lf={collection:"seq",identify:t=>t instanceof Map,nodeClass:ks,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=Hy(t,e),r=[];for(const{key:o}of n.items)ke(o)&&(r.includes(o.value)?e(`Ordered maps must not include duplicate keys: ${o.value}`):r.push(o.value));return Object.assign(new ks,n)},createNode:(t,e,n)=>ks.from(t,e,n)};function qy({value:t,source:e},n){return e&&(t?Vy:Wy).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const Vy={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ue(!0),stringify:qy},Wy={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ue(!1),stringify:qy},wE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:tn},SE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():tn(t)}},xE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new ue(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:tn},Yi=t=>typeof t=="bigint"||Number.isInteger(t);function pa(t,e,n,{intAsBigInt:r}){const o=t[0];if((o==="-"||o==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const c=BigInt(t);return o==="-"?BigInt(-1)*c:c}const l=parseInt(t,n);return o==="-"?-1*l:l}function Mf(t,e,n){const{value:r}=t;if(Yi(r)){const o=r.toString(e);return r<0?"-"+n+o.substr(1):n+o}return tn(t)}const _E={identify:Yi,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>pa(t,2,2,n),stringify:t=>Mf(t,2,"0b")},EE={identify:Yi,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>pa(t,1,8,n),stringify:t=>Mf(t,8,"0")},kE={identify:Yi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>pa(t,0,10,n),stringify:tn},bE={identify:Yi,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>pa(t,2,16,n),stringify:t=>Mf(t,16,"0x")};class bs extends Lt{constructor(e){super(e),this.tag=bs.tag}add(e){let n;Me(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new at(e.key,null):n=new at(e,null),Er(this.items,n.key)||this.items.push(n)}get(e,n){const r=Er(this.items,e);return!n&&Me(r)?ke(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Er(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new at(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:o}=r,l=new this(e);if(n&&Symbol.iterator in Object(n))for(let c of n)typeof o=="function"&&(c=o.call(n,c,c)),l.items.push(Tf(c,null,r));return l}}bs.tag="tag:yaml.org,2002:set";const jf={collection:"map",identify:t=>t instanceof Set,nodeClass:bs,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>bs.from(t,e,n),resolve(t,e){if(Os(t)){if(t.hasAllNullValues(!0))return Object.assign(new bs,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function Pf(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,o=c=>e?BigInt(c):Number(c),l=r.replace(/_/g,"").split(":").reduce((c,u)=>c*o(60)+o(u),o(0));return n==="-"?o(-1)*l:l}function Ky(t){let{value:e}=t,n=c=>c;if(typeof e=="bigint")n=c=>BigInt(c);else if(isNaN(e)||!isFinite(e))return tn(t);let r="";e<0&&(r="-",e*=n(-1));const o=n(60),l=[e%o];return e<60?l.unshift(0):(e=(e-l[0])/o,l.unshift(e%o),e>=60&&(e=(e-l[0])/o,l.unshift(e))),r+l.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Gy={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>Pf(t,n),stringify:Ky},Qy={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Pf(t,!1),stringify:Ky},ma={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(ma.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,o,l,c,u]=e.map(Number),d=e[7]?Number((e[7]+"00").substr(1,3)):0;let p=Date.UTC(n,r-1,o,l||0,c||0,u||0,d);const g=e[8];if(g&&g!=="Z"){let y=Pf(g,!1);Math.abs(y)<30&&(y*=60),p-=6e4*y}return new Date(p)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},_m=[Rs,Ds,fa,da,Vy,Wy,_E,EE,kE,bE,wE,SE,xE,Af,Nn,Lf,If,jf,Gy,Qy,ma],Em=new Map([["core",mE],["failsafe",[Rs,Ds,fa]],["json",vE],["yaml11",_m],["yaml-1.1",_m]]),km={binary:Af,bool:Cf,float:Ry,floatExp:$y,floatNaN:Oy,floatTime:Qy,int:By,intHex:zy,intOct:Fy,intTime:Gy,map:Rs,merge:Nn,null:da,omap:Lf,pairs:If,seq:Ds,set:jf,timestamp:ma},TE={"tag:yaml.org,2002:binary":Af,"tag:yaml.org,2002:merge":Nn,"tag:yaml.org,2002:omap":Lf,"tag:yaml.org,2002:pairs":If,"tag:yaml.org,2002:set":jf,"tag:yaml.org,2002:timestamp":ma};function bu(t,e,n){const r=Em.get(e);if(r&&!t)return n&&!r.includes(Nn)?r.concat(Nn):r.slice();let o=r;if(!o)if(Array.isArray(t))o=[];else{const l=Array.from(Em.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${l} or define customTags array`)}if(Array.isArray(t))for(const l of t)o=o.concat(l);else typeof t=="function"&&(o=t(o.slice()));return n&&(o=o.concat(Nn)),o.reduce((l,c)=>{const u=typeof c=="string"?km[c]:c;if(!u){const d=JSON.stringify(c),p=Object.keys(km).map(g=>JSON.stringify(g)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${p}`)}return l.includes(u)||l.push(u),l},[])}const CE=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class ga{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:o,schema:l,sortMapEntries:c,toStringDefaults:u}){this.compat=Array.isArray(e)?bu(e,"compat"):e?bu(null,e):null,this.name=typeof l=="string"&&l||"core",this.knownTags=o?TE:{},this.tags=bu(n,this.name,r),this.toStringOptions=u??null,Object.defineProperty(this,er,{value:Rs}),Object.defineProperty(this,dn,{value:fa}),Object.defineProperty(this,Ps,{value:Ds}),this.sortMapEntries=typeof c=="function"?c:c===!0?CE:null}clone(){const e=Object.create(ga.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function NE(t,e){var d;const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const p=t.directives.toString(t);p?(n.push(p),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const o=Iy(t,e),{commentString:l}=o.options;if(t.commentBefore){n.length!==1&&n.unshift("");const p=l(t.commentBefore);n.unshift(Cn(p,""))}let c=!1,u=null;if(t.contents){if($e(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const y=l(t.contents.commentBefore);n.push(Cn(y,""))}o.forceBlockIndent=!!t.comment,u=t.contents.comment}const p=u?void 0:()=>c=!0;let g=Ns(t.contents,o,()=>u=null,p);u&&(g+=_r(g,"",l(u))),(g[0]==="|"||g[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${g}`:n.push(g)}else n.push(Ns(t.contents,o));if((d=t.directives)!=null&&d.docEnd)if(t.comment){const p=l(t.comment);p.includes(`
172
- `)?(n.push("..."),n.push(Cn(p,""))):n.push(`... ${p}`)}else n.push("...");else{let p=t.comment;p&&c&&(p=p.replace(/^\n+/,"")),p&&((!c||u)&&n[n.length-1]!==""&&n.push(""),n.push(Cn(l(p),"")))}return n.join(`
173
- `)+`
174
- `}class Fs{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Vt,{value:zu});let o=null;typeof n=="function"||Array.isArray(n)?o=n:r===void 0&&n&&(r=n,n=void 0);const l=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=l;let{version:c}=l;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new dt({version:c}),this.setSchema(c,r),this.contents=e===void 0?null:this.createNode(e,o,r)}clone(){const e=Object.create(Fs.prototype,{[Vt]:{value:zu}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=$e(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ds(this.contents)&&this.contents.add(e)}addIn(e,n){ds(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=by(this);e.anchor=!n||r.has(n)?Ty(n||"a",r):n}return new la(e.anchor)}createNode(e,n,r){let o;if(typeof n=="function")e=n.call({"":e},"",e),o=n;else if(Array.isArray(n)){const E=A=>typeof A=="number"||A instanceof String||A instanceof Number,C=n.filter(E).map(String);C.length>0&&(n=n.concat(C)),o=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:l,anchorPrefix:c,flow:u,keepUndefined:d,onTagObj:p,tag:g}=r??{},{onAnchor:y,setAnchors:v,sourceObjects:S}=nE(this,c||"a"),k={aliasDuplicateObjects:l??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:S},_=Wi(e,g,k);return u&&Oe(_)&&(_.flow=!0),v(),_}createPair(e,n,r={}){const o=this.createNode(e,null,r),l=this.createNode(n,null,r);return new at(o,l)}delete(e){return ds(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ri(e)?this.contents==null?!1:(this.contents=null,!0):ds(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return Oe(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Ri(e)?!n&&ke(this.contents)?this.contents.value:this.contents:Oe(this.contents)?this.contents.getIn(e,n):void 0}has(e){return Oe(this.contents)?this.contents.has(e):!1}hasIn(e){return Ri(e)?this.contents!==void 0:Oe(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Jl(this.schema,[e],n):ds(this.contents)&&this.contents.set(e,n)}setIn(e,n){Ri(e)?this.contents=n:this.contents==null?this.contents=Jl(this.schema,Array.from(e),n):ds(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new dt({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new dt({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const o=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new ga(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:o,onAnchor:l,reviver:c}={}){const u={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},d=Ut(this.contents,n??"",u);if(typeof l=="function")for(const{count:p,res:g}of u.anchors.values())l(g,p);return typeof c=="function"?Ss(c,{"":d},"",d):d}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return NE(this,e)}}function ds(t){if(Oe(t))return!0;throw new Error("Expected a YAML collection as document contents")}class Of extends Error{constructor(e,n,r,o){super(),this.name=e,this.code=r,this.message=o,this.pos=n}}class kr extends Of{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class Jy extends Of{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const Yl=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(u=>e.linePos(u));const{line:r,col:o}=n.linePos[0];n.message+=` at line ${r}, column ${o}`;let l=o-1,c=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(l>=60&&c.length>80){const u=Math.min(l-39,c.length-79);c="…"+c.substring(u),l-=u-1}if(c.length>80&&(c=c.substring(0,79)+"…"),r>1&&/^ *$/.test(c.substring(0,l))){let u=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);u.length>80&&(u=u.substring(0,79)+`…
175
- `),c=u+c}if(/[^ ]/.test(c)){let u=1;const d=n.linePos[1];d&&d.line===r&&d.col>o&&(u=Math.max(1,Math.min(d.col-o,80-l)));const p=" ".repeat(l)+"^".repeat(u);n.message+=`:
176
-
177
- ${c}
178
- ${p}
179
- `}};function As(t,{flow:e,indicator:n,next:r,offset:o,onError:l,parentIndent:c,startOnNewline:u}){let d=!1,p=u,g=u,y="",v="",S=!1,k=!1,_=null,E=null,C=null,A=null,B=null,R=null,D=null;for(const F of t)switch(k&&(F.type!=="space"&&F.type!=="newline"&&F.type!=="comma"&&l(F.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),k=!1),_&&(p&&F.type!=="comment"&&F.type!=="newline"&&l(_,"TAB_AS_INDENT","Tabs are not allowed as indentation"),_=null),F.type){case"space":!e&&(n!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&F.source.includes(" ")&&(_=F),g=!0;break;case"comment":{g||l(F,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const M=F.source.substring(1)||" ";y?y+=v+M:y=M,v="",p=!1;break}case"newline":p?y?y+=F.source:d=!0:v+=F.source,p=!0,S=!0,(E||C)&&(A=F),g=!0;break;case"anchor":E&&l(F,"MULTIPLE_ANCHORS","A node can have at most one anchor"),F.source.endsWith(":")&&l(F.offset+F.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),E=F,D===null&&(D=F.offset),p=!1,g=!1,k=!0;break;case"tag":{C&&l(F,"MULTIPLE_TAGS","A node can have at most one tag"),C=F,D===null&&(D=F.offset),p=!1,g=!1,k=!0;break}case n:(E||C)&&l(F,"BAD_PROP_ORDER",`Anchors and tags must be after the ${F.source} indicator`),R&&l(F,"UNEXPECTED_TOKEN",`Unexpected ${F.source} in ${e??"collection"}`),R=F,p=n==="seq-item-ind"||n==="explicit-key-ind",g=!1;break;case"comma":if(e){B&&l(F,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),B=F,p=!1,g=!1;break}default:l(F,"UNEXPECTED_TOKEN",`Unexpected ${F.type} token`),p=!1,g=!1}const z=t[t.length-1],H=z?z.offset+z.source.length:o;return k&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&l(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),_&&(p&&_.indent<=c||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&l(_,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:B,found:R,spaceBefore:d,comment:y,hasNewline:S,anchor:E,tag:C,newlineAfterProp:A,end:H,start:D??H}}function Ki(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
180
- `))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(Ki(e.key)||Ki(e.value))return!0}return!1;default:return!0}}function Vu(t,e,n){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&Ki(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Xy(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const o=typeof r=="function"?r:(l,c)=>l===c||ke(l)&&ke(c)&&l.value===c.value;return e.some(l=>o(l.key,n))}const bm="All mapping items must start at the same column";function AE({composeNode:t,composeEmptyNode:e},n,r,o,l){var g;const c=(l==null?void 0:l.nodeClass)??Lt,u=new c(n.schema);n.atRoot&&(n.atRoot=!1);let d=r.offset,p=null;for(const y of r.items){const{start:v,key:S,sep:k,value:_}=y,E=As(v,{indicator:"explicit-key-ind",next:S??(k==null?void 0:k[0]),offset:d,onError:o,parentIndent:r.indent,startOnNewline:!0}),C=!E.found;if(C){if(S&&(S.type==="block-seq"?o(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in S&&S.indent!==r.indent&&o(d,"BAD_INDENT",bm)),!E.anchor&&!E.tag&&!k){p=E.end,E.comment&&(u.comment?u.comment+=`
181
- `+E.comment:u.comment=E.comment);continue}(E.newlineAfterProp||Ki(S))&&o(S??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((g=E.found)==null?void 0:g.indent)!==r.indent&&o(d,"BAD_INDENT",bm);n.atKey=!0;const A=E.end,B=S?t(n,S,E,o):e(n,A,v,null,E,o);n.schema.compat&&Vu(r.indent,S,o),n.atKey=!1,Xy(n,u.items,B)&&o(A,"DUPLICATE_KEY","Map keys must be unique");const R=As(k??[],{indicator:"map-value-ind",next:_,offset:B.range[2],onError:o,parentIndent:r.indent,startOnNewline:!S||S.type==="block-scalar"});if(d=R.end,R.found){C&&((_==null?void 0:_.type)==="block-map"&&!R.hasNewline&&o(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&E.start<R.found.offset-1024&&o(B.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const D=_?t(n,_,R,o):e(n,d,k,null,R,o);n.schema.compat&&Vu(r.indent,_,o),d=D.range[2];const z=new at(B,D);n.options.keepSourceTokens&&(z.srcToken=y),u.items.push(z)}else{C&&o(B.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),R.comment&&(B.comment?B.comment+=`
182
- `+R.comment:B.comment=R.comment);const D=new at(B);n.options.keepSourceTokens&&(D.srcToken=y),u.items.push(D)}}return p&&p<d&&o(p,"IMPOSSIBLE","Map comment with trailing content"),u.range=[r.offset,d,p??d],u}function IE({composeNode:t,composeEmptyNode:e},n,r,o,l){const c=(l==null?void 0:l.nodeClass)??nr,u=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=r.offset,p=null;for(const{start:g,value:y}of r.items){const v=As(g,{indicator:"seq-item-ind",next:y,offset:d,onError:o,parentIndent:r.indent,startOnNewline:!0});if(!v.found)if(v.anchor||v.tag||y)y&&y.type==="block-seq"?o(v.end,"BAD_INDENT","All sequence items must start at the same column"):o(d,"MISSING_CHAR","Sequence item without - indicator");else{p=v.end,v.comment&&(u.comment=v.comment);continue}const S=y?t(n,y,v,o):e(n,v.end,g,null,v,o);n.schema.compat&&Vu(r.indent,y,o),d=S.range[2],u.items.push(S)}return u.range=[r.offset,d,p??d],u}function Zi(t,e,n,r){let o="";if(t){let l=!1,c="";for(const u of t){const{source:d,type:p}=u;switch(p){case"space":l=!0;break;case"comment":{n&&!l&&r(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const g=d.substring(1)||" ";o?o+=c+g:o=g,c="";break}case"newline":o&&(c+=d),l=!0;break;default:r(u,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=d.length}}return{comment:o,offset:e}}const Tu="Block collections are not allowed within flow collections",Cu=t=>t&&(t.type==="block-map"||t.type==="block-seq");function LE({composeNode:t,composeEmptyNode:e},n,r,o,l){const c=r.start.source==="{",u=c?"flow map":"flow sequence",d=(l==null?void 0:l.nodeClass)??(c?Lt:nr),p=new d(n.schema);p.flow=!0;const g=n.atRoot;g&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let y=r.offset+r.start.source.length;for(let E=0;E<r.items.length;++E){const C=r.items[E],{start:A,key:B,sep:R,value:D}=C,z=As(A,{flow:u,indicator:"explicit-key-ind",next:B??(R==null?void 0:R[0]),offset:y,onError:o,parentIndent:r.indent,startOnNewline:!1});if(!z.found){if(!z.anchor&&!z.tag&&!R&&!D){E===0&&z.comma?o(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`):E<r.items.length-1&&o(z.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${u}`),z.comment&&(p.comment?p.comment+=`
183
- `+z.comment:p.comment=z.comment),y=z.end;continue}!c&&n.options.strict&&Ki(B)&&o(B,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(E===0)z.comma&&o(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`);else if(z.comma||o(z.start,"MISSING_CHAR",`Missing , between ${u} items`),z.comment){let H="";e:for(const F of A)switch(F.type){case"comma":case"space":break;case"comment":H=F.source.substring(1);break e;default:break e}if(H){let F=p.items[p.items.length-1];Me(F)&&(F=F.value??F.key),F.comment?F.comment+=`
184
- `+H:F.comment=H,z.comment=z.comment.substring(H.length+1)}}if(!c&&!R&&!z.found){const H=D?t(n,D,z,o):e(n,z.end,R,null,z,o);p.items.push(H),y=H.range[2],Cu(D)&&o(H.range,"BLOCK_IN_FLOW",Tu)}else{n.atKey=!0;const H=z.end,F=B?t(n,B,z,o):e(n,H,A,null,z,o);Cu(B)&&o(F.range,"BLOCK_IN_FLOW",Tu),n.atKey=!1;const M=As(R??[],{flow:u,indicator:"map-value-ind",next:D,offset:F.range[2],onError:o,parentIndent:r.indent,startOnNewline:!1});if(M.found){if(!c&&!z.found&&n.options.strict){if(R)for(const O of R){if(O===M.found)break;if(O.type==="newline"){o(O,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}z.start<M.found.offset-1024&&o(M.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else D&&("source"in D&&D.source&&D.source[0]===":"?o(D,"MISSING_CHAR",`Missing space after : in ${u}`):o(M.start,"MISSING_CHAR",`Missing , or : between ${u} items`));const G=D?t(n,D,M,o):M.found?e(n,M.end,R,null,M,o):null;G?Cu(D)&&o(G.range,"BLOCK_IN_FLOW",Tu):M.comment&&(F.comment?F.comment+=`
185
- `+M.comment:F.comment=M.comment);const K=new at(F,G);if(n.options.keepSourceTokens&&(K.srcToken=C),c){const O=p;Xy(n,O.items,F)&&o(H,"DUPLICATE_KEY","Map keys must be unique"),O.items.push(K)}else{const O=new Lt(n.schema);O.flow=!0,O.items.push(K);const X=(G??F).range;O.range=[F.range[0],X[1],X[2]],p.items.push(O)}y=G?G.range[2]:M.end}}const v=c?"}":"]",[S,...k]=r.end;let _=y;if(S&&S.source===v)_=S.offset+S.source.length;else{const E=u[0].toUpperCase()+u.substring(1),C=g?`${E} must end with a ${v}`:`${E} in block collection must be sufficiently indented and end with a ${v}`;o(y,g?"MISSING_CHAR":"BAD_INDENT",C),S&&S.source.length!==1&&k.unshift(S)}if(k.length>0){const E=Zi(k,_,n.options.strict,o);E.comment&&(p.comment?p.comment+=`
186
- `+E.comment:p.comment=E.comment),p.range=[r.offset,_,E.offset]}else p.range=[r.offset,_,_];return p}function Nu(t,e,n,r,o,l){const c=n.type==="block-map"?AE(t,e,n,r,l):n.type==="block-seq"?IE(t,e,n,r,l):LE(t,e,n,r,l),u=c.constructor;return o==="!"||o===u.tagName?(c.tag=u.tagName,c):(o&&(c.tag=o),c)}function ME(t,e,n,r,o){var v;const l=r.tag,c=l?e.directives.tagName(l.source,S=>o(l,"TAG_RESOLVE_FAILED",S)):null;if(n.type==="block-seq"){const{anchor:S,newlineAfterProp:k}=r,_=S&&l?S.offset>l.offset?S:l:S??l;_&&(!k||k.offset<_.offset)&&o(_,"MISSING_CHAR","Missing newline after block sequence props")}const u=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!l||!c||c==="!"||c===Lt.tagName&&u==="map"||c===nr.tagName&&u==="seq")return Nu(t,e,n,o,c);let d=e.schema.tags.find(S=>S.tag===c&&S.collection===u);if(!d){const S=e.schema.knownTags[c];if(S&&S.collection===u)e.schema.tags.push(Object.assign({},S,{default:!1})),d=S;else return S!=null&&S.collection?o(l,"BAD_COLLECTION_TYPE",`${S.tag} used for ${u} collection, but expects ${S.collection}`,!0):o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),Nu(t,e,n,o,c)}const p=Nu(t,e,n,o,c,d),g=((v=d.resolve)==null?void 0:v.call(d,p,S=>o(l,"TAG_RESOLVE_FAILED",S),e.options))??p,y=$e(g)?g:new ue(g);return y.range=p.range,y.tag=c,d!=null&&d.format&&(y.format=d.format),y}function Yy(t,e,n){const r=e.offset,o=jE(e,t.options.strict,n);if(!o)return{value:"",type:null,comment:"",range:[r,r,r]};const l=o.mode===">"?ue.BLOCK_FOLDED:ue.BLOCK_LITERAL,c=e.source?PE(e.source):[];let u=c.length;for(let _=c.length-1;_>=0;--_){const E=c[_][1];if(E===""||E==="\r")u=_;else break}if(u===0){const _=o.chomp==="+"&&c.length>0?`
187
- `.repeat(Math.max(1,c.length-1)):"";let E=r+o.length;return e.source&&(E+=e.source.length),{value:_,type:l,comment:o.comment,range:[r,E,E]}}let d=e.indent+o.indent,p=e.offset+o.length,g=0;for(let _=0;_<u;++_){const[E,C]=c[_];if(C===""||C==="\r")o.indent===0&&E.length>d&&(d=E.length);else{E.length<d&&n(p+E.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),o.indent===0&&(d=E.length),g=_,d===0&&!t.atRoot&&n(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=E.length+C.length+1}for(let _=c.length-1;_>=u;--_)c[_][0].length>d&&(u=_+1);let y="",v="",S=!1;for(let _=0;_<g;++_)y+=c[_][0].slice(d)+`
188
- `;for(let _=g;_<u;++_){let[E,C]=c[_];p+=E.length+C.length+1;const A=C[C.length-1]==="\r";if(A&&(C=C.slice(0,-1)),C&&E.length<d){const R=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;n(p-C.length-(A?2:1),"BAD_INDENT",R),E=""}l===ue.BLOCK_LITERAL?(y+=v+E.slice(d)+C,v=`
189
- `):E.length>d||C[0]===" "?(v===" "?v=`
190
- `:!S&&v===`
191
- `&&(v=`
192
-
193
- `),y+=v+E.slice(d)+C,v=`
194
- `,S=!0):C===""?v===`
195
- `?y+=`
196
- `:v=`
197
- `:(y+=v+C,v=" ",S=!1)}switch(o.chomp){case"-":break;case"+":for(let _=u;_<c.length;++_)y+=`
198
- `+c[_][0].slice(d);y[y.length-1]!==`
199
- `&&(y+=`
200
- `);break;default:y+=`
201
- `}const k=r+o.length+e.source.length;return{value:y,type:l,comment:o.comment,range:[r,k,k]}}function jE({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=e[0],l=o[0];let c=0,u="",d=-1;for(let v=1;v<o.length;++v){const S=o[v];if(!u&&(S==="-"||S==="+"))u=S;else{const k=Number(S);!c&&k?c=k:d===-1&&(d=t+v)}}d!==-1&&r(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let p=!1,g="",y=o.length;for(let v=1;v<e.length;++v){const S=e[v];switch(S.type){case"space":p=!0;case"newline":y+=S.source.length;break;case"comment":n&&!p&&r(S,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=S.source.length,g=S.source.substring(1);break;case"error":r(S,"UNEXPECTED_TOKEN",S.message),y+=S.source.length;break;default:{const k=`Unexpected token in block scalar header: ${S.type}`;r(S,"UNEXPECTED_TOKEN",k);const _=S.source;_&&typeof _=="string"&&(y+=_.length)}}}return{mode:l,indent:c,chomp:u,comment:g,length:y}}function PE(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),l=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let c=1;c<e.length;c+=2)l.push([e[c],e[c+1]]);return l}function Zy(t,e,n){const{offset:r,type:o,source:l,end:c}=t;let u,d;const p=(v,S,k)=>n(r+v,S,k);switch(o){case"scalar":u=ue.PLAIN,d=OE(l,p);break;case"single-quoted-scalar":u=ue.QUOTE_SINGLE,d=$E(l,p);break;case"double-quoted-scalar":u=ue.QUOTE_DOUBLE,d=RE(l,p);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[r,r+l.length,r+l.length]}}const g=r+l.length,y=Zi(c,g,e,n);return{value:d,type:u,comment:y.comment,range:[r,g,y.offset]}}function OE(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),ev(t)}function $E(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),ev(t.slice(1,-1)).replace(/''/g,"'")}function ev(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
202
- `,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
203
- `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let o=r[1],l=" ",c=e.lastIndex;for(n.lastIndex=c;r=n.exec(t);)r[1]===""?l===`
204
- `?o+=l:l=`
205
- `:(o+=l+r[1],l=" "),c=n.lastIndex;const u=/[ \t]*(.*)/sy;return u.lastIndex=c,r=u.exec(t),o+l+((r==null?void 0:r[1])??"")}function RE(t,e){let n="";for(let r=1;r<t.length-1;++r){const o=t[r];if(!(o==="\r"&&t[r+1]===`
206
- `))if(o===`
207
- `){const{fold:l,offset:c}=DE(t,r);n+=l,r=c}else if(o==="\\"){let l=t[++r];const c=FE[l];if(c)n+=c;else if(l===`
208
- `)for(l=t[r+1];l===" "||l===" ";)l=t[++r+1];else if(l==="\r"&&t[r+1]===`
209
- `)for(l=t[++r+1];l===" "||l===" ";)l=t[++r+1];else if(l==="x"||l==="u"||l==="U"){const u={x:2,u:4,U:8}[l];n+=BE(t,r+1,u,e),r+=u}else{const u=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),n+=u}}else if(o===" "||o===" "){const l=r;let c=t[r+1];for(;c===" "||c===" ";)c=t[++r+1];c!==`
210
- `&&!(c==="\r"&&t[r+2]===`
211
- `)&&(n+=r>l?t.slice(l,r+1):o)}else n+=o}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function DE(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
212
- `||r==="\r")&&!(r==="\r"&&t[e+2]!==`
213
- `);)r===`
214
- `&&(n+=`
215
- `),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const FE={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
216
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function BE(t,e,n,r){const o=t.substr(e,n),c=o.length===n&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(c)){const u=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),u}return String.fromCodePoint(c)}function tv(t,e,n,r){const{value:o,type:l,comment:c,range:u}=e.type==="block-scalar"?Yy(t,e,r):Zy(e,t.options.strict,r),d=n?t.directives.tagName(n.source,y=>r(n,"TAG_RESOLVE_FAILED",y)):null;let p;t.options.stringKeys&&t.atKey?p=t.schema[dn]:d?p=zE(t.schema,o,d,n,r):e.type==="scalar"?p=HE(t,o,e,r):p=t.schema[dn];let g;try{const y=p.resolve(o,v=>r(n??e,"TAG_RESOLVE_FAILED",v),t.options);g=ke(y)?y:new ue(y)}catch(y){const v=y instanceof Error?y.message:String(y);r(n??e,"TAG_RESOLVE_FAILED",v),g=new ue(o)}return g.range=u,g.source=o,l&&(g.type=l),d&&(g.tag=d),p.format&&(g.format=p.format),c&&(g.comment=c),g}function zE(t,e,n,r,o){var u;if(n==="!")return t[dn];const l=[];for(const d of t.tags)if(!d.collection&&d.tag===n)if(d.default&&d.test)l.push(d);else return d;for(const d of l)if((u=d.test)!=null&&u.test(e))return d;const c=t.knownTags[n];return c&&!c.collection?(t.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(o(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[dn])}function HE({atKey:t,directives:e,schema:n},r,o,l){const c=n.tags.find(u=>{var d;return(u.default===!0||t&&u.default==="key")&&((d=u.test)==null?void 0:d.test(r))})||n[dn];if(n.compat){const u=n.compat.find(d=>{var p;return d.default&&((p=d.test)==null?void 0:p.test(r))})??n[dn];if(c.tag!==u.tag){const d=e.tagString(c.tag),p=e.tagString(u.tag),g=`Value may be parsed as either ${d} or ${p}`;l(o,"TAG_RESOLVE_FAILED",g,!0)}}return c}function UE(t,e,n){if(e){n===null&&(n=e.length);for(let r=n-1;r>=0;--r){let o=e[r];switch(o.type){case"space":case"comment":case"newline":t-=o.source.length;continue}for(o=e[++r];(o==null?void 0:o.type)==="space";)t+=o.source.length,o=e[++r];break}}return t}const qE={composeNode:nv,composeEmptyNode:$f};function nv(t,e,n,r){const o=t.atKey,{spaceBefore:l,comment:c,anchor:u,tag:d}=n;let p,g=!0;switch(e.type){case"alias":p=VE(t,e,r),(u||d)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=tv(t,e,d,r),u&&(p.anchor=u.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=ME(qE,t,e,n,r),u&&(p.anchor=u.source.substring(1));break;default:{const y=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",y),p=$f(t,e.offset,void 0,null,n,r),g=!1}}return u&&p.anchor===""&&r(u,"BAD_ALIAS","Anchor cannot be an empty string"),o&&t.options.stringKeys&&(!ke(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&r(d??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),l&&(p.spaceBefore=!0),c&&(e.type==="scalar"&&e.source===""?p.comment=c:p.commentBefore=c),t.options.keepSourceTokens&&g&&(p.srcToken=e),p}function $f(t,e,n,r,{spaceBefore:o,comment:l,anchor:c,tag:u,end:d},p){const g={type:"scalar",offset:UE(e,n,r),indent:-1,source:""},y=tv(t,g,u,p);return c&&(y.anchor=c.source.substring(1),y.anchor===""&&p(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(y.spaceBefore=!0),l&&(y.comment=l,y.range[2]=d),y}function VE({options:t},{offset:e,source:n,end:r},o){const l=new la(n.substring(1));l.source===""&&o(e,"BAD_ALIAS","Alias cannot be an empty string"),l.source.endsWith(":")&&o(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=e+n.length,u=Zi(r,c,t.strict,o);return l.range=[e,c,u.offset],u.comment&&(l.comment=u.comment),l}function WE(t,e,{offset:n,start:r,value:o,end:l},c){const u=Object.assign({_directives:e},t),d=new Fs(void 0,u),p={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},g=As(r,{indicator:"doc-start",next:o??(l==null?void 0:l[0]),offset:n,onError:c,parentIndent:0,startOnNewline:!0});g.found&&(d.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!g.hasNewline&&c(g.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=o?nv(p,o,g,c):$f(p,g.end,r,null,g,c);const y=d.contents.range[2],v=Zi(l,y,!1,c);return v.comment&&(d.comment=v.comment),d.range=[n,y,v.offset],d}function Li(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function Tm(t){var o;let e="",n=!1,r=!1;for(let l=0;l<t.length;++l){const c=t[l];switch(c[0]){case"#":e+=(e===""?"":r?`
217
-
218
- `:`
219
- `)+(c.substring(1)||" "),n=!0,r=!1;break;case"%":((o=t[l+1])==null?void 0:o[0])!=="#"&&(l+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}class Rf{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,o,l)=>{const c=Li(n);l?this.warnings.push(new Jy(c,r,o)):this.errors.push(new kr(c,r,o))},this.directives=new dt({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:r,afterEmptyLine:o}=Tm(this.prelude);if(r){const l=e.contents;if(n)e.comment=e.comment?`${e.comment}
220
- ${r}`:r;else if(o||e.directives.docStart||!l)e.commentBefore=r;else if(Oe(l)&&!l.flow&&l.items.length>0){let c=l.items[0];Me(c)&&(c=c.key);const u=c.commentBefore;c.commentBefore=u?`${r}
221
- ${u}`:r}else{const c=l.commentBefore;l.commentBefore=c?`${r}
222
- ${c}`:r}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Tm(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const o of e)yield*this.next(o);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,o)=>{const l=Li(e);l[0]+=n,this.onError(l,"BAD_DIRECTIVE",r,o)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=WE(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new kr(Li(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new kr(Li(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=Zi(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
223
- ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new kr(Li(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),o=new Fs(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,n,n],this.decorate(o,!1),yield o}}}function KE(t,e=!0,n){if(t){const r=(o,l,c)=>{const u=typeof o=="number"?o:Array.isArray(o)?o[0]:o.offset;if(n)n(u,l,c);else throw new kr([u,u+1],l,c)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Zy(t,e,r);case"block-scalar":return Yy({options:{strict:e}},t,r)}}return null}function GE(t,e){const{implicitKey:n=!1,indent:r,inFlow:o=!1,offset:l=-1,type:c="PLAIN"}=e,u=Xi({type:c,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:r,source:`
224
- `}];switch(u[0]){case"|":case">":{const p=u.indexOf(`
225
- `),g=u.substring(0,p),y=u.substring(p+1)+`
226
- `,v=[{type:"block-scalar-header",offset:l,indent:r,source:g}];return rv(v,d)||v.push({type:"newline",offset:-1,indent:r,source:`
227
- `}),{type:"block-scalar",offset:l,indent:r,props:v,source:y}}case'"':return{type:"double-quoted-scalar",offset:l,indent:r,source:u,end:d};case"'":return{type:"single-quoted-scalar",offset:l,indent:r,source:u,end:d};default:return{type:"scalar",offset:l,indent:r,source:u,end:d}}}function QE(t,e,n={}){let{afterKey:r=!1,implicitKey:o=!1,inFlow:l=!1,type:c}=n,u="indent"in t?t.indent:null;if(r&&typeof u=="number"&&(u+=2),!c)switch(t.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const p=t.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const d=Xi({type:c,value:e},{implicitKey:o||u===null,indent:u!==null&&u>0?" ".repeat(u):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":JE(t,d);break;case'"':Au(t,d,"double-quoted-scalar");break;case"'":Au(t,d,"single-quoted-scalar");break;default:Au(t,d,"scalar")}}function JE(t,e){const n=e.indexOf(`
228
- `),r=e.substring(0,n),o=e.substring(n+1)+`
229
- `;if(t.type==="block-scalar"){const l=t.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l.source=r,t.source=o}else{const{offset:l}=t,c="indent"in t?t.indent:-1,u=[{type:"block-scalar-header",offset:l,indent:c,source:r}];rv(u,"end"in t?t.end:void 0)||u.push({type:"newline",offset:-1,indent:c,source:`
230
- `});for(const d of Object.keys(t))d!=="type"&&d!=="offset"&&delete t[d];Object.assign(t,{type:"block-scalar",indent:c,props:u,source:o})}}function rv(t,e){if(e)for(const n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function Au(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{const r=t.props.slice(1);let o=e.length;t.props[0].type==="block-scalar-header"&&(o-=t.props[0].source.length);for(const l of r)l.offset+=o;delete t.props,Object.assign(t,{type:n,source:e,end:r});break}case"block-map":case"block-seq":{const o={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
231
- `};delete t.items,Object.assign(t,{type:n,source:e,end:[o]});break}default:{const r="indent"in t?t.indent:-1,o="end"in t&&Array.isArray(t.end)?t.end.filter(l=>l.type==="space"||l.type==="comment"||l.type==="newline"):[];for(const l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:n,indent:r,source:e,end:o})}}}const XE=t=>"type"in t?Zl(t):Ol(t);function Zl(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=Zl(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=Ol(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=Ol(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=Ol(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function Ol({start:t,key:e,sep:n,value:r}){let o="";for(const l of t)o+=l.source;if(e&&(o+=Zl(e)),n)for(const l of n)o+=l.source;return r&&(o+=Zl(r)),o}const Wu=Symbol("break visit"),YE=Symbol("skip children"),sv=Symbol("remove item");function Nr(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),iv(Object.freeze([]),t,e)}Nr.BREAK=Wu;Nr.SKIP=YE;Nr.REMOVE=sv;Nr.itemAtPath=(t,e)=>{let n=t;for(const[r,o]of e){const l=n==null?void 0:n[r];if(l&&"items"in l)n=l.items[o];else return}return n};Nr.parentCollection=(t,e)=>{const n=Nr.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],o=n==null?void 0:n[r];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function iv(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const o of["key","value"]){const l=e[o];if(l&&"items"in l){for(let c=0;c<l.items.length;++c){const u=iv(Object.freeze(t.concat([[o,c]])),l.items[c],n);if(typeof u=="number")c=u-1;else{if(u===Wu)return Wu;u===sv&&(l.items.splice(c,1),c-=1)}}typeof r=="function"&&o==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}const ya="\uFEFF",va="",wa="",Gi="",ZE=t=>!!t&&"items"in t,ek=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function tk(t){switch(t){case ya:return"<BOM>";case va:return"<DOC>";case wa:return"<FLOW_END>";case Gi:return"<SCALAR>";default:return JSON.stringify(t)}}function ov(t){switch(t){case ya:return"byte-order-mark";case va:return"doc-mode";case wa:return"flow-error-end";case Gi:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
232
- `:case`\r
233
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const nk=Object.freeze(Object.defineProperty({__proto__:null,BOM:ya,DOCUMENT:va,FLOW_END:wa,SCALAR:Gi,createScalarToken:GE,isCollection:ZE,isScalar:ek,prettyToken:tk,resolveAsScalar:KE,setScalarValue:QE,stringify:XE,tokenType:ov,visit:Nr},Symbol.toStringTag,{value:"Module"}));function Zt(t){switch(t){case void 0:case" ":case`
234
- `:case"\r":case" ":return!0;default:return!1}}const Cm=new Set("0123456789ABCDEFabcdef"),rk=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),_l=new Set(",[]{}"),sk=new Set(` ,[]{}
235
- \r `),Iu=t=>!t||sk.has(t);class lv{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
236
- `?!0:n==="\r"?this.buffer[e+1]===`
237
- `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){const o=this.buffer[r+e+1];if(o===`
238
- `||!o&&!this.atEnd)return e+r+1}return n===`
239
- `||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&Zt(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
240
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===ya&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){const l=e[r-1];if(l===" "||l===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const l=e[n-1];if(l===" "||l===" ")n-=1;else break}const o=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield va,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&Zt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Zt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Zt(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Iu),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&o[0]!=="#"||r===0&&(o.startsWith("---")||o.startsWith("..."))&&Zt(o[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield wa,yield*this.parseLineStart();let l=0;for(;o[l]===",";)l+=yield*this.pushCount(1),l+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(l+=yield*this.pushIndicators(),o[l]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-l),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Iu),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||Zt(c)||c===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let l=0;for(;this.buffer[n-1-l]==="\\";)l+=1;if(l%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let o=r.indexOf(`
241
- `,this.pos);if(o!==-1){for(;o!==-1;){const l=this.continueScalar(o+1);if(l===-1)break;o=r.indexOf(`
242
- `,l)}o!==-1&&(n=o-(r[o-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>Zt(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let l=this.pos;r=this.buffer[l];++l)switch(r){case" ":n+=1;break;case`
243
- `:e=l,n=0;break;case"\r":{const c=this.buffer[l+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
244
- `)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const l=this.continueScalar(e+1);if(l===-1)break;e=this.buffer.indexOf(`
245
- `,l)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let o=e+1;for(r=this.buffer[o];r===" ";)r=this.buffer[++o];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
246
- `;)r=this.buffer[++o];e=o-1}else if(!this.blockScalarKeep)do{let l=e-1,c=this.buffer[l];c==="\r"&&(c=this.buffer[--l]);const u=l;for(;c===" ";)c=this.buffer[--l];if(c===`
247
- `&&l>=this.pos&&l+1+n>u)e=l;else break}while(!0);return yield Gi,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,o;for(;o=this.buffer[++r];)if(o===":"){const l=this.buffer[r+1];if(Zt(l)||e&&_l.has(l))break;n=r}else if(Zt(o)){let l=this.buffer[r+1];if(o==="\r"&&(l===`
248
- `?(r+=1,o=`
249
- `,l=this.buffer[r+1]):n=r),l==="#"||e&&_l.has(l))break;if(o===`
250
- `){const c=this.continueScalar(r+1);if(c===-1)break;r=Math.max(r,c-2)}}else{if(e&&_l.has(o))break;n=r}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield Gi,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Iu))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(Zt(n)||e&&_l.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!Zt(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(rk.has(n))n=this.buffer[++e];else if(n==="%"&&Cm.has(this.buffer[e+1])&&Cm.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
251
- `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
252
- `?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");const o=n-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=n),o}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class av{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){const l=n+r>>1;this.lineStarts[l]<e?n=l+1:r=l}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const o=this.lineStarts[n-1];return{line:n,col:e-o+1}}}}function xr(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Nm(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function cv(t){switch(t==null?void 0:t.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function El(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function hs(t){var n;if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=t[++e])==null?void 0:n.type)==="space";);return t.splice(e,t.length)}function Am(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!xr(e.start,"explicit-key-ind")&&!xr(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,cv(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Df{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new lv,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=ov(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Am(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const o=r.items[r.items.length-1];if(o.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=n;else{Object.assign(o,{key:n,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=r.items[r.items.length-1];o.value?r.items.push({start:[],value:n}):o.value=n;break}case"flow-collection":{const o=r.items[r.items.length-1];!o||o.value?r.items.push({start:[],key:n,sep:[]}):o.sep?o.value=n:Object.assign(o,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const o=n.items[n.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&Nm(o.start)===-1&&(n.indent===0||o.start.every(l=>l.type!=="comment"||l.indent<n.indent))&&(r.type==="document"?r.end=o.start:r.items.push({start:o.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Nm(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const n=El(this.peek(2)),r=hs(n);let o;e.end?(o=e.end,o.push(this.sourceToken),delete e.end):o=[this.sourceToken];const l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
253
- `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
254
- `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const o="end"in n.value?n.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],l=(r=o==null?void 0:o.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const o=!this.onKeyLine&&this.indent===e.indent,l=o&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(l&&n.sep&&!n.value){const u=[];for(let d=0;d<n.sep.length;++d){const p=n.sep[d];switch(p.type){case"newline":u.push(d);break;case"space":break;case"comment":p.indent>e.indent&&(u.length=0);break;default:u.length=0}}u.length>=2&&(c=n.sep.splice(u[1]))}switch(this.type){case"anchor":case"tag":l||n.value?(c.push(this.sourceToken),e.items.push({start:c}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):l||n.value?(c.push(this.sourceToken),e.items.push({start:c,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(xr(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(cv(n.key)&&!xr(n.sep,"newline")){const u=hs(n.start),d=n.key,p=n.sep;p.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:d,sep:p}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(xr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const u=hs(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||l?e.items.push({start:c,key:null,sep:[this.sourceToken]}):xr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const u=this.flowScalar(this.type);l||n.value?(e.items.push({start:c,key:u,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(u):(Object.assign(n,{key:u,sep:[]}),this.onKeyLine=!0);return}default:{const u=this.startBlockValue(e);if(u){o&&u.type!=="block-seq"&&e.items.push({start:c}),this.stack.push(u);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const o="end"in n.value?n.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],l=(r=o==null?void 0:o.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||xr(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const o=this.startBlockValue(e);if(o){this.stack.push(o);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:o,sep:[]}):n.sep?this.stack.push(o):Object.assign(n,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const o=El(r),l=hs(o);Am(e);const c=e.end.splice(1,e.end.length);c.push(this.sourceToken);const u={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:l,key:e,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
255
- `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
256
- `,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=El(e),r=hs(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=El(e),r=hs(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function uv(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new av||null,prettyErrors:e}}function ik(t,e={}){const{lineCounter:n,prettyErrors:r}=uv(e),o=new Df(n==null?void 0:n.addNewLine),l=new Rf(e),c=Array.from(l.compose(o.parse(t)));if(r&&n)for(const u of c)u.errors.forEach(Yl(t,n)),u.warnings.forEach(Yl(t,n));return c.length>0?c:Object.assign([],{empty:!0},l.streamInfo())}function fv(t,e={}){const{lineCounter:n,prettyErrors:r}=uv(e),o=new Df(n==null?void 0:n.addNewLine),l=new Rf(e);let c=null;for(const u of l.compose(o.parse(t),!0,t.length))if(!c)c=u;else if(c.options.logLevel!=="silent"){c.errors.push(new kr(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(c.errors.forEach(Yl(t,n)),c.warnings.forEach(Yl(t,n))),c}function ok(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const o=fv(t,n);if(!o)return null;if(o.warnings.forEach(l=>Ly(o.options.logLevel,l)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function lk(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(t===void 0){const{keepUndefined:o}=n??e??{};if(!o)return}return Mr(t)&&!r?t.toString(n):new Fs(t,r,n).toString(n)}const dv=Object.freeze(Object.defineProperty({__proto__:null,Alias:la,CST:nk,Composer:Rf,Document:Fs,Lexer:lv,LineCounter:av,Pair:at,Parser:Df,Scalar:ue,Schema:ga,YAMLError:Of,YAMLMap:Lt,YAMLParseError:kr,YAMLSeq:nr,YAMLWarning:Jy,isAlias:Lr,isCollection:Oe,isDocument:Mr,isMap:Os,isNode:$e,isPair:Me,isScalar:ke,isSeq:$s,parse:ok,parseAllDocuments:ik,parseDocument:fv,stringify:lk,visit:tr,visitAsync:oa},Symbol.toStringTag,{value:"Module"})),ak=({action:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const[u,d]=$.useState("action"),[p,g]=Ts("shouldPopulateCanvasFromScreenshot",!1),y=$.useMemo(()=>dk(t),[t]),v=$.useMemo(()=>{const S=y[u];return S?hk(S,p):void 0},[y,u,p]);return w.jsxs("div",{className:"snapshot-tab vbox",children:[w.jsxs(tf,{children:[w.jsx(qt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:r,onClick:()=>o(!r)}),["action","before","after"].map(S=>w.jsx(gg,{id:S,title:fk(S),selected:u===S,onSelect:()=>d(S)},S)),w.jsx("div",{style:{flex:"auto"}}),w.jsx(qt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(v!=null&&v.popoutUrl),onClick:()=>{const S=window.open((v==null?void 0:v.popoutUrl)||"","_blank");S==null||S.addEventListener("DOMContentLoaded",()=>{new my(S,{isUnderTest:pv,sdkLanguage:e,testIdAttributeName:n,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),w.jsx(ck,{snapshotUrls:v,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})]})},ck=({snapshotUrls:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const u=$.useRef(null),d=$.useRef(null),[p,g]=$.useState({viewport:mv,url:""}),y=$.useRef({iteration:0,visibleIframe:0});return $.useEffect(()=>{(async()=>{const v=y.current.iteration+1,S=1-y.current.visibleIframe;y.current.iteration=v;const k=await pk(t==null?void 0:t.snapshotInfoUrl);if(y.current.iteration!==v)return;const _=[u,d][S].current;if(_){let E=()=>{};const C=new Promise(A=>E=A);try{_.addEventListener("load",E),_.addEventListener("error",E);const A=(t==null?void 0:t.snapshotUrl)||mk;_.contentWindow?_.contentWindow.location.replace(A):_.src=A,await C}catch{}finally{_.removeEventListener("load",E),_.removeEventListener("error",E)}}y.current.iteration===v&&(y.current.visibleIframe=S,g(k))})()},[t]),w.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:v=>{v.key==="Escape"&&r&&o(!1)},children:[w.jsx(Im,{isInspecting:r,sdkLanguage:e,testIdAttributeName:n,highlightedElement:l,setHighlightedElement:c,iframe:u.current,iteration:y.current.iteration}),w.jsx(Im,{isInspecting:r,sdkLanguage:e,testIdAttributeName:n,highlightedElement:l,setHighlightedElement:c,iframe:d.current,iteration:y.current.iteration}),w.jsx(uk,{snapshotInfo:p,children:w.jsxs("div",{className:"snapshot-switcher",children:[w.jsx("iframe",{ref:u,name:"snapshot",title:"DOM Snapshot",className:Be(y.current.visibleIframe===0&&"snapshot-visible")}),w.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:Be(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},uk=({snapshotInfo:t,children:e})=>{const[n,r]=Ar(),l={width:t.viewport.width,height:t.viewport.height+40},c=Math.min(n.width/l.width,n.height/l.height,1),u={x:(n.width-l.width)/2,y:(n.height-l.height)/2};return w.jsx("div",{ref:r,className:"snapshot-wrapper",children:w.jsxs("div",{className:"snapshot-container",style:{width:l.width+"px",height:l.height+"px",transform:`translate(${u.x}px, ${u.y}px) scale(${c})`},children:[w.jsx(Y_,{url:t.url}),e]})})};function fk(t){return t==="before"?"Before":t==="after"?"After":t==="action"?"Action":t}const Im=({iframe:t,isInspecting:e,sdkLanguage:n,testIdAttributeName:r,highlightedElement:o,setHighlightedElement:l,iteration:c})=>($.useEffect(()=>{const u=o.lastEdited==="ariaSnapshot"?o.ariaSnapshot:void 0,d=o.lastEdited==="locator"?o.locator:void 0,p=!!u||!!d||e,g=[],y=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{hv(g,p,n,r,y,"",t==null?void 0:t.contentWindow)}catch{}const v=u?nf(dv,u):void 0,S=d?J_(n,d,r):void 0;for(const{recorder:k,frameSelector:_}of g){const E=S!=null&&S.startsWith(_)?S.substring(_.length).trim():void 0,C=(v==null?void 0:v.errors.length)===0?v.fragment:void 0;k.setUIState({mode:e?"inspecting":"none",actionSelector:E,ariaTemplate:C,language:n,testIdAttributeName:r,overlay:{offsetX:0}},{async elementPicked(A){l({locator:Tr(n,_+A.selector),ariaSnapshot:A.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const A of g)A.recorder!==k&&A.recorder.clearHighlight()}})}},[t,e,o,l,n,r,c]),w.jsx(w.Fragment,{}));function hv(t,e,n,r,o,l,c){if(!c)return;const u=c;if(!u._recorder&&e){const d=new my(c,{isUnderTest:o,sdkLanguage:n,testIdAttributeName:r,stableRafCount:1,browserName:"chromium",customEngines:[]}),p=new V_(d);u._injectedScript=d,u._recorder={recorder:p,frameSelector:l},o&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(p)))}u._recorder&&t.push(u._recorder);for(let d=0;d<c.frames.length;++d){const p=c.frames[d],g=p.frameElement?u._injectedScript.generateSelectorSimple(p.frameElement,{omitInternalEngines:!0,testIdAttributeName:r})+" >> internal:control=enter-frame >> ":"";hv(t,e,n,r,o,l+g,p)}}function dk(t){if(!t)return{};let e=t.beforeSnapshot?{action:t,snapshotName:t.beforeSnapshot}:void 0;if(!e){for(let o=$p(t);o;o=$p(o))if(o.endTime<=t.startTime&&o.afterSnapshot){e={action:o,snapshotName:o.afterSnapshot};break}}let n=t.afterSnapshot?{action:t,snapshotName:t.afterSnapshot}:void 0;if(!n){let o;for(let l=Rp(t);l&&l.startTime<=t.endTime;l=Rp(l))l.endTime>t.endTime||!l.afterSnapshot||o&&o.endTime>l.endTime||(o=l);o?n={action:o,snapshotName:o.afterSnapshot}:n=e}const r=t.inputSnapshot?{action:t,snapshotName:t.inputSnapshot,hasInputTarget:!0}:n;return r&&(r.point=t.point),{action:r,before:e,after:n}}const pv=new URLSearchParams(window.location.search).has("isUnderTest"),Lm=new URLSearchParams(window.location.search).get("server");function hk(t,e){const n=new URLSearchParams;n.set("trace",Rl(t.action).traceUrl),n.set("name",t.snapshotName),pv&&n.set("isUnderTest","true"),t.point&&(n.set("pointX",String(t.point.x)),n.set("pointY",String(t.point.y)),t.hasInputTarget&&n.set("hasInputTarget","1")),e&&n.set("shouldPopulateCanvasFromScreenshot","1");const r=new URL(`snapshot/${t.action.pageId}?${n.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${t.action.pageId}?${n.toString()}`,window.location.href).toString(),l=new URLSearchParams;l.set("r",r),Lm&&l.set("server",Lm),l.set("trace",Rl(t.action).traceUrl),t.point&&(l.set("pointX",String(t.point.x)),l.set("pointY",String(t.point.y)),t.hasInputTarget&&n.set("hasInputTarget","1"));const c=new URL(`snapshot.html?${l.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:r,popoutUrl:c}}async function pk(t){const e={url:"",viewport:mv,timestamp:void 0,wallTime:void 0};if(t){const r=await(await fetch(t)).json();r.error||(e.url=r.url,e.viewport=r.viewport,e.timestamp=r.timestamp,e.wallTime=r.wallTime)}return e}const mv={width:1280,height:720},mk='data:text/html,<body style="background: #ddd"></body>',gv={width:200,height:45},ms=2.5,gk=gv.height+ms*2,yk=({model:t,boundaries:e,previewPoint:n})=>{var g,y;const[r,o]=Ar(),l=$.useRef(null);let c=0;if(l.current&&n){const v=l.current.getBoundingClientRect();c=(n.clientY-v.top+l.current.scrollTop)/gk|0}const u=(y=(g=t==null?void 0:t.pages)==null?void 0:g[c])==null?void 0:y.screencastFrames;let d,p;if(n!==void 0&&u&&u.length){const v=e.minimum+(e.maximum-e.minimum)*n.x/r.width;d=u[jm(u,v,yv)-1];const S={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};p=d?vv({width:d.width,height:d.height},S):void 0}return w.jsxs("div",{className:"film-strip",ref:o,children:[w.jsx("div",{className:"film-strip-lanes",ref:l,children:t==null?void 0:t.pages.map((v,S)=>v.screencastFrames.length?w.jsx(vk,{boundaries:e,page:v,width:r.width},S):null)}),(n==null?void 0:n.x)!==void 0&&w.jsxs("div",{className:"film-strip-hover",style:{top:r.bottom+5,left:Math.min(n.x,r.width-(p?p.width:0)-10)},children:[n.action&&w.jsx("div",{className:"film-strip-hover-title",children:Zu(n.action,n)}),d&&p&&w.jsx("div",{style:{width:p.width,height:p.height},children:w.jsx("img",{src:`sha1/${d.sha1}`,width:p.width,height:p.height})})]})]})},vk=({boundaries:t,page:e,width:n})=>{const r={width:0,height:0},o=e.screencastFrames;for(const _ of o)r.width=Math.max(r.width,_.width),r.height=Math.max(r.height,_.height);const l=vv(r,gv),c=o[0].timestamp,u=o[o.length-1].timestamp,d=t.maximum-t.minimum,p=(c-t.minimum)/d*n,g=(t.maximum-u)/d*n,v=(u-c)/d*n/(l.width+2*ms)|0,S=(u-c)/v,k=[];for(let _=0;c&&S&&_<v;++_){const E=c+S*_,C=jm(o,E,yv)-1;k.push(w.jsx("div",{className:"film-strip-frame",style:{width:l.width,height:l.height,backgroundImage:`url(sha1/${o[C].sha1})`,backgroundSize:`${l.width}px ${l.height}px`,margin:ms,marginRight:ms}},_))}return k.push(w.jsx("div",{className:"film-strip-frame",style:{width:l.width,height:l.height,backgroundImage:`url(sha1/${o[o.length-1].sha1})`,backgroundSize:`${l.width}px ${l.height}px`,margin:ms,marginRight:ms}},k.length)),w.jsx("div",{className:"film-strip-lane",style:{marginLeft:p+"px",marginRight:g+"px"},children:k})};function yv(t,e){return t-e.timestamp}function vv(t,e){const n=Math.max(t.width/e.width,t.height/e.height);return{width:t.width/n|0,height:t.height/n|0}}const wk=({model:t,boundaries:e,consoleEntries:n,onSelected:r,highlightedAction:o,highlightedEntry:l,highlightedConsoleEntry:c,selectedTime:u,setSelectedTime:d,sdkLanguage:p})=>{const[g,y]=Ar(),[v,S]=$.useState(),[k,_]=$.useState(),{offsets:E,curtainLeft:C,curtainRight:A}=$.useMemo(()=>{let G=u||e;if(v&&v.startX!==v.endX){const ce=un(g.width,e,v.startX),Ae=un(g.width,e,v.endX);G={minimum:Math.min(ce,Ae),maximum:Math.max(ce,Ae)}}const K=Bt(g.width,e,G.minimum),X=Bt(g.width,e,e.maximum)-Bt(g.width,e,G.maximum);return{offsets:Sk(g.width,e),curtainLeft:K,curtainRight:X}},[u,e,v,g]),B=$.useMemo(()=>{const G=[];for(const K of(t==null?void 0:t.actions)||[])K.class!=="Test"&&G.push({action:K,leftTime:K.startTime,rightTime:K.endTime||e.maximum,leftPosition:Bt(g.width,e,K.startTime),rightPosition:Bt(g.width,e,K.endTime||e.maximum),active:!1,error:!!K.error});for(const K of(t==null?void 0:t.resources)||[]){const O=K._monotonicTime,X=K._monotonicTime+K.time;G.push({resource:K,leftTime:O,rightTime:X,leftPosition:Bt(g.width,e,O),rightPosition:Bt(g.width,e,X),active:!1,error:!1})}for(const K of n||[])G.push({consoleMessage:K,leftTime:K.timestamp,rightTime:K.timestamp,leftPosition:Bt(g.width,e,K.timestamp),rightPosition:Bt(g.width,e,K.timestamp),active:!1,error:K.isError});return G},[t,n,e,g]);$.useMemo(()=>{for(const G of B)o?G.active=G.action===o:l?G.active=G.resource===l:c?G.active=G.consoleMessage===c:G.active=!1},[B,o,l,c]);const R=$.useCallback(G=>{if(_(void 0),!y.current)return;const K=G.clientX-y.current.getBoundingClientRect().left,O=un(g.width,e,K),X=u?Bt(g.width,e,u.minimum):0,ce=u?Bt(g.width,e,u.maximum):0;u&&Math.abs(K-X)<10?S({startX:ce,endX:K,type:"resize"}):u&&Math.abs(K-ce)<10?S({startX:X,endX:K,type:"resize"}):u&&O>u.minimum&&O<u.maximum&&G.clientY-y.current.getBoundingClientRect().top<20?S({startX:X,endX:ce,pivot:K,type:"move"}):S({startX:K,endX:K,type:"resize"})},[e,g,y,u]),D=$.useCallback(G=>{if(!y.current)return;const K=G.clientX-y.current.getBoundingClientRect().left,O=un(g.width,e,K),X=t==null?void 0:t.actions.findLast(ge=>ge.startTime<=O);if(!G.buttons){S(void 0);return}if(X&&r(X),!v)return;let ce=v;if(v.type==="resize")ce={...v,endX:K};else{const ge=K-v.pivot;let J=v.startX+ge,se=v.endX+ge;J<0&&(J=0,se=J+(v.endX-v.startX)),se>g.width&&(se=g.width,J=se-(v.endX-v.startX)),ce={...v,startX:J,endX:se,pivot:K}}S(ce);const Ae=un(g.width,e,ce.startX),be=un(g.width,e,ce.endX);Ae!==be&&d({minimum:Math.min(Ae,be),maximum:Math.max(Ae,be)})},[e,v,g,t,r,y,d]),z=$.useCallback(()=>{if(_(void 0),!!v){if(v.startX!==v.endX){const G=un(g.width,e,v.startX),K=un(g.width,e,v.endX);d({minimum:Math.min(G,K),maximum:Math.max(G,K)})}else{const G=un(g.width,e,v.startX),K=t==null?void 0:t.actions.findLast(O=>O.startTime<=G);K&&r(K),d(void 0)}S(void 0)}},[e,v,g,t,d,r]),H=$.useCallback(G=>{if(!y.current)return;const K=G.clientX-y.current.getBoundingClientRect().left,O=un(g.width,e,K),X=t==null?void 0:t.actions.findLast(ce=>ce.startTime<=O);_({x:K,clientY:G.clientY,action:X,sdkLanguage:p})},[e,g,t,y,p]),F=$.useCallback(()=>{_(void 0)},[]),M=$.useCallback(()=>{d(void 0)},[d]);return w.jsxs("div",{style:{flex:"none",borderBottom:"1px solid var(--vscode-panel-border)"},children:[!!v&&w.jsx(ug,{cursor:(v==null?void 0:v.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:z,onPaneMouseMove:D,onPaneDoubleClick:M}),w.jsxs("div",{ref:y,className:"timeline-view",onMouseDown:R,onMouseMove:H,onMouseLeave:F,children:[w.jsx("div",{className:"timeline-grid",children:E.map((G,K)=>w.jsx("div",{className:"timeline-divider",style:{left:G.position+"px"},children:w.jsx("div",{className:"timeline-time",children:pt(G.time-e.minimum)})},K))}),w.jsx("div",{style:{height:8}}),w.jsx(yk,{model:t,boundaries:e,previewPoint:k}),w.jsx("div",{className:"timeline-bars",children:B.map((G,K)=>w.jsx("div",{className:Be("timeline-bar",G.action&&"action",G.resource&&"network",G.consoleMessage&&"console-message",G.active&&"active",G.error&&"error"),style:{left:G.leftPosition,width:Math.max(5,G.rightPosition-G.leftPosition),top:xk(G),bottom:0}},K))}),w.jsx("div",{className:"timeline-marker",style:{display:k!==void 0?"block":"none",left:((k==null?void 0:k.x)||0)+"px"}}),u&&w.jsxs("div",{className:"timeline-window",children:[w.jsx("div",{className:"timeline-window-curtain left",style:{width:C}}),w.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),w.jsx("div",{className:"timeline-window-center",children:w.jsx("div",{className:"timeline-window-drag"})}),w.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),w.jsx("div",{className:"timeline-window-curtain right",style:{width:A}})]})]})]})};function Sk(t,e){let r=t/64;const o=e.maximum-e.minimum,l=t/o;let c=o/r;const u=Math.ceil(Math.log(c)/Math.LN10);c=Math.pow(10,u),c*l>=5*64&&(c=c/5),c*l>=2*64&&(c=c/2);const d=e.minimum;let p=e.maximum;p+=64/l,r=Math.ceil((p-d)/c),c||(r=0);const g=[];for(let y=0;y<r;++y){const v=d+c*y;g.push({position:Bt(t,e,v),time:v})}return g}function Bt(t,e,n){return(n-e.minimum)/(e.maximum-e.minimum)*t}function un(t,e,n){return n/t*(e.maximum-e.minimum)+e.minimum}function xk(t){return t.resource?25:20}const _k=({model:t})=>{var n,r;if(!t)return w.jsx(w.Fragment,{});const e=t.wallTime!==void 0?new Date(t.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return w.jsxs("div",{className:"vbox",style:{flexShrink:0},children:[w.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&w.jsxs("div",{className:"call-line",children:["start time:",w.jsx("span",{className:"call-value datetime",title:e,children:e})]}),w.jsxs("div",{className:"call-line",children:["duration:",w.jsx("span",{className:"call-value number",title:pt(t.endTime-t.startTime),children:pt(t.endTime-t.startTime)})]}),w.jsx("div",{className:"call-section",children:"Browser"}),w.jsxs("div",{className:"call-line",children:["engine:",w.jsx("span",{className:"call-value string",title:t.browserName,children:t.browserName})]}),t.channel&&w.jsxs("div",{className:"call-line",children:["channel:",w.jsx("span",{className:"call-value string",title:t.channel,children:t.channel})]}),t.platform&&w.jsxs("div",{className:"call-line",children:["platform:",w.jsx("span",{className:"call-value string",title:t.platform,children:t.platform})]}),t.options.userAgent&&w.jsxs("div",{className:"call-line",children:["user agent:",w.jsx("span",{className:"call-value datetime",title:t.options.userAgent,children:t.options.userAgent})]}),t.options.baseURL&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),w.jsxs("div",{className:"call-line",children:["baseURL:",w.jsx("a",{className:"call-value string",href:t.options.baseURL,title:t.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:t.options.baseURL})]})]}),w.jsx("div",{className:"call-section",children:"Viewport"}),t.options.viewport&&w.jsxs("div",{className:"call-line",children:["width:",w.jsx("span",{className:"call-value number",title:String(!!((n=t.options.viewport)!=null&&n.width)),children:t.options.viewport.width})]}),t.options.viewport&&w.jsxs("div",{className:"call-line",children:["height:",w.jsx("span",{className:"call-value number",title:String(!!((r=t.options.viewport)!=null&&r.height)),children:t.options.viewport.height})]}),w.jsxs("div",{className:"call-line",children:["is mobile:",w.jsx("span",{className:"call-value boolean",title:String(!!t.options.isMobile),children:String(!!t.options.isMobile)})]}),t.options.deviceScaleFactor&&w.jsxs("div",{className:"call-line",children:["device scale:",w.jsx("span",{className:"call-value number",title:String(t.options.deviceScaleFactor),children:String(t.options.deviceScaleFactor)})]}),w.jsx("div",{className:"call-section",children:"Counts"}),w.jsxs("div",{className:"call-line",children:["pages:",w.jsx("span",{className:"call-value number",children:t.pages.length})]}),w.jsxs("div",{className:"call-line",children:["actions:",w.jsx("span",{className:"call-value number",children:t.actions.length})]}),w.jsxs("div",{className:"call-line",children:["events:",w.jsx("span",{className:"call-value number",children:t.events.length})]})]})},Ek=({annotations:t})=>t.length?w.jsx("div",{className:"annotations-tab",children:t.map((e,n)=>w.jsxs("div",{className:"annotation-item",children:[w.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&w.jsxs("span",{children:[": ",dg(e.description)]})]},`annotation-${n}`))}):w.jsx(Ir,{text:"No annotations"}),kk=({sdkLanguage:t,setIsInspecting:e,highlightedElement:n,setHighlightedElement:r})=>{const[o,l]=$.useState(),c=$.useCallback(u=>{const{errors:d}=nf(dv,u,{prettyErrors:!1}),p=d.map(g=>({message:g.message,line:g.range[1].line,column:g.range[1].col,type:"subtle-error"}));l(p),r({...n,ariaSnapshot:u,lastEdited:"ariaSnapshot"}),e(!1)},[n,r,e]);return w.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[w.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[w.jsx("div",{style:{flex:"auto"},children:"Locator"}),w.jsx(qt,{icon:"files",title:"Copy locator",onClick:()=>{Cp(n.locator||"")}})]}),w.jsx("div",{style:{height:50},children:w.jsx(Cs,{text:n.locator||"",language:t,isFocused:!0,wrapLines:!0,onChange:u=>{r({...n,locator:u,lastEdited:"locator"}),e(!1)}})}),w.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[w.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),w.jsx(qt,{icon:"files",title:"Copy snapshot",onClick:()=>{Cp(n.ariaSnapshot||"")}})]}),w.jsx("div",{style:{height:150},children:w.jsx(Cs,{text:n.ariaSnapshot||"",language:"yaml",wrapLines:!1,highlight:o,onChange:c})})]})},Mk=({model:t,showSourcesFirst:e,rootDir:n,fallbackLocation:r,isLive:o,hideTimeline:l,status:c,annotations:u,inert:d,onOpenExternally:p,revealSource:g,testRunMetadata:y})=>{var Mn;const[v,S]=$.useState(void 0),[k,_]=$.useState(void 0),[E,C]=$.useState(void 0),[A,B]=$.useState(),[R,D]=$.useState(),[z,H]=$.useState(),[F,M]=$.useState("actions"),[G,K]=Ts("propertiesTab",e?"source":"call"),[O,X]=$.useState(!1),[ce,Ae]=$.useState({lastEdited:"none"}),[be,ge]=$.useState(),[J,se]=Ts("propertiesSidebarLocation","bottom"),Z=$.useCallback(le=>{S(le==null?void 0:le.callId),_(void 0)},[]),I=$.useMemo(()=>t==null?void 0:t.actions.find(le=>le.callId===A),[t,A]),U=$.useCallback(le=>{B(le==null?void 0:le.callId)},[]),de=$.useMemo(()=>(t==null?void 0:t.sources)||new Map,[t]);$.useEffect(()=>{ge(void 0),_(void 0)},[t]);const fe=$.useMemo(()=>{if(v){const rn=t==null?void 0:t.actions.find(jt=>jt.callId===v);if(rn)return rn}const le=t==null?void 0:t.failedAction();if(le)return le;if(t!=null&&t.actions.length){let rn=t.actions.length-1;for(let jt=0;jt<t.actions.length;++jt)if(t.actions[jt].title==="After Hooks"&&jt){rn=jt-1;break}return t.actions[rn]}},[t,v]),pe=$.useMemo(()=>I||fe,[fe,I]),ye=$.useMemo(()=>k?k.stack:pe==null?void 0:pe.stack,[pe,k]),Se=$.useCallback(le=>{Z(le),U(void 0)},[Z,U]),he=$.useCallback(le=>{K(le),le!=="inspector"&&X(!1)},[K]),_e=$.useCallback(le=>{!O&&le&&he("inspector"),X(le)},[X,he,O]),ct=$.useCallback(le=>{Ae(le),he("inspector")},[he]),jr=$.useCallback(le=>{he("attachments"),C(rn=>{if(!rn)return[le,0];const jt=rn[1];return[le,jt+1]})},[he]);$.useEffect(()=>{g&&he("source")},[g,he]);const Pr=fS(t,be),sr=$S(t,be),Or=oS(t),hn=(t==null?void 0:t.sdkLanguage)||"javascript",eo={id:"inspector",title:"Locator",render:()=>w.jsx(kk,{sdkLanguage:hn,setIsInspecting:_e,highlightedElement:ce,setHighlightedElement:Ae})},Bs={id:"call",title:"Call",render:()=>w.jsx(T1,{action:pe,startTimeOffset:(t==null?void 0:t.startTime)??0,sdkLanguage:hn})},to={id:"log",title:"Log",render:()=>w.jsx(A1,{action:pe,isLive:o})},zs={id:"errors",title:"Errors",errorCount:Or.errors.size,render:()=>w.jsx(aS,{errorsModel:Or,model:t,testRunMetadata:y,sdkLanguage:hn,revealInSource:le=>{le.action?Z(le.action):_(le),he("source")},wallTime:(t==null?void 0:t.wallTime)??0})};let An;!fe&&r&&(An=(Mn=r.source)==null?void 0:Mn.errors.length);const nn={id:"source",title:"Source",errorCount:An,render:()=>w.jsx(rS,{stack:ye,sources:de,rootDir:n,stackFrameLocation:J==="bottom"?"right":"bottom",fallbackLocation:r,onOpenExternally:p})},Hs={id:"console",title:"Console",count:Pr.entries.length,render:()=>w.jsx(dS,{consoleModel:Pr,boundaries:$r,selectedTime:be,onAccepted:le=>ge({minimum:le.timestamp,maximum:le.timestamp}),onEntryHovered:H})},no={id:"network",title:"Network",count:sr.resources.length,render:()=>w.jsx(RS,{boundaries:$r,networkModel:sr,onEntryHovered:D,sdkLanguage:(t==null?void 0:t.sdkLanguage)??"javascript"})},ro={id:"attachments",title:"Attachments",count:t==null?void 0:t.visibleAttachments.length,render:()=>w.jsx(G1,{model:t,revealedAttachment:E})},In=[eo,Bs,to,zs,Hs,no,nn,ro];if(u!==void 0){const le={id:"annotations",title:"Annotations",count:u.length,render:()=>w.jsx(Ek,{annotations:u})};In.push(le)}if(e){const le=In.indexOf(nn);In.splice(le,1),In.splice(1,0,nn)}const{boundaries:$r}=$.useMemo(()=>{const le={minimum:(t==null?void 0:t.startTime)||0,maximum:(t==null?void 0:t.endTime)||3e4};return le.minimum>le.maximum&&(le.minimum=0,le.maximum=3e4),le.maximum+=(le.maximum-le.minimum)/20,{boundaries:le}},[t]);let Ln=0;!o&&t&&t.endTime>=0?Ln=t.endTime-t.startTime:t&&t.wallTime&&(Ln=Date.now()-t.wallTime);const Rr={id:"actions",title:"Actions",component:w.jsxs("div",{className:"vbox",children:[c&&w.jsxs("div",{className:"workbench-run-status",children:[w.jsx("span",{className:Be("codicon",cg(c))}),w.jsx("div",{children:w1(c)}),w.jsx("div",{className:"spacer"}),w.jsx("div",{className:"workbench-run-duration",children:Ln?pt(Ln):""})]}),w.jsx(k1,{sdkLanguage:hn,actions:(t==null?void 0:t.actions)||[],selectedAction:t?fe:void 0,selectedTime:be,setSelectedTime:ge,onSelected:Se,onHighlighted:U,revealAttachment:jr,revealConsole:()=>he("console"),isLive:o})]})},so={id:"metadata",title:"Metadata",component:w.jsx(_k,{model:t})};return w.jsxs("div",{className:"vbox workbench",...d?{inert:"true"}:{},children:[!l&&w.jsx(wk,{model:t,consoleEntries:Pr.entries,boundaries:$r,highlightedAction:I,highlightedEntry:R,highlightedConsoleEntry:z,onSelected:Se,sdkLanguage:hn,selectedTime:be,setSelectedTime:ge}),w.jsx(Dl,{sidebarSize:250,orientation:J==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:w.jsx(Dl,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:w.jsx(ak,{action:pe,model:t,sdkLanguage:hn,testIdAttributeName:(t==null?void 0:t.testIdAttributeName)||"data-testid",isInspecting:O,setIsInspecting:_e,highlightedElement:ce,setHighlightedElement:ct}),sidebar:w.jsx(Ou,{tabs:[Rr,so],selectedTab:F,setSelectedTab:M})}),sidebar:w.jsx(Ou,{tabs:In,selectedTab:G,setSelectedTab:he,rightToolbar:[J==="bottom"?w.jsx(qt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{se("right")}}):w.jsx(qt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{se("bottom")}})],mode:J==="bottom"?"default":"select"})})]})};var Mm;(t=>{function e(n){for(const r of n.splice(0))r.dispose()}t.disposeAll=e})(Mm||(Mm={}));class Mi{constructor(){this._listeners=new Set,this.event=(e,n)=>{this._listeners.add(e);let r=!1;const o=this,l={dispose(){r||(r=!0,o._listeners.delete(e))}};return n&&n.push(l),l}}fire(e){const n=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const r of this._listeners)this._deliveryQueue.push({listener:r,event:e});if(n){for(let r=0;r<this._deliveryQueue.length;r++){const{listener:o,event:l}=this._deliveryQueue[r];o.call(null,l)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class jk{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",n=>e(n.data.toString()))}onopen(e){this._ws.addEventListener("open",e)}onerror(e){this._ws.addEventListener("error",e)}onclose(e){this._ws.addEventListener("close",e)}send(e){this._ws.send(e)}close(){this._ws.close()}}class Pk{constructor(e){this._onCloseEmitter=new Mi,this._onReportEmitter=new Mi,this._onStdioEmitter=new Mi,this._onTestFilesChangedEmitter=new Mi,this._onLoadTraceRequestedEmitter=new Mi,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this._transport=e,this._transport.onmessage(r=>{const o=JSON.parse(r),{id:l,result:c,error:u,method:d,params:p}=o;if(l){const g=this._callbacks.get(l);if(!g)return;this._callbacks.delete(l),u?g.reject(new Error(u)):g.resolve(c)}else this._dispatchEvent(d,p)});const n=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((r,o)=>{this._transport.onopen(r),this._transport.onerror(o)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(n)})}isClosed(){return this._isClosed}async _sendMessage(e,n){const r=globalThis.__logForTest;r==null||r({method:e,params:n}),await this._connectedPromise;const o=++this._lastId,l={id:o,method:e,params:n};return this._transport.send(JSON.stringify(l)),new Promise((c,u)=>{this._callbacks.set(o,{resolve:c,reject:u})})}_sendMessageNoReply(e,n){this._sendMessage(e,n).catch(()=>{})}_dispatchEvent(e,n){e==="report"?this._onReportEmitter.fire(n):e==="stdio"?this._onStdioEmitter.fire(n):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(n):e==="loadTraceRequested"&&this._onLoadTraceRequestedEmitter.fire(n)}async initialize(e){await this._sendMessage("initialize",e)}async ping(e){await this._sendMessage("ping",e)}async pingNoReply(e){this._sendMessageNoReply("ping",e)}async watch(e){await this._sendMessage("watch",e)}watchNoReply(e){this._sendMessageNoReply("watch",e)}async open(e){await this._sendMessage("open",e)}openNoReply(e){this._sendMessageNoReply("open",e)}async resizeTerminal(e){await this._sendMessage("resizeTerminal",e)}resizeTerminalNoReply(e){this._sendMessageNoReply("resizeTerminal",e)}async checkBrowsers(e){return await this._sendMessage("checkBrowsers",e)}async installBrowsers(e){await this._sendMessage("installBrowsers",e)}async runGlobalSetup(e){return await this._sendMessage("runGlobalSetup",e)}async runGlobalTeardown(e){return await this._sendMessage("runGlobalTeardown",e)}async startDevServer(e){return await this._sendMessage("startDevServer",e)}async stopDevServer(e){return await this._sendMessage("stopDevServer",e)}async clearCache(e){return await this._sendMessage("clearCache",e)}async listFiles(e){return await this._sendMessage("listFiles",e)}async listTests(e){return await this._sendMessage("listTests",e)}async runTests(e){return await this._sendMessage("runTests",e)}async findRelatedTestFiles(e){return await this._sendMessage("findRelatedTestFiles",e)}async stopTests(e){await this._sendMessage("stopTests",e)}stopTestsNoReply(e){this._sendMessageNoReply("stopTests",e)}async closeGracefully(e){await this._sendMessage("closeGracefully",e)}close(){try{this._transport.close()}catch{}}}const bk=({settings:t})=>w.jsx("div",{className:"vbox settings-view",children:t.map(({value:e,set:n,name:r,title:o})=>{const l=`setting-${r}`;return w.jsxs("div",{className:"setting",title:o,children:[w.jsx("input",{type:"checkbox",id:l,checked:e,onChange:()=>n(!e)}),w.jsx("label",{htmlFor:l,children:r})]},r)})}),Ok=()=>{const[t,e]=Ts("shouldPopulateCanvasFromScreenshot",!1),[n,r]=k0();return w.jsx(bk,{settings:[{value:n,set:r,name:"Dark mode"},{value:t,set:e,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{Ok as D,V1 as E,Lk as M,Mt as R,Dl as S,qt as T,jk as W,D1 as _,Pk as a,Mk as b,Ck as c,Ik as d,Lu as e,Nk as f,Ak as g,Be as h,y1 as i,w as j,tf as k,Ts as l,pt as m,g0 as n,$ as r,wr as s,cg as t,Ar as u};