@skyramp/mcp 0.4.2 → 0.4.3-rc.2

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 (135) hide show
  1. package/build/execution/wrapperConfig.d.ts +4 -0
  2. package/build/execution/wrapperConfig.js +14 -2
  3. package/build/prompts/code-reuse.d.ts +5 -1
  4. package/build/prompts/code-reuse.js +16 -10
  5. package/build/prompts/modularization/ui-test-modularization.js +9 -2
  6. package/build/prompts/pom-aware-code-reuse.d.ts +4 -1
  7. package/build/prompts/pom-aware-code-reuse.js +38 -6
  8. package/build/prompts/reuse-hand-off.d.ts +4 -0
  9. package/build/prompts/reuse-hand-off.js +10 -5
  10. package/build/prompts/shared-helper-policy.d.ts +5 -0
  11. package/build/prompts/shared-helper-policy.js +5 -0
  12. package/build/prompts/test-maintenance/driftAnalysisShared.js +2 -0
  13. package/build/prompts/test-maintenance/uiDriftAnalysisSections.js +2 -1
  14. package/build/prompts/testbot/testbot-prompts.js +33 -16
  15. package/build/recommendation/answers.d.ts +5 -3
  16. package/build/recommendation/answers.js +5 -2
  17. package/build/recommendation/fakeVerifyContext.d.ts +3 -0
  18. package/build/recommendation/fakeVerifyContext.js +16 -0
  19. package/build/recommendation/runVerifiers.js +2 -0
  20. package/build/recommendation/types.d.ts +12 -0
  21. package/build/recommendation/verifierContracts.d.ts +32 -2
  22. package/build/recommendation/verifierContracts.js +45 -4
  23. package/build/recommendation/verifiers/changedLinesClaimed.d.ts +17 -0
  24. package/build/recommendation/verifiers/changedLinesClaimed.js +88 -0
  25. package/build/recommendation/verifiers/coverage.js +143 -4
  26. package/build/recommendation/verifiers/expectedValueSourced.js +8 -0
  27. package/build/recommendation/verifiers/requirementSourced.js +141 -11
  28. package/build/services/TestGenerationService.js +4 -0
  29. package/build/tools/code-refactor/caller-gate.d.ts +105 -0
  30. package/build/tools/code-refactor/caller-gate.js +174 -0
  31. package/build/tools/code-refactor/changed-helper-report.d.ts +62 -0
  32. package/build/tools/code-refactor/changed-helper-report.js +114 -0
  33. package/build/tools/code-refactor/codeReuseTool.js +131 -62
  34. package/build/tools/code-refactor/enhanceAssertionsTool.js +2 -2
  35. package/build/tools/code-refactor/helper-callers.d.ts +65 -0
  36. package/build/tools/code-refactor/helper-callers.js +85 -0
  37. package/build/tools/code-refactor/modularizationTool.js +10 -0
  38. package/build/tools/code-refactor/pom-pass-state.d.ts +51 -0
  39. package/build/tools/code-refactor/pom-pass-state.js +115 -0
  40. package/build/tools/code-refactor/removed-modules.d.ts +33 -0
  41. package/build/tools/code-refactor/removed-modules.js +61 -0
  42. package/build/tools/code-refactor/retrofit-state.d.ts +3 -2
  43. package/build/tools/code-refactor/retrofit-state.js +11 -12
  44. package/build/tools/code-refactor/reuse-outcome.d.ts +33 -1
  45. package/build/tools/code-refactor/reuse-record-store.d.ts +57 -0
  46. package/build/tools/code-refactor/reuse-record-store.js +140 -0
  47. package/build/tools/code-refactor/reuse-state.d.ts +34 -9
  48. package/build/tools/code-refactor/reuse-state.js +140 -135
  49. package/build/tools/code-refactor/utils-verify-gates.js +42 -18
  50. package/build/tools/code-refactor/verify-gates.d.ts +4 -0
  51. package/build/tools/code-refactor/verify-gates.js +8 -1
  52. package/build/tools/generate-tests/generateContractRestTool.js +7 -7
  53. package/build/tools/generate-tests/generateIntegrationRestTool.js +8 -8
  54. package/build/tools/generate-tests/generateUIRestTool.js +3 -3
  55. package/build/tools/submitReportTool.js +121 -30
  56. package/build/tools/test-management/actionsTool.js +7 -0
  57. package/build/tools/test-management/registerTestPlanTool.d.ts +1 -0
  58. package/build/tools/test-management/registerTestPlanTool.js +71 -23
  59. package/build/types/RepositoryAnalysis.d.ts +20 -20
  60. package/build/types/ReuseOutcome.d.ts +123 -0
  61. package/build/types/TestExecution.d.ts +11 -0
  62. package/build/types/TestExecution.js +19 -0
  63. package/build/types/index.d.ts +1 -1
  64. package/build/utils/branchDiff.d.ts +1 -1
  65. package/build/utils/branchDiff.js +1 -1
  66. package/build/utils/changedRuns.d.ts +13 -0
  67. package/build/utils/changedRuns.js +56 -0
  68. package/build/utils/featureFlags.d.ts +8 -10
  69. package/build/utils/featureFlags.js +23 -21
  70. package/build/utils/normalizeSkyrampImports.d.ts +4 -1
  71. package/build/utils/normalizeSkyrampImports.js +24 -17
  72. package/build/utils/pom-scope/ownership.d.ts +19 -0
  73. package/build/utils/pom-scope/ownership.js +31 -0
  74. package/build/utils/pom-scope/pom-files.d.ts +8 -0
  75. package/build/utils/pom-scope/pom-files.js +8 -0
  76. package/build/utils/pom-scope/scoring.js +13 -1
  77. package/build/utils/pom-scope/strip.d.ts +10 -0
  78. package/build/utils/pom-scope/strip.js +9 -0
  79. package/build/utils/pom-verify/verify.js +13 -2
  80. package/build/utils/reuseRouting.d.ts +30 -2
  81. package/build/utils/reuseRouting.js +36 -15
  82. package/build/utils/testDependencyPolicy.js +4 -16
  83. package/build/utils/utils-verify/action-sites.d.ts +2 -2
  84. package/build/utils/utils-verify/allow.d.ts +1 -1
  85. package/build/utils/utils-verify/allow.js +15 -0
  86. package/build/utils/utils-verify/body-reach.d.ts +2 -2
  87. package/build/utils/utils-verify/body-reach.js +4 -1
  88. package/build/utils/utils-verify/call-sites.d.ts +16 -6
  89. package/build/utils/utils-verify/call-sites.js +12 -6
  90. package/build/utils/utils-verify/changed-helpers.d.ts +38 -0
  91. package/build/utils/utils-verify/changed-helpers.js +91 -0
  92. package/build/utils/utils-verify/changed-lines.d.ts +48 -0
  93. package/build/utils/utils-verify/changed-lines.js +106 -0
  94. package/build/utils/utils-verify/head.d.ts +73 -0
  95. package/build/utils/utils-verify/head.js +156 -0
  96. package/build/utils/utils-verify/importers.d.ts +59 -10
  97. package/build/utils/utils-verify/importers.js +121 -31
  98. package/build/utils/utils-verify/in-house.js +26 -31
  99. package/build/utils/utils-verify/index.d.ts +3 -0
  100. package/build/utils/utils-verify/index.js +3 -0
  101. package/build/utils/utils-verify/language-spec.js +10 -2
  102. package/build/utils/utils-verify/locate.d.ts +3 -0
  103. package/build/utils/utils-verify/locate.js +6 -6
  104. package/build/utils/utils-verify/parse.d.ts +13 -1
  105. package/build/utils/utils-verify/parse.js +122 -49
  106. package/build/utils/utils-verify/retrofit-equivalence.d.ts +0 -5
  107. package/build/utils/utils-verify/retrofit-equivalence.js +2 -34
  108. package/build/utils/utils-verify/stage.js +4 -16
  109. package/build/utils/utils-verify/typecheck.d.ts +25 -4
  110. package/build/utils/utils-verify/typecheck.js +95 -13
  111. package/build/utils/utils-verify/verify.d.ts +33 -8
  112. package/build/utils/utils-verify/verify.js +180 -18
  113. package/build/utils/versions.d.ts +3 -3
  114. package/build/utils/versions.js +1 -1
  115. package/node_modules/playwright/lib/dom-analyzer/blueprint.js +1 -0
  116. package/node_modules/playwright/lib/dom-analyzer/dynamicId.js +1 -0
  117. package/node_modules/playwright/lib/dom-analyzer/dynamicId.test.js +6 -0
  118. package/node_modules/playwright/lib/mcp/skyramp/exportTool.js +4 -2
  119. package/node_modules/playwright/lib/mcp/skyramp/snapshotLocators.js +246 -0
  120. package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +378 -237
  121. package/node_modules/playwright/lib/mcp/test/skyRampExport.js +21 -0
  122. package/node_modules/playwright/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +1 -1
  123. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/{codeMirrorModule-LNgEKtdV.js → codeMirrorModule-Bou8kKzE.js} +1 -1
  124. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/{defaultSettingsView-Bwr1eMKC.js → defaultSettingsView-DTp2-8Si.js} +3 -3
  125. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +2 -2
  126. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.BAkLd5DX.js → index.uiPTFncY.js} +1 -1
  127. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{uiMode.BPopbasy.js → uiMode.GLqsx5cI.js} +1 -1
  128. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +2 -2
  129. package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
  130. package/node_modules/playwright/node_modules/playwright-core/src/generated/pollingRecorderSource.ts +1 -1
  131. package/node_modules/playwright/package.json +1 -1
  132. package/package.json +3 -3
  133. package/plugin/prompts/code-reuse/hand-off.md +13 -1
  134. package/plugin/prompts/plan-tests.md +2 -2
  135. package/plugin/skills/enhance-assertions/reference/shared-rules.md +1 -0
@@ -1,4 +1,4 @@
1
- import{v as Ju}from"./defaultSettingsView-Bwr1eMKC.js";var vi={exports:{}},Zu=vi.exports,pa;function mt(){return pa||(pa=1,(function(ct,xt){(function(b,pe){ct.exports=pe()})(Zu,(function(){var b=navigator.userAgent,pe=navigator.platform,_=/gecko\/\d/i.test(b),te=/MSIE \d/.test(b),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(b),Q=/Edge\/(\d+)/.exec(b),k=te||oe||Q,I=k&&(te?document.documentMode||6:+(Q||oe)[1]),Y=!Q&&/WebKit\//.test(b),ne=Y&&/Qt\/\d+\.\d+/.test(b),S=!Q&&/Chrome\/(\d+)/.exec(b),R=S&&+S[1],A=/Opera\//.test(b),$=/Apple Computer/.test(navigator.vendor),ue=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(b),O=/PhantomJS/.test(b),w=$&&(/Mobile\/\w+/.test(b)||navigator.maxTouchPoints>2),M=/Android/.test(b),N=w||M||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(b),z=w||/Mac/.test(pe),X=/\bCrOS\b/.test(b),q=/win/i.test(pe),p=A&&b.match(/Version\/(\d*\.\d*)/);p&&(p=Number(p[1])),p&&p>=15&&(A=!1,Y=!0);var W=z&&(ne||A&&(p==null||p<12.11)),J=_||k&&I>=9;function P(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var V=function(e,t){var n=e.className,r=P(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function F(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function G(e,t){return F(e).appendChild(t)}function c(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function T(e,t,n,r){var i=c(e,t,n,r);return i.setAttribute("role","presentation"),i}var C;document.createRange?C=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:C=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function g(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function y(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function j(e,t){var n=e.className;P(t).test(n)||(e.className+=(n?" ":"")+t)}function de(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!P(n[r]).test(t)&&(t+=" "+n[r]);return t}var v=function(e){e.select()};w?v=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:k&&(v=function(e){try{e.select()}catch{}});function d(e){return e.display.wrapper.ownerDocument}function fe(e){return Te(e.display.wrapper)}function Te(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function le(e){return d(e).defaultView}function xe(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Me(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Fe(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=i||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var Ce=function(){this.id=null,this.f=null,this.time=0,this.handler=xe(this.onTimeout,this)};Ce.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ce.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function ve(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Oe=50,qe={toString:function(){return"CodeMirror.Pass"}},$e={scroll:!1},dt={origin:"*mouse"},Pe={origin:"+move"};function _e(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(we(Ue)+" ");return Ue[e]}function we(e){return e[e.length-1]}function Ie(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function E(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function ee(){}function K(e,t){var n;return Object.create?n=Object.create(e):(ee.prototype=e,n=new ee),t&&Me(t,n),n}var ze=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function me(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||ze.test(e))}function De(e,t){return t?t.source.indexOf("\\w")>-1&&me(e)?!0:t.test(e):me(e)}function be(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ne(e){return e.charCodeAt(0)>=768&&Be.test(e)}function Mt(e,t,n){for(;(n<0?t>0:t<e.length)&&Ne(e.charAt(t));)t+=n;return t}function Pt(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function or(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<n&&l.to>t||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var br=null;function lr(e,t,n){var r;br=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:br=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:br=i)}return r??br}var mi=(function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,h,x){this.level=u,this.from=h,this.to=x}return function(u,h){var x=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!r.test(u))return!1;for(var D=u.length,L=[],H=0;H<D;++H)L.push(n(u.charCodeAt(H)));for(var Z=0,ie=x;Z<D;++Z){var ae=L[Z];ae=="m"?L[Z]=ie:ie=ae}for(var he=0,se=x;he<D;++he){var ge=L[he];ge=="1"&&se=="r"?L[he]="n":o.test(ge)&&(se=ge,ge=="r"&&(L[he]="R"))}for(var Le=1,ke=L[0];Le<D-1;++Le){var Ee=L[Le];Ee=="+"&&ke=="1"&&L[Le+1]=="1"?L[Le]="1":Ee==","&&ke==L[Le+1]&&(ke=="1"||ke=="n")&&(L[Le]=ke),ke=Ee}for(var Ke=0;Ke<D;++Ke){var st=L[Ke];if(st==",")L[Ke]="N";else if(st=="%"){var Xe=void 0;for(Xe=Ke+1;Xe<D&&L[Xe]=="%";++Xe);for(var Nt=Ke&&L[Ke-1]=="!"||Xe<D&&L[Xe]=="1"?"1":"N",Tt=Ke;Tt<Xe;++Tt)L[Tt]=Nt;Ke=Xe-1}}for(var tt=0,Ct=x;tt<D;++tt){var ft=L[tt];Ct=="L"&&ft=="1"?L[tt]="L":o.test(ft)&&(Ct=ft)}for(var nt=0;nt<D;++nt)if(i.test(L[nt])){var rt=void 0;for(rt=nt+1;rt<D&&i.test(L[rt]);++rt);for(var Ze=(nt?L[nt-1]:x)=="L",Dt=(rt<D?L[rt]:x)=="L",nn=Ze==Dt?Ze?"L":"R":x,yr=nt;yr<rt;++yr)L[yr]=nn;nt=rt-1}for(var vt=[],Jt,ut=0;ut<D;)if(l.test(L[ut])){var co=ut;for(++ut;ut<D&&l.test(L[ut]);++ut);vt.push(new s(0,co,ut))}else{var ir=ut,Ar=vt.length,Nr=h=="rtl"?1:0;for(++ut;ut<D&&L[ut]!="L";++ut);for(var bt=ir;bt<ut;)if(a.test(L[bt])){ir<bt&&(vt.splice(Ar,0,new s(1,ir,bt)),Ar+=Nr);var on=bt;for(++bt;bt<ut&&a.test(L[bt]);++bt);vt.splice(Ar,0,new s(2,on,bt)),Ar+=Nr,ir=bt}else++bt;ir<ut&&vt.splice(Ar,0,new s(1,ir,ut))}return h=="ltr"&&(vt[0].level==1&&(Jt=u.match(/^\s+/))&&(vt[0].from=Jt[0].length,vt.unshift(new s(0,0,Jt[0].length))),we(vt).level==1&&(Jt=u.match(/\s+$/))&&(we(vt).to-=Jt[0].length,vt.push(new s(0,D-Jt[0].length,D)))),h=="rtl"?vt.reverse():vt}})();function Re(e,t){var n=e.order;return n==null&&(n=e.order=mi(e.text,t)),n}var Bn=[],Se=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Bn).concat(n)}};function Zt(e,t){return e._handlers&&e._handlers[t]||Bn}function ht(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=ve(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ye(e,t){var n=Zt(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function Qe(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ye(e,n||t.type,e,t),kt(t)||t.codemirrorIgnore}function It(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)ve(n,t[r])==-1&&n.push(t[r])}function Ft(e,t){return Zt(e,t).length>0}function Bt(e){e.prototype.on=function(t,n){Se(this,t,n)},e.prototype.off=function(t,n){ht(this,t,n)}}function pt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Er(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function kt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ar(e){pt(e),Er(e)}function ln(e){return e.target||e.srcElement}function Rt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),z&&e.ctrlKey&&t==1&&(t=3),t}var xi=(function(){if(k&&I<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e})(),Or;function Rn(e){if(Or==null){var t=c("span","​");G(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Or=t.offsetWidth<=1&&t.offsetHeight>2&&!(k&&I<8))}var n=Or?c("span","​"):c("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var an;function sr(e){if(an!=null)return an;var t=G(e,document.createTextNode("AخA")),n=C(t,0,1).getBoundingClientRect(),r=C(t,1,2).getBoundingClientRect();return F(e),!n||n.left==n.right?!1:an=r.right-n.right<3}var zt=`
1
+ import{v as Ju}from"./defaultSettingsView-DTp2-8Si.js";var vi={exports:{}},Zu=vi.exports,pa;function mt(){return pa||(pa=1,(function(ct,xt){(function(b,pe){ct.exports=pe()})(Zu,(function(){var b=navigator.userAgent,pe=navigator.platform,_=/gecko\/\d/i.test(b),te=/MSIE \d/.test(b),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(b),Q=/Edge\/(\d+)/.exec(b),k=te||oe||Q,I=k&&(te?document.documentMode||6:+(Q||oe)[1]),Y=!Q&&/WebKit\//.test(b),ne=Y&&/Qt\/\d+\.\d+/.test(b),S=!Q&&/Chrome\/(\d+)/.exec(b),R=S&&+S[1],A=/Opera\//.test(b),$=/Apple Computer/.test(navigator.vendor),ue=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(b),O=/PhantomJS/.test(b),w=$&&(/Mobile\/\w+/.test(b)||navigator.maxTouchPoints>2),M=/Android/.test(b),N=w||M||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(b),z=w||/Mac/.test(pe),X=/\bCrOS\b/.test(b),q=/win/i.test(pe),p=A&&b.match(/Version\/(\d*\.\d*)/);p&&(p=Number(p[1])),p&&p>=15&&(A=!1,Y=!0);var W=z&&(ne||A&&(p==null||p<12.11)),J=_||k&&I>=9;function P(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var V=function(e,t){var n=e.className,r=P(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function F(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function G(e,t){return F(e).appendChild(t)}function c(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function T(e,t,n,r){var i=c(e,t,n,r);return i.setAttribute("role","presentation"),i}var C;document.createRange?C=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:C=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function g(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function y(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function j(e,t){var n=e.className;P(t).test(n)||(e.className+=(n?" ":"")+t)}function de(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!P(n[r]).test(t)&&(t+=" "+n[r]);return t}var v=function(e){e.select()};w?v=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:k&&(v=function(e){try{e.select()}catch{}});function d(e){return e.display.wrapper.ownerDocument}function fe(e){return Te(e.display.wrapper)}function Te(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function le(e){return d(e).defaultView}function xe(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Me(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Fe(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=i||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var Ce=function(){this.id=null,this.f=null,this.time=0,this.handler=xe(this.onTimeout,this)};Ce.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ce.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function ve(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Oe=50,qe={toString:function(){return"CodeMirror.Pass"}},$e={scroll:!1},dt={origin:"*mouse"},Pe={origin:"+move"};function _e(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(we(Ue)+" ");return Ue[e]}function we(e){return e[e.length-1]}function Ie(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function E(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function ee(){}function K(e,t){var n;return Object.create?n=Object.create(e):(ee.prototype=e,n=new ee),t&&Me(t,n),n}var ze=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function me(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||ze.test(e))}function De(e,t){return t?t.source.indexOf("\\w")>-1&&me(e)?!0:t.test(e):me(e)}function be(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ne(e){return e.charCodeAt(0)>=768&&Be.test(e)}function Mt(e,t,n){for(;(n<0?t>0:t<e.length)&&Ne(e.charAt(t));)t+=n;return t}function Pt(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function or(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<n&&l.to>t||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var br=null;function lr(e,t,n){var r;br=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:br=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:br=i)}return r??br}var mi=(function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,h,x){this.level=u,this.from=h,this.to=x}return function(u,h){var x=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!r.test(u))return!1;for(var D=u.length,L=[],H=0;H<D;++H)L.push(n(u.charCodeAt(H)));for(var Z=0,ie=x;Z<D;++Z){var ae=L[Z];ae=="m"?L[Z]=ie:ie=ae}for(var he=0,se=x;he<D;++he){var ge=L[he];ge=="1"&&se=="r"?L[he]="n":o.test(ge)&&(se=ge,ge=="r"&&(L[he]="R"))}for(var Le=1,ke=L[0];Le<D-1;++Le){var Ee=L[Le];Ee=="+"&&ke=="1"&&L[Le+1]=="1"?L[Le]="1":Ee==","&&ke==L[Le+1]&&(ke=="1"||ke=="n")&&(L[Le]=ke),ke=Ee}for(var Ke=0;Ke<D;++Ke){var st=L[Ke];if(st==",")L[Ke]="N";else if(st=="%"){var Xe=void 0;for(Xe=Ke+1;Xe<D&&L[Xe]=="%";++Xe);for(var Nt=Ke&&L[Ke-1]=="!"||Xe<D&&L[Xe]=="1"?"1":"N",Tt=Ke;Tt<Xe;++Tt)L[Tt]=Nt;Ke=Xe-1}}for(var tt=0,Ct=x;tt<D;++tt){var ft=L[tt];Ct=="L"&&ft=="1"?L[tt]="L":o.test(ft)&&(Ct=ft)}for(var nt=0;nt<D;++nt)if(i.test(L[nt])){var rt=void 0;for(rt=nt+1;rt<D&&i.test(L[rt]);++rt);for(var Ze=(nt?L[nt-1]:x)=="L",Dt=(rt<D?L[rt]:x)=="L",nn=Ze==Dt?Ze?"L":"R":x,yr=nt;yr<rt;++yr)L[yr]=nn;nt=rt-1}for(var vt=[],Jt,ut=0;ut<D;)if(l.test(L[ut])){var co=ut;for(++ut;ut<D&&l.test(L[ut]);++ut);vt.push(new s(0,co,ut))}else{var ir=ut,Ar=vt.length,Nr=h=="rtl"?1:0;for(++ut;ut<D&&L[ut]!="L";++ut);for(var bt=ir;bt<ut;)if(a.test(L[bt])){ir<bt&&(vt.splice(Ar,0,new s(1,ir,bt)),Ar+=Nr);var on=bt;for(++bt;bt<ut&&a.test(L[bt]);++bt);vt.splice(Ar,0,new s(2,on,bt)),Ar+=Nr,ir=bt}else++bt;ir<ut&&vt.splice(Ar,0,new s(1,ir,ut))}return h=="ltr"&&(vt[0].level==1&&(Jt=u.match(/^\s+/))&&(vt[0].from=Jt[0].length,vt.unshift(new s(0,0,Jt[0].length))),we(vt).level==1&&(Jt=u.match(/\s+$/))&&(we(vt).to-=Jt[0].length,vt.push(new s(0,D-Jt[0].length,D)))),h=="rtl"?vt.reverse():vt}})();function Re(e,t){var n=e.order;return n==null&&(n=e.order=mi(e.text,t)),n}var Bn=[],Se=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Bn).concat(n)}};function Zt(e,t){return e._handlers&&e._handlers[t]||Bn}function ht(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=ve(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ye(e,t){var n=Zt(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function Qe(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ye(e,n||t.type,e,t),kt(t)||t.codemirrorIgnore}function It(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)ve(n,t[r])==-1&&n.push(t[r])}function Ft(e,t){return Zt(e,t).length>0}function Bt(e){e.prototype.on=function(t,n){Se(this,t,n)},e.prototype.off=function(t,n){ht(this,t,n)}}function pt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Er(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function kt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ar(e){pt(e),Er(e)}function ln(e){return e.target||e.srcElement}function Rt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),z&&e.ctrlKey&&t==1&&(t=3),t}var xi=(function(){if(k&&I<9)return!1;var e=c("div");return"draggable"in e||"dragDrop"in e})(),Or;function Rn(e){if(Or==null){var t=c("span","​");G(e,c("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Or=t.offsetWidth<=1&&t.offsetHeight>2&&!(k&&I<8))}var n=Or?c("span","​"):c("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var an;function sr(e){if(an!=null)return an;var t=G(e,document.createTextNode("AخA")),n=C(t,0,1).getBoundingClientRect(),r=C(t,1,2).getBoundingClientRect();return F(e),!n||n.left==n.right?!1:an=r.right-n.right<3}var zt=`
2
2
 
3
3
  b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
4
4
  `,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ur=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Wn=(function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")})(),Wt=null;function yi(e){if(Wt!=null)return Wt;var t=G(e,c("span","x")),n=t.getBoundingClientRect(),r=C(t,0,1).getBoundingClientRect();return Wt=Math.abs(n.left-r.left)>1}var Pr={},Ht={};function _t(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pr[e]=t}function kr(e,t){Ht[e]=t}function Ir(e){if(typeof e=="string"&&Ht.hasOwnProperty(e))e=Ht[e];else if(e&&typeof e.name=="string"&&Ht.hasOwnProperty(e.name)){var t=Ht[e.name];typeof t=="string"&&(t={name:t}),e=K(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zr(e,t){t=Ir(t);var n=Pr[t.name];if(!n)return zr(e,"text/plain");var r=n(e,t);if(fr.hasOwnProperty(t.name)){var i=fr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var fr={};function Br(e,t){var n=fr.hasOwnProperty(e)?fr[e]:fr[e]={};Me(t,n)}function Gt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function sn(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Rr(e,t,n){return e.startState?e.startState(t,n):!0}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Je.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},Je.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Fe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Fe(this.string,this.lineStart,this.tabSize):0)},Je.prototype.indentation=function(){return Fe(this.string,null,this.tabSize)-(this.lineStart?Fe(this.string,this.lineStart,this.tabSize):0)},Je.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ye(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function $t(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(o){var l=o.text;i==n.line&&(l=l.slice(0,n.ch)),i==t.line&&(l=l.slice(t.ch)),r.push(l),++i}),r}function un(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Et(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function f(e){if(e.parent==null)return null;for(var t=e.parent,n=ve(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function m(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var l=0;l<e.lines.length;++l){var a=e.lines[l],s=a.height;if(t<s)break;t-=s}return n+l}function U(e,t){return t>=e.first&&t<e.first+e.size}function re(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function B(e,t,n){if(n===void 0&&(n=null),!(this instanceof B))return new B(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ce(e,t){return e.line-t.line||e.ch-t.ch}function We(e,t){return e.sticky==t.sticky&&ce(e,t)==0}function it(e){return B(e.line,e.ch)}function wt(e,t){return ce(e,t)<0?t:e}function Wr(e,t){return ce(e,t)<0?e:t}function go(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ae(e,t){if(t.line<e.first)return B(e.first,0);var n=e.first+e.size-1;return t.line>n?B(n,ye(e,n).text.length):Za(t,ye(e,t.line).text.length)}function Za(e,t){var n=e.ch;return n==null||n>t?B(e.line,t):n<0?B(e.line,0):e}function vo(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Ae(e,t[r]);return n}var Hn=function(e,t){this.state=e,this.lookAhead=t},Xt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Xt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Xt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Xt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Xt.fromSaved=function(e,t,n){return t instanceof Hn?new Xt(e,Gt(e.mode,t.state),n,t.lookAhead):new Xt(e,Gt(e.mode,t),n)},Xt.prototype.save=function(e){var t=e!==!1?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Hn(t,this.maxLookAhead):t};function mo(e,t,n,r){var i=[e.state.modeGen],o={};So(e,t.text,e.doc.mode,n,function(u,h){return i.push(u,h)},o,r);for(var l=n.state,a=function(u){n.baseTokens=i;var h=e.state.overlays[u],x=1,D=0;n.state=!0,So(e,t.text,h.mode,n,function(L,H){for(var Z=x;D<L;){var ie=i[x];ie>L&&i.splice(x,1,L,i[x+1],ie),x+=2,D=Math.min(L,ie)}if(H)if(h.opaque)i.splice(Z,x-Z,L,"overlay "+H),x=Z+2;else for(;Z<x;Z+=2){var ae=i[Z+1];i[Z+1]=(ae?ae+" ":"")+"overlay "+H}},o),n.state=l,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)a(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function xo(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=fn(e,f(t)),i=t.text.length>e.options.maxHighlightLength&&Gt(e.doc.mode,r.state),o=mo(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function fn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Xt(r,!0,t);var o=$a(e,t,n),l=o>r.first&&ye(r,o-1).stateAfter,a=l?Xt.fromSaved(r,l,o):new Xt(r,Rr(r.mode),o);return r.iter(o,t,function(s){bi(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&u<i.viewTo?a.save():null,a.nextLine()}),n&&(r.modeFrontier=a.line),a}function bi(e,t,n,r){var i=e.doc.mode,o=new Je(t,e.options.tabSize,n);for(o.start=o.pos=r||0,t==""&&yo(i,n.state);!o.eol();)ki(i,o,n.state),o.start=o.pos}function yo(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=sn(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function ki(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=sn(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var bo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function ko(e,t,n,r){var i=e.doc,o=i.mode,l;t=Ae(i,t);var a=ye(i,t.line),s=fn(e,t.line,n),u=new Je(a.text,e.options.tabSize,s),h;for(r&&(h=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,l=ki(o,u,s.state),r&&h.push(new bo(u,l,Gt(i.mode,s.state)));return r?h:new bo(u,l,s.state)}function wo(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";t[r]==null?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function So(e,t,n,r,i,o,l){var a=n.flattenSpans;a==null&&(a=e.options.flattenSpans);var s=0,u=null,h=new Je(t,e.options.tabSize,r),x,D=e.options.addModeClass&&[null];for(t==""&&wo(yo(n,r.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(a=!1,l&&bi(e,t,r,h.pos),h.pos=t.length,x=null):x=wo(ki(n,h,r.state,D),o),D){var L=D[0].name;L&&(x="m-"+(x?L+" "+x:L))}if(!a||u!=x){for(;s<h.start;)s=Math.min(h.start,s+5e3),i(s,u);u=x}h.start=h.pos}for(;s<h.pos;){var H=Math.min(h.pos,s+5e3);i(H,u),s=H}}function $a(e,t,n){for(var r,i,o=e.doc,l=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>l;--a){if(a<=o.first)return o.first;var s=ye(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof Hn?u.lookAhead:0)<=o.modeFrontier))return a;var h=Fe(s.text,null,e.options.tabSize);(i==null||r>h)&&(i=a-1,r=h)}return i}function Va(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=ye(e,r).stateAfter;if(i&&(!(i instanceof Hn)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Lo=!1,Vt=!1;function es(){Lo=!0}function ts(){Vt=!0}function _n(e,t,n){this.marker=e,this.from=t,this.to=n}function cn(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function rs(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function ns(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function is(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,a=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);if(a||o.from==t&&l.type=="bookmark"&&(!n||!o.marker.insertLeft)){var s=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new _n(l,o.from,s?null:o.to))}}return r}function os(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,a=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!n||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new _n(l,s?null:o.from-t,o.to==null?null:o.to-t))}}return r}function wi(e,t){if(t.full)return null;var n=U(e,t.from.line)&&ye(e,t.from.line).markedSpans,r=U(e,t.to.line)&&ye(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,l=ce(t.from,t.to)==0,a=is(n,i,l),s=os(r,o,l),u=t.text.length==1,h=we(t.text).length+(u?i:0);if(a)for(var x=0;x<a.length;++x){var D=a[x];if(D.to==null){var L=cn(s,D.marker);L?u&&(D.to=L.to==null?null:L.to+h):D.to=i}}if(s)for(var H=0;H<s.length;++H){var Z=s[H];if(Z.to!=null&&(Z.to+=h),Z.from==null){var ie=cn(a,Z.marker);ie||(Z.from=h,u&&(a||(a=[])).push(Z))}else Z.from+=h,u&&(a||(a=[])).push(Z)}a&&(a=To(a)),s&&s!=a&&(s=To(s));var ae=[a];if(!u){var he=t.text.length-2,se;if(he>0&&a)for(var ge=0;ge<a.length;++ge)a[ge].to==null&&(se||(se=[])).push(new _n(a[ge].marker,null,null));for(var Le=0;Le<he;++Le)ae.push(se);ae.push(s)}return ae}function To(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function ls(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(L){if(L.markedSpans)for(var H=0;H<L.markedSpans.length;++H){var Z=L.markedSpans[H].marker;Z.readOnly&&(!r||ve(r,Z)==-1)&&(r||(r=[])).push(Z)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var l=r[o],a=l.find(0),s=0;s<i.length;++s){var u=i[s];if(!(ce(u.to,a.from)<0||ce(u.from,a.to)>0)){var h=[s,1],x=ce(u.from,a.from),D=ce(u.to,a.to);(x<0||!l.inclusiveLeft&&!x)&&h.push({from:u.from,to:a.from}),(D>0||!l.inclusiveRight&&!D)&&h.push({from:a.to,to:u.to}),i.splice.apply(i,h),s+=h.length-3}}return i}function Co(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Do(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function qn(e){return e.inclusiveLeft?-1:0}function jn(e){return e.inclusiveRight?1:0}function Si(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),o=ce(r.from,i.from)||qn(e)-qn(t);if(o)return-o;var l=ce(r.to,i.to)||jn(e)-jn(t);return l||t.id-e.id}function Mo(e,t){var n=Vt&&e.markedSpans,r;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||Si(r,i.marker)<0)&&(r=i.marker);return r}function Fo(e){return Mo(e,!0)}function Kn(e){return Mo(e,!1)}function as(e,t){var n=Vt&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!r||Si(r,o.marker)<0)&&(r=o.marker)}return r}function Ao(e,t,n,r,i){var o=ye(e,t),l=Vt&&o.markedSpans;if(l)for(var a=0;a<l.length;++a){var s=l[a];if(s.marker.collapsed){var u=s.marker.find(0),h=ce(u.from,n)||qn(s.marker)-qn(i),x=ce(u.to,r)||jn(s.marker)-jn(i);if(!(h>=0&&x<=0||h<=0&&x>=0)&&(h<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ce(u.to,n)>=0:ce(u.to,n)>0)||h>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ce(u.from,r)<=0:ce(u.from,r)<0)))return!0}}}function qt(e){for(var t;t=Fo(e);)e=t.find(-1,!0).line;return e}function ss(e){for(var t;t=Kn(e);)e=t.find(1,!0).line;return e}function us(e){for(var t,n;t=Kn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Li(e,t){var n=ye(e,t),r=qt(n);return n==r?t:f(r)}function No(e,t){if(t>e.lastLine())return t;var n=ye(e,t),r;if(!cr(e,n))return t;for(;r=Kn(n);)n=r.find(1,!0).line;return f(n)+1}function cr(e,t){var n=Vt&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&Ti(e,t,r))return!0}}}function Ti(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return Ti(e,r.line,cn(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Ti(e,t,i))return!0}function er(e){e=qt(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var l=0;l<o.children.length;++l){var a=o.children[l];if(a==n)break;t+=a.height}return t}function Un(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Fo(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=Kn(r);){var o=n.find(0,!0);t-=r.text.length-o.from.ch,r=o.to.line,t+=r.text.length-o.to.ch}return t}function Ci(e){var t=e.display,n=e.doc;t.maxLine=ye(n,n.first),t.maxLineLength=Un(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=Un(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Hr=function(e,t,n){this.text=e,Do(this,t),this.height=n?n(this):1};Hr.prototype.lineNo=function(){return f(this)},Bt(Hr);function fs(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Co(e),Do(e,n);var i=r?r(e):1;i!=e.height&&Et(e,i)}function cs(e){e.parent=null,Co(e)}var ds={},hs={};function Eo(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?hs:ds;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Oo(e,t){var n=T("span",null,null,Y?"padding-right: .1px":null),r={pre:T("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=gs,sr(e.display.measure)&&(l=Re(o,e.doc.direction))&&(r.addToken=ms(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&f(o);xs(o,r,xo(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=de(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=de(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Rn(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Y){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=de(r.pre.className,r.textClass||"")),r}function ps(e){var t=c("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function gs(e,t,n,r,i,o,l){if(t){var a=e.splitSpaces?vs(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,h;if(!s.test(t))e.col+=t.length,h=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,h),k&&I<9&&(u=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var x=0;;){s.lastIndex=x;var D=s.exec(t),L=D?D.index-x:t.length-x;if(L){var H=document.createTextNode(a.slice(x,x+L));k&&I<9?h.appendChild(c("span",[H])):h.appendChild(H),e.map.push(e.pos,e.pos+L,H),e.col+=L,e.pos+=L}if(!D)break;x+=L+1;var Z=void 0;if(D[0]==" "){var ie=e.cm.options.tabSize,ae=ie-e.col%ie;Z=h.appendChild(c("span",et(ae),"cm-tab")),Z.setAttribute("role","presentation"),Z.setAttribute("cm-text"," "),e.col+=ae}else D[0]=="\r"||D[0]==`
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-LNgEKtdV.js","../codeMirrorModule.DYBRYzYX.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-Bou8kKzE.js","../codeMirrorModule.DYBRYzYX.css"])))=>i.map(i=>d[i]);
2
2
  var nx=Object.defineProperty;var ix=(i,e,t)=>e in i?nx(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Pa=(i,e,t)=>ix(i,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function t(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(a){if(a.ep)return;a.ep=!0;const o=t(a);fetch(a.href,o)}})();function sx(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var bh={exports:{}},Ua={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -56,7 +56,7 @@ Error generating stack: `+u.message+`
56
56
  rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
57
57
  rgb(0 0 0 / 10%) 0px -2px 4px,
58
58
  rgb(0 0 0 / 15%) 0px -6.1px 12px,
59
- rgb(0 0 0 / 25%) 0px 6px 12px`},CT=({diff:i,noTargetBlank:e,hideDetails:t})=>{const[s,a]=P.useState(i.diff?"diff":"actual"),[o,c]=P.useState(!1),[d,h]=P.useState(null),[f,_]=P.useState("Expected"),[m,y]=P.useState(null),[b,w]=P.useState(null),[v,T]=Es();P.useEffect(()=>{(async()=>{var O,Q,se,Y;h(await Eh((O=i.expected)==null?void 0:O.attachment.path)),_(((Q=i.expected)==null?void 0:Q.title)||"Expected"),y(await Eh((se=i.actual)==null?void 0:se.attachment.path)),w(await Eh((Y=i.diff)==null?void 0:Y.attachment.path))})()},[i]);const A=d&&m&&b,C=A?Math.max(d.naturalWidth,m.naturalWidth,200):500,L=A?Math.max(d.naturalHeight,m.naturalHeight,200):500,j=Math.min(1,(v.width-30)/C),D=Math.min(1,(v.width-50)/C/2),F=C*j,B=L*j,q={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return x.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:T,children:A&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[i.diff&&x.jsx("div",{style:{...q,fontWeight:s==="diff"?600:"initial"},onClick:()=>a("diff"),children:"Diff"}),x.jsx("div",{style:{...q,fontWeight:s==="actual"?600:"initial"},onClick:()=>a("actual"),children:"Actual"}),x.jsx("div",{style:{...q,fontWeight:s==="expected"?600:"initial"},onClick:()=>a("expected"),children:f}),x.jsx("div",{style:{...q,fontWeight:s==="sxs"?600:"initial"},onClick:()=>a("sxs"),children:"Side by side"}),x.jsx("div",{style:{...q,fontWeight:s==="slider"?600:"initial"},onClick:()=>a("slider"),children:"Slider"})]}),x.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:B+60},children:[i.diff&&s==="diff"&&x.jsx(si,{image:b,alt:"Diff",hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),i.diff&&s==="actual"&&x.jsx(si,{image:m,alt:"Actual",hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),i.diff&&s==="expected"&&x.jsx(si,{image:d,alt:f,hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),i.diff&&s==="slider"&&x.jsx(kT,{expectedImage:d,actualImage:m,hideSize:t,canvasWidth:F,canvasHeight:B,scale:j,expectedTitle:f}),i.diff&&s==="sxs"&&x.jsxs("div",{style:{display:"flex"},children:[x.jsx(si,{image:d,title:f,hideSize:t,canvasWidth:D*C,canvasHeight:D*L,scale:D}),x.jsx(si,{image:o?b:m,title:o?"Diff":"Actual",onClick:()=>c(!o),hideSize:t,canvasWidth:D*C,canvasHeight:D*L,scale:D})]}),!i.diff&&s==="actual"&&x.jsx(si,{image:m,title:"Actual",hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),!i.diff&&s==="expected"&&x.jsx(si,{image:d,title:f,hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),!i.diff&&s==="sxs"&&x.jsxs("div",{style:{display:"flex"},children:[x.jsx(si,{image:d,title:f,canvasWidth:D*C,canvasHeight:D*L,scale:D}),x.jsx(si,{image:m,title:"Actual",canvasWidth:D*C,canvasHeight:D*L,scale:D})]})]}),!t&&x.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[x.jsx("div",{children:i.diff&&x.jsx("a",{target:"_blank",href:i.diff.attachment.path,rel:"noreferrer",children:i.diff.attachment.name})}),x.jsx("div",{children:x.jsx("a",{target:e?"":"_blank",href:i.actual.attachment.path,rel:"noreferrer",children:i.actual.attachment.name})}),x.jsx("div",{children:x.jsx("a",{target:e?"":"_blank",href:i.expected.attachment.path,rel:"noreferrer",children:i.expected.attachment.name})})]})]})})},kT=({expectedImage:i,actualImage:e,canvasWidth:t,canvasHeight:s,scale:a,expectedTitle:o,hideSize:c})=>{const d={position:"absolute",top:0,left:0},[h,f]=P.useState(t/2),_=i.naturalWidth===e.naturalWidth&&i.naturalHeight===e.naturalHeight;return x.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&x.jsxs("div",{style:{margin:5},children:[!_&&x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),x.jsx("span",{children:i.naturalWidth}),x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),x.jsx("span",{children:i.naturalHeight}),!_&&x.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!_&&x.jsx("span",{children:e.naturalWidth}),!_&&x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!_&&x.jsx("span",{children:e.naturalHeight})]}),x.jsxs("div",{style:{position:"relative",width:t,height:s,margin:15,...ef},children:[x.jsx(S0,{orientation:"horizontal",offsets:[h],setOffsets:m=>f(m[0]),resizerColor:"#57606a80",resizerWidth:6}),x.jsx("img",{alt:o,style:{width:i.naturalWidth*a,height:i.naturalHeight*a},draggable:"false",src:i.src}),x.jsx("div",{style:{...d,bottom:0,overflow:"hidden",width:h,...ef},children:x.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*a,height:e.naturalHeight*a},draggable:"false",src:e.src})})]})]})},si=({image:i,title:e,alt:t,hideSize:s,canvasWidth:a,canvasHeight:o,scale:c,onClick:d})=>x.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!s&&x.jsxs("div",{style:{margin:5},children:[e&&x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),x.jsx("span",{children:i.naturalWidth}),x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),x.jsx("span",{children:i.naturalHeight})]}),x.jsx("div",{style:{display:"flex",flex:"none",width:a,height:o,margin:15,...ef},children:x.jsx("img",{width:i.naturalWidth*c,height:i.naturalHeight*c,alt:e||t,style:{cursor:d?"pointer":"initial"},draggable:"false",src:i.src,onClick:d})})]}),NT="modulepreload",MT=function(i,e){return new URL(i,e).href},B_={},DT=function(e,t,s){let a=Promise.resolve();if(t&&t.length>0){let c=function(_){return Promise.all(_.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};const d=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),f=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));a=c(t.map(_=>{if(_=MT(_,s),_ in B_)return;B_[_]=!0;const m=_.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(!!s)for(let v=d.length-1;v>=0;v--){const T=d[v];if(T.href===_&&(!m||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${_}"]${y}`))return;const w=document.createElement("link");if(w.rel=m?"stylesheet":NT,m||(w.as="script"),w.crossOrigin="",w.href=_,f&&w.setAttribute("nonce",f),document.head.appendChild(w),m)return new Promise((v,T)=>{w.addEventListener("load",v),w.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${_}`)))})}))}function o(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return a.then(c=>{for(const d of c||[])d.status==="rejected"&&o(d.reason);return e().catch(o)})},LT=20,Lr=({text:i,highlighter:e,mimeType:t,linkify:s,readOnly:a,highlight:o,revealLine:c,lineNumbers:d,isFocused:h,focusOnChange:f,wrapLines:_,onChange:m,dataTestId:y,placeholder:b})=>{const[w,v]=Es(),[T]=P.useState(DT(()=>import("./codeMirrorModule-LNgEKtdV.js"),__vite__mapDeps([0,1]),import.meta.url).then(j=>j.default)),A=P.useRef(null),[C,L]=P.useState();return P.useEffect(()=>{(async()=>{var q,O;const j=await T;RT(j);const D=v.current;if(!D)return;const F=HT(e)||jT(t)||(s?"text/linkified":"");if(A.current&&F===A.current.cm.getOption("mode")&&!!a===A.current.cm.getOption("readOnly")&&d===A.current.cm.getOption("lineNumbers")&&_===A.current.cm.getOption("lineWrapping")&&b===A.current.cm.getOption("placeholder"))return;(O=(q=A.current)==null?void 0:q.cm)==null||O.getWrapperElement().remove();const B=j(D,{value:"",mode:F,readOnly:!!a,lineNumbers:d,lineWrapping:_,placeholder:b,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-F":"findPersistent","Cmd-F":"findPersistent"}});return A.current={cm:B},h&&B.focus(),L(B),B})()},[T,C,v,e,t,s,d,_,a,h,b]),P.useEffect(()=>{A.current&&A.current.cm.setSize(w.width,w.height)},[w]),P.useLayoutEffect(()=>{var F;if(!C)return;let j=!1;if(C.getValue()!==i&&(C.setValue(i),j=!0,f&&(C.execCommand("selectAll"),C.focus())),j||JSON.stringify(o)!==JSON.stringify(A.current.highlight)){for(const O of A.current.highlight||[])C.removeLineClass(O.line-1,"wrap");for(const O of o||[])C.addLineClass(O.line-1,"wrap",`source-line-${O.type}`);for(const O of A.current.widgets||[])C.removeLineWidget(O);for(const O of A.current.markers||[])O.clear();const B=[],q=[];for(const O of o||[]){if(O.type!=="subtle-error"&&O.type!=="error")continue;const Q=(F=A.current)==null?void 0:F.cm.getLine(O.line-1);if(Q){const se={};se.title=O.message||"",q.push(C.markText({line:O.line-1,ch:0},{line:O.line-1,ch:O.column||Q.length},{className:"source-line-error-underline",attributes:se}))}if(O.type==="error"){const se=document.createElement("div");se.innerHTML=yo(O.message||""),se.className="source-line-error-widget",B.push(C.addLineWidget(O.line,se,{above:!0,coverGutter:!1}))}}A.current.highlight=o,A.current.widgets=B,A.current.markers=q}typeof c=="number"&&A.current.cm.lineCount()>=c&&C.scrollIntoView({line:Math.max(0,c-1),ch:0},50);let D;return m&&(D=()=>m(C.getValue()),C.on("change",D)),()=>{D&&C.off("change",D)}},[C,i,o,c,f,m]),x.jsx("div",{"data-testid":y,className:"cm-wrapper",ref:v,onClick:OT})};function OT(i){var t;if(!(i.target instanceof HTMLElement))return;let e;i.target.classList.contains("cm-linkified")?e=i.target.textContent:i.target.classList.contains("cm-link")&&((t=i.target.nextElementSibling)!=null&&t.classList.contains("cm-url"))&&(e=i.target.nextElementSibling.textContent.slice(1,-1)),e&&(i.preventDefault(),i.stopPropagation(),window.open(e,"_blank"))}let I_=!1;function RT(i){I_||(I_=!0,i.defineSimpleMode("text/linkified",{start:[{regex:Bb,token:"linkified"}]}))}function jT(i){if(i){if(i.includes("javascript")||i.includes("json"))return"javascript";if(i.includes("python"))return"python";if(i.includes("csharp"))return"text/x-csharp";if(i.includes("java"))return"text/x-java";if(i.includes("markdown"))return"markdown";if(i.includes("html")||i.includes("svg"))return"htmlmixed";if(i.includes("css"))return"css"}}function HT(i){if(i)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[i]}function $T(i){return!!i.match(/^(application\/json|application\/.*?\+json|text\/(x-)?json)(;\s*charset=.*)?$/)}function zT(i){return!!i.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const w0=({title:i,children:e,setExpanded:t,expanded:s,expandOnTitleClick:a,className:o})=>{const c=P.useId(),d=P.useId(),h=P.useCallback(()=>t(!s),[s,t]),f=x.jsx("div",{className:We("codicon",s?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:a?void 0:h});return x.jsxs("div",{className:We("expandable",s&&"expanded",o),children:[a?x.jsxs("div",{id:c,role:"button","aria-expanded":s,"aria-controls":d,className:"expandable-title",onClick:h,children:[f,i]}):x.jsxs("div",{className:"expandable-title",children:[f,i]}),s&&x.jsx("div",{id:d,"aria-labelledby":c,role:"region",className:"expandable-content",children:e})]})};function x0(i){const e=[];let t=0,s;for(;(s=Bb.exec(i))!==null;){const o=i.substring(t,s.index);o&&e.push(o);const c=s[0];e.push(BT(c)),t=s.index+c.length}const a=i.substring(t);return a&&e.push(a),e}function BT(i){let e=i;return e.startsWith("www.")&&(e="https://"+e),x.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:i})}const T0=P.createContext(void 0),ui=()=>P.useContext(T0),IT=({attachment:i,reveal:e})=>{const t=ui(),[s,a]=P.useState(!1),[o,c]=P.useState(null),[d,h]=P.useState(null),[f,_]=dx(),m=P.useRef(null),y=zT(i.contentType),b=!!i.sha1||!!i.path;P.useEffect(()=>{var T;if(e)return(T=m.current)==null||T.scrollIntoView({behavior:"smooth"}),_()},[e,_]),P.useEffect(()=>{s&&o===null&&d===null&&(h("Loading ..."),fetch(jc(t,i)).then(T=>T.text()).then(T=>{c(T),h(null)}).catch(T=>{h("Failed to load: "+T.message)}))},[t,s,o,d,i]);const w=P.useMemo(()=>{const T=o?o.split(`
59
+ rgb(0 0 0 / 25%) 0px 6px 12px`},CT=({diff:i,noTargetBlank:e,hideDetails:t})=>{const[s,a]=P.useState(i.diff?"diff":"actual"),[o,c]=P.useState(!1),[d,h]=P.useState(null),[f,_]=P.useState("Expected"),[m,y]=P.useState(null),[b,w]=P.useState(null),[v,T]=Es();P.useEffect(()=>{(async()=>{var O,Q,se,Y;h(await Eh((O=i.expected)==null?void 0:O.attachment.path)),_(((Q=i.expected)==null?void 0:Q.title)||"Expected"),y(await Eh((se=i.actual)==null?void 0:se.attachment.path)),w(await Eh((Y=i.diff)==null?void 0:Y.attachment.path))})()},[i]);const A=d&&m&&b,C=A?Math.max(d.naturalWidth,m.naturalWidth,200):500,L=A?Math.max(d.naturalHeight,m.naturalHeight,200):500,j=Math.min(1,(v.width-30)/C),D=Math.min(1,(v.width-50)/C/2),F=C*j,B=L*j,q={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return x.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:T,children:A&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[i.diff&&x.jsx("div",{style:{...q,fontWeight:s==="diff"?600:"initial"},onClick:()=>a("diff"),children:"Diff"}),x.jsx("div",{style:{...q,fontWeight:s==="actual"?600:"initial"},onClick:()=>a("actual"),children:"Actual"}),x.jsx("div",{style:{...q,fontWeight:s==="expected"?600:"initial"},onClick:()=>a("expected"),children:f}),x.jsx("div",{style:{...q,fontWeight:s==="sxs"?600:"initial"},onClick:()=>a("sxs"),children:"Side by side"}),x.jsx("div",{style:{...q,fontWeight:s==="slider"?600:"initial"},onClick:()=>a("slider"),children:"Slider"})]}),x.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:B+60},children:[i.diff&&s==="diff"&&x.jsx(si,{image:b,alt:"Diff",hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),i.diff&&s==="actual"&&x.jsx(si,{image:m,alt:"Actual",hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),i.diff&&s==="expected"&&x.jsx(si,{image:d,alt:f,hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),i.diff&&s==="slider"&&x.jsx(kT,{expectedImage:d,actualImage:m,hideSize:t,canvasWidth:F,canvasHeight:B,scale:j,expectedTitle:f}),i.diff&&s==="sxs"&&x.jsxs("div",{style:{display:"flex"},children:[x.jsx(si,{image:d,title:f,hideSize:t,canvasWidth:D*C,canvasHeight:D*L,scale:D}),x.jsx(si,{image:o?b:m,title:o?"Diff":"Actual",onClick:()=>c(!o),hideSize:t,canvasWidth:D*C,canvasHeight:D*L,scale:D})]}),!i.diff&&s==="actual"&&x.jsx(si,{image:m,title:"Actual",hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),!i.diff&&s==="expected"&&x.jsx(si,{image:d,title:f,hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),!i.diff&&s==="sxs"&&x.jsxs("div",{style:{display:"flex"},children:[x.jsx(si,{image:d,title:f,canvasWidth:D*C,canvasHeight:D*L,scale:D}),x.jsx(si,{image:m,title:"Actual",canvasWidth:D*C,canvasHeight:D*L,scale:D})]})]}),!t&&x.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[x.jsx("div",{children:i.diff&&x.jsx("a",{target:"_blank",href:i.diff.attachment.path,rel:"noreferrer",children:i.diff.attachment.name})}),x.jsx("div",{children:x.jsx("a",{target:e?"":"_blank",href:i.actual.attachment.path,rel:"noreferrer",children:i.actual.attachment.name})}),x.jsx("div",{children:x.jsx("a",{target:e?"":"_blank",href:i.expected.attachment.path,rel:"noreferrer",children:i.expected.attachment.name})})]})]})})},kT=({expectedImage:i,actualImage:e,canvasWidth:t,canvasHeight:s,scale:a,expectedTitle:o,hideSize:c})=>{const d={position:"absolute",top:0,left:0},[h,f]=P.useState(t/2),_=i.naturalWidth===e.naturalWidth&&i.naturalHeight===e.naturalHeight;return x.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&x.jsxs("div",{style:{margin:5},children:[!_&&x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),x.jsx("span",{children:i.naturalWidth}),x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),x.jsx("span",{children:i.naturalHeight}),!_&&x.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!_&&x.jsx("span",{children:e.naturalWidth}),!_&&x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!_&&x.jsx("span",{children:e.naturalHeight})]}),x.jsxs("div",{style:{position:"relative",width:t,height:s,margin:15,...ef},children:[x.jsx(S0,{orientation:"horizontal",offsets:[h],setOffsets:m=>f(m[0]),resizerColor:"#57606a80",resizerWidth:6}),x.jsx("img",{alt:o,style:{width:i.naturalWidth*a,height:i.naturalHeight*a},draggable:"false",src:i.src}),x.jsx("div",{style:{...d,bottom:0,overflow:"hidden",width:h,...ef},children:x.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*a,height:e.naturalHeight*a},draggable:"false",src:e.src})})]})]})},si=({image:i,title:e,alt:t,hideSize:s,canvasWidth:a,canvasHeight:o,scale:c,onClick:d})=>x.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!s&&x.jsxs("div",{style:{margin:5},children:[e&&x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),x.jsx("span",{children:i.naturalWidth}),x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),x.jsx("span",{children:i.naturalHeight})]}),x.jsx("div",{style:{display:"flex",flex:"none",width:a,height:o,margin:15,...ef},children:x.jsx("img",{width:i.naturalWidth*c,height:i.naturalHeight*c,alt:e||t,style:{cursor:d?"pointer":"initial"},draggable:"false",src:i.src,onClick:d})})]}),NT="modulepreload",MT=function(i,e){return new URL(i,e).href},B_={},DT=function(e,t,s){let a=Promise.resolve();if(t&&t.length>0){let c=function(_){return Promise.all(_.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};const d=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),f=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));a=c(t.map(_=>{if(_=MT(_,s),_ in B_)return;B_[_]=!0;const m=_.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(!!s)for(let v=d.length-1;v>=0;v--){const T=d[v];if(T.href===_&&(!m||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${_}"]${y}`))return;const w=document.createElement("link");if(w.rel=m?"stylesheet":NT,m||(w.as="script"),w.crossOrigin="",w.href=_,f&&w.setAttribute("nonce",f),document.head.appendChild(w),m)return new Promise((v,T)=>{w.addEventListener("load",v),w.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${_}`)))})}))}function o(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return a.then(c=>{for(const d of c||[])d.status==="rejected"&&o(d.reason);return e().catch(o)})},LT=20,Lr=({text:i,highlighter:e,mimeType:t,linkify:s,readOnly:a,highlight:o,revealLine:c,lineNumbers:d,isFocused:h,focusOnChange:f,wrapLines:_,onChange:m,dataTestId:y,placeholder:b})=>{const[w,v]=Es(),[T]=P.useState(DT(()=>import("./codeMirrorModule-Bou8kKzE.js"),__vite__mapDeps([0,1]),import.meta.url).then(j=>j.default)),A=P.useRef(null),[C,L]=P.useState();return P.useEffect(()=>{(async()=>{var q,O;const j=await T;RT(j);const D=v.current;if(!D)return;const F=HT(e)||jT(t)||(s?"text/linkified":"");if(A.current&&F===A.current.cm.getOption("mode")&&!!a===A.current.cm.getOption("readOnly")&&d===A.current.cm.getOption("lineNumbers")&&_===A.current.cm.getOption("lineWrapping")&&b===A.current.cm.getOption("placeholder"))return;(O=(q=A.current)==null?void 0:q.cm)==null||O.getWrapperElement().remove();const B=j(D,{value:"",mode:F,readOnly:!!a,lineNumbers:d,lineWrapping:_,placeholder:b,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-F":"findPersistent","Cmd-F":"findPersistent"}});return A.current={cm:B},h&&B.focus(),L(B),B})()},[T,C,v,e,t,s,d,_,a,h,b]),P.useEffect(()=>{A.current&&A.current.cm.setSize(w.width,w.height)},[w]),P.useLayoutEffect(()=>{var F;if(!C)return;let j=!1;if(C.getValue()!==i&&(C.setValue(i),j=!0,f&&(C.execCommand("selectAll"),C.focus())),j||JSON.stringify(o)!==JSON.stringify(A.current.highlight)){for(const O of A.current.highlight||[])C.removeLineClass(O.line-1,"wrap");for(const O of o||[])C.addLineClass(O.line-1,"wrap",`source-line-${O.type}`);for(const O of A.current.widgets||[])C.removeLineWidget(O);for(const O of A.current.markers||[])O.clear();const B=[],q=[];for(const O of o||[]){if(O.type!=="subtle-error"&&O.type!=="error")continue;const Q=(F=A.current)==null?void 0:F.cm.getLine(O.line-1);if(Q){const se={};se.title=O.message||"",q.push(C.markText({line:O.line-1,ch:0},{line:O.line-1,ch:O.column||Q.length},{className:"source-line-error-underline",attributes:se}))}if(O.type==="error"){const se=document.createElement("div");se.innerHTML=yo(O.message||""),se.className="source-line-error-widget",B.push(C.addLineWidget(O.line,se,{above:!0,coverGutter:!1}))}}A.current.highlight=o,A.current.widgets=B,A.current.markers=q}typeof c=="number"&&A.current.cm.lineCount()>=c&&C.scrollIntoView({line:Math.max(0,c-1),ch:0},50);let D;return m&&(D=()=>m(C.getValue()),C.on("change",D)),()=>{D&&C.off("change",D)}},[C,i,o,c,f,m]),x.jsx("div",{"data-testid":y,className:"cm-wrapper",ref:v,onClick:OT})};function OT(i){var t;if(!(i.target instanceof HTMLElement))return;let e;i.target.classList.contains("cm-linkified")?e=i.target.textContent:i.target.classList.contains("cm-link")&&((t=i.target.nextElementSibling)!=null&&t.classList.contains("cm-url"))&&(e=i.target.nextElementSibling.textContent.slice(1,-1)),e&&(i.preventDefault(),i.stopPropagation(),window.open(e,"_blank"))}let I_=!1;function RT(i){I_||(I_=!0,i.defineSimpleMode("text/linkified",{start:[{regex:Bb,token:"linkified"}]}))}function jT(i){if(i){if(i.includes("javascript")||i.includes("json"))return"javascript";if(i.includes("python"))return"python";if(i.includes("csharp"))return"text/x-csharp";if(i.includes("java"))return"text/x-java";if(i.includes("markdown"))return"markdown";if(i.includes("html")||i.includes("svg"))return"htmlmixed";if(i.includes("css"))return"css"}}function HT(i){if(i)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[i]}function $T(i){return!!i.match(/^(application\/json|application\/.*?\+json|text\/(x-)?json)(;\s*charset=.*)?$/)}function zT(i){return!!i.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const w0=({title:i,children:e,setExpanded:t,expanded:s,expandOnTitleClick:a,className:o})=>{const c=P.useId(),d=P.useId(),h=P.useCallback(()=>t(!s),[s,t]),f=x.jsx("div",{className:We("codicon",s?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:a?void 0:h});return x.jsxs("div",{className:We("expandable",s&&"expanded",o),children:[a?x.jsxs("div",{id:c,role:"button","aria-expanded":s,"aria-controls":d,className:"expandable-title",onClick:h,children:[f,i]}):x.jsxs("div",{className:"expandable-title",children:[f,i]}),s&&x.jsx("div",{id:d,"aria-labelledby":c,role:"region",className:"expandable-content",children:e})]})};function x0(i){const e=[];let t=0,s;for(;(s=Bb.exec(i))!==null;){const o=i.substring(t,s.index);o&&e.push(o);const c=s[0];e.push(BT(c)),t=s.index+c.length}const a=i.substring(t);return a&&e.push(a),e}function BT(i){let e=i;return e.startsWith("www.")&&(e="https://"+e),x.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:i})}const T0=P.createContext(void 0),ui=()=>P.useContext(T0),IT=({attachment:i,reveal:e})=>{const t=ui(),[s,a]=P.useState(!1),[o,c]=P.useState(null),[d,h]=P.useState(null),[f,_]=dx(),m=P.useRef(null),y=zT(i.contentType),b=!!i.sha1||!!i.path;P.useEffect(()=>{var T;if(e)return(T=m.current)==null||T.scrollIntoView({behavior:"smooth"}),_()},[e,_]),P.useEffect(()=>{s&&o===null&&d===null&&(h("Loading ..."),fetch(jc(t,i)).then(T=>T.text()).then(T=>{c(T),h(null)}).catch(T=>{h("Failed to load: "+T.message)}))},[t,s,o,d,i]);const w=P.useMemo(()=>{const T=o?o.split(`
60
60
  `).length:0;return Math.min(Math.max(5,T),20)*LT},[o]),v=x.jsxs("span",{style:{marginLeft:5},ref:m,"aria-label":i.name,children:[x.jsx("span",{children:x0(i.name)}),b&&x.jsx("a",{style:{marginLeft:5},href:lc(t,i),children:"download"})]});return!y||!b?x.jsx("div",{style:{marginLeft:20},children:v}):x.jsxs("div",{className:We(f&&"yellow-flash"),children:[x.jsx(w0,{title:v,expanded:s,setExpanded:a,expandOnTitleClick:!0,children:d&&x.jsx("i",{children:d})}),s&&o!==null&&x.jsx("div",{className:"vbox",style:{height:w},children:x.jsx(Lr,{text:o,readOnly:!0,mimeType:i.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},PT=({revealedAttachmentCallId:i})=>{const e=ui(),{diffMap:t,screenshots:s,attachments:a}=P.useMemo(()=>{const o=new Set((e==null?void 0:e.visibleAttachments)??[]),c=new Set,d=new Map;for(const h of o){if(!h.path&&!h.sha1)continue;const f=h.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(f){const _=f[1],m=f[2],y=d.get(_)||{expected:void 0,actual:void 0,diff:void 0};y[m]=h,d.set(_,y),o.delete(h)}else h.contentType.startsWith("image/")&&(c.add(h),o.delete(h))}return{diffMap:d,attachments:o,screenshots:c}},[e]);return!t.size&&!s.size&&!a.size?x.jsx(As,{text:"No attachments"}):x.jsxs("div",{className:"attachments-tab",children:[[...t.values()].map(({expected:o,actual:c,diff:d})=>x.jsxs(x.Fragment,{children:[o&&c&&x.jsx("div",{className:"attachments-section",children:"Image diff"}),o&&c&&x.jsx(CT,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:lc(e,o)},title:"Expected"},actual:{attachment:{...c,path:lc(e,c)}},diff:d?{attachment:{...d,path:lc(e,d)}}:void 0}})]})),s.size?x.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...s.values()].map((o,c)=>{const d=jc(e,o);return x.jsxs("div",{className:"attachment-item",children:[x.jsx("div",{children:x.jsx("img",{draggable:"false",src:d})}),x.jsx("div",{children:x.jsx("a",{target:"_blank",href:d,rel:"noreferrer",children:o.name})})]},`screenshot-${c}`)}),a.size?x.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...a.values()].map((o,c)=>x.jsx("div",{className:"attachment-item",children:x.jsx(IT,{attachment:o,reveal:i&&o.callId===i.callId?i:void 0})},UT(o,c)))]})};function jc(i,e){return i&&e.sha1?i.createRelativeUrl(`sha1/${e.sha1}`):`file?path=${encodeURIComponent(e.path)}`}function lc(i,e){let t=e.contentType?`&dn=${encodeURIComponent(e.name)}`:"";return e.contentType&&(t+=`&dct=${encodeURIComponent(e.contentType)}`),jc(i,e)+t}function UT(i,e){return e+"-"+(i.sha1?"sha1-"+i.sha1:"path-"+i.path)}const qT=`
61
61
  # Instructions
62
62
 
@@ -132,7 +132,7 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(HC(i))return{d:i.toJSON()};if($C(i
132
132
  A2 2 0 1 1 10 6
133
133
  A2 2 0 1 1 6 6
134
134
  Z
135
- `}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-layers"},children:[{tagName:"path",attrs:{d:"M8 2L2 5v1l6 3 6-3V5L8 2zm0 1.18L11.82 5 8 6.82 4.18 5 8 3.18zM2 7.13V8l6 3 6-3v-.87L8 10.2 2 7.13zM2 10.13V11l6 3 6-3v-.87L8 13.2 2 10.13z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-list-tree"},children:[{tagName:"path",attrs:{d:"M2 3.5C2 3.22386 2.22386 3 2.5 3H13.5C13.7761 3 14 3.22386 14 3.5C14 3.77614 13.7761 4 13.5 4H6V6H13.5C13.7761 6 14 6.22386 14 6.5C14 6.77614 13.7761 7 13.5 7H6V9H13.5C13.7761 9 14 9.22386 14 9.5C14 9.77614 13.7761 10 13.5 10H6V12H13.5C13.7761 12 14 12.2239 14 12.5C14 12.7761 13.7761 13 13.5 13H5.5C5.22386 13 5 12.7761 5 12.5V4H2.5C2.22386 4 2 3.77614 2 3.5Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-brackets"},children:[{tagName:"path",attrs:{d:"M4.5 2H2v12h2.5v-1H3V3h1.5V2zm7 0H14v12h-2.5v-1H13V3h-1.5V2zM6 5h4v1H6V5zm0 3h4v1H6V8zm0 3h4v1H6v-1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-braces"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 3.5C3 2.67 3.67 2 4.5 2H5v1h-.5c-.28 0-.5.22-.5.5v3c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5v3c0 .28.22.5.5.5H5v1h-.5C3.67 14 3 13.33 3 12.5v-3c0-.28-.22-.5-.5-.5H2V8h.5c.28 0 .5-.22.5-.5v-3zm10 0C13 2.67 12.33 2 11.5 2H11v1h.5c.28 0 .5.22.5.5v3c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5v3c0 .28-.22.5-.5.5H11v1h.5c.83 0 1.5-.67 1.5-1.5v-3c0-.28.22-.5.5-.5H14V8h-.5c-.28 0-.5-.22-.5-.5v-3z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-braces-dashes"},children:[{tagName:"path",attrs:{d:"M3 3.5C3 2.67 3.67 2 4.5 2H5v1h-.5c-.28 0-.5.22-.5.5v3c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5v3c0 .28.22.5.5.5H5v1h-.5C3.67 14 3 13.33 3 12.5v-3c0-.28-.22-.5-.5-.5H2V8h.5c.28 0 .5-.22.5-.5v-3zm10 0C13 2.67 12.33 2 11.5 2H11v1h.5c.28 0 .5.22.5.5v3c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5v3c0 .28-.22.5-.5.5H11v1h.5c.83 0 1.5-.67 1.5-1.5v-3c0-.28.22-.5.5-.5H14V8h-.5c-.28 0-.5-.22-.5-.5v-3zM6 5h4v1H6V5zm0 3h4v1H6V8zm0 3h4v1H6v-1z"}}]},{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"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-snapshot"},children:[{tagName:"path",attrs:{d:"M2 1.5l.5-.5h7.72l.35.14 3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13zm1 .5v12h10V6H9.5L9 5.5V2H3zm7 0v3h3l-3-3z"}},{tagName:"path",attrs:{fill:"none",stroke:"currentColor","stroke-width":"0.8",transform:"rotate(7 8 8.7)",d:"M 10 5.2 C 8 5.2, 6 5.7, 6 7.2 C 6 8.7, 7.5 8.7, 8 8.7 C 8.5 8.7, 10 8.7, 10 10.2 C 10 11.7, 8 12.2, 6 12.2"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-move"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.5 2.5V5.5H7.5V2.5L6.20711 3.79289L5.5 3.08579L8 0.585786L10.5 3.08579L9.79289 3.79289L8.5 2.5ZM7.5 10.5V13.5L6.20711 12.2071L5.5 12.9142L8 15.4142L10.5 12.9142L9.79289 12.2071L8.5 13.5V10.5H7.5ZM10.5 8.5H13.5L12.2071 9.79289L12.9142 10.5L15.4142 8L12.9142 5.5L12.2071 6.20711L13.5 7.5H10.5V8.5ZM5.5 7.5H2.5L3.79289 6.20711L3.08579 5.5L0.585786 8L3.08579 10.5L3.79289 9.79289L2.5 8.5H5.5V7.5Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-selection"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 1H3V2H2V3H1V1ZM4 1H6V2H4V1ZM7 1H9V2H7V1ZM10 1H12V2H10V1ZM13 1H15V3H14V2H13V1ZM14 4H15V6H14V4ZM14 7H15V9H14V7ZM14 10H15V12H14V10ZM13 13V14H14V15H13H12V14H13V13H14V12H15V13V15H13ZM10 14H12V15H10V14ZM7 14H9V15H7V14ZM4 14H6V15H4V14ZM1 13H2V14H3V15H1V13ZM1 10H2V12H1V10ZM1 7H2V9H1V7ZM1 4H2V6H1V4Z"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-table"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd",d:"M2 3h12v10H2V3zm1 1v8h10V4H3z"}},{tagName:"rect",attrs:{x:"2",y:"6.33",width:"12",height:"1"}},{tagName:"rect",attrs:{x:"2",y:"9.67",width:"12",height:"1"}},{tagName:"rect",attrs:{x:"5.67",y:"3",width:"1",height:"10"}},{tagName:"rect",attrs:{x:"9.33",y:"3",width:"1",height:"10"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-file-upload"},children:[{tagName:"path",attrs:{d:"M14.5 3H7.71l-.85-.85L6.51 2h-5l-.5.5v11l.5.5h13l.5-.5v-10L14.5 3zm-.51 8.49V13h-12V7h4.49l.35-.15.86-.86H14v1.5l.001 4zm0-6.49h-6.5l-.35.15-.86.86H2v-3h4.29l.85.85.36.15H14l-.01.99z"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-eraser"},children:[{tagName:"path",attrs:{d:"M 13.54 2.70 L 11.30 0.46 C 10.68 -0.15 9.68 -0.15 9.06 0.46 L 3.34 6.18 L 1.46 8.07 C 0.85 8.68 0.85 9.68 1.46 10.30 L 3.70 12.54 C 4.01 12.84 4.41 13 4.82 13 C 5.22 13 5.63 12.84 5.93 12.54 L 7.82 10.66 L 8.26 10.21 L 13.54 4.93 C 13.84 4.64 14 4.24 14 3.82 C 14 3.39 13.84 3.00 13.54 2.70 Z M 7.37 10.21 L 5.49 12.09 C 5.12 12.46 4.51 12.46 4.15 12.09 L 1.91 9.85 C 1.54 9.48 1.54 8.88 1.91 8.51 L 3.79 6.63 L 7.37 10.21 Z M 13.09 4.49 L 7.82 9.76 L 6.03 7.97 L 4.24 6.18 L 9.51 0.91 C 9.88 0.54 10.48 0.54 10.85 0.91 L 13.09 3.15 C 13.27 3.33 13.37 3.56 13.37 3.82 C 13.37 4.07 13.27 4.31 13.09 4.49 Z"}},{tagName:"rect",attrs:{x:"1",y:"13.2",width:"12",height:"1.6"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 100 100",fill:"currentColor",id:"icon-sketch-tool"},children:[{tagName:"path",attrs:{d:"m37.68 70.594c-0.36328 0.75781-0.66406 1.5508-0.89063 2.3594-0.41406 1.4727-0.58984 3.0195-0.51562 4.5742 0.042968 0.95312-0.58984 1.7852-1.4766 2.0195l-21.281 5.707c-1.0664 0.28516-2.1602-0.34766-2.4453-1.4141-0.09375-0.35156-0.085937-0.70703 0-1.0312l5.7031-21.285c0.25781-0.96094 1.1719-1.5703 2.1289-1.4727 1.5195 0.0625 3.0273-0.11719 4.4688-0.51953 0.80859-0.22656 1.5977-0.52734 2.3594-0.89453-0.64453-0.78516-0.60156-1.9453 0.13281-2.6797l3.7227-3.7227c0.70703-0.70703 1.8086-0.77344 2.5898-0.20312l35.953-35.953c-0.57031-0.78125-0.50391-1.8828 0.20312-2.5898l3.7227-3.7227c0.70703-0.70703 1.8086-0.77344 2.5898-0.20312l6.5039-6.5039c0.78125-0.78125 2.0469-0.78125 2.8281 0l9.2891 9.2891c0.78125 0.78125 0.78125 2.0469 0 2.8281l-6.5039 6.5039c0.57031 0.78125 0.5 1.8828-0.20312 2.5859l-0.49219 0.49219 2.875 2.875c0.78125 0.78125 0.78125 2.0469 0 2.8281l-16.711 16.711c-0.78125 0.78125-2.0469 0.78125-2.8281 0s-0.78125-2.0469 0-2.8281l15.297-15.297-1.4609-1.4609-0.40234 0.40234c-0.70703 0.70703-1.8047 0.77344-2.5859 0.20312l-35.953 35.953c0.56641 0.78125 0.5 1.8828-0.20312 2.5859l-3.7227 3.7227c-0.73438 0.73438-1.8945 0.77734-2.6797 0.13281zm-9.0078-8.9961c-1.3281 0.76562-2.75 1.3594-4.2266 1.7734-1.3711 0.37891-2.7812 0.60547-4.2109 0.66406l-3.375 12.598 5.2109-5.2109c-0.18359-0.51562-0.27734-1.0547-0.27734-1.5938 0-1.1992 0.46094-2.4023 1.3789-3.3203 0.91406-0.91406 2.1211-1.375 3.3203-1.375 1.1953 0 2.3945 0.46094 3.3125 1.375 0.92187 0.92578 1.3828 2.1289 1.3828 3.3203 0 1.1406-0.41797 2.2852-1.25 3.1836-0.88672 0.96875-2.1328 1.5117-3.4453 1.5117-0.53906 0-1.0742-0.09375-1.5898-0.28125l-5.2148 5.2148 12.598-3.375c0.058594-1.4336 0.28516-2.8477 0.66406-4.2109 0.41406-1.4766 1.0078-2.8984 1.7734-4.2266l-6.0508-6.0508zm11.168 3.7227-8.8438-8.8438-0.89453 0.89453 8.8438 8.8438zm37.645-52.945 6.4609 6.4609 5.0742-5.0742-6.4609-6.4609zm-0.089844 13.012-6.4609-6.4609-35.871 35.871 6.4609 6.4609zm4.6367-2.8086-8.293-8.293c-0.12109-0.054687-0.23828-0.125-0.34766-0.20312l-0.82422 0.82422 8.8438 8.8438 0.82031-0.82031c-0.082031-0.10938-0.14844-0.23047-0.20312-0.35156zm-75.164 68.324c-0.83984-0.71094-0.94531-1.9727-0.23438-2.8125 0.71094-0.83984 1.9727-0.94531 2.8125-0.23438 11.77 10.004 24.934 4.5469 38.125-0.91797 14.867-6.1602 29.77-12.34 43.941 0.98828 0.80078 0.75391 0.83984 2.0195 0.085937 2.8203-0.75391 0.80078-2.0195 0.83984-2.8203 0.085937-12.289-11.559-26-5.875-39.676-0.20703-14.32 5.9336-28.609 11.855-42.234 0.27734zm19.625-20.375c0.23437 0 0.37891-0.09375 0.53906-0.24609 0.10156-0.125 0.15625-0.28516 0.15625-0.44922 0-0.18359-0.066406-0.36328-0.19922-0.49609-0.13281-0.13281-0.3125-0.19922-0.49609-0.19922-0.17969 0-0.35938 0.070312-0.49219 0.20312-0.13281 0.13281-0.20312 0.31641-0.20312 0.49219 0 0.17969 0.070313 0.35938 0.20312 0.49219 0.13281 0.13672 0.30078 0.20312 0.49219 0.20312z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gojs-link"},children:[{tagName:"path",attrs:{d:"M 0.75 3.5 A 1.75 1.75 0 1 0 4.25 3.5 A 1.75 1.75 0 1 0 0.75 3.5 Z"}},{tagName:"path",attrs:{d:"M 4.25 2.75 L 9.5 2.75 L 9.5 11.75 L 13 11.75 L 13 13.25 L 8 13.25 L 8 4.25 L 4.25 4.25 Z"}},{tagName:"path",attrs:{d:"M 13 11 L 15.5 12.5 L 13 14 Z"}}]}]}]},Lv="[Scoping]";function Bc(){try{if(typeof window<"u"&&window.__SKYRAMP_DEBUG__||typeof localStorage<"u"&&localStorage.getItem("SKYRAMP_DEBUG")==="true")return!0}catch{}return!1}function W(...i){Bc()&&console.log(Lv,...i)}function GC(i){Bc()&&console.group(`${Lv} ${i}`)}function Dn(){Bc()&&console.groupEnd()}function jh(i){Bc()&&console.table(i)}const XC=[/card/i,/item/i,/tile/i,/cell/i,/row(?!s)/i,/entry/i,/result/i,/post/i,/product/i,/option/i],YC=[/^col-/i,/^row$/i,/^container/i,/^px-/i,/^py-/i,/^mx-/i,/^my-/i,/^m-/i,/^p-/i,/^d-/i,/^flex/i,/^grid$/i,/^text-/i,/^bg-/i,/^border/i,/^rounded/i,/^shadow/i,/^w-/i,/^h-/i,/^css-/i,/^styled-/i,/^sc-/i,/^emotion-/i,/^MuiGrid/i,/^MuiBox/i,/--[a-f0-9]{16,}$/i,/__[a-f0-9]{16,}$/i,/_[a-f0-9]{16,}$/i,/^app-[a-z0-9]+$/i,/^e[a-z0-9]{6,}\d+$/i];class KC{constructor(e){this._injectedScript=e,W("ScopingHandler initialized (with CSS class pattern support)")}applyScopingHook(e,t,s){GC(`Analyzing: ${t}`);const a=this._needsScoping(e,t,s);if(W("Needs scoping:",a.needed,"| Reason:",a.reason),!a.needed){const v=this._tryStableIdSelector(e,t);return v?(W("Preferring stable ID selector:",v.selector),Dn(),v):(Dn(),null)}const o=this._tryStableIdSelector(e,t);if(o)return W("Using stable ID selector:",o.selector),Dn(),o;const c=this._tryLinkSelector(e,t);if(c)return W("Using link selector:",c.selector),Dn(),c;const d=this._findContainer(e);if(!d){if(W("No container found"),this._hasDynamicSelector(t)){const v=this._generateAlternativeSelector(e,t);if(v)return W("Using alternative selector:",v.selector),Dn(),v}return Dn(),null}W("Container:",d.selector);const h=this._getContainerIndex(d.element,d.selector);if(h===null)return W("Cannot determine container index"),Dn(),null;W("Container index:",h);const f=this._generateRelativeSelector(d.element,e);if(!f)return W("No relative selector found"),Dn(),null;W("Relative selector:",f);const _=this._isFormContainer(d.selector);let m,y=!1;if(_)m=`${d.selector} >> ${f}`,W("Using form container selector (no nth):",m);else{const v=this._getRowHasFilter(d.element,d.selector);if(v)m=`${d.selector} >> internal:has=${v} >> ${f}`,y=!0,W("Using has-filter selector:",m);else{const T=this._getTextFilterForContainer(d.element,d.selector);if(T)m=`${d.selector} >> internal:has-text="${this._escapeTextFilter(T)}"i >> ${f}`,y=!0,W("Using text-filtered selector:",m);else{const A=this._getRowAnchorSelector(d.element,e);A?(m=A,y=!0,W("Using row-anchored selector:",m)):(m=`${d.selector} >> nth=${h} >> ${f}`,W("Using nth-based selector:",m))}}}const b=this._verifySelector(m);if(W("Verification:",b.valid?"PASS":"FAIL","| Matches:",b.count),!b.valid)if(_&&b.count>=1)W("Form container verification relaxed - using selector despite multiple matches");else return W("Verification failed, using original"),Dn(),null;const w={selector:m,container:d.element,elements:b.elements,strategy:"nth",description:_?`${d.selector} >> ${f}`:`${d.selector}.nth(${h}) >> ${f}`,containerSelector:d.selector,containerIndex:h,relativeSelector:f,isFormContainer:_,usesTextFilter:y};return jh({Original:t,Scoped:m,Container:d.selector,Index:h,Relative:f}),Dn(),w}_needsScoping(e,t,s){if(W("Input match set:",{selector:t,count:s.length}),s.length>1)return{needed:!0,reason:`Non-unique: ${s.length} elements`};if(this._hasDynamicSelector(t))return{needed:!0,reason:"Dynamic selector needs replacement"};const a=this._hasStateDependentName(e,t);if(a.isStateDependent)return{needed:!0,reason:a.reason};const o=["gridcell","row","listitem","option","treeitem","menuitem","cell"],c=e.getAttribute("role");if(c&&o.includes(c)){const h=this._findRepeatingContainer(e);if(h)return{needed:!0,reason:`Repeating role "${c}" inside container: ${h.selector}`}}const d=e.tagName==="TD"?e:e.closest("td");if(d){const h=d.closest("tr");if(h){const f=h.parentElement;if(f&&(f.tagName==="TBODY"||f.tagName==="TABLE")){const _=f.querySelectorAll(":scope > tr");if(_.length>1)return{needed:!0,reason:`Element inside <td> in <tr> with ${_.length} sibling rows`}}}}return{needed:!1,reason:"Selector is unique and not in repeating context"}}_isDynamicId(e){if(/^react-aria\d+/.test(e)||/^mui-\d+/.test(e)||/^(mat|cdk)-[a-z]+-\d+$/.test(e)||/[-_]\d+$/.test(e)||/\d{2,}[_-][a-zA-Z]/.test(e)||/^\d+$/.test(e)||/\d{4,}$/.test(e)||/[-_][0-9a-f]{6,}$/i.test(e))return!0;const t=e.match(/[-_]([0-9a-f]{3,5})$/i);return!!(t&&/[0-9]/.test(t[1])||/[a-zA-Z][0-9]{3,}$/.test(e)||e.includes(":")||/^.+__search_[a-zA-Z0-9]{4,}$/.test(e))}_tryStableIdSelector(e,t){const s=e.id;if(!s||!t.startsWith("internal:role="))return null;if(this._isDynamicId(s))return W("Skipping dynamic ID:",s),null;const a=`#${CSS.escape(s)}`,o=this._verifySelector(a);return!o.valid||o.count!==1?(W("ID selector not unique:",a,"matches:",o.count),null):{selector:a,container:null,elements:o.elements,strategy:"alternative",description:"Stable ID preferred over role selector",containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0}}_hasDynamicSelector(e){if(W("_hasDynamicSelector checking:",e),/react-aria\d+/.test(e))return W("MATCHED: React-Aria dynamic ID"),!0;if(/__search_[a-zA-Z0-9]{4,}/.test(e))return W("MATCHED: Vue Tables dynamic search ID"),!0;if(/#[a-zA-Z_-]*\d+/.test(e))return W("MATCHED: Dynamic ID with numeric suffix (CSS)"),!0;if(/internal:attr=\[id="[a-zA-Z_-]*\d+"\]/.test(e))return W("MATCHED: Dynamic ID with numeric suffix (internal:attr)"),!0;if(/\[id="[a-zA-Z_-]*\d+"\]/.test(e))return W("MATCHED: Dynamic ID with numeric suffix (attribute selector)"),!0;if(/\[id="[^"]*\d{2,}[_-][a-zA-Z][^"]*"\]/.test(e))return W("MATCHED: Dynamic ID with mid-string counter (attribute selector)"),!0;if(/internal:attr=\[id="[^"]*\d{2,}[_-][a-zA-Z][^"]*"\]/.test(e))return W("MATCHED: Dynamic ID with mid-string counter (internal:attr)"),!0;if(/\.(app-[a-z0-9]+|e[a-z0-9]{6,}[0-9]+)/.test(e))return W("MATCHED: CSS-in-JS generated class (Emotion)"),!0;const t=(e.match(/>/g)||[]).length;return t>=4?(W("MATCHED: Long CSS path with",t,"child combinators"),!0):/:nth-child\(\d+\)/.test(e)?(W("MATCHED: Contains :nth-child() pattern"),!0):/\[data-testid="[^"]*[-_]\d+"\]/.test(e)||/\[data-test-id="[^"]*[-_]\d+"\]/.test(e)?(W("MATCHED: TestId with numeric suffix (attribute selector)"),!0):/getByTestId\(['"][^'"]*[-_]\d+['"]\)/.test(e)?(W("MATCHED: TestId with numeric suffix (getByTestId)"),!0):/internal:testid=.*[-_]\d+/.test(e)?(W("MATCHED: TestId with numeric suffix (internal:testid)"),!0):/\[name="\d+"[is]?\]/.test(e)||/internal:text="\d+"[is]?/.test(e)?(W("MATCHED: All-numeric text content in selector"),!0):/\[name="[^"]*\d{8,}[^"]*"/.test(e)||/internal:text="[^"]*\d{8,}[^"]*"/.test(e)?(W("MATCHED: Long digit sequence in text content (timestamp/generated)"),!0):/(?:\[name|internal:text)="\/?\d{1,2}\/\d{1,2}"/.test(e)?(W("MATCHED: Partial date pattern in text content"),!0):[...e.matchAll(/(?:\[name|internal:text)="([^"]*)"/g)].map(a=>a[1]).some(a=>this._hasVolatileText(a))?(W("MATCHED: Month-name date in text content (volatile)"),!0):(W("No dynamic patterns found"),!1)}_hasStateDependentName(e,t){const s=t.match(/internal:role=(\w+)\[name=["'](.+?)["'][is]?\]/);if(!s)return{isStateDependent:!1,reason:"Not a role selector with name"};const a=s[1],o=s[2];if(!o||o.length<3)return{isStateDependent:!1,reason:"Name too short"};W("Checking state-dependent name:",{role:a,name:o});const c=this._getSiblingAccessibleNames(e,a);if(c.length===0)return W("No siblings found for state check"),{isStateDependent:!1,reason:"No siblings with same role"};W("Sibling names:",c);for(const d of c)if(d.length>=3&&o.length>d.length&&o.toLowerCase().includes(d.toLowerCase()))return W("State-dependent name detected:",o,"contains",d),{isStateDependent:!0,reason:`Name "${o}" contains sibling name "${d}" - likely hover-dependent`};return{isStateDependent:!1,reason:"Name is unique among siblings"}}_getSiblingAccessibleNames(e,t){const s=[],a=new Set;try{const o=["ul","ol","nav",'[role="list"]','[role="navigation"]','[role="menu"]','[role="tablist"]','[role="grid"]','[role="row"]'];let c=e.parentElement,d=e.ownerDocument.body,h=0;for(;c&&h<5;){const m=c.tagName.toLowerCase(),y=c.getAttribute("role");if(o.some(b=>{var w;if(b.startsWith("[role=")){const v=(w=b.match(/\[role="(.+)"\]/))==null?void 0:w[1];return y===v}return m===b})){d=c;break}c=c.parentElement,h++}W("Sibling search scope:",d.tagName,d.className);const f=`[role="${t}"]`,_=d.querySelectorAll(f);for(const m of _){if(m===e)continue;const y=this._getAccessibleName(m);y&&y.length>=2&&!a.has(y.toLowerCase())&&(a.add(y.toLowerCase()),s.push(y))}}catch(o){W("Error getting sibling names:",o)}return s}_findRepeatingContainer(e){const t=[/^grid[-_]?view[-_]?item$/i,/^gridcell$/i,/^list[-_]?item$/i,/^row[-_]?item$/i,/^item$/i,/^card$/i,/^tile$/i],s=[/^gridview$/i,/^grid[-_]?view$/i,/^listview$/i,/^list[-_]?view$/i,/^container$/i,/^wrapper$/i,/^content$/i,/^main$/i];let a=e.parentElement;for(;a&&a!==e.ownerDocument.body;){const o=this._getTestId(a);if(o&&!s.some(f=>f.test(o))&&t.some(f=>f.test(o))){const f=this._buildTestIdSelector(a,o);if(a.ownerDocument.querySelectorAll(f).length>1)return{element:a,selector:f}}const c=a.getAttribute("role");if(c&&["row","gridcell","listitem","option","treeitem","menuitem"].includes(c)){const f=`[role=${this._quoteCSSAttributeValue(c)}]`;if(a.ownerDocument.querySelectorAll(f).length>1)return{element:a,selector:f}}const d=this._getComponentName(a);if(d&&this._isRepeatingComponentName(d.name)){const f=`[${d.attr}=${this._quoteCSSAttributeValue(d.name)}]`;try{const _=a.ownerDocument.querySelectorAll(f);if(_.length>1&&_.length<100)return W("Found component container:",d.name,"via",d.attr,"with",_.length,"siblings"),{element:a,selector:f}}catch{}}const h=this._findRepeatingContainerByClass(a);if(h)return h;a=a.parentElement}return null}_findRepeatingContainerByClass(e){const t=Array.from(e.classList);for(const s of t)if(!YC.some(a=>a.test(s))&&XC.some(a=>a.test(s))){const a=`.${this._escapeCSS(s)}`;try{const o=e.ownerDocument.querySelectorAll(a);if(o.length>1&&o.length<100){const c=e.tagName.toLowerCase();return W("Found CSS class container:",s,"with",o.length,"siblings, using tag:",c),{element:e,selector:c}}}catch{continue}}return null}_escapeCSS(e){return df(e)}_quoteCSSAttributeValue(e){return Ov(e)}_getTestId(e){return e.getAttribute("data-testid")||e.getAttribute("data-test-id")}_buildTestIdSelector(e,t){return e.getAttribute("data-testid")===t?`[data-testid=${this._quoteCSSAttributeValue(t)}]`:`[data-test-id=${this._quoteCSSAttributeValue(t)}]`}_getComponentName(e){const t=["data-component","data-sentry-component","data-react-component"];for(const s of t){const a=e.getAttribute(s);if(a)return{name:a,attr:s}}return null}_isRepeatingComponentName(e){return[/Card$/i,/Item$/i,/Link$/i,/Row$/i,/Tile$/i,/Option$/i,/Entry$/i].some(s=>s.test(e))}_findContainer(e){const t=[/^grid[-_]?view[-_]?item$/i,/^gridcell$/i,/^list[-_]?item$/i,/^row[-_]?item$/i,/^item$/i,/^card$/i,/^tile$/i],s=[/[-_]input$/i,/[-_]field$/i,/[-_]btn$/i,/[-_]button$/i,/[-_]control$/i,/^input[-_]/i,/^field[-_]/i],a=[/^gridview$/i,/^grid[-_]?view$/i,/^listview$/i,/^list[-_]?view$/i,/^container$/i,/^wrapper$/i,/^content$/i,/^main$/i];let o=e.parentElement,c=null,d=null;for(;o&&o!==e.ownerDocument.body;){const h=this._getTestId(o);if(h){if(a.some(y=>y.test(h))){o=o.parentElement;continue}const m=this._isFragileTestId(h);if(!m&&t.some(y=>y.test(h)))return{element:o,selector:this._buildTestIdSelector(o,h)};if(!m&&s.some(y=>y.test(h)))return W("Found form container by testid pattern:",h),{element:o,selector:this._buildTestIdSelector(o,h)};!c&&!m&&(c={element:o,selector:this._buildTestIdSelector(o,h)})}const f=o.getAttribute("role");if(f&&["row","gridcell","listitem","option","treeitem","menuitem"].includes(f)&&(c||(c={element:o,selector:`[role=${this._quoteCSSAttributeValue(f)}]`})),o.tagName==="TR"){const m=o.parentElement;m&&(m.tagName==="TBODY"||m.tagName==="TABLE")&&m.querySelectorAll(":scope > tr").length>1&&!c&&(c={element:o,selector:"tr"})}const _=this._getComponentName(o);if(_&&this._isRepeatingComponentName(_.name)){const m=`[${_.attr}=${this._quoteCSSAttributeValue(_.name)}]`;try{const y=o.ownerDocument.querySelectorAll(m);if(y.length>1&&y.length<100)return W("Found component container:",_.name,"via",_.attr,"with",y.length,"siblings"),{element:o,selector:m}}catch{}}if(!d){const m=this._findRepeatingContainerByClass(o);m&&(d=m)}o=o.parentElement}return c||d}_isFormContainer(e){const s=[/-input"\]$/i,/-field"\]$/i,/-btn"\]$/i,/-button"\]$/i,/-control"\]$/i,/\[data-test-?id="input-/i,/\[data-test-?id="field-/i].some(a=>a.test(e));return W("_isFormContainer:",e,"=",s),s}_getContainerIndex(e,t){try{const s=e.ownerDocument.querySelectorAll(t),a=Array.from(s).indexOf(e);return a!==-1?a:null}catch{return null}}_getTextFilterForContainer(e,t){var d;const s=e.getAttribute("role");let a=null;if(s==="row"||e.tagName==="TR"||e.classList.contains("a-data-table__row")?a=this._getRowIdentifyingText(e):a=this._getContainerIdentifyingText(e),!a)return W("Text filter: No identifying text found"),null;const o=e.ownerDocument.querySelectorAll(t);let c=0;for(const h of o)(d=h.textContent)!=null&&d.includes(a)&&c++;return c===1?(W("Text filter: Found unique text:",a),a):(W("Text filter: Text not unique, found in",c,"containers"),null)}_getContainerIdentifyingText(e){var d;const t=this._getDirectTextContent(e);if(t&&t.length>=2&&t.length<=100&&!this._isGenericText(t))return t;const s=e.getAttribute("aria-label");if(s&&s.length>=2&&s.length<=100&&!this._isGenericText(s))return s;const a=e.querySelectorAll("span, div, p, h1, h2, h3, h4, h5, h6");for(const h of a){const f=this._getDirectTextContent(h);if(f&&f.length>=2&&f.length<=100&&!this._isGenericText(f))return f}const o=e.querySelector("[aria-label]");if(o){const h=o.getAttribute("aria-label");if(h&&h.length>=2&&h.length<=100&&!this._isGenericText(h))return h}const c=(d=e.textContent)==null?void 0:d.trim();return c&&c.length>=2&&c.length<=100&&!this._isGenericText(c)?c:null}_getRowIdentifyingText(e){var o;const t=(c,d)=>!(!c||c.length<2||c.length>100||this._isGenericText(c)||!d&&this._isDynamic(c));for(const c of[!1,!0]){for(const d of e.querySelectorAll("a")){const h=(o=d.textContent)==null?void 0:o.trim();if(t(h,c))return h}for(const d of e.querySelectorAll('[role="cell"], [role="gridcell"], td')){const h=this._getDirectTextContent(d);if(t(h,c))return h}}const s=e.querySelector("[data-testid], [data-test-id]");if(s){const c=this._getTestId(s);if(c&&!this._isDynamic(c)&&!/^(item|row|cell|grid)/i.test(c))return c}const a=e.querySelector('[aria-label*="menu for"], [aria-label*="actions for"]');if(a){const c=a.getAttribute("aria-label"),d=c==null?void 0:c.match(/(?:menu|actions)\s+for\s+(.+)$/i);if(d&&d[1])return d[1].trim()}return null}_getRowHasFilter(e,t){var o;if(e.getAttribute("role")!=="row"&&e.tagName!=="TR"&&!e.classList.contains("a-data-table__row"))return null;const a=e.querySelectorAll("a");for(const c of a){const d=(o=c.textContent)==null?void 0:o.trim();if(!d||d.length<2||d.length>100||this._isGenericText(d))continue;const f=`internal:role=link[name="${d.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"s]`,_=`${t} >> internal:has=${JSON.stringify(f)}`,m=this._verifySelector(_);if(m.count===1)return W("Has-filter: Found unique link text:",d),JSON.stringify(f);W("Has-filter: Link text not unique:",d,"matches:",m.count)}return null}_getRowAnchorSelector(e,t){var f,_;let s=e.parentElement;for(;s&&s!==t.ownerDocument.body&&!(s.getAttribute("role")==="row"||s.tagName==="TR");)s=s.parentElement;if(!s||s===t.ownerDocument.body)return null;let a=null;const o=this._getRole(t);if(o){const m=`internal:role=${o}`;try{const y=this._injectedScript.parseSelector(m);this._injectedScript.querySelectorAll(y,s).length===1&&(a=m)}catch{}}if(a||(a=this._generateRelativeSelector(s,t)||null),!a)return W("Row anchor: no relative selector within row"),null;const c=m=>!(!m||m.length<2||m.length>50||this._isGenericText(m)||this._isDynamic(m)||this._hasVolatileText(m));let d=s.getAttribute("aria-label");if(!d){const m=s.getAttribute("aria-labelledby");m&&(d=((_=(f=s.ownerDocument.getElementById(m))==null?void 0:f.textContent)==null?void 0:_.trim())||null)}if(c(d)){for(const m of["s","i"]){const y=`internal:role=row[name=${this._quoteCSSAttributeValue(d)}${m}] >> ${a}`;if(this._verifySelector(y).valid)return W("Row anchor: explicit row label ->",y),y}W("Row anchor: explicit row label not unique")}const h=s.querySelector('[role="rowheader"], th');if(h){const m=this._getAccessibleName(h);if(c(m)){const y=s.tagName==="TR"?"tr":'[role="row"]';for(const b of["s","i"]){const w=`internal:role=rowheader[name=${this._quoteCSSAttributeValue(m)}${b}]`,v=`${y} >> internal:has=${JSON.stringify(w)} >> ${a}`;if(this._verifySelector(v).valid)return W("Row anchor: rowheader has-filter ->",v),v}W("Row anchor: rowheader has-filter not unique")}}return null}_getDirectTextContent(e){let t="";for(const s of e.childNodes)s.nodeType===Node.TEXT_NODE&&(t+=s.textContent||"");return t.trim()}_isGenericText(e){return[/^(edit|delete|view|open|close|save|cancel|submit|ok|yes|no)$/i,/^(item|row|cell|column|header|footer)$/i,/^(loading|please wait|...)$/i,/^\d{1,5}$/,/^[\s\-_]+$/].some(s=>s.test(e))}_escapeTextFilter(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}_generateRelativeSelector(e,t){var _;if(e===t||!e.contains(t))return"";if(W("_generateRelativeSelector for:",t.tagName,t.className),["svg","path","circle","rect","line","polygon","polyline","ellipse","g","use"].includes(t.tagName.toLowerCase())){W("Target is SVG or SVG child, walking up to find clickable ancestor");const m=this._findClickableAncestor(e,t);m&&(W("Found clickable ancestor:",m.tagName,m.className),t=m)}const a=this._getTestId(t);if(a&&!this._isFragileTestId(a))return this._buildTestIdSelector(t,a);const o=this._getRole(t),c=t.getAttribute("aria-label");if(o&&c){const y=t.getAttribute("role")?`[role=${this._quoteCSSAttributeValue(o)}][aria-label=${this._quoteCSSAttributeValue(c)}]`:`internal:role=${o}[name=${this._quoteCSSAttributeValue(c)}i]`;try{const b=this._injectedScript.parseSelector(y),w=this._injectedScript.querySelectorAll(b,e);if(w.length===1)return W("Strategy 2: role+aria-label ->",y),y;W("Strategy 2: not unique in container, matches:",w.length)}catch{W("Strategy 2: selector parse failed for",y)}}if(o){const m=`[role=${this._quoteCSSAttributeValue(o)}]`;if(e.querySelectorAll(m).length===1)return m}if(c){const m=`[aria-label=${this._quoteCSSAttributeValue(c)}]`;if(e.querySelectorAll(m).length===1)return m}if(o==="button"||o==="link"||o==="cell"||o==="gridcell"||o==="columnheader"||o==="rowheader"){const m=this._getAccessibleName(t);if(m&&m.length>=2&&m.length<=50&&!this._isGenericText(m)&&!this._isDynamic(m)){const y=`internal:role=${o}[name=${this._quoteCSSAttributeValue(m)}i]`;try{const b=this._injectedScript.parseSelector(y),w=this._injectedScript.querySelectorAll(b,e);if(w.length===1)return W("Strategy 4b: role with accessible name ->",y),y;W("Strategy 4b: not unique in container, matches:",w.length)}catch{W("Strategy 4b: selector parse failed")}}}if(t.tagName==="INPUT"){const m=e.querySelectorAll("input");if(W("Input strategy: found",m.length,"inputs in container"),m.length===1)return W("Using input selector (single input in container)"),"input";const y=t.type||"text",b=`input[type=${this._quoteCSSAttributeValue(y)}]`;return e.querySelectorAll(b).length===1?(W("Using input[type] selector"),b):(W("Multiple inputs found, using input anyway for form container"),"input")}if(e.tagName==="TR"){const m=t.tagName==="TD"?t:t.closest("td");if(m&&e.contains(m)){const y=t!==m?t.closest("a, button, input, select, textarea"):null;if(y&&m.contains(y))W("Strategy 5b: skipping, target is inside interactive element:",y.tagName);else{const w=e.querySelectorAll(":scope > td"),v=Array.from(w).indexOf(m);if(v>=0)return W("Strategy 5b: table cell column index ->",`td >> nth=${v}`),`td >> nth=${v}`}}}const d=t.tagName.toLowerCase();if(e.querySelectorAll(d).length===1)return d;const h=Array.from(t.classList);for(const m of h){if(/^(css|styled|sc|emotion|mui)-/.test(m)||/^Mui[A-Z]/.test(m)||m.length<3)continue;const y=`.${this._escapeCSS(m)}`;if(e.querySelectorAll(y).length===1)return y}const f=(_=t.textContent)==null?void 0:_.trim();if(f&&f.length>=2&&f.length<=100){const m=f.replace(/\s+/g," ");if(!this._isGenericText(m)){const y=`internal:text="${this._escapeTextFilter(m)}"i`;try{const b=this._injectedScript.parseSelector(y),w=this._injectedScript.querySelectorAll(b,e);if(w.length===1)return W("Strategy 8: text content filter ->",y),y;W("Strategy 8: text not unique in container, matches:",w.length)}catch{W("Strategy 8: selector parse failed")}}}return""}_findClickableAncestor(e,t){let s=t.parentElement;const a=["img","presentation","none","graphics-symbol"];for(;s&&s!==e&&e.contains(s);){const o=s.getAttribute("data-testid")||s.getAttribute("data-test-id"),c=s.getAttribute("role"),d=c&&!a.includes(c),h=s.getAttribute("aria-label"),f=["BUTTON","A","INPUT","SELECT"].includes(s.tagName),_=s.hasAttribute("onclick")||s.hasAttribute("data-click");if(o||d||h&&f||f||_)return W("_findClickableAncestor found:",s.tagName,"testid:",o,"role:",c,"isClickable:",f),s;s=s.parentElement}return null}_hasVolatileText(e){return rf(e)}_isFragileTestId(e){return this._isDynamic(e)||this._isDynamicId(e)}_isDynamic(e){if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/[-_][0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e))return!0;const t=e.match(/[-_]([0-9a-f]{8,})$/i);return!!(t&&/[0-9]/.test(t[1])||/^\d{6,}$/.test(e)||/^\d{10,13}$/.test(e))}_getRole(e){var o;const t=e.getAttribute("role");if(t)return t;const s=e.tagName.toLowerCase(),a={button:"button",a:"link",select:"combobox",textarea:"textbox",img:"img",tr:"row",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading"};if(s==="input"){const c=((o=e.type)==null?void 0:o.toLowerCase())||"text";return{checkbox:"checkbox",radio:"radio",button:"button",submit:"button"}[c]||"textbox"}if(s==="td"){const c=e.closest("table"),d=c==null?void 0:c.getAttribute("role");return d==="grid"||d==="treegrid"?"gridcell":"cell"}return s==="th"?lt(e):a[s]||null}_verifySelector(e){try{const t=this._injectedScript.parseSelector(e),s=this._injectedScript.querySelectorAll(t,this._injectedScript.document);return{valid:s.length===1,count:s.length,elements:Array.from(s)}}catch{return{valid:!1,count:0,elements:[]}}}_generateAlternativeSelector(e,t){var d;W("_generateAlternativeSelector for:",e.tagName,"original:",t);const s=e.tagName.toUpperCase();let a=null;if(s==="INPUT"||s==="TEXTAREA"||s==="SELECT"){const h=e.getAttribute("name");h&&!this._isDynamic(h)&&(a=`${s.toLowerCase()}[name=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 1: name attribute ->",a))}if(!a){const h=e.getAttribute("aria-label");h&&h.length>=2&&h.length<=100&&(a=`[aria-label=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 2: aria-label ->",a))}if(!a&&(s==="INPUT"||s==="TEXTAREA")){const h=e.placeholder;h&&h.length>=2&&h.length<=100&&(a=`${s.toLowerCase()}[placeholder=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 3: placeholder ->",a))}if(!a&&s==="INPUT"){const h=e.type||"text";if(["email","password","tel","url","search","number","date","time","datetime-local","month","week","color","file"].includes(h)){const _=`input[type=${this._quoteCSSAttributeValue(h)}]`;this._verifySelector(_).valid&&(a=_,W("Alternative strategy 4: unique input type ->",a))}}if(!a&&(s==="BUTTON"||s==="INPUT"&&e.type==="submit")){const h=(d=e.textContent)==null?void 0:d.trim();h&&h.length>=2&&h.length<=50&&!this._isGenericText(h)&&(a=`internal:role=button[name=${this._quoteCSSAttributeValue(h)}i]`,W("Alternative strategy 5: button text ->",a))}if(!a){const h=this._getRole(e),f=h?this._getAccessibleName(e):null;h&&f&&f.length>=2&&f.length<=50&&!this._isGenericText(f)&&!this._isDynamic(f)&&(a=`internal:role=${h}[name=${this._quoteCSSAttributeValue(f)}i]`,W("Alternative strategy 5b: role+name ->",a))}if(!a){const h=e.getAttribute("title");h&&h.length>=2&&h.length<=100&&(a=`[title=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 6: title ->",a))}if(!a)return W("No alternative selector found"),null;const o=this._verifySelector(a);if(W("Alternative verification:",o.valid?"PASS":"FAIL","| Matches:",o.count),!o.valid)if(o.count>1&&s){const h=`${s.toLowerCase()}${a.startsWith("[")?a:" "+a}`;if(this._verifySelector(h).valid)a=h,W("Made unique by adding tag:",a);else return W("Alternative selector not unique, rejecting"),null}else return W("Alternative selector not unique, rejecting"),null;const c={selector:a,container:null,elements:o.elements,strategy:"alternative",description:`Alternative selector for dynamic ID: ${t} -> ${a}`,containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0};return jh({"Original (unstable)":t,"Alternative (stable)":a,Strategy:"alternative",Reason:"Dynamic ID without container"}),c}_tryLinkSelector(e,t){W("_tryLinkSelector checking:",e.tagName);const s=this._findLinkElement(e);if(!s)return W("No link element found"),null;W("Found link element:",s.tagName,"href:",s.getAttribute("href"));let a=null;const o=s.getAttribute("href");if(o&&this._isStableHref(o)){const h=`a[href=${this._quoteCSSAttributeValue(o)}]`,f=this._verifySelector(h);f.valid?(a=h,W("Strategy 7: href selector ->",a)):W("Strategy 7: href not unique, matches:",f.count)}if(!a){const h=this._getAccessibleName(s);if(h&&h.length>=2&&h.length<=50){const f=`internal:role=link[name=${this._quoteCSSAttributeValue(h)}i]`,_=this._verifySelector(f);if(_.valid)a=f,W("Strategy 8: role=link with name ->",a);else if(W("Strategy 8: role=link not unique, matches:",_.count),_.count>1){const m=`internal:role=link[name=${this._quoteCSSAttributeValue(h)}]`;this._verifySelector(m).valid&&(a=m,W("Strategy 8b: role=link with exact name ->",a))}}}if(!a)return W("No suitable link selector found"),null;const c=this._verifySelector(a),d={selector:a,container:null,elements:c.elements,strategy:"alternative",description:`Link selector: ${t} -> ${a}`,containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0};return jh({Original:t,"Link selector":a,Strategy:"link-based (7/8)",Element:s.tagName}),d}_findLinkElement(e){let t=e,s=0;const a=3;for(;t&&s<=a;){if(t.tagName==="A")return t;t.getAttribute("role"),t=t.parentElement,s++}return null}_isStableHref(e){return!(!e||e==="#"||e.startsWith("javascript:")||this._isDynamic(e)||/[a-f0-9]{32,}/i.test(e)||/\/\d{6,}(\/|$)/.test(e))}_getAccessibleName(e){var o,c;const t=e.getAttribute("aria-label");if(t&&t.trim())return t.trim();const s=e.getAttribute("aria-labelledby");if(s){const d=e.ownerDocument.getElementById(s);if(d){const h=(o=d.textContent)==null?void 0:o.trim();if(h)return h}}const a=(c=e.textContent)==null?void 0:c.trim();return a&&a.length<=100?a.replace(/\s+/g," "):null}}function df(i){return typeof CSS<"u"&&CSS.escape?CSS.escape(i):i.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Ov(i){return`"${i.replace(/["\\]/g,e=>"\\"+e)}"`}function bo(i,e,t,s){return new KC(i).applyScopingHook(e,t,s)}class JC{constructor(e){this._enabled=!1,this._savedButtonRoles=new Map,this._hiddenDuplicateButtons=[],this._document=e}get enabled(){return this._enabled}toggle(){this._enabled=!this._enabled,this._enabled?this._enableNestedElementAccess():this._disableNestedElementAccess()}_enableNestedElementAccess(){this._document.querySelectorAll('[role="button"]').forEach(t=>{const s=t.getAttribute("role");t.children.length>0&&s&&(this._savedButtonRoles.set(t,s),t.removeAttribute("role"),t.querySelectorAll("button").forEach(o=>{this._createDuplicateButton(o,t)}))})}_disableNestedElementAccess(){this._savedButtonRoles.forEach((e,t)=>{t.setAttribute("role",e)}),this._savedButtonRoles.clear(),this._hiddenDuplicateButtons.forEach(e=>{e.remove()}),this._hiddenDuplicateButtons=[]}_createDuplicateButton(e,t){var d;const s=e.getAttribute("aria-label"),a=(d=e.textContent)==null?void 0:d.trim();if(!(s||a))return;const c=this._document.createElement("button");c.textContent=(a||"")+" dup",s&&c.setAttribute("aria-label",s+" dup"),c.style.cssText="position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; pointer-events: none !important;",c.setAttribute("tabindex","-1"),c.setAttribute("data-pw-nested-button-duplicate","true"),c.disabled=!0,t.appendChild(c),this._hiddenDuplicateButtons.push(c)}handleNestedClick(e,t,s,a){let o=null;if(t.elements&&t.elements.length>0&&(o=t.elements[0]),!(o&&e!==o&&o.contains(e)))return this._isInsideButtonWrapperWithNativeInput(e)?{targetSelector:t.selector,shouldAutoDisable:!0}:null;const d=o.getAttribute("role");if(d!=="checkbox"&&d!=="radio"&&!this._isInsideButtonWrapperWithNativeInput(o))return null;const h=s.generateSelector(e,{testIdAttributeName:a});let f;if(h.selector===t.selector){const _=this._buildChildSelector(e,o,a);if(!_)return null;f=`${t.selector} >> ${_}`}else{const _=t.selector,m=h.selector;_&&m&&!m.startsWith(_)&&!m.includes(">>")?f=`${_} >> ${m}`:f=m}return{targetSelector:f,shouldAutoDisable:!0}}_buildChildSelector(e,t,s){const a=d=>d.tagName.toLowerCase()==="svg",o=d=>{const h=d.tagName.toLowerCase();return h==="path"||h==="g"||h==="circle"||h==="rect"||h==="polygon"||h==="line"||h==="polyline"||h==="ellipse"};let c=e;if(o(e)){let d=e.parentElement;for(;d&&d!==t;){if(a(d)&&d.classList.length>0&&Array.from(d.classList).some(f=>f.includes("chevron")||f.includes("icon")||f.includes("expandable"))){c=d;break}if(!a(d)&&!o(d)&&d.classList.length>0){c=d;break}d=d.parentElement}}else if(a(e)&&e.classList.length===0){let d=e.parentElement;for(;d&&d!==t;){if(d.classList.length>0){c=d;break}d=d.parentElement}}if(c.hasAttribute(s)){const d=c.getAttribute(s)||"";return`[${s}=${Ov(d)}]`}if(c.classList.length>0){const d=Array.from(c.classList),h=d.filter(f=>f.includes("expand")||f.includes("chevron")||f.includes("badge")||f.includes("checkmark")||f.includes("heading")||f.includes("status")||f.includes("icon")||f.includes("button")||f.includes("title"));if(h.length>0){const f=h.find(_=>_.includes("chevron")||_.includes("checkmark")||_.includes("badge"))||h[0];return"."+df(f)}else if(d.length>0)return"."+df(d[0])}return c.tagName.toLowerCase()}_isInsideButtonWrapperWithNativeInput(e){let t=e;for(;t;){if(this._savedButtonRoles.has(t))return!!t.querySelector('input[type="checkbox"], input[type="radio"]');t=t.parentElement}return!1}cleanup(){this._enabled&&(this._disableNestedElementAccess(),this._enabled=!1)}}class Rr{constructor(e){this._pdfDoc=null,this._canvasElements=[],this._thumbnailElements=[],this._isRendering=!1,this._toolbar=null,this._sidebar=null,this._mainContent=null,this._currentPage=1,this._pageDisplay=null,this._zoomDisplay=null,this._currentZoom=1,this._rotation=0,this._pdfDataUrl="",this._filename="Document.pdf",this._moreMenuElement=null,this._moreMenuCleanup=null,this._twoPageView=!1,this._annotationsVisible=!0,this._container=e}static async loadPdfJs(){if(window.pdfjsLib)return;console.log("[PDF.js] Loading PDF.js library from CDN...");const e=document.createElement("script");return e.src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js",new Promise((t,s)=>{e.onload=()=>{if(!window.pdfjsLib){s(new Error("PDF.js loaded but pdfjsLib not available"));return}window.pdfjsLib.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js",console.log("[PDF.js] ✅ PDF.js library loaded successfully"),t()},e.onerror=()=>s(new Error("Failed to load PDF.js from CDN")),document.head.appendChild(e)})}async renderPdf(e){const{pdfDataUrl:t,filename:s,onReady:a,onError:o}=e;try{this._pdfDataUrl=t,this._filename=s||"Document.pdf",await Rr.loadPdfJs(),console.log("[PDF.js] Rendering PDF..."),this._isRendering=!0;const c=window.pdfjsLib.getDocument(t);this._pdfDoc=await c.promise,console.log(`[PDF.js] PDF loaded: ${this._pdfDoc.numPages} pages`),document.documentElement&&(document.documentElement.style.height="auto"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.width="100%",document.body.style.height="auto",document.body.style.overflow="auto"),this._container.innerHTML="",this._canvasElements=[],this._thumbnailElements=[],this._container.style.cssText=`
135
+ `}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-layers"},children:[{tagName:"path",attrs:{d:"M8 2L2 5v1l6 3 6-3V5L8 2zm0 1.18L11.82 5 8 6.82 4.18 5 8 3.18zM2 7.13V8l6 3 6-3v-.87L8 10.2 2 7.13zM2 10.13V11l6 3 6-3v-.87L8 13.2 2 10.13z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-list-tree"},children:[{tagName:"path",attrs:{d:"M2 3.5C2 3.22386 2.22386 3 2.5 3H13.5C13.7761 3 14 3.22386 14 3.5C14 3.77614 13.7761 4 13.5 4H6V6H13.5C13.7761 6 14 6.22386 14 6.5C14 6.77614 13.7761 7 13.5 7H6V9H13.5C13.7761 9 14 9.22386 14 9.5C14 9.77614 13.7761 10 13.5 10H6V12H13.5C13.7761 12 14 12.2239 14 12.5C14 12.7761 13.7761 13 13.5 13H5.5C5.22386 13 5 12.7761 5 12.5V4H2.5C2.22386 4 2 3.77614 2 3.5Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-brackets"},children:[{tagName:"path",attrs:{d:"M4.5 2H2v12h2.5v-1H3V3h1.5V2zm7 0H14v12h-2.5v-1H13V3h-1.5V2zM6 5h4v1H6V5zm0 3h4v1H6V8zm0 3h4v1H6v-1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-braces"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 3.5C3 2.67 3.67 2 4.5 2H5v1h-.5c-.28 0-.5.22-.5.5v3c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5v3c0 .28.22.5.5.5H5v1h-.5C3.67 14 3 13.33 3 12.5v-3c0-.28-.22-.5-.5-.5H2V8h.5c.28 0 .5-.22.5-.5v-3zm10 0C13 2.67 12.33 2 11.5 2H11v1h.5c.28 0 .5.22.5.5v3c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5v3c0 .28-.22.5-.5.5H11v1h.5c.83 0 1.5-.67 1.5-1.5v-3c0-.28.22-.5.5-.5H14V8h-.5c-.28 0-.5-.22-.5-.5v-3z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-braces-dashes"},children:[{tagName:"path",attrs:{d:"M3 3.5C3 2.67 3.67 2 4.5 2H5v1h-.5c-.28 0-.5.22-.5.5v3c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5v3c0 .28.22.5.5.5H5v1h-.5C3.67 14 3 13.33 3 12.5v-3c0-.28-.22-.5-.5-.5H2V8h.5c.28 0 .5-.22.5-.5v-3zm10 0C13 2.67 12.33 2 11.5 2H11v1h.5c.28 0 .5.22.5.5v3c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5v3c0 .28-.22.5-.5.5H11v1h.5c.83 0 1.5-.67 1.5-1.5v-3c0-.28.22-.5.5-.5H14V8h-.5c-.28 0-.5-.22-.5-.5v-3zM6 5h4v1H6V5zm0 3h4v1H6V8zm0 3h4v1H6v-1z"}}]},{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"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-snapshot"},children:[{tagName:"path",attrs:{d:"M2 1.5l.5-.5h7.72l.35.14 3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13zm1 .5v12h10V6H9.5L9 5.5V2H3zm7 0v3h3l-3-3z"}},{tagName:"path",attrs:{fill:"none",stroke:"currentColor","stroke-width":"0.8",transform:"rotate(7 8 8.7)",d:"M 10 5.2 C 8 5.2, 6 5.7, 6 7.2 C 6 8.7, 7.5 8.7, 8 8.7 C 8.5 8.7, 10 8.7, 10 10.2 C 10 11.7, 8 12.2, 6 12.2"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-move"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.5 2.5V5.5H7.5V2.5L6.20711 3.79289L5.5 3.08579L8 0.585786L10.5 3.08579L9.79289 3.79289L8.5 2.5ZM7.5 10.5V13.5L6.20711 12.2071L5.5 12.9142L8 15.4142L10.5 12.9142L9.79289 12.2071L8.5 13.5V10.5H7.5ZM10.5 8.5H13.5L12.2071 9.79289L12.9142 10.5L15.4142 8L12.9142 5.5L12.2071 6.20711L13.5 7.5H10.5V8.5ZM5.5 7.5H2.5L3.79289 6.20711L3.08579 5.5L0.585786 8L3.08579 10.5L3.79289 9.79289L2.5 8.5H5.5V7.5Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-selection"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 1H3V2H2V3H1V1ZM4 1H6V2H4V1ZM7 1H9V2H7V1ZM10 1H12V2H10V1ZM13 1H15V3H14V2H13V1ZM14 4H15V6H14V4ZM14 7H15V9H14V7ZM14 10H15V12H14V10ZM13 13V14H14V15H13H12V14H13V13H14V12H15V13V15H13ZM10 14H12V15H10V14ZM7 14H9V15H7V14ZM4 14H6V15H4V14ZM1 13H2V14H3V15H1V13ZM1 10H2V12H1V10ZM1 7H2V9H1V7ZM1 4H2V6H1V4Z"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-table"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd",d:"M2 3h12v10H2V3zm1 1v8h10V4H3z"}},{tagName:"rect",attrs:{x:"2",y:"6.33",width:"12",height:"1"}},{tagName:"rect",attrs:{x:"2",y:"9.67",width:"12",height:"1"}},{tagName:"rect",attrs:{x:"5.67",y:"3",width:"1",height:"10"}},{tagName:"rect",attrs:{x:"9.33",y:"3",width:"1",height:"10"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-file-upload"},children:[{tagName:"path",attrs:{d:"M14.5 3H7.71l-.85-.85L6.51 2h-5l-.5.5v11l.5.5h13l.5-.5v-10L14.5 3zm-.51 8.49V13h-12V7h4.49l.35-.15.86-.86H14v1.5l.001 4zm0-6.49h-6.5l-.35.15-.86.86H2v-3h4.29l.85.85.36.15H14l-.01.99z"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-eraser"},children:[{tagName:"path",attrs:{d:"M 13.54 2.70 L 11.30 0.46 C 10.68 -0.15 9.68 -0.15 9.06 0.46 L 3.34 6.18 L 1.46 8.07 C 0.85 8.68 0.85 9.68 1.46 10.30 L 3.70 12.54 C 4.01 12.84 4.41 13 4.82 13 C 5.22 13 5.63 12.84 5.93 12.54 L 7.82 10.66 L 8.26 10.21 L 13.54 4.93 C 13.84 4.64 14 4.24 14 3.82 C 14 3.39 13.84 3.00 13.54 2.70 Z M 7.37 10.21 L 5.49 12.09 C 5.12 12.46 4.51 12.46 4.15 12.09 L 1.91 9.85 C 1.54 9.48 1.54 8.88 1.91 8.51 L 3.79 6.63 L 7.37 10.21 Z M 13.09 4.49 L 7.82 9.76 L 6.03 7.97 L 4.24 6.18 L 9.51 0.91 C 9.88 0.54 10.48 0.54 10.85 0.91 L 13.09 3.15 C 13.27 3.33 13.37 3.56 13.37 3.82 C 13.37 4.07 13.27 4.31 13.09 4.49 Z"}},{tagName:"rect",attrs:{x:"1",y:"13.2",width:"12",height:"1.6"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 100 100",fill:"currentColor",id:"icon-sketch-tool"},children:[{tagName:"path",attrs:{d:"m37.68 70.594c-0.36328 0.75781-0.66406 1.5508-0.89063 2.3594-0.41406 1.4727-0.58984 3.0195-0.51562 4.5742 0.042968 0.95312-0.58984 1.7852-1.4766 2.0195l-21.281 5.707c-1.0664 0.28516-2.1602-0.34766-2.4453-1.4141-0.09375-0.35156-0.085937-0.70703 0-1.0312l5.7031-21.285c0.25781-0.96094 1.1719-1.5703 2.1289-1.4727 1.5195 0.0625 3.0273-0.11719 4.4688-0.51953 0.80859-0.22656 1.5977-0.52734 2.3594-0.89453-0.64453-0.78516-0.60156-1.9453 0.13281-2.6797l3.7227-3.7227c0.70703-0.70703 1.8086-0.77344 2.5898-0.20312l35.953-35.953c-0.57031-0.78125-0.50391-1.8828 0.20312-2.5898l3.7227-3.7227c0.70703-0.70703 1.8086-0.77344 2.5898-0.20312l6.5039-6.5039c0.78125-0.78125 2.0469-0.78125 2.8281 0l9.2891 9.2891c0.78125 0.78125 0.78125 2.0469 0 2.8281l-6.5039 6.5039c0.57031 0.78125 0.5 1.8828-0.20312 2.5859l-0.49219 0.49219 2.875 2.875c0.78125 0.78125 0.78125 2.0469 0 2.8281l-16.711 16.711c-0.78125 0.78125-2.0469 0.78125-2.8281 0s-0.78125-2.0469 0-2.8281l15.297-15.297-1.4609-1.4609-0.40234 0.40234c-0.70703 0.70703-1.8047 0.77344-2.5859 0.20312l-35.953 35.953c0.56641 0.78125 0.5 1.8828-0.20312 2.5859l-3.7227 3.7227c-0.73438 0.73438-1.8945 0.77734-2.6797 0.13281zm-9.0078-8.9961c-1.3281 0.76562-2.75 1.3594-4.2266 1.7734-1.3711 0.37891-2.7812 0.60547-4.2109 0.66406l-3.375 12.598 5.2109-5.2109c-0.18359-0.51562-0.27734-1.0547-0.27734-1.5938 0-1.1992 0.46094-2.4023 1.3789-3.3203 0.91406-0.91406 2.1211-1.375 3.3203-1.375 1.1953 0 2.3945 0.46094 3.3125 1.375 0.92187 0.92578 1.3828 2.1289 1.3828 3.3203 0 1.1406-0.41797 2.2852-1.25 3.1836-0.88672 0.96875-2.1328 1.5117-3.4453 1.5117-0.53906 0-1.0742-0.09375-1.5898-0.28125l-5.2148 5.2148 12.598-3.375c0.058594-1.4336 0.28516-2.8477 0.66406-4.2109 0.41406-1.4766 1.0078-2.8984 1.7734-4.2266l-6.0508-6.0508zm11.168 3.7227-8.8438-8.8438-0.89453 0.89453 8.8438 8.8438zm37.645-52.945 6.4609 6.4609 5.0742-5.0742-6.4609-6.4609zm-0.089844 13.012-6.4609-6.4609-35.871 35.871 6.4609 6.4609zm4.6367-2.8086-8.293-8.293c-0.12109-0.054687-0.23828-0.125-0.34766-0.20312l-0.82422 0.82422 8.8438 8.8438 0.82031-0.82031c-0.082031-0.10938-0.14844-0.23047-0.20312-0.35156zm-75.164 68.324c-0.83984-0.71094-0.94531-1.9727-0.23438-2.8125 0.71094-0.83984 1.9727-0.94531 2.8125-0.23438 11.77 10.004 24.934 4.5469 38.125-0.91797 14.867-6.1602 29.77-12.34 43.941 0.98828 0.80078 0.75391 0.83984 2.0195 0.085937 2.8203-0.75391 0.80078-2.0195 0.83984-2.8203 0.085937-12.289-11.559-26-5.875-39.676-0.20703-14.32 5.9336-28.609 11.855-42.234 0.27734zm19.625-20.375c0.23437 0 0.37891-0.09375 0.53906-0.24609 0.10156-0.125 0.15625-0.28516 0.15625-0.44922 0-0.18359-0.066406-0.36328-0.19922-0.49609-0.13281-0.13281-0.3125-0.19922-0.49609-0.19922-0.17969 0-0.35938 0.070312-0.49219 0.20312-0.13281 0.13281-0.20312 0.31641-0.20312 0.49219 0 0.17969 0.070313 0.35938 0.20312 0.49219 0.13281 0.13672 0.30078 0.20312 0.49219 0.20312z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gojs-link"},children:[{tagName:"path",attrs:{d:"M 0.75 3.5 A 1.75 1.75 0 1 0 4.25 3.5 A 1.75 1.75 0 1 0 0.75 3.5 Z"}},{tagName:"path",attrs:{d:"M 4.25 2.75 L 9.5 2.75 L 9.5 11.75 L 13 11.75 L 13 13.25 L 8 13.25 L 8 4.25 L 4.25 4.25 Z"}},{tagName:"path",attrs:{d:"M 13 11 L 15.5 12.5 L 13 14 Z"}}]}]}]},Lv="[Scoping]";function Bc(){try{if(typeof window<"u"&&window.__SKYRAMP_DEBUG__||typeof localStorage<"u"&&localStorage.getItem("SKYRAMP_DEBUG")==="true")return!0}catch{}return!1}function W(...i){Bc()&&console.log(Lv,...i)}function GC(i){Bc()&&console.group(`${Lv} ${i}`)}function Dn(){Bc()&&console.groupEnd()}function jh(i){Bc()&&console.table(i)}const XC=[/card/i,/item/i,/tile/i,/cell/i,/row(?!s)/i,/entry/i,/result/i,/post/i,/product/i,/option/i],YC=[/^col-/i,/^row$/i,/^container/i,/^px-/i,/^py-/i,/^mx-/i,/^my-/i,/^m-/i,/^p-/i,/^d-/i,/^flex/i,/^grid$/i,/^text-/i,/^bg-/i,/^border/i,/^rounded/i,/^shadow/i,/^w-/i,/^h-/i,/^css-/i,/^styled-/i,/^sc-/i,/^emotion-/i,/^MuiGrid/i,/^MuiBox/i,/--[a-f0-9]{16,}$/i,/__[a-f0-9]{16,}$/i,/_[a-f0-9]{16,}$/i,/^app-[a-z0-9]+$/i,/^e[a-z0-9]{6,}\d+$/i];class KC{constructor(e){this._injectedScript=e,W("ScopingHandler initialized (with CSS class pattern support)")}applyScopingHook(e,t,s){GC(`Analyzing: ${t}`);const a=this._needsScoping(e,t,s);if(W("Needs scoping:",a.needed,"| Reason:",a.reason),!a.needed){const v=this._tryStableIdSelector(e,t);return v?(W("Preferring stable ID selector:",v.selector),Dn(),v):(Dn(),null)}const o=this._tryStableIdSelector(e,t);if(o)return W("Using stable ID selector:",o.selector),Dn(),o;const c=this._tryLinkSelector(e,t);if(c)return W("Using link selector:",c.selector),Dn(),c;const d=this._findContainer(e);if(!d){if(W("No container found"),this._hasDynamicSelector(t)){const v=this._generateAlternativeSelector(e,t);if(v)return W("Using alternative selector:",v.selector),Dn(),v}return Dn(),null}W("Container:",d.selector);const h=this._getContainerIndex(d.element,d.selector);if(h===null)return W("Cannot determine container index"),Dn(),null;W("Container index:",h);const f=this._generateRelativeSelector(d.element,e);if(!f)return W("No relative selector found"),Dn(),null;W("Relative selector:",f);const _=this._isFormContainer(d.selector);let m,y=!1;if(_)m=`${d.selector} >> ${f}`,W("Using form container selector (no nth):",m);else{const v=this._getRowHasFilter(d.element,d.selector);if(v)m=`${d.selector} >> internal:has=${v} >> ${f}`,y=!0,W("Using has-filter selector:",m);else{const T=this._getTextFilterForContainer(d.element,d.selector);if(T)m=`${d.selector} >> internal:has-text="${this._escapeTextFilter(T)}"i >> ${f}`,y=!0,W("Using text-filtered selector:",m);else{const A=this._getRowAnchorSelector(d.element,e);A?(m=A,y=!0,W("Using row-anchored selector:",m)):(m=`${d.selector} >> nth=${h} >> ${f}`,W("Using nth-based selector:",m))}}}const b=this._verifySelector(m);if(W("Verification:",b.valid?"PASS":"FAIL","| Matches:",b.count),!b.valid)if(_&&b.count>=1)W("Form container verification relaxed - using selector despite multiple matches");else return W("Verification failed, using original"),Dn(),null;const w={selector:m,container:d.element,elements:b.elements,strategy:"nth",description:_?`${d.selector} >> ${f}`:`${d.selector}.nth(${h}) >> ${f}`,containerSelector:d.selector,containerIndex:h,relativeSelector:f,isFormContainer:_,usesTextFilter:y};return jh({Original:t,Scoped:m,Container:d.selector,Index:h,Relative:f}),Dn(),w}_needsScoping(e,t,s){if(W("Input match set:",{selector:t,count:s.length}),s.length>1)return{needed:!0,reason:`Non-unique: ${s.length} elements`};if(this._hasDynamicSelector(t))return{needed:!0,reason:"Dynamic selector needs replacement"};const a=this._hasStateDependentName(e,t);if(a.isStateDependent)return{needed:!0,reason:a.reason};const o=["gridcell","row","listitem","option","treeitem","menuitem","cell"],c=e.getAttribute("role");if(c&&o.includes(c)){const h=this._findRepeatingContainer(e);if(h)return{needed:!0,reason:`Repeating role "${c}" inside container: ${h.selector}`}}const d=e.tagName==="TD"?e:e.closest("td");if(d){const h=d.closest("tr");if(h){const f=h.parentElement;if(f&&(f.tagName==="TBODY"||f.tagName==="TABLE")){const _=f.querySelectorAll(":scope > tr");if(_.length>1)return{needed:!0,reason:`Element inside <td> in <tr> with ${_.length} sibling rows`}}}}return{needed:!1,reason:"Selector is unique and not in repeating context"}}_isDynamicId(e){if(/^react-aria\d+/.test(e)||/^mui-\d+/.test(e)||/^(mat|cdk)-[a-z]+-\d+$/.test(e)||/[-_]\d+$/.test(e)||/\d{2,}[_-][a-zA-Z]/.test(e)||/^\d+$/.test(e)||/\d{4,}$/.test(e)||/[-_][0-9a-f]{6,}$/i.test(e))return!0;const t=e.match(/[-_]([0-9a-f]{3,5})$/i);return!!(t&&/[0-9]/.test(t[1])||/[a-zA-Z][0-9]{3,}$/.test(e)||e.includes(":")||/«r[0-9a-z]*»|(^|[-_])_?r_[0-9a-z]+_/.test(e)||/^.+__search_[a-zA-Z0-9]{4,}$/.test(e))}_tryStableIdSelector(e,t){const s=e.id;if(!s||!t.startsWith("internal:role="))return null;if(this._isDynamicId(s))return W("Skipping dynamic ID:",s),null;const a=`#${CSS.escape(s)}`,o=this._verifySelector(a);return!o.valid||o.count!==1?(W("ID selector not unique:",a,"matches:",o.count),null):{selector:a,container:null,elements:o.elements,strategy:"alternative",description:"Stable ID preferred over role selector",containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0}}_hasDynamicSelector(e){if(W("_hasDynamicSelector checking:",e),/react-aria\d+/.test(e))return W("MATCHED: React-Aria dynamic ID"),!0;if(/__search_[a-zA-Z0-9]{4,}/.test(e))return W("MATCHED: Vue Tables dynamic search ID"),!0;if(/#[a-zA-Z_-]*\d+/.test(e))return W("MATCHED: Dynamic ID with numeric suffix (CSS)"),!0;if(/internal:attr=\[id="[a-zA-Z_-]*\d+"\]/.test(e))return W("MATCHED: Dynamic ID with numeric suffix (internal:attr)"),!0;if(/\[id="[a-zA-Z_-]*\d+"\]/.test(e))return W("MATCHED: Dynamic ID with numeric suffix (attribute selector)"),!0;if(/\[id="[^"]*\d{2,}[_-][a-zA-Z][^"]*"\]/.test(e))return W("MATCHED: Dynamic ID with mid-string counter (attribute selector)"),!0;if(/internal:attr=\[id="[^"]*\d{2,}[_-][a-zA-Z][^"]*"\]/.test(e))return W("MATCHED: Dynamic ID with mid-string counter (internal:attr)"),!0;if(/\.(app-[a-z0-9]+|e[a-z0-9]{6,}[0-9]+)/.test(e))return W("MATCHED: CSS-in-JS generated class (Emotion)"),!0;const t=(e.match(/>/g)||[]).length;return t>=4?(W("MATCHED: Long CSS path with",t,"child combinators"),!0):/:nth-child\(\d+\)/.test(e)?(W("MATCHED: Contains :nth-child() pattern"),!0):/\[data-testid="[^"]*[-_]\d+"\]/.test(e)||/\[data-test-id="[^"]*[-_]\d+"\]/.test(e)?(W("MATCHED: TestId with numeric suffix (attribute selector)"),!0):/getByTestId\(['"][^'"]*[-_]\d+['"]\)/.test(e)?(W("MATCHED: TestId with numeric suffix (getByTestId)"),!0):/internal:testid=.*[-_]\d+/.test(e)?(W("MATCHED: TestId with numeric suffix (internal:testid)"),!0):/\[name="\d+"[is]?\]/.test(e)||/internal:text="\d+"[is]?/.test(e)?(W("MATCHED: All-numeric text content in selector"),!0):/\[name="[^"]*\d{8,}[^"]*"/.test(e)||/internal:text="[^"]*\d{8,}[^"]*"/.test(e)?(W("MATCHED: Long digit sequence in text content (timestamp/generated)"),!0):/(?:\[name|internal:text)="\/?\d{1,2}\/\d{1,2}"/.test(e)?(W("MATCHED: Partial date pattern in text content"),!0):[...e.matchAll(/(?:\[name|internal:text)="([^"]*)"/g)].map(a=>a[1]).some(a=>this._hasVolatileText(a))?(W("MATCHED: Month-name date in text content (volatile)"),!0):(W("No dynamic patterns found"),!1)}_hasStateDependentName(e,t){const s=t.match(/internal:role=(\w+)\[name=["'](.+?)["'][is]?\]/);if(!s)return{isStateDependent:!1,reason:"Not a role selector with name"};const a=s[1],o=s[2];if(!o||o.length<3)return{isStateDependent:!1,reason:"Name too short"};W("Checking state-dependent name:",{role:a,name:o});const c=this._getSiblingAccessibleNames(e,a);if(c.length===0)return W("No siblings found for state check"),{isStateDependent:!1,reason:"No siblings with same role"};W("Sibling names:",c);for(const d of c)if(d.length>=3&&o.length>d.length&&o.toLowerCase().includes(d.toLowerCase()))return W("State-dependent name detected:",o,"contains",d),{isStateDependent:!0,reason:`Name "${o}" contains sibling name "${d}" - likely hover-dependent`};return{isStateDependent:!1,reason:"Name is unique among siblings"}}_getSiblingAccessibleNames(e,t){const s=[],a=new Set;try{const o=["ul","ol","nav",'[role="list"]','[role="navigation"]','[role="menu"]','[role="tablist"]','[role="grid"]','[role="row"]'];let c=e.parentElement,d=e.ownerDocument.body,h=0;for(;c&&h<5;){const m=c.tagName.toLowerCase(),y=c.getAttribute("role");if(o.some(b=>{var w;if(b.startsWith("[role=")){const v=(w=b.match(/\[role="(.+)"\]/))==null?void 0:w[1];return y===v}return m===b})){d=c;break}c=c.parentElement,h++}W("Sibling search scope:",d.tagName,d.className);const f=`[role="${t}"]`,_=d.querySelectorAll(f);for(const m of _){if(m===e)continue;const y=this._getAccessibleName(m);y&&y.length>=2&&!a.has(y.toLowerCase())&&(a.add(y.toLowerCase()),s.push(y))}}catch(o){W("Error getting sibling names:",o)}return s}_findRepeatingContainer(e){const t=[/^grid[-_]?view[-_]?item$/i,/^gridcell$/i,/^list[-_]?item$/i,/^row[-_]?item$/i,/^item$/i,/^card$/i,/^tile$/i],s=[/^gridview$/i,/^grid[-_]?view$/i,/^listview$/i,/^list[-_]?view$/i,/^container$/i,/^wrapper$/i,/^content$/i,/^main$/i];let a=e.parentElement;for(;a&&a!==e.ownerDocument.body;){const o=this._getTestId(a);if(o&&!s.some(f=>f.test(o))&&t.some(f=>f.test(o))){const f=this._buildTestIdSelector(a,o);if(a.ownerDocument.querySelectorAll(f).length>1)return{element:a,selector:f}}const c=a.getAttribute("role");if(c&&["row","gridcell","listitem","option","treeitem","menuitem"].includes(c)){const f=`[role=${this._quoteCSSAttributeValue(c)}]`;if(a.ownerDocument.querySelectorAll(f).length>1)return{element:a,selector:f}}const d=this._getComponentName(a);if(d&&this._isRepeatingComponentName(d.name)){const f=`[${d.attr}=${this._quoteCSSAttributeValue(d.name)}]`;try{const _=a.ownerDocument.querySelectorAll(f);if(_.length>1&&_.length<100)return W("Found component container:",d.name,"via",d.attr,"with",_.length,"siblings"),{element:a,selector:f}}catch{}}const h=this._findRepeatingContainerByClass(a);if(h)return h;a=a.parentElement}return null}_findRepeatingContainerByClass(e){const t=Array.from(e.classList);for(const s of t)if(!YC.some(a=>a.test(s))&&XC.some(a=>a.test(s))){const a=`.${this._escapeCSS(s)}`;try{const o=e.ownerDocument.querySelectorAll(a);if(o.length>1&&o.length<100){const c=e.tagName.toLowerCase();return W("Found CSS class container:",s,"with",o.length,"siblings, using tag:",c),{element:e,selector:c}}}catch{continue}}return null}_escapeCSS(e){return df(e)}_quoteCSSAttributeValue(e){return Ov(e)}_getTestId(e){return e.getAttribute("data-testid")||e.getAttribute("data-test-id")}_buildTestIdSelector(e,t){return e.getAttribute("data-testid")===t?`[data-testid=${this._quoteCSSAttributeValue(t)}]`:`[data-test-id=${this._quoteCSSAttributeValue(t)}]`}_getComponentName(e){const t=["data-component","data-sentry-component","data-react-component"];for(const s of t){const a=e.getAttribute(s);if(a)return{name:a,attr:s}}return null}_isRepeatingComponentName(e){return[/Card$/i,/Item$/i,/Link$/i,/Row$/i,/Tile$/i,/Option$/i,/Entry$/i].some(s=>s.test(e))}_findContainer(e){const t=[/^grid[-_]?view[-_]?item$/i,/^gridcell$/i,/^list[-_]?item$/i,/^row[-_]?item$/i,/^item$/i,/^card$/i,/^tile$/i],s=[/[-_]input$/i,/[-_]field$/i,/[-_]btn$/i,/[-_]button$/i,/[-_]control$/i,/^input[-_]/i,/^field[-_]/i],a=[/^gridview$/i,/^grid[-_]?view$/i,/^listview$/i,/^list[-_]?view$/i,/^container$/i,/^wrapper$/i,/^content$/i,/^main$/i];let o=e.parentElement,c=null,d=null;for(;o&&o!==e.ownerDocument.body;){const h=this._getTestId(o);if(h){if(a.some(y=>y.test(h))){o=o.parentElement;continue}const m=this._isFragileTestId(h);if(!m&&t.some(y=>y.test(h)))return{element:o,selector:this._buildTestIdSelector(o,h)};if(!m&&s.some(y=>y.test(h)))return W("Found form container by testid pattern:",h),{element:o,selector:this._buildTestIdSelector(o,h)};!c&&!m&&(c={element:o,selector:this._buildTestIdSelector(o,h)})}const f=o.getAttribute("role");if(f&&["row","gridcell","listitem","option","treeitem","menuitem"].includes(f)&&(c||(c={element:o,selector:`[role=${this._quoteCSSAttributeValue(f)}]`})),o.tagName==="TR"){const m=o.parentElement;m&&(m.tagName==="TBODY"||m.tagName==="TABLE")&&m.querySelectorAll(":scope > tr").length>1&&!c&&(c={element:o,selector:"tr"})}const _=this._getComponentName(o);if(_&&this._isRepeatingComponentName(_.name)){const m=`[${_.attr}=${this._quoteCSSAttributeValue(_.name)}]`;try{const y=o.ownerDocument.querySelectorAll(m);if(y.length>1&&y.length<100)return W("Found component container:",_.name,"via",_.attr,"with",y.length,"siblings"),{element:o,selector:m}}catch{}}if(!d){const m=this._findRepeatingContainerByClass(o);m&&(d=m)}o=o.parentElement}return c||d}_isFormContainer(e){const s=[/-input"\]$/i,/-field"\]$/i,/-btn"\]$/i,/-button"\]$/i,/-control"\]$/i,/\[data-test-?id="input-/i,/\[data-test-?id="field-/i].some(a=>a.test(e));return W("_isFormContainer:",e,"=",s),s}_getContainerIndex(e,t){try{const s=e.ownerDocument.querySelectorAll(t),a=Array.from(s).indexOf(e);return a!==-1?a:null}catch{return null}}_getTextFilterForContainer(e,t){var d;const s=e.getAttribute("role");let a=null;if(s==="row"||e.tagName==="TR"||e.classList.contains("a-data-table__row")?a=this._getRowIdentifyingText(e):a=this._getContainerIdentifyingText(e),!a)return W("Text filter: No identifying text found"),null;const o=e.ownerDocument.querySelectorAll(t);let c=0;for(const h of o)(d=h.textContent)!=null&&d.includes(a)&&c++;return c===1?(W("Text filter: Found unique text:",a),a):(W("Text filter: Text not unique, found in",c,"containers"),null)}_getContainerIdentifyingText(e){var d;const t=this._getDirectTextContent(e);if(t&&t.length>=2&&t.length<=100&&!this._isGenericText(t))return t;const s=e.getAttribute("aria-label");if(s&&s.length>=2&&s.length<=100&&!this._isGenericText(s))return s;const a=e.querySelectorAll("span, div, p, h1, h2, h3, h4, h5, h6");for(const h of a){const f=this._getDirectTextContent(h);if(f&&f.length>=2&&f.length<=100&&!this._isGenericText(f))return f}const o=e.querySelector("[aria-label]");if(o){const h=o.getAttribute("aria-label");if(h&&h.length>=2&&h.length<=100&&!this._isGenericText(h))return h}const c=(d=e.textContent)==null?void 0:d.trim();return c&&c.length>=2&&c.length<=100&&!this._isGenericText(c)?c:null}_getRowIdentifyingText(e){var o;const t=(c,d)=>!(!c||c.length<2||c.length>100||this._isGenericText(c)||!d&&this._isDynamic(c));for(const c of[!1,!0]){for(const d of e.querySelectorAll("a")){const h=(o=d.textContent)==null?void 0:o.trim();if(t(h,c))return h}for(const d of e.querySelectorAll('[role="cell"], [role="gridcell"], td')){const h=this._getDirectTextContent(d);if(t(h,c))return h}}const s=e.querySelector("[data-testid], [data-test-id]");if(s){const c=this._getTestId(s);if(c&&!this._isDynamic(c)&&!/^(item|row|cell|grid)/i.test(c))return c}const a=e.querySelector('[aria-label*="menu for"], [aria-label*="actions for"]');if(a){const c=a.getAttribute("aria-label"),d=c==null?void 0:c.match(/(?:menu|actions)\s+for\s+(.+)$/i);if(d&&d[1])return d[1].trim()}return null}_getRowHasFilter(e,t){var o;if(e.getAttribute("role")!=="row"&&e.tagName!=="TR"&&!e.classList.contains("a-data-table__row"))return null;const a=e.querySelectorAll("a");for(const c of a){const d=(o=c.textContent)==null?void 0:o.trim();if(!d||d.length<2||d.length>100||this._isGenericText(d))continue;const f=`internal:role=link[name="${d.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"s]`,_=`${t} >> internal:has=${JSON.stringify(f)}`,m=this._verifySelector(_);if(m.count===1)return W("Has-filter: Found unique link text:",d),JSON.stringify(f);W("Has-filter: Link text not unique:",d,"matches:",m.count)}return null}_getRowAnchorSelector(e,t){var f,_;let s=e.parentElement;for(;s&&s!==t.ownerDocument.body&&!(s.getAttribute("role")==="row"||s.tagName==="TR");)s=s.parentElement;if(!s||s===t.ownerDocument.body)return null;let a=null;const o=this._getRole(t);if(o){const m=`internal:role=${o}`;try{const y=this._injectedScript.parseSelector(m);this._injectedScript.querySelectorAll(y,s).length===1&&(a=m)}catch{}}if(a||(a=this._generateRelativeSelector(s,t)||null),!a)return W("Row anchor: no relative selector within row"),null;const c=m=>!(!m||m.length<2||m.length>50||this._isGenericText(m)||this._isDynamic(m)||this._hasVolatileText(m));let d=s.getAttribute("aria-label");if(!d){const m=s.getAttribute("aria-labelledby");m&&(d=((_=(f=s.ownerDocument.getElementById(m))==null?void 0:f.textContent)==null?void 0:_.trim())||null)}if(c(d)){for(const m of["s","i"]){const y=`internal:role=row[name=${this._quoteCSSAttributeValue(d)}${m}] >> ${a}`;if(this._verifySelector(y).valid)return W("Row anchor: explicit row label ->",y),y}W("Row anchor: explicit row label not unique")}const h=s.querySelector('[role="rowheader"], th');if(h){const m=this._getAccessibleName(h);if(c(m)){const y=s.tagName==="TR"?"tr":'[role="row"]';for(const b of["s","i"]){const w=`internal:role=rowheader[name=${this._quoteCSSAttributeValue(m)}${b}]`,v=`${y} >> internal:has=${JSON.stringify(w)} >> ${a}`;if(this._verifySelector(v).valid)return W("Row anchor: rowheader has-filter ->",v),v}W("Row anchor: rowheader has-filter not unique")}}return null}_getDirectTextContent(e){let t="";for(const s of e.childNodes)s.nodeType===Node.TEXT_NODE&&(t+=s.textContent||"");return t.trim()}_isGenericText(e){return[/^(edit|delete|view|open|close|save|cancel|submit|ok|yes|no)$/i,/^(item|row|cell|column|header|footer)$/i,/^(loading|please wait|...)$/i,/^\d{1,5}$/,/^[\s\-_]+$/].some(s=>s.test(e))}_escapeTextFilter(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}_generateRelativeSelector(e,t){var _;if(e===t||!e.contains(t))return"";if(W("_generateRelativeSelector for:",t.tagName,t.className),["svg","path","circle","rect","line","polygon","polyline","ellipse","g","use"].includes(t.tagName.toLowerCase())){W("Target is SVG or SVG child, walking up to find clickable ancestor");const m=this._findClickableAncestor(e,t);m&&(W("Found clickable ancestor:",m.tagName,m.className),t=m)}const a=this._getTestId(t);if(a&&!this._isFragileTestId(a))return this._buildTestIdSelector(t,a);const o=this._getRole(t),c=t.getAttribute("aria-label");if(o&&c){const y=t.getAttribute("role")?`[role=${this._quoteCSSAttributeValue(o)}][aria-label=${this._quoteCSSAttributeValue(c)}]`:`internal:role=${o}[name=${this._quoteCSSAttributeValue(c)}i]`;try{const b=this._injectedScript.parseSelector(y),w=this._injectedScript.querySelectorAll(b,e);if(w.length===1)return W("Strategy 2: role+aria-label ->",y),y;W("Strategy 2: not unique in container, matches:",w.length)}catch{W("Strategy 2: selector parse failed for",y)}}if(o){const m=`[role=${this._quoteCSSAttributeValue(o)}]`;if(e.querySelectorAll(m).length===1)return m}if(c){const m=`[aria-label=${this._quoteCSSAttributeValue(c)}]`;if(e.querySelectorAll(m).length===1)return m}if(o==="button"||o==="link"||o==="cell"||o==="gridcell"||o==="columnheader"||o==="rowheader"){const m=this._getAccessibleName(t);if(m&&m.length>=2&&m.length<=50&&!this._isGenericText(m)&&!this._isDynamic(m)){const y=`internal:role=${o}[name=${this._quoteCSSAttributeValue(m)}i]`;try{const b=this._injectedScript.parseSelector(y),w=this._injectedScript.querySelectorAll(b,e);if(w.length===1)return W("Strategy 4b: role with accessible name ->",y),y;W("Strategy 4b: not unique in container, matches:",w.length)}catch{W("Strategy 4b: selector parse failed")}}}if(t.tagName==="INPUT"){const m=e.querySelectorAll("input");if(W("Input strategy: found",m.length,"inputs in container"),m.length===1)return W("Using input selector (single input in container)"),"input";const y=t.type||"text",b=`input[type=${this._quoteCSSAttributeValue(y)}]`;return e.querySelectorAll(b).length===1?(W("Using input[type] selector"),b):(W("Multiple inputs found, using input anyway for form container"),"input")}if(e.tagName==="TR"){const m=t.tagName==="TD"?t:t.closest("td");if(m&&e.contains(m)){const y=t!==m?t.closest("a, button, input, select, textarea"):null;if(y&&m.contains(y))W("Strategy 5b: skipping, target is inside interactive element:",y.tagName);else{const w=e.querySelectorAll(":scope > td"),v=Array.from(w).indexOf(m);if(v>=0)return W("Strategy 5b: table cell column index ->",`td >> nth=${v}`),`td >> nth=${v}`}}}const d=t.tagName.toLowerCase();if(e.querySelectorAll(d).length===1)return d;const h=Array.from(t.classList);for(const m of h){if(/^(css|styled|sc|emotion|mui)-/.test(m)||/^Mui[A-Z]/.test(m)||m.length<3)continue;const y=`.${this._escapeCSS(m)}`;if(e.querySelectorAll(y).length===1)return y}const f=(_=t.textContent)==null?void 0:_.trim();if(f&&f.length>=2&&f.length<=100){const m=f.replace(/\s+/g," ");if(!this._isGenericText(m)){const y=`internal:text="${this._escapeTextFilter(m)}"i`;try{const b=this._injectedScript.parseSelector(y),w=this._injectedScript.querySelectorAll(b,e);if(w.length===1)return W("Strategy 8: text content filter ->",y),y;W("Strategy 8: text not unique in container, matches:",w.length)}catch{W("Strategy 8: selector parse failed")}}}return""}_findClickableAncestor(e,t){let s=t.parentElement;const a=["img","presentation","none","graphics-symbol"];for(;s&&s!==e&&e.contains(s);){const o=s.getAttribute("data-testid")||s.getAttribute("data-test-id"),c=s.getAttribute("role"),d=c&&!a.includes(c),h=s.getAttribute("aria-label"),f=["BUTTON","A","INPUT","SELECT"].includes(s.tagName),_=s.hasAttribute("onclick")||s.hasAttribute("data-click");if(o||d||h&&f||f||_)return W("_findClickableAncestor found:",s.tagName,"testid:",o,"role:",c,"isClickable:",f),s;s=s.parentElement}return null}_hasVolatileText(e){return rf(e)}_isFragileTestId(e){return this._isDynamic(e)||this._isDynamicId(e)}_isDynamic(e){if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/[-_][0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e))return!0;const t=e.match(/[-_]([0-9a-f]{8,})$/i);return!!(t&&/[0-9]/.test(t[1])||/^\d{6,}$/.test(e)||/^\d{10,13}$/.test(e))}_getRole(e){var o;const t=e.getAttribute("role");if(t)return t;const s=e.tagName.toLowerCase(),a={button:"button",a:"link",select:"combobox",textarea:"textbox",img:"img",tr:"row",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading"};if(s==="input"){const c=((o=e.type)==null?void 0:o.toLowerCase())||"text";return{checkbox:"checkbox",radio:"radio",button:"button",submit:"button"}[c]||"textbox"}if(s==="td"){const c=e.closest("table"),d=c==null?void 0:c.getAttribute("role");return d==="grid"||d==="treegrid"?"gridcell":"cell"}return s==="th"?lt(e):a[s]||null}_verifySelector(e){try{const t=this._injectedScript.parseSelector(e),s=this._injectedScript.querySelectorAll(t,this._injectedScript.document);return{valid:s.length===1,count:s.length,elements:Array.from(s)}}catch{return{valid:!1,count:0,elements:[]}}}_generateAlternativeSelector(e,t){var d;W("_generateAlternativeSelector for:",e.tagName,"original:",t);const s=e.tagName.toUpperCase();let a=null;if(s==="INPUT"||s==="TEXTAREA"||s==="SELECT"){const h=e.getAttribute("name");h&&!this._isDynamic(h)&&(a=`${s.toLowerCase()}[name=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 1: name attribute ->",a))}if(!a){const h=e.getAttribute("aria-label");h&&h.length>=2&&h.length<=100&&(a=`[aria-label=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 2: aria-label ->",a))}if(!a&&(s==="INPUT"||s==="TEXTAREA")){const h=e.placeholder;h&&h.length>=2&&h.length<=100&&(a=`${s.toLowerCase()}[placeholder=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 3: placeholder ->",a))}if(!a&&s==="INPUT"){const h=e.type||"text";if(["email","password","tel","url","search","number","date","time","datetime-local","month","week","color","file"].includes(h)){const _=`input[type=${this._quoteCSSAttributeValue(h)}]`;this._verifySelector(_).valid&&(a=_,W("Alternative strategy 4: unique input type ->",a))}}if(!a&&(s==="BUTTON"||s==="INPUT"&&e.type==="submit")){const h=(d=e.textContent)==null?void 0:d.trim();h&&h.length>=2&&h.length<=50&&!this._isGenericText(h)&&(a=`internal:role=button[name=${this._quoteCSSAttributeValue(h)}i]`,W("Alternative strategy 5: button text ->",a))}if(!a){const h=this._getRole(e),f=h?this._getAccessibleName(e):null;h&&f&&f.length>=2&&f.length<=50&&!this._isGenericText(f)&&!this._isDynamic(f)&&(a=`internal:role=${h}[name=${this._quoteCSSAttributeValue(f)}i]`,W("Alternative strategy 5b: role+name ->",a))}if(!a){const h=e.getAttribute("title");h&&h.length>=2&&h.length<=100&&(a=`[title=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 6: title ->",a))}if(!a)return W("No alternative selector found"),null;const o=this._verifySelector(a);if(W("Alternative verification:",o.valid?"PASS":"FAIL","| Matches:",o.count),!o.valid)if(o.count>1&&s){const h=`${s.toLowerCase()}${a.startsWith("[")?a:" "+a}`;if(this._verifySelector(h).valid)a=h,W("Made unique by adding tag:",a);else return W("Alternative selector not unique, rejecting"),null}else return W("Alternative selector not unique, rejecting"),null;const c={selector:a,container:null,elements:o.elements,strategy:"alternative",description:`Alternative selector for dynamic ID: ${t} -> ${a}`,containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0};return jh({"Original (unstable)":t,"Alternative (stable)":a,Strategy:"alternative",Reason:"Dynamic ID without container"}),c}_tryLinkSelector(e,t){W("_tryLinkSelector checking:",e.tagName);const s=this._findLinkElement(e);if(!s)return W("No link element found"),null;W("Found link element:",s.tagName,"href:",s.getAttribute("href"));let a=null;const o=s.getAttribute("href");if(o&&this._isStableHref(o)){const h=`a[href=${this._quoteCSSAttributeValue(o)}]`,f=this._verifySelector(h);f.valid?(a=h,W("Strategy 7: href selector ->",a)):W("Strategy 7: href not unique, matches:",f.count)}if(!a){const h=this._getAccessibleName(s);if(h&&h.length>=2&&h.length<=50){const f=`internal:role=link[name=${this._quoteCSSAttributeValue(h)}i]`,_=this._verifySelector(f);if(_.valid)a=f,W("Strategy 8: role=link with name ->",a);else if(W("Strategy 8: role=link not unique, matches:",_.count),_.count>1){const m=`internal:role=link[name=${this._quoteCSSAttributeValue(h)}]`;this._verifySelector(m).valid&&(a=m,W("Strategy 8b: role=link with exact name ->",a))}}}if(!a)return W("No suitable link selector found"),null;const c=this._verifySelector(a),d={selector:a,container:null,elements:c.elements,strategy:"alternative",description:`Link selector: ${t} -> ${a}`,containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0};return jh({Original:t,"Link selector":a,Strategy:"link-based (7/8)",Element:s.tagName}),d}_findLinkElement(e){let t=e,s=0;const a=3;for(;t&&s<=a;){if(t.tagName==="A")return t;t.getAttribute("role"),t=t.parentElement,s++}return null}_isStableHref(e){return!(!e||e==="#"||e.startsWith("javascript:")||this._isDynamic(e)||/[a-f0-9]{32,}/i.test(e)||/\/\d{6,}(\/|$)/.test(e))}_getAccessibleName(e){var o,c;const t=e.getAttribute("aria-label");if(t&&t.trim())return t.trim();const s=e.getAttribute("aria-labelledby");if(s){const d=e.ownerDocument.getElementById(s);if(d){const h=(o=d.textContent)==null?void 0:o.trim();if(h)return h}}const a=(c=e.textContent)==null?void 0:c.trim();return a&&a.length<=100?a.replace(/\s+/g," "):null}}function df(i){return typeof CSS<"u"&&CSS.escape?CSS.escape(i):i.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Ov(i){return`"${i.replace(/["\\]/g,e=>"\\"+e)}"`}function bo(i,e,t,s){return new KC(i).applyScopingHook(e,t,s)}class JC{constructor(e){this._enabled=!1,this._savedButtonRoles=new Map,this._hiddenDuplicateButtons=[],this._document=e}get enabled(){return this._enabled}toggle(){this._enabled=!this._enabled,this._enabled?this._enableNestedElementAccess():this._disableNestedElementAccess()}_enableNestedElementAccess(){this._document.querySelectorAll('[role="button"]').forEach(t=>{const s=t.getAttribute("role");t.children.length>0&&s&&(this._savedButtonRoles.set(t,s),t.removeAttribute("role"),t.querySelectorAll("button").forEach(o=>{this._createDuplicateButton(o,t)}))})}_disableNestedElementAccess(){this._savedButtonRoles.forEach((e,t)=>{t.setAttribute("role",e)}),this._savedButtonRoles.clear(),this._hiddenDuplicateButtons.forEach(e=>{e.remove()}),this._hiddenDuplicateButtons=[]}_createDuplicateButton(e,t){var d;const s=e.getAttribute("aria-label"),a=(d=e.textContent)==null?void 0:d.trim();if(!(s||a))return;const c=this._document.createElement("button");c.textContent=(a||"")+" dup",s&&c.setAttribute("aria-label",s+" dup"),c.style.cssText="position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; pointer-events: none !important;",c.setAttribute("tabindex","-1"),c.setAttribute("data-pw-nested-button-duplicate","true"),c.disabled=!0,t.appendChild(c),this._hiddenDuplicateButtons.push(c)}handleNestedClick(e,t,s,a){let o=null;if(t.elements&&t.elements.length>0&&(o=t.elements[0]),!(o&&e!==o&&o.contains(e)))return this._isInsideButtonWrapperWithNativeInput(e)?{targetSelector:t.selector,shouldAutoDisable:!0}:null;const d=o.getAttribute("role");if(d!=="checkbox"&&d!=="radio"&&!this._isInsideButtonWrapperWithNativeInput(o))return null;const h=s.generateSelector(e,{testIdAttributeName:a});let f;if(h.selector===t.selector){const _=this._buildChildSelector(e,o,a);if(!_)return null;f=`${t.selector} >> ${_}`}else{const _=t.selector,m=h.selector;_&&m&&!m.startsWith(_)&&!m.includes(">>")?f=`${_} >> ${m}`:f=m}return{targetSelector:f,shouldAutoDisable:!0}}_buildChildSelector(e,t,s){const a=d=>d.tagName.toLowerCase()==="svg",o=d=>{const h=d.tagName.toLowerCase();return h==="path"||h==="g"||h==="circle"||h==="rect"||h==="polygon"||h==="line"||h==="polyline"||h==="ellipse"};let c=e;if(o(e)){let d=e.parentElement;for(;d&&d!==t;){if(a(d)&&d.classList.length>0&&Array.from(d.classList).some(f=>f.includes("chevron")||f.includes("icon")||f.includes("expandable"))){c=d;break}if(!a(d)&&!o(d)&&d.classList.length>0){c=d;break}d=d.parentElement}}else if(a(e)&&e.classList.length===0){let d=e.parentElement;for(;d&&d!==t;){if(d.classList.length>0){c=d;break}d=d.parentElement}}if(c.hasAttribute(s)){const d=c.getAttribute(s)||"";return`[${s}=${Ov(d)}]`}if(c.classList.length>0){const d=Array.from(c.classList),h=d.filter(f=>f.includes("expand")||f.includes("chevron")||f.includes("badge")||f.includes("checkmark")||f.includes("heading")||f.includes("status")||f.includes("icon")||f.includes("button")||f.includes("title"));if(h.length>0){const f=h.find(_=>_.includes("chevron")||_.includes("checkmark")||_.includes("badge"))||h[0];return"."+df(f)}else if(d.length>0)return"."+df(d[0])}return c.tagName.toLowerCase()}_isInsideButtonWrapperWithNativeInput(e){let t=e;for(;t;){if(this._savedButtonRoles.has(t))return!!t.querySelector('input[type="checkbox"], input[type="radio"]');t=t.parentElement}return!1}cleanup(){this._enabled&&(this._disableNestedElementAccess(),this._enabled=!1)}}class Rr{constructor(e){this._pdfDoc=null,this._canvasElements=[],this._thumbnailElements=[],this._isRendering=!1,this._toolbar=null,this._sidebar=null,this._mainContent=null,this._currentPage=1,this._pageDisplay=null,this._zoomDisplay=null,this._currentZoom=1,this._rotation=0,this._pdfDataUrl="",this._filename="Document.pdf",this._moreMenuElement=null,this._moreMenuCleanup=null,this._twoPageView=!1,this._annotationsVisible=!0,this._container=e}static async loadPdfJs(){if(window.pdfjsLib)return;console.log("[PDF.js] Loading PDF.js library from CDN...");const e=document.createElement("script");return e.src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js",new Promise((t,s)=>{e.onload=()=>{if(!window.pdfjsLib){s(new Error("PDF.js loaded but pdfjsLib not available"));return}window.pdfjsLib.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js",console.log("[PDF.js] ✅ PDF.js library loaded successfully"),t()},e.onerror=()=>s(new Error("Failed to load PDF.js from CDN")),document.head.appendChild(e)})}async renderPdf(e){const{pdfDataUrl:t,filename:s,onReady:a,onError:o}=e;try{this._pdfDataUrl=t,this._filename=s||"Document.pdf",await Rr.loadPdfJs(),console.log("[PDF.js] Rendering PDF..."),this._isRendering=!0;const c=window.pdfjsLib.getDocument(t);this._pdfDoc=await c.promise,console.log(`[PDF.js] PDF loaded: ${this._pdfDoc.numPages} pages`),document.documentElement&&(document.documentElement.style.height="auto"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.width="100%",document.body.style.height="auto",document.body.style.overflow="auto"),this._container.innerHTML="",this._canvasElements=[],this._thumbnailElements=[],this._container.style.cssText=`
136
136
  width: 100%;
137
137
  min-height: 100vh;
138
138
  display: flex;
@@ -7,8 +7,8 @@
7
7
  <link rel="icon" href="./playwright-logo.svg" type="image/svg+xml">
8
8
  <link rel="manifest" href="./manifest.webmanifest">
9
9
  <title>Playwright Trace Viewer</title>
10
- <script type="module" crossorigin src="./index.BAkLd5DX.js"></script>
11
- <link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-Bwr1eMKC.js">
10
+ <script type="module" crossorigin src="./index.uiPTFncY.js"></script>
11
+ <link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-DTp2-8Si.js">
12
12
  <link rel="stylesheet" crossorigin href="./defaultSettingsView.7ch9cixO.css">
13
13
  <link rel="stylesheet" crossorigin href="./index.BVu7tZDe.css">
14
14
  </head>
@@ -1,2 +1,2 @@
1
- import{T as x,r,a as C,W as F,j as e,D as z,b as I,c as P,d as A,e as O,f as V}from"./assets/defaultSettingsView-Bwr1eMKC.js";const $=()=>{const[o,c]=r.useState(!1),[n,l]=r.useState(),[h,u]=r.useState(),[p,b]=r.useState(N),[f,j]=r.useState({done:0,total:0}),[k,v]=r.useState(!1),[y,m]=r.useState(null),[T,R]=r.useState(null),[U,E]=r.useState(!1),g=r.useCallback(t=>{const s=new URL(window.location.href);if(!t.length)return;const i=t.item(0),a=URL.createObjectURL(i);s.searchParams.append("trace",a);const d=s.toString();window.history.pushState({},"",d),l(a),u(i.name),v(!1),m(null)},[]);r.useEffect(()=>{const t=async s=>{var a;if(!((a=s.clipboardData)!=null&&a.files.length))return;const i=["application/zip","application/x-zip-compressed"];for(const d of s.clipboardData.files)if(!i.includes(d.type))return;s.preventDefault(),g(s.clipboardData.files)};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)}),r.useEffect(()=>{const t=s=>{const{method:i,params:a}=s.data;if(i!=="load"||!((a==null?void 0:a.trace)instanceof Blob))return;const d=new File([a.trace],"trace.zip",{type:"application/zip"}),w=new DataTransfer;w.items.add(d),g(w.files)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const W=r.useCallback(t=>{t.preventDefault(),g(t.dataTransfer.files)},[g]),M=r.useCallback(t=>{t.preventDefault(),t.target.files&&g(t.target.files)},[g]);r.useEffect(()=>{const t=new URL(window.location.href).searchParams,s=t.get("trace");if(c(t.has("isServer")),s!=null&&s.startsWith("file:")){R(s||null);return}if(t.has("isServer")){const i=new URLSearchParams(window.location.search).get("ws"),a=new URL(`../${i}`,window.location.toString());a.protocol=window.location.protocol==="https:"?"wss:":"ws:";const d=new C(new F(a));d.onLoadTraceRequested(async w=>{l(w.traceUrl),v(!1),m(null)}),d.initialize({}).catch(()=>{})}else s&&!s.startsWith("blob:")&&l(s)},[]);const S=r.useCallback(async t=>{const s=new URLSearchParams;s.set("trace",t);const i=await fetch(`contexts?${s.toString()}`);if(!i.ok){const{error:w}=await i.json();return m(w),w}const a=await i.json(),d=new x(t,a);j({done:0,total:0}),m(null),b(d)},[]);r.useEffect(()=>{(async()=>{if(!n){b(N);return}const t=s=>{s.data.method==="progress"&&j(s.data.params)};try{navigator.serviceWorker.addEventListener("message",t),j({done:0,total:1});let s=await S(n);s!=null&&s.includes("please grant permission for Local Network Access")&&(await fetch(n,{method:"HEAD",headers:{"x-pw-serviceworker":"skip"}}),s=await S(n)),s&&(o||l(void 0))}finally{navigator.serviceWorker.removeEventListener("message",t)}})()},[o,n,h,S]);const D=f.done!==f.total&&f.total!==0&&!y;r.useEffect(()=>{if(D){const t=setTimeout(()=>{E(!0)},200);return()=>clearTimeout(t)}else E(!1)},[D]);const L=!!(!o&&!k&&!T&&(!n||y));return e.jsxs("div",{className:"vbox workbench-loader",onDragOver:t=>{t.preventDefault(),t.dataTransfer.types.includes("Files")&&v(!0)},children:[e.jsxs("div",{className:"hbox header",...L?{inert:!0}:{},children:[e.jsx("div",{className:"logo",children:e.jsx("img",{src:"playwright-logo.svg",alt:"Playwright logo"})}),e.jsx("div",{className:"product",children:"Playwright"}),p.title&&e.jsx("div",{className:"title",children:p.title}),e.jsx("div",{className:"spacer"}),e.jsx(z,{icon:"settings-gear",title:"Settings",dialogDataTestId:"settings-toolbar-dialog",children:e.jsx(I,{location:"trace-viewer"})})]}),e.jsx(P,{model:p,inert:L}),T&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{children:"Trace Viewer uses Service Workers to show traces. To view trace:"}),e.jsxs("div",{style:{paddingTop:20},children:[e.jsxs("div",{children:["1. Click ",e.jsx("a",{href:T,children:"here"})," to put your trace into the download shelf"]}),e.jsxs("div",{children:["2. Go to ",e.jsx("a",{href:"https://trace.playwright.dev",children:"trace.playwright.dev"})]}),e.jsx("div",{children:"3. Drop the trace from the download shelf into the page"})]})]}),e.jsx(A,{open:U,isModal:!0,className:"progress-dialog",children:e.jsxs("div",{className:"progress-content",children:[e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Loading Playwright Trace..."}),e.jsx("div",{className:"progress-wrapper",children:e.jsx("div",{className:"inner-progress",style:{width:f.total?100*f.done/f.total+"%":0}})})]})}),L&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{className:"processing-error",role:"alert",children:y}),e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Drop Playwright Trace to load"}),e.jsx("div",{children:"or"}),e.jsx("button",{onClick:()=>{const t=document.createElement("input");t.type="file",t.click(),t.addEventListener("change",s=>M(s))},type:"button",children:"Select file"}),e.jsx("div",{className:"info",children:"Playwright Trace Viewer is a Progressive Web App, it does not send your trace anywhere, it opens it locally."}),e.jsxs("div",{className:"version",children:["Playwright v","1.58.2-skyramp.8.14.11"]})]}),o&&!n&&e.jsx("div",{className:"drop-target",children:e.jsx("div",{className:"title",children:"Select test to see the trace"})}),k&&e.jsx("div",{className:"drop-target",onDragLeave:()=>{v(!1)},onDrop:t=>W(t),children:e.jsx("div",{className:"title",children:"Release to analyse the Playwright Trace"})})]})},N=new x("",[]),q=({traceJson:o})=>{const[c,n]=r.useState(void 0),[l,h]=r.useState(0),u=r.useRef(null);return r.useEffect(()=>(u.current&&clearTimeout(u.current),u.current=setTimeout(async()=>{try{const p=await B(o);n(p)}catch{const p=new x("",[]);n(p)}finally{h(l+1)}},500),()=>{u.current&&clearTimeout(u.current)}),[o,l]),e.jsx(P,{isLive:!0,model:c})};async function B(o){const c=new URLSearchParams;c.set("trace",o);const l=await(await fetch(`contexts?${c.toString()}`)).json();return new x(o,l)}(async()=>{const o=new URLSearchParams(window.location.search);if(O(),window.location.protocol!=="file:"){if(o.get("isUnderTest")==="true"&&await new Promise(h=>setTimeout(h,1e3)),!navigator.serviceWorker)throw new Error(`Service workers are not supported.
1
+ import{T as x,r,a as C,W as F,j as e,D as z,b as I,c as P,d as A,e as O,f as V}from"./assets/defaultSettingsView-DTp2-8Si.js";const $=()=>{const[o,c]=r.useState(!1),[n,l]=r.useState(),[h,u]=r.useState(),[p,b]=r.useState(N),[f,j]=r.useState({done:0,total:0}),[k,v]=r.useState(!1),[y,m]=r.useState(null),[T,R]=r.useState(null),[U,E]=r.useState(!1),g=r.useCallback(t=>{const s=new URL(window.location.href);if(!t.length)return;const i=t.item(0),a=URL.createObjectURL(i);s.searchParams.append("trace",a);const d=s.toString();window.history.pushState({},"",d),l(a),u(i.name),v(!1),m(null)},[]);r.useEffect(()=>{const t=async s=>{var a;if(!((a=s.clipboardData)!=null&&a.files.length))return;const i=["application/zip","application/x-zip-compressed"];for(const d of s.clipboardData.files)if(!i.includes(d.type))return;s.preventDefault(),g(s.clipboardData.files)};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)}),r.useEffect(()=>{const t=s=>{const{method:i,params:a}=s.data;if(i!=="load"||!((a==null?void 0:a.trace)instanceof Blob))return;const d=new File([a.trace],"trace.zip",{type:"application/zip"}),w=new DataTransfer;w.items.add(d),g(w.files)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const W=r.useCallback(t=>{t.preventDefault(),g(t.dataTransfer.files)},[g]),M=r.useCallback(t=>{t.preventDefault(),t.target.files&&g(t.target.files)},[g]);r.useEffect(()=>{const t=new URL(window.location.href).searchParams,s=t.get("trace");if(c(t.has("isServer")),s!=null&&s.startsWith("file:")){R(s||null);return}if(t.has("isServer")){const i=new URLSearchParams(window.location.search).get("ws"),a=new URL(`../${i}`,window.location.toString());a.protocol=window.location.protocol==="https:"?"wss:":"ws:";const d=new C(new F(a));d.onLoadTraceRequested(async w=>{l(w.traceUrl),v(!1),m(null)}),d.initialize({}).catch(()=>{})}else s&&!s.startsWith("blob:")&&l(s)},[]);const S=r.useCallback(async t=>{const s=new URLSearchParams;s.set("trace",t);const i=await fetch(`contexts?${s.toString()}`);if(!i.ok){const{error:w}=await i.json();return m(w),w}const a=await i.json(),d=new x(t,a);j({done:0,total:0}),m(null),b(d)},[]);r.useEffect(()=>{(async()=>{if(!n){b(N);return}const t=s=>{s.data.method==="progress"&&j(s.data.params)};try{navigator.serviceWorker.addEventListener("message",t),j({done:0,total:1});let s=await S(n);s!=null&&s.includes("please grant permission for Local Network Access")&&(await fetch(n,{method:"HEAD",headers:{"x-pw-serviceworker":"skip"}}),s=await S(n)),s&&(o||l(void 0))}finally{navigator.serviceWorker.removeEventListener("message",t)}})()},[o,n,h,S]);const D=f.done!==f.total&&f.total!==0&&!y;r.useEffect(()=>{if(D){const t=setTimeout(()=>{E(!0)},200);return()=>clearTimeout(t)}else E(!1)},[D]);const L=!!(!o&&!k&&!T&&(!n||y));return e.jsxs("div",{className:"vbox workbench-loader",onDragOver:t=>{t.preventDefault(),t.dataTransfer.types.includes("Files")&&v(!0)},children:[e.jsxs("div",{className:"hbox header",...L?{inert:!0}:{},children:[e.jsx("div",{className:"logo",children:e.jsx("img",{src:"playwright-logo.svg",alt:"Playwright logo"})}),e.jsx("div",{className:"product",children:"Playwright"}),p.title&&e.jsx("div",{className:"title",children:p.title}),e.jsx("div",{className:"spacer"}),e.jsx(z,{icon:"settings-gear",title:"Settings",dialogDataTestId:"settings-toolbar-dialog",children:e.jsx(I,{location:"trace-viewer"})})]}),e.jsx(P,{model:p,inert:L}),T&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{children:"Trace Viewer uses Service Workers to show traces. To view trace:"}),e.jsxs("div",{style:{paddingTop:20},children:[e.jsxs("div",{children:["1. Click ",e.jsx("a",{href:T,children:"here"})," to put your trace into the download shelf"]}),e.jsxs("div",{children:["2. Go to ",e.jsx("a",{href:"https://trace.playwright.dev",children:"trace.playwright.dev"})]}),e.jsx("div",{children:"3. Drop the trace from the download shelf into the page"})]})]}),e.jsx(A,{open:U,isModal:!0,className:"progress-dialog",children:e.jsxs("div",{className:"progress-content",children:[e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Loading Playwright Trace..."}),e.jsx("div",{className:"progress-wrapper",children:e.jsx("div",{className:"inner-progress",style:{width:f.total?100*f.done/f.total+"%":0}})})]})}),L&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{className:"processing-error",role:"alert",children:y}),e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Drop Playwright Trace to load"}),e.jsx("div",{children:"or"}),e.jsx("button",{onClick:()=>{const t=document.createElement("input");t.type="file",t.click(),t.addEventListener("change",s=>M(s))},type:"button",children:"Select file"}),e.jsx("div",{className:"info",children:"Playwright Trace Viewer is a Progressive Web App, it does not send your trace anywhere, it opens it locally."}),e.jsxs("div",{className:"version",children:["Playwright v","1.58.2-skyramp.8.14.13"]})]}),o&&!n&&e.jsx("div",{className:"drop-target",children:e.jsx("div",{className:"title",children:"Select test to see the trace"})}),k&&e.jsx("div",{className:"drop-target",onDragLeave:()=>{v(!1)},onDrop:t=>W(t),children:e.jsx("div",{className:"title",children:"Release to analyse the Playwright Trace"})})]})},N=new x("",[]),q=({traceJson:o})=>{const[c,n]=r.useState(void 0),[l,h]=r.useState(0),u=r.useRef(null);return r.useEffect(()=>(u.current&&clearTimeout(u.current),u.current=setTimeout(async()=>{try{const p=await B(o);n(p)}catch{const p=new x("",[]);n(p)}finally{h(l+1)}},500),()=>{u.current&&clearTimeout(u.current)}),[o,l]),e.jsx(P,{isLive:!0,model:c})};async function B(o){const c=new URLSearchParams;c.set("trace",o);const l=await(await fetch(`contexts?${c.toString()}`)).json();return new x(o,l)}(async()=>{const o=new URLSearchParams(window.location.search);if(O(),window.location.protocol!=="file:"){if(o.get("isUnderTest")==="true"&&await new Promise(h=>setTimeout(h,1e3)),!navigator.serviceWorker)throw new Error(`Service workers are not supported.
2
2
  Make sure to serve the Trace Viewer (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register("sw.bundle.js"),navigator.serviceWorker.controller||await new Promise(h=>{navigator.serviceWorker.oncontrollerchange=()=>h()}),setInterval(function(){fetch("ping")},1e4)}const c=o.get("trace"),l=(c==null?void 0:c.endsWith(".json"))?e.jsx(q,{traceJson:c}):e.jsx($,{});V.createRoot(document.querySelector("#root")).render(l)})();