@inkeep/agents-manage-ui 0.23.1 → 0.23.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 (151) hide show
  1. package/.next/standalone/agents-manage-ui/.next/BUILD_ID +1 -1
  2. package/.next/standalone/agents-manage-ui/.next/app-build-manifest.json +117 -117
  3. package/.next/standalone/agents-manage-ui/.next/app-path-routes-manifest.json +3 -3
  4. package/.next/standalone/agents-manage-ui/.next/build-manifest.json +5 -5
  5. package/.next/standalone/agents-manage-ui/.next/prerender-manifest.json +3 -3
  6. package/.next/standalone/agents-manage-ui/.next/react-loadable-manifest.json +6 -6
  7. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/page.js +2 -2
  8. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/[agentId]/page.js +2 -2
  10. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/[agentId]/page.js.nft.json +1 -1
  11. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/[agentId]/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/new/page.js +2 -2
  13. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/new/page.js.nft.json +1 -1
  14. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/new/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/page.js +2 -2
  16. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/api-keys/page.js +3 -3
  18. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/api-keys/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page.js +1 -1
  20. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page.js.nft.json +1 -1
  21. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page.js +2 -2
  23. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page.js.nft.json +1 -1
  24. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/page.js +2 -2
  26. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page.js +2 -2
  28. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page.js.nft.json +1 -1
  29. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page_client-reference-manifest.js +1 -1
  30. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page.js +2 -2
  31. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page.js.nft.json +1 -1
  32. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page_client-reference-manifest.js +1 -1
  33. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/page.js +2 -2
  34. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page.js +1 -1
  36. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page_client-reference-manifest.js +1 -1
  37. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page.js +2 -2
  38. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page.js.nft.json +1 -1
  39. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page.js +1 -1
  41. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page.js +2 -2
  43. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page.js.nft.json +1 -1
  44. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page.js +2 -2
  46. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/page.js +2 -2
  48. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page.js +2 -2
  50. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page.js.nft.json +1 -1
  51. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page.js +2 -2
  53. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page.js.nft.json +1 -1
  54. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page.js +2 -2
  56. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page.js.nft.json +1 -1
  57. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page_client-reference-manifest.js +1 -1
  58. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/page.js +2 -2
  59. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/page_client-reference-manifest.js +1 -1
  60. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/page.js +2 -2
  61. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  62. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/settings/page.js +2 -2
  63. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/settings/page_client-reference-manifest.js +1 -1
  64. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page.js +2 -2
  65. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page.js.nft.json +1 -1
  66. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page_client-reference-manifest.js +1 -1
  67. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page.js +2 -2
  68. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page.js +2 -2
  70. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page.js.nft.json +1 -1
  71. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page_client-reference-manifest.js +1 -1
  72. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/page.js +1 -1
  73. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/page_client-reference-manifest.js +1 -1
  74. package/.next/standalone/agents-manage-ui/.next/server/app/_not-found/page.js +1 -1
  75. package/.next/standalone/agents-manage-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  76. package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.html +1 -1
  77. package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.rsc +8 -8
  78. package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/conversations/[conversationId]/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/route_client-reference-manifest.js +1 -1
  80. package/.next/standalone/agents-manage-ui/.next/server/app/page.js +2 -2
  81. package/.next/standalone/agents-manage-ui/.next/server/app/page_client-reference-manifest.js +1 -1
  82. package/.next/standalone/agents-manage-ui/.next/server/app-paths-manifest.json +3 -3
  83. package/.next/standalone/agents-manage-ui/.next/server/chunks/3547.js +1 -1
  84. package/.next/standalone/agents-manage-ui/.next/server/chunks/{498.js → 5661.js} +9 -9
  85. package/.next/standalone/agents-manage-ui/.next/server/chunks/5732.js +1 -1
  86. package/.next/standalone/agents-manage-ui/.next/server/chunks/5904.js +1 -0
  87. package/.next/standalone/agents-manage-ui/.next/server/chunks/7848.js +1 -1
  88. package/.next/standalone/agents-manage-ui/.next/server/chunks/{1997.js → 7915.js} +1 -1
  89. package/.next/standalone/agents-manage-ui/.next/server/chunks/7988.js +2 -2
  90. package/.next/standalone/agents-manage-ui/.next/server/chunks/9324.js +1 -0
  91. package/.next/standalone/agents-manage-ui/.next/server/chunks/9728.js +7 -0
  92. package/.next/standalone/agents-manage-ui/.next/server/middleware-build-manifest.js +1 -1
  93. package/.next/standalone/agents-manage-ui/.next/server/middleware-manifest.json +5 -5
  94. package/.next/standalone/agents-manage-ui/.next/server/middleware-react-loadable-manifest.js +1 -1
  95. package/.next/standalone/agents-manage-ui/.next/server/pages/404.html +1 -1
  96. package/.next/standalone/agents-manage-ui/.next/server/pages/500.html +1 -1
  97. package/.next/standalone/agents-manage-ui/.next/server/server-reference-manifest.js +1 -1
  98. package/.next/standalone/agents-manage-ui/.next/server/server-reference-manifest.json +1 -1
  99. package/.next/standalone/agents-manage-ui/.next/static/chunks/{16998.40613c3f0a5aacb3.js → 16998.4dce05d474444f45.js} +1 -1
  100. package/.next/standalone/agents-manage-ui/.next/static/chunks/20412-9a8e7f03fccb951d.js +1 -0
  101. package/.next/standalone/agents-manage-ui/.next/static/chunks/20837-5fc8cc187ce8cf85.js +1 -0
  102. package/.next/standalone/agents-manage-ui/.next/static/chunks/{23113.57e6c01f97c5cf7e.js → 23113.536c8c9bea4a8c7b.js} +1 -1
  103. package/.next/standalone/agents-manage-ui/.next/static/chunks/{63414-5d24060fe99b187c.js → 37853-75da808b961bebb5.js} +1 -1
  104. package/.next/standalone/agents-manage-ui/.next/static/chunks/69862-259e23ba7c2e103f.js +1 -0
  105. package/.next/standalone/agents-manage-ui/.next/static/chunks/{98928-14207f1b9e316de8.js → 98928-6ac07227838d99e9.js} +2 -2
  106. package/.next/standalone/agents-manage-ui/.next/static/chunks/99784-f3d8e70bb52d7e17.js +1 -0
  107. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/agents/[agentId]/{page-0d98034c5e81376a.js → page-f69bde7897ff5088.js} +1 -1
  108. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/agents/new/{page-2b1b331329da116d.js → page-e001f5120a451646.js} +1 -1
  109. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/agents/page-bb9653ef81cbb8af.js +1 -0
  110. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/api-keys/page-dbc90858d632eeed.js +1 -0
  111. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/{page-d05fe859b0fef25a.js → page-8b7b09aaa386850e.js} +1 -1
  112. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/new/{page-b87ec19a9191e55e.js → page-391c7aeb0fb25251.js} +1 -1
  113. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/{page-efeb878c31f2a2eb.js → page-27c9f2fe85b0bce4.js} +1 -1
  114. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/{page-25e78ebc40e7fb79.js → page-bcaccfc6bd74c9c1.js} +1 -1
  115. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/new/{page-4263637660f5fe11.js → page-ddf0db208dde1082.js} +1 -1
  116. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/page-1132648a1ad1a125.js +1 -0
  117. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/{page-468ef8b0ddd9f271.js → page-e489f4fad37b86c0.js} +1 -1
  118. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page-8ccb42db340ad41f.js +1 -0
  119. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page-3312b2347bc4dced.js +1 -0
  120. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/page-f305cf4c5883a14c.js +1 -0
  121. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page-26c29a113a1ddd4f.js +1 -0
  122. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/new/{page-78e277acbd6380c9.js → page-a7682fb1465014b6.js} +1 -1
  123. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/page-06cc54d2e18d8419.js +1 -0
  124. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/settings/{page-60877bb1259c461b.js → page-598d2e4793b07fc6.js} +1 -1
  125. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/traces/page-3fd4f61b8c8593ce.js +1 -0
  126. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/page-c8bf07b63db17d25.js +1 -0
  127. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/{layout-aafad05c22d94fb4.js → layout-16d96e91100a1542.js} +1 -1
  128. package/.next/standalone/agents-manage-ui/.next/static/chunks/{d834c995-72666c5916d3b86e.js → d834c995-8d05a2611457c81b.js} +1 -1
  129. package/.next/standalone/agents-manage-ui/.next/static/chunks/{webpack-48ec00a8819c1625.js → webpack-d65a3369c23bc1a6.js} +1 -1
  130. package/.next/standalone/agents-manage-ui/package.json +1 -1
  131. package/.next/standalone/packages/agents-core/package.json +1 -1
  132. package/package.json +4 -4
  133. package/.next/standalone/agents-manage-ui/.next/server/chunks/6940.js +0 -1
  134. package/.next/standalone/agents-manage-ui/.next/server/chunks/7430.js +0 -1
  135. package/.next/standalone/agents-manage-ui/.next/server/chunks/8236.js +0 -7
  136. package/.next/standalone/agents-manage-ui/.next/static/chunks/18229-4f40b3129fb13a6a.js +0 -1
  137. package/.next/standalone/agents-manage-ui/.next/static/chunks/20837-80824768c25e8807.js +0 -1
  138. package/.next/standalone/agents-manage-ui/.next/static/chunks/39912-10e2e2f42a2e25de.js +0 -1
  139. package/.next/standalone/agents-manage-ui/.next/static/chunks/53627-78b04138dc05aedb.js +0 -1
  140. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/agents/page-5746afb5cd4dae5a.js +0 -1
  141. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/api-keys/page-3edd80735e6da58f.js +0 -1
  142. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/page-11053fc1b63c6007.js +0 -1
  143. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page-a15d6a6b6f956da0.js +0 -1
  144. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page-5550b5b52369a508.js +0 -1
  145. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/page-1148dfdcf1e5dff4.js +0 -1
  146. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page-c5d5ca3ea5660528.js +0 -1
  147. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/page-697894da877a199e.js +0 -1
  148. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/traces/page-510226127ab7e6f0.js +0 -1
  149. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/page-9bf7a4cdd3a42ff3.js +0 -1
  150. /package/.next/standalone/agents-manage-ui/.next/static/{yeHoasKbJN96CwqdzWKNW → pw1hATP-xswRjILv-PkfK}/_buildManifest.js +0 -0
  151. /package/.next/standalone/agents-manage-ui/.next/static/{yeHoasKbJN96CwqdzWKNW → pw1hATP-xswRjILv-PkfK}/_ssgManifest.js +0 -0
@@ -452,7 +452,7 @@ commit_chars: ${e.completion.commitCharacters?.join("")}
452
452
  // <json>
453
453
  ${r}
454
454
  // </json>
455
- `;return await i.writeText(a),{reproCase:a}}}var fk=function(e,t){return function(i,n){t(i,n,e)}};class fx{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let fL=class{constructor(e,t,i,n,s,o){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=s,this._telemetryService=o,this.hoverOrdinal=4}suggestHoverAnchor(e){let t=fd.get(this._editor);if(!t)return null;let i=e.target;if(8===i.type){let n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new oi(1e3,this,tO.Q.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}if(7===i.type&&t.shouldShowHoverAt(i.range)||6===i.type&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range))return new oi(1e3,this,i.range,e.event.posx,e.event.posy,!1);if(9===i.type&&i.element){let n=pR.getWarningWidgetContext(i.element);if(n&&t.shouldShowHoverAt(n.range))return new oi(1e3,this,n.range,e.event.posx,e.event.posy,!1)}return null}computeSync(e,t){if("onHover"!==this._editor.getOption(71).showToolbar)return[];let i=fd.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new fx(this,e.range,i)]:[]}renderHoverParts(e,t){let i=new tT.Cm,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(12)&&i.add(this.renderScreenReaderText(e,n));let s=n.controller.model.get(),o=document.createElement("div");return e.fragment.appendChild(o),i.add((0,oM.yC)((t,i)=>{let n=i.add(this._instantiationService.createInstance(oj.hot.read(t),this._editor,!1,(0,oM.lk)(null),s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.activeCommands,s.warning,()=>{e.onContentsChanged()}));o.replaceChildren(n.getDomNode())})),s.triggerExplicitly(),new on([{hoverPart:n,hoverElement:o,dispose(){i.dispose()}}])}renderScreenReaderText(e,t){let i=new tT.Cm,n=e8.$,s=n("div.hover-row.markdown-hover"),o=e8.BC(s,n("div.hover-contents",{"aria-live":"assertive"})),r=new iF.T({editor:this._editor},this._languageService,this._openerService);return i.add((0,oM.fm)(n=>{let s=t.controller.model.read(n)?.primaryGhostText.read(n);if(s){let t=this._editor.getModel().getLineContent(s.lineNumber);var a=s.renderForScreenReader(t);let n=tn.kg(1197,"Suggestion:"),l=i.add(r.render(new ty.Bc().appendText(n).appendCodeblock("text",a),{asyncRenderCallback:()=>{o.className="hover-contents code-hover-contents",e.onContentsChanged()}}));o.replaceChildren(l.element)}else e8.Ln(o)})),e.fragment.appendChild(s),i}};fL=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([fk(1,rs.L),fk(2,iB.Cr),fk(3,o1.j),fk(4,t5._Y),fk(5,t3.k)],fL);class fD{}(0,e6.HW)(fd.ID,function(e){var t;return(0,cK.e)()?(t=cq,class extends t{constructor(){super(...arguments),this._autorun=void 0}init(...t){this._autorun=(0,oM.yC)((i,n)=>{let s=e.read(i);this._instance=n.add(this.instantiationService.createInstance(s,...t))})}dispose(){this._autorun?.dispose()}}):e.get()}(fd.hot),3),(0,e6.Fl)(fg),(0,e6.Fl)(fp),(0,e6.E_)(new fm),(0,e6.Fl)(fc),(0,e6.Fl)(fu),(0,e6.Fl)(ff),(0,e6.Fl)(f_),(0,e6.Fl)(fv),(0,e6.Fl)(fw),(0,e6.Fl)(fC),(0,e6.Fl)(fb),(0,ts.ug)(fy),(0,e6.Fl)(fS),(0,ts.ug)(gD.KS),(0,ts.ug)(gD.un),os.register(fL),c$.register(new fD),i(17275);var fI=function(e,t){return function(i,n){t(i,n,e)}};let fN=class{static{eR=this}static{this.ID="editor.contrib.gotodefinitionatposition"}static{this.MAX_SOURCE_PREVIEW_LINES=8}constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new tT.Cm,this.toUnhookForKeyboard=new tT.Cm,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();let s=new rQ(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([e,t])=>{this.startFindDefinitionFromMouse(e,t??void 0)})),this.toUnhook.add(s.onExecute(e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch(e=>{(0,ih.dz)(e)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(eR.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}let i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){let t;this.toUnhookForKeyboard.clear();let i=e?this.editor.getModel()?.getWordAtPosition(e):null;if(!i){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;let n=new iN.$t(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,tM.SS)(t=>this.findDefinition(e,t));try{t=await this.previousPromise}catch(e){(0,ih.dz)(e);return}if(!t||!t.length||!n.validate(this.editor))return void this.removeLinkDecorations();let s=t[0].originSelectionRange?tO.Q.lift(t[0].originSelectionRange):new tO.Q(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(t.length>1){let e=s;for(let{originSelectionRange:i}of t)i&&(e=tO.Q.plusRange(e,i));this.addDecoration(e,new ty.Bc().appendText(tn.kg(1072,"Click to show {0} definitions.",t.length)))}else{let e=t[0];if(!e.uri)return;return this.textModelResolverService.createModelReference(e.uri).then(t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();let{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();let o=this.getPreviewValue(i,n,e),r=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(s,o?new ty.Bc().appendCodeblock(r||"",o):void 0),t.dispose()})}}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=eR.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),n=e.validateRange(n),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let s=t+1;s<i.endLineNumber;s++)n=Math.min(n,e.getLineFirstNonWhitespaceColumn(s));return e.getValueInRange(i).replace(RegExp(`^\\s{${n-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){let i=e.getLineFirstNonWhitespaceColumn(t),n=Math.min(e.getLineCount(),t+eR.MAX_SOURCE_PREVIEW_LINES),s=t+1;for(;s<n&&i!==e.getLineFirstNonWhitespaceColumn(s);s++);return new tO.Q(t,1,s+1,1)}addDecoration(e,t){this.linkDecorations.set([{range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}}])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,t){return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&6===e.target.type&&!(e.target.detail.injectedText?.options instanceof tA.Ho)&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){let i=this.editor.getModel();return i?a7(this.languageFeaturesService.definitionProvider,i,e,!1,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(e=>{let i=!t&&this.editor.getOption(101)&&!this.isInPeekEditor(e);return new ls({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e)})}isInPeekEditor(e){let t=e.get(tr.fN);return Y.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};fN=eR=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([fI(1,rU.b),fI(2,rs.L),fI(3,iI.u)],fN),(0,e6.HW)(fN.ID,fN,2);var fE=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fM=function(e,t){return function(i,n){t(i,n,e)}};class fT{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let fR=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new iA.vl,this.onDidChange=this._onDidChange.event,this._dispoables=new tT.Cm,this._markers=[],this._nextIdx=-1,i_.r.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);let n=this._configService.getValue("problems.sortOrder"),s=(e,t)=>{let i=(0,iE.UD)(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?tO.Q.compareRangesUsingStarts(e,t)||sg.cj.compare(e.severity,t.severity):sg.cj.compare(e.severity,t.severity)||tO.Q.compareRangesUsingStarts(e,t)),i},o=()=>{let t=this._markerService.read({resource:i_.r.isUri(e)?e:void 0,severities:sg.cj.Error|sg.cj.Warning|sg.cj.Info});return"function"==typeof e&&(t=t.filter(e=>this._resourceFilter(e.resource))),t.sort(s),!(0,t8.aI)(t,this._markers,(e,t)=>e.resource.toString()===t.resource.toString()&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn&&e.severity===t.severity&&e.message===t.message)&&(this._markers=t,!0)};o(),this._dispoables.add(t.onMarkerChanged(e=>{(!this._resourceFilter||e.some(e=>this._resourceFilter(e)))&&o()&&(this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!!this._resourceFilter&&!!e&&this._resourceFilter(e)}get selected(){let e=this._markers[this._nextIdx];return e&&new fT(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=this._markers.findIndex(t=>(0,ij.n4)(t.resource,e.uri));if(n<0)(n=(0,t8.Uw)(this._markers.length,t=>(0,iE.UD)(this._markers[t].resource.toString(),e.uri.toString())))<0&&(n=~n),i?this._nextIdx=n:this._nextIdx=(this._markers.length+n-1)%this._markers.length;else{let s=!1,o=!1;for(let i=n;i<this._markers.length;i++){let n=tO.Q.lift(this._markers[i]);if(n.isEmpty()){let t=e.getWordAtPosition(n.getStartPosition());t&&(n=new tO.Q(n.startLineNumber,t.startColumn,n.startLineNumber,t.endColumn))}if(t&&(n.containsPosition(t)||t.isBeforeOrEqual(n.getStartPosition()))){this._nextIdx=i,s=!0,o=!n.containsPosition(t);break}if(this._markers[i].resource.toString()!==e.uri.toString())break}s?o&&!i&&(this._nextIdx-=1):this._nextIdx=i?0:this._markers.length-1}this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,i){if(0===this._markers.length)return!1;let n=this._nextIdx;return -1===this._nextIdx?this._initIdx(t,i,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),n!==this._nextIdx}find(e,t){let i=this._markers.findIndex(t=>t.resource.toString()===e.toString());if(!(i<0)){for(;i<this._markers.length;i++)if(tO.Q.containsPosition(this._markers[i],t))return new fT(this._markers[i],i+1,this._markers.length)}}};fR=fE([fM(1,sg.DR),fM(2,to.pG)],fR);let fO=(0,t5.u1)("IMarkerNavigationService"),fP=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new g$.w}getMarkerList(e){for(let t of this._provider){let i=t.getMarkerList(e);if(i)return i}return new fR(e,this._markerService,this._configService)}};fP=fE([fM(0,sg.DR),fM(1,to.pG)],fP),(0,nM.v)(fO,fP,1),i(13326),i(96143);var fA=i(5785);(eO||(eO={})).className=function(e){switch(e){case fA.A.Ignore:return"severity-ignore "+iM.L.asClassName(e9.W.info);case fA.A.Info:return iM.L.asClassName(e9.W.info);case fA.A.Warning:return iM.L.asClassName(e9.W.warning);case fA.A.Error:return iM.L.asClassName(e9.W.error);default:return""}};var fF=function(e,t){return function(i,n){t(i,n,e)}};class fB{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new tT.Cm,this._editor=t;let o=document.createElement("div");o.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),o.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),o.appendChild(this._relatedBlock),this._disposables.add(e8.un(this._relatedBlock,"click",e=>{e.preventDefault();let t=this._relatedDiagnostics.get(e.target);t&&i(t)})),this._scrollable=new g4.Se(o,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(e=>{o.style.left=`-${e.scrollLeft}px`,o.style.top=`-${e.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,tT.AS)(this._disposables)}update(e){let{source:t,message:i,relatedInformation:n,code:s}=e,o=(t?.length||0)+2;s&&("string"==typeof s?o+=s.length:o+=s.value.length);let r=(0,iE.uz)(i);for(let e of(this._lines=r.length,this._longestLineLength=0,r))this._longestLineLength=Math.max(e.length+o,this._longestLineLength);e8.w_(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(let e of r)(a=document.createElement("div")).innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||s){let e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){let i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(s)if("string"==typeof s){let t=document.createElement("span");t.innerText=`(${s})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=e8.$("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(s.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},e8.BC(this._codeLink,e8.$("span")).innerText=s.value,e.appendChild(this._codeLink)}if(e8.w_(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,t8.EI)(n)){let e=this._relatedBlock.appendChild(document.createElement("div"));for(let t of(e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(75))}px`,this._lines+=1,n)){let i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);let s=document.createElement("span");s.innerText=t.message,i.appendChild(n),i.appendChild(s),this._lines+=1,e.appendChild(i)}}let l=this._editor.getOption(59),h=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:h,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case sg.cj.Error:t=tn.kg(1019,"Error");break;case sg.cj.Warning:t=tn.kg(1020,"Warning");break;case sg.cj.Info:t=tn.kg(1021,"Info");break;case sg.cj.Hint:t=tn.kg(1022,"Hint")}let i=tn.kg(1023,"{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),n=this._editor.getModel();if(n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1){let t=n.getLineContent(e.startLineNumber);i=`${t}, ${i}`}return i}}let fW=class extends ah{static{eP=this}static{this.TitleMenu=new ts.D8("gotoErrorTitleMenu")}constructor(e,t,i,n,s,o,r){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=o,this._labelService=r,this._callOnDispose=new tT.Cm,this._onDidSelectRelatedInformation=new iA.vl,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=sg.cj.Warning,this._backgroundColor=oo.Q1.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(fQ);let t=fU,i=fj;this._severity===sg.cj.Warning?(t=f$,i=fK):this._severity===sg.cj.Info&&(t=fG,i=fq);let n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(ac),secondaryHeadingColor:e.getColor(au)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(e=>this.editor.focus()));let t=this._menuService.getMenuActions(eP.TitleMenu,this._contextKeyService),i=(0,oT.ej)(t);this._actionbarWidget.push(i,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=e8.BC(e,e8.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new fB(this._container,this.editor,e=>this._onDidSelectRelatedInformation.fire(e),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let n=tO.Q.lift(e),s=this.editor.getPosition(),o=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(o,this.computeRequiredHeight());let r=this.editor.getModel();if(r){let e=i>1?tn.kg(1024,"{0} of {1} problems",t,i):tn.kg(1025,"{0} of {1} problem",t,i);this.setTitle((0,ij.P8)(r.uri),e)}this._icon.className=`codicon ${eO.className(sg.cj.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(o,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};fW=eP=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([fF(1,tB.Gy),fF(2,iB.Cr),fF(3,ts.ez),fF(4,t5._Y),fF(5,tr.fN),fF(6,aI.L)],fW);let fH=(0,tF.yLr)(tF.Rbi,tF.AN$),fV=(0,tF.yLr)(tF.Hng,tF.Stt),fz=(0,tF.yLr)(tF.pOz,tF.IIb),fU=(0,tF.x1A)("editorMarkerNavigationError.background",{dark:fH,light:fH,hcDark:tF.b1q,hcLight:tF.b1q},tn.kg(1026,"Editor marker navigation widget error color.")),fj=(0,tF.x1A)("editorMarkerNavigationError.headerBackground",{dark:(0,tF.JO0)(fU,.1),light:(0,tF.JO0)(fU,.1),hcDark:null,hcLight:null},tn.kg(1027,"Editor marker navigation widget error heading background.")),f$=(0,tF.x1A)("editorMarkerNavigationWarning.background",{dark:fV,light:fV,hcDark:tF.b1q,hcLight:tF.b1q},tn.kg(1028,"Editor marker navigation widget warning color.")),fK=(0,tF.x1A)("editorMarkerNavigationWarning.headerBackground",{dark:(0,tF.JO0)(f$,.1),light:(0,tF.JO0)(f$,.1),hcDark:"#0C141F",hcLight:(0,tF.JO0)(f$,.2)},tn.kg(1029,"Editor marker navigation widget warning heading background.")),fG=(0,tF.x1A)("editorMarkerNavigationInfo.background",{dark:fz,light:fz,hcDark:tF.b1q,hcLight:tF.b1q},tn.kg(1030,"Editor marker navigation widget info color.")),fq=(0,tF.x1A)("editorMarkerNavigationInfo.headerBackground",{dark:(0,tF.JO0)(fG,.1),light:(0,tF.JO0)(fG,.1),hcDark:null,hcLight:null},tn.kg(1031,"Editor marker navigation widget info heading background.")),fQ=(0,tF.x1A)("editorMarkerNavigation.background",tF.YtV,tn.kg(1032,"Editor marker navigation widget background."));var fY=function(e,t){return function(i,n){t(i,n,e)}};let fZ=class{static{eA=this}static{this.ID="editor.contrib.markerController"}static get(e){return e.getContribution(eA.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new tT.Cm,this._editor=e,this._widgetVisible=f5.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(fW,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(e=>{this._model?.selected&&tO.Q.containsPosition(this._model?.selected.marker,e.position)||this._model?.resetIndex()})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;let e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:tO.Q.lift(e).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),i=this._getOrCreateModel(t.uri);i.resetIndex(),i.move(!0,t,new tR.y(e.startLineNumber,e.startColumn)),i.selected&&this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}async navigate(e,t){if(!this._editor.hasModel())return;let i=this._editor.getModel(),n=this._getOrCreateModel(t?void 0:i.uri);if(n.move(e,i,this._editor.getPosition()),n.selected)if(n.selected.marker.resource.toString()!==i.uri.toString()){this._cleanUp();let i=await this._editorService.openCodeEditor({resource:n.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:n.selected.marker}},this._editor);i&&(eA.get(i)?.close(),eA.get(i)?.navigate(e,t))}else this._widget.showAtMarker(n.selected.marker,n.selected.index,n.selected.total)}};fZ=eA=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([fY(1,fO),fY(2,tr.fN),fY(3,te.T),fY(4,t5._Y)],fZ);class fX extends e6.ks{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){t.hasModel()&&await fZ.get(t)?.navigate(this._next,this._multiFile)}}class fJ extends fX{static{this.ID="editor.action.marker.next"}static{this.LABEL=tn.aS(1015,"Go to Next Problem (Error, Warning, Info)")}constructor(){super(!0,!1,{id:fJ.ID,label:fJ.LABEL,precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:578,weight:100},menuOpts:{menuId:fW.TitleMenu,title:fJ.LABEL.value,icon:(0,sL.pU)("marker-navigation-next",e9.W.arrowDown,tn.kg(1011,"Icon for goto next marker.")),group:"navigation",order:1}})}}class f0 extends fX{static{this.ID="editor.action.marker.prev"}static{this.LABEL=tn.aS(1016,"Go to Previous Problem (Error, Warning, Info)")}constructor(){super(!1,!1,{id:f0.ID,label:f0.LABEL,precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:1602,weight:100},menuOpts:{menuId:fW.TitleMenu,title:f0.LABEL.value,icon:(0,sL.pU)("marker-navigation-previous",e9.W.arrowUp,tn.kg(1012,"Icon for goto previous marker.")),group:"navigation",order:2}})}}class f1 extends fX{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:tn.aS(1017,"Go to Next Problem in Files (Error, Warning, Info)"),precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:66,weight:100},menuOpts:{menuId:ts.D8.MenubarGoMenu,title:tn.kg(1013,"Next &&Problem"),group:"6_problem_nav",order:1}})}}class f2 extends fX{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:tn.aS(1018,"Go to Previous Problem in Files (Error, Warning, Info)"),precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:1090,weight:100},menuOpts:{menuId:ts.D8.MenubarGoMenu,title:tn.kg(1014,"Previous &&Problem"),group:"6_problem_nav",order:2}})}}(0,e6.HW)(fZ.ID,fZ,4),(0,e6.Fl)(fJ),(0,e6.Fl)(f0),(0,e6.Fl)(f1),(0,e6.Fl)(f2);let f5=new tr.N1("markersNavigationVisible",!1),f4=e6.DX.bindToContribution(fZ.get);(0,e6.E_)(new f4({id:"closeMarkersNavigation",precondition:f5,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:ti.R.focus,primary:9,secondary:[1033]}}));var f3=i(74310),f7=i(26033),f9=i(32795),f8=i(25659);class f6 extends e6.ks{constructor(){super({id:"editor.action.debugEditorGpuRenderer",label:(0,tn.aS)(1096,"Developer: Debug Editor GPU Renderer"),precondition:tr.M$.true()})}async run(e,t){let i=e.get(t5._Y),n=e.get(ip.GK),s=await n.pick([{label:(0,tn.kg)(1093,"Log Texture Atlas Stats"),id:"logTextureAtlasStats"},{label:(0,tn.kg)(1094,"Save Texture Atlas"),id:"saveTextureAtlas"},{label:(0,tn.kg)(1095,"Draw Glyph"),id:"drawGlyph"}],{canPickMany:!1});if(s)switch(s.id){case"logTextureAtlasStats":i.invokeFunction(e=>{let t=e.get(t2.rr),i=f8.n.atlas;if(!f8.n.atlas)return void t.error("No texture atlas found");let n=i.getStats();t.info(["Texture atlas stats",...n].join("\n\n"))});break;case"saveTextureAtlas":i.invokeFunction(async e=>{let t=e.get(i$.VR),i=e.get(g8),n=t.getWorkspace().folders;if(n.length>0){let e=f8.n.atlas,t=[];for(let[s,o]of e.pages.entries())t.push(i.writeFile(i_.r.joinPath(n[0].uri,`textureAtlasPage${s}_actual.png`),f3.MB.wrap(new Uint8Array(await (await o.source.convertToBlob()).arrayBuffer()))),i.writeFile(i_.r.joinPath(n[0].uri,`textureAtlasPage${s}_usage.png`),f3.MB.wrap(new Uint8Array(await (await o.getUsagePreview()).arrayBuffer()))));await Promise.all(t)}});break;case"drawGlyph":i.invokeFunction(async e=>{let t=e.get(to.pG),i=e.get(g8),n=e.get(ip.GK),s=e.get(i$.VR).getWorkspace().folders;if(0===s.length)return;let o=f8.n.atlas,r=t.getValue("editor.fontFamily"),a=t.getValue("editor.fontSize"),l=new f9.O(a,r,(0,e8.fz)().devicePixelRatio,f8.n.decorationStyleCache),h=await n.input({prompt:"Enter a character to draw (prefix with 0x for code point))"});if(!h)return;let d=h.match(/0x(?<codePoint>[0-9a-f]+)/i)?.groups?.codePoint;void 0!==d&&(h=String.fromCodePoint(parseInt(d,16)));let c=o.getGlyph(l,h,0,0,0);if(!c)return;let u=o.pages[c.pageIndex].source.getContext("2d")?.getImageData(c.x,c.y,c.w,c.h);if(!u)return;let g=new OffscreenCanvas(u.width,u.height);(0,f7.HS)(g.getContext("2d")).putImageData(u,0,0);let p=await g.convertToBlob({type:"image/png"}),m=i_.r.joinPath(s[0].uri,`glyph_${h}_0_${a}px_${r.replaceAll(/[,\\\/\.'\s]/g,"_")}.png`);await i.writeFile(m,f3.MB.wrap(new Uint8Array(await p.arrayBuffer())))})}}}(0,e6.Fl)(f6),function(e){e.NoAutoFocus="noAutoFocus",e.FocusIfVisible="focusIfVisible",e.AutoFocusImmediately="autoFocusImmediately"}(eF||(eF={}));class _e extends e6.ks{constructor(){super({id:oS,label:tn.aS(1102,"Show or Focus Hover"),metadata:{description:tn.aS(1103,"Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[eF.NoAutoFocus,eF.FocusIfVisible,eF.AutoFocusImmediately],enumDescriptions:[tn.kg(1099,"The hover will not automatically take focus."),tn.kg(1100,"The hover will take focus only if it is already visible."),tn.kg(1101,"The hover will automatically take focus when it appears.")],default:eF.FocusIfVisible}}}}]},precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:(0,tS.m5)(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;let n=lE.get(t);if(!n)return;let s=i?.focus,o=eF.FocusIfVisible;Object.values(eF).includes(s)?o=s:"boolean"==typeof s&&s&&(o=eF.AutoFocusImmediately);let r=e=>{let i=t.getPosition(),s=new tO.Q(i.lineNumber,i.column,i.lineNumber,i.column);n.showContentHover(s,1,2,e)},a=2===t.getOption(2);n.isHoverVisible?o!==eF.NoAutoFocus?n.focus():r(a):r(a||o===eF.AutoFocusImmediately)}}class _t extends e6.ks{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:tn.aS(1104,"Show Definition Preview Hover"),precondition:void 0,metadata:{description:tn.aS(1105,"Show the definition preview hover in the editor.")}})}run(e,t){let i=lE.get(t);if(!i)return;let n=t.getPosition();if(!n)return;let s=new tO.Q(n.lineNumber,n.column,n.lineNumber,n.column),o=fN.get(t);o&&o.startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,2,!0)})}}class _i extends e6.ks{constructor(){super({id:"editor.action.hideHover",label:tn.aS(1106,"Hide Hover"),alias:"Hide Content Hover",precondition:void 0})}run(e,t){lE.get(t)?.hideContentHover()}}class _n extends e6.ks{constructor(){super({id:"editor.action.scrollUpHover",label:tn.aS(1107,"Scroll Up Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:16,weight:100},metadata:{description:tn.aS(1108,"Scroll up the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.scrollUp()}}class _s extends e6.ks{constructor(){super({id:"editor.action.scrollDownHover",label:tn.aS(1109,"Scroll Down Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:18,weight:100},metadata:{description:tn.aS(1110,"Scroll down the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.scrollDown()}}class _o extends e6.ks{constructor(){super({id:"editor.action.scrollLeftHover",label:tn.aS(1111,"Scroll Left Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:15,weight:100},metadata:{description:tn.aS(1112,"Scroll left the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.scrollLeft()}}class _r extends e6.ks{constructor(){super({id:"editor.action.scrollRightHover",label:tn.aS(1113,"Scroll Right Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:17,weight:100},metadata:{description:tn.aS(1114,"Scroll right the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.scrollRight()}}class _a extends e6.ks{constructor(){super({id:"editor.action.pageUpHover",label:tn.aS(1115,"Page Up Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:tn.aS(1116,"Page up the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.pageUp()}}class _l extends e6.ks{constructor(){super({id:"editor.action.pageDownHover",label:tn.aS(1117,"Page Down Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:tn.aS(1118,"Page down the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.pageDown()}}class _h extends e6.ks{constructor(){super({id:"editor.action.goToTopHover",label:tn.aS(1119,"Go To Top Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:tn.aS(1120,"Go to the top of the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.goToTop()}}class _d extends e6.ks{constructor(){super({id:"editor.action.goToBottomHover",label:tn.aS(1121,"Go To Bottom Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:tn.aS(1122,"Go to the bottom of the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.goToBottom()}}class _c extends e6.ks{constructor(){super({id:ok,label:ox,alias:"Increase Hover Verbosity Level",precondition:ti.R.hoverVisible})}run(e,t,i){let n=lE.get(t);if(!n)return;let s=i?.index!==void 0?i.index:n.focusedHoverPartIndex();n.updateHoverVerbosityLevel(iD.M$.Increase,s,i?.focus)}}class _u extends e6.ks{constructor(){super({id:oL,label:oD,alias:"Decrease Hover Verbosity Level",precondition:ti.R.hoverVisible})}run(e,t,i){let n=lE.get(t);if(!n)return;let s=i?.index!==void 0?i.index:n.focusedHoverPartIndex();lE.get(t)?.updateHoverVerbosityLevel(iD.M$.Decrease,s,i?.focus)}}var _g=i(20872),_p=function(e,t){return function(i,n){t(i,n,e)}};let _m=e8.$;class _f{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let __={type:1,filter:{include:n9.QuickFix},triggerAction:H.QuickFixHover},_v=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];let i=this._editor.getModel(),n=e.range;if(!i.isValidRange(e.range))return[];let s=n.startLineNumber,o=i.getLineMaxColumn(s),r=[];for(let n of t){let t=n.range.startLineNumber===s?n.range.startColumn:1,a=n.range.endLineNumber===s?n.range.endColumn:o,l=this._markerDecorationsService.getMarker(i.uri,n);if(!l)continue;let h=new tO.Q(e.range.startLineNumber,t,e.range.startLineNumber,a);r.push(new _f(this,h,l))}return r}renderHoverParts(e,t){if(!t.length)return new on([]);let i=[];t.forEach(t=>{let n=this._renderMarkerHover(t);e.fragment.appendChild(n.hoverElement),i.push(n)});let n=1===t.length?t[0]:t.sort((e,t)=>sg.cj.compare(e.marker.severity,t.marker.severity))[0];return new on(i,this._renderMarkerStatusbar(e,n))}_renderMarkerHover(e){let t=new tT.Cm,i=_m("div.hover-row"),n=e8.BC(i,_m("div.marker.hover-contents")),{source:s,message:o,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);let l=e8.BC(n,_m("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=o,s||r)if(r&&"string"!=typeof r){let e=_m("span");s&&(e8.BC(e,_m("span")).innerText=s);let i=e8.BC(e,_m("a.code-link"));i.setAttribute("href",r.target.toString(!0)),t.add(e8.ko(i,"click",e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()})),e8.BC(i,_m("span")).innerText=r.value;let o=e8.BC(n,e);o.style.opacity="0.6",o.style.paddingLeft="6px"}else{let e=e8.BC(n,_m("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=s&&r?`${s}(${r})`:s||`(${r})`}if((0,t8.EI)(a))for(let{message:e,resource:i,startLineNumber:s,startColumn:o}of a){let r=e8.BC(n,_m("div"));r.style.marginTop="8px";let a=e8.BC(r,_m("a"));a.innerText=`${(0,ij.P8)(i)}(${s}, ${o}): `,a.style.cursor="pointer",t.add(e8.ko(a,"click",e=>{if(e.stopPropagation(),e.preventDefault(),this._openerService){let e={selection:{startLineNumber:s,startColumn:o}};this._openerService.open(i,{fromUserGesture:!0,editorOptions:e}).catch(ih.dz)}}));let l=e8.BC(r,_m("span"));l.innerText=e,this._editor.applyFontInfo(l)}return{hoverPart:e,hoverElement:i,dispose:()=>t.dispose()}}_renderMarkerStatusbar(e,t){let i=new tT.Cm;if(t.marker.severity===sg.cj.Error||t.marker.severity===sg.cj.Warning||t.marker.severity===sg.cj.Info){let i=fZ.get(this._editor);i&&e.statusBar.addAction({label:tn.kg(1132,"View Problem"),commandId:fJ.ID,run:()=>{e.hide(),i.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(104)){let n=e.statusBar.append(_m("div"));this.recentMarkerCodeActionsInfo&&(sg.oc.makeKey(this.recentMarkerCodeActionsInfo.marker)===sg.oc.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=tn.kg(1133,"No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);let s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?tT.jG.None:(0,tM.EQ)(()=>n.textContent=tn.kg(1134,"Checking for quick fixes..."),200,i);n.textContent||(n.textContent=String.fromCharCode(160));let o=this.getCodeActions(t.marker);i.add((0,tT.s)(()=>o.cancel())),o.then(o=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){o.dispose(),n.textContent=tn.kg(1135,"No quick fixes available");return}n.style.display="none";let r=!1;i.add((0,tT.s)(()=>{r||o.dispose()})),e.statusBar.addAction({label:tn.kg(1136,"Quick Fix..."),commandId:si,run:t=>{r=!0;let i=sO.get(this._editor),n=e8.BK(t);e.hide(),i?.showCodeActions(__,o,{x:n.left,y:n.top,width:n.width,height:n.height})}});let a=o.validActions.find(e=>e.action.isAI);a&&e.statusBar.addAction({label:a.action.title,commandId:a.action.command?.id??"",iconClass:iM.L.asClassName(e9.W.sparkle),run:()=>{let e=sO.get(this._editor);e?.applyCodeAction(a,!1,!1,V.FromProblemsHover)}}),e.onContentsChanged()},ih.dz)}return i}getCodeActions(e){return(0,tM.SS)(t=>sd(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new tO.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),__,ig.ke.None,t))}};_v=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([_p(1,_g.A),_p(2,iB.Cr),_p(3,iI.u)],_v);class _b{constructor(e){this._editor=e}computeSync(e){let t=e=>({value:e}),i=this._editor.getLineDecorations(e.lineNumber),n=[],s="lineNo"===e.laneOrLine;if(!i)return n;for(let o of i){let i=o.options.glyphMargin?.position??tP.ZS.Center;if(!s&&i!==e.laneOrLine)continue;let r=s?o.options.lineNumberHoverMessage:o.options.glyphMarginHoverMessage;!r||(0,ty.it)(r)||n.push(...(0,t8._j)(r).map(t))}return n}}var _C=function(e,t){return function(i,n){t(i,n,e)}};let _w=e8.$,_y=class extends tT.jG{static{eB=this}static{this.ID="editor.contrib.modesGlyphHoverWidget"}constructor(e,t,i){super(),this._renderDisposeables=this._register(new tT.Cm),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new o2.N4(!0)),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=new iF.T({editor:this._editor},t,i),this._hoverOperation=this._register(new oY(this._editor,new _b(this._editor))),this._register(this._hoverOperation.onResult(e=>this._withResult(e))),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(59)&&this._updateFont()})),this._register(e8.un(this._hover.containerDomNode,"mouseleave",e=>{this._onMouseLeave(e)})),this._editor.addOverlayWidget(this)}dispose(){this._hoverComputerOptions=void 0,this._editor.removeOverlayWidget(this),super.dispose()}getId(){return eB.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(e=>this._editor.applyFontInfo(e))}_onModelDecorationsChanged(){this._isVisible&&this._hoverComputerOptions&&(this._hoverOperation.cancel(),this._hoverOperation.start(0,this._hoverComputerOptions))}showsOrWillShow(e){let t=e.target;return 2===t.type&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):3===t.type&&(this._startShowingAt(t.position.lineNumber,"lineNo"),!0)}_startShowingAt(e,t){this._hoverComputerOptions&&this._hoverComputerOptions.lineNumber===e&&this._hoverComputerOptions.laneOrLine===t||(this._hoverOperation.cancel(),this.hide(),this._hoverComputerOptions={lineNumber:e,laneOrLine:t},this._hoverOperation.start(0,this._hoverComputerOptions))}hide(){this._hoverComputerOptions=void 0,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e.value,this._messages.length>0?this._renderMessages(e.options.lineNumber,e.options.laneOrLine,this._messages):this.hide()}_renderMessages(e,t,i){this._renderDisposeables.clear();let n=document.createDocumentFragment();for(let e of i){let t=_w("div.hover-row.markdown-hover"),i=e8.BC(t,_w("div.hover-contents")),s=this._renderDisposeables.add(this._markdownRenderer.render(e.value));i.appendChild(s.element),n.appendChild(t)}this._updateContents(n),this._showAt(e,t)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e,t){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));let i=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),s=this._editor.getScrollTop(),o=this._editor.getOption(75),r=this._hover.containerDomNode.clientHeight,a=i.glyphMarginLeft+i.glyphMarginWidth+("lineNo"===t?i.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${a}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(n-s-(r-o)/2),0)}px`,this._hover.containerDomNode.style.zIndex="11"}_onMouseLeave(e){let t=this._editor.getDomNode();t&&oq(t,e.x,e.y)||this.hide()}};_y=eB=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([_C(1,rs.L),_C(2,iB.Cr)],_y);let _S=class extends tT.jG{static{this.ID="editor.contrib.marginHover"}constructor(e,t){super(),this._editor=e,this._instantiationService=t,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new tT.Cm,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new tM.uC(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(69)&&(this._unhookListeners(),this._hookListeners())}))}_hookListeners(){let e=this._editor.getOption(69);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(e=>this._onEditorMouseDown(e))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(e=>this._onEditorMouseMove(e))),this._listenersStore.add(this._editor.onKeyDown(e=>this._onKeyDown(e)))):(this._listenersStore.add(this._editor.onMouseMove(e=>this._onEditorMouseMove(e))),this._listenersStore.add(this._editor.onKeyDown(e=>this._onKeyDown(e)))),this._listenersStore.add(this._editor.onMouseLeave(e=>this._onEditorMouseLeave(e))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this.hideGlyphHover()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(e=>this._onEditorScrollChanged(e)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this.hideGlyphHover()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,this._isMouseOnGlyphHoverWidget(e)||this.hideGlyphHover()}_isMouseOnGlyphHoverWidget(e){let t=this._glyphWidget?.getDomNode();return!!t&&oq(t,e.event.posx,e.event.posy)}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){if(!this.shouldKeepOpenOnEditorMouseMoveOrLeave)this._cancelScheduler(),this._isMouseOnGlyphHoverWidget(e)||this.hideGlyphHover()}_shouldNotRecomputeCurrentHoverWidget(e){let t=this._hoverSettings.sticky,i=this._isMouseOnGlyphHoverWidget(e);return t&&i}_onEditorMouseMove(e){if(!this.shouldKeepOpenOnEditorMouseMoveOrLeave){if(this._mouseMoveEvent=e,this._shouldNotRecomputeCurrentHoverWidget(e))return void this._reactToEditorMouseMoveRunner.cancel();this._reactToEditorMouseMove(e)}}_reactToEditorMouseMove(e){!e||this._tryShowHoverWidget(e)||this.hideGlyphHover()}_tryShowHoverWidget(e){return this._getOrCreateGlyphWidget().showsOrWillShow(e)}_onKeyDown(e){this._editor.hasModel()&&5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this.hideGlyphHover()}hideGlyphHover(){this._glyphWidget?.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(_y,this._editor)),this._glyphWidget}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._glyphWidget?.dispose()}};_S=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(D=t5._Y,function(e,t){D(e,t,1)})],_S);class _k{}class _x{}class _L{}(0,e6.HW)(lE.ID,lE,2),(0,e6.HW)(_S.ID,_S,2),(0,e6.Fl)(_e),(0,e6.Fl)(_t),(0,e6.Fl)(_i),(0,e6.Fl)(_n),(0,e6.Fl)(_s),(0,e6.Fl)(_o),(0,e6.Fl)(_r),(0,e6.Fl)(_a),(0,e6.Fl)(_l),(0,e6.Fl)(_h),(0,e6.Fl)(_d),(0,e6.Fl)(_c),(0,e6.Fl)(_u),os.register(rm),os.register(_v),(0,tB.zy)((e,t)=>{let i=e.getColor(tF.oZ8);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))}),c$.register(new _k),c$.register(new _x),c$.register(new _L);var _D=i(62904);function _I(e,t){let i=0;for(let n=0;n<e.length;n++)" "===e.charAt(n)?i+=t:i++;return i}function _N(e,t,i){e=e<0?0:e;let n="";if(!i){let i=Math.floor(e/t);e%=t;for(let e=0;e<i;e++)n+=" "}for(let t=0;t<e;t++)n+=" ";return n}var _E=i(91587),_M=i(24862),_T=i(54976);function _R(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];let s=t.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;if(!s)return[];let o=new _T.no(e,s,t);for(n=Math.min(n,e.getLineCount());i<=n&&o.shouldIgnore(i);)i++;if(i>n-1)return[];let{tabSize:r,indentSize:a,insertSpaces:l}=e.getOptions(),h=(e,t)=>(t=t||1,_D.Y.shiftIndent(e,e.length+t,r,a,l)),d=(e,t)=>(t=t||1,_D.Y.unshiftIndent(e,e.length+t,r,a,l)),c=[],u=e.getLineContent(i),g=iE.UU(u),p=g;o.shouldIncrease(i)?(p=h(p),g=h(g)):o.shouldIndentNextLine(i)&&(p=h(p)),i++;for(let t=i;t<=n;t++){var m,f;if(m=e,f=t,m.tokenization.isCheapToTokenize(f)&&2===m.tokenization.getLineTokens(f).getStandardTokenType(0))continue;let i=e.getLineContent(t),n=iE.UU(i),s=p;o.shouldDecrease(t,s)&&(p=d(p),g=d(g)),n!==p&&c.push(rj.k.replaceMove(new tk.L(t,1,t,n.length+1),(0,_M.P)(p,a,l))),o.shouldIgnore(t)||(p=o.shouldIncrease(t,s)?g=h(g):o.shouldIndentNextLine(t,s)?h(p):g)}return c}class _O extends e6.ks{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:_O.ID,label:tn.aS(1141,"Convert Indentation to Spaces"),precondition:ti.R.writable,metadata:{description:tn.aS(1142,"Convert the tab indentation to spaces.")}})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),s=t.getSelection();if(!s)return;let o=new _K(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}class _P extends e6.ks{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:_P.ID,label:tn.aS(1143,"Convert Indentation to Tabs"),precondition:ti.R.writable,metadata:{description:tn.aS(1144,"Convert the spaces indentation to tabs.")}})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),s=t.getSelection();if(!s)return;let o=new _G(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}class _A extends e6.ks{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){let i=e.get(ip.GK),n=e.get(n3.S),s=t.getModel();if(!s)return;let o=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),r=s.getOptions(),a=[1,2,3,4,5,6,7,8].map(e=>({id:e.toString(),label:e.toString(),description:e===o.tabSize&&e===r.tabSize?tn.kg(1137,"Configured Tab Size"):e===o.tabSize?tn.kg(1138,"Default Tab Size"):e===r.tabSize?tn.kg(1139,"Current Tab Size"):void 0})),l=Math.min(s.getOptions().tabSize-1,7);setTimeout(()=>{i.pick(a,{placeHolder:tn.kg(1140,"Select Tab Size for Current File"),activeItem:a[l]}).then(e=>{if(e&&s&&!s.isDisposed()){let t=parseInt(e.label,10);this.displaySizeOnly?s.updateOptions({tabSize:t}):s.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}})},50)}}class _F extends _A{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:_F.ID,label:tn.aS(1145,"Indent Using Tabs"),precondition:void 0,metadata:{description:tn.aS(1146,"Use indentation with tabs.")}})}}class _B extends _A{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:_B.ID,label:tn.aS(1147,"Indent Using Spaces"),precondition:void 0,metadata:{description:tn.aS(1148,"Use indentation with spaces.")}})}}class _W extends _A{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:_W.ID,label:tn.aS(1149,"Change Tab Display Size"),precondition:void 0,metadata:{description:tn.aS(1150,"Change the space size equivalent of the tab.")}})}}class _H extends e6.ks{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:_H.ID,label:tn.aS(1151,"Detect Indentation from Content"),precondition:void 0,metadata:{description:tn.aS(1152,"Detect the indentation from content.")}})}run(e,t){let i=e.get(n3.S),n=t.getModel();if(!n)return;let s=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}class _V extends e6.ks{constructor(){super({id:"editor.action.reindentlines",label:tn.aS(1153,"Reindent Lines"),precondition:ti.R.writable,metadata:{description:tn.aS(1154,"Reindent the lines of the editor.")}})}run(e,t){let i=e.get(r1.JZ),n=t.getModel();if(!n)return;let s=_R(n,i,1,n.getLineCount());s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class _z extends e6.ks{constructor(){super({id:"editor.action.reindentselectedlines",label:tn.aS(1155,"Reindent Selected Lines"),precondition:ti.R.writable,metadata:{description:tn.aS(1156,"Reindent the selected lines of the editor.")}})}run(e,t){let i=e.get(r1.JZ),n=t.getModel();if(!n)return;let s=t.getSelections();if(null===s)return;let o=[];for(let e of s){let t=e.startLineNumber,s=e.endLineNumber;if(t!==s&&1===e.endColumn&&s--,1===t){if(t===s)continue}else t--;let r=_R(n,i,t,s);o.push(...r)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class _U{constructor(e,t){for(let i of(this._initialSelection=t,this._edits=[],this._selectionId=null,e))i.range&&"string"==typeof i.text&&this._edits.push(i)}getEditOperations(e,t){for(let e of this._edits)t.addEditOperation(tO.Q.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let _j=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new tT.Cm,this.callOnModel=new tT.Cm,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(!this.editor.getOption(17)||4>this.editor.getOption(16))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){let t=this.editor.getSelections();if(null===t||t.length>1)return;let i=this.editor.getModel();if(!i||this.rangeContainsOnlyWhitespaceCharacters(i,e)||!this.editor.getOption(18)&&function(e,t){let i=t=>2===(0,px.Tf)(e,t);return i(t.getStartPosition())||i(t.getEndPosition())}(i,e)||!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;let n=this.editor.getOption(16),{tabSize:s,indentSize:o,insertSpaces:r}=i.getOptions(),a=[],l={shiftIndent:e=>_D.Y.shiftIndent(e,e.length+1,s,o,r),unshiftIndent:e=>_D.Y.unshiftIndent(e,e.length+1,s,o,r)},h=e.startLineNumber,d=i.getLineContent(h);if(!/\S/.test(d.substring(0,e.startColumn-1))){let e=(0,_E.$f)(n,i,i.getLanguageId(),h,l,this._languageConfigurationService);if(null!==e){let t=iE.UU(d),n=_I(e,s);if(n!==_I(t,s)){let e=_N(n,s,r);a.push({range:new tO.Q(h,1,h,t.length+1),text:e}),d=e+d.substring(t.length)}else{let e=(0,_E.Yb)(i,h,this._languageConfigurationService);if(0===e||8===e)return}}}let c=h;for(;h<e.endLineNumber;){if(!/\S/.test(i.getLineContent(h+1))){h++;continue}break}if(h!==e.endLineNumber){let t=(0,_E.$f)(n,{tokenization:{getLineTokens:e=>i.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===c?d:i.getLineContent(e)},i.getLanguageId(),h+1,l,this._languageConfigurationService);if(null!==t){let n=_I(t,s),o=_I(iE.UU(i.getLineContent(h+1)),s);if(n!==o){let t=n-o;for(let n=h+1;n<=e.endLineNumber;n++){let e=i.getLineContent(n),o=iE.UU(e),l=_N(_I(o,s)+t,s,r);l!==o&&a.push({range:new tO.Q(n,1,n,o.length+1),text:l})}}}}if(a.length>0){this.editor.pushUndoStop();let e=new _U(a,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,t){let i=e=>0===e.trim().length,n=!0;if(t.startLineNumber===t.endLineNumber)n=i(e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1));else for(let s=t.startLineNumber;s<=t.endLineNumber;s++){let o=e.getLineContent(s);if(!(n=s===t.startLineNumber?i(o.substring(t.startColumn-1)):s===t.endLineNumber?i(o.substring(0,t.endColumn-1)):0===e.getLineFirstNonWhitespaceColumn(s)))break}return n}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function _$(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let s="";for(let e=0;e<i;e++)s+=" ";let o=RegExp(s,"gi");for(let i=1,r=e.getLineCount();i<=r;i++){let r=e.getLineFirstNonWhitespaceColumn(i);if(0===r&&(r=e.getLineMaxColumn(i)),1===r)continue;let a=new tO.Q(i,1,i,r),l=e.getValueInRange(a),h=n?l.replace(/\t/ig,s):l.replace(o," ");t.addEditOperation(a,h)}}_j=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(I=r1.JZ,function(e,t){I(e,t,1)})],_j);class _K{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),_$(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class _G{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),_$(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}(0,e6.HW)(_j.ID,_j,2),(0,e6.Fl)(_O),(0,e6.Fl)(_P),(0,e6.Fl)(_F),(0,e6.Fl)(_B),(0,e6.Fl)(_W),(0,e6.Fl)(_H),(0,e6.Fl)(_V),(0,e6.Fl)(_z),(0,e6.HW)(l_.ID,l_,1),os.register(lC);class _q{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new tk.L(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new tk.L(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}i(31575);let _Q=class{static{eW=this}static{this.ID="editor.contrib.inPlaceReplaceController"}static get(e){return e.getContribution(eW.ID)}static{this.DECORATION=tA.kI.register({description:"in-place-replace",className:"valueSetReplacement"})}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){this.currentRequest?.cancel();let i=this.editor.getSelection(),n=this.editor.getModel();if(!n||!i)return;let s=i;if(s.startLineNumber!==s.endLineNumber)return;let o=new iN.$t(this.editor,5),r=n.uri;return this.editorWorkerService.canNavigateValueSet(r)?(this.currentRequest=(0,tM.SS)(e=>this.editorWorkerService.navigateValueSet(r,s,t)),this.currentRequest.then(t=>{if(!t||!t.range||!t.value||!o.validate(this.editor))return;let i=tO.Q.lift(t.range),n=t.range,r=t.value.length-(s.endColumn-s.startColumn);n={startLineNumber:n.startLineNumber,startColumn:n.startColumn,endLineNumber:n.endLineNumber,endColumn:n.startColumn+t.value.length},r>1&&(s=new tk.L(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+r-1));let a=new _q(i,s,t.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,a),this.editor.pushUndoStop(),this.decorations.set([{range:n,options:eW.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=(0,tM.wR)(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(ih.dz)}).catch(ih.dz)):Promise.resolve(void 0)}};_Q=eW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(N=or.w,function(e,t){N(e,t,1)})],_Q);class _Y extends e6.ks{constructor(){super({id:"editor.action.inPlaceReplace.up",label:tn.aS(1230,"Replace with Previous Value"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:3159,weight:100}})}run(e,t){let i=_Q.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class _Z extends e6.ks{constructor(){super({id:"editor.action.inPlaceReplace.down",label:tn.aS(1231,"Replace with Next Value"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:3161,weight:100}})}run(e,t){let i=_Q.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}(0,e6.HW)(_Q.ID,_Q,4),(0,e6.Fl)(_Y),(0,e6.Fl)(_Z);class _X{constructor(e){this._selection=e,this._selectionId=null}getEditOperations(e,t){let i=function(e){let t=e.getLineCount(),i=e.getLineContent(t),n=-1===iE.lT(i);if(t&&!n)return rj.k.insert(new tR.y(t,e.getLineMaxColumn(t)),e.getEOL())}(e);i&&t.addEditOperation(i.range,i.text),this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class _J extends e6.ks{static{this.ID="editor.action.insertFinalNewLine"}constructor(){super({id:_J.ID,label:tn.aS(1232,"Insert Final New Line"),precondition:ti.R.writable})}run(e,t,i){let n=t.getSelection();if(null===n)return;let s=new _X(n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}}(0,e6.Fl)(_J);var _0=i(9020);class _1 extends e6.ks{constructor(){super({id:"expandLineSelection",label:tn.aS(1233,"Expand Line Selection"),precondition:void 0,kbOpts:{weight:0,kbExpr:ti.R.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;let n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,_0.c.expandLineSelection(n,n.getCursorStates())),n.revealAllCursors(i.source,!0)}}(0,e6.Fl)(_1);class _2{constructor(e,t,i){this._selection=e,this._cursors=t,this._selectionId=null,this._trimInRegexesAndStrings=i}getEditOperations(e,t){let i=function(e,t,i){t.sort((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber);for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);let n=[],s=0,o=0,r=t.length;for(let a=1,l=e.getLineCount();a<=l;a++){let l=e.getLineContent(a),h=l.length+1,d=0;if(o<r&&t[o].lineNumber===a&&(d=t[o].column,o++,d===h)||0===l.length)continue;let c=iE.lT(l),u=0;if(-1===c)u=1;else{if(c===l.length-1)continue;u=c+2}if(!i){if(!e.tokenization.hasAccurateTokensForLine(a))continue;let t=e.tokenization.getLineTokens(a),i=t.getStandardTokenType(t.findTokenIndexAtOffset(u));if(2===i||3===i)continue}u=Math.max(d,u),n[s++]=rj.k.delete(new tO.Q(a,u,a,h))}return n}(e,this._cursors,this._trimInRegexesAndStrings);for(let e=0,n=i.length;e<n;e++){let n=i[e];t.addEditOperation(n.range,n.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}var _5=i(91461),_4=i(69745);class _3{constructor(e,t,i){this._selection=e,this._isCopyingDown=t,this._noop=i||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));let n=[];for(let t=i.startLineNumber;t<=i.endLineNumber;t++)n.push(e.getLineContent(t));let s=n.join("\n");""===s&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new tO.Q(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":"\n"):this._isCopyingDown?t.addEditOperation(new tO.Q(i.startLineNumber,1,i.startLineNumber,1),s+"\n"):t.addEditOperation(new tO.Q(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+s),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(0!==this._startLineNumberDelta||0!==this._endLineNumberDelta){let e=i.startLineNumber,t=i.startColumn,n=i.endLineNumber,s=i.endColumn;0!==this._startLineNumberDelta&&(e+=this._startLineNumberDelta,t=1),0!==this._endLineNumberDelta&&(n+=this._endLineNumberDelta,s=1),i=tk.L.createWithDirection(e,t,n,s,this._selectionDirection)}return i}}var _7=i(62450),_9=i(15254);let _8=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let i=()=>e.getLanguageId(),n=(t,i)=>e.getLanguageIdAtPosition(t,i),s=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===s||!this._isMovingDown&&1===this._selection.startLineNumber){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let o=this._selection;o.startLineNumber<o.endLineNumber&&1===o.endColumn&&(this._moveEndPositionDown=!0,o=o.setEndPosition(o.endLineNumber-1,e.getLineMaxColumn(o.endLineNumber-1)));let{tabSize:r,indentSize:a,insertSpaces:l}=e.getOptions(),h=this.buildIndentConverter(r,a,l);if(o.startLineNumber===o.endLineNumber&&1===e.getLineMaxColumn(o.startLineNumber)){let i=o.startLineNumber,n=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(n)?t.addEditOperation(new tO.Q(1,1,1,1),null):(t.addEditOperation(new tO.Q(i,1,i,1),e.getLineContent(n)),t.addEditOperation(new tO.Q(n,1,n,e.getLineMaxColumn(n)),null)),o=new tk.L(n,1,n,1)}else{let s,a;if(this._isMovingDown){s=o.endLineNumber+1,a=e.getLineContent(s),t.addEditOperation(new tO.Q(s-1,e.getLineMaxColumn(s-1),s,e.getLineMaxColumn(s)),null);let d=a;if(this.shouldAutoIndent(e,o)){let c=this.matchEnterRule(e,h,r,s,o.startLineNumber-1);if(null!==c)d=_N(c+_I(iE.UU(e.getLineContent(s)),r),r,l)+this.trimStart(a);else{let t=(0,_E.$f)(this._autoIndent,{tokenization:{getLineTokens:t=>t===o.startLineNumber?e.tokenization.getLineTokens(s):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o.startLineNumber?e.getLineContent(s):e.getLineContent(t)},e.getLanguageIdAtPosition(s,1),o.startLineNumber,h,this._languageConfigurationService);if(null!==t){let i=iE.UU(e.getLineContent(s)),n=_I(t,r);n!==_I(i,r)&&(d=_N(n,r,l)+this.trimStart(a))}}t.addEditOperation(new tO.Q(o.startLineNumber,1,o.startLineNumber,1),d+"\n");let u=this.matchEnterRuleMovingDown(e,h,r,o.startLineNumber,s,d);if(null!==u)0!==u&&this.getIndentEditsOfMovingBlock(e,t,o,r,l,u);else{let a=(0,_E.$f)(this._autoIndent,{tokenization:{getLineTokens:t=>t===o.startLineNumber?e.tokenization.getLineTokens(s):t>=o.startLineNumber+1&&t<=o.endLineNumber+1?e.tokenization.getLineTokens(t-1):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o.startLineNumber?d:t>=o.startLineNumber+1&&t<=o.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)},e.getLanguageIdAtPosition(s,1),o.startLineNumber+1,h,this._languageConfigurationService);if(null!==a){let i=iE.UU(e.getLineContent(o.startLineNumber)),n=_I(a,r),s=_I(i,r);n!==s&&this.getIndentEditsOfMovingBlock(e,t,o,r,l,n-s)}}}else t.addEditOperation(new tO.Q(o.startLineNumber,1,o.startLineNumber,1),d+"\n")}else if(s=o.startLineNumber-1,a=e.getLineContent(s),t.addEditOperation(new tO.Q(s,1,s+1,1),null),t.addEditOperation(new tO.Q(o.endLineNumber,e.getLineMaxColumn(o.endLineNumber),o.endLineNumber,e.getLineMaxColumn(o.endLineNumber)),"\n"+a),this.shouldAutoIndent(e,o)){let a=this.matchEnterRule(e,h,r,o.startLineNumber,o.startLineNumber-2);if(null!==a)0!==a&&this.getIndentEditsOfMovingBlock(e,t,o,r,l,a);else{let a=(0,_E.$f)(this._autoIndent,{tokenization:{getLineTokens:t=>t===s?e.tokenization.getLineTokens(o.startLineNumber):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===s?e.getLineContent(o.startLineNumber):e.getLineContent(t)},e.getLanguageIdAtPosition(o.startLineNumber,1),s,h,this._languageConfigurationService);if(null!==a){let i=iE.UU(e.getLineContent(o.startLineNumber)),n=_I(a,r),s=_I(i,r);n!==s&&this.getIndentEditsOfMovingBlock(e,t,o,r,l,n-s)}}}}this._selectionId=t.trackSelection(o)}buildIndentConverter(e,t,i){return{shiftIndent:n=>_D.Y.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>_D.Y.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let o=s.indentation;s.indentAction===_7.l.None||s.indentAction===_7.l.Indent?o=s.indentation+s.appendText:s.indentAction===_7.l.IndentOutdent?o=s.indentation:s.indentAction===_7.l.Outdent&&(o=t.unshiftIndent(s.indentation)+s.appendText);let r=e.getLineContent(n);if(this.trimStart(r).indexOf(this.trimStart(o))>=0){let s=iE.UU(e.getLineContent(n)),r=iE.UU(o),a=(0,_E.Yb)(e,n,this._languageConfigurationService);return null!==a&&2&a&&(r=t.unshiftIndent(r)),_I(r,i)-_I(s,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,s,o){if(iE.lT(o)>=0){let o=e.getLineMaxColumn(s),r=(0,_9.h)(this._autoIndent,e,new tO.Q(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let s=n-1;for(;s>=1;){let t=e.getLineContent(s);if(iE.lT(t)>=0)break;s--}if(s<1||n>e.getLineCount())return null;let o=e.getLineMaxColumn(s),r=(0,_9.h)(this._autoIndent,e,new tO.Q(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,s,o){let r=s;for(;r>=1;){let t;if(t=r===s&&void 0!==o?o:e.getLineContent(r),iE.lT(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;let a=e.getLineMaxColumn(r),l=(0,_9.h)(this._autoIndent,e,new tO.Q(r,a,r,a),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,l)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;let i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,s,o){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){let a=e.getLineContent(r),l=iE.UU(a),h=_N(_I(l,n)+o,n,s);h!==l&&(t.addEditOperation(new tO.Q(r,1,r,l.length+1),h),r===i.endLineNumber&&i.endColumn<=l.length+1&&""===h&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}};_8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(E=r1.JZ,function(e,t){E(e,t,3)})],_8);var _6=i(37318);class ve{static{this._COLLATOR=_6.x.Collator()}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){let i=function(e,t,i){let n=vt(e,t,i);return n?rj.k.replace(new tO.Q(n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n")):null}(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(null===e)return!1;let n=vt(e,t,i);if(!n)return!1;for(let e=0,t=n.before.length;e<t;e++)if(n.before[e]!==n.after[e])return!0;return!1}}function vt(e,t,i){let n=t.startLineNumber,s=t.endLineNumber;if(1===t.endColumn&&s--,n>=s)return null;let o=[];for(let t=n;t<=s;t++)o.push(e.getLineContent(t));let r=o.slice(0);return r.sort(ve._COLLATOR.value.compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:s,before:o,after:r}}class vi extends e6.ks{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;let i=t.getSelections().map((e,t)=>({selection:e,index:t,ignore:!1}));i.sort((e,t)=>tO.Q.compareRangesUsingStarts(e.selection,t.selection));let n=i[0];for(let e=1;e<i.length;e++){let t=i[e];n.selection.endLineNumber===t.selection.startLineNumber&&(n.index<t.index?t.ignore=!0:(n.ignore=!0,n=t))}let s=[];for(let e of i)s.push(new _3(e.selection,this.down,e.ignore));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class vn extends vi{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:tn.aS(1239,"Copy Line Up"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"2_line",title:tn.kg(1234,"&&Copy Line Up"),order:1}})}}class vs extends vi{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:tn.aS(1240,"Copy Line Down"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"2_line",title:tn.kg(1235,"Co&&py Line Down"),order:2}})}}class vo extends e6.ks{constructor(){super({id:"editor.action.duplicateSelection",label:tn.aS(1241,"Duplicate Selection"),precondition:ti.R.writable,menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"2_line",title:tn.kg(1236,"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;let n=[],s=t.getSelections(),o=t.getModel();for(let e of s)if(e.isEmpty())n.push(new _3(e,!0));else{let t=new tk.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn);n.push(new tQ.tA(t,o.getValueInRange(e)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class vr extends e6.ks{constructor(e,t){super(t),this.down=e}run(e,t){let i=e.get(r1.JZ),n=[],s=t.getSelections()||[],o=t.getOption(16);for(let e of s)n.push(new _8(e,this.down,o,i));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class va extends vr{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:tn.aS(1242,"Move Line Up"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"2_line",title:tn.kg(1237,"Mo&&ve Line Up"),order:3}})}}class vl extends vr{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:tn.aS(1243,"Move Line Down"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"2_line",title:tn.kg(1238,"Move &&Line Down"),order:4}})}}class vh extends e6.ks{constructor(e,t){super(t),this.descending=e}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=t.getSelections();for(let e of(1===n.length&&n[0].isEmpty()&&(n=[new tk.L(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))]),n))if(!ve.canRun(t.getModel(),e,this.descending))return;let s=[];for(let e=0,t=n.length;e<t;e++)s[e]=new ve(n[e],this.descending);t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class vd extends vh{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:tn.aS(1244,"Sort Lines Ascending"),precondition:ti.R.writable})}}class vc extends vh{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:tn.aS(1245,"Sort Lines Descending"),precondition:ti.R.writable})}}class vu extends e6.ks{constructor(){super({id:"editor.action.removeDuplicateLines",label:tn.aS(1246,"Delete Duplicate Lines"),precondition:ti.R.writable})}run(e,t){if(!t.hasModel())return;let i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;let n=[],s=[],o=0,r=!0,a=t.getSelections();for(let e of(1===a.length&&a[0].isEmpty()&&(a=[new tk.L(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))],r=!1),a)){let t=new Set,r=[];for(let n=e.startLineNumber;n<=e.endLineNumber;n++){let e=i.getLineContent(n);t.has(e)||(r.push(e),t.add(e))}let a=new tk.L(e.startLineNumber,1,e.endLineNumber,i.getLineMaxColumn(e.endLineNumber)),l=e.startLineNumber-o,h=new tk.L(l,1,l+r.length-1,r[r.length-1].length);n.push(rj.k.replace(a,r.join("\n"))),s.push(h),o+=e.endLineNumber-e.startLineNumber+1-r.length}t.pushUndoStop(),t.executeEdits(this.id,n,r?s:void 0),t.pushUndoStop()}}class vg extends e6.ks{constructor(){super({id:"editor.action.reverseLines",label:tn.aS(1247,"Reverse lines"),precondition:ti.R.writable})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=t.getSelections(),s=n;1===s.length&&s[0].isEmpty()&&(s=[new tk.L(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))]);let o=[],r=[];for(let e=0;e<s.length;e++){let t=s[e],a=n[e],l=t.endLineNumber;t.startLineNumber<t.endLineNumber&&1===t.endColumn&&l--;let h=new tO.Q(t.startLineNumber,1,l,i.getLineMaxColumn(l));l===i.getLineCount()&&""===i.getLineContent(h.endLineNumber)&&(h=h.setEndPosition(h.endLineNumber-1,i.getLineMaxColumn(h.endLineNumber-1)));let d=[];for(let e=h.endLineNumber;e>=h.startLineNumber;e--)d.push(i.getLineContent(e));let c=rj.k.replace(h,d.join("\n"));o.push(c);let u=function(e){return e<=h.endLineNumber?h.endLineNumber-e+h.startLineNumber:e};r.push(function(e){if(e.isEmpty())return new tk.L(u(e.positionLineNumber),e.positionColumn,u(e.positionLineNumber),e.positionColumn);{let t=u(e.selectionStartLineNumber),i=u(e.positionLineNumber),n=e.selectionStartColumn,s=e.positionColumn;return new tk.L(t,n,i,s)}}(a))}t.pushUndoStop(),t.executeEdits(this.id,o,r),t.pushUndoStop()}}class vp extends e6.ks{static{this.ID="editor.action.trimTrailingWhitespace"}constructor(){super({id:vp.ID,label:tn.aS(1248,"Trim Trailing Whitespace"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:(0,tS.m5)(2089,2102),weight:100}})}run(e,t,i){let n=[];"auto-save"===i.reason&&(n=(t.getSelections()||[]).map(e=>new tR.y(e.positionLineNumber,e.positionColumn)));let s=t.getSelection();if(null===s)return;let o=e.get(to.pG),r=t.getModel(),a=new _2(s,n,o.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:r?.getLanguageId(),resource:r?.uri}));t.pushUndoStop(),t.executeCommands(this.id,[a]),t.pushUndoStop()}}class vm extends e6.ks{constructor(){super({id:"editor.action.deleteLines",label:tn.aS(1249,"Delete Line"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let s=0,o=[],r=[];for(let e=0,t=i.length;e<t;e++){let t=i[e],a=t.startLineNumber,l=t.endLineNumber,h=1,d=n.getLineMaxColumn(l);l<n.getLineCount()?(l+=1,d=1):a>1&&(a-=1,h=n.getLineMaxColumn(a)),o.push(rj.k.replace(new tk.L(a,h,l,d),"")),r.push(new tk.L(a-s,t.positionColumn,a-s,t.positionColumn)),s+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,r),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(e=>{let t=e.endLineNumber;return e.startLineNumber<e.endLineNumber&&1===e.endColumn&&(t-=1),{startLineNumber:e.startLineNumber,selectionStartColumn:e.selectionStartColumn,endLineNumber:t,positionColumn:e.positionColumn}});t.sort((e,t)=>e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber);let i=[],n=t[0];for(let e=1;e<t.length;e++)n.endLineNumber+1>=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class vf extends e6.ks{constructor(){super({id:"editor.action.indentLines",label:tn.aS(1250,"Indent Line"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:2142,weight:100}})}run(e,t){let i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,_5.T.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class v_ extends e6.ks{constructor(){super({id:"editor.action.outdentLines",label:tn.aS(1251,"Outdent Line"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:2140,weight:100}})}run(e,t){e3.Yh.Outdent.runEditorCommand(e,t,null)}}class vv extends e6.ks{constructor(){super({id:"editor.action.insertLineBefore",label:tn.aS(1252,"Insert Line Above"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:3075,weight:100}})}run(e,t){let i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,_4.AO.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class vb extends e6.ks{constructor(){super({id:"editor.action.insertLineAfter",label:tn.aS(1253,"Insert Line Below"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:2051,weight:100}})}run(e,t){let i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,_4.AO.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class vC extends e6.ks{run(e,t){if(!t.hasModel())return;let i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let e=0,t=n.length-1;e<t;e++){let t=n[e],i=n[e+1];null===tO.Q.intersectRanges(t,i)?s.push(t):n[e+1]=tO.Q.plusRange(t,i)}s.push(n[n.length-1]);let o=this._getEndCursorState(i,s),r=s.map(e=>rj.k.replace(e,""));t.pushUndoStop(),t.executeEdits(this.id,r,o),t.pushUndoStop()}}class vw extends vC{constructor(){super({id:"deleteAllLeft",label:tn.aS(1254,"Delete All Left"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null,n=[],s=0;return t.forEach(t=>{let o;if(1===t.endColumn&&s>0){let e=t.startLineNumber-s;o=new tk.L(e,t.startColumn,e,t.startColumn)}else o=new tk.L(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);s+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=o:n.push(o)}),i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getSelections();if(null===t)return[];let i=t,n=e.getModel();return null===n?[]:(i.sort(tO.Q.compareRangesUsingStarts),i=i.map(e=>{if(!e.isEmpty())return new tO.Q(e.startLineNumber,1,e.endLineNumber,e.endColumn);if(1!==e.startColumn)return new tO.Q(e.startLineNumber,1,e.startLineNumber,e.startColumn);{let t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineLength(t)+1;return new tO.Q(t,i,e.startLineNumber,1)}}))}}class vy extends vC{constructor(){super({id:"deleteAllRight",label:tn.aS(1255,"Delete All Right"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null,n=[];for(let s=0,o=t.length;s<o;s++){let o=t[s],r=new tk.L(o.startLineNumber-0,o.startColumn,o.startLineNumber-0,o.startColumn);o.intersectRanges(e)?i=r:n.push(r)}return i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getModel();if(null===t)return[];let i=e.getSelections();if(null===i)return[];let n=i.map(e=>{if(e.isEmpty()){let i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new tO.Q(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new tO.Q(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e});return n.sort(tO.Q.compareRangesUsingStarts),n}}class vS extends e6.ks{constructor(){super({id:"editor.action.joinLines",label:tn.aS(1256,"Join Lines"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(tO.Q.compareRangesUsingStarts);let s=[],o=i.reduce((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(s.push(e),t):new tk.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(s.push(e),t):new tk.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn));s.push(o);let r=t.getModel();if(null===r)return;let a=[],l=[],h=n,d=0;for(let e=0,t=s.length;e<t;e++){let t,i,o=s[e],c=o.startLineNumber,u=0,g=r.getLineLength(o.endLineNumber)-o.endColumn;if(o.isEmpty()||o.startLineNumber===o.endLineNumber){let e=o.getStartPosition();e.lineNumber<r.getLineCount()?(t=c+1,i=r.getLineMaxColumn(t)):(t=e.lineNumber,i=r.getLineMaxColumn(e.lineNumber))}else t=o.endLineNumber,i=r.getLineMaxColumn(t);let p=r.getLineContent(c);for(let e=c+1;e<=t;e++){let t=r.getLineContent(e),i=r.getLineFirstNonWhitespaceColumn(e);if(i>=1){let e=!0;""===p&&(e=!1),e&&(" "===p.charAt(p.length-1)||" "===p.charAt(p.length-1))&&(e=!1,p=p.replace(/[\s\uFEFF\xA0]+$/g," "));let n=t.substr(i-1);p+=(e?" ":"")+n,u=e?n.length+1:n.length}else u=0}let m=new tO.Q(c,1,t,i);if(!m.isEmpty()){let e;o.isEmpty()?(a.push(rj.k.replace(m,p)),e=new tk.L(m.startLineNumber-d,p.length-u+1,c-d,p.length-u+1)):o.startLineNumber===o.endLineNumber?(a.push(rj.k.replace(m,p)),e=new tk.L(o.startLineNumber-d,o.startColumn,o.endLineNumber-d,o.endColumn)):(a.push(rj.k.replace(m,p)),e=new tk.L(o.startLineNumber-d,o.startColumn,o.startLineNumber-d,p.length-g)),null!==tO.Q.intersectRanges(m,n)?h=e:l.push(e)}d+=m.endLineNumber-m.startLineNumber}l.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}class vk extends e6.ks{constructor(){super({id:"editor.action.transpose",label:tn.aS(1257,"Transpose Characters around the Cursor"),precondition:ti.R.writable})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let s=[];for(let e=0,t=i.length;e<t;e++){let t=i[e];if(!t.isEmpty())continue;let o=t.getStartPosition(),r=n.getLineMaxColumn(o.lineNumber);if(o.column>=r){if(o.lineNumber===n.getLineCount())continue;let e=new tO.Q(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");s.push(new tQ.iu(new tk.L(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t))}else{let e=new tO.Q(o.lineNumber,Math.max(1,o.column-1),o.lineNumber,o.column+1),t=n.getValueInRange(e).split("").reverse().join("");s.push(new tQ.ui(e,t,new tk.L(o.lineNumber,o.column+1,o.lineNumber,o.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class vx extends e6.ks{run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let s=t.getOption(148),o=[];for(let e of i)if(e.isEmpty()){let i=e.getStartPosition(),r=t.getConfiguredWordAtPosition(i);if(!r)continue;let a=new tO.Q(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),l=n.getValueInRange(a);o.push(rj.k.replace(a,this._modifyText(l,s)))}else{let t=n.getValueInRange(e);o.push(rj.k.replace(e,this._modifyText(t,s)))}t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop()}}class vL extends vx{constructor(){super({id:"editor.action.transformToUppercase",label:tn.aS(1258,"Transform to Uppercase"),precondition:ti.R.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class vD extends vx{constructor(){super({id:"editor.action.transformToLowercase",label:tn.aS(1259,"Transform to Lowercase"),precondition:ti.R.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class vI{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class vN extends vx{static{this.titleBoundary=new vI("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu")}constructor(){super({id:"editor.action.transformToTitlecase",label:tn.aS(1260,"Transform to Title Case"),precondition:ti.R.writable})}_modifyText(e,t){let i=vN.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,e=>e.toLocaleUpperCase()):e}}class vE extends vx{static{this.caseBoundary=new vI("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new vI("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu")}constructor(){super({id:"editor.action.transformToSnakecase",label:tn.aS(1261,"Transform to Snake Case"),precondition:ti.R.writable})}_modifyText(e,t){let i=vE.caseBoundary.get(),n=vE.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}class vM extends vx{static{this.singleLineWordBoundary=new vI("[_\\s-]+","gm")}static{this.multiLineWordBoundary=new vI("[_-]+","gm")}static{this.validWordStart=new vI("^(\\p{Lu}[^\\p{Lu}])","gmu")}constructor(){super({id:"editor.action.transformToCamelcase",label:tn.aS(1262,"Transform to Camel Case"),precondition:ti.R.writable})}_modifyText(e,t){let i=/\r\n|\r|\n/.test(e)?vM.multiLineWordBoundary.get():vM.singleLineWordBoundary.get(),n=vM.validWordStart.get();if(!i||!n)return e;let s=e.split(i);return s.shift()?.replace(n,e=>e.toLocaleLowerCase())+s.map(e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1)).join("")}}class vT extends vx{static{this.wordBoundary=new vI("[_ \\t-]","gm")}static{this.wordBoundaryToMaintain=new vI("(?<=\\.)","gm")}constructor(){super({id:"editor.action.transformToPascalcase",label:tn.aS(1263,"Transform to Pascal Case"),precondition:ti.R.writable})}_modifyText(e,t){let i=vT.wordBoundary.get(),n=vT.wordBoundaryToMaintain.get();return i&&n?e.split(n).map(e=>e.split(i)).flat().map(e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1)).join(""):e}}class vR extends vx{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(e=>e.isSupported())}static{this.caseBoundary=new vI("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new vI("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu")}static{this.underscoreBoundary=new vI("(\\S)(_)(\\S)","gm")}constructor(){super({id:"editor.action.transformToKebabcase",label:tn.aS(1264,"Transform to Kebab Case"),precondition:ti.R.writable})}_modifyText(e,t){let i=vR.caseBoundary.get(),n=vR.singleLetters.get(),s=vR.underscoreBoundary.get();return i&&n&&s?e.replace(s,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}(0,e6.Fl)(vn),(0,e6.Fl)(vs),(0,e6.Fl)(vo),(0,e6.Fl)(va),(0,e6.Fl)(vl),(0,e6.Fl)(vd),(0,e6.Fl)(vc),(0,e6.Fl)(vu),(0,e6.Fl)(vp),(0,e6.Fl)(vm),(0,e6.Fl)(vf),(0,e6.Fl)(v_),(0,e6.Fl)(vv),(0,e6.Fl)(vb),(0,e6.Fl)(vw),(0,e6.Fl)(vy),(0,e6.Fl)(vS),(0,e6.Fl)(vk),(0,e6.Fl)(vL),(0,e6.Fl)(vD),(0,e6.Fl)(vg),vE.caseBoundary.isSupported()&&vE.singleLetters.isSupported()&&(0,e6.Fl)(vE),vM.singleLineWordBoundary.isSupported()&&vM.multiLineWordBoundary.isSupported()&&(0,e6.Fl)(vM),vT.wordBoundary.isSupported()&&(0,e6.Fl)(vT),vN.titleBoundary.isSupported()&&(0,e6.Fl)(vN),vR.isSupported()&&(0,e6.Fl)(vR),i(94191);var vO=function(e,t){return function(i,n){t(i,n,e)}};let vP=new tr.N1("LinkedEditingInputVisible",!1),vA=class extends tT.jG{static{eH=this}static{this.ID="editor.contrib.linkedEditing"}static{this.DECORATION=tA.kI.register({description:"linked-editing",stickiness:0,className:"linked-editing-decoration"})}static get(e){return e.getContribution(eH.ID)}constructor(e,t,i,n,s){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new tT.Cm),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=vP.bindTo(t),this._debounceInformation=s.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new tT.Cm),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(e=>{(e.hasChanged(78)||e.hasChanged(106))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){let t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(78)||this._editor.getOption(106))&&this._providers.has(t);if(i===this._enabled&&!e||(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t))return;this._localToDispose.add(iA.Jh.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));let n=new tM.ve(this._debounceInformation.get(t)),s=()=>{this._rangeUpdateTriggerPromise=n.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(t))},o=new tM.ve(0),r=e=>{this._rangeSyncTriggerPromise=o.trigger(()=>this._syncRanges(e))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{s()})),this._localToDispose.add(this._editor.onDidChangeModelContent(e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){let t=this._currentDecorations.getRange(0);if(t&&e.changes.every(e=>t.intersectRanges(e.range)))return void r(this._syncRangesToken)}s()})),this._localToDispose.add({dispose:()=>{n.dispose(),o.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;let t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();let n=t.getValueInRange(i);if(this._currentWordPattern){let e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}let s=[];for(let e=1,i=this._currentDecorations.length;e<i;e++){let i=this._currentDecorations.getRange(e);if(i)if(i.startLineNumber!==i.endLineNumber)s.push({range:i,text:n});else{let e=t.getValueInRange(i),o=n,r=i.startColumn,a=i.endColumn,l=iE.Qp(e,o);r+=l,e=e.substr(l),o=o.substr(l);let h=iE.Vi(e,o);a-=h,e=e.substr(0,e.length-h),o=o.substr(0,o.length-h),(r!==a||0!==o.length)&&s.push({range:new tO.Q(i.startLineNumber,r,i.endLineNumber,a),text:o})}}if(0!==s.length)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;let e=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",s),this._editor._getViewModel().setPrevEditOperationType(e)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequestCts&&(this._currentRequestCts.cancel(),this._currentRequestCts=null,this._currentRequestPosition=null)}async updateRanges(e=!1){if(!this._editor.hasModel())return void this.clearRanges();let t=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1)return void this.clearRanges();let i=this._editor.getModel(),n=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){let e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(t))return}}if(!this._currentRequestPosition?.equals(t)){let e=this._currentDecorations.getRange(0);e?.containsPosition(t)||this.clearRanges()}this._currentRequestPosition=t,this._currentRequestModelVersion=n;let s=this._currentRequestCts=new t6.Qi;try{let e=new t0.W(!1),o=await vW(this._providers,i,t,s.token);if(this._debounceInformation.update(i,e.elapsed()),s!==this._currentRequestCts||(this._currentRequestCts=null,n!==i.getVersionId()))return;let r=[];o?.ranges&&(r=o.ranges),this._currentWordPattern=o?.wordPattern||this._languageWordPattern;let a=!1;for(let e=0,i=r.length;e<i;e++)if(tO.Q.containsPosition(r[e],t)){if(a=!0,0!==e){let t=r[e];r.splice(e,1),r.unshift(t)}break}if(!a)return void this.clearRanges();let l=r.map(e=>({range:e,options:eH.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(l),this._syncRangesToken++}catch(e){(0,ih.MB)(e)||(0,ih.dz)(e),this._currentRequestCts!==s&&this._currentRequestCts||this.clearRanges()}}};vA=eH=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([vO(1,tr.fN),vO(2,iI.u),vO(3,r1.JZ),vO(4,s9.U)],vA);class vF extends e6.ks{constructor(){super({id:"editor.action.linkedEditing",label:tn.aS(1266,"Start Linked Editing"),precondition:tr.M$.and(ti.R.writable,ti.R.hasRenameProvider),kbOpts:{kbExpr:ti.R.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){let i=e.get(te.T),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return i_.r.isUri(n)&&tR.y.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(e=>{e&&(e.setPosition(s),e.invokeWithinContext(t=>(this.reportTelemetry(t,e),this.run(t,e))))},ih.dz):super.runCommand(e,t)}run(e,t){let i=vA.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}let vB=e6.DX.bindToContribution(vA.get);function vW(e,t,i,n){let s=e.ordered(t);return(0,tM.$1)(s.map(e=>async()=>{try{return await e.provideLinkedEditingRanges(t,i,n)}catch(e){(0,ih.M_)(e);return}}),e=>!!e&&t8.EI(e?.ranges))}(0,e6.E_)(new vB({id:"cancelLinkedEditingInput",precondition:vP,handler:e=>e.clearRanges(),kbOpts:{kbExpr:ti.R.editorTextFocus,weight:199,primary:9,secondary:[1033]}})),(0,tF.x1A)("editor.linkedEditingBackground",{dark:oo.Q1.fromHex("#f00").transparent(.3),light:oo.Q1.fromHex("#f00").transparent(.3),hcDark:oo.Q1.fromHex("#f00").transparent(.3),hcLight:oo.Q1.white},tn.kg(1265,"Background color when the editor auto renames on type.")),(0,e6.ke)("_executeLinkedEditingProvider",(e,t,i)=>{let{linkedEditingRangeProvider:n}=e.get(iI.u);return vW(n,t,i,t6.XO.None)}),(0,e6.HW)(vA.ID,vA,1),(0,e6.Fl)(vF),i(41667);class vH{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url)?this.resolve(e):Promise.reject(Error("missing"))):Promise.reject(Error("missing"))}}class vV{static{this.Empty=new vV([])}constructor(e){this._disposables=new tT.Cm;let t=[];for(let[i,n]of e){let e=i.links.map(e=>new vH(e,n));t=vV._union(t,e),(0,tT.Xm)(i)&&(this._disposables??=new tT.Cm,this._disposables.add(i))}this.links=t}dispose(){this._disposables?.dispose(),this.links.length=0}static _union(e,t){let i,n,s,o,r=[];for(i=0,s=0,n=e.length,o=t.length;i<n&&s<o;){let n=e[i],o=t[s];if(tO.Q.areIntersectingOrTouching(n.range,o.range)){i++;continue}0>tO.Q.compareRangesUsingStarts(n.range,o.range)?(r.push(n),i++):(r.push(o),s++)}for(;i<n;i++)r.push(e[i]);for(;s<o;s++)r.push(t[s]);return r}}async function vz(e,t,i){let n=[],s=e.ordered(t).reverse().map(async(e,s)=>{try{let o=await e.provideLinks(t,i);o&&(n[s]=[o,e])}catch(e){(0,ih.M_)(e)}});await Promise.all(s);let o=new vV((0,t8.Yc)(n));return i.isCancellationRequested&&(o.dispose(),o=vV.Empty),o}tC.w.registerCommand("_executeLinkProvider",async(e,...t)=>{let[i,n]=t;(0,iu.j)(i instanceof i_.r),"number"!=typeof n&&(n=0);let{linkProvider:s}=e.get(iI.u),o=e.get(n3.S).getModel(i);if(!o)return[];let r=await vz(s,o,t6.XO.None);if(!r)return[];for(let e=0;e<Math.min(n,r.links.length);e++)await r.links[e].resolve(t6.XO.None);let a=r.links.slice(0);return r.dispose(),a});var vU=function(e,t){return function(i,n){t(i,n,e)}};let vj=class extends tT.jG{static{eV=this}static{this.ID="editor.linkDetector"}static get(e){return e.getContribution(eV.ID)}constructor(e,t,i,n,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=n,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new tM.uC(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;let o=this._register(new rQ(e));this._register(o.onMouseMoveOrRelevantKeyDown(([e,t])=>{this._onEditorMouseMove(e,t)})),this._register(o.onExecute(e=>{this.onEditorMouseUp(e)})),this._register(o.onCancel(e=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(e=>{e.hasChanged(79)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(e=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(e=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(79))return;let e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,tM.SS)(t=>vz(this.providers,e,t));try{let t=new t0.W(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(e){(0,ih.dz)(e)}finally{this.computePromise=null}}}updateDecorations(e){let t="altKey"===this.editor.getOption(86),i=[];for(let e of Object.keys(this.currentOccurrences)){let t=this.currentOccurrences[e];i.push(t.decorationId)}let n=[];if(e)for(let i of e)n.push(vK.decoration(i,t));this.editor.changeDecorations(t=>{let s=t.deltaDecorations(i,n);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let t=0,i=s.length;t<i;t++){let i=new vK(e[t],s[t]);this.currentOccurrences[i.decorationId]=i}})}_onEditorMouseMove(e,t){let i="altKey"===this.editor.getOption(86);if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();let t=this.getLinkOccurrence(e.target.position);t&&this.editor.changeDecorations(e=>{t.activate(e,i),this.activeLinkDecorationId=t.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){let e="altKey"===this.editor.getOption(86);if(this.activeLinkDecorationId){let t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(i=>{t.deactivate(i,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;let t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;let{link:n}=e;n.resolve(t6.XO.None).then(e=>{if("string"==typeof e&&this.editor.hasModel()){let t=this.editor.getModel().uri;if(t.scheme===iU.ny.file&&e.startsWith(`${iU.ny.file}:`)){let i=i_.r.parse(e);if(i.scheme===iU.ny.file){let n=ij.su(i),s=null;n.startsWith("/./")||n.startsWith("\\.\\")?s=`.${n.substr(1)}`:(n.startsWith("//./")||n.startsWith("\\\\.\\"))&&(s=`.${n.substr(2)}`),s&&(e=ij.uJ(t,s))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},e=>{let t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(tn.kg(1267,"Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(tn.kg(1268,"Failed to open this link because its target is missing.")):(0,ih.dz)(e)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;for(let t of this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0)){let e=this.currentOccurrences[t.id];if(e)return e}return null}isEnabled(e,t){return!!(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey||e.isMiddleClick&&"openLink"===e.mouseMiddleClickAction))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};vj=eV=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([vU(1,iB.Cr),vU(2,nA.Ot),vU(3,iI.u),vU(4,s9.U)],vj);let v$={general:tA.kI.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:tA.kI.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class vK{static decoration(e,t){return{range:e.range,options:vK._getOptions(e,t,!1)}}static _getOptions(e,t,i){let n={...i?v$.active:v$.general};return n.hoverMessage=function(e,t){let i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?tn.kg(1269,"Execute command"):tn.kg(1270,"Follow link"),s=t?tJ.zx?tn.kg(1271,"cmd + click"):tn.kg(1272,"ctrl + click"):tJ.zx?tn.kg(1273,"option + click"):tn.kg(1274,"alt + click");if(!e.url)return new ty.Bc().appendText(`${n} (${s})`);{let t="";if(/^command:/i.test(e.url.toString())){let i=e.url.toString().match(/^command:([^?#]+)/);if(i){let e=i[1];t=tn.kg(1275,"Execute command {0}",e)}}return new ty.Bc("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${s})`)}}(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,vK._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,vK._getOptions(this.link,t,!1))}}class vG extends e6.ks{constructor(){super({id:"editor.action.openLink",label:tn.aS(1276,"Open Link"),precondition:void 0})}run(e,t){let i=vj.get(t);if(i&&t.hasModel())for(let e of t.getSelections()){let t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,e6.HW)(vj.ID,vj,1),(0,e6.Fl)(vG);class vq extends tT.jG{static{this.ID="editor.contrib.longLinesHelper"}constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(e=>{let t=this._editor.getOption(133);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}(0,e6.HW)(vq.ID,vq,2);var vQ=i(72150);i(22127);class vY extends tT.jG{static{this.ID="editor.contrib.middleScroll"}constructor(e){super(),this._editor=e;let t=(0,an.U)(this._editor),i=t.getOption(171);this._register((0,oM.fm)(e=>{if(!i.read(e))return;let n=t.domNode.read(e);if(!n)return;let s=e.store.add((0,oM.X2)("scrollingSession",void 0));e.store.add(this._editor.onMouseDown(e=>{if(s.read(void 0))return void s.set(void 0,void 0);if(!e.event.middleButton)return;e.event.stopPropagation(),e.event.preventDefault();let t=new tT.Cm,i=new pK.b(e.event.posx,e.event.posy),o=(function(e,t,i){let n=(0,oM.FY)("pos",t);return i.add((0,e8.ko)(e,"mousemove",e=>{n.set(new pK.b(e.pageX,e.pageY),void 0)})),n})((0,e8.zk)(n),i,t).map(e=>e.subtract(i).withThreshold(5)),r=n.getBoundingClientRect(),a=new pK.b(i.x-r.left,i.y-r.top);s.set({mouseDeltaAfterThreshold:o,initialMousePosInEditor:a,didScroll:!1,dispose:()=>t.dispose()},void 0),t.add(this._editor.onMouseUp(e=>{let t=s.read(void 0);t&&t.didScroll&&s.set(void 0,void 0)})),t.add(this._editor.onKeyDown(e=>{s.set(void 0,void 0)}))})),e.store.add((0,oM.fm)(e=>{let t=s.read(e);if(!t)return;let i=Date.now();e.store.add((0,oM.fm)(e=>{uA.instance.invalidateOnNextAnimationFrame(e);let n=Date.now(),s=n-i;i=n;let o=t.mouseDeltaAfterThreshold.read(void 0).scale(s/32),r=new pK.b(this._editor.getScrollLeft(),this._editor.getScrollTop());this._editor.setScrollPosition(function(e){return{scrollLeft:e.x,scrollTop:e.y}}(r.add(o))),o.isZero()||(t.didScroll=!0)}));let o=(0,oM.un)(e=>{let i=t.mouseDeltaAfterThreshold.read(e),n="";return n+((i.y<0?"n":i.y>0?"s":"")+(i.x<0?"w":i.x>0?"e":""))});e.store.add((0,oM.fm)(e=>{n.setAttribute("data-scroll-direction",o.read(e))}))}));let o=e.store.add(e8.n.div({class:["scroll-editor-on-middle-click-dot",s.map(e=>e?"":"hidden")],style:{left:s.map(e=>e?e.initialMousePosInEditor.x:0),top:s.map(e=>e?e.initialMousePosInEditor.y:0)}}).toDisposableLiveElement());e.store.add((0,vQ.rX)(n,o.element)),e.store.add((0,oM.fm)(e=>{let t=s.read(e);n.classList.toggle("scroll-editor-on-middle-click-editor",!!t)}))}))}}(0,e6.HW)(vY.ID,vY,2),i(59963);let vZ=(0,tF.x1A)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},tn.kg(1548,"Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);(0,tF.x1A)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},tn.kg(1549,"Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),(0,tF.x1A)("editor.wordHighlightTextBackground",vZ,tn.kg(1550,"Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);let vX=(0,tF.x1A)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:tF.buw,hcLight:tF.buw},tn.kg(1551,"Border color of a symbol during read-access, like reading a variable."));(0,tF.x1A)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:tF.buw,hcLight:tF.buw},tn.kg(1552,"Border color of a symbol during write-access, like writing to a variable.")),(0,tF.x1A)("editor.wordHighlightTextBorder",vX,tn.kg(1553,"Border color of a textual occurrence for a symbol."));let vJ=(0,tF.x1A)("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",tn.kg(1554,"Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),v0=(0,tF.x1A)("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",tn.kg(1555,"Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),v1=(0,tF.x1A)("editorOverviewRuler.wordHighlightTextForeground",tF.z5H,tn.kg(1556,"Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),v2=tA.kI.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,tB.Yf)(v0),position:tP.A5.Center},minimap:{color:(0,tB.Yf)(tF.Xp1),position:1}}),v5=tA.kI.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,tB.Yf)(v1),position:tP.A5.Center},minimap:{color:(0,tB.Yf)(tF.Xp1),position:1}}),v4=tA.kI.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,tB.Yf)(tF.z5H),position:tP.A5.Center},minimap:{color:(0,tB.Yf)(tF.Xp1),position:1}}),v3=tA.kI.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),v7=tA.kI.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,tB.Yf)(vJ),position:tP.A5.Center},minimap:{color:(0,tB.Yf)(tF.Xp1),position:1}});function v9(e,t){let i=t.filter(t=>!e.find(e=>e.equals(t)));if(i.length>=1){let e=i.map(e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`).join(", "),t=1===i.length?tn.kg(1278,"Cursor added: {0}",e):tn.kg(1279,"Cursors added: {0}",e);(0,tw.h5)(t)}}(0,tB.zy)((e,t)=>{let i=e.getColor(tF.QwA);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)});class v8 extends e6.ks{constructor(){super({id:"editor.action.insertCursorAbove",label:tn.aS(1288,"Add Cursor Above"),precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"3_multi",title:tn.kg(1280,"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);let s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();let o=s.getCursorStates();s.setCursorStates(i.source,3,_0.c.addCursorUp(s,o,n)),s.revealTopMostCursor(i.source),v9(o,s.getCursorStates())}}class v6 extends e6.ks{constructor(){super({id:"editor.action.insertCursorBelow",label:tn.aS(1289,"Add Cursor Below"),precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"3_multi",title:tn.kg(1281,"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);let s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();let o=s.getCursorStates();s.setCursorStates(i.source,3,_0.c.addCursorDown(s,o,n)),s.revealBottomMostCursor(i.source),v9(o,s.getCursorStates())}}class be extends e6.ks{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:tn.aS(1290,"Add Cursors to Line Ends"),precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"3_multi",title:tn.kg(1282,"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n<e.endLineNumber;n++){let e=t.getLineMaxColumn(n);i.push(new tk.L(n,e,n,e))}e.endColumn>1&&i.push(new tk.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=t.getSelections(),s=t._getViewModel(),o=s.getCursorStates(),r=[];n.forEach(e=>this.getCursorsForSelection(e,i,r)),r.length>0&&t.setSelections(r),v9(o,s.getCursorStates())}}class bt extends e6.ks{constructor(){super({id:"editor.action.addCursorsToBottom",label:tn.aS(1291,"Add Cursors to Bottom"),precondition:void 0})}run(e,t){if(!t.hasModel())return;let i=t.getSelections(),n=t.getModel().getLineCount(),s=[];for(let e=i[0].startLineNumber;e<=n;e++)s.push(new tk.L(e,i[0].startColumn,e,i[0].endColumn));let o=t._getViewModel(),r=o.getCursorStates();s.length>0&&t.setSelections(s),v9(r,o.getCursorStates())}}class bi extends e6.ks{constructor(){super({id:"editor.action.addCursorsToTop",label:tn.aS(1292,"Add Cursors to Top"),precondition:void 0})}run(e,t){if(!t.hasModel())return;let i=t.getSelections(),n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new tk.L(e,i[0].startColumn,e,i[0].endColumn));let s=t._getViewModel(),o=s.getCursorStates();n.length>0&&t.setSelections(n),v9(o,s.getCursorStates())}}class bn{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class bs{static create(e,t){let i,n,s;if(!e.hasModel())return null;let o=t.getState();if(!e.hasTextFocus()&&o.isRevealed&&o.searchString.length>0)return new bs(e,t,!1,o.searchString,o.wholeWord,o.matchCase,null);let r=!1,a=e.getSelections();1===a.length&&a[0].isEmpty()?(r=!0,i=!0,n=!0):(i=o.wholeWord,n=o.matchCase);let l=e.getSelection(),h=null;if(l.isEmpty()){let t=e.getConfiguredWordAtPosition(l.getStartPosition());if(!t)return null;s=t.word,h=new tk.L(l.startLineNumber,t.startColumn,l.startLineNumber,t.endColumn)}else s=e.getModel().getValueInRange(l).replace(/\r\n/g,"\n");return new bs(e,t,r,s,i,n,h)}constructor(e,t,i,n,s,o,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=o,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();return e?new bn(this._editor.getSelections().concat(e),e,0):null}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new bn(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return i?new tk.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();return e?new bn(this._editor.getSelections().concat(e),e,0):null}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new bn(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return i?new tk.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();let t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,0x40000000):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,0x40000000)}}class bo extends tT.jG{static{this.ID="editor.contrib.multiCursorController"}static get(e){return e.getContribution(bo.ID)}constructor(e){super(),this._sessionDispose=this._register(new tT.Cm),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){let t=bs.create(this._editor,e);if(!t)return;this._session=t;let i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(e=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(e=>{(e.matchCase||e.wholeWord)&&this._endSession()}))}}_endSession(){this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController&&this._session.findController.getState().change({wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0},!1),this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;let i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new tk.L(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){let t=this._editor.getSelections();if(t.length>1){let i=e.getState().matchCase;if(!bm(this._editor.getModel(),t,i)){let e=this._editor.getModel(),i=[];for(let n=0,s=t.length;n<s;n++)i[n]=this._expandEmptyToWord(e,t[n]);this._editor.setSelections(i);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null,i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex){let e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(148):null,!1,0x40000000):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(148):null,!1,0x40000000)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){let e=this._editor.getSelection();for(let i=0,n=t.length;i<n;i++){let n=t[i];if(n.range.intersectRanges(e)){t[i]=t[0],t[0]=n;break}}this._setSelections(t.map(e=>new tk.L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)))}}}class br extends e6.ks{run(e,t){let i=bo.get(t);if(!i)return;let n=t._getViewModel();if(n){let s=n.getCursorStates(),o=dC.get(t);if(o)this._run(i,o);else{let n=e.get(t5._Y).createInstance(dC,t);this._run(i,n),n.dispose()}v9(s,n.getCursorStates())}}}class ba extends br{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:tn.aS(1293,"Add Selection to Next Find Match"),precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:2082,weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"3_multi",title:tn.kg(1283,"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class bl extends br{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:tn.aS(1294,"Add Selection to Previous Find Match"),precondition:void 0,menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"3_multi",title:tn.kg(1284,"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class bh extends br{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:tn.aS(1295,"Move Last Selection to Next Find Match"),precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:(0,tS.m5)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class bd extends br{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:tn.aS(1296,"Move Last Selection to Previous Find Match"),precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class bc extends br{constructor(){super({id:"editor.action.selectHighlights",label:tn.aS(1297,"Select All Occurrences of Find Match"),precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:3114,weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"3_multi",title:tn.kg(1285,"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class bu extends br{constructor(){super({id:"editor.action.changeAll",label:tn.aS(1298,"Change All Occurrences"),precondition:tr.M$.and(ti.R.writable,ti.R.editorTextFocus),kbOpts:{kbExpr:ti.R.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class bg{constructor(e,t,i,n,s){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._cachedFindMatches=null,this._modelVersionId=this._model.getVersionId(),s&&this._model===s._model&&this._searchText===s._searchText&&this._matchCase===s._matchCase&&this._wordSeparators===s._wordSeparators&&this._modelVersionId===s._modelVersionId&&(this._cachedFindMatches=s._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(tO.Q.compareRangesUsingStarts)),this._cachedFindMatches}}let bp=class extends tT.jG{static{ez=this}static{this.ID="editor.contrib.selectionHighlighter"}constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(122),this._isEnabledMultiline=e.getOption(124),this._maxLength=e.getOption(123),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new tM.uC(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(t=>{this._isEnabled=e.getOption(122),this._isEnabledMultiline=e.getOption(124),this._maxLength=e.getOption(123)})),this._register(e.onDidChangeCursorSelection(e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(e=>{this._setState(null)})),this._register(e.onDidChangeModelContent(e=>{this._isEnabled&&this.updateSoon.schedule()}));let i=dC.get(e);i&&this._register(i.getState().onFindReplaceStateChange(e=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(ez._createState(this.state,this._isEnabled,this._isEnabledMultiline,this._maxLength,this.editor))}static _createState(e,t,i,n,s){if(!t||!s.hasModel())return null;if(!i){let e=s.getSelection();if(e.startLineNumber!==e.endLineNumber)return null}let o=bo.get(s);if(!o)return null;let r=dC.get(s);if(!r)return null;let a=o.getSession(r);if(!a){let e=s.getSelections();if(e.length>1){let t=r.getState().matchCase;if(!bm(s.getModel(),e,t))return null}a=bs.create(s,r)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||n>0&&a.searchText.length>n)return null;let l=r.getState(),h=l.matchCase;if(l.isRevealed){let e=l.searchString;h||(e=e.toLowerCase());let t=a.searchText;if(h||(t=t.toLowerCase()),e===t&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new bg(s.getModel(),a.searchText,a.matchCase,a.wholeWord?s.getOption(148):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();if(!this.editor.hasModel())return;let t=this.editor.getModel();if(t.isTooLargeForTokenization())return;let i=this.state.findMatches(),n=this.editor.getSelections();n.sort(tO.Q.compareRangesUsingStarts);let s=[];for(let e=0,t=0,o=i.length,r=n.length;e<o;){let o=i[e];if(t>=r)s.push(o),e++;else{let i=tO.Q.compareRangesUsingStarts(o,n[t]);i<0?((n[t].isEmpty()||!tO.Q.areIntersecting(o,n[t]))&&s.push(o),e++):(i>0||e++,t++)}}let o="off"!==this.editor.getOption(90),r=this._languageFeaturesService.documentHighlightProvider.has(t)&&o,a=s.map(e=>({range:e,options:r?v3:v4}));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};function bm(e,t,i){let n=bf(e,t[0],!i);for(let s=1,o=t.length;s<o;s++){let o=t[s];if(o.isEmpty()||n!==bf(e,o,!i))return!1}return!0}function bf(e,t,i){let n=e.getValueInRange(t);return i?n.toLowerCase():n}bp=ez=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(M=iI.u,function(e,t){M(e,t,1)})],bp);class b_ extends e6.ks{constructor(){super({id:"editor.action.focusNextCursor",label:tn.aS(1299,"Focus Next Cursor"),metadata:{description:tn.kg(1286,"Focuses the next cursor"),args:[]},precondition:void 0})}run(e,t,i){if(!t.hasModel())return;let n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();let s=Array.from(n.getCursorStates()),o=s.shift();o&&(s.push(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),v9(s,n.getCursorStates()))}}class bv extends e6.ks{constructor(){super({id:"editor.action.focusPreviousCursor",label:tn.aS(1300,"Focus Previous Cursor"),metadata:{description:tn.kg(1287,"Focuses the previous cursor"),args:[]},precondition:void 0})}run(e,t,i){if(!t.hasModel())return;let n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();let s=Array.from(n.getCursorStates()),o=s.pop();o&&(s.unshift(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),v9(s,n.getCursorStates()))}}(0,e6.HW)(bo.ID,bo,4),(0,e6.HW)(bp.ID,bp,1),(0,e6.Fl)(v8),(0,e6.Fl)(v6),(0,e6.Fl)(be),(0,e6.Fl)(ba),(0,e6.Fl)(bl),(0,e6.Fl)(bh),(0,e6.Fl)(bd),(0,e6.Fl)(bc),(0,e6.Fl)(bu),(0,e6.Fl)(bt),(0,e6.Fl)(bi),(0,e6.Fl)(b_),(0,e6.Fl)(bv);let bb={Visible:new tr.N1("parameterHintsVisible",!1),MultipleSignatures:new tr.N1("parameterHintsMultipleSignatures",!1)};async function bC(e,t,i,n,s){for(let o of e.ordered(t))try{let e=await o.provideSignatureHelp(t,i,s,n);if(e)return e}catch(e){(0,ih.M_)(e)}}tC.w.registerCommand("_executeSignatureHelpProvider",async(e,...t)=>{let[i,n,s]=t;(0,iu.j)(i_.r.isUri(i)),(0,iu.j)(tR.y.isIPosition(n)),(0,iu.j)("string"==typeof s||!s);let o=e.get(iI.u),r=await e.get(rU.b).createModelReference(i);try{let e=await bC(o.signatureHelpProvider,r.object.textEditorModel,tR.y.lift(n),{triggerKind:iD.WA.Invoke,isRetrigger:!1,triggerCharacter:s},t6.XO.None);if(!e)return;return setTimeout(()=>e.dispose(),0),e.value}finally{r.dispose()}}),function(e){e.Default={type:0};class t{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}}e.Pending=t;class i{constructor(e){this.hints=e,this.type=1}}e.Active=i}(eU||(eU={}));class bw extends tT.jG{static{this.DEFAULT_DELAY=120}constructor(e,t,i=bw.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new iA.vl),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=eU.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new tT.HE),this.triggerChars=new cN.y,this.retriggerChars=new cN.y,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new tM.ve(i),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(e=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(e=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(e=>this.onCursorChange(e))),this._register(this.editor.onDidChangeModelContent(e=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(e=>this.onDidType(e))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=eU.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){let i=this.editor.getModel();if(!i||!this.providers.has(i))return;let n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(n),t).catch(ih.dz)}next(){if(1!==this.state.type)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(98).cycle;if((e<2||i)&&!n)return void this.cancel();this.updateActiveSignature(i&&n?0:t+1)}previous(){if(1!==this.state.type)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(98).cycle;if((e<2||i)&&!n)return void this.cancel();this.updateActiveSignature(i&&n?e-1:t-1)}updateActiveSignature(e){1===this.state.type&&(this.state=new eU.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){let t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;let n=this._pendingTriggers.reduce(by);this._pendingTriggers=[];let s={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;let o=this.editor.getModel(),r=this.editor.getPosition();this.state=new eU.Pending((0,tM.SS)(e=>bC(this.providers,o,r,s,e)),i);try{let t=await this.state.request;if(e!==this.triggerId)return t?.dispose(),!1;if(!t||!t.value.signatures||0===t.value.signatures.length)return t?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1;return this.state=new eU.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0}catch(t){return e===this.triggerId&&(this.state=eU.Default),(0,ih.dz)(t),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();let e=this.editor.getModel();if(e)for(let t of this.providers.ordered(e)){for(let e of t.signatureHelpTriggerCharacters||[])if(e.length){let t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(let e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;let t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:iD.WA.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:iD.WA.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:iD.WA.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(98).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function by(e,t){switch(t.triggerKind){case iD.WA.Invoke:return t;case iD.WA.ContentChange:return e;case iD.WA.TriggerCharacter:default:return t}}i(72725);var bS=function(e,t){return function(i,n){t(i,n,e)}};let bk=e8.$,bx=(0,sL.pU)("parameter-hints-next",e9.W.chevronDown,tn.kg(1302,"Icon for show next parameter hint.")),bL=(0,sL.pU)("parameter-hints-previous",e9.W.chevronUp,tn.kg(1303,"Icon for show previous parameter hint.")),bD=class extends tT.jG{static{ej=this}static{this.ID="editor.widget.parameterHintsWidget"}constructor(e,t,i,n,s){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new tT.Cm),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=new iF.T({editor:e},s,n),this.keyVisible=bb.Visible.bindTo(i),this.keyMultipleSignatures=bb.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){let e=bk(".editor-widget.parameter-hints-widget"),t=e8.BC(e,bk(".phwrapper"));t.tabIndex=-1;let i=e8.BC(t,bk(".controls")),n=e8.BC(i,bk(".button"+iM.L.asCSSSelector(bL))),s=e8.BC(i,bk(".overloads")),o=e8.BC(i,bk(".button"+iM.L.asCSSSelector(bx)));this._register(e8.ko(n,"click",e=>{e8.fs.stop(e),this.previous()})),this._register(e8.ko(o,"click",e=>{e8.fs.stop(e),this.next()}));let r=bk(".body"),a=new g4.MU(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());let l=e8.BC(r,bk(".signature")),h=e8.BC(r,bk(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:s,docs:h,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(e=>{this.visible&&this.editor.layoutContentWidget(this)}));let d=()=>{if(!this.domNodes)return;let e=this.editor.getOption(59),t=this.domNodes.element;t.style.fontSize=`${e.fontSize}px`,t.style.lineHeight=`${e.lineHeight/e.fontSize}`,t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",e.fontFamily),t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",sv.jU.fontFamily)};d(),this._register(iA.Jh.chain(this.editor.onDidChangeConfiguration.bind(this.editor),e=>e.filter(e=>e.hasChanged(59)))(d)),this._register(this.editor.onDidLayoutChange(e=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes?.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;let t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";let i=e.signatures[e.activeSignature];if(!i)return;let n=e8.BC(this.domNodes.signature,bk(".code")),s=i.parameters.length>0,o=i.activeParameter??e.activeParameter;s?this.renderParameters(n,i,o):e8.BC(n,bk("span")).textContent=i.label;let r=i.parameters[o];if(r?.documentation){let e=bk("span.documentation");if("string"==typeof r.documentation)e.textContent=r.documentation;else{let t=this.renderMarkdownDocs(r.documentation);e.appendChild(t.element)}e8.BC(this.domNodes.docs,bk("p",{},e))}if(void 0===i.documentation);else if("string"==typeof i.documentation)e8.BC(this.domNodes.docs,bk("p",{},i.documentation));else{let e=this.renderMarkdownDocs(i.documentation);e8.BC(this.domNodes.docs,e.element)}let a=this.hasDocs(i,r);if(this.domNodes.signature.classList.toggle("has-docs",a),this.domNodes.docs.classList.toggle("empty",!a),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,r){let e="",t=i.parameters[o];e=Array.isArray(t.label)?i.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"==typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),i.documentation&&(e+="string"==typeof i.documentation?`, ${i.documentation}`:`, ${i.documentation.value}`),this.announcedLabel!==e&&(tw.xE(tn.kg(1304,"{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){let t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!t&&"string"==typeof t.documentation&&!!((0,iu.ni)(t.documentation).length>0)||!!t&&"object"==typeof t.documentation&&!!((0,iu.ni)(t.documentation).value.length>0)||!!e.documentation&&"string"==typeof e.documentation&&!!((0,iu.ni)(e.documentation).length>0)||!!e.documentation&&"object"==typeof e.documentation&&!!((0,iu.ni)(e.documentation.value).length>0)}renderParameters(e,t,i){let[n,s]=this.getParameterLabelOffsets(t,i),o=document.createElement("span");o.textContent=t.label.substring(0,n);let r=document.createElement("span");r.textContent=t.label.substring(n,s),r.className="parameter active";let a=document.createElement("span");a.textContent=t.label.substring(s),e8.BC(e,o,r,a)}getParameterLabelOffsets(e,t){let i=e.parameters[t];if(!i)return[0,0];{if(Array.isArray(i.label))return i.label;if(!i.label.length)return[0,0];let t=RegExp(`(\\W|^)${(0,iE.bm)(i.label)}(?=\\W|$)`,"g");t.test(e.label);let n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return ej.ID}updateMaxHeight(){if(!this.domNodes)return;let e=Math.max(this.editor.getLayoutInfo().height/4,250),t=`${e}px`;this.domNodes.element.style.maxHeight=t;let i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=t)}};bD=ej=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([bS(2,tr.fN),bS(3,iB.Cr),bS(4,rs.L)],bD),(0,tF.x1A)("editorHoverWidget.highlightForeground",tF.QI5,tn.kg(1305,"Foreground color of the active item in the parameter hint."));var bI=function(e,t){return function(i,n){t(i,n,e)}};let bN=class extends tT.jG{static{e$=this}static{this.ID="editor.controller.parameterHints"}static get(e){return e.getContribution(e$.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new bw(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints(e=>{e?(this.widget.value.show(),this.widget.value.render(e)):this.widget.rawValue?.hide()})),this.widget=new su.d(()=>this._register(t.createInstance(bD,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(e){this.model.trigger(e,0)}};bN=e$=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([bI(1,t5._Y),bI(2,iI.u)],bN);class bE extends e6.ks{constructor(){super({id:"editor.action.triggerParameterHints",label:tn.aS(1301,"Trigger Parameter Hints"),precondition:ti.R.hasSignatureHelpProvider,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:3082,weight:100}})}run(e,t){let i=bN.get(t);i?.trigger({triggerKind:iD.WA.Invoke})}}(0,e6.HW)(bN.ID,bN,2),(0,e6.Fl)(bE);let bM=e6.DX.bindToContribution(bN.get);(0,e6.E_)(new bM({id:"closeParameterHints",precondition:bb.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:ti.R.focus,primary:9,secondary:[1033]}})),(0,e6.E_)(new bM({id:"showPrevParameterHint",precondition:tr.M$.and(bb.Visible,bb.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:ti.R.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,e6.E_)(new bM({id:"showNextParameterHint",precondition:tr.M$.and(bb.Visible,bb.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:ti.R.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}})),i(75999);class bT extends tT.jG{static{this.ID="editor.contrib.placeholderText"}constructor(e){var t,i;super(),this._editor=e,this._editorObs=(0,an.U)(this._editor),this._placeholderText=this._editorObs.getOption(100),this._state=(0,oM.C)({owner:this,equalsFn:ue.dB},e=>{let t=this._placeholderText.read(e);if(t&&this._editorObs.valueIsEmpty.read(e))return{placeholder:t}}),this._shouldViewBeAlive=(t=this,i=e=>this._state.read(e)?.placeholder!==void 0,(0,oM.ZX)(t,(e,t)=>!0===t||i(e))),this._view=(0,oM.un)(e=>{if(!this._shouldViewBeAlive.read(e))return;let t=(0,e8.h)("div.editorPlaceholder");e.store.add((0,oM.fm)(e=>{let i=this._state.read(e),n=i?.placeholder!==void 0;t.root.style.display=n?"block":"none",t.root.innerText=i?.placeholder??""})),e.store.add((0,oM.fm)(e=>{let i=this._editorObs.layoutInfo.read(e);t.root.style.left=`${i.contentLeft}px`,t.root.style.width=i.contentWidth-i.verticalScrollbarWidth+"px",t.root.style.top=`${this._editor.getTopForLineNumber(0)}px`})),e.store.add((0,oM.fm)(e=>{t.root.style.fontFamily=this._editorObs.getOption(58).read(e),t.root.style.fontSize=this._editorObs.getOption(61).read(e)+"px",t.root.style.lineHeight=this._editorObs.getOption(75).read(e)+"px"})),e.store.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:(0,oM.lk)(0),position:(0,oM.lk)(null),domNode:t.root}))}),this._view.recomputeInitiallyAndOnChange(this._store)}}class bR{constructor(e){this.instantiationService=e}init(){}}let bO=class extends bR{constructor(e,t){super(t),this.init(e)}};bO=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(T=t5._Y,function(e,t){T(e,t,1)})],bO),(0,e6.HW)(bT.ID,function(e){var t;return(0,cK.e)()?(t=bO,class extends t{constructor(){super(...arguments),this._autorun=void 0}init(...t){this._autorun=(0,oM.yC)((i,n)=>{let s=(0,oE.b6)(e(),i);n.add(this.instantiationService.createInstance(s,...t))})}dispose(){this._autorun?.dispose()}}):e()}(()=>bT),0),(0,p$.x1)("editor.placeholder.foreground",hs.Ek,(0,tn.kg)(1324,"Foreground color of the placeholder text in the editor."));var bP=i(67514),bA=i(98200),bF=i(73970);i(93159);var bB=function(e,t){return function(i,n){t(i,n,e)}};let bW=new tr.N1("renameInputVisible",!1,tn.kg(1376,"Whether the rename input widget is visible"));new tr.N1("renameInputFocused",!1,tn.kg(1377,"Whether the rename input widget is focused"));let bH=class{constructor(e,t,i,n,s,o){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._logService=o,this.allowEditorOverflow=!0,this._disposables=new tT.Cm,this._visibleContextKey=bW.bindTo(s),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new t0.W,this._inputWithButton=new bz,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(59)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new bV(this._domNode,{fontInfo:this._editor.getOption(59),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange(()=>{this._renameCandidateListView?.focusedCandidate!==void 0&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??=this._beforeFirstInputFieldEditSW.elapsed(),this._renameCandidateProvidersCts?.token.isCancellationRequested===!1&&this._renameCandidateProvidersCts.cancel(),this._renameCandidateListView?.clearFocus()})),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;let t=e.getColor(tF.f9l),i=e.getColor(tF.DSL);this._domNode.style.backgroundColor=String(e.getColor(tF.CgL)??""),this._domNode.style.boxShadow=t?` 0 0 8px 2px ${t}`:"",this._domNode.style.border=i?`1px solid ${i}`:"",this._domNode.style.color=String(e.getColor(tF.cws)??"");let n=e.getColor(tF.Zgs);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor(tF.L4c)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor(tF.L4c)??""),this._inputWithButton.domNode.style.borderWidth=n?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=n?"solid":"none",this._inputWithButton.domNode.style.borderColor=n?.toString()??"none"}_updateFont(){if(void 0===this._domNode)return;(0,iu.j)(void 0!==this._label,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);let e=this._editor.getOption(59);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return .8*e}getPosition(){if(!this._visible||!this._editor.hasModel()||!this._editor.getDomNode())return null;let e=e8.tG(this.getDomNode().ownerDocument.body),t=e8.BK(this._editor.getDomNode()),i=this._getTopForPosition();this._nPxAvailableAbove=i+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;let n=this._editor.getOption(75),{totalHeight:s}=bU.getLayoutInfo({lineHeight:n}),o=this._nPxAvailableBelow>6*s?[2,1]:[1,2];return{position:this._position,preference:o}}beforeRender(){let[e,t]=this._acceptKeybindings;return this._label.innerText=tn.kg(1378,"{0} to Rename, {1} to Preview",this._keybindingService.lookupKeybinding(e)?.getLabel(),this._keybindingService.lookupKeybinding(t)?.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){let t;if(null===e)return void this.cancelInput(!0,"afterRender (because position is null)");if(!this._editor.hasModel()||!this._editor.getDomNode())return;(0,iu.j)(this._renameCandidateListView),(0,iu.j)(void 0!==this._nPxAvailableAbove),(0,iu.j)(void 0!==this._nPxAvailableBelow);let i=e8.OK(this._inputWithButton.domNode),n=e8.OK(this._label);t=2===e?this._nPxAvailableBelow:this._nPxAvailableAbove,this._renameCandidateListView.layout({height:t-n-i,width:e8.Tr(this._inputWithButton.domNode)})}acceptInput(e){this._trace("invoking acceptInput"),this._currentAcceptInput?.(e)}cancelInput(e,t){this._currentCancelInput?.(e)}focusNextRenameSuggestion(){this._renameCandidateListView?.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){this._renameCandidateListView?.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,i,n,s){let{start:o,end:r}=this._getSelection(e,t);this._renameCts=s;let a=new tT.Cm;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,void 0===n?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=n,this._requestRenameCandidates(t,!1),a.add(e8.ko(this._inputWithButton.button,"click",()=>this._requestRenameCandidates(t,!0))),a.add(e8.ko(this._inputWithButton.button,e8.Bx.KEY_DOWN,e=>{let i=new bA.Z(e);(i.equals(3)||i.equals(10))&&(i.stopPropagation(),i.preventDefault(),this._requestRenameCandidates(t,!0))}))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",i),this._position=new tR.y(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",o.toString()),this._inputWithButton.input.setAttribute("selectionEnd",r.toString()),this._inputWithButton.input.size=Math.max((e.endColumn-e.startColumn)*1.1,20),this._beforeFirstInputFieldEditSW.reset(),a.add((0,tT.s)(()=>{this._renameCts=void 0,s.dispose(!0)})),a.add((0,tT.s)(()=>{void 0!==this._renameCandidateProvidersCts&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)})),a.add((0,tT.s)(()=>this._candidates.clear()));let l=new tM.Zv;return l.p.finally(()=>{a.dispose(),this._hide()}),this._currentCancelInput=e=>(this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView?.clearCandidates(),l.complete(e),!0),this._currentAcceptInput=e=>{let n,s;this._trace("invoking _currentAcceptInput"),(0,iu.j)(void 0!==this._renameCandidateListView);let o=this._renameCandidateListView.nCandidates,r=this._renameCandidateListView.focusedCandidate;if(void 0!==r?(this._trace("using new name from renameSuggestion"),n=r,s={k:"renameSuggestion"}):(this._trace("using new name from inputField"),n=this._inputWithButton.input.value,s=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),n===t||0===n.trim().length)return void this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)");this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),l.complete({newName:n,wantsPreview:i&&e,stats:{source:s,nRenameSuggestions:o,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})},a.add(s.token.onCancellationRequested(()=>this.cancelInput(!0,"cts.token.onCancellationRequested"))),a.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!this._domNode?.ownerDocument.hasFocus(),"editor.onDidBlurEditorWidget"))),this._show(),l.p}_requestRenameCandidates(e,t){if(void 0!==this._requestRenameCandidatesOnce&&(void 0!==this._renameCandidateProvidersCts&&this._renameCandidateProvidersCts.dispose(!0),(0,iu.j)(this._renameCts),"stop"!==this._inputWithButton.buttonState)){this._renameCandidateProvidersCts=new t6.Qi;let i=t?iD.YT.Invoke:iD.YT.Automatic,n=this._requestRenameCandidatesOnce(i,this._renameCandidateProvidersCts.token);if(0===n.length)return void this._inputWithButton.setSparkleButton();t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(n,e,this._renameCts.token)}}_getSelection(e,t){(0,iu.j)(this._editor.hasModel());let i=this._editor.getSelection(),n=0,s=t.length;return!tO.Q.isEmpty(i)&&!tO.Q.spansMultipleLines(i)&&tO.Q.containsRange(e,i)&&(n=Math.max(0,i.startColumn-e.startColumn),s=Math.min(e.endColumn,i.endColumn)-e.startColumn),{start:n,end:s}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))},100)}async _updateRenameCandidates(e,t,i){let n=(...e)=>this._trace("_updateRenameCandidates",...e);n("start");let s=await (0,tM.PK)(Promise.allSettled(e),i);if(this._inputWithButton.setSparkleButton(),void 0===s)return void n("returning early - received updateRenameCandidates results - undefined");let o=s.flatMap(e=>"fulfilled"===e.status&&(0,iu.O9)(e.value)?e.value:[]);n(`received updateRenameCandidates results - total (unfiltered) ${o.length} candidates.`);let r=t8.dM(o,e=>e.newSymbolName);n(`distinct candidates - ${r.length} candidates.`);let a=r.filter(({newSymbolName:e})=>e.trim().length>0&&e!==this._inputWithButton.input.value&&e!==t&&!this._candidates.has(e));if(n(`valid distinct candidates - ${o.length} candidates.`),a.forEach(e=>this._candidates.add(e.newSymbolName)),a.length<1)return void n("returning early - no valid distinct candidates");n("setting candidates"),this._renameCandidateListView.setCandidates(a),n("asking editor to re-layout"),this._editor.layoutContentWidget(this)}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){let e,t=this._editor.getVisibleRanges();return t.length>0?e=t[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),e=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(e)}_trace(...e){this._logService.trace("RenameWidget",...e)}};bH=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([bB(2,tB.Gy),bB(3,nf.b),bB(4,tr.fN),bB(5,t2.rr)],bH);class bV{constructor(e,t){this._disposables=new tT.Cm,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=bV._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._disposables.add(this._listWidget.onDidChangeFocus(e=>{1===e.elements.length&&t.onFocusChange(e.elements[0].newSymbolName)},this._disposables)),this._disposables.add(this._listWidget.onDidChangeSelection(e=>{1===e.elements.length&&t.onSelectionChange()},this._disposables)),this._disposables.add(this._listWidget.onDidBlur(e=>{this._listWidget.setFocus([])})),this._listWidget.style((0,n_.t8)({listInactiveFocusForeground:tF.nH,listInactiveFocusBackground:tF.AlL}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);let t=this._pickListHeight(this._listWidget.length),i=this._pickListWidth(e);this._listWidget.layout(t,i),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${i}px`,tw.h5(tn.kg(1379,"Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(0===this._listWidget.length)return;let e=this._listWidget.getSelectedElements()[0];if(void 0!==e)return e.newSymbolName;let t=this._listWidget.getFocusedElements()[0];if(void 0!==t)return t.newSymbolName}focusNext(){if(0===this._listWidget.length)return!1;let e=this._listWidget.getFocus();if(0===e.length)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();let e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}focusPrevious(){if(0===this._listWidget.length)return!1;let e=this._listWidget.getFocus();if(0===e.length){this._listWidget.focusLast();let e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}if(0===e[0])return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();let e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){let{totalHeight:e}=bU.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){return Math.min(this._candidateViewHeight*e,this._availableHeight,7*this._candidateViewHeight)}_pickListWidth(e){let t=Math.ceil(Math.max(...e.map(e=>e.newSymbolName.length))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+t+10)}static _createListWidget(e,t,i){let n=new class{getTemplateId(e){return"candidate"}getHeight(e){return t}},s=new class{constructor(){this.templateId="candidate"}renderTemplate(e){return new bU(e,i)}renderElement(e,t,i){i.populate(e)}disposeTemplate(e){e.dispose()}};return new np.B8("NewSymbolNameCandidates",e,n,[s],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class bz{constructor(){this._buttonHoverContent="",this._onDidInputChange=new iA.vl,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new tT.Cm}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",tn.kg(1380,"Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=tn.kg(1381,"Generate new name suggestions"),this._buttonCancelHoverText=tn.kg(1382,"Cancel"),this._buttonHoverContent=this._buttonGenHoverText,this._disposables.add((0,bF.i)().setupDelayedHover(this._buttonNode,()=>({content:this._buttonHoverContent,appearance:{showPointer:!0,compact:!0}}))),this._domNode.appendChild(this._buttonNode),this._disposables.add(e8.ko(this.input,e8.Bx.INPUT,()=>this._onDidInputChange.fire())),this._disposables.add(e8.ko(this.input,e8.Bx.KEY_DOWN,e=>{let t=new bA.Z(e);(15===t.keyCode||17===t.keyCode)&&this._onDidInputChange.fire()})),this._disposables.add(e8.ko(this.input,e8.Bx.CLICK,()=>this._onDidInputChange.fire())),this._disposables.add(e8.ko(this.input,e8.Bx.FOCUS,()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"})),this._disposables.add(e8.ko(this.input,e8.Bx.BLUR,()=>{this.domNode.style.outline="none"}))),this._domNode}get input(){return(0,iu.j)(this._inputNode),this._inputNode}get button(){return(0,iu.j)(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){this._buttonState="sparkle",this._sparkleIcon??=(0,s1.s)(e9.W.sparkle),e8.w_(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),this._buttonHoverContent=this._buttonGenHoverText,this.input.focus()}setStopButton(){this._buttonState="stop",this._stopIcon??=(0,s1.s)(e9.W.stopCircle),e8.w_(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),this._buttonHoverContent=this._buttonCancelHoverText,this.input.focus()}dispose(){this._disposables.dispose()}}class bU{static{this._PADDING=2}constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${bU._PADDING}px`;let i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.width=i.style.height=`${.8*t.lineHeight}px`,this._domNode.appendChild(i),this._icon=(0,s1.s)(e9.W.sparkle),this._icon.style.display="none",i.appendChild(this._icon),this._label=document.createElement("div"),pS.M(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){let t=!!e.tags?.includes(iD.OV.AIGenerated);this._icon.style.display=t?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+2*bU._PADDING}}dispose(){}}var bj=function(e,t){return function(i,n){t(i,n,e)}};class b${constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){let t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){let i=this._providers[this._providerRenameIdx];if(!i.resolveRenameLocation)break;let n=await i.resolveRenameLocation(this.model,this.position,e);if(n){if(n.rejectReason){t.push(n.rejectReason);continue}return n}}this._providerRenameIdx=0;let i=this.model.getWordAtPosition(this.position);return i?{range:new tO.Q(this.position.lineNumber,i.startColumn,this.position.lineNumber,i.endColumn),text:i.word,rejectReason:t.length>0?t.join("\n"):void 0}:{range:tO.Q.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){let s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join("\n")};let o=await s.provideRenameEdits(this.model,this.position,e,n);return o?o.rejectReason?this._provideRenameEdits(e,t+1,i.concat(o.rejectReason),n):o:this._provideRenameEdits(e,t+1,i.concat(tn.kg(1365,"No result.")),n)}}async function bK(e,t,i,n){let s=new b$(t,i,e),o=await s.resolveRenameLocation(t6.XO.None);return o?.rejectReason?{edits:[],rejectReason:o.rejectReason}:s.provideRenameEdits(n,t6.XO.None)}let bG=class{static{eK=this}static{this.ID="editor.contrib.renameController"}static get(e){return e.getContribution(eK.ID)}constructor(e,t,i,n,s,o,r,a){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=o,this._configService=r,this._languageFeaturesService=a,this._disposableStore=new tT.Cm,this._cts=new t6.Qi,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(bH,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){let e,t=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new t6.Qi,!this.editor.hasModel())return void t("editor has no model");let i=this.editor.getPosition(),n=new b$(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return void t("skeleton has no provider");let s=new iN.gI(this.editor,5,void 0,this._cts.token);try{t("resolving rename location");let i=n.resolveRenameLocation(s.token);this._progressService.showWhile(i,250),e=await i,t("resolved rename location")}catch(e){e instanceof ih.AL?t("resolve rename location cancelled",JSON.stringify(e,null," ")):(t("resolve rename location failed",e instanceof Error?e:JSON.stringify(e,null," ")),("string"==typeof e||(0,ty.VS)(e))&&iH.get(this.editor)?.showMessage(e||tn.kg(1366,"An unknown error occurred while resolving rename location"),i));return}finally{s.dispose()}if(!e)return void t("returning early - no loc");if(e.rejectReason){t(`returning early - rejected with reason: ${e.rejectReason}`,e.rejectReason),iH.get(this.editor)?.showMessage(e.rejectReason,i);return}if(s.token.isCancellationRequested)return void t("returning early - cts1 cancelled");let o=new iN.gI(this.editor,5,e.range,this._cts.token),r=this.editor.getModel(),a=this._languageFeaturesService.newSymbolNamesProvider.all(r),l=await Promise.all(a.map(async e=>[e,await e.supportsAutomaticNewSymbolNamesTriggerKind??!1]));t("creating rename input field and awaiting its result");let h=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),d=await this._renameWidget.getInput(e.range,e.text,h,a.length>0?(t,i)=>{let n=l.slice();return t===iD.YT.Automatic&&(n=n.filter(([e,t])=>t)),n.map(([n])=>n.provideNewSymbolNames(r,e.range,t,i))}:void 0,o);if(t("received response from rename input field"),"boolean"==typeof d){t(`returning early - rename input field response - ${d}`),d&&this.editor.focus(),o.dispose();return}this.editor.focus(),t("requesting rename edits");let c=(0,tM.PK)(n.provideRenameEdits(d.newName,o.token),o.token).then(async i=>{if(!i)return void t("returning early - no rename edits result");if(!this.editor.hasModel())return void t("returning early - no model after rename edits are provided");if(i.rejectReason){t(`returning early - rejected with reason: ${i.rejectReason}`),this._notificationService.info(i.rejectReason);return}this.editor.setSelection(tO.Q.fromPositions(this.editor.getSelection().getPosition())),t("applying edits"),this._bulkEditService.apply(i,{editor:this.editor,showPreview:d.wantsPreview,label:tn.kg(1367,"Renaming '{0}' to '{1}'",e?.text,d.newName),code:"undoredo.rename",quotableLabel:tn.kg(1368,"Renaming {0} to {1}",e?.text,d.newName),respectAutoSaveConfig:!0,reason:n7.dg.rename()}).then(i=>{t("edits applied"),i.ariaSummary&&(0,tw.xE)(tn.kg(1369,"Successfully renamed '{0}' to '{1}'. Summary: {2}",e.text,d.newName,i.ariaSummary))}).catch(e=>{t(`error when applying edits ${JSON.stringify(e,null," ")}`),this._notificationService.error(tn.kg(1370,"Rename failed to apply edits")),this._logService.error(e)})},e=>{t("error when providing rename edits",JSON.stringify(e,null," ")),this._notificationService.error(tn.kg(1371,"Rename failed to compute edits")),this._logService.error(e)}).finally(()=>{o.dispose()});return t("returning rename operation"),this._progressService.showWhile(c,250),c}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}};bG=eK=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([bj(1,t5._Y),bj(2,nA.Ot),bj(3,iL.nu),bj(4,ig.N8),bj(5,t2.rr),bj(6,bP.U),bj(7,iI.u)],bG);class bq extends e6.ks{constructor(){super({id:"editor.action.rename",label:tn.aS(1373,"Rename Symbol"),precondition:tr.M$.and(ti.R.writable,ti.R.hasRenameProvider),kbOpts:{kbExpr:ti.R.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let i=e.get(te.T),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return i_.r.isUri(n)&&tR.y.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(e=>{e&&(e.setPosition(s),e.invokeWithinContext(t=>(this.reportTelemetry(t,e),this.run(t,e))))},ih.dz):super.runCommand(e,t)}run(e,t){let i=e.get(t2.rr),n=bG.get(t);return n?(i.trace("[RenameAction] got controller, running..."),n.run()):(i.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}(0,e6.HW)(bG.ID,bG,4),(0,e6.Fl)(bq);let bQ=e6.DX.bindToContribution(bG.get);(0,e6.E_)(new bQ({id:"acceptRenameInput",precondition:bW,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:tr.M$.and(ti.R.focus,tr.M$.not("isComposing")),primary:3}})),(0,e6.E_)(new bQ({id:"acceptRenameInputWithPreview",precondition:tr.M$.and(bW,tr.M$.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:tr.M$.and(ti.R.focus,tr.M$.not("isComposing")),primary:2051}})),(0,e6.E_)(new bQ({id:"cancelRenameInput",precondition:bW,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:ti.R.focus,primary:9,secondary:[1033]}})),(0,ts.ug)(class extends ts.L{constructor(){super({id:"focusNextRenameSuggestion",title:{...tn.aS(1374,"Focus Next Rename Suggestion")},precondition:bW,keybinding:[{primary:18,weight:199}]})}run(e){let t=e.get(te.T).getFocusedCodeEditor();if(!t)return;let i=bG.get(t);i&&i.focusNextRenameSuggestion()}}),(0,ts.ug)(class extends ts.L{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...tn.aS(1375,"Focus Previous Rename Suggestion")},precondition:bW,keybinding:[{primary:16,weight:199}]})}run(e){let t=e.get(te.T).getFocusedCodeEditor();if(!t)return;let i=bG.get(t);i&&i.focusPreviousRenameSuggestion()}}),(0,e6.ke)("_executeDocumentRenameProvider",function(e,t,i,...n){let[s]=n;(0,iu.j)("string"==typeof s);let{renameProvider:o}=e.get(iI.u);return bK(o,t,i,s)}),(0,e6.ke)("_executePrepareRename",async function(e,t,i){let{renameProvider:n}=e.get(iI.u),s=new b$(t,i,n),o=await s.resolveRenameLocation(t6.XO.None);if(o?.rejectReason)throw Error(o.rejectReason);return o}),iv.O.as(s$.Fd.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:6,description:tn.kg(1372,"Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var bY=function(e,t){return function(i,n){t(i,n,e)}};let bZ=class extends tT.jG{static{this.ID="editor.sectionHeaderDetector"}constructor(e,t,i){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(81)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(t.onDidChange(t=>{let i=this.editor.getModel()?.getLanguageId();i&&t.affects(i)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(t=>{(!this.options||t.hasChanged(81))&&(this.options=this.createOptions(e.getOption(81)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(e=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(e=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new tM.uC(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;let t=this.editor.getModel().getLanguageId();if(!t)return;let i=this.languageConfigurationService.getLanguageConfiguration(t).comments,n=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;if(i||n?.markers)return{foldingRules:n,markSectionHeaderRegex:e.markSectionHeaderRegex,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;let e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;let t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(i=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(i)})}updateDecorations(e){let t=this.editor.getModel();t&&(e=e.filter(e=>{if(!e.shouldBeInComments)return!0;let i=t.validateRange(e.range),n=t.tokenization.getLineTokens(i.startLineNumber),s=n.findTokenIndexAtOffset(i.startColumn-1),o=n.getStandardTokenType(s);return n.getLanguageId(s)===t.getLanguageId()&&1===o}));let i=Object.values(this.currentOccurrences).map(e=>e.decorationId),n=e.map(e=>{var t;return{range:(t=e).range,options:tA.kI.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:t.hasSeparatorLine?2:1,sectionHeaderText:t.text}})}});this.editor.changeDecorations(t=>{let s=t.deltaDecorations(i,n);this.currentOccurrences={};for(let t=0,i=s.length;t<i;t++){let i={sectionHeader:e[t],decorationId:s[t]};this.currentOccurrences[i.decorationId]=i}})}stop(){this.computeSectionHeaders.cancel(),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop(),this.decorations.clear()}};bZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([bY(1,r1.JZ),bY(2,or.w)],bZ),(0,e6.HW)(bZ.ID,bZ,1);var bX=i(4880),bJ=i(88521);function b0(e){let t=new Uint32Array(function(e){let t;if(t=2,"full"===e.type)t+=1+e.data.length;else for(let i of(t+=1,t+=3*e.deltas.length,e.deltas))i.data&&(t+=i.data.length);return t}(e)),i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else for(let n of(t[i++]=2,t[i++]=e.deltas.length,e.deltas))t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0;let n=new Uint8Array(t.buffer,t.byteOffset,4*t.length);return tJ.cm()||function(e){for(let t=0,i=e.length;t<i;t+=4){let i=e[t+0],n=e[t+1],s=e[t+2],o=e[t+3];e[t+0]=o,e[t+1]=s,e[t+2]=n,e[t+3]=i}}(n),f3.MB.wrap(n)}function b1(e){return e&&!!e.data}function b2(e){return e&&Array.isArray(e.edits)}class b5{constructor(e,t,i){this.provider=e,this.tokens=t,this.error=i}}async function b4(e,t,i,n,s){let o=function(e,t){let i=e.orderedGroups(t);return i.length>0?i[0]:[]}(e,t),r=await Promise.all(o.map(async e=>{let o,r=null;try{o=await e.provideDocumentSemanticTokens(t,e===i?n:null,s)}catch(e){r=e,o=null}return o&&(b1(o)||b2(o))||(o=null),new b5(e,o,r)}));for(let e of r){if(e.error)throw e.error;if(e.tokens)return e}return r.length>0?r[0]:null}class b3{constructor(e,t){this.provider=e,this.tokens=t}}function b7(e,t){let i=e.orderedGroups(t);return i.length>0?i[0]:[]}async function b9(e,t,i,n){let s=b7(e,t),o=await Promise.all(s.map(async e=>{let s;try{s=await e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){(0,ih.M_)(e),s=null}return s&&b1(s)||(s=null),new b3(e,s)}));for(let e of o)if(e.tokens)return e;return o.length>0?o[0]:null}tC.w.registerCommand("_provideDocumentSemanticTokensLegend",async(e,...t)=>{let[i]=t;(0,iu.j)(i instanceof i_.r);let n=e.get(n3.S).getModel(i);if(!n)return;let{documentSemanticTokensProvider:s}=e.get(iI.u),o=function(e,t){let i=e.orderedGroups(t);return i.length>0?i[0]:null}(s,n);return o?o[0].getLegend():e.get(tC.d).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)}),tC.w.registerCommand("_provideDocumentSemanticTokens",async(e,...t)=>{let[i]=t;(0,iu.j)(i instanceof i_.r);let n=e.get(n3.S).getModel(i);if(!n)return;let{documentSemanticTokensProvider:s}=e.get(iI.u);if(!s.has(n))return e.get(tC.d).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());let o=await b4(s,n,null,null,t6.XO.None);if(!o)return;let{provider:r,tokens:a}=o;if(!a||!b1(a))return;let l=b0({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l}),tC.w.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(e,...t)=>{let[i,n]=t;(0,iu.j)(i instanceof i_.r);let s=e.get(n3.S).getModel(i);if(!s)return;let{documentRangeSemanticTokensProvider:o}=e.get(iI.u),r=b7(o,s);if(0===r.length)return;if(1===r.length)return r[0].getLegend();if(!n||!tO.Q.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();let a=await b9(o,s,tO.Q.lift(n),t6.XO.None);if(a)return a.provider.getLegend()}),tC.w.registerCommand("_provideDocumentRangeSemanticTokens",async(e,...t)=>{let[i,n]=t;(0,iu.j)(i instanceof i_.r),(0,iu.j)(tO.Q.isIRange(n));let s=e.get(n3.S).getModel(i);if(!s)return;let{documentRangeSemanticTokensProvider:o}=e.get(iI.u),r=await b9(o,s,tO.Q.lift(n),t6.XO.None);if(r&&r.tokens)return b0({id:0,type:"full",data:r.tokens.data})});let b8="editor.semanticHighlighting";function b6(e,t,i){let n=i.getValue(b8,{overrideIdentifier:e.getLanguageId(),resource:e.uri})?.enabled;return"boolean"==typeof n?n:t.getColorTheme().semanticHighlighting}var Ce=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ct=function(e,t){return function(i,n){t(i,n,e)}};let Ci=class extends tT.jG{constructor(e,t,i,n,s,o){super(),this._watchers=new sQ.fT;let r=t=>{this._watchers.get(t.uri)?.dispose(),this._watchers.set(t.uri,new Cn(t,e,i,s,o))},a=(e,t)=>{t.dispose(),this._watchers.delete(e.uri)},l=()=>{for(let e of t.getModels()){let t=this._watchers.get(e.uri);b6(e,i,n)?t||r(e):t&&a(e,t)}};t.getModels().forEach(e=>{b6(e,i,n)&&r(e)}),this._register(t.onModelAdded(e=>{b6(e,i,n)&&r(e)})),this._register(t.onModelRemoved(e=>{let t=this._watchers.get(e.uri);t&&a(e,t)})),this._register(n.onDidChangeConfiguration(e=>{e.affectsConfiguration(b8)&&l()})),this._register(i.onDidColorThemeChange(l))}dispose(){(0,tT.AS)(this._watchers.values()),this._watchers.clear(),super.dispose()}};Ci=Ce([Ct(0,bJ.F),Ct(1,n3.S),Ct(2,tB.Gy),Ct(3,to.pG),Ct(4,s9.U),Ct(5,iI.u)],Ci);let Cn=class extends tT.jG{static{eG=this}static{this.REQUEST_MIN_DELAY=300}static{this.REQUEST_MAX_DELAY=2e3}constructor(e,t,i,n,s){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:eG.REQUEST_MIN_DELAY,max:eG.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new tM.uC(()=>this._fetchDocumentSemanticTokensNow(),eG.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));let o=()=>{for(let t of((0,tT.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._provider.all(e)))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};o(),this._register(this._provider.onDidChange(()=>{o(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(i.onDidColorThemeChange(e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),(0,tT.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){var e,t;if(this._currentDocumentRequestCancellationTokenSource)return;if(e=this._provider,t=this._model,!e.has(t)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let i=new t6.Qi,n=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,s=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,o=b4(this._provider,this._model,n,s,i.token);this._currentDocumentRequestCancellationTokenSource=i,this._providersChangedDuringRequest=!1;let r=[],a=this._model.onDidChangeContent(e=>{r.push(e)}),l=new t0.W(!1);o.then(e=>{if(this._debounceInformation.update(this._model,l.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),e){let{provider:t,tokens:i}=e,n=this._semanticTokensStylingService.getStyling(t);this._setDocumentSemanticTokens(t,i||null,n,r)}else this._setDocumentSemanticTokens(null,null,null,r)},e=>{e&&(ih.MB(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||ih.dz(e),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),(r.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let o=0;o<s;o++)i[n+o]=e[t+o]}_setDocumentSemanticTokens(e,t,i,n){let s=this._currentDocumentResponse,o=()=>{(n.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i)return void this._model.tokenization.setSemanticTokens(null,!1);if(!t){this._model.tokenization.setSemanticTokens(null,!0),o();return}if(b2(t)){if(!s)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:s.data};else{let e=0;for(let i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;let n=s.data,o=new Uint32Array(n.length+e),r=n.length,a=o.length;for(let e=t.edits.length-1;e>=0;e--){let l=t.edits[e];if(l.start>n.length){i.warnInvalidEditStart(s.resultId,t.resultId,e,l.start,n.length),this._model.tokenization.setSemanticTokens(null,!0);return}let h=r-(l.start+l.deleteCount);h>0&&(eG._copy(n,r-h,o,a-h,h),a-=h),l.data&&(eG._copy(l.data,0,o,a-l.data.length,l.data.length),a-=l.data.length),r=l.start}r>0&&eG._copy(n,0,o,0,r),t={resultId:t.resultId,data:o}}}if(b1(t)){this._currentDocumentResponse=new Cs(e,t.resultId,t.data);let s=(0,bX.b)(t,i,this._model.getLanguageId());if(n.length>0)for(let e of n)for(let t of s)for(let i of e.changes)t.applyEdit(i.range,i.text);this._model.tokenization.setSemanticTokens(s,!0)}else this._model.tokenization.setSemanticTokens(null,!0);o()}};Cn=eG=Ce([Ct(1,bJ.F),Ct(2,tB.Gy),Ct(3,s9.U),Ct(4,iI.u)],Cn);class Cs{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,oe.x)(Ci);var Co=function(e,t){return function(i,n){t(i,n,e)}};let Cr=class extends tT.jG{static{this.ID="editor.contrib.viewportSemanticTokens"}constructor(e,t,i,n,s,o){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=o.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new tM.uC(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];let r=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{r()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),r()})),this._register(this._editor.onDidChangeModelContent(e=>{this._cancelAll(),r()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),r()})),this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(b8)&&(this._cancelAll(),r())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),r()})),r()}_cancelAll(){for(let e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e)return void this._outstandingRequests.splice(t,1)}_tokenizeViewportNow(){var e;if(!this._editor.hasModel())return;let t=this._editor.getModel();if(t.tokenization.hasCompleteSemanticTokens())return;if(!b6(t,this._themeService,this._configurationService)||(e=this._provider,!e.has(t))){t.tokenization.hasSomeSemanticTokens()&&t.tokenization.setSemanticTokens(null,!1);return}let i=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(i.map(e=>this._requestRange(t,e)))}_requestRange(e,t){let i=e.getVersionId(),n=(0,tM.SS)(i=>Promise.resolve(b9(this._provider,e,t,i))),s=new t0.W(!1);return n.then(n=>{if(this._debounceInformation.update(e,s.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;let{provider:o,tokens:r}=n,a=this._semanticTokensStylingService.getStyling(o);e.tokenization.setPartialSemanticTokens(t,(0,bX.b)(r,a,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(n),()=>this._removeOutstandingRequest(n)),n}};Cr=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Co(1,bJ.F),Co(2,tB.Gy),Co(3,to.pG),Co(4,s9.U),Co(5,iI.u)],Cr),(0,e6.HW)(Cr.ID,Cr,1);class Ca{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){let i=[];for(let n of t){let t=[];i.push(t),this.selectSubwords&&this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){let n=t.getWordAtPosition(i);if(!n)return;let{word:s,startColumn:o}=n,r=i.column-o,a=r,l=r,h=0;for(;a>=0;a--){let e=s.charCodeAt(a);if(a!==r&&(95===e||45===e)||(0,iE.Lv)(e)&&(0,iE.Wv)(h))break;h=e}for(a+=1;l<s.length;l++){let e=s.charCodeAt(l);if((0,iE.Wv)(e)&&(0,iE.Lv)(h)||95===e||45===e)break;h=e}a<l&&e.push({range:new tO.Q(i.lineNumber,o+a,i.lineNumber,o+l)})}_addWordRanges(e,t,i){let n=t.getWordAtPosition(i);n&&e.push({range:new tO.Q(i.lineNumber,n.startColumn,i.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new tO.Q(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}class Cl{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;let i=new Cl(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let Ch=class{static{eq=this}static{this.ID="editor.contrib.smartSelectController"}static get(e){return e.getContribution(eq.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await Cg(this._languageFeaturesService.selectionRangeProvider,i,t.map(e=>e.getPosition()),this._editor.getOption(129),t6.XO.None).then(e=>{if(t8.EI(e)&&e.length===t.length&&this._editor.hasModel()&&t8.aI(this._editor.getSelections(),t,(e,t)=>e.equalsSelection(t))){for(let i=0;i<e.length;i++)e[i]=e[i].filter(e=>e.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition())),e[i].unshift(t[i]);this._state=e.map(e=>new Cl(0,e)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(t=>t.mov(e));let n=this._state.map(e=>tk.L.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}}};Ch=eq=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(R=iI.u,function(e,t){R(e,t,1)})],Ch);class Cd extends e6.ks{constructor(e,t){super(t),this._forward=e}async run(e,t){let i=Ch.get(t);i&&await i.run(this._forward)}}class Cc extends Cd{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:tn.aS(1385,"Expand Selection"),precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"1_basic",title:tn.kg(1383,"&&Expand Selection"),order:2}})}}tC.w.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class Cu extends Cd{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:tn.aS(1386,"Shrink Selection"),precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"1_basic",title:tn.kg(1384,"&&Shrink Selection"),order:3}})}}async function Cg(e,t,i,n,s){let o=e.all(t).concat(new Ca(n.selectSubwords));1===o.length&&o.unshift(new gK);let r=[],a=[];for(let e of o)r.push(Promise.resolve(e.provideSelectionRanges(t,i,s)).then(e=>{if(t8.EI(e)&&e.length===i.length)for(let t=0;t<i.length;t++)for(let n of(a[t]||(a[t]=[]),e[t]))tO.Q.isIRange(n.range)&&tO.Q.containsPosition(n.range,i[t])&&a[t].push(tO.Q.lift(n.range))},ih.M_));return await Promise.all(r),a.map(e=>{let i;if(0===e.length)return[];e.sort((e,t)=>tR.y.isBefore(e.getStartPosition(),t.getStartPosition())?1:tR.y.isBefore(t.getStartPosition(),e.getStartPosition())?-1:tR.y.isBefore(e.getEndPosition(),t.getEndPosition())?-1:1*!!tR.y.isBefore(t.getEndPosition(),e.getEndPosition()));let s=[];for(let t of e)(!i||tO.Q.containsRange(t,i)&&!tO.Q.equalsRange(t,i))&&(s.push(t),i=t);if(!n.selectLeadingAndTrailingWhitespace)return s;let o=[s[0]];for(let e=1;e<s.length;e++){let i=s[e-1],n=s[e];if(n.startLineNumber!==i.startLineNumber||n.endLineNumber!==i.endLineNumber){let e=new tO.Q(i.startLineNumber,t.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,t.getLineLastNonWhitespaceColumn(i.endLineNumber));e.containsRange(i)&&!e.equalsRange(i)&&n.containsRange(e)&&!n.equalsRange(e)&&o.push(e);let s=new tO.Q(i.startLineNumber,1,i.endLineNumber,t.getLineMaxColumn(i.endLineNumber));s.containsRange(i)&&!s.equalsRange(e)&&n.containsRange(s)&&!n.equalsRange(s)&&o.push(s)}o.push(n)}return o})}(0,e6.HW)(Ch.ID,Ch,4),(0,e6.Fl)(Cc),(0,e6.Fl)(Cu),tC.w.registerCommand("_executeSelectionRangeProvider",async function(e,...t){let[i,n]=t;(0,iu.j)(i_.r.isUri(i));let s=e.get(iI.u).selectionRangeProvider,o=await e.get(rU.b).createModelReference(i);try{return Cg(s,o.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},t6.XO.None)}finally{o.dispose()}});let Cp=Object.freeze({View:(0,tn.aS)(1623,"View"),Help:(0,tn.aS)(1624,"Help"),Test:(0,tn.aS)(1625,"Test"),File:(0,tn.aS)(1626,"File"),Preferences:(0,tn.aS)(1627,"Preferences"),Developer:(0,tn.aS)(1628,"Developer")});class Cm extends e6.qO{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...(0,tn.aS)(1433,"Toggle Editor Sticky Scroll"),mnemonicTitle:(0,tn.kg)(1429,"&&Toggle Editor Sticky Scroll")},metadata:{description:(0,tn.aS)(1434,"Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:Cp.View,toggled:{condition:tr.M$.equals("config.editor.stickyScroll.enabled",!0),title:(0,tn.kg)(1430,"Sticky Scroll"),mnemonicTitle:(0,tn.kg)(1431,"&&Sticky Scroll")},menu:[{id:ts.D8.CommandPalette},{id:ts.D8.MenubarAppearanceMenu,group:"4_editor",order:3},{id:ts.D8.StickyScrollContext}]})}async runEditorCommand(e,t){let i=e.get(to.pG),n=!i.getValue("editor.stickyScroll.enabled"),s=ml.get(t)?.isFocused();i.updateValue("editor.stickyScroll.enabled",n),s&&t.focus()}}class Cf extends e6.qO{constructor(){super({id:"editor.action.focusStickyScroll",title:{...(0,tn.aS)(1435,"Focus Editor Sticky Scroll"),mnemonicTitle:(0,tn.kg)(1432,"&&Focus Editor Sticky Scroll")},precondition:tr.M$.and(tr.M$.has("config.editor.stickyScroll.enabled"),ti.R.stickyScrollVisible),menu:[{id:ts.D8.CommandPalette}]})}runEditorCommand(e,t){ml.get(t)?.focus()}}class C_ extends e6.qO{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:(0,tn.aS)(1436,"Select the next editor sticky scroll line"),precondition:ti.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:100,primary:18}})}runEditorCommand(e,t){ml.get(t)?.focusNext()}}class Cv extends e6.qO{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:(0,tn.aS)(1437,"Select the previous sticky scroll line"),precondition:ti.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:100,primary:16}})}runEditorCommand(e,t){ml.get(t)?.focusPrevious()}}class Cb extends e6.qO{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:(0,tn.aS)(1438,"Go to the focused sticky scroll line"),precondition:ti.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:100,primary:3}})}runEditorCommand(e,t){ml.get(t)?.goToFocused()}}class CC extends e6.qO{constructor(){super({id:"editor.action.selectEditor",title:(0,tn.aS)(1439,"Select Editor"),precondition:ti.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:100,primary:9}})}runEditorCommand(e,t){ml.get(t)?.selectEditor()}}(0,e6.HW)(ml.ID,ml,1),(0,ts.ug)(Cm),(0,ts.ug)(Cf),(0,ts.ug)(Cv),(0,ts.ug)(C_),(0,ts.ug)(Cb),(0,ts.ug)(CC);var Cw=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Cy=function(e,t){return function(i,n){t(i,n,e)}};class CS{constructor(e,t,i,n,s,o,r){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.action=o,this.completion=r}}let Ck=class extends tT.mp{constructor(e,t,i,n,s,o){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=o}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn<i.endColumn&&0===this.completionModel.getIncompleteProvider().size}get items(){let e=[],{items:t}=this.completionModel,i=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},t),n=ie.f.slice(t,i),s=ie.f.slice(t,0,i),o=5;for(let t of ie.f.concat(n,s)){if(t.score===aD.ne.Default)continue;let i=new tO.Q(t.editStart.lineNumber,t.editStart.column,t.editInsertEnd.lineNumber,t.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),n=t.completion.insertTextRules&&4&t.completion.insertTextRules?{snippet:t.completion.insertText}:t.completion.insertText;e.push(new CS(i,n,t.filterTextLow??t.labelLow,t.completion.additionalTextEdits,t.completion.command,t.completion.action,t)),o-- >=0&&t.resolve(t6.XO.None)}return e}};Ck=Cw([Cy(5,gV)],Ck);let Cx=class extends tT.jG{constructor(e,t,i,n){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=i,this._editorService=n,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,i,n){let s,o,r;if(i.selectedSuggestionInfo)return;for(let t of this._editorService.listCodeEditors())if(t.getModel()===e){s=t;break}if(!s)return;let a=s.getOption(102);if(c5.isAllOff(a))return;e.tokenization.tokenizeIfCheap(t.lineNumber);let l=e.tokenization.getLineTokens(t.lineNumber),h=l.getStandardTokenType(l.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==c5.valueFor(a,h))return;let d=e.getWordAtPosition(t);if(d?.word||(o=this._getTriggerCharacterInfo(e,t)),!d?.word&&!o||(d||(d=e.getWordUntilPosition(t)),d.endColumn!==t.column))return;let c=e.getValueInRange(new tO.Q(t.lineNumber,1,t.lineNumber,t.column));if(!o&&this._lastResult?.canBeReused(e,t.lineNumber,d)){let e=new gq(c,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),r=this._lastResult}else{let i,a=await c0(this._languageFeatureService.completionProvider,e,t,new cX(void 0,gJ.createSuggestFilter(s).itemKind,o?.providers),o&&{triggerKind:1,triggerCharacter:o.ch},n);a.needsClipboard&&(i=await this._clipboardService.readText());let l=new gQ(a.items,t.column,new gq(c,0),gG.None,s.getOption(134),s.getOption(128),{boostFullMatch:!1,firstMatchCanBeWeak:!1},i);r=new Ck(e,t.lineNumber,d,l,a,this._suggestMemoryService)}return this._lastResult=r,r}handleItemDidShow(e,t){t.completion.resolve(t6.XO.None)}disposeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){let i=e.getValueInRange(tO.Q.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),n=new Set;for(let t of this._languageFeatureService.completionProvider.all(e))t.triggerCharacters?.includes(i)&&n.add(t);if(0!==n.size)return{providers:n,ch:i}}};Cx=Cw([Cy(0,iI.u),Cy(1,t1.h),Cy(2,gV),Cy(3,te.T)],Cx),(0,oe.x)(Cx);class CL extends e6.ks{constructor(){super({id:"editor.action.forceRetokenize",label:tn.aS(1517,"Developer: Force Retokenize"),precondition:void 0})}run(e,t){if(!t.hasModel())return;let i=t.getModel();i.tokenization.resetTokenization();let n=new t0.W;i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}(0,e6.Fl)(CL);var CD=i(24417);class CI extends ts.L{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:CI.ID,title:tn.aS(1515,"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:tn.aS(1516,"Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){let e=!CD.M.getTabFocusMode();CD.M.setTabFocusMode(e),e?(0,tw.xE)(tn.kg(1513,"Pressing Tab will now move focus to the next focusable element")):(0,tw.xE)(tn.kg(1514,"Pressing Tab will now insert the tab character"))}}(0,ts.ug)(CI),i(30679);var CN=i(24377);i(43219);var CE=i(88723);i(22596);var CM=function(e,t){return function(i,n){t(i,n,e)}};let CT=class extends tT.jG{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n,s){super(),this._link=t,this._hoverService=n,this._enabled=!0,this.el=(0,e8.BC)(e,(0,e8.$)("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??(0,re.nZ)("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");let o=this._register(new CE.f(this.el,"click")),r=this._register(new CE.f(this.el,"keypress")),a=iA.Jh.chain(r.event,e=>e.map(e=>new bA.Z(e)).filter(e=>3===e.keyCode)),l=this._register(new CE.f(this.el,sk.B.Tap)).event;this._register(sk.q.addTarget(this.el));let h=iA.Jh.any(o.event,a,l);this._register(h(e=>{this.enabled&&(e8.fs.stop(e,!0),i?.opener?i.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};CT=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([CM(3,o6.TN),CM(4,iB.Cr)],CT);var CR=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},CO=function(e,t){return function(i,n){t(i,n,e)}};let CP=class extends tT.jG{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(CA))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,26)}};CP=CR([CO(1,t5._Y)],CP);let CA=class extends tT.jG{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(iF.T,{}),this.element=(0,e8.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"==typeof e.message?e.message:void 0}getBannerMessage(e){if("string"==typeof e){let t=(0,e8.$)("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){(0,e8.w_)(this.element)}show(e){(0,e8.w_)(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let i=(0,e8.BC)(this.element,(0,e8.$)("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild((0,e8.$)(`div${iM.L.asCSSSelector(e.icon)}`));let n=(0,e8.BC)(this.element,(0,e8.$)("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=(0,e8.BC)(this.element,(0,e8.$)("div.message-actions-container")),e.actions)for(let t of e.actions)this._register(this.instantiationService.createInstance(CT,this.messageActionsContainer,{...t,tabIndex:-1},{}));let s=(0,e8.BC)(this.element,(0,e8.$)("div.action-container"));this.actionBar=this._register(new nu.E(s)),this.actionBar.push(this._register(new oN.rc("banner.close",(0,tn.kg)(1518,"Close Banner"),iM.L.asClassName(sL.$_),!0,()=>{"function"==typeof e.onClose&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};CA=CR([CO(0,t5._Y)],CA);var CF=i(51543),CB=i(31799),CW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},CH=function(e,t){return function(i,n){t(i,n,e)}};let CV=(0,sL.pU)("extensions-warning-message",e9.W.warning,tn.kg(1519,"Icon shown with a warning message in the extensions editor.")),Cz=class extends tT.jG{static{this.ID="editor.contrib.unicodeHighlighter"}constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){let t;if(this._bannerClosed)return;let i=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);if(e.nonBasicAsciiCharacterCount>=i)t={message:tn.kg(1520,"This document contains many non-basic ASCII unicode characters"),command:new C1};else if(e.ambiguousCharacterCount>=i)t={message:tn.kg(1521,"This document contains many ambiguous unicode characters"),command:new CJ};else if(e.invisibleCharacterCount>=i)t={message:tn.kg(1522,"This document contains many invisible unicode characters"),command:new C0};else throw Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:t.message,icon:CV,actions:[{label:t.command.shortLabel,href:`command:${t.command.desc.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(CP,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(142),this._register(i.onDidChangeTrust(e=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(142)&&(this._options=e.getOption(142),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){var e,t;if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;let i=(e=this._workspaceTrustService.isWorkspaceTrusted(),{nonBasicASCII:(t=this._options).nonBasicASCII===sv.XR?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===sv.XR?!e:t.includeComments,includeStrings:t.includeStrings===sv.XR?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales});if([i.nonBasicASCII,i.ambiguousCharacters,i.invisibleCharacters].every(e=>!1===e))return;let n={nonBasicASCII:i.nonBasicASCII,ambiguousCharacters:i.ambiguousCharacters,invisibleCharacters:i.invisibleCharacters,includeComments:i.includeComments,includeStrings:i.includeStrings,allowedCodePoints:Object.keys(i.allowedCharacters).map(e=>e.codePointAt(0)),allowedLocales:Object.keys(i.allowedLocales).map(e=>"_os"===e?_6.x.NumberFormat().value.resolvedOptions().locale:"_vscode"===e?tJ.BH:e)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new CU(this._editor,n,this._updateState,this._editorWorkerService):this._highlighter=new Cj(this._editor,n,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};Cz=CW([CH(1,or.w),CH(2,CF.L),CH(3,t5._Y)],Cz);let CU=class extends tT.jG{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new tM.uC(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();let e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);let i=[];if(!t.hasMore)for(let e of t.ranges)i.push({range:e,options:CY.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();return(0,CB.GN)(t,e)?{reason:CQ(t.getValueInRange(e.range),this._options),inComment:(0,CB.a6)(t,e),inString:(0,CB.wc)(t,e)}:null}};CU=CW([CH(3,or.w)],CU);class Cj extends tT.jG{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new tM.uC(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();let e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let t of e){let e=CN.P.computeUnicodeHighlights(this._model,this._options,t);for(let t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(let e of i.ranges)t.push({range:e,options:CY.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),i=t.getValueInRange(e.range);return(0,CB.GN)(t,e)?{reason:CQ(i,this._options),inComment:(0,CB.a6)(t,e),inString:(0,CB.wc)(t,e)}:null}}let C$=tn.kg(1523,"Configure Unicode Highlight Options"),CK=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];let i=this._editor.getModel(),n=this._editor.getContribution(Cz.ID);if(!n)return[];let s=[],o=new Set,r=300;for(let e of t){let t,a=n.getDecorationInfo(e);if(!a)continue;let l=i.getValueInRange(e.range).codePointAt(0),h=Cq(l);switch(a.reason.kind){case 0:t=(0,iE.aC)(a.reason.confusableWith)?tn.kg(1524,"The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,Cq(a.reason.confusableWith.codePointAt(0))):tn.kg(1525,"The character {0} could be confused with the character {1}, which is more common in source code.",h,Cq(a.reason.confusableWith.codePointAt(0)));break;case 1:t=tn.kg(1526,"The character {0} is invisible.",h);break;case 2:t=tn.kg(1527,"The character {0} is not a basic ASCII character.",h)}if(o.has(t))continue;o.add(t);let d={codePoint:l,reason:a.reason,inComment:a.inComment,inString:a.inString},c=tn.kg(1528,"Adjust settings"),u=(0,ty.AV)(C2.ID,d),g=new ty.Bc("",!0).appendMarkdown(t).appendText(" ").appendLink(u,c,C$);s.push(new rg(this,e.range,[g],!1,r++))}return s}renderHoverParts(e,t){return function(e,t,i,n,s){t.sort((0,t8.VE)(e=>e.ordinal,t8.U9));let o=[];for(let r of t){let t=rv(i,r,n,s,e.onContentsChanged);e.fragment.appendChild(t.hoverElement),o.push(t)}return new on(o)}(e,t,this._editor,this._languageService,this._openerService)}};function CG(e){return`U+${e.toString(16).padStart(4,"0")}`}function Cq(e){var t;let i=`\`${CG(e)}\``;return iE.y_.isInvisibleCharacter(e)||(i+=` "${96===(t=e)?"`` ` ``":"`"+String.fromCodePoint(t)+"`"}"`),i}function CQ(e,t){return CN.P.computeUnicodeHighlightReason(e,t)}CK=CW([CH(1,rs.L),CH(2,iB.Cr)],CK);class CY{constructor(){this.map=new Map}static{this.instance=new CY}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let i=`${e}${t}`,n=this.map.get(i);return n||(n=tA.kI.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}class CZ extends e6.ks{constructor(){super({id:CJ.ID,label:tn.aS(1537,"Disable highlighting of characters in comments"),precondition:void 0}),this.shortLabel=tn.kg(1529,"Disable Highlight In Comments")}async run(e,t,i){let n=e.get(to.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sv.Of.includeComments,!1,2)}}class CX extends e6.ks{constructor(){super({id:CJ.ID,label:tn.aS(1538,"Disable highlighting of characters in strings"),precondition:void 0}),this.shortLabel=tn.kg(1530,"Disable Highlight In Strings")}async run(e,t,i){let n=e.get(to.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sv.Of.includeStrings,!1,2)}}class CJ extends ts.L{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:CJ.ID,title:tn.aS(1539,"Disable highlighting of ambiguous characters"),precondition:void 0,f1:!1}),this.shortLabel=tn.kg(1531,"Disable Ambiguous Highlight")}async run(e,t,i){let n=e.get(to.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sv.Of.ambiguousCharacters,!1,2)}}class C0 extends ts.L{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:C0.ID,title:tn.aS(1540,"Disable highlighting of invisible characters"),precondition:void 0,f1:!1}),this.shortLabel=tn.kg(1532,"Disable Invisible Highlight")}async run(e,t,i){let n=e.get(to.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sv.Of.invisibleCharacters,!1,2)}}class C1 extends ts.L{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:C1.ID,title:tn.aS(1541,"Disable highlighting of non basic ASCII characters"),precondition:void 0,f1:!1}),this.shortLabel=tn.kg(1533,"Disable Non ASCII Highlight")}async run(e,t,i){let n=e.get(to.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sv.Of.nonBasicASCII,!1,2)}}class C2 extends ts.L{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:C2.ID,title:tn.aS(1542,"Show Exclude Options"),precondition:void 0,f1:!1})}async run(e,t){let{codePoint:i,reason:n,inString:s,inComment:o}=t,r=String.fromCodePoint(i),a=e.get(ip.GK),l=e.get(to.pG),h=[];if(0===n.kind)for(let e of n.notAmbiguousInLocales)h.push({label:tn.kg(1536,'Allow unicode characters that are more common in the language "{0}".',e),run:async()=>{C4(l,[e])}});if(h.push({label:iE.y_.isInvisibleCharacter(i)?tn.kg(1534,"Exclude {0} (invisible character) from being highlighted",CG(i)):tn.kg(1535,"Exclude {0} from being highlighted",`${CG(i)} "${r}"`),run:()=>C5(l,[i])}),o){let e=new CZ;h.push({label:e.label,run:async()=>e.runAction(l)})}else if(s){let e=new CX;h.push({label:e.label,run:async()=>e.runAction(l)})}function d(e){return"string"==typeof e.desc.title?e.desc.title:e.desc.title.value}if(0===n.kind){let e=new CJ;h.push({label:d(e),run:async()=>e.runAction(l)})}else if(1===n.kind){let e=new C0;h.push({label:d(e),run:async()=>e.runAction(l)})}else if(2===n.kind){let e=new C1;h.push({label:d(e),run:async()=>e.runAction(l)})}else{var c=n;throw Error(`Unexpected value: ${c}`)}let u=await a.pick(h,{title:C$});u&&await u.run()}}async function C5(e,t){let i,n=e.getValue(sv.Of.allowedCharacters);for(let e of(i="object"==typeof n&&n?n:{},t))i[String.fromCodePoint(e)]=!0;await e.updateValue(sv.Of.allowedCharacters,i,2)}async function C4(e,t){let i,n=e.inspect(sv.Of.allowedLocales).user?.value;for(let e of(i="object"==typeof n&&n?Object.assign({},n):{},t))i[e]=!0;await e.updateValue(sv.Of.allowedLocales,i,2)}(0,ts.ug)(CJ),(0,ts.ug)(C0),(0,ts.ug)(C1),(0,ts.ug)(C2),(0,e6.HW)(Cz.ID,Cz,1),os.register(CK);var C3=i(80703),C7=function(e,t){return function(i,n){t(i,n,e)}};let C9="ignoreUnusualLineTerminators",C8=class extends tT.jG{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(143),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(143)&&(this._config=this._editor.getOption(143),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(e=>{e.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){var e,t;let i;if("off"===this._config||!this._editor.hasModel())return;let n=this._editor.getModel();if(n.mightContainUnusualLineTerminators()){if(!(!0===(e=this._codeEditorService,e.getModelProperty(n.uri,C9))||this._editor.getOption(104))){if("auto"===this._config)return void n.removeUnusualLineTerminators(this._editor.getSelections());if(!this._isPresentingDialog){try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:tn.kg(1543,"Unusual Line Terminators"),message:tn.kg(1544,"Detected unusual line terminators"),detail:tn.kg(1545,"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",(0,ij.P8)(n.uri)),primaryButton:tn.kg(1546,"&&Remove Unusual Line Terminators"),cancelButton:tn.kg(1547,"Ignore")})}finally{this._isPresentingDialog=!1}if(!i.confirmed)return void(t=this._codeEditorService,t.setModelProperty(n.uri,C9,!0));n.removeUnusualLineTerminators(this._editor.getSelections())}}}}};C8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([C7(1,C3.X),C7(2,te.T)],C8),(0,e6.HW)(C8.ID,C8,1);var C6=i(52989),we=i(95934);class wt{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,i){let n=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return n?e.isDisposed()?void 0:e.findMatches(n.word,!0,!1,!0,we.J3,!1).map(e=>({range:e.range,kind:iD.Kb.Text})):Promise.resolve([])}provideMultiDocumentHighlights(e,t,i,n){let s=new sQ.fT,o=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!o)return Promise.resolve(s);for(let t of[e,...i]){if(t.isDisposed())continue;let e=t.findMatches(o.word,!0,!1,!0,we.J3,!1).map(e=>({range:e.range,kind:iD.Kb.Text}));e&&s.set(t.uri,e)}return s}}let wi=class extends tT.jG{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new wt)),this._register(e.multiDocumentHighlightProvider.register("*",new wt))}};wi=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(O=iI.u,function(e,t){O(e,t,0)})],wi);var wn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ws=function(e,t){return function(i,n){t(i,n,e)}};let wo=new tr.N1("hasWordHighlights",!1);function wr(e,t,i,n){let s=e.ordered(t);return(0,tM.$1)(s.map(e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,ih.M_)),e=>null!=e).then(e=>{if(e){let i=new sQ.fT;return i.set(t.uri,e),i}return new sQ.fT})}class wa{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=(0,tM.SS)(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let i=e.getWordAtPosition(t.getPosition());return i?new tO.Q(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}cancel(){this.result.cancel()}}class wl extends wa{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return wr(this._providers,e,t.getPosition(),n).then(e=>e||new sQ.fT)}}class wh extends wa{constructor(e,t,i,n,s){super(e,t,i),this._providers=n,this._otherModels=s}_compute(e,t,i,n){return(function(e,t,i,n,s){let o=e.ordered(t);return(0,tM.$1)(o.map(e=>()=>{let o=s.filter(e=>(0,tP.vd)(e)).filter(t=>(0,C6.f)(e.selector,t.uri,t.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(e.provideMultiDocumentHighlights(t,i,o,n)).then(void 0,ih.M_)}),e=>null!=e)})(this._providers,e,t.getPosition(),n,this._otherModels).then(e=>e||new sQ.fT)}}(0,e6.ke)("_executeDocumentHighlights",async(e,t,i)=>{let n=e.get(iI.u),s=await wr(n.documentHighlightProvider,t,i,t6.XO.None);return s?.get(t.uri)});let wd=class{static{eQ=this}static{this.storedDecorationIDs=new sQ.fT}static{this.query=null}constructor(e,t,i,n,s,o,r,a){this.toUnhook=new tT.Cm,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new sQ.fT,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,this.runDelayer=this.toUnhook.add(new tM.ve(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=o,this.textModelService=s,this.configurationService=r,this.logService=a,this._hasWordHighlights=wo.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlightEnablement=this.editor.getOption(90),this.occurrencesHighlightDelay=this.configurationService.getValue("editor.occurrencesHighlightDelay"),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(e=>{this._ignorePositionChangeEvent||"off"!==this.occurrencesHighlightEnablement&&this.runDelayer.trigger(()=>{this._onPositionChanged(e)})})),this.toUnhook.add(e.onDidFocusEditorText(e=>{"off"!==this.occurrencesHighlightEnablement&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}))})),this.toUnhook.add(e.onDidChangeModelContent(e=>{(0,iU.v$)(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(e=>{!e.newModelUrl&&e.oldModelUrl?this._stopSingular():eQ.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(e=>{let t=this.editor.getOption(90);if(this.occurrencesHighlightEnablement!==t)switch(this.occurrencesHighlightEnablement=t,t){case"off":this._stopAll();break;case"singleFile":this._stopAll(eQ.query?.modelInfo?.modelURI);break;case"multiFile":eQ.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",t)}})),this.toUnhook.add(this.configurationService.onDidChangeConfiguration(e=>{if(e.affectsConfiguration("editor.occurrencesHighlightDelay")){let e=r.getValue("editor.occurrencesHighlightDelay");this.occurrencesHighlightDelay!==e&&(this.occurrencesHighlightDelay=e)}})),this.toUnhook.add(e.onDidBlurEditorWidget(()=>{let e=this.codeEditorService.getFocusedCodeEditor();e?e.getModel()?.uri.scheme===iU.ny.vscodeNotebookCell&&this.editor.getModel()?.uri.scheme!==iU.ny.vscodeNotebookCell&&this._stopAll():this._stopAll()})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,eQ.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(e){"off"!==this.occurrencesHighlightEnablement&&(this.runDelayer.cancel(),this.runDelayer.trigger(()=>{this._run(!1,e)}))}stop(){"off"!==this.occurrencesHighlightEnablement&&this._stopAll()}_getSortedHighlights(){return this.decorations.getRanges().sort(tO.Q.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),t=(e.findIndex(e=>e.containsPosition(this.editor.getPosition()))+1)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);let n=this._getWord();if(n){let s=this.editor.getModel().getLineContent(i.startLineNumber);(0,tw.xE)(`${s}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),t=(e.findIndex(e=>e.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);let n=this._getWord();if(n){let s=this.editor.getModel().getLineContent(i.startLineNumber);(0,tw.xE)(`${s}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;let e=eQ.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),eQ.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){let t=this.codeEditorService.listCodeEditors(),i=[];for(let n of t){if(!n.hasModel()||(0,ij.n4)(n.getModel().uri,e))continue;let t=eQ.storedDecorationIDs.get(n.getModel().uri);if(!t)continue;n.removeDecorations(t),i.push(n.getModel().uri);let s=wc.get(n);s?.wordHighlighter&&s.wordHighlighter.decorations.length>0&&(s.wordHighlighter.decorations.clear(),s.wordHighlighter.workerRequest=null,s.wordHighlighter._hasWordHighlights.set(!1))}for(let e of i)eQ.storedDecorationIDs.delete(e)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==iU.ny.vscodeNotebookCell&&eQ.query?.modelInfo?.modelURI.scheme!==iU.ny.vscodeNotebookCell?(eQ.query=null,this._run()):eQ.query?.modelInfo&&(eQ.query.modelInfo=null)),void 0!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),void 0!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if("off"===this.occurrencesHighlightEnablement||"api"!==e.source&&3!==e.reason)return void this._stopAll();this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===iU.ny.vscodeNotebookCell){let t=[];for(let i of this.codeEditorService.listCodeEditors()){let n=i.getModel();n&&n!==e&&n.uri.scheme===iU.ny.vscodeNotebookCell&&t.push(n)}return t}let t=[],i=this.codeEditorService.listCodeEditors();for(let n of i){if(!(0,rJ.Np)(n))continue;let i=n.getModel();i&&e===i.modified&&t.push(i.modified)}if(t.length)return t;if("singleFile"===this.occurrencesHighlightEnablement)return[];for(let n of i){let i=n.getModel();i&&i!==e&&t.push(i)}return t}async _run(e,t){if(this.editor.hasTextFocus()){let e=this.editor.getSelection();if(!e||e.startLineNumber!==e.endLineNumber){eQ.query=null,this._stopAll();return}let t=e.startColumn,i=e.endColumn,n=this._getWord();if(!n||n.startColumn>t||n.endColumn<i){eQ.query=null,this._stopAll();return}eQ.query={modelInfo:{modelURI:this.model.uri,selection:e}}}else if(!eQ.query)return void this._stopAll();if(this.lastCursorPositionChangeTime=new Date().getTime(),(0,ij.n4)(this.editor.getModel().uri,eQ.query.modelInfo?.modelURI)){if(!e){for(let e of this.decorations.getRanges())if(e.containsPosition(this.editor.getPosition()))return}this._stopAll(e?this.model.uri:void 0);let i=++this.workerRequestTokenId;this.workerRequestCompleted=!1;let n=this.getOtherModelsToHighlight(this.editor.getModel());if(!eQ.query||!eQ.query.modelInfo)return;let s=await this.textModelService.createModelReference(eQ.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(s.object.textEditorModel,eQ.query.modelInfo.selection,n),this.workerRequest?.result.then(e=>{i===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=e||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},ih.dz)}catch(e){this.logService.error("Unexpected error during occurrence request. Log: ",e)}finally{s.dispose()}}else if(this.model.uri.scheme===iU.ny.vscodeNotebookCell){let e=++this.workerRequestTokenId;if(this.workerRequestCompleted=!1,!eQ.query||!eQ.query.modelInfo)return;let i=await this.textModelService.createModelReference(eQ.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(i.object.textEditorModel,eQ.query.modelInfo.selection,[this.model]),this.workerRequest?.result.then(i=>{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=i||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},ih.dz)}catch(e){this.logService.error("Unexpected error during occurrence request. Log: ",e)}finally{i.dispose()}}}computeWithModel(e,t,i){var n,s;return i.length?(n=this.multiDocumentProviders,new wh(e,t,this.editor.getOption(148),n,i)):(s=this.providers,new wl(e,t,this.editor.getOption(148),s))}_beginRenderDecorations(e){let t=new Date().getTime(),i=this.lastCursorPositionChangeTime+e;t>=i?(this.renderDecorationsTimer=void 0,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},i-t)}renderDecorations(){for(let t of(this.renderDecorationsTimer=void 0,this.codeEditorService.listCodeEditors())){let i=wc.get(t);if(!i)continue;let n=[],s=t.getModel()?.uri;if(s&&this.workerRequestValue.has(s)){let o=eQ.storedDecorationIDs.get(s),r=this.workerRequestValue.get(s);if(r){for(let t of r)if(t.range){var e;n.push({range:t.range,options:(e=t.kind)===iD.Kb.Write?v2:e===iD.Kb.Text?v5:v7})}}let a=[];t.changeDecorations(e=>{a=e.deltaDecorations(o??[],n)}),eQ.storedDecorationIDs=eQ.storedDecorationIDs.set(s,a),n.length>0&&(i.wordHighlighter?.decorations.set(n),i.wordHighlighter?._hasWordHighlights.set(!0))}}this.workerRequest=null}dispose(){this._stopSingular(),this.toUnhook.dispose()}};wd=eQ=wn([ws(4,rU.b),ws(5,te.T),ws(6,to.pG),ws(7,t2.rr)],wd);let wc=class extends tT.jG{static{eY=this}static{this.ID="editor.contrib.wordHighlighter"}static get(e){return e.getContribution(eY.ID)}constructor(e,t,i,n,s,o,r){super(),this._wordHighlighter=null;let a=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&e.getModel().uri.scheme!==iU.ny.accessibleView&&(this._wordHighlighter=new wd(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,s,n,o,r))};this._register(e.onDidChangeModel(e=>{this._wordHighlighter&&(e.newModelUrl||e.oldModelUrl?.scheme===iU.ny.vscodeNotebookCell||this.wordHighlighter?.stop(),this._wordHighlighter.dispose(),this._wordHighlighter=null),a()})),a()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore(250)}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};wc=eY=wn([ws(1,tr.fN),ws(2,iI.u),ws(3,te.T),ws(4,rU.b),ws(5,to.pG),ws(6,t2.rr)],wc);class wu extends e6.ks{constructor(e,t){super(t),this._isNext=e}run(e,t){let i=wc.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class wg extends wu{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:tn.aS(1557,"Go to Next Symbol Highlight"),precondition:wo,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:65,weight:100}})}}class wp extends wu{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:tn.aS(1558,"Go to Previous Symbol Highlight"),precondition:wo,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:1089,weight:100}})}}class wm extends e6.ks{constructor(){super({id:"editor.action.wordHighlight.trigger",label:tn.aS(1559,"Trigger Symbol Highlight"),precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:0,weight:100}})}run(e,t,i){let n=wc.get(t);n&&n.restoreViewState(!0)}}(0,e6.HW)(wc.ID,wc,0),(0,e6.Fl)(wg),(0,e6.Fl)(wp),(0,e6.Fl)(wm),(0,oe.x)(wi);var wf=i(6849),w_=i(6581),wv=i(21348);class wb extends e6.DX{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;let n=(0,wv.i)(t.getOption(148),t.getOption(147)),s=t.getModel(),o=t.getSelections(),r=o.length>1,a=o.map(e=>{let t=new tR.y(e.positionLineNumber,e.positionColumn),i=this._move(n,s,t,this._wordNavigationType,r);return this._moveTo(e,i,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(e=>wf.MF.fromModelSelection(e))),1===a.length){let e=new tR.y(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new tk.L(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new tk.L(t.lineNumber,t.column,t.lineNumber,t.column)}}class wC extends wb{_move(e,t,i,n,s){return w_.z.moveWordLeft(e,t,i,n,s)}}class ww extends wb{_move(e,t,i,n,s){return w_.z.moveWordRight(e,t,i,n)}}class wy extends wC{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class wS extends wC{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class wk extends wC{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:tr.M$.and(ti.R.textInputFocus,tr.M$.and(o1.f,aG.nd)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}class wx extends wC{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class wL extends wC{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class wD extends wC{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:tr.M$.and(ti.R.textInputFocus,tr.M$.and(o1.f,aG.nd)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class wI extends wC{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,wv.i)(sv.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class wN extends wC{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,wv.i)(sv.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class wE extends ww{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class wM extends ww{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:tr.M$.and(ti.R.textInputFocus,tr.M$.and(o1.f,aG.nd)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}class wT extends ww{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class wR extends ww{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class wO extends ww{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:tr.M$.and(ti.R.textInputFocus,tr.M$.and(o1.f,aG.nd)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class wP extends ww{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class wA extends ww{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,wv.i)(sv.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class wF extends ww{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,wv.i)(sv.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class wB extends e6.DX{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){let n=e?.get(r1.JZ);if(!t.hasModel()||!n)return;let s=(0,wv.i)(t.getOption(148),t.getOption(147)),o=t.getModel(),r=t.getSelections(),a=t.getOption(10),l=t.getOption(15),h=n.getLanguageConfiguration(o.getLanguageId()).getAutoClosingPairs(),d=t._getViewModel(),c=r.map(e=>{let i=this._delete({wordSeparators:s,model:o,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(13),autoClosingBrackets:a,autoClosingQuotes:l,autoClosingPairs:h,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new tQ.iu(i,"")});t.pushUndoStop(),t.executeCommands(this.id,c),t.pushUndoStop()}}class wW extends wB{_delete(e,t){let i=w_.z.deleteWordLeft(e,t);return i||new tO.Q(1,1,1,1)}}class wH extends wB{_delete(e,t){let i=w_.z.deleteWordRight(e,t);if(i)return i;let n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new tO.Q(n,s,n,s)}}class wV extends wW{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:ti.R.writable})}}class wz extends wW{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:ti.R.writable})}}class wU extends wW{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class wj extends wH{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:ti.R.writable})}}class w$ extends wH{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:ti.R.writable})}}class wK extends wH{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class wG extends e6.ks{constructor(){super({id:"deleteInsideWord",precondition:ti.R.writable,label:tn.aS(1560,"Delete Word")})}run(e,t,i){if(!t.hasModel())return;let n=(0,wv.i)(t.getOption(148),t.getOption(147)),s=t.getModel(),o=t.getSelections().map(e=>{let t=w_.z.deleteInsideWord(n,s,e);return new tQ.iu(t,"")});t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}(0,e6.E_)(new wy),(0,e6.E_)(new wS),(0,e6.E_)(new wk),(0,e6.E_)(new wx),(0,e6.E_)(new wL),(0,e6.E_)(new wD),(0,e6.E_)(new wE),(0,e6.E_)(new wM),(0,e6.E_)(new wT),(0,e6.E_)(new wR),(0,e6.E_)(new wO),(0,e6.E_)(new wP),(0,e6.E_)(new wI),(0,e6.E_)(new wN),(0,e6.E_)(new wA),(0,e6.E_)(new wF),(0,e6.E_)(new wV),(0,e6.E_)(new wz),(0,e6.E_)(new wU),(0,e6.E_)(new wj),(0,e6.E_)(new w$),(0,e6.E_)(new wK),(0,e6.Fl)(wG);class wq extends wB{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let i=w_.c.deleteWordPartLeft(e);return i||new tO.Q(1,1,1,1)}}class wQ extends wB{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let i=w_.c.deleteWordPartRight(e);if(i)return i;let n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new tO.Q(n,s,n,s)}}class wY extends wb{_move(e,t,i,n,s){return w_.c.moveWordPartLeft(e,t,i,s)}}class wZ extends wY{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}tC.w.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class wX extends wY{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}tC.w.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class wJ extends wb{_move(e,t,i,n,s){return w_.c.moveWordPartRight(e,t,i)}}class w0 extends wJ{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class w1 extends wJ{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}(0,e6.E_)(new wq),(0,e6.E_)(new wQ),(0,e6.E_)(new wZ),(0,e6.E_)(new wX),(0,e6.E_)(new w0),(0,e6.E_)(new w1);class w2 extends tT.jG{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=iH.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(105);t||(t=new ty.Bc(this.editor.isSimpleWidget?tn.kg(1363,"Cannot edit in read-only input"):tn.kg(1364,"Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}(0,e6.HW)(w2.ID,w2,2);var w5=i(77133),w4=function(e,t){return function(i,n){t(i,n,e)}};let w3=class extends tT.jG{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=(0,oM.FY)(this,void 0);let n=(0,oM.yQ)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),s=(0,oM.yQ)("_textModel.onDidChangeContent",iA.Jh.debounce(e=>this._textModel.onDidChangeContent(e),()=>void 0,100));this._register((0,oM.yC)(async(e,t)=>{n.read(e),s.read(e);let i=t.add(new vQ.MZ),o=await this._outlineModelService.getOrCreate(this._textModel,i.token);t.isDisposed||this._currentModel.set(o,void 0)}))}getBreadcrumbItems(e,t){let i=this._currentModel.read(t);if(!i)return[];let n=i.asListOfDocumentSymbols().filter(t=>e.contains(t.range.startLineNumber)&&!e.contains(t.range.endLineNumber));return n.sort((0,t8.Hw)((0,t8.VE)(e=>e.range.endLineNumber-e.range.startLineNumber,t8.U9))),n.map(e=>({name:e.name,kind:e.kind,startLineNumber:e.range.startLineNumber}))}};w3=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([w4(1,iI.u),w4(2,cU)],w3),w5.N.setBreadcrumbsSourceFactory((e,t)=>t.createInstance(w3,e)),i(11601);var w7=function(e,t){return function(i,n){t(i,n,e)}};let w9=class extends tT.jG{static{this.ID="editor.contrib.floatingToolbar"}constructor(e,t,i,n){super();let s=this._register((0,an.U)(e)),o=this._register(n.createMenu(ts.D8.EditorContent,e.contextKeyService)),r=(0,oM.y0)(this,o.onDidChange,()=>0===o.getActions().length);this._register((0,oM.fm)(e=>{if(r.read(e))return;let n=(0,e8.h)("div.floating-menu-overlay-widget");n.root.style.height="28px";let o=t.createInstance(oR.m,n.root,ts.D8.EditorContent,{actionViewItemProvider:(e,n)=>{if(!(e instanceof ts.Xe))return;let s=i.lookupKeybinding(e.id);if(s)return t.createInstance(class extends oT.oq{updateLabel(){this.options.label&&this.label&&(this.label.textContent=`${this._commandAction.label} (${s.getLabel()})`)}},e,{...n,keybindingNotRenderedWithLabel:!0})},hiddenItemStrategy:0,menuOptions:{shouldForwardArgs:!0},telemetrySource:"editor.overlayToolbar",toolbarOptions:{primaryGroup:()=>!0,useSeparatorsInPrimaryActions:!0}});e.store.add(o),e.store.add((0,oM.fm)(e=>{let t=s.model.read(e);o.context=t?.uri})),e.store.add(s.createOverlayWidget({allowEditorOverflow:!1,domNode:n.root,minContentWidthInPx:(0,oM.lk)(0),position:(0,oM.lk)({preference:1})}))}))}};w9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([w7(1,t5._Y),w7(2,nf.b),w7(3,ts.ez)],w9),(0,e6.HW)(w9.ID,w9,1);var w8=i(63401);i(27097);class w6 extends tT.jG{static{this.ID="editor.contrib.iPadShowKeyboard"}constructor(e){super(),this.editor=e,this.widget=null,tJ.un&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(104);!this.widget&&e?this.widget=new ye(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}class ye extends tT.jG{static{this.ID="editor.contrib.ShowKeyboardWidget"}constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(e8.ko(this._domNode,"touchstart",e=>{this.editor.focus()})),this._register(e8.ko(this._domNode,"focus",e=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return ye.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}(0,e6.HW)(w6.ID,w6,3),i(34999);var yt=i(30868),yi=i(61142),yn=i(63438),ys=function(e,t){return function(i,n){t(i,n,e)}};let yo=class extends tT.jG{static{eZ=this}static{this.ID="editor.contrib.inspectTokens"}static get(e){return e.getContribution(eZ.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(e=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(e=>this.stop())),this._register(iD.dG.onDidChange(e=>this.stop())),this._register(this._editor.onKeyUp(e=>9===e.keyCode&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){!this._widget&&this._editor.hasModel()&&(this._widget=new ya(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};yo=eZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ys(1,yn.L),ys(2,rs.L)],yo);class yr extends e6.ks{constructor(){super({id:"editor.action.inspectTokens",label:w8.YN.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let i=yo.get(t);i?.launch()}}class ya extends tT.jG{static{this._ID="editor.contrib.inspectTokensWidget"}constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=function(e,t){let i=iD.dG.get(t);if(i)return i;let n=e.encodeLanguageId(t);return{getInitialState:()=>yi.r3,tokenize:(e,i,n)=>(0,yi.$H)(t,n),tokenizeEncoded:(e,t,i)=>(0,yi.Lh)(n,i)}}(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(e=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return ya._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),i=0;for(let n=t.tokens1.length-1;n>=0;n--){let s=t.tokens1[n];if(e.column-1>=s.offset){i=n;break}}let n=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){n=i;break}let s=this._model.getLineContent(e.lineNumber),o="";if(i<t.tokens1.length){let e=t.tokens1[i].offset,n=i+1<t.tokens1.length?t.tokens1[i+1].offset:s.length;o=s.substring(e,n)}(0,e8.Ln)(this._domNode,(0,e8.$)("h2.tm-token",void 0,function(e){let t="";for(let i=0,n=e.length;i<n;i++){let n=e.charCodeAt(i);switch(n){case 9:t+="→";break;case 32:t+="\xb7";break;default:t+=String.fromCharCode(n)}}return t}(o),(0,e8.$)("span.tm-token-length",void 0,`${o.length} ${1===o.length?"char":"chars"}`))),(0,e8.BC)(this._domNode,(0,e8.$)("hr.tokens-inspect-separator",{style:"clear:both"}));let r=(n<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(n<<1)+1]):null;(0,e8.BC)(this._domNode,(0,e8.$)("table.tm-metadata-table",void 0,(0,e8.$)("tbody",void 0,(0,e8.$)("tr",void 0,(0,e8.$)("td.tm-metadata-key",void 0,"language"),(0,e8.$)("td.tm-metadata-value",void 0,`${r?r.languageId:"-?-"}`)),(0,e8.$)("tr",void 0,(0,e8.$)("td.tm-metadata-key",void 0,"token type"),(0,e8.$)("td.tm-metadata-value",void 0,`${r?this._tokenTypeToString(r.tokenType):"-?-"}`)),(0,e8.$)("tr",void 0,(0,e8.$)("td.tm-metadata-key",void 0,"font style"),(0,e8.$)("td.tm-metadata-value",void 0,`${r?this._fontStyleToString(r.fontStyle):"-?-"}`)),(0,e8.$)("tr",void 0,(0,e8.$)("td.tm-metadata-key",void 0,"foreground"),(0,e8.$)("td.tm-metadata-value",void 0,`${r?oo.Q1.Format.CSS.formatHex(r.foreground):"-?-"}`)),(0,e8.$)("tr",void 0,(0,e8.$)("td.tm-metadata-key",void 0,"background"),(0,e8.$)("td.tm-metadata-value",void 0,`${r?oo.Q1.Format.CSS.formatHex(r.background):"-?-"}`))))),(0,e8.BC)(this._domNode,(0,e8.$)("hr.tokens-inspect-separator")),i<t.tokens1.length&&(0,e8.BC)(this._domNode,(0,e8.$)("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){let t=iD.dG.getColorMap(),i=yt.x.getLanguageId(e),n=yt.x.getTokenType(e),s=yt.x.getFontStyle(e),o=yt.x.getForeground(e),r=yt.x.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(i),tokenType:n,fontStyle:s,foreground:t[o],background:t[r]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),8&e&&(t+="strikethrough "),0===t.length&&(t="---"),t}_getTokensAtLine(e){let t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),n=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:i.tokens,tokens2:n.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}(0,e6.HW)(yo.ID,yo,4),(0,e6.Fl)(yr);var yl=i(78343),yh=function(e,t){return function(i,n){t(i,n,e)}};let yd=class{static{eX=this}static{this.PREFIX="?"}constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=iv.O.as(yl.Fd.Quickaccess)}provide(e){let t=new tT.Cm;return t.add(e.onDidAccept(()=>{let[t]=e.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(e=>{let t=this.registry.getQuickAccessProvider(e.substr(eX.PREFIX.length));t&&t.prefix&&t.prefix!==eX.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(e=>e.prefix!==eX.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((e,t)=>e.prefix.localeCompare(t.prefix)).flatMap(e=>this.createPicks(e))}createPicks(e){return e.helpEntries.map(t=>{let i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:(0,tn.kg)(1730,"{0}, {1}",n,t.description),description:t.description}})}};yd=eX=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yh(0,ip.GK),yh(1,nf.b)],yd),iv.O.as(yl.Fd.Quickaccess).registerQuickAccessProvider({ctor:yd,prefix:"",helpEntries:[{description:w8.oq.helpQuickAccessActionLabel}]});var yc=i(20643);class yu{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,i){let n=new tT.Cm;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s=n.add(new tT.HE);return s.value=this.doProvide(e,t,i),n.add(this.onDidActiveTextEditorControlChange(()=>{s.value=void 0,s.value=this.doProvide(e,t)})),n}doProvide(e,t,i){let n=new tT.Cm,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){let o={editor:s},r=(0,rJ.jA)(s);if(r){let e=s.saveViewState()??void 0;n.add(r.onDidChangeCursorPosition(()=>{e=s.saveViewState()??void 0})),o.restoreViewState=()=>{e&&s===this.activeTextEditorControl&&s.restoreViewState(e)},n.add((0,yc.P)(t.onCancellationRequested)(()=>o.restoreViewState?.()))}n.add((0,tT.s)(()=>this.clearDecorations(s))),n.add(this.provideWithTextEditor(o,e,t,i))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();let i=e.getModel();i&&"getLineContent"in i&&(0,tw.h5)(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){return(0,rJ.Np)(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(e=>{let i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);let n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,tB.Yf)(hs.vp),position:tP.A5.Full}}}],[s,o]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:o}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class yg extends yu{static{this.PREFIX=":"}constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=(0,tn.kg)(1325,"Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,tT.jG.None}provideWithTextEditor(e,t,i){let n=e.editor,s=new tT.Cm;s.add(t.onDidAccept(i=>{let[s]=t.selectedItems;if(s){if(!this.isValidLineNumber(n,s.lineNumber))return;this.gotoLocation(e,{range:this.toRange(s.lineNumber,s.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}}));let o=()=>{let e=this.parsePosition(n,t.value.trim().substr(yg.PREFIX.length)),i=this.getPickLabel(n,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(n,e.lineNumber))return void this.clearDecorations(n);let s=this.toRange(e.lineNumber,e.column);n.revealRangeInCenter(s,0),this.addDecorations(n,s)};o(),s.add(t.onDidChangeValue(()=>o()));let r=(0,rJ.jA)(n);return r&&2===r.getOptions().get(76).renderType&&(r.updateOptions({lineNumbers:"on"}),s.add((0,tT.s)(()=>r.updateOptions({lineNumbers:"relative"})))),s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let i=t.split(/,|:|#/).map(e=>parseInt(e,10)).filter(e=>!isNaN(e)),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,tn.kg)(1326,"Go to line {0} and character {1}.",t,i):(0,tn.kg)(1327,"Go to line {0}.",t);let n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?(0,tn.kg)(1328,"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):(0,tn.kg)(1329,"Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!!t&&"number"==typeof t&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;let n=this.getModel(e);if(!n)return!1;let s={lineNumber:t,column:i};return n.validatePosition(s).equals(s)}lineCount(e){return this.getModel(e)?.getLineCount()??0}}let yp=class extends yg{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=iA.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};yp=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(P=te.T,function(e,t){P(e,t,0)})],yp);class ym extends e6.ks{static{this.ID="editor.action.gotoLine"}constructor(){super({id:ym.ID,label:w8.Hw.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(ip.GK).quickAccess.show(yp.PREFIX)}}(0,e6.Fl)(ym),iv.O.as(yl.Fd.Quickaccess).registerQuickAccessProvider({ctor:yp,prefix:yp.PREFIX,helpEntries:[{description:w8.Hw.gotoLineActionLabel,commandId:ym.ID}]});let yf=[void 0,[]];function y_(e,t,i=0,n=0){return t.values&&t.values.length>1?function(e,t,i,n){let s=0,o=[];for(let r of t){let[t,a]=yv(e,r,i,n);if("number"!=typeof t)return yf;s+=t,o.push(...a)}return[s,function(e){let t,i=e.sort((e,t)=>e.start-t.start),n=[];for(let e of i){var s,o;!t||(s=t,o=e,s.end<o.start||o.end<s.start)?(t=e,n.push(e)):(t.start=Math.min(t.start,e.start),t.end=Math.max(t.end,e.end))}return n}(o)]}(e,t.values,i,n):yv(e,t,i,n)}function yv(e,t,i,n){let s=(0,aD.dt)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],(0,aD.WJ)(s)]:yf}function yb(e){return e.startsWith('"')&&e.endsWith('"')}function yC(e){let t;"string"!=typeof e&&(e="");let i=e.toLowerCase(),{pathNormalized:n,normalized:s,normalizedLowercase:o}=yw(e),r=n.indexOf(ul.Vn)>=0,a=yb(e),l=e.split(" ");if(l.length>1)for(let e of l){let i=yb(e),{pathNormalized:n,normalized:s,normalizedLowercase:o}=yw(e);s&&(t||(t=[]),t.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:n,normalized:s,normalizedLowercase:o,expectContiguousMatch:i}))}return{original:e,originalLowercase:i,pathNormalized:n,normalized:s,normalizedLowercase:o,values:t,containsPathSeparator:r,expectContiguousMatch:a}}function yw(e){let t,i=(t=tJ.uF?e.replace(/\//g,ul.Vn):e.replace(/\\/g,ul.Vn)).replace(/[\*\u2026\s"]/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function yy(e){return Array.isArray(e)?yC(e.map(e=>e.original).join(" ")):yC(e.original)}Object.freeze({score:0});var yS=function(e,t){return function(i,n){t(i,n,e)}};let yk=class extends yu{static{eJ=this}static{this.PREFIX="@"}static{this.SCOPE_PREFIX=":"}static{this.PREFIX_BY_CATEGORY=`${this.PREFIX}${this.SCOPE_PREFIX}`}constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,tn.kg)(1330,"To go to a symbol, first open a text editor with symbol information.")),tT.jG.None}provideWithTextEditor(e,t,i,n){let s=e.editor,o=this.getModel(s);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,i,n):this.doProvideWithoutEditorSymbols(e,o,t,i):tT.jG.None}doProvideWithoutEditorSymbols(e,t,i,n){let s=new tT.Cm;return this.provideLabelPick(i,(0,tn.kg)(1331,"The active text editor does not provide symbol information.")),(async()=>{await this.waitForLanguageSymbolRegistry(t,s)&&!n.isCancellationRequested&&s.add(this.doProvideWithEditorSymbols(e,t,i,n))})(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let i=new tM.Zv,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))}));return t.add((0,tT.s)(()=>i.complete(!1))),i.p}doProvideWithEditorSymbols(e,t,i,n,s){let o=e.editor,r=new tT.Cm;r.add(i.onDidAccept(t=>{let[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),s?.handleAccept?.(n,t.inBackground),t.inBackground||i.hide())})),r.add(i.onDidTriggerItemButton(({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));let a=this.getDocumentSymbols(t,n),l=r.add(new tT.HE),h=async e=>{l?.value?.cancel(),i.busy=!1,l.value=new t6.Qi,i.busy=!0;try{let s=yC(i.value.substr(eJ.PREFIX.length).trim()),o=await this.doGetSymbolPicks(a,s,void 0,l.value.token,t);if(n.isCancellationRequested)return;if(o.length>0){if(i.items=o,e&&0===s.original.length){let t=(0,ho.Uk)(o,t=>!!("separator"!==t.type&&t.range&&tO.Q.containsPosition(t.range.decoration,e)));t&&(i.activeItems=[t])}}else s.original.length>0?this.provideLabelPick(i,(0,tn.kg)(1332,"No matching editor symbols")):this.provideLabelPick(i,(0,tn.kg)(1333,"No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return r.add(i.onDidChangeValue(()=>h(void 0))),h(o.getSelection()?.getPosition()),r.add(i.onDidChangeActive(()=>{let[e]=i.activeItems;e&&e.range&&(o.revealRangeInCenter(e.range.selection,0),this.addDecorations(o,e.range.decoration))})),r}async doGetSymbolPicks(e,t,i,n,s){let o,r,a,l=await e;if(n.isCancellationRequested)return[];let h=0===t.original.indexOf(eJ.SCOPE_PREFIX),d=+!!h;t.values&&t.values.length>1?(o=yy(t.values[0]),r=yy(t.values.slice(1))):o=t;let c=this.options?.openSideBySideDirection?.();c&&(a=[{iconClass:"right"===c?iM.L.asClassName(e9.W.splitHorizontal):iM.L.asClassName(e9.W.splitVertical),tooltip:"right"===c?(0,tn.kg)(1334,"Open to the Side"):(0,tn.kg)(1335,"Open to the Bottom")}]);let u=[];for(let e=0;e<l.length;e++){let n,h,c,g,p=l[e],m=(0,iE.Bq)(p.name),f=`$(${iD.gP.toIcon(p.kind).id}) ${m}`,_=f.length-m.length,v=p.containerName;if(i?.extraContainerLabel&&(v=v?`${i.extraContainerLabel} • ${v}`:i.extraContainerLabel),t.original.length>d){let e=!1;if(o!==t&&([n,h]=y_(f,{...t,values:void 0},d,_),"number"==typeof n&&(e=!0)),"number"!=typeof n&&([n,h]=y_(f,o,d,_),"number"!=typeof n))continue;if(!e&&r){if(v&&r.original.length>0&&([c,g]=y_(v,r)),"number"!=typeof c)continue;"number"==typeof n&&(n+=c)}}let b=p.tags&&p.tags.indexOf(1)>=0;u.push({index:e,kind:p.kind,score:n,label:f,ariaLabel:(0,iD.PK)(p.name,p.kind),description:v,highlights:b?void 0:{label:h,description:g},range:{selection:tO.Q.collapseToStart(p.selectionRange),decoration:p.range},uri:s.uri,symbolName:m,strikethrough:b,buttons:a})}let g=u.sort((e,t)=>h?this.compareByKindAndScore(e,t):this.compareByScore(e,t)),p=[];if(h){let e,t,i=0;function m(){t&&"number"==typeof e&&i>0&&(t.label=(0,iE.GP)(yL[e]||yx,i))}for(let n of g)e!==n.kind?(m(),e=n.kind,i=1,t={type:"separator"},p.push(t)):i++,p.push(n);m()}else g.length>0&&(p=[{label:(0,tn.kg)(1336,"symbols ({0})",u.length),type:"separator"},...g]);return p}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return -1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return -1;else if(e.score<t.score)return 1}return e.index<t.index?-1:+(e.index>t.index)}compareByKindAndScore(e,t){let i=yL[e.kind]||yx,n=yL[t.kind]||yx,s=i.localeCompare(n);return 0===s?this.compareByScore(e,t):s}async getDocumentSymbols(e,t){let i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};yk=eJ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yS(0,iI.u),yS(1,cU)],yk);let yx=(0,tn.kg)(1337,"properties ({0})"),yL={5:(0,tn.kg)(1338,"methods ({0})"),11:(0,tn.kg)(1339,"functions ({0})"),8:(0,tn.kg)(1340,"constructors ({0})"),12:(0,tn.kg)(1341,"variables ({0})"),4:(0,tn.kg)(1342,"classes ({0})"),22:(0,tn.kg)(1343,"structs ({0})"),23:(0,tn.kg)(1344,"events ({0})"),24:(0,tn.kg)(1345,"operators ({0})"),10:(0,tn.kg)(1346,"interfaces ({0})"),2:(0,tn.kg)(1347,"namespaces ({0})"),3:(0,tn.kg)(1348,"packages ({0})"),25:(0,tn.kg)(1349,"type parameters ({0})"),1:(0,tn.kg)(1350,"modules ({0})"),6:(0,tn.kg)(1351,"properties ({0})"),9:(0,tn.kg)(1352,"enumerations ({0})"),21:(0,tn.kg)(1353,"enumeration members ({0})"),14:(0,tn.kg)(1354,"strings ({0})"),0:(0,tn.kg)(1355,"files ({0})"),17:(0,tn.kg)(1356,"arrays ({0})"),15:(0,tn.kg)(1357,"numbers ({0})"),16:(0,tn.kg)(1358,"booleans ({0})"),18:(0,tn.kg)(1359,"objects ({0})"),19:(0,tn.kg)(1360,"keys ({0})"),7:(0,tn.kg)(1361,"fields ({0})"),13:(0,tn.kg)(1362,"constants ({0})")};var yD=function(e,t){return function(i,n){t(i,n,e)}};let yI=class extends yk{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=iA.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};yI=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yD(0,te.T),yD(1,iI.u),yD(2,cU)],yI);class yN extends e6.ks{static{this.ID="editor.action.quickOutline"}constructor(){super({id:yN.ID,label:w8.n9.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:ti.R.hasDocumentSymbolProvider,kbOpts:{kbExpr:ti.R.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(ip.GK).quickAccess.show(yk.PREFIX,{itemActivation:ip.C1.NONE})}}(0,e6.Fl)(yN),iv.O.as(yl.Fd.Quickaccess).registerQuickAccessProvider({ctor:yI,prefix:yk.PREFIX,helpEntries:[{description:w8.n9.quickOutlineActionLabel,prefix:yk.PREFIX,commandId:yN.ID},{description:w8.n9.quickOutlineByCategoryActionLabel,prefix:yk.PREFIX_BY_CATEGORY}]});var yE=i(96340),yM=i(74227);class yT{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){let i=this.computeEmbedding(e),n=new Map,s=[];for(let[e,o]of this.documents){if(t.isCancellationRequested)return[];for(let t of o.chunks){let o=this.computeSimilarityScore(t,i,n);o>0&&s.push({key:e,score:o})}}return s}static termFrequencies(e){var t=yT.splitTerms(e);let i=new Map;for(let e of t)i.set(e,(i.get(e)??0)+1);return i}static*splitTerms(e){let t=e=>e.toLowerCase();for(let[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);let e=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(e.length>1)for(let i of e)i.length>2&&/\p{Letter}{3,}/gu.test(i)&&(yield t(i))}}updateDocuments(e){for(let{key:t}of e)this.deleteDocument(t);for(let t of e){let e=[];for(let i of t.textChunks){let t=yT.termFrequencies(i);for(let e of t.keys())this.chunkOccurrences.set(e,(this.chunkOccurrences.get(e)??0)+1);e.push({text:i,tf:t})}this.chunkCount+=e.length,this.documents.set(t.key,{chunks:e})}return this}deleteDocument(e){let t=this.documents.get(e);if(t)for(let i of(this.documents.delete(e),this.chunkCount-=t.chunks.length,t.chunks))for(let e of i.tf.keys()){let t=this.chunkOccurrences.get(e);if("number"==typeof t){let i=t-1;i<=0?this.chunkOccurrences.delete(e):this.chunkOccurrences.set(e,i)}}}computeSimilarityScore(e,t,i){let n=0;for(let[s,o]of Object.entries(t)){let t=e.tf.get(s);if(!t)continue;let r=i.get(s);"number"!=typeof r&&(r=this.computeIdf(s),i.set(s,r)),n+=t*r*o}return n}computeEmbedding(e){let t=yT.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){let t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){let t=Object.create(null);for(let[i,n]of e){let e=this.computeIdf(i);e>0&&(t[i]=n*e)}return t}}function yR(e){return Array.isArray(e.items)}function yO(e){return!!e.picks&&e.additionalPicks instanceof Promise}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(e0||(e0={}));class yP extends tT.jG{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){let n,s=new tT.Cm;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o=s.add(new tT.HE),r=async()=>{n?.dispose(!0),e.busy=!1;let s=o.value=new tT.Cm,r=(n=s.add(new t6.Qi(t))).token,a=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(a=a.trim());let l=this._getPicks(a,s,r,i),h=(t,i)=>{let n,s;if(yR(t)?(n=t.items,s=t.active):n=t,0===n.length){if(i)return!1;(a.length>0||e.hideInput)&&this.options?.noResultsPick&&(n=(0,iu.Tn)(this.options.noResultsPick)?[this.options.noResultsPick(a)]:[this.options.noResultsPick])}return e.items=n,s&&(e.activeItems=[s]),!0},d=async t=>{let i=!1,n=!1;await Promise.all([(async()=>{("number"!=typeof t.mergeDelay||(await (0,tM.wR)(t.mergeDelay),!r.isCancellationRequested))&&(n||(i=h(t.picks,!0)))})(),(async()=>{e.busy=!0;try{let n,s,o,a,l=await t.additionalPicks;if(r.isCancellationRequested)return;if(yR(t.picks)?(n=t.picks.items,o=t.picks.active):n=t.picks,yR(l)?(s=l.items,a=l.active):s=l,s.length>0||!i){let t;if(!o&&!a){let i=e.activeItems[0];i&&-1!==n.indexOf(i)&&(t=i)}h({items:[...n,...s],active:o||a||t})}}finally{r.isCancellationRequested||(e.busy=!1),n=!0}})()])};if(null===l);else if(yO(l))await d(l);else if(l instanceof Promise){e.busy=!0;try{let e=await l;if(r.isCancellationRequested)return;yO(e)?await d(e):h(e)}finally{r.isCancellationRequested||(e.busy=!1)}}else h(l)};s.add(e.onDidChangeValue(()=>r())),r(),s.add(e.onDidAccept(t=>{if(i?.handleAccept){t.inBackground||e.hide(),i.handleAccept?.(e.activeItems[0],t.inBackground);return}let[n]=e.selectedItems;"function"==typeof n?.accept&&(t.inBackground||e.hide(),n.accept(e.keyMods,t))}));let a=async(i,n)=>{if("function"!=typeof n.trigger)return;let s=n.buttons?.indexOf(i)??-1;if(s>=0){let i=n.trigger(s,e.keyMods),o="number"==typeof i?i:await i;if(t.isCancellationRequested)return;switch(o){case e0.NO_ACTION:break;case e0.CLOSE_PICKER:e.hide();break;case e0.REFRESH_PICKER:r();break;case e0.REMOVE_ITEM:{let t=e.items.indexOf(n);if(-1!==t){let i=e.items.slice(),n=i.splice(t,1),s=e.activeItems.filter(e=>e!==n[0]),o=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,s&&(e.activeItems=s),e.keepScrollPosition=o}}}}};return s.add(e.onDidTriggerItemButton(({button:e,item:t})=>a(e,t))),s.add(e.onDidTriggerSeparatorButton(({button:e,separator:t})=>a(e,t))),s}}var yA=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},yF=function(e,t){return function(i,n){t(i,n,e)}};let yB=class extends yP{static{e1=this}static{this.PREFIX=">"}static{this.TFIDF_THRESHOLD=.5}static{this.TFIDF_MAX_RESULTS=5}static{this.WORD_FILTER=(0,aD.or)(aD.WP,aD.J1,aD.Tt)}constructor(e,t,i,n,s,o){super(e1.PREFIX,e),this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=o,this.commandsHistory=this._register(t.createInstance(yW)),this.options=e}async _getPicks(e,t,i,n){let s=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];let o=(0,yc.P)(()=>{let t=new yT;return t.updateDocuments(s.map(e=>({key:e.commandId,textChunks:[this.getTfIdfChunk(e)]}))),(function(e){let t=e.slice(0);t.sort((e,t)=>t.score-e.score);let i=t[0]?.score??0;if(i>0)for(let e of t)e.score/=i;return t})(t.calculateScores(e,i)).filter(e=>e.score>e1.TFIDF_THRESHOLD).slice(0,e1.TFIDF_MAX_RESULTS)}),r=[];for(let t of s){let n=e1.WORD_FILTER(e,t.label)??void 0,s=t.commandAlias?e1.WORD_FILTER(e,t.commandAlias)??void 0:void 0;if(n||s)t.highlights={label:n,detail:this.options.showAlias?s:void 0},r.push(t);else if(e===t.commandId)r.push(t);else if(e.length>=3){let e=o();if(i.isCancellationRequested)return[];let n=e.find(e=>e.key===t.commandId);n&&(t.tfIdfScore=n.score,r.push(t))}}let a=new Map;for(let e of r){let t=a.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):a.set(e.label,e)}r.sort((e,t)=>{if(e.tfIdfScore&&t.tfIdfScore)return e.tfIdfScore===t.tfIdfScore?e.label.localeCompare(t.label):t.tfIdfScore-e.tfIdfScore;if(e.tfIdfScore)return 1;if(t.tfIdfScore)return -1;let i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return -1;if(n)return 1;if(this.options.suggestedCommandIds){let i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return -1;if(n)return 1}return e.label.localeCompare(t.label)});let l=[],h=!1,d=!0,c=!!this.options.suggestedCommandIds;for(let e=0;e<r.length;e++){let t=r[e];0===e&&this.commandsHistory.peek(t.commandId)&&(l.push({type:"separator",label:(0,tn.kg)(1723,"recently used")}),h=!0),d&&void 0!==t.tfIdfScore&&(l.push({type:"separator",label:(0,tn.kg)(1724,"similar commands")}),d=!1),c&&void 0===t.tfIdfScore&&!this.commandsHistory.peek(t.commandId)&&this.options.suggestedCommandIds?.has(t.commandId)&&(l.push({type:"separator",label:(0,tn.kg)(1725,"commonly used")}),h=!0,c=!1),!h||void 0!==t.tfIdfScore||this.commandsHistory.peek(t.commandId)||this.options.suggestedCommandIds?.has(t.commandId)||(l.push({type:"separator",label:(0,tn.kg)(1726,"other commands")}),h=!1),l.push(this.toCommandPick(t,n))}return this.hasAdditionalCommandPicks(e,i)?{picks:l,additionalPicks:(async()=>{let t=await this.getAdditionalCommandPicks(s,r,e,i);if(i.isCancellationRequested)return[];let o=t.map(e=>this.toCommandPick(e,n));return d&&o[0]?.type!=="separator"&&o.unshift({type:"separator",label:(0,tn.kg)(1727,"similar commands")}),o})()}:l}toCommandPick(e,t){if("separator"===e.type)return e;let i=this.keybindingService.lookupKeybinding(e.commandId),n=i?(0,tn.kg)(1728,"{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(t){(0,ih.MB)(t)||this.dialogService.error((0,tn.kg)(1729,"Command '{0}' resulted in an error",e.label),nc(t))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}};yB=e1=yA([yF(1,t5._Y),yF(2,nf.b),yF(3,tC.d),yF(4,t3.k),yF(5,C3.X)],yB);let yW=class extends tT.jG{static{e2=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}static{this.hasChanges=!1}constructor(e,t,i){super(),this.storageService=e,this.configurationService=t,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===sY.LP.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){(!e||e.affectsConfiguration("workbench.commandPalette.history"))&&(this.configuredCommandsHistoryLength=e2.getConfiguredCommandHistoryLength(this.configurationService),e2.cache&&e2.cache.limit!==this.configuredCommandsHistoryLength&&(e2.cache.limit=this.configuredCommandsHistoryLength,e2.hasChanges=!0))}load(){let e,t=this.storageService.get(e2.PREF_KEY_CACHE,0);if(t)try{e=JSON.parse(t)}catch(e){this.logService.error(`[CommandsHistory] invalid data: ${e}`)}let i=e2.cache=new sQ.qK(this.configuredCommandsHistoryLength,1);e&&(e.usesLRU?e.entries:e.entries.sort((e,t)=>e.value-t.value)).forEach(e=>i.set(e.key,e.value));e2.counter=this.storageService.getNumber(e2.PREF_KEY_COUNTER,0,e2.counter)}push(e){e2.cache&&(e2.cache.set(e,e2.counter++),e2.hasChanges=!0)}peek(e){return e2.cache?.peek(e)}saveState(){if(!e2.cache||!e2.hasChanges)return;let e={usesLRU:!0,entries:[]};e2.cache.forEach((t,i)=>e.entries.push({key:i,value:t})),this.storageService.store(e2.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(e2.PREF_KEY_COUNTER,e2.counter,0,0),e2.hasChanges=!1}static getConfiguredCommandHistoryLength(e){let t=e.getValue(),i=t.workbench?.commandPalette?.history;return"number"==typeof i?i:e2.DEFAULT_COMMANDS_HISTORY_LENGTH}};yW=e2=yA([yF(0,sY.CS),yF(1,to.pG),yF(2,t2.rr)],yW);class yH extends yB{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let i of e.getSupportedActions()){let e;i.metadata?.description&&(e=(0,yM.f)(i.metadata.description)?i.metadata.description:{original:i.metadata.description,value:i.metadata.description}),t.push({commandId:i.id,commandAlias:i.alias,commandDescription:e,label:(0,yE.pS)(i.label)||i.id})}return t}}var yV=function(e,t){return function(i,n){t(i,n,e)}};let yz=class extends yH{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,i,n,s,o){super({showAlias:!1},e,i,n,s,o),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};yz=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yV(0,t5._Y),yV(1,te.T),yV(2,nf.b),yV(3,tC.d),yV(4,t3.k),yV(5,C3.X)],yz);class yU extends e6.ks{static{this.ID="editor.action.quickCommand"}constructor(){super({id:yU.ID,label:w8.gf.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(ip.GK).quickAccess.show(yz.PREFIX)}}(0,e6.Fl)(yU),iv.O.as(yl.Fd.Quickaccess).registerQuickAccessProvider({ctor:yz,prefix:yz.PREFIX,helpEntries:[{description:w8.gf.quickCommandHelp,commandId:yU.ID}]});var yj=function(e,t){return function(i,n){t(i,n,e)}};let y$=class extends aY{constructor(e,t,i,n,s,o,r){super(!0,e,t,i,n,s,o,r)}};y$=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yj(1,tr.fN),yj(2,te.T),yj(3,nA.Ot),yj(4,t5._Y),yj(5,sY.CS),yj(6,to.pG)],y$),(0,e6.HW)(aY.ID,y$,4);var yK=i(58869);class yG extends e6.ks{constructor(){super({id:"editor.action.toggleHighContrast",label:w8.E6.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let i=e.get(yn.L),n=i.getColorTheme();(0,sp.Bb)(n.type)?(i.setTheme(this._originalThemeName||((0,sp.HD)(n.type)?yK.po:yK.tj)),this._originalThemeName=null):(i.setTheme((0,sp.HD)(n.type)?yK.aQ:yK.nr),this._originalThemeName=n.themeName)}}(0,e6.Fl)(yG);var yq=i(14027),yQ=Object.defineProperty,yY=Object.getOwnPropertyDescriptor,yZ=Object.getOwnPropertyNames,yX=Object.prototype.hasOwnProperty,yJ=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of yZ(t))yX.call(e,s)||s===i||yQ(e,s,{get:()=>t[s],enumerable:!(n=yY(t,s))||n.enumerable});return e},y0={};((e,t,i)=>(yJ(e,t,"default"),i&&yJ(i,t,"default")))(y0,yq);var y1={},y2={},y5=class e{static getOrCreate(t){return y2[t]||(y2[t]=new e(t)),y2[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,y1[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function y4(e){let t=e.id;y1[t]=e,y0.languages.register(e);let i=y5.getOrCreate(t);y0.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),y0.languages.onLanguageEncountered(t,async()=>{let e=await i.load();y0.languages.setLanguageConfiguration(t,e.conf)})}y4({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>i.e(52512).then(i.bind(i,52512))}),y4({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>i.e(89208).then(i.bind(i,89208))}),y4({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>i.e(42942).then(i.bind(i,42942))}),y4({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>i.e(29462).then(i.bind(i,29462))}),y4({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>i.e(98342).then(i.bind(i,98342))}),y4({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>i.e(39974).then(i.bind(i,39974))}),y4({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>i.e(50958).then(i.bind(i,28577))}),y4({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>i.e(45632).then(i.bind(i,45632))}),y4({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>i.e(66930).then(i.bind(i,66930))}),y4({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>i.e(66930).then(i.bind(i,66930))}),y4({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>i.e(8070).then(i.bind(i,85689))}),y4({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>i.e(35678).then(i.bind(i,35678))}),y4({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>i.e(342).then(i.bind(i,342))}),y4({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>i.e(18898).then(i.bind(i,18898))}),y4({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>i.e(72278).then(i.bind(i,72278))}),y4({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>i.e(63464).then(i.bind(i,63464))}),y4({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>i.e(64726).then(i.bind(i,64726))}),y4({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>i.e(69918).then(i.bind(i,69918))}),y4({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>i.e(77094).then(i.bind(i,77094))}),y4({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>i.e(71320).then(i.bind(i,71320))}),y4({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagAutoInterpolationDollar)}),y4({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagAngleInterpolationDollar)}),y4({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagBracketInterpolationDollar)}),y4({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagAngleInterpolationBracket)}),y4({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagBracketInterpolationBracket)}),y4({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagAutoInterpolationDollar)}),y4({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagAutoInterpolationBracket)}),y4({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>i.e(71356).then(i.bind(i,71356))}),y4({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>i.e(52182).then(i.bind(i,52182))}),y4({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>i.e(68164).then(i.bind(i,68164))}),y4({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>i.e(98838).then(i.bind(i,98838))}),y4({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>i.e(83990).then(i.bind(i,83990))}),y4({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>i.e(16438).then(i.bind(i,16438))}),y4({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>i.e(32496).then(i.bind(i,32496))}),y4({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>i.e(38598).then(i.bind(i,38598))}),y4({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>i.e(34442).then(i.bind(i,34442))}),y4({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>i.e(26014).then(i.bind(i,26014))}),y4({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>i.e(19638).then(i.bind(i,19638))}),y4({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>i.e(47698).then(i.bind(i,47698))}),y4({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>i.e(57378).then(i.bind(i,57378))}),y4({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>i.e(13424).then(i.bind(i,13424))}),y4({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>i.e(15028).then(i.bind(i,15028))}),y4({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>i.e(41798).then(i.bind(i,41798))}),y4({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>i.e(39206).then(i.bind(i,39206))}),y4({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>i.e(94406).then(i.bind(i,94406))}),y4({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>i.e(61554).then(i.bind(i,61554))}),y4({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>i.e(30986).then(i.bind(i,30986))}),y4({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>i.e(22726).then(i.bind(i,22726))}),y4({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>i.e(28900).then(i.bind(i,28900))}),y4({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>i.e(31318).then(i.bind(i,31318))}),y4({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>i.e(11894).then(i.bind(i,11894))}),y4({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>i.e(16998).then(i.bind(i,94617))}),y4({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>i.e(1750).then(i.bind(i,1750))}),y4({id:"pla",extensions:[".pla"],loader:()=>i.e(80054).then(i.bind(i,80054))}),y4({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>i.e(74950).then(i.bind(i,74950))}),y4({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>i.e(34154).then(i.bind(i,34154))}),y4({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>i.e(29654).then(i.bind(i,29654))}),y4({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>i.e(46214).then(i.bind(i,23833))}),y4({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>i.e(27378).then(i.bind(i,27378))}),y4({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>i.e(24068).then(i.bind(i,24068))}),y4({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>i.e(17302).then(i.bind(i,17302))}),y4({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>i.e(97866).then(i.bind(i,97866))}),y4({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>i.e(99330).then(i.bind(i,99330))}),y4({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>i.e(72150).then(i.bind(i,49769))}),y4({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>i.e(36758).then(i.bind(i,36758))}),y4({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>i.e(15534).then(i.bind(i,15534))}),y4({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>i.e(3200).then(i.bind(i,3200))}),y4({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>i.e(95072).then(i.bind(i,95072))}),y4({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>i.e(38950).then(i.bind(i,38950))}),y4({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>i.e(98774).then(i.bind(i,98774))}),y4({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>i.e(99674).then(i.bind(i,99674))}),y4({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>i.e(77128).then(i.bind(i,77128))}),y4({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>i.e(35794).then(i.bind(i,35794))}),y4({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>i.e(15670).then(i.bind(i,15670))}),y4({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>i.e(23460).then(i.bind(i,23460))}),y4({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>i.e(52470).then(i.bind(i,52470))}),y4({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>i.e(1650).then(i.bind(i,1650))}),y4({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>i.e(19606).then(i.bind(i,19606))}),y4({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>i.e(16214).then(i.bind(i,16214))}),y4({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>i.e(74590).then(i.bind(i,74590))}),y4({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>i.e(74590).then(i.bind(i,74590))}),y4({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>i.e(28822).then(i.bind(i,28822))}),y4({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>i.e(5686).then(i.bind(i,5686))}),y4({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>i.e(23174).then(i.bind(i,23174))}),y4({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>i.e(88730).then(i.bind(i,88730))}),y4({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>i.e(11700).then(i.bind(i,11700))}),y4({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>i.e(50374).then(i.bind(i,50374))}),y4({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>i.e(26654).then(i.bind(i,26654))}),y4({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>i.e(40394).then(i.bind(i,40394))});var y3=Object.defineProperty,y7=Object.getOwnPropertyDescriptor,y9=Object.getOwnPropertyNames,y8=Object.prototype.hasOwnProperty,y6=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of y9(t))y8.call(e,s)||s===i||y3(e,s,{get:()=>t[s],enumerable:!(n=y7(t,s))||n.enumerable});return e},Se={};((e,t,i)=>(y6(e,t,"default"),i&&y6(i,t,"default")))(Se,yq);var St=class{constructor(e,t,i){this._onDidChange=new Se.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},Si={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},Sn={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},Ss=new St("css",Si,Sn),So=new St("scss",Si,Sn),Sr=new St("less",Si,Sn);function Sa(){return i.e(65759).then(i.bind(i,65759))}Se.languages.css={cssDefaults:Ss,lessDefaults:Sr,scssDefaults:So},Se.languages.onLanguage("less",()=>{Sa().then(e=>e.setupMode(Sr))}),Se.languages.onLanguage("scss",()=>{Sa().then(e=>e.setupMode(So))}),Se.languages.onLanguage("css",()=>{Sa().then(e=>e.setupMode(Ss))});var Sl=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,Sd=Object.getOwnPropertyNames,Sc=Object.prototype.hasOwnProperty,Su=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of Sd(t))Sc.call(e,s)||s===i||Sl(e,s,{get:()=>t[s],enumerable:!(n=Sh(t,s))||n.enumerable});return e},Sg={};((e,t,i)=>(Su(e,t,"default"),i&&Su(i,t,"default")))(Sg,yq);var Sp=class{constructor(e,t,i){this._onDidChange=new Sg.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},Sm={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},suggest:{},data:{useDefaultDataProvider:!0}};function Sf(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===S_,documentFormattingEdits:e===S_,documentRangeFormattingEdits:e===S_}}var S_="html",Sv="handlebars",Sb="razor",SC=SL(S_,Sm,Sf(S_)),Sw=SC.defaults,Sy=SL(Sv,Sm,Sf(Sv)),SS=Sy.defaults,Sk=SL(Sb,Sm,Sf(Sb)),Sx=Sk.defaults;function SL(e,t=Sm,n=Sf(e)){let s,o=new Sp(e,t,n),r=Sg.languages.onLanguage(e,async()=>{s=(await i.e(43071).then(i.bind(i,43071))).setupMode(o)});return{defaults:o,dispose(){r.dispose(),s?.dispose(),s=void 0}}}Sg.languages.html={htmlDefaults:Sw,razorDefaults:Sx,handlebarDefaults:SS,htmlLanguageService:SC,handlebarLanguageService:Sy,razorLanguageService:Sk,registerHTMLLanguageService:SL};var SD=Object.defineProperty,SI=Object.getOwnPropertyDescriptor,SN=Object.getOwnPropertyNames,SE=Object.prototype.hasOwnProperty,SM=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of SN(t))SE.call(e,s)||s===i||SD(e,s,{get:()=>t[s],enumerable:!(n=SI(t,s))||n.enumerable});return e},ST={};((e,t,i)=>(SM(e,t,"default"),i&&SM(i,t,"default")))(ST,yq);var SR=new class{constructor(e,t,i){this._onDidChange=new ST.Emitter,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function SO(){return i.e(40733).then(i.bind(i,40733))}ST.languages.json={jsonDefaults:SR,getWorker:()=>SO().then(e=>e.getWorker())},ST.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),ST.languages.onLanguage("json",()=>{SO().then(e=>e.setupMode(SR))}),i(96612);var SP=Object.defineProperty,SA=Object.getOwnPropertyDescriptor,SF=Object.getOwnPropertyNames,SB=Object.prototype.hasOwnProperty,SW=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of SF(t))SB.call(e,s)||s===i||SP(e,s,{get:()=>t[s],enumerable:!(n=SA(t,s))||n.enumerable});return e},SH={};((e,t,i)=>(SW(e,t,"default"),i&&SW(i,t,"default")))(SH,e4),e5="object"==typeof self&&self.constructor&&"DedicatedWorkerGlobalScope"===self.constructor.name&&void 0!==globalThis.workerttPolicy?globalThis.workerttPolicy:function(e,t){let i=globalThis.MonacoEnvironment;if(i?.createTrustedTypesPolicy)try{return i.createTrustedTypesPolicy(e,t)}catch(e){console.error(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){console.error(e);return}}("defaultWorkerFactory",{createScriptURL:e=>e});var SV=yq.editor.createWebWorker;yq.editor.createWebWorker=function(e){if(void 0===e.worker){let t=Promise.resolve(function(e){let t=e.label,i=globalThis.MonacoEnvironment;if(i){if("function"==typeof i.getWorker)return i.getWorker("workerMain.js",t);if("function"==typeof i.getWorkerUrl){let e=i.getWorkerUrl("workerMain.js",t);return new Worker(e5?e5.createScriptURL(e):e,{name:t,type:"module"})}}throw Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}({label:e.label??"monaco-editor-worker",moduleId:e.moduleId})).then(t=>(t.postMessage("ignore"),t.postMessage(e.createData),t));return SH.editor.createWebWorker({worker:t,host:e.host,keepIdleModels:e.keepIdleModels})}return SV(e)}},23315:(e,t,i)=>{"use strict";i.d(t,{Yh:()=>r,QM:()=>o});var n,s,o,r,a=i(15957),l=i(29195),h=i(95751),d=i(91523),c=i(50518),u=i(89597),g=i(6849),p=i(72553),m=i(23047);class f{static columnSelect(e,t,i,n,s,o){let r=Math.abs(s-i)+1,a=i>s,l=n>o,h=n<o,d=[];for(let s=0;s<r;s++){let r=i+(a?-s:s),c=e.columnFromVisibleColumn(t,r,n),u=e.columnFromVisibleColumn(t,r,o),f=e.visibleColumnFromColumn(t,new p.y(r,c)),_=e.visibleColumnFromColumn(t,new p.y(r,u));if(!h||!(f>o)&&!(_<n))l&&(_>n||f<o)||d.push(new g.mG(new m.Q(r,c,r,c),0,0,new p.y(r,u),0))}if(0===d.length)for(let e=0;e<r;e++){let n=i+(a?-e:e),s=t.getLineMaxColumn(n);d.push(new g.mG(new m.Q(n,s,n,s),0,0,new p.y(n,s),0))}return{viewStates:d,reversed:a,fromLineNumber:i,fromVisualColumn:n,toLineNumber:s,toVisualColumn:o}}static columnSelectLeft(e,t,i){let n=i.toViewVisualColumn;return n>0&&n--,f.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0,s=Math.min(i.fromViewLineNumber,i.toViewLineNumber),o=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=s;i<=o;i++){let s=t.getLineMaxColumn(i);n=Math.max(n,e.visibleColumnFromColumn(t,new p.y(i,s)))}let r=i.toViewVisualColumn;return r<n&&r++,this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,r)}static columnSelectUp(e,t,i,n){let s=n?e.pageSize:1,o=Math.max(1,i.toViewLineNumber-s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}static columnSelectDown(e,t,i,n){let s=n?e.pageSize:1,o=Math.min(t.getLineCount(),i.toViewLineNumber+s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}}var _=i(70986),v=i(9020),b=i(91461),C=i(42506),w=i(8820),y=i(18983),S=i(87899),k=i(69745);class x extends c.DX{runEditorCommand(e,t,i){let n=t._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}}!function(e){e.metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:`Property-value pairs that can be passed through this argument:
455
+ `;return await i.writeText(a),{reproCase:a}}}var fk=function(e,t){return function(i,n){t(i,n,e)}};class fx{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let fL=class{constructor(e,t,i,n,s,o){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=s,this._telemetryService=o,this.hoverOrdinal=4}suggestHoverAnchor(e){let t=fd.get(this._editor);if(!t)return null;let i=e.target;if(8===i.type){let n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new oi(1e3,this,tO.Q.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}if(7===i.type&&t.shouldShowHoverAt(i.range)||6===i.type&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range))return new oi(1e3,this,i.range,e.event.posx,e.event.posy,!1);if(9===i.type&&i.element){let n=pR.getWarningWidgetContext(i.element);if(n&&t.shouldShowHoverAt(n.range))return new oi(1e3,this,n.range,e.event.posx,e.event.posy,!1)}return null}computeSync(e,t){if("onHover"!==this._editor.getOption(71).showToolbar)return[];let i=fd.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new fx(this,e.range,i)]:[]}renderHoverParts(e,t){let i=new tT.Cm,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(12)&&i.add(this.renderScreenReaderText(e,n));let s=n.controller.model.get(),o=document.createElement("div");return e.fragment.appendChild(o),i.add((0,oM.yC)((t,i)=>{let n=i.add(this._instantiationService.createInstance(oj.hot.read(t),this._editor,!1,(0,oM.lk)(null),s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.activeCommands,s.warning,()=>{e.onContentsChanged()}));o.replaceChildren(n.getDomNode())})),s.triggerExplicitly(),new on([{hoverPart:n,hoverElement:o,dispose(){i.dispose()}}])}renderScreenReaderText(e,t){let i=new tT.Cm,n=e8.$,s=n("div.hover-row.markdown-hover"),o=e8.BC(s,n("div.hover-contents",{"aria-live":"assertive"})),r=new iF.T({editor:this._editor},this._languageService,this._openerService);return i.add((0,oM.fm)(n=>{let s=t.controller.model.read(n)?.primaryGhostText.read(n);if(s){let t=this._editor.getModel().getLineContent(s.lineNumber);var a=s.renderForScreenReader(t);let n=tn.kg(1197,"Suggestion:"),l=i.add(r.render(new ty.Bc().appendText(n).appendCodeblock("text",a),{asyncRenderCallback:()=>{o.className="hover-contents code-hover-contents",e.onContentsChanged()}}));o.replaceChildren(l.element)}else e8.Ln(o)})),e.fragment.appendChild(s),i}};fL=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([fk(1,rs.L),fk(2,iB.Cr),fk(3,o1.j),fk(4,t5._Y),fk(5,t3.k)],fL);class fD{}(0,e6.HW)(fd.ID,function(e){var t;return(0,cK.e)()?(t=cq,class extends t{constructor(){super(...arguments),this._autorun=void 0}init(...t){this._autorun=(0,oM.yC)((i,n)=>{let s=e.read(i);this._instance=n.add(this.instantiationService.createInstance(s,...t))})}dispose(){this._autorun?.dispose()}}):e.get()}(fd.hot),3),(0,e6.Fl)(fg),(0,e6.Fl)(fp),(0,e6.E_)(new fm),(0,e6.Fl)(fc),(0,e6.Fl)(fu),(0,e6.Fl)(ff),(0,e6.Fl)(f_),(0,e6.Fl)(fv),(0,e6.Fl)(fw),(0,e6.Fl)(fC),(0,e6.Fl)(fb),(0,ts.ug)(fy),(0,e6.Fl)(fS),(0,ts.ug)(gD.KS),(0,ts.ug)(gD.un),os.register(fL),c$.register(new fD),i(17275);var fI=function(e,t){return function(i,n){t(i,n,e)}};let fN=class{static{eR=this}static{this.ID="editor.contrib.gotodefinitionatposition"}static{this.MAX_SOURCE_PREVIEW_LINES=8}constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new tT.Cm,this.toUnhookForKeyboard=new tT.Cm,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();let s=new rQ(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([e,t])=>{this.startFindDefinitionFromMouse(e,t??void 0)})),this.toUnhook.add(s.onExecute(e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch(e=>{(0,ih.dz)(e)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(eR.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}let i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){let t;this.toUnhookForKeyboard.clear();let i=e?this.editor.getModel()?.getWordAtPosition(e):null;if(!i){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;let n=new iN.$t(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,tM.SS)(t=>this.findDefinition(e,t));try{t=await this.previousPromise}catch(e){(0,ih.dz)(e);return}if(!t||!t.length||!n.validate(this.editor))return void this.removeLinkDecorations();let s=t[0].originSelectionRange?tO.Q.lift(t[0].originSelectionRange):new tO.Q(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(t.length>1){let e=s;for(let{originSelectionRange:i}of t)i&&(e=tO.Q.plusRange(e,i));this.addDecoration(e,new ty.Bc().appendText(tn.kg(1072,"Click to show {0} definitions.",t.length)))}else{let e=t[0];if(!e.uri)return;return this.textModelResolverService.createModelReference(e.uri).then(t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();let{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();let o=this.getPreviewValue(i,n,e),r=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(s,o?new ty.Bc().appendCodeblock(r||"",o):void 0),t.dispose()})}}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=eR.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),n=e.validateRange(n),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let s=t+1;s<i.endLineNumber;s++)n=Math.min(n,e.getLineFirstNonWhitespaceColumn(s));return e.getValueInRange(i).replace(RegExp(`^\\s{${n-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){let i=e.getLineFirstNonWhitespaceColumn(t),n=Math.min(e.getLineCount(),t+eR.MAX_SOURCE_PREVIEW_LINES),s=t+1;for(;s<n&&i!==e.getLineFirstNonWhitespaceColumn(s);s++);return new tO.Q(t,1,s+1,1)}addDecoration(e,t){this.linkDecorations.set([{range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}}])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,t){return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&6===e.target.type&&!(e.target.detail.injectedText?.options instanceof tA.Ho)&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){let i=this.editor.getModel();return i?a7(this.languageFeaturesService.definitionProvider,i,e,!1,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(e=>{let i=!t&&this.editor.getOption(101)&&!this.isInPeekEditor(e);return new ls({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e)})}isInPeekEditor(e){let t=e.get(tr.fN);return Y.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};fN=eR=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([fI(1,rU.b),fI(2,rs.L),fI(3,iI.u)],fN),(0,e6.HW)(fN.ID,fN,2);var fE=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},fM=function(e,t){return function(i,n){t(i,n,e)}};class fT{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let fR=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new iA.vl,this.onDidChange=this._onDidChange.event,this._dispoables=new tT.Cm,this._markers=[],this._nextIdx=-1,i_.r.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);let n=this._configService.getValue("problems.sortOrder"),s=(e,t)=>{let i=(0,iE.UD)(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?tO.Q.compareRangesUsingStarts(e,t)||sg.cj.compare(e.severity,t.severity):sg.cj.compare(e.severity,t.severity)||tO.Q.compareRangesUsingStarts(e,t)),i},o=()=>{let t=this._markerService.read({resource:i_.r.isUri(e)?e:void 0,severities:sg.cj.Error|sg.cj.Warning|sg.cj.Info});return"function"==typeof e&&(t=t.filter(e=>this._resourceFilter(e.resource))),t.sort(s),!(0,t8.aI)(t,this._markers,(e,t)=>e.resource.toString()===t.resource.toString()&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn&&e.severity===t.severity&&e.message===t.message)&&(this._markers=t,!0)};o(),this._dispoables.add(t.onMarkerChanged(e=>{(!this._resourceFilter||e.some(e=>this._resourceFilter(e)))&&o()&&(this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!!this._resourceFilter&&!!e&&this._resourceFilter(e)}get selected(){let e=this._markers[this._nextIdx];return e&&new fT(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=this._markers.findIndex(t=>(0,ij.n4)(t.resource,e.uri));if(n<0)(n=(0,t8.Uw)(this._markers.length,t=>(0,iE.UD)(this._markers[t].resource.toString(),e.uri.toString())))<0&&(n=~n),i?this._nextIdx=n:this._nextIdx=(this._markers.length+n-1)%this._markers.length;else{let s=!1,o=!1;for(let i=n;i<this._markers.length;i++){let n=tO.Q.lift(this._markers[i]);if(n.isEmpty()){let t=e.getWordAtPosition(n.getStartPosition());t&&(n=new tO.Q(n.startLineNumber,t.startColumn,n.startLineNumber,t.endColumn))}if(t&&(n.containsPosition(t)||t.isBeforeOrEqual(n.getStartPosition()))){this._nextIdx=i,s=!0,o=!n.containsPosition(t);break}if(this._markers[i].resource.toString()!==e.uri.toString())break}s?o&&!i&&(this._nextIdx-=1):this._nextIdx=i?0:this._markers.length-1}this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,i){if(0===this._markers.length)return!1;let n=this._nextIdx;return -1===this._nextIdx?this._initIdx(t,i,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),n!==this._nextIdx}find(e,t){let i=this._markers.findIndex(t=>t.resource.toString()===e.toString());if(!(i<0)){for(;i<this._markers.length;i++)if(tO.Q.containsPosition(this._markers[i],t))return new fT(this._markers[i],i+1,this._markers.length)}}};fR=fE([fM(1,sg.DR),fM(2,to.pG)],fR);let fO=(0,t5.u1)("IMarkerNavigationService"),fP=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new g$.w}getMarkerList(e){for(let t of this._provider){let i=t.getMarkerList(e);if(i)return i}return new fR(e,this._markerService,this._configService)}};fP=fE([fM(0,sg.DR),fM(1,to.pG)],fP),(0,nM.v)(fO,fP,1),i(13326),i(96143);var fA=i(5785);(eO||(eO={})).className=function(e){switch(e){case fA.A.Ignore:return"severity-ignore "+iM.L.asClassName(e9.W.info);case fA.A.Info:return iM.L.asClassName(e9.W.info);case fA.A.Warning:return iM.L.asClassName(e9.W.warning);case fA.A.Error:return iM.L.asClassName(e9.W.error);default:return""}};var fF=function(e,t){return function(i,n){t(i,n,e)}};class fB{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new tT.Cm,this._editor=t;let o=document.createElement("div");o.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),o.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),o.appendChild(this._relatedBlock),this._disposables.add(e8.un(this._relatedBlock,"click",e=>{e.preventDefault();let t=this._relatedDiagnostics.get(e.target);t&&i(t)})),this._scrollable=new g4.Se(o,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(e=>{o.style.left=`-${e.scrollLeft}px`,o.style.top=`-${e.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,tT.AS)(this._disposables)}update(e){let{source:t,message:i,relatedInformation:n,code:s}=e,o=(t?.length||0)+2;s&&("string"==typeof s?o+=s.length:o+=s.value.length);let r=(0,iE.uz)(i);for(let e of(this._lines=r.length,this._longestLineLength=0,r))this._longestLineLength=Math.max(e.length+o,this._longestLineLength);e8.w_(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(let e of r)(a=document.createElement("div")).innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||s){let e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){let i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(s)if("string"==typeof s){let t=document.createElement("span");t.innerText=`(${s})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=e8.$("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(s.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},e8.BC(this._codeLink,e8.$("span")).innerText=s.value,e.appendChild(this._codeLink)}if(e8.w_(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,t8.EI)(n)){let e=this._relatedBlock.appendChild(document.createElement("div"));for(let t of(e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(75))}px`,this._lines+=1,n)){let i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);let s=document.createElement("span");s.innerText=t.message,i.appendChild(n),i.appendChild(s),this._lines+=1,e.appendChild(i)}}let l=this._editor.getOption(59),h=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:h,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case sg.cj.Error:t=tn.kg(1019,"Error");break;case sg.cj.Warning:t=tn.kg(1020,"Warning");break;case sg.cj.Info:t=tn.kg(1021,"Info");break;case sg.cj.Hint:t=tn.kg(1022,"Hint")}let i=tn.kg(1023,"{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),n=this._editor.getModel();if(n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1){let t=n.getLineContent(e.startLineNumber);i=`${t}, ${i}`}return i}}let fW=class extends ah{static{eP=this}static{this.TitleMenu=new ts.D8("gotoErrorTitleMenu")}constructor(e,t,i,n,s,o,r){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=o,this._labelService=r,this._callOnDispose=new tT.Cm,this._onDidSelectRelatedInformation=new iA.vl,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=sg.cj.Warning,this._backgroundColor=oo.Q1.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(fQ);let t=fU,i=fj;this._severity===sg.cj.Warning?(t=f$,i=fK):this._severity===sg.cj.Info&&(t=fG,i=fq);let n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(ac),secondaryHeadingColor:e.getColor(au)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(e=>this.editor.focus()));let t=this._menuService.getMenuActions(eP.TitleMenu,this._contextKeyService),i=(0,oT.ej)(t);this._actionbarWidget.push(i,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=e8.BC(e,e8.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new fB(this._container,this.editor,e=>this._onDidSelectRelatedInformation.fire(e),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let n=tO.Q.lift(e),s=this.editor.getPosition(),o=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(o,this.computeRequiredHeight());let r=this.editor.getModel();if(r){let e=i>1?tn.kg(1024,"{0} of {1} problems",t,i):tn.kg(1025,"{0} of {1} problem",t,i);this.setTitle((0,ij.P8)(r.uri),e)}this._icon.className=`codicon ${eO.className(sg.cj.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(o,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};fW=eP=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([fF(1,tB.Gy),fF(2,iB.Cr),fF(3,ts.ez),fF(4,t5._Y),fF(5,tr.fN),fF(6,aI.L)],fW);let fH=(0,tF.yLr)(tF.Rbi,tF.AN$),fV=(0,tF.yLr)(tF.Hng,tF.Stt),fz=(0,tF.yLr)(tF.pOz,tF.IIb),fU=(0,tF.x1A)("editorMarkerNavigationError.background",{dark:fH,light:fH,hcDark:tF.b1q,hcLight:tF.b1q},tn.kg(1026,"Editor marker navigation widget error color.")),fj=(0,tF.x1A)("editorMarkerNavigationError.headerBackground",{dark:(0,tF.JO0)(fU,.1),light:(0,tF.JO0)(fU,.1),hcDark:null,hcLight:null},tn.kg(1027,"Editor marker navigation widget error heading background.")),f$=(0,tF.x1A)("editorMarkerNavigationWarning.background",{dark:fV,light:fV,hcDark:tF.b1q,hcLight:tF.b1q},tn.kg(1028,"Editor marker navigation widget warning color.")),fK=(0,tF.x1A)("editorMarkerNavigationWarning.headerBackground",{dark:(0,tF.JO0)(f$,.1),light:(0,tF.JO0)(f$,.1),hcDark:"#0C141F",hcLight:(0,tF.JO0)(f$,.2)},tn.kg(1029,"Editor marker navigation widget warning heading background.")),fG=(0,tF.x1A)("editorMarkerNavigationInfo.background",{dark:fz,light:fz,hcDark:tF.b1q,hcLight:tF.b1q},tn.kg(1030,"Editor marker navigation widget info color.")),fq=(0,tF.x1A)("editorMarkerNavigationInfo.headerBackground",{dark:(0,tF.JO0)(fG,.1),light:(0,tF.JO0)(fG,.1),hcDark:null,hcLight:null},tn.kg(1031,"Editor marker navigation widget info heading background.")),fQ=(0,tF.x1A)("editorMarkerNavigation.background",tF.YtV,tn.kg(1032,"Editor marker navigation widget background."));var fY=function(e,t){return function(i,n){t(i,n,e)}};let fZ=class{static{eA=this}static{this.ID="editor.contrib.markerController"}static get(e){return e.getContribution(eA.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new tT.Cm,this._editor=e,this._widgetVisible=f5.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(fW,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(e=>{this._model?.selected&&tO.Q.containsPosition(this._model?.selected.marker,e.position)||this._model?.resetIndex()})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;let e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:tO.Q.lift(e).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),i=this._getOrCreateModel(t.uri);i.resetIndex(),i.move(!0,t,new tR.y(e.startLineNumber,e.startColumn)),i.selected&&this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}async navigate(e,t){if(!this._editor.hasModel())return;let i=this._editor.getModel(),n=this._getOrCreateModel(t?void 0:i.uri);if(n.move(e,i,this._editor.getPosition()),n.selected)if(n.selected.marker.resource.toString()!==i.uri.toString()){this._cleanUp();let i=await this._editorService.openCodeEditor({resource:n.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:n.selected.marker}},this._editor);i&&(eA.get(i)?.close(),eA.get(i)?.navigate(e,t))}else this._widget.showAtMarker(n.selected.marker,n.selected.index,n.selected.total)}};fZ=eA=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([fY(1,fO),fY(2,tr.fN),fY(3,te.T),fY(4,t5._Y)],fZ);class fX extends e6.ks{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){t.hasModel()&&await fZ.get(t)?.navigate(this._next,this._multiFile)}}class fJ extends fX{static{this.ID="editor.action.marker.next"}static{this.LABEL=tn.aS(1015,"Go to Next Problem (Error, Warning, Info)")}constructor(){super(!0,!1,{id:fJ.ID,label:fJ.LABEL,precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:578,weight:100},menuOpts:{menuId:fW.TitleMenu,title:fJ.LABEL.value,icon:(0,sL.pU)("marker-navigation-next",e9.W.arrowDown,tn.kg(1011,"Icon for goto next marker.")),group:"navigation",order:1}})}}class f0 extends fX{static{this.ID="editor.action.marker.prev"}static{this.LABEL=tn.aS(1016,"Go to Previous Problem (Error, Warning, Info)")}constructor(){super(!1,!1,{id:f0.ID,label:f0.LABEL,precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:1602,weight:100},menuOpts:{menuId:fW.TitleMenu,title:f0.LABEL.value,icon:(0,sL.pU)("marker-navigation-previous",e9.W.arrowUp,tn.kg(1012,"Icon for goto previous marker.")),group:"navigation",order:2}})}}class f1 extends fX{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:tn.aS(1017,"Go to Next Problem in Files (Error, Warning, Info)"),precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:66,weight:100},menuOpts:{menuId:ts.D8.MenubarGoMenu,title:tn.kg(1013,"Next &&Problem"),group:"6_problem_nav",order:1}})}}class f2 extends fX{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:tn.aS(1018,"Go to Previous Problem in Files (Error, Warning, Info)"),precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:1090,weight:100},menuOpts:{menuId:ts.D8.MenubarGoMenu,title:tn.kg(1014,"Previous &&Problem"),group:"6_problem_nav",order:2}})}}(0,e6.HW)(fZ.ID,fZ,4),(0,e6.Fl)(fJ),(0,e6.Fl)(f0),(0,e6.Fl)(f1),(0,e6.Fl)(f2);let f5=new tr.N1("markersNavigationVisible",!1),f4=e6.DX.bindToContribution(fZ.get);(0,e6.E_)(new f4({id:"closeMarkersNavigation",precondition:f5,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:ti.R.focus,primary:9,secondary:[1033]}}));var f3=i(74310),f7=i(26033),f9=i(32795),f8=i(25659);class f6 extends e6.ks{constructor(){super({id:"editor.action.debugEditorGpuRenderer",label:(0,tn.aS)(1096,"Developer: Debug Editor GPU Renderer"),precondition:tr.M$.true()})}async run(e,t){let i=e.get(t5._Y),n=e.get(ip.GK),s=await n.pick([{label:(0,tn.kg)(1093,"Log Texture Atlas Stats"),id:"logTextureAtlasStats"},{label:(0,tn.kg)(1094,"Save Texture Atlas"),id:"saveTextureAtlas"},{label:(0,tn.kg)(1095,"Draw Glyph"),id:"drawGlyph"}],{canPickMany:!1});if(s)switch(s.id){case"logTextureAtlasStats":i.invokeFunction(e=>{let t=e.get(t2.rr),i=f8.n.atlas;if(!f8.n.atlas)return void t.error("No texture atlas found");let n=i.getStats();t.info(["Texture atlas stats",...n].join("\n\n"))});break;case"saveTextureAtlas":i.invokeFunction(async e=>{let t=e.get(i$.VR),i=e.get(g8),n=t.getWorkspace().folders;if(n.length>0){let e=f8.n.atlas,t=[];for(let[s,o]of e.pages.entries())t.push(i.writeFile(i_.r.joinPath(n[0].uri,`textureAtlasPage${s}_actual.png`),f3.MB.wrap(new Uint8Array(await (await o.source.convertToBlob()).arrayBuffer()))),i.writeFile(i_.r.joinPath(n[0].uri,`textureAtlasPage${s}_usage.png`),f3.MB.wrap(new Uint8Array(await (await o.getUsagePreview()).arrayBuffer()))));await Promise.all(t)}});break;case"drawGlyph":i.invokeFunction(async e=>{let t=e.get(to.pG),i=e.get(g8),n=e.get(ip.GK),s=e.get(i$.VR).getWorkspace().folders;if(0===s.length)return;let o=f8.n.atlas,r=t.getValue("editor.fontFamily"),a=t.getValue("editor.fontSize"),l=new f9.O(a,r,(0,e8.fz)().devicePixelRatio,f8.n.decorationStyleCache),h=await n.input({prompt:"Enter a character to draw (prefix with 0x for code point))"});if(!h)return;let d=h.match(/0x(?<codePoint>[0-9a-f]+)/i)?.groups?.codePoint;void 0!==d&&(h=String.fromCodePoint(parseInt(d,16)));let c=o.getGlyph(l,h,0,0,0);if(!c)return;let u=o.pages[c.pageIndex].source.getContext("2d")?.getImageData(c.x,c.y,c.w,c.h);if(!u)return;let g=new OffscreenCanvas(u.width,u.height);(0,f7.HS)(g.getContext("2d")).putImageData(u,0,0);let p=await g.convertToBlob({type:"image/png"}),m=i_.r.joinPath(s[0].uri,`glyph_${h}_0_${a}px_${r.replaceAll(/[,\\\/\.'\s]/g,"_")}.png`);await i.writeFile(m,f3.MB.wrap(new Uint8Array(await p.arrayBuffer())))})}}}(0,e6.Fl)(f6),function(e){e.NoAutoFocus="noAutoFocus",e.FocusIfVisible="focusIfVisible",e.AutoFocusImmediately="autoFocusImmediately"}(eF||(eF={}));class _e extends e6.ks{constructor(){super({id:oS,label:tn.aS(1102,"Show or Focus Hover"),metadata:{description:tn.aS(1103,"Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[eF.NoAutoFocus,eF.FocusIfVisible,eF.AutoFocusImmediately],enumDescriptions:[tn.kg(1099,"The hover will not automatically take focus."),tn.kg(1100,"The hover will take focus only if it is already visible."),tn.kg(1101,"The hover will automatically take focus when it appears.")],default:eF.FocusIfVisible}}}}]},precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:(0,tS.m5)(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;let n=lE.get(t);if(!n)return;let s=i?.focus,o=eF.FocusIfVisible;Object.values(eF).includes(s)?o=s:"boolean"==typeof s&&s&&(o=eF.AutoFocusImmediately);let r=e=>{let i=t.getPosition(),s=new tO.Q(i.lineNumber,i.column,i.lineNumber,i.column);n.showContentHover(s,1,2,e)},a=2===t.getOption(2);n.isHoverVisible?o!==eF.NoAutoFocus?n.focus():r(a):r(a||o===eF.AutoFocusImmediately)}}class _t extends e6.ks{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:tn.aS(1104,"Show Definition Preview Hover"),precondition:void 0,metadata:{description:tn.aS(1105,"Show the definition preview hover in the editor.")}})}run(e,t){let i=lE.get(t);if(!i)return;let n=t.getPosition();if(!n)return;let s=new tO.Q(n.lineNumber,n.column,n.lineNumber,n.column),o=fN.get(t);o&&o.startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,2,!0)})}}class _i extends e6.ks{constructor(){super({id:"editor.action.hideHover",label:tn.aS(1106,"Hide Hover"),alias:"Hide Content Hover",precondition:void 0})}run(e,t){lE.get(t)?.hideContentHover()}}class _n extends e6.ks{constructor(){super({id:"editor.action.scrollUpHover",label:tn.aS(1107,"Scroll Up Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:16,weight:100},metadata:{description:tn.aS(1108,"Scroll up the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.scrollUp()}}class _s extends e6.ks{constructor(){super({id:"editor.action.scrollDownHover",label:tn.aS(1109,"Scroll Down Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:18,weight:100},metadata:{description:tn.aS(1110,"Scroll down the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.scrollDown()}}class _o extends e6.ks{constructor(){super({id:"editor.action.scrollLeftHover",label:tn.aS(1111,"Scroll Left Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:15,weight:100},metadata:{description:tn.aS(1112,"Scroll left the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.scrollLeft()}}class _r extends e6.ks{constructor(){super({id:"editor.action.scrollRightHover",label:tn.aS(1113,"Scroll Right Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:17,weight:100},metadata:{description:tn.aS(1114,"Scroll right the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.scrollRight()}}class _a extends e6.ks{constructor(){super({id:"editor.action.pageUpHover",label:tn.aS(1115,"Page Up Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:tn.aS(1116,"Page up the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.pageUp()}}class _l extends e6.ks{constructor(){super({id:"editor.action.pageDownHover",label:tn.aS(1117,"Page Down Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:tn.aS(1118,"Page down the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.pageDown()}}class _h extends e6.ks{constructor(){super({id:"editor.action.goToTopHover",label:tn.aS(1119,"Go To Top Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:tn.aS(1120,"Go to the top of the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.goToTop()}}class _d extends e6.ks{constructor(){super({id:"editor.action.goToBottomHover",label:tn.aS(1121,"Go To Bottom Hover"),precondition:ti.R.hoverFocused,kbOpts:{kbExpr:ti.R.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:tn.aS(1122,"Go to the bottom of the editor hover.")}})}run(e,t){let i=lE.get(t);i&&i.goToBottom()}}class _c extends e6.ks{constructor(){super({id:ok,label:ox,alias:"Increase Hover Verbosity Level",precondition:ti.R.hoverVisible})}run(e,t,i){let n=lE.get(t);if(!n)return;let s=i?.index!==void 0?i.index:n.focusedHoverPartIndex();n.updateHoverVerbosityLevel(iD.M$.Increase,s,i?.focus)}}class _u extends e6.ks{constructor(){super({id:oL,label:oD,alias:"Decrease Hover Verbosity Level",precondition:ti.R.hoverVisible})}run(e,t,i){let n=lE.get(t);if(!n)return;let s=i?.index!==void 0?i.index:n.focusedHoverPartIndex();lE.get(t)?.updateHoverVerbosityLevel(iD.M$.Decrease,s,i?.focus)}}var _g=i(20872),_p=function(e,t){return function(i,n){t(i,n,e)}};let _m=e8.$;class _f{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let __={type:1,filter:{include:n9.QuickFix},triggerAction:H.QuickFixHover},_v=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];let i=this._editor.getModel(),n=e.range;if(!i.isValidRange(e.range))return[];let s=n.startLineNumber,o=i.getLineMaxColumn(s),r=[];for(let n of t){let t=n.range.startLineNumber===s?n.range.startColumn:1,a=n.range.endLineNumber===s?n.range.endColumn:o,l=this._markerDecorationsService.getMarker(i.uri,n);if(!l)continue;let h=new tO.Q(e.range.startLineNumber,t,e.range.startLineNumber,a);r.push(new _f(this,h,l))}return r}renderHoverParts(e,t){if(!t.length)return new on([]);let i=[];t.forEach(t=>{let n=this._renderMarkerHover(t);e.fragment.appendChild(n.hoverElement),i.push(n)});let n=1===t.length?t[0]:t.sort((e,t)=>sg.cj.compare(e.marker.severity,t.marker.severity))[0];return new on(i,this._renderMarkerStatusbar(e,n))}_renderMarkerHover(e){let t=new tT.Cm,i=_m("div.hover-row"),n=e8.BC(i,_m("div.marker.hover-contents")),{source:s,message:o,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);let l=e8.BC(n,_m("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=o,s||r)if(r&&"string"!=typeof r){let e=_m("span");s&&(e8.BC(e,_m("span")).innerText=s);let i=e8.BC(e,_m("a.code-link"));i.setAttribute("href",r.target.toString(!0)),t.add(e8.ko(i,"click",e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()})),e8.BC(i,_m("span")).innerText=r.value;let o=e8.BC(n,e);o.style.opacity="0.6",o.style.paddingLeft="6px"}else{let e=e8.BC(n,_m("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=s&&r?`${s}(${r})`:s||`(${r})`}if((0,t8.EI)(a))for(let{message:e,resource:i,startLineNumber:s,startColumn:o}of a){let r=e8.BC(n,_m("div"));r.style.marginTop="8px";let a=e8.BC(r,_m("a"));a.innerText=`${(0,ij.P8)(i)}(${s}, ${o}): `,a.style.cursor="pointer",t.add(e8.ko(a,"click",e=>{if(e.stopPropagation(),e.preventDefault(),this._openerService){let e={selection:{startLineNumber:s,startColumn:o}};this._openerService.open(i,{fromUserGesture:!0,editorOptions:e}).catch(ih.dz)}}));let l=e8.BC(r,_m("span"));l.innerText=e,this._editor.applyFontInfo(l)}return{hoverPart:e,hoverElement:i,dispose:()=>t.dispose()}}_renderMarkerStatusbar(e,t){let i=new tT.Cm;if(t.marker.severity===sg.cj.Error||t.marker.severity===sg.cj.Warning||t.marker.severity===sg.cj.Info){let i=fZ.get(this._editor);i&&e.statusBar.addAction({label:tn.kg(1132,"View Problem"),commandId:fJ.ID,run:()=>{e.hide(),i.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(104)){let n=e.statusBar.append(_m("div"));this.recentMarkerCodeActionsInfo&&(sg.oc.makeKey(this.recentMarkerCodeActionsInfo.marker)===sg.oc.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=tn.kg(1133,"No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);let s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?tT.jG.None:(0,tM.EQ)(()=>n.textContent=tn.kg(1134,"Checking for quick fixes..."),200,i);n.textContent||(n.textContent=String.fromCharCode(160));let o=this.getCodeActions(t.marker);i.add((0,tT.s)(()=>o.cancel())),o.then(o=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){o.dispose(),n.textContent=tn.kg(1135,"No quick fixes available");return}n.style.display="none";let r=!1;i.add((0,tT.s)(()=>{r||o.dispose()})),e.statusBar.addAction({label:tn.kg(1136,"Quick Fix..."),commandId:si,run:t=>{r=!0;let i=sO.get(this._editor),n=e8.BK(t);e.hide(),i?.showCodeActions(__,o,{x:n.left,y:n.top,width:n.width,height:n.height})}});let a=o.validActions.find(e=>e.action.isAI);a&&e.statusBar.addAction({label:a.action.title,commandId:a.action.command?.id??"",iconClass:iM.L.asClassName(e9.W.sparkle),run:()=>{let e=sO.get(this._editor);e?.applyCodeAction(a,!1,!1,V.FromProblemsHover)}}),e.onContentsChanged()},ih.dz)}return i}getCodeActions(e){return(0,tM.SS)(t=>sd(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new tO.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),__,ig.ke.None,t))}};_v=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([_p(1,_g.A),_p(2,iB.Cr),_p(3,iI.u)],_v);class _b{constructor(e){this._editor=e}computeSync(e){let t=e=>({value:e}),i=this._editor.getLineDecorations(e.lineNumber),n=[],s="lineNo"===e.laneOrLine;if(!i)return n;for(let o of i){let i=o.options.glyphMargin?.position??tP.ZS.Center;if(!s&&i!==e.laneOrLine)continue;let r=s?o.options.lineNumberHoverMessage:o.options.glyphMarginHoverMessage;!r||(0,ty.it)(r)||n.push(...(0,t8._j)(r).map(t))}return n}}var _C=function(e,t){return function(i,n){t(i,n,e)}};let _w=e8.$,_y=class extends tT.jG{static{eB=this}static{this.ID="editor.contrib.modesGlyphHoverWidget"}constructor(e,t,i){super(),this._renderDisposeables=this._register(new tT.Cm),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new o2.N4(!0)),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=new iF.T({editor:this._editor},t,i),this._hoverOperation=this._register(new oY(this._editor,new _b(this._editor))),this._register(this._hoverOperation.onResult(e=>this._withResult(e))),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(59)&&this._updateFont()})),this._register(e8.un(this._hover.containerDomNode,"mouseleave",e=>{this._onMouseLeave(e)})),this._editor.addOverlayWidget(this)}dispose(){this._hoverComputerOptions=void 0,this._editor.removeOverlayWidget(this),super.dispose()}getId(){return eB.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(e=>this._editor.applyFontInfo(e))}_onModelDecorationsChanged(){this._isVisible&&this._hoverComputerOptions&&(this._hoverOperation.cancel(),this._hoverOperation.start(0,this._hoverComputerOptions))}showsOrWillShow(e){let t=e.target;return 2===t.type&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):3===t.type&&(this._startShowingAt(t.position.lineNumber,"lineNo"),!0)}_startShowingAt(e,t){this._hoverComputerOptions&&this._hoverComputerOptions.lineNumber===e&&this._hoverComputerOptions.laneOrLine===t||(this._hoverOperation.cancel(),this.hide(),this._hoverComputerOptions={lineNumber:e,laneOrLine:t},this._hoverOperation.start(0,this._hoverComputerOptions))}hide(){this._hoverComputerOptions=void 0,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e.value,this._messages.length>0?this._renderMessages(e.options.lineNumber,e.options.laneOrLine,this._messages):this.hide()}_renderMessages(e,t,i){this._renderDisposeables.clear();let n=document.createDocumentFragment();for(let e of i){let t=_w("div.hover-row.markdown-hover"),i=e8.BC(t,_w("div.hover-contents")),s=this._renderDisposeables.add(this._markdownRenderer.render(e.value));i.appendChild(s.element),n.appendChild(t)}this._updateContents(n),this._showAt(e,t)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e,t){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));let i=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),s=this._editor.getScrollTop(),o=this._editor.getOption(75),r=this._hover.containerDomNode.clientHeight,a=i.glyphMarginLeft+i.glyphMarginWidth+("lineNo"===t?i.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${a}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(n-s-(r-o)/2),0)}px`,this._hover.containerDomNode.style.zIndex="11"}_onMouseLeave(e){let t=this._editor.getDomNode();t&&oq(t,e.x,e.y)||this.hide()}};_y=eB=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([_C(1,rs.L),_C(2,iB.Cr)],_y);let _S=class extends tT.jG{static{this.ID="editor.contrib.marginHover"}constructor(e,t){super(),this._editor=e,this._instantiationService=t,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new tT.Cm,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new tM.uC(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(69)&&(this._unhookListeners(),this._hookListeners())}))}_hookListeners(){let e=this._editor.getOption(69);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(e=>this._onEditorMouseDown(e))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(e=>this._onEditorMouseMove(e))),this._listenersStore.add(this._editor.onKeyDown(e=>this._onKeyDown(e)))):(this._listenersStore.add(this._editor.onMouseMove(e=>this._onEditorMouseMove(e))),this._listenersStore.add(this._editor.onKeyDown(e=>this._onKeyDown(e)))),this._listenersStore.add(this._editor.onMouseLeave(e=>this._onEditorMouseLeave(e))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this.hideGlyphHover()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(e=>this._onEditorScrollChanged(e)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this.hideGlyphHover()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,this._isMouseOnGlyphHoverWidget(e)||this.hideGlyphHover()}_isMouseOnGlyphHoverWidget(e){let t=this._glyphWidget?.getDomNode();return!!t&&oq(t,e.event.posx,e.event.posy)}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){if(!this.shouldKeepOpenOnEditorMouseMoveOrLeave)this._cancelScheduler(),this._isMouseOnGlyphHoverWidget(e)||this.hideGlyphHover()}_shouldNotRecomputeCurrentHoverWidget(e){let t=this._hoverSettings.sticky,i=this._isMouseOnGlyphHoverWidget(e);return t&&i}_onEditorMouseMove(e){if(!this.shouldKeepOpenOnEditorMouseMoveOrLeave){if(this._mouseMoveEvent=e,this._shouldNotRecomputeCurrentHoverWidget(e))return void this._reactToEditorMouseMoveRunner.cancel();this._reactToEditorMouseMove(e)}}_reactToEditorMouseMove(e){!e||this._tryShowHoverWidget(e)||this.hideGlyphHover()}_tryShowHoverWidget(e){return this._getOrCreateGlyphWidget().showsOrWillShow(e)}_onKeyDown(e){this._editor.hasModel()&&5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this.hideGlyphHover()}hideGlyphHover(){this._glyphWidget?.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(_y,this._editor)),this._glyphWidget}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._glyphWidget?.dispose()}};_S=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(D=t5._Y,function(e,t){D(e,t,1)})],_S);class _k{}class _x{}class _L{}(0,e6.HW)(lE.ID,lE,2),(0,e6.HW)(_S.ID,_S,2),(0,e6.Fl)(_e),(0,e6.Fl)(_t),(0,e6.Fl)(_i),(0,e6.Fl)(_n),(0,e6.Fl)(_s),(0,e6.Fl)(_o),(0,e6.Fl)(_r),(0,e6.Fl)(_a),(0,e6.Fl)(_l),(0,e6.Fl)(_h),(0,e6.Fl)(_d),(0,e6.Fl)(_c),(0,e6.Fl)(_u),os.register(rm),os.register(_v),(0,tB.zy)((e,t)=>{let i=e.getColor(tF.oZ8);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))}),c$.register(new _k),c$.register(new _x),c$.register(new _L);var _D=i(62904);function _I(e,t){let i=0;for(let n=0;n<e.length;n++)" "===e.charAt(n)?i+=t:i++;return i}function _N(e,t,i){e=e<0?0:e;let n="";if(!i){let i=Math.floor(e/t);e%=t;for(let e=0;e<i;e++)n+=" "}for(let t=0;t<e;t++)n+=" ";return n}var _E=i(91587),_M=i(24862),_T=i(54976);function _R(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];let s=t.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;if(!s)return[];let o=new _T.no(e,s,t);for(n=Math.min(n,e.getLineCount());i<=n&&o.shouldIgnore(i);)i++;if(i>n-1)return[];let{tabSize:r,indentSize:a,insertSpaces:l}=e.getOptions(),h=(e,t)=>(t=t||1,_D.Y.shiftIndent(e,e.length+t,r,a,l)),d=(e,t)=>(t=t||1,_D.Y.unshiftIndent(e,e.length+t,r,a,l)),c=[],u=e.getLineContent(i),g=iE.UU(u),p=g;o.shouldIncrease(i)?(p=h(p),g=h(g)):o.shouldIndentNextLine(i)&&(p=h(p)),i++;for(let t=i;t<=n;t++){var m,f;if(m=e,f=t,m.tokenization.isCheapToTokenize(f)&&2===m.tokenization.getLineTokens(f).getStandardTokenType(0))continue;let i=e.getLineContent(t),n=iE.UU(i),s=p;o.shouldDecrease(t,s)&&(p=d(p),g=d(g)),n!==p&&c.push(rj.k.replaceMove(new tk.L(t,1,t,n.length+1),(0,_M.P)(p,a,l))),o.shouldIgnore(t)||(p=o.shouldIncrease(t,s)?g=h(g):o.shouldIndentNextLine(t,s)?h(p):g)}return c}class _O extends e6.ks{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:_O.ID,label:tn.aS(1141,"Convert Indentation to Spaces"),precondition:ti.R.writable,metadata:{description:tn.aS(1142,"Convert the tab indentation to spaces.")}})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),s=t.getSelection();if(!s)return;let o=new _K(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}class _P extends e6.ks{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:_P.ID,label:tn.aS(1143,"Convert Indentation to Tabs"),precondition:ti.R.writable,metadata:{description:tn.aS(1144,"Convert the spaces indentation to tabs.")}})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),s=t.getSelection();if(!s)return;let o=new _G(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}class _A extends e6.ks{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){let i=e.get(ip.GK),n=e.get(n3.S),s=t.getModel();if(!s)return;let o=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),r=s.getOptions(),a=[1,2,3,4,5,6,7,8].map(e=>({id:e.toString(),label:e.toString(),description:e===o.tabSize&&e===r.tabSize?tn.kg(1137,"Configured Tab Size"):e===o.tabSize?tn.kg(1138,"Default Tab Size"):e===r.tabSize?tn.kg(1139,"Current Tab Size"):void 0})),l=Math.min(s.getOptions().tabSize-1,7);setTimeout(()=>{i.pick(a,{placeHolder:tn.kg(1140,"Select Tab Size for Current File"),activeItem:a[l]}).then(e=>{if(e&&s&&!s.isDisposed()){let t=parseInt(e.label,10);this.displaySizeOnly?s.updateOptions({tabSize:t}):s.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}})},50)}}class _F extends _A{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:_F.ID,label:tn.aS(1145,"Indent Using Tabs"),precondition:void 0,metadata:{description:tn.aS(1146,"Use indentation with tabs.")}})}}class _B extends _A{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:_B.ID,label:tn.aS(1147,"Indent Using Spaces"),precondition:void 0,metadata:{description:tn.aS(1148,"Use indentation with spaces.")}})}}class _W extends _A{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:_W.ID,label:tn.aS(1149,"Change Tab Display Size"),precondition:void 0,metadata:{description:tn.aS(1150,"Change the space size equivalent of the tab.")}})}}class _H extends e6.ks{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:_H.ID,label:tn.aS(1151,"Detect Indentation from Content"),precondition:void 0,metadata:{description:tn.aS(1152,"Detect the indentation from content.")}})}run(e,t){let i=e.get(n3.S),n=t.getModel();if(!n)return;let s=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}class _V extends e6.ks{constructor(){super({id:"editor.action.reindentlines",label:tn.aS(1153,"Reindent Lines"),precondition:ti.R.writable,metadata:{description:tn.aS(1154,"Reindent the lines of the editor.")}})}run(e,t){let i=e.get(r1.JZ),n=t.getModel();if(!n)return;let s=_R(n,i,1,n.getLineCount());s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class _z extends e6.ks{constructor(){super({id:"editor.action.reindentselectedlines",label:tn.aS(1155,"Reindent Selected Lines"),precondition:ti.R.writable,metadata:{description:tn.aS(1156,"Reindent the selected lines of the editor.")}})}run(e,t){let i=e.get(r1.JZ),n=t.getModel();if(!n)return;let s=t.getSelections();if(null===s)return;let o=[];for(let e of s){let t=e.startLineNumber,s=e.endLineNumber;if(t!==s&&1===e.endColumn&&s--,1===t){if(t===s)continue}else t--;let r=_R(n,i,t,s);o.push(...r)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class _U{constructor(e,t){for(let i of(this._initialSelection=t,this._edits=[],this._selectionId=null,e))i.range&&"string"==typeof i.text&&this._edits.push(i)}getEditOperations(e,t){for(let e of this._edits)t.addEditOperation(tO.Q.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let _j=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new tT.Cm,this.callOnModel=new tT.Cm,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(!this.editor.getOption(17)||4>this.editor.getOption(16))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){let t=this.editor.getSelections();if(null===t||t.length>1)return;let i=this.editor.getModel();if(!i||this.rangeContainsOnlyWhitespaceCharacters(i,e)||!this.editor.getOption(18)&&function(e,t){let i=t=>2===(0,px.Tf)(e,t);return i(t.getStartPosition())||i(t.getEndPosition())}(i,e)||!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;let n=this.editor.getOption(16),{tabSize:s,indentSize:o,insertSpaces:r}=i.getOptions(),a=[],l={shiftIndent:e=>_D.Y.shiftIndent(e,e.length+1,s,o,r),unshiftIndent:e=>_D.Y.unshiftIndent(e,e.length+1,s,o,r)},h=e.startLineNumber,d=i.getLineContent(h);if(!/\S/.test(d.substring(0,e.startColumn-1))){let e=(0,_E.$f)(n,i,i.getLanguageId(),h,l,this._languageConfigurationService);if(null!==e){let t=iE.UU(d),n=_I(e,s);if(n!==_I(t,s)){let e=_N(n,s,r);a.push({range:new tO.Q(h,1,h,t.length+1),text:e}),d=e+d.substring(t.length)}else{let e=(0,_E.Yb)(i,h,this._languageConfigurationService);if(0===e||8===e)return}}}let c=h;for(;h<e.endLineNumber;){if(!/\S/.test(i.getLineContent(h+1))){h++;continue}break}if(h!==e.endLineNumber){let t=(0,_E.$f)(n,{tokenization:{getLineTokens:e=>i.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===c?d:i.getLineContent(e)},i.getLanguageId(),h+1,l,this._languageConfigurationService);if(null!==t){let n=_I(t,s),o=_I(iE.UU(i.getLineContent(h+1)),s);if(n!==o){let t=n-o;for(let n=h+1;n<=e.endLineNumber;n++){let e=i.getLineContent(n),o=iE.UU(e),l=_N(_I(o,s)+t,s,r);l!==o&&a.push({range:new tO.Q(n,1,n,o.length+1),text:l})}}}}if(a.length>0){this.editor.pushUndoStop();let e=new _U(a,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,t){let i=e=>0===e.trim().length,n=!0;if(t.startLineNumber===t.endLineNumber)n=i(e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1));else for(let s=t.startLineNumber;s<=t.endLineNumber;s++){let o=e.getLineContent(s);if(!(n=s===t.startLineNumber?i(o.substring(t.startColumn-1)):s===t.endLineNumber?i(o.substring(0,t.endColumn-1)):0===e.getLineFirstNonWhitespaceColumn(s)))break}return n}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function _$(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let s="";for(let e=0;e<i;e++)s+=" ";let o=RegExp(s,"gi");for(let i=1,r=e.getLineCount();i<=r;i++){let r=e.getLineFirstNonWhitespaceColumn(i);if(0===r&&(r=e.getLineMaxColumn(i)),1===r)continue;let a=new tO.Q(i,1,i,r),l=e.getValueInRange(a),h=n?l.replace(/\t/ig,s):l.replace(o," ");t.addEditOperation(a,h)}}_j=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(I=r1.JZ,function(e,t){I(e,t,1)})],_j);class _K{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),_$(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class _G{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),_$(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}(0,e6.HW)(_j.ID,_j,2),(0,e6.Fl)(_O),(0,e6.Fl)(_P),(0,e6.Fl)(_F),(0,e6.Fl)(_B),(0,e6.Fl)(_W),(0,e6.Fl)(_H),(0,e6.Fl)(_V),(0,e6.Fl)(_z),(0,e6.HW)(l_.ID,l_,1),os.register(lC);class _q{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new tk.L(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new tk.L(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}i(31575);let _Q=class{static{eW=this}static{this.ID="editor.contrib.inPlaceReplaceController"}static get(e){return e.getContribution(eW.ID)}static{this.DECORATION=tA.kI.register({description:"in-place-replace",className:"valueSetReplacement"})}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){this.currentRequest?.cancel();let i=this.editor.getSelection(),n=this.editor.getModel();if(!n||!i)return;let s=i;if(s.startLineNumber!==s.endLineNumber)return;let o=new iN.$t(this.editor,5),r=n.uri;return this.editorWorkerService.canNavigateValueSet(r)?(this.currentRequest=(0,tM.SS)(e=>this.editorWorkerService.navigateValueSet(r,s,t)),this.currentRequest.then(t=>{if(!t||!t.range||!t.value||!o.validate(this.editor))return;let i=tO.Q.lift(t.range),n=t.range,r=t.value.length-(s.endColumn-s.startColumn);n={startLineNumber:n.startLineNumber,startColumn:n.startColumn,endLineNumber:n.endLineNumber,endColumn:n.startColumn+t.value.length},r>1&&(s=new tk.L(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+r-1));let a=new _q(i,s,t.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,a),this.editor.pushUndoStop(),this.decorations.set([{range:n,options:eW.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=(0,tM.wR)(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(ih.dz)}).catch(ih.dz)):Promise.resolve(void 0)}};_Q=eW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(N=or.w,function(e,t){N(e,t,1)})],_Q);class _Y extends e6.ks{constructor(){super({id:"editor.action.inPlaceReplace.up",label:tn.aS(1230,"Replace with Previous Value"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:3159,weight:100}})}run(e,t){let i=_Q.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class _Z extends e6.ks{constructor(){super({id:"editor.action.inPlaceReplace.down",label:tn.aS(1231,"Replace with Next Value"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:3161,weight:100}})}run(e,t){let i=_Q.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}(0,e6.HW)(_Q.ID,_Q,4),(0,e6.Fl)(_Y),(0,e6.Fl)(_Z);class _X{constructor(e){this._selection=e,this._selectionId=null}getEditOperations(e,t){let i=function(e){let t=e.getLineCount(),i=e.getLineContent(t),n=-1===iE.lT(i);if(t&&!n)return rj.k.insert(new tR.y(t,e.getLineMaxColumn(t)),e.getEOL())}(e);i&&t.addEditOperation(i.range,i.text),this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class _J extends e6.ks{static{this.ID="editor.action.insertFinalNewLine"}constructor(){super({id:_J.ID,label:tn.aS(1232,"Insert Final New Line"),precondition:ti.R.writable})}run(e,t,i){let n=t.getSelection();if(null===n)return;let s=new _X(n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}}(0,e6.Fl)(_J);var _0=i(9020);class _1 extends e6.ks{constructor(){super({id:"expandLineSelection",label:tn.aS(1233,"Expand Line Selection"),precondition:void 0,kbOpts:{weight:0,kbExpr:ti.R.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;let n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,_0.c.expandLineSelection(n,n.getCursorStates())),n.revealAllCursors(i.source,!0)}}(0,e6.Fl)(_1);class _2{constructor(e,t,i){this._selection=e,this._cursors=t,this._selectionId=null,this._trimInRegexesAndStrings=i}getEditOperations(e,t){let i=function(e,t,i){t.sort((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber);for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);let n=[],s=0,o=0,r=t.length;for(let a=1,l=e.getLineCount();a<=l;a++){let l=e.getLineContent(a),h=l.length+1,d=0;if(o<r&&t[o].lineNumber===a&&(d=t[o].column,o++,d===h)||0===l.length)continue;let c=iE.lT(l),u=0;if(-1===c)u=1;else{if(c===l.length-1)continue;u=c+2}if(!i){if(!e.tokenization.hasAccurateTokensForLine(a))continue;let t=e.tokenization.getLineTokens(a),i=t.getStandardTokenType(t.findTokenIndexAtOffset(u));if(2===i||3===i)continue}u=Math.max(d,u),n[s++]=rj.k.delete(new tO.Q(a,u,a,h))}return n}(e,this._cursors,this._trimInRegexesAndStrings);for(let e=0,n=i.length;e<n;e++){let n=i[e];t.addEditOperation(n.range,n.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}var _5=i(91461),_4=i(69745);class _3{constructor(e,t,i){this._selection=e,this._isCopyingDown=t,this._noop=i||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));let n=[];for(let t=i.startLineNumber;t<=i.endLineNumber;t++)n.push(e.getLineContent(t));let s=n.join("\n");""===s&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new tO.Q(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":"\n"):this._isCopyingDown?t.addEditOperation(new tO.Q(i.startLineNumber,1,i.startLineNumber,1),s+"\n"):t.addEditOperation(new tO.Q(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+s),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(0!==this._startLineNumberDelta||0!==this._endLineNumberDelta){let e=i.startLineNumber,t=i.startColumn,n=i.endLineNumber,s=i.endColumn;0!==this._startLineNumberDelta&&(e+=this._startLineNumberDelta,t=1),0!==this._endLineNumberDelta&&(n+=this._endLineNumberDelta,s=1),i=tk.L.createWithDirection(e,t,n,s,this._selectionDirection)}return i}}var _7=i(62450),_9=i(15254);let _8=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let i=()=>e.getLanguageId(),n=(t,i)=>e.getLanguageIdAtPosition(t,i),s=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===s||!this._isMovingDown&&1===this._selection.startLineNumber){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let o=this._selection;o.startLineNumber<o.endLineNumber&&1===o.endColumn&&(this._moveEndPositionDown=!0,o=o.setEndPosition(o.endLineNumber-1,e.getLineMaxColumn(o.endLineNumber-1)));let{tabSize:r,indentSize:a,insertSpaces:l}=e.getOptions(),h=this.buildIndentConverter(r,a,l);if(o.startLineNumber===o.endLineNumber&&1===e.getLineMaxColumn(o.startLineNumber)){let i=o.startLineNumber,n=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(n)?t.addEditOperation(new tO.Q(1,1,1,1),null):(t.addEditOperation(new tO.Q(i,1,i,1),e.getLineContent(n)),t.addEditOperation(new tO.Q(n,1,n,e.getLineMaxColumn(n)),null)),o=new tk.L(n,1,n,1)}else{let s,a;if(this._isMovingDown){s=o.endLineNumber+1,a=e.getLineContent(s),t.addEditOperation(new tO.Q(s-1,e.getLineMaxColumn(s-1),s,e.getLineMaxColumn(s)),null);let d=a;if(this.shouldAutoIndent(e,o)){let c=this.matchEnterRule(e,h,r,s,o.startLineNumber-1);if(null!==c)d=_N(c+_I(iE.UU(e.getLineContent(s)),r),r,l)+this.trimStart(a);else{let t=(0,_E.$f)(this._autoIndent,{tokenization:{getLineTokens:t=>t===o.startLineNumber?e.tokenization.getLineTokens(s):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o.startLineNumber?e.getLineContent(s):e.getLineContent(t)},e.getLanguageIdAtPosition(s,1),o.startLineNumber,h,this._languageConfigurationService);if(null!==t){let i=iE.UU(e.getLineContent(s)),n=_I(t,r);n!==_I(i,r)&&(d=_N(n,r,l)+this.trimStart(a))}}t.addEditOperation(new tO.Q(o.startLineNumber,1,o.startLineNumber,1),d+"\n");let u=this.matchEnterRuleMovingDown(e,h,r,o.startLineNumber,s,d);if(null!==u)0!==u&&this.getIndentEditsOfMovingBlock(e,t,o,r,l,u);else{let a=(0,_E.$f)(this._autoIndent,{tokenization:{getLineTokens:t=>t===o.startLineNumber?e.tokenization.getLineTokens(s):t>=o.startLineNumber+1&&t<=o.endLineNumber+1?e.tokenization.getLineTokens(t-1):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o.startLineNumber?d:t>=o.startLineNumber+1&&t<=o.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)},e.getLanguageIdAtPosition(s,1),o.startLineNumber+1,h,this._languageConfigurationService);if(null!==a){let i=iE.UU(e.getLineContent(o.startLineNumber)),n=_I(a,r),s=_I(i,r);n!==s&&this.getIndentEditsOfMovingBlock(e,t,o,r,l,n-s)}}}else t.addEditOperation(new tO.Q(o.startLineNumber,1,o.startLineNumber,1),d+"\n")}else if(s=o.startLineNumber-1,a=e.getLineContent(s),t.addEditOperation(new tO.Q(s,1,s+1,1),null),t.addEditOperation(new tO.Q(o.endLineNumber,e.getLineMaxColumn(o.endLineNumber),o.endLineNumber,e.getLineMaxColumn(o.endLineNumber)),"\n"+a),this.shouldAutoIndent(e,o)){let a=this.matchEnterRule(e,h,r,o.startLineNumber,o.startLineNumber-2);if(null!==a)0!==a&&this.getIndentEditsOfMovingBlock(e,t,o,r,l,a);else{let a=(0,_E.$f)(this._autoIndent,{tokenization:{getLineTokens:t=>t===s?e.tokenization.getLineTokens(o.startLineNumber):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===s?e.getLineContent(o.startLineNumber):e.getLineContent(t)},e.getLanguageIdAtPosition(o.startLineNumber,1),s,h,this._languageConfigurationService);if(null!==a){let i=iE.UU(e.getLineContent(o.startLineNumber)),n=_I(a,r),s=_I(i,r);n!==s&&this.getIndentEditsOfMovingBlock(e,t,o,r,l,n-s)}}}}this._selectionId=t.trackSelection(o)}buildIndentConverter(e,t,i){return{shiftIndent:n=>_D.Y.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>_D.Y.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let o=s.indentation;s.indentAction===_7.l.None||s.indentAction===_7.l.Indent?o=s.indentation+s.appendText:s.indentAction===_7.l.IndentOutdent?o=s.indentation:s.indentAction===_7.l.Outdent&&(o=t.unshiftIndent(s.indentation)+s.appendText);let r=e.getLineContent(n);if(this.trimStart(r).indexOf(this.trimStart(o))>=0){let s=iE.UU(e.getLineContent(n)),r=iE.UU(o),a=(0,_E.Yb)(e,n,this._languageConfigurationService);return null!==a&&2&a&&(r=t.unshiftIndent(r)),_I(r,i)-_I(s,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,s,o){if(iE.lT(o)>=0){let o=e.getLineMaxColumn(s),r=(0,_9.h)(this._autoIndent,e,new tO.Q(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let s=n-1;for(;s>=1;){let t=e.getLineContent(s);if(iE.lT(t)>=0)break;s--}if(s<1||n>e.getLineCount())return null;let o=e.getLineMaxColumn(s),r=(0,_9.h)(this._autoIndent,e,new tO.Q(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,s,o){let r=s;for(;r>=1;){let t;if(t=r===s&&void 0!==o?o:e.getLineContent(r),iE.lT(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;let a=e.getLineMaxColumn(r),l=(0,_9.h)(this._autoIndent,e,new tO.Q(r,a,r,a),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,l)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;let i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,s,o){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){let a=e.getLineContent(r),l=iE.UU(a),h=_N(_I(l,n)+o,n,s);h!==l&&(t.addEditOperation(new tO.Q(r,1,r,l.length+1),h),r===i.endLineNumber&&i.endColumn<=l.length+1&&""===h&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}};_8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(E=r1.JZ,function(e,t){E(e,t,3)})],_8);var _6=i(37318);class ve{static{this._COLLATOR=_6.x.Collator()}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){let i=function(e,t,i){let n=vt(e,t,i);return n?rj.k.replace(new tO.Q(n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n")):null}(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(null===e)return!1;let n=vt(e,t,i);if(!n)return!1;for(let e=0,t=n.before.length;e<t;e++)if(n.before[e]!==n.after[e])return!0;return!1}}function vt(e,t,i){let n=t.startLineNumber,s=t.endLineNumber;if(1===t.endColumn&&s--,n>=s)return null;let o=[];for(let t=n;t<=s;t++)o.push(e.getLineContent(t));let r=o.slice(0);return r.sort(ve._COLLATOR.value.compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:s,before:o,after:r}}class vi extends e6.ks{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;let i=t.getSelections().map((e,t)=>({selection:e,index:t,ignore:!1}));i.sort((e,t)=>tO.Q.compareRangesUsingStarts(e.selection,t.selection));let n=i[0];for(let e=1;e<i.length;e++){let t=i[e];n.selection.endLineNumber===t.selection.startLineNumber&&(n.index<t.index?t.ignore=!0:(n.ignore=!0,n=t))}let s=[];for(let e of i)s.push(new _3(e.selection,this.down,e.ignore));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class vn extends vi{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:tn.aS(1239,"Copy Line Up"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"2_line",title:tn.kg(1234,"&&Copy Line Up"),order:1}})}}class vs extends vi{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:tn.aS(1240,"Copy Line Down"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"2_line",title:tn.kg(1235,"Co&&py Line Down"),order:2}})}}class vo extends e6.ks{constructor(){super({id:"editor.action.duplicateSelection",label:tn.aS(1241,"Duplicate Selection"),precondition:ti.R.writable,menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"2_line",title:tn.kg(1236,"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;let n=[],s=t.getSelections(),o=t.getModel();for(let e of s)if(e.isEmpty())n.push(new _3(e,!0));else{let t=new tk.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn);n.push(new tQ.tA(t,o.getValueInRange(e)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class vr extends e6.ks{constructor(e,t){super(t),this.down=e}run(e,t){let i=e.get(r1.JZ),n=[],s=t.getSelections()||[],o=t.getOption(16);for(let e of s)n.push(new _8(e,this.down,o,i));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class va extends vr{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:tn.aS(1242,"Move Line Up"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"2_line",title:tn.kg(1237,"Mo&&ve Line Up"),order:3}})}}class vl extends vr{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:tn.aS(1243,"Move Line Down"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"2_line",title:tn.kg(1238,"Move &&Line Down"),order:4}})}}class vh extends e6.ks{constructor(e,t){super(t),this.descending=e}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=t.getSelections();for(let e of(1===n.length&&n[0].isEmpty()&&(n=[new tk.L(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))]),n))if(!ve.canRun(t.getModel(),e,this.descending))return;let s=[];for(let e=0,t=n.length;e<t;e++)s[e]=new ve(n[e],this.descending);t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class vd extends vh{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:tn.aS(1244,"Sort Lines Ascending"),precondition:ti.R.writable})}}class vc extends vh{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:tn.aS(1245,"Sort Lines Descending"),precondition:ti.R.writable})}}class vu extends e6.ks{constructor(){super({id:"editor.action.removeDuplicateLines",label:tn.aS(1246,"Delete Duplicate Lines"),precondition:ti.R.writable})}run(e,t){if(!t.hasModel())return;let i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;let n=[],s=[],o=0,r=!0,a=t.getSelections();for(let e of(1===a.length&&a[0].isEmpty()&&(a=[new tk.L(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))],r=!1),a)){let t=new Set,r=[];for(let n=e.startLineNumber;n<=e.endLineNumber;n++){let e=i.getLineContent(n);t.has(e)||(r.push(e),t.add(e))}let a=new tk.L(e.startLineNumber,1,e.endLineNumber,i.getLineMaxColumn(e.endLineNumber)),l=e.startLineNumber-o,h=new tk.L(l,1,l+r.length-1,r[r.length-1].length);n.push(rj.k.replace(a,r.join("\n"))),s.push(h),o+=e.endLineNumber-e.startLineNumber+1-r.length}t.pushUndoStop(),t.executeEdits(this.id,n,r?s:void 0),t.pushUndoStop()}}class vg extends e6.ks{constructor(){super({id:"editor.action.reverseLines",label:tn.aS(1247,"Reverse lines"),precondition:ti.R.writable})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=t.getSelections(),s=n;1===s.length&&s[0].isEmpty()&&(s=[new tk.L(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))]);let o=[],r=[];for(let e=0;e<s.length;e++){let t=s[e],a=n[e],l=t.endLineNumber;t.startLineNumber<t.endLineNumber&&1===t.endColumn&&l--;let h=new tO.Q(t.startLineNumber,1,l,i.getLineMaxColumn(l));l===i.getLineCount()&&""===i.getLineContent(h.endLineNumber)&&(h=h.setEndPosition(h.endLineNumber-1,i.getLineMaxColumn(h.endLineNumber-1)));let d=[];for(let e=h.endLineNumber;e>=h.startLineNumber;e--)d.push(i.getLineContent(e));let c=rj.k.replace(h,d.join("\n"));o.push(c);let u=function(e){return e<=h.endLineNumber?h.endLineNumber-e+h.startLineNumber:e};r.push(function(e){if(e.isEmpty())return new tk.L(u(e.positionLineNumber),e.positionColumn,u(e.positionLineNumber),e.positionColumn);{let t=u(e.selectionStartLineNumber),i=u(e.positionLineNumber),n=e.selectionStartColumn,s=e.positionColumn;return new tk.L(t,n,i,s)}}(a))}t.pushUndoStop(),t.executeEdits(this.id,o,r),t.pushUndoStop()}}class vp extends e6.ks{static{this.ID="editor.action.trimTrailingWhitespace"}constructor(){super({id:vp.ID,label:tn.aS(1248,"Trim Trailing Whitespace"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:(0,tS.m5)(2089,2102),weight:100}})}run(e,t,i){let n=[];"auto-save"===i.reason&&(n=(t.getSelections()||[]).map(e=>new tR.y(e.positionLineNumber,e.positionColumn)));let s=t.getSelection();if(null===s)return;let o=e.get(to.pG),r=t.getModel(),a=new _2(s,n,o.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:r?.getLanguageId(),resource:r?.uri}));t.pushUndoStop(),t.executeCommands(this.id,[a]),t.pushUndoStop()}}class vm extends e6.ks{constructor(){super({id:"editor.action.deleteLines",label:tn.aS(1249,"Delete Line"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let s=0,o=[],r=[];for(let e=0,t=i.length;e<t;e++){let t=i[e],a=t.startLineNumber,l=t.endLineNumber,h=1,d=n.getLineMaxColumn(l);l<n.getLineCount()?(l+=1,d=1):a>1&&(a-=1,h=n.getLineMaxColumn(a)),o.push(rj.k.replace(new tk.L(a,h,l,d),"")),r.push(new tk.L(a-s,t.positionColumn,a-s,t.positionColumn)),s+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,r),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(e=>{let t=e.endLineNumber;return e.startLineNumber<e.endLineNumber&&1===e.endColumn&&(t-=1),{startLineNumber:e.startLineNumber,selectionStartColumn:e.selectionStartColumn,endLineNumber:t,positionColumn:e.positionColumn}});t.sort((e,t)=>e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber);let i=[],n=t[0];for(let e=1;e<t.length;e++)n.endLineNumber+1>=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class vf extends e6.ks{constructor(){super({id:"editor.action.indentLines",label:tn.aS(1250,"Indent Line"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:2142,weight:100}})}run(e,t){let i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,_5.T.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class v_ extends e6.ks{constructor(){super({id:"editor.action.outdentLines",label:tn.aS(1251,"Outdent Line"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:2140,weight:100}})}run(e,t){e3.Yh.Outdent.runEditorCommand(e,t,null)}}class vv extends e6.ks{constructor(){super({id:"editor.action.insertLineBefore",label:tn.aS(1252,"Insert Line Above"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:3075,weight:100}})}run(e,t){let i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,_4.AO.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class vb extends e6.ks{constructor(){super({id:"editor.action.insertLineAfter",label:tn.aS(1253,"Insert Line Below"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:2051,weight:100}})}run(e,t){let i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,_4.AO.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class vC extends e6.ks{run(e,t){if(!t.hasModel())return;let i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let e=0,t=n.length-1;e<t;e++){let t=n[e],i=n[e+1];null===tO.Q.intersectRanges(t,i)?s.push(t):n[e+1]=tO.Q.plusRange(t,i)}s.push(n[n.length-1]);let o=this._getEndCursorState(i,s),r=s.map(e=>rj.k.replace(e,""));t.pushUndoStop(),t.executeEdits(this.id,r,o),t.pushUndoStop()}}class vw extends vC{constructor(){super({id:"deleteAllLeft",label:tn.aS(1254,"Delete All Left"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null,n=[],s=0;return t.forEach(t=>{let o;if(1===t.endColumn&&s>0){let e=t.startLineNumber-s;o=new tk.L(e,t.startColumn,e,t.startColumn)}else o=new tk.L(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);s+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=o:n.push(o)}),i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getSelections();if(null===t)return[];let i=t,n=e.getModel();return null===n?[]:(i.sort(tO.Q.compareRangesUsingStarts),i=i.map(e=>{if(!e.isEmpty())return new tO.Q(e.startLineNumber,1,e.endLineNumber,e.endColumn);if(1!==e.startColumn)return new tO.Q(e.startLineNumber,1,e.startLineNumber,e.startColumn);{let t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineLength(t)+1;return new tO.Q(t,i,e.startLineNumber,1)}}))}}class vy extends vC{constructor(){super({id:"deleteAllRight",label:tn.aS(1255,"Delete All Right"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null,n=[];for(let s=0,o=t.length;s<o;s++){let o=t[s],r=new tk.L(o.startLineNumber-0,o.startColumn,o.startLineNumber-0,o.startColumn);o.intersectRanges(e)?i=r:n.push(r)}return i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getModel();if(null===t)return[];let i=e.getSelections();if(null===i)return[];let n=i.map(e=>{if(e.isEmpty()){let i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new tO.Q(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new tO.Q(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e});return n.sort(tO.Q.compareRangesUsingStarts),n}}class vS extends e6.ks{constructor(){super({id:"editor.action.joinLines",label:tn.aS(1256,"Join Lines"),precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(tO.Q.compareRangesUsingStarts);let s=[],o=i.reduce((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(s.push(e),t):new tk.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(s.push(e),t):new tk.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn));s.push(o);let r=t.getModel();if(null===r)return;let a=[],l=[],h=n,d=0;for(let e=0,t=s.length;e<t;e++){let t,i,o=s[e],c=o.startLineNumber,u=0,g=r.getLineLength(o.endLineNumber)-o.endColumn;if(o.isEmpty()||o.startLineNumber===o.endLineNumber){let e=o.getStartPosition();e.lineNumber<r.getLineCount()?(t=c+1,i=r.getLineMaxColumn(t)):(t=e.lineNumber,i=r.getLineMaxColumn(e.lineNumber))}else t=o.endLineNumber,i=r.getLineMaxColumn(t);let p=r.getLineContent(c);for(let e=c+1;e<=t;e++){let t=r.getLineContent(e),i=r.getLineFirstNonWhitespaceColumn(e);if(i>=1){let e=!0;""===p&&(e=!1),e&&(" "===p.charAt(p.length-1)||" "===p.charAt(p.length-1))&&(e=!1,p=p.replace(/[\s\uFEFF\xA0]+$/g," "));let n=t.substr(i-1);p+=(e?" ":"")+n,u=e?n.length+1:n.length}else u=0}let m=new tO.Q(c,1,t,i);if(!m.isEmpty()){let e;o.isEmpty()?(a.push(rj.k.replace(m,p)),e=new tk.L(m.startLineNumber-d,p.length-u+1,c-d,p.length-u+1)):o.startLineNumber===o.endLineNumber?(a.push(rj.k.replace(m,p)),e=new tk.L(o.startLineNumber-d,o.startColumn,o.endLineNumber-d,o.endColumn)):(a.push(rj.k.replace(m,p)),e=new tk.L(o.startLineNumber-d,o.startColumn,o.startLineNumber-d,p.length-g)),null!==tO.Q.intersectRanges(m,n)?h=e:l.push(e)}d+=m.endLineNumber-m.startLineNumber}l.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}class vk extends e6.ks{constructor(){super({id:"editor.action.transpose",label:tn.aS(1257,"Transpose Characters around the Cursor"),precondition:ti.R.writable})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let s=[];for(let e=0,t=i.length;e<t;e++){let t=i[e];if(!t.isEmpty())continue;let o=t.getStartPosition(),r=n.getLineMaxColumn(o.lineNumber);if(o.column>=r){if(o.lineNumber===n.getLineCount())continue;let e=new tO.Q(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");s.push(new tQ.iu(new tk.L(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t))}else{let e=new tO.Q(o.lineNumber,Math.max(1,o.column-1),o.lineNumber,o.column+1),t=n.getValueInRange(e).split("").reverse().join("");s.push(new tQ.ui(e,t,new tk.L(o.lineNumber,o.column+1,o.lineNumber,o.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class vx extends e6.ks{run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let s=t.getOption(148),o=[];for(let e of i)if(e.isEmpty()){let i=e.getStartPosition(),r=t.getConfiguredWordAtPosition(i);if(!r)continue;let a=new tO.Q(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),l=n.getValueInRange(a);o.push(rj.k.replace(a,this._modifyText(l,s)))}else{let t=n.getValueInRange(e);o.push(rj.k.replace(e,this._modifyText(t,s)))}t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop()}}class vL extends vx{constructor(){super({id:"editor.action.transformToUppercase",label:tn.aS(1258,"Transform to Uppercase"),precondition:ti.R.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class vD extends vx{constructor(){super({id:"editor.action.transformToLowercase",label:tn.aS(1259,"Transform to Lowercase"),precondition:ti.R.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class vI{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class vN extends vx{static{this.titleBoundary=new vI("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu")}constructor(){super({id:"editor.action.transformToTitlecase",label:tn.aS(1260,"Transform to Title Case"),precondition:ti.R.writable})}_modifyText(e,t){let i=vN.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,e=>e.toLocaleUpperCase()):e}}class vE extends vx{static{this.caseBoundary=new vI("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new vI("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu")}constructor(){super({id:"editor.action.transformToSnakecase",label:tn.aS(1261,"Transform to Snake Case"),precondition:ti.R.writable})}_modifyText(e,t){let i=vE.caseBoundary.get(),n=vE.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}class vM extends vx{static{this.singleLineWordBoundary=new vI("[_\\s-]+","gm")}static{this.multiLineWordBoundary=new vI("[_-]+","gm")}static{this.validWordStart=new vI("^(\\p{Lu}[^\\p{Lu}])","gmu")}constructor(){super({id:"editor.action.transformToCamelcase",label:tn.aS(1262,"Transform to Camel Case"),precondition:ti.R.writable})}_modifyText(e,t){let i=/\r\n|\r|\n/.test(e)?vM.multiLineWordBoundary.get():vM.singleLineWordBoundary.get(),n=vM.validWordStart.get();if(!i||!n)return e;let s=e.split(i);return s.shift()?.replace(n,e=>e.toLocaleLowerCase())+s.map(e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1)).join("")}}class vT extends vx{static{this.wordBoundary=new vI("[_ \\t-]","gm")}static{this.wordBoundaryToMaintain=new vI("(?<=\\.)","gm")}constructor(){super({id:"editor.action.transformToPascalcase",label:tn.aS(1263,"Transform to Pascal Case"),precondition:ti.R.writable})}_modifyText(e,t){let i=vT.wordBoundary.get(),n=vT.wordBoundaryToMaintain.get();return i&&n?e.split(n).map(e=>e.split(i)).flat().map(e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1)).join(""):e}}class vR extends vx{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(e=>e.isSupported())}static{this.caseBoundary=new vI("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new vI("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu")}static{this.underscoreBoundary=new vI("(\\S)(_)(\\S)","gm")}constructor(){super({id:"editor.action.transformToKebabcase",label:tn.aS(1264,"Transform to Kebab Case"),precondition:ti.R.writable})}_modifyText(e,t){let i=vR.caseBoundary.get(),n=vR.singleLetters.get(),s=vR.underscoreBoundary.get();return i&&n&&s?e.replace(s,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}(0,e6.Fl)(vn),(0,e6.Fl)(vs),(0,e6.Fl)(vo),(0,e6.Fl)(va),(0,e6.Fl)(vl),(0,e6.Fl)(vd),(0,e6.Fl)(vc),(0,e6.Fl)(vu),(0,e6.Fl)(vp),(0,e6.Fl)(vm),(0,e6.Fl)(vf),(0,e6.Fl)(v_),(0,e6.Fl)(vv),(0,e6.Fl)(vb),(0,e6.Fl)(vw),(0,e6.Fl)(vy),(0,e6.Fl)(vS),(0,e6.Fl)(vk),(0,e6.Fl)(vL),(0,e6.Fl)(vD),(0,e6.Fl)(vg),vE.caseBoundary.isSupported()&&vE.singleLetters.isSupported()&&(0,e6.Fl)(vE),vM.singleLineWordBoundary.isSupported()&&vM.multiLineWordBoundary.isSupported()&&(0,e6.Fl)(vM),vT.wordBoundary.isSupported()&&(0,e6.Fl)(vT),vN.titleBoundary.isSupported()&&(0,e6.Fl)(vN),vR.isSupported()&&(0,e6.Fl)(vR),i(94191);var vO=function(e,t){return function(i,n){t(i,n,e)}};let vP=new tr.N1("LinkedEditingInputVisible",!1),vA=class extends tT.jG{static{eH=this}static{this.ID="editor.contrib.linkedEditing"}static{this.DECORATION=tA.kI.register({description:"linked-editing",stickiness:0,className:"linked-editing-decoration"})}static get(e){return e.getContribution(eH.ID)}constructor(e,t,i,n,s){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new tT.Cm),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=vP.bindTo(t),this._debounceInformation=s.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new tT.Cm),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(e=>{(e.hasChanged(78)||e.hasChanged(106))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){let t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(78)||this._editor.getOption(106))&&this._providers.has(t);if(i===this._enabled&&!e||(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t))return;this._localToDispose.add(iA.Jh.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));let n=new tM.ve(this._debounceInformation.get(t)),s=()=>{this._rangeUpdateTriggerPromise=n.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(t))},o=new tM.ve(0),r=e=>{this._rangeSyncTriggerPromise=o.trigger(()=>this._syncRanges(e))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{s()})),this._localToDispose.add(this._editor.onDidChangeModelContent(e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){let t=this._currentDecorations.getRange(0);if(t&&e.changes.every(e=>t.intersectRanges(e.range)))return void r(this._syncRangesToken)}s()})),this._localToDispose.add({dispose:()=>{n.dispose(),o.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;let t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();let n=t.getValueInRange(i);if(this._currentWordPattern){let e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}let s=[];for(let e=1,i=this._currentDecorations.length;e<i;e++){let i=this._currentDecorations.getRange(e);if(i)if(i.startLineNumber!==i.endLineNumber)s.push({range:i,text:n});else{let e=t.getValueInRange(i),o=n,r=i.startColumn,a=i.endColumn,l=iE.Qp(e,o);r+=l,e=e.substr(l),o=o.substr(l);let h=iE.Vi(e,o);a-=h,e=e.substr(0,e.length-h),o=o.substr(0,o.length-h),(r!==a||0!==o.length)&&s.push({range:new tO.Q(i.startLineNumber,r,i.endLineNumber,a),text:o})}}if(0!==s.length)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;let e=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",s),this._editor._getViewModel().setPrevEditOperationType(e)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequestCts&&(this._currentRequestCts.cancel(),this._currentRequestCts=null,this._currentRequestPosition=null)}async updateRanges(e=!1){if(!this._editor.hasModel())return void this.clearRanges();let t=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1)return void this.clearRanges();let i=this._editor.getModel(),n=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){let e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(t))return}}if(!this._currentRequestPosition?.equals(t)){let e=this._currentDecorations.getRange(0);e?.containsPosition(t)||this.clearRanges()}this._currentRequestPosition=t,this._currentRequestModelVersion=n;let s=this._currentRequestCts=new t6.Qi;try{let e=new t0.W(!1),o=await vW(this._providers,i,t,s.token);if(this._debounceInformation.update(i,e.elapsed()),s!==this._currentRequestCts||(this._currentRequestCts=null,n!==i.getVersionId()))return;let r=[];o?.ranges&&(r=o.ranges),this._currentWordPattern=o?.wordPattern||this._languageWordPattern;let a=!1;for(let e=0,i=r.length;e<i;e++)if(tO.Q.containsPosition(r[e],t)){if(a=!0,0!==e){let t=r[e];r.splice(e,1),r.unshift(t)}break}if(!a)return void this.clearRanges();let l=r.map(e=>({range:e,options:eH.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(l),this._syncRangesToken++}catch(e){(0,ih.MB)(e)||(0,ih.dz)(e),this._currentRequestCts!==s&&this._currentRequestCts||this.clearRanges()}}};vA=eH=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([vO(1,tr.fN),vO(2,iI.u),vO(3,r1.JZ),vO(4,s9.U)],vA);class vF extends e6.ks{constructor(){super({id:"editor.action.linkedEditing",label:tn.aS(1266,"Start Linked Editing"),precondition:tr.M$.and(ti.R.writable,ti.R.hasRenameProvider),kbOpts:{kbExpr:ti.R.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){let i=e.get(te.T),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return i_.r.isUri(n)&&tR.y.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(e=>{e&&(e.setPosition(s),e.invokeWithinContext(t=>(this.reportTelemetry(t,e),this.run(t,e))))},ih.dz):super.runCommand(e,t)}run(e,t){let i=vA.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}let vB=e6.DX.bindToContribution(vA.get);function vW(e,t,i,n){let s=e.ordered(t);return(0,tM.$1)(s.map(e=>async()=>{try{return await e.provideLinkedEditingRanges(t,i,n)}catch(e){(0,ih.M_)(e);return}}),e=>!!e&&t8.EI(e?.ranges))}(0,e6.E_)(new vB({id:"cancelLinkedEditingInput",precondition:vP,handler:e=>e.clearRanges(),kbOpts:{kbExpr:ti.R.editorTextFocus,weight:199,primary:9,secondary:[1033]}})),(0,tF.x1A)("editor.linkedEditingBackground",{dark:oo.Q1.fromHex("#f00").transparent(.3),light:oo.Q1.fromHex("#f00").transparent(.3),hcDark:oo.Q1.fromHex("#f00").transparent(.3),hcLight:oo.Q1.white},tn.kg(1265,"Background color when the editor auto renames on type.")),(0,e6.ke)("_executeLinkedEditingProvider",(e,t,i)=>{let{linkedEditingRangeProvider:n}=e.get(iI.u);return vW(n,t,i,t6.XO.None)}),(0,e6.HW)(vA.ID,vA,1),(0,e6.Fl)(vF),i(41667);class vH{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url)?this.resolve(e):Promise.reject(Error("missing"))):Promise.reject(Error("missing"))}}class vV{static{this.Empty=new vV([])}constructor(e){this._disposables=new tT.Cm;let t=[];for(let[i,n]of e){let e=i.links.map(e=>new vH(e,n));t=vV._union(t,e),(0,tT.Xm)(i)&&(this._disposables??=new tT.Cm,this._disposables.add(i))}this.links=t}dispose(){this._disposables?.dispose(),this.links.length=0}static _union(e,t){let i,n,s,o,r=[];for(i=0,s=0,n=e.length,o=t.length;i<n&&s<o;){let n=e[i],o=t[s];if(tO.Q.areIntersectingOrTouching(n.range,o.range)){i++;continue}0>tO.Q.compareRangesUsingStarts(n.range,o.range)?(r.push(n),i++):(r.push(o),s++)}for(;i<n;i++)r.push(e[i]);for(;s<o;s++)r.push(t[s]);return r}}async function vz(e,t,i){let n=[],s=e.ordered(t).reverse().map(async(e,s)=>{try{let o=await e.provideLinks(t,i);o&&(n[s]=[o,e])}catch(e){(0,ih.M_)(e)}});await Promise.all(s);let o=new vV((0,t8.Yc)(n));return i.isCancellationRequested&&(o.dispose(),o=vV.Empty),o}tC.w.registerCommand("_executeLinkProvider",async(e,...t)=>{let[i,n]=t;(0,iu.j)(i instanceof i_.r),"number"!=typeof n&&(n=0);let{linkProvider:s}=e.get(iI.u),o=e.get(n3.S).getModel(i);if(!o)return[];let r=await vz(s,o,t6.XO.None);if(!r)return[];for(let e=0;e<Math.min(n,r.links.length);e++)await r.links[e].resolve(t6.XO.None);let a=r.links.slice(0);return r.dispose(),a});var vU=function(e,t){return function(i,n){t(i,n,e)}};let vj=class extends tT.jG{static{eV=this}static{this.ID="editor.linkDetector"}static get(e){return e.getContribution(eV.ID)}constructor(e,t,i,n,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=n,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new tM.uC(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;let o=this._register(new rQ(e));this._register(o.onMouseMoveOrRelevantKeyDown(([e,t])=>{this._onEditorMouseMove(e,t)})),this._register(o.onExecute(e=>{this.onEditorMouseUp(e)})),this._register(o.onCancel(e=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(e=>{e.hasChanged(79)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(e=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(e=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(79))return;let e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,tM.SS)(t=>vz(this.providers,e,t));try{let t=new t0.W(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(e){(0,ih.dz)(e)}finally{this.computePromise=null}}}updateDecorations(e){let t="altKey"===this.editor.getOption(86),i=[];for(let e of Object.keys(this.currentOccurrences)){let t=this.currentOccurrences[e];i.push(t.decorationId)}let n=[];if(e)for(let i of e)n.push(vK.decoration(i,t));this.editor.changeDecorations(t=>{let s=t.deltaDecorations(i,n);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let t=0,i=s.length;t<i;t++){let i=new vK(e[t],s[t]);this.currentOccurrences[i.decorationId]=i}})}_onEditorMouseMove(e,t){let i="altKey"===this.editor.getOption(86);if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();let t=this.getLinkOccurrence(e.target.position);t&&this.editor.changeDecorations(e=>{t.activate(e,i),this.activeLinkDecorationId=t.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){let e="altKey"===this.editor.getOption(86);if(this.activeLinkDecorationId){let t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(i=>{t.deactivate(i,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;let t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;let{link:n}=e;n.resolve(t6.XO.None).then(e=>{if("string"==typeof e&&this.editor.hasModel()){let t=this.editor.getModel().uri;if(t.scheme===iU.ny.file&&e.startsWith(`${iU.ny.file}:`)){let i=i_.r.parse(e);if(i.scheme===iU.ny.file){let n=ij.su(i),s=null;n.startsWith("/./")||n.startsWith("\\.\\")?s=`.${n.substr(1)}`:(n.startsWith("//./")||n.startsWith("\\\\.\\"))&&(s=`.${n.substr(2)}`),s&&(e=ij.uJ(t,s))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},e=>{let t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(tn.kg(1267,"Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(tn.kg(1268,"Failed to open this link because its target is missing.")):(0,ih.dz)(e)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;for(let t of this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0)){let e=this.currentOccurrences[t.id];if(e)return e}return null}isEnabled(e,t){return!!(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey||e.isMiddleClick&&"openLink"===e.mouseMiddleClickAction))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};vj=eV=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([vU(1,iB.Cr),vU(2,nA.Ot),vU(3,iI.u),vU(4,s9.U)],vj);let v$={general:tA.kI.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:tA.kI.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class vK{static decoration(e,t){return{range:e.range,options:vK._getOptions(e,t,!1)}}static _getOptions(e,t,i){let n={...i?v$.active:v$.general};return n.hoverMessage=function(e,t){let i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?tn.kg(1269,"Execute command"):tn.kg(1270,"Follow link"),s=t?tJ.zx?tn.kg(1271,"cmd + click"):tn.kg(1272,"ctrl + click"):tJ.zx?tn.kg(1273,"option + click"):tn.kg(1274,"alt + click");if(!e.url)return new ty.Bc().appendText(`${n} (${s})`);{let t="";if(/^command:/i.test(e.url.toString())){let i=e.url.toString().match(/^command:([^?#]+)/);if(i){let e=i[1];t=tn.kg(1275,"Execute command {0}",e)}}return new ty.Bc("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${s})`)}}(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,vK._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,vK._getOptions(this.link,t,!1))}}class vG extends e6.ks{constructor(){super({id:"editor.action.openLink",label:tn.aS(1276,"Open Link"),precondition:void 0})}run(e,t){let i=vj.get(t);if(i&&t.hasModel())for(let e of t.getSelections()){let t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,e6.HW)(vj.ID,vj,1),(0,e6.Fl)(vG);class vq extends tT.jG{static{this.ID="editor.contrib.longLinesHelper"}constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(e=>{let t=this._editor.getOption(133);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}(0,e6.HW)(vq.ID,vq,2);var vQ=i(72150);i(22127);class vY extends tT.jG{static{this.ID="editor.contrib.middleScroll"}constructor(e){super(),this._editor=e;let t=(0,an.U)(this._editor),i=t.getOption(171);this._register((0,oM.fm)(e=>{if(!i.read(e))return;let n=t.domNode.read(e);if(!n)return;let s=e.store.add((0,oM.X2)("scrollingSession",void 0));e.store.add(this._editor.onMouseDown(e=>{if(s.read(void 0))return void s.set(void 0,void 0);if(!e.event.middleButton)return;e.event.stopPropagation(),e.event.preventDefault();let t=new tT.Cm,i=new pK.b(e.event.posx,e.event.posy),o=(function(e,t,i){let n=(0,oM.FY)("pos",t);return i.add((0,e8.ko)(e,"mousemove",e=>{n.set(new pK.b(e.pageX,e.pageY),void 0)})),n})((0,e8.zk)(n),i,t).map(e=>e.subtract(i).withThreshold(5)),r=n.getBoundingClientRect(),a=new pK.b(i.x-r.left,i.y-r.top);s.set({mouseDeltaAfterThreshold:o,initialMousePosInEditor:a,didScroll:!1,dispose:()=>t.dispose()},void 0),t.add(this._editor.onMouseUp(e=>{let t=s.read(void 0);t&&t.didScroll&&s.set(void 0,void 0)})),t.add(this._editor.onKeyDown(e=>{s.set(void 0,void 0)}))})),e.store.add((0,oM.fm)(e=>{let t=s.read(e);if(!t)return;let i=Date.now();e.store.add((0,oM.fm)(e=>{uA.instance.invalidateOnNextAnimationFrame(e);let n=Date.now(),s=n-i;i=n;let o=t.mouseDeltaAfterThreshold.read(void 0).scale(s/32),r=new pK.b(this._editor.getScrollLeft(),this._editor.getScrollTop());this._editor.setScrollPosition(function(e){return{scrollLeft:e.x,scrollTop:e.y}}(r.add(o))),o.isZero()||(t.didScroll=!0)}));let o=(0,oM.un)(e=>{let i=t.mouseDeltaAfterThreshold.read(e),n="";return n+((i.y<0?"n":i.y>0?"s":"")+(i.x<0?"w":i.x>0?"e":""))});e.store.add((0,oM.fm)(e=>{n.setAttribute("data-scroll-direction",o.read(e))}))}));let o=e.store.add(e8.n.div({class:["scroll-editor-on-middle-click-dot",s.map(e=>e?"":"hidden")],style:{left:s.map(e=>e?e.initialMousePosInEditor.x:0),top:s.map(e=>e?e.initialMousePosInEditor.y:0)}}).toDisposableLiveElement());e.store.add((0,vQ.rX)(n,o.element)),e.store.add((0,oM.fm)(e=>{let t=s.read(e);n.classList.toggle("scroll-editor-on-middle-click-editor",!!t)}))}))}}(0,e6.HW)(vY.ID,vY,2),i(59963);let vZ=(0,tF.x1A)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},tn.kg(1548,"Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);(0,tF.x1A)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},tn.kg(1549,"Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),(0,tF.x1A)("editor.wordHighlightTextBackground",vZ,tn.kg(1550,"Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);let vX=(0,tF.x1A)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:tF.buw,hcLight:tF.buw},tn.kg(1551,"Border color of a symbol during read-access, like reading a variable."));(0,tF.x1A)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:tF.buw,hcLight:tF.buw},tn.kg(1552,"Border color of a symbol during write-access, like writing to a variable.")),(0,tF.x1A)("editor.wordHighlightTextBorder",vX,tn.kg(1553,"Border color of a textual occurrence for a symbol."));let vJ=(0,tF.x1A)("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",tn.kg(1554,"Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),v0=(0,tF.x1A)("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",tn.kg(1555,"Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),v1=(0,tF.x1A)("editorOverviewRuler.wordHighlightTextForeground",tF.z5H,tn.kg(1556,"Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),v2=tA.kI.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,tB.Yf)(v0),position:tP.A5.Center},minimap:{color:(0,tB.Yf)(tF.Xp1),position:1}}),v5=tA.kI.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,tB.Yf)(v1),position:tP.A5.Center},minimap:{color:(0,tB.Yf)(tF.Xp1),position:1}}),v4=tA.kI.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,tB.Yf)(tF.z5H),position:tP.A5.Center},minimap:{color:(0,tB.Yf)(tF.Xp1),position:1}}),v3=tA.kI.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),v7=tA.kI.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,tB.Yf)(vJ),position:tP.A5.Center},minimap:{color:(0,tB.Yf)(tF.Xp1),position:1}});function v9(e,t){let i=t.filter(t=>!e.find(e=>e.equals(t)));if(i.length>=1){let e=i.map(e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`).join(", "),t=1===i.length?tn.kg(1278,"Cursor added: {0}",e):tn.kg(1279,"Cursors added: {0}",e);(0,tw.h5)(t)}}(0,tB.zy)((e,t)=>{let i=e.getColor(tF.QwA);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)});class v8 extends e6.ks{constructor(){super({id:"editor.action.insertCursorAbove",label:tn.aS(1288,"Add Cursor Above"),precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"3_multi",title:tn.kg(1280,"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);let s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();let o=s.getCursorStates();s.setCursorStates(i.source,3,_0.c.addCursorUp(s,o,n)),s.revealTopMostCursor(i.source),v9(o,s.getCursorStates())}}class v6 extends e6.ks{constructor(){super({id:"editor.action.insertCursorBelow",label:tn.aS(1289,"Add Cursor Below"),precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"3_multi",title:tn.kg(1281,"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);let s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();let o=s.getCursorStates();s.setCursorStates(i.source,3,_0.c.addCursorDown(s,o,n)),s.revealBottomMostCursor(i.source),v9(o,s.getCursorStates())}}class be extends e6.ks{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:tn.aS(1290,"Add Cursors to Line Ends"),precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"3_multi",title:tn.kg(1282,"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n<e.endLineNumber;n++){let e=t.getLineMaxColumn(n);i.push(new tk.L(n,e,n,e))}e.endColumn>1&&i.push(new tk.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=t.getSelections(),s=t._getViewModel(),o=s.getCursorStates(),r=[];n.forEach(e=>this.getCursorsForSelection(e,i,r)),r.length>0&&t.setSelections(r),v9(o,s.getCursorStates())}}class bt extends e6.ks{constructor(){super({id:"editor.action.addCursorsToBottom",label:tn.aS(1291,"Add Cursors to Bottom"),precondition:void 0})}run(e,t){if(!t.hasModel())return;let i=t.getSelections(),n=t.getModel().getLineCount(),s=[];for(let e=i[0].startLineNumber;e<=n;e++)s.push(new tk.L(e,i[0].startColumn,e,i[0].endColumn));let o=t._getViewModel(),r=o.getCursorStates();s.length>0&&t.setSelections(s),v9(r,o.getCursorStates())}}class bi extends e6.ks{constructor(){super({id:"editor.action.addCursorsToTop",label:tn.aS(1292,"Add Cursors to Top"),precondition:void 0})}run(e,t){if(!t.hasModel())return;let i=t.getSelections(),n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new tk.L(e,i[0].startColumn,e,i[0].endColumn));let s=t._getViewModel(),o=s.getCursorStates();n.length>0&&t.setSelections(n),v9(o,s.getCursorStates())}}class bn{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class bs{static create(e,t){let i,n,s;if(!e.hasModel())return null;let o=t.getState();if(!e.hasTextFocus()&&o.isRevealed&&o.searchString.length>0)return new bs(e,t,!1,o.searchString,o.wholeWord,o.matchCase,null);let r=!1,a=e.getSelections();1===a.length&&a[0].isEmpty()?(r=!0,i=!0,n=!0):(i=o.wholeWord,n=o.matchCase);let l=e.getSelection(),h=null;if(l.isEmpty()){let t=e.getConfiguredWordAtPosition(l.getStartPosition());if(!t)return null;s=t.word,h=new tk.L(l.startLineNumber,t.startColumn,l.startLineNumber,t.endColumn)}else s=e.getModel().getValueInRange(l).replace(/\r\n/g,"\n");return new bs(e,t,r,s,i,n,h)}constructor(e,t,i,n,s,o,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=o,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();return e?new bn(this._editor.getSelections().concat(e),e,0):null}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new bn(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return i?new tk.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();return e?new bn(this._editor.getSelections().concat(e),e,0):null}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new bn(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return i?new tk.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();let t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,0x40000000):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,0x40000000)}}class bo extends tT.jG{static{this.ID="editor.contrib.multiCursorController"}static get(e){return e.getContribution(bo.ID)}constructor(e){super(),this._sessionDispose=this._register(new tT.Cm),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){let t=bs.create(this._editor,e);if(!t)return;this._session=t;let i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(e=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(e=>{(e.matchCase||e.wholeWord)&&this._endSession()}))}}_endSession(){this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController&&this._session.findController.getState().change({wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0},!1),this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;let i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new tk.L(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){let t=this._editor.getSelections();if(t.length>1){let i=e.getState().matchCase;if(!bm(this._editor.getModel(),t,i)){let e=this._editor.getModel(),i=[];for(let n=0,s=t.length;n<s;n++)i[n]=this._expandEmptyToWord(e,t[n]);this._editor.setSelections(i);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null,i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex){let e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(148):null,!1,0x40000000):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(148):null,!1,0x40000000)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){let e=this._editor.getSelection();for(let i=0,n=t.length;i<n;i++){let n=t[i];if(n.range.intersectRanges(e)){t[i]=t[0],t[0]=n;break}}this._setSelections(t.map(e=>new tk.L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)))}}}class br extends e6.ks{run(e,t){let i=bo.get(t);if(!i)return;let n=t._getViewModel();if(n){let s=n.getCursorStates(),o=dC.get(t);if(o)this._run(i,o);else{let n=e.get(t5._Y).createInstance(dC,t);this._run(i,n),n.dispose()}v9(s,n.getCursorStates())}}}class ba extends br{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:tn.aS(1293,"Add Selection to Next Find Match"),precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:2082,weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"3_multi",title:tn.kg(1283,"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class bl extends br{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:tn.aS(1294,"Add Selection to Previous Find Match"),precondition:void 0,menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"3_multi",title:tn.kg(1284,"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class bh extends br{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:tn.aS(1295,"Move Last Selection to Next Find Match"),precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:(0,tS.m5)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class bd extends br{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:tn.aS(1296,"Move Last Selection to Previous Find Match"),precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class bc extends br{constructor(){super({id:"editor.action.selectHighlights",label:tn.aS(1297,"Select All Occurrences of Find Match"),precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:3114,weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"3_multi",title:tn.kg(1285,"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class bu extends br{constructor(){super({id:"editor.action.changeAll",label:tn.aS(1298,"Change All Occurrences"),precondition:tr.M$.and(ti.R.writable,ti.R.editorTextFocus),kbOpts:{kbExpr:ti.R.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class bg{constructor(e,t,i,n,s){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._cachedFindMatches=null,this._modelVersionId=this._model.getVersionId(),s&&this._model===s._model&&this._searchText===s._searchText&&this._matchCase===s._matchCase&&this._wordSeparators===s._wordSeparators&&this._modelVersionId===s._modelVersionId&&(this._cachedFindMatches=s._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(tO.Q.compareRangesUsingStarts)),this._cachedFindMatches}}let bp=class extends tT.jG{static{ez=this}static{this.ID="editor.contrib.selectionHighlighter"}constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(122),this._isEnabledMultiline=e.getOption(124),this._maxLength=e.getOption(123),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new tM.uC(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(t=>{this._isEnabled=e.getOption(122),this._isEnabledMultiline=e.getOption(124),this._maxLength=e.getOption(123)})),this._register(e.onDidChangeCursorSelection(e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(e=>{this._setState(null)})),this._register(e.onDidChangeModelContent(e=>{this._isEnabled&&this.updateSoon.schedule()}));let i=dC.get(e);i&&this._register(i.getState().onFindReplaceStateChange(e=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(ez._createState(this.state,this._isEnabled,this._isEnabledMultiline,this._maxLength,this.editor))}static _createState(e,t,i,n,s){if(!t||!s.hasModel())return null;if(!i){let e=s.getSelection();if(e.startLineNumber!==e.endLineNumber)return null}let o=bo.get(s);if(!o)return null;let r=dC.get(s);if(!r)return null;let a=o.getSession(r);if(!a){let e=s.getSelections();if(e.length>1){let t=r.getState().matchCase;if(!bm(s.getModel(),e,t))return null}a=bs.create(s,r)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||n>0&&a.searchText.length>n)return null;let l=r.getState(),h=l.matchCase;if(l.isRevealed){let e=l.searchString;h||(e=e.toLowerCase());let t=a.searchText;if(h||(t=t.toLowerCase()),e===t&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new bg(s.getModel(),a.searchText,a.matchCase,a.wholeWord?s.getOption(148):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();if(!this.editor.hasModel())return;let t=this.editor.getModel();if(t.isTooLargeForTokenization())return;let i=this.state.findMatches(),n=this.editor.getSelections();n.sort(tO.Q.compareRangesUsingStarts);let s=[];for(let e=0,t=0,o=i.length,r=n.length;e<o;){let o=i[e];if(t>=r)s.push(o),e++;else{let i=tO.Q.compareRangesUsingStarts(o,n[t]);i<0?((n[t].isEmpty()||!tO.Q.areIntersecting(o,n[t]))&&s.push(o),e++):(i>0||e++,t++)}}let o="off"!==this.editor.getOption(90),r=this._languageFeaturesService.documentHighlightProvider.has(t)&&o,a=s.map(e=>({range:e,options:r?v3:v4}));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};function bm(e,t,i){let n=bf(e,t[0],!i);for(let s=1,o=t.length;s<o;s++){let o=t[s];if(o.isEmpty()||n!==bf(e,o,!i))return!1}return!0}function bf(e,t,i){let n=e.getValueInRange(t);return i?n.toLowerCase():n}bp=ez=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(M=iI.u,function(e,t){M(e,t,1)})],bp);class b_ extends e6.ks{constructor(){super({id:"editor.action.focusNextCursor",label:tn.aS(1299,"Focus Next Cursor"),metadata:{description:tn.kg(1286,"Focuses the next cursor"),args:[]},precondition:void 0})}run(e,t,i){if(!t.hasModel())return;let n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();let s=Array.from(n.getCursorStates()),o=s.shift();o&&(s.push(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),v9(s,n.getCursorStates()))}}class bv extends e6.ks{constructor(){super({id:"editor.action.focusPreviousCursor",label:tn.aS(1300,"Focus Previous Cursor"),metadata:{description:tn.kg(1287,"Focuses the previous cursor"),args:[]},precondition:void 0})}run(e,t,i){if(!t.hasModel())return;let n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();let s=Array.from(n.getCursorStates()),o=s.pop();o&&(s.unshift(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),v9(s,n.getCursorStates()))}}(0,e6.HW)(bo.ID,bo,4),(0,e6.HW)(bp.ID,bp,1),(0,e6.Fl)(v8),(0,e6.Fl)(v6),(0,e6.Fl)(be),(0,e6.Fl)(ba),(0,e6.Fl)(bl),(0,e6.Fl)(bh),(0,e6.Fl)(bd),(0,e6.Fl)(bc),(0,e6.Fl)(bu),(0,e6.Fl)(bt),(0,e6.Fl)(bi),(0,e6.Fl)(b_),(0,e6.Fl)(bv);let bb={Visible:new tr.N1("parameterHintsVisible",!1),MultipleSignatures:new tr.N1("parameterHintsMultipleSignatures",!1)};async function bC(e,t,i,n,s){for(let o of e.ordered(t))try{let e=await o.provideSignatureHelp(t,i,s,n);if(e)return e}catch(e){(0,ih.M_)(e)}}tC.w.registerCommand("_executeSignatureHelpProvider",async(e,...t)=>{let[i,n,s]=t;(0,iu.j)(i_.r.isUri(i)),(0,iu.j)(tR.y.isIPosition(n)),(0,iu.j)("string"==typeof s||!s);let o=e.get(iI.u),r=await e.get(rU.b).createModelReference(i);try{let e=await bC(o.signatureHelpProvider,r.object.textEditorModel,tR.y.lift(n),{triggerKind:iD.WA.Invoke,isRetrigger:!1,triggerCharacter:s},t6.XO.None);if(!e)return;return setTimeout(()=>e.dispose(),0),e.value}finally{r.dispose()}}),function(e){e.Default={type:0};class t{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}}e.Pending=t;class i{constructor(e){this.hints=e,this.type=1}}e.Active=i}(eU||(eU={}));class bw extends tT.jG{static{this.DEFAULT_DELAY=120}constructor(e,t,i=bw.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new iA.vl),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=eU.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new tT.HE),this.triggerChars=new cN.y,this.retriggerChars=new cN.y,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new tM.ve(i),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(e=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(e=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(e=>this.onCursorChange(e))),this._register(this.editor.onDidChangeModelContent(e=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(e=>this.onDidType(e))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=eU.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){let i=this.editor.getModel();if(!i||!this.providers.has(i))return;let n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(n),t).catch(ih.dz)}next(){if(1!==this.state.type)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(98).cycle;if((e<2||i)&&!n)return void this.cancel();this.updateActiveSignature(i&&n?0:t+1)}previous(){if(1!==this.state.type)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(98).cycle;if((e<2||i)&&!n)return void this.cancel();this.updateActiveSignature(i&&n?e-1:t-1)}updateActiveSignature(e){1===this.state.type&&(this.state=new eU.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){let t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;let n=this._pendingTriggers.reduce(by);this._pendingTriggers=[];let s={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;let o=this.editor.getModel(),r=this.editor.getPosition();this.state=new eU.Pending((0,tM.SS)(e=>bC(this.providers,o,r,s,e)),i);try{let t=await this.state.request;if(e!==this.triggerId)return t?.dispose(),!1;if(!t||!t.value.signatures||0===t.value.signatures.length)return t?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1;return this.state=new eU.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0}catch(t){return e===this.triggerId&&(this.state=eU.Default),(0,ih.dz)(t),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();let e=this.editor.getModel();if(e)for(let t of this.providers.ordered(e)){for(let e of t.signatureHelpTriggerCharacters||[])if(e.length){let t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(let e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;let t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:iD.WA.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:iD.WA.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:iD.WA.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(98).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function by(e,t){switch(t.triggerKind){case iD.WA.Invoke:return t;case iD.WA.ContentChange:return e;case iD.WA.TriggerCharacter:default:return t}}i(72725);var bS=function(e,t){return function(i,n){t(i,n,e)}};let bk=e8.$,bx=(0,sL.pU)("parameter-hints-next",e9.W.chevronDown,tn.kg(1302,"Icon for show next parameter hint.")),bL=(0,sL.pU)("parameter-hints-previous",e9.W.chevronUp,tn.kg(1303,"Icon for show previous parameter hint.")),bD=class extends tT.jG{static{ej=this}static{this.ID="editor.widget.parameterHintsWidget"}constructor(e,t,i,n,s){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new tT.Cm),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=new iF.T({editor:e},s,n),this.keyVisible=bb.Visible.bindTo(i),this.keyMultipleSignatures=bb.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){let e=bk(".editor-widget.parameter-hints-widget"),t=e8.BC(e,bk(".phwrapper"));t.tabIndex=-1;let i=e8.BC(t,bk(".controls")),n=e8.BC(i,bk(".button"+iM.L.asCSSSelector(bL))),s=e8.BC(i,bk(".overloads")),o=e8.BC(i,bk(".button"+iM.L.asCSSSelector(bx)));this._register(e8.ko(n,"click",e=>{e8.fs.stop(e),this.previous()})),this._register(e8.ko(o,"click",e=>{e8.fs.stop(e),this.next()}));let r=bk(".body"),a=new g4.MU(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());let l=e8.BC(r,bk(".signature")),h=e8.BC(r,bk(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:s,docs:h,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(e=>{this.visible&&this.editor.layoutContentWidget(this)}));let d=()=>{if(!this.domNodes)return;let e=this.editor.getOption(59),t=this.domNodes.element;t.style.fontSize=`${e.fontSize}px`,t.style.lineHeight=`${e.lineHeight/e.fontSize}`,t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",e.fontFamily),t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",sv.jU.fontFamily)};d(),this._register(iA.Jh.chain(this.editor.onDidChangeConfiguration.bind(this.editor),e=>e.filter(e=>e.hasChanged(59)))(d)),this._register(this.editor.onDidLayoutChange(e=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes?.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;let t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";let i=e.signatures[e.activeSignature];if(!i)return;let n=e8.BC(this.domNodes.signature,bk(".code")),s=i.parameters.length>0,o=i.activeParameter??e.activeParameter;s?this.renderParameters(n,i,o):e8.BC(n,bk("span")).textContent=i.label;let r=i.parameters[o];if(r?.documentation){let e=bk("span.documentation");if("string"==typeof r.documentation)e.textContent=r.documentation;else{let t=this.renderMarkdownDocs(r.documentation);e.appendChild(t.element)}e8.BC(this.domNodes.docs,bk("p",{},e))}if(void 0===i.documentation);else if("string"==typeof i.documentation)e8.BC(this.domNodes.docs,bk("p",{},i.documentation));else{let e=this.renderMarkdownDocs(i.documentation);e8.BC(this.domNodes.docs,e.element)}let a=this.hasDocs(i,r);if(this.domNodes.signature.classList.toggle("has-docs",a),this.domNodes.docs.classList.toggle("empty",!a),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,r){let e="",t=i.parameters[o];e=Array.isArray(t.label)?i.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"==typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),i.documentation&&(e+="string"==typeof i.documentation?`, ${i.documentation}`:`, ${i.documentation.value}`),this.announcedLabel!==e&&(tw.xE(tn.kg(1304,"{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){let t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!t&&"string"==typeof t.documentation&&!!((0,iu.ni)(t.documentation).length>0)||!!t&&"object"==typeof t.documentation&&!!((0,iu.ni)(t.documentation).value.length>0)||!!e.documentation&&"string"==typeof e.documentation&&!!((0,iu.ni)(e.documentation).length>0)||!!e.documentation&&"object"==typeof e.documentation&&!!((0,iu.ni)(e.documentation.value).length>0)}renderParameters(e,t,i){let[n,s]=this.getParameterLabelOffsets(t,i),o=document.createElement("span");o.textContent=t.label.substring(0,n);let r=document.createElement("span");r.textContent=t.label.substring(n,s),r.className="parameter active";let a=document.createElement("span");a.textContent=t.label.substring(s),e8.BC(e,o,r,a)}getParameterLabelOffsets(e,t){let i=e.parameters[t];if(!i)return[0,0];{if(Array.isArray(i.label))return i.label;if(!i.label.length)return[0,0];let t=RegExp(`(\\W|^)${(0,iE.bm)(i.label)}(?=\\W|$)`,"g");t.test(e.label);let n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return ej.ID}updateMaxHeight(){if(!this.domNodes)return;let e=Math.max(this.editor.getLayoutInfo().height/4,250),t=`${e}px`;this.domNodes.element.style.maxHeight=t;let i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=t)}};bD=ej=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([bS(2,tr.fN),bS(3,iB.Cr),bS(4,rs.L)],bD),(0,tF.x1A)("editorHoverWidget.highlightForeground",tF.QI5,tn.kg(1305,"Foreground color of the active item in the parameter hint."));var bI=function(e,t){return function(i,n){t(i,n,e)}};let bN=class extends tT.jG{static{e$=this}static{this.ID="editor.controller.parameterHints"}static get(e){return e.getContribution(e$.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new bw(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints(e=>{e?(this.widget.value.show(),this.widget.value.render(e)):this.widget.rawValue?.hide()})),this.widget=new su.d(()=>this._register(t.createInstance(bD,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(e){this.model.trigger(e,0)}};bN=e$=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([bI(1,t5._Y),bI(2,iI.u)],bN);class bE extends e6.ks{constructor(){super({id:"editor.action.triggerParameterHints",label:tn.aS(1301,"Trigger Parameter Hints"),precondition:ti.R.hasSignatureHelpProvider,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:3082,weight:100}})}run(e,t){let i=bN.get(t);i?.trigger({triggerKind:iD.WA.Invoke})}}(0,e6.HW)(bN.ID,bN,2),(0,e6.Fl)(bE);let bM=e6.DX.bindToContribution(bN.get);(0,e6.E_)(new bM({id:"closeParameterHints",precondition:bb.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:ti.R.focus,primary:9,secondary:[1033]}})),(0,e6.E_)(new bM({id:"showPrevParameterHint",precondition:tr.M$.and(bb.Visible,bb.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:ti.R.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,e6.E_)(new bM({id:"showNextParameterHint",precondition:tr.M$.and(bb.Visible,bb.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:ti.R.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}})),i(75999);class bT extends tT.jG{static{this.ID="editor.contrib.placeholderText"}constructor(e){var t,i;super(),this._editor=e,this._editorObs=(0,an.U)(this._editor),this._placeholderText=this._editorObs.getOption(100),this._state=(0,oM.C)({owner:this,equalsFn:ue.dB},e=>{let t=this._placeholderText.read(e);if(t&&this._editorObs.valueIsEmpty.read(e))return{placeholder:t}}),this._shouldViewBeAlive=(t=this,i=e=>this._state.read(e)?.placeholder!==void 0,(0,oM.ZX)(t,(e,t)=>!0===t||i(e))),this._view=(0,oM.un)(e=>{if(!this._shouldViewBeAlive.read(e))return;let t=(0,e8.h)("div.editorPlaceholder");e.store.add((0,oM.fm)(e=>{let i=this._state.read(e),n=i?.placeholder!==void 0;t.root.style.display=n?"block":"none",t.root.innerText=i?.placeholder??""})),e.store.add((0,oM.fm)(e=>{let i=this._editorObs.layoutInfo.read(e);t.root.style.left=`${i.contentLeft}px`,t.root.style.width=i.contentWidth-i.verticalScrollbarWidth+"px",t.root.style.top=`${this._editor.getTopForLineNumber(0)}px`})),e.store.add((0,oM.fm)(e=>{t.root.style.fontFamily=this._editorObs.getOption(58).read(e),t.root.style.fontSize=this._editorObs.getOption(61).read(e)+"px",t.root.style.lineHeight=this._editorObs.getOption(75).read(e)+"px"})),e.store.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:(0,oM.lk)(0),position:(0,oM.lk)(null),domNode:t.root}))}),this._view.recomputeInitiallyAndOnChange(this._store)}}class bR{constructor(e){this.instantiationService=e}init(){}}let bO=class extends bR{constructor(e,t){super(t),this.init(e)}};bO=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(T=t5._Y,function(e,t){T(e,t,1)})],bO),(0,e6.HW)(bT.ID,function(e){var t;return(0,cK.e)()?(t=bO,class extends t{constructor(){super(...arguments),this._autorun=void 0}init(...t){this._autorun=(0,oM.yC)((i,n)=>{let s=(0,oE.b6)(e(),i);n.add(this.instantiationService.createInstance(s,...t))})}dispose(){this._autorun?.dispose()}}):e()}(()=>bT),0),(0,p$.x1)("editor.placeholder.foreground",hs.Ek,(0,tn.kg)(1324,"Foreground color of the placeholder text in the editor."));var bP=i(67514),bA=i(98200),bF=i(73970);i(93159);var bB=function(e,t){return function(i,n){t(i,n,e)}};let bW=new tr.N1("renameInputVisible",!1,tn.kg(1376,"Whether the rename input widget is visible"));new tr.N1("renameInputFocused",!1,tn.kg(1377,"Whether the rename input widget is focused"));let bH=class{constructor(e,t,i,n,s,o){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._logService=o,this.allowEditorOverflow=!0,this._disposables=new tT.Cm,this._visibleContextKey=bW.bindTo(s),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new t0.W,this._inputWithButton=new bz,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(59)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new bV(this._domNode,{fontInfo:this._editor.getOption(59),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange(()=>{this._renameCandidateListView?.focusedCandidate!==void 0&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??=this._beforeFirstInputFieldEditSW.elapsed(),this._renameCandidateProvidersCts?.token.isCancellationRequested===!1&&this._renameCandidateProvidersCts.cancel(),this._renameCandidateListView?.clearFocus()})),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;let t=e.getColor(tF.f9l),i=e.getColor(tF.DSL);this._domNode.style.backgroundColor=String(e.getColor(tF.CgL)??""),this._domNode.style.boxShadow=t?` 0 0 8px 2px ${t}`:"",this._domNode.style.border=i?`1px solid ${i}`:"",this._domNode.style.color=String(e.getColor(tF.cws)??"");let n=e.getColor(tF.Zgs);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor(tF.L4c)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor(tF.L4c)??""),this._inputWithButton.domNode.style.borderWidth=n?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=n?"solid":"none",this._inputWithButton.domNode.style.borderColor=n?.toString()??"none"}_updateFont(){if(void 0===this._domNode)return;(0,iu.j)(void 0!==this._label,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);let e=this._editor.getOption(59);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return .8*e}getPosition(){if(!this._visible||!this._editor.hasModel()||!this._editor.getDomNode())return null;let e=e8.tG(this.getDomNode().ownerDocument.body),t=e8.BK(this._editor.getDomNode()),i=this._getTopForPosition();this._nPxAvailableAbove=i+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;let n=this._editor.getOption(75),{totalHeight:s}=bU.getLayoutInfo({lineHeight:n}),o=this._nPxAvailableBelow>6*s?[2,1]:[1,2];return{position:this._position,preference:o}}beforeRender(){let[e,t]=this._acceptKeybindings;return this._label.innerText=tn.kg(1378,"{0} to Rename, {1} to Preview",this._keybindingService.lookupKeybinding(e)?.getLabel(),this._keybindingService.lookupKeybinding(t)?.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){let t;if(null===e)return void this.cancelInput(!0,"afterRender (because position is null)");if(!this._editor.hasModel()||!this._editor.getDomNode())return;(0,iu.j)(this._renameCandidateListView),(0,iu.j)(void 0!==this._nPxAvailableAbove),(0,iu.j)(void 0!==this._nPxAvailableBelow);let i=e8.OK(this._inputWithButton.domNode),n=e8.OK(this._label);t=2===e?this._nPxAvailableBelow:this._nPxAvailableAbove,this._renameCandidateListView.layout({height:t-n-i,width:e8.Tr(this._inputWithButton.domNode)})}acceptInput(e){this._trace("invoking acceptInput"),this._currentAcceptInput?.(e)}cancelInput(e,t){this._currentCancelInput?.(e)}focusNextRenameSuggestion(){this._renameCandidateListView?.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){this._renameCandidateListView?.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,i,n,s){let{start:o,end:r}=this._getSelection(e,t);this._renameCts=s;let a=new tT.Cm;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,void 0===n?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=n,this._requestRenameCandidates(t,!1),a.add(e8.ko(this._inputWithButton.button,"click",()=>this._requestRenameCandidates(t,!0))),a.add(e8.ko(this._inputWithButton.button,e8.Bx.KEY_DOWN,e=>{let i=new bA.Z(e);(i.equals(3)||i.equals(10))&&(i.stopPropagation(),i.preventDefault(),this._requestRenameCandidates(t,!0))}))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",i),this._position=new tR.y(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",o.toString()),this._inputWithButton.input.setAttribute("selectionEnd",r.toString()),this._inputWithButton.input.size=Math.max((e.endColumn-e.startColumn)*1.1,20),this._beforeFirstInputFieldEditSW.reset(),a.add((0,tT.s)(()=>{this._renameCts=void 0,s.dispose(!0)})),a.add((0,tT.s)(()=>{void 0!==this._renameCandidateProvidersCts&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)})),a.add((0,tT.s)(()=>this._candidates.clear()));let l=new tM.Zv;return l.p.finally(()=>{a.dispose(),this._hide()}),this._currentCancelInput=e=>(this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView?.clearCandidates(),l.complete(e),!0),this._currentAcceptInput=e=>{let n,s;this._trace("invoking _currentAcceptInput"),(0,iu.j)(void 0!==this._renameCandidateListView);let o=this._renameCandidateListView.nCandidates,r=this._renameCandidateListView.focusedCandidate;if(void 0!==r?(this._trace("using new name from renameSuggestion"),n=r,s={k:"renameSuggestion"}):(this._trace("using new name from inputField"),n=this._inputWithButton.input.value,s=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),n===t||0===n.trim().length)return void this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)");this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),l.complete({newName:n,wantsPreview:i&&e,stats:{source:s,nRenameSuggestions:o,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})},a.add(s.token.onCancellationRequested(()=>this.cancelInput(!0,"cts.token.onCancellationRequested"))),a.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!this._domNode?.ownerDocument.hasFocus(),"editor.onDidBlurEditorWidget"))),this._show(),l.p}_requestRenameCandidates(e,t){if(void 0!==this._requestRenameCandidatesOnce&&(void 0!==this._renameCandidateProvidersCts&&this._renameCandidateProvidersCts.dispose(!0),(0,iu.j)(this._renameCts),"stop"!==this._inputWithButton.buttonState)){this._renameCandidateProvidersCts=new t6.Qi;let i=t?iD.YT.Invoke:iD.YT.Automatic,n=this._requestRenameCandidatesOnce(i,this._renameCandidateProvidersCts.token);if(0===n.length)return void this._inputWithButton.setSparkleButton();t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(n,e,this._renameCts.token)}}_getSelection(e,t){(0,iu.j)(this._editor.hasModel());let i=this._editor.getSelection(),n=0,s=t.length;return!tO.Q.isEmpty(i)&&!tO.Q.spansMultipleLines(i)&&tO.Q.containsRange(e,i)&&(n=Math.max(0,i.startColumn-e.startColumn),s=Math.min(e.endColumn,i.endColumn)-e.startColumn),{start:n,end:s}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))},100)}async _updateRenameCandidates(e,t,i){let n=(...e)=>this._trace("_updateRenameCandidates",...e);n("start");let s=await (0,tM.PK)(Promise.allSettled(e),i);if(this._inputWithButton.setSparkleButton(),void 0===s)return void n("returning early - received updateRenameCandidates results - undefined");let o=s.flatMap(e=>"fulfilled"===e.status&&(0,iu.O9)(e.value)?e.value:[]);n(`received updateRenameCandidates results - total (unfiltered) ${o.length} candidates.`);let r=t8.dM(o,e=>e.newSymbolName);n(`distinct candidates - ${r.length} candidates.`);let a=r.filter(({newSymbolName:e})=>e.trim().length>0&&e!==this._inputWithButton.input.value&&e!==t&&!this._candidates.has(e));if(n(`valid distinct candidates - ${o.length} candidates.`),a.forEach(e=>this._candidates.add(e.newSymbolName)),a.length<1)return void n("returning early - no valid distinct candidates");n("setting candidates"),this._renameCandidateListView.setCandidates(a),n("asking editor to re-layout"),this._editor.layoutContentWidget(this)}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){let e,t=this._editor.getVisibleRanges();return t.length>0?e=t[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),e=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(e)}_trace(...e){this._logService.trace("RenameWidget",...e)}};bH=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([bB(2,tB.Gy),bB(3,nf.b),bB(4,tr.fN),bB(5,t2.rr)],bH);class bV{constructor(e,t){this._disposables=new tT.Cm,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=bV._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._disposables.add(this._listWidget.onDidChangeFocus(e=>{1===e.elements.length&&t.onFocusChange(e.elements[0].newSymbolName)},this._disposables)),this._disposables.add(this._listWidget.onDidChangeSelection(e=>{1===e.elements.length&&t.onSelectionChange()},this._disposables)),this._disposables.add(this._listWidget.onDidBlur(e=>{this._listWidget.setFocus([])})),this._listWidget.style((0,n_.t8)({listInactiveFocusForeground:tF.nH,listInactiveFocusBackground:tF.AlL}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);let t=this._pickListHeight(this._listWidget.length),i=this._pickListWidth(e);this._listWidget.layout(t,i),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${i}px`,tw.h5(tn.kg(1379,"Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(0===this._listWidget.length)return;let e=this._listWidget.getSelectedElements()[0];if(void 0!==e)return e.newSymbolName;let t=this._listWidget.getFocusedElements()[0];if(void 0!==t)return t.newSymbolName}focusNext(){if(0===this._listWidget.length)return!1;let e=this._listWidget.getFocus();if(0===e.length)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();let e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}focusPrevious(){if(0===this._listWidget.length)return!1;let e=this._listWidget.getFocus();if(0===e.length){this._listWidget.focusLast();let e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}if(0===e[0])return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();let e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){let{totalHeight:e}=bU.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){return Math.min(this._candidateViewHeight*e,this._availableHeight,7*this._candidateViewHeight)}_pickListWidth(e){let t=Math.ceil(Math.max(...e.map(e=>e.newSymbolName.length))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+t+10)}static _createListWidget(e,t,i){let n=new class{getTemplateId(e){return"candidate"}getHeight(e){return t}},s=new class{constructor(){this.templateId="candidate"}renderTemplate(e){return new bU(e,i)}renderElement(e,t,i){i.populate(e)}disposeTemplate(e){e.dispose()}};return new np.B8("NewSymbolNameCandidates",e,n,[s],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class bz{constructor(){this._buttonHoverContent="",this._onDidInputChange=new iA.vl,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new tT.Cm}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",tn.kg(1380,"Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=tn.kg(1381,"Generate new name suggestions"),this._buttonCancelHoverText=tn.kg(1382,"Cancel"),this._buttonHoverContent=this._buttonGenHoverText,this._disposables.add((0,bF.i)().setupDelayedHover(this._buttonNode,()=>({content:this._buttonHoverContent,appearance:{showPointer:!0,compact:!0}}))),this._domNode.appendChild(this._buttonNode),this._disposables.add(e8.ko(this.input,e8.Bx.INPUT,()=>this._onDidInputChange.fire())),this._disposables.add(e8.ko(this.input,e8.Bx.KEY_DOWN,e=>{let t=new bA.Z(e);(15===t.keyCode||17===t.keyCode)&&this._onDidInputChange.fire()})),this._disposables.add(e8.ko(this.input,e8.Bx.CLICK,()=>this._onDidInputChange.fire())),this._disposables.add(e8.ko(this.input,e8.Bx.FOCUS,()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"})),this._disposables.add(e8.ko(this.input,e8.Bx.BLUR,()=>{this.domNode.style.outline="none"}))),this._domNode}get input(){return(0,iu.j)(this._inputNode),this._inputNode}get button(){return(0,iu.j)(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){this._buttonState="sparkle",this._sparkleIcon??=(0,s1.s)(e9.W.sparkle),e8.w_(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),this._buttonHoverContent=this._buttonGenHoverText,this.input.focus()}setStopButton(){this._buttonState="stop",this._stopIcon??=(0,s1.s)(e9.W.stopCircle),e8.w_(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),this._buttonHoverContent=this._buttonCancelHoverText,this.input.focus()}dispose(){this._disposables.dispose()}}class bU{static{this._PADDING=2}constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${bU._PADDING}px`;let i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.width=i.style.height=`${.8*t.lineHeight}px`,this._domNode.appendChild(i),this._icon=(0,s1.s)(e9.W.sparkle),this._icon.style.display="none",i.appendChild(this._icon),this._label=document.createElement("div"),pS.M(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){let t=!!e.tags?.includes(iD.OV.AIGenerated);this._icon.style.display=t?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+2*bU._PADDING}}dispose(){}}var bj=function(e,t){return function(i,n){t(i,n,e)}};class b${constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){let t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){let i=this._providers[this._providerRenameIdx];if(!i.resolveRenameLocation)break;let n=await i.resolveRenameLocation(this.model,this.position,e);if(n){if(n.rejectReason){t.push(n.rejectReason);continue}return n}}this._providerRenameIdx=0;let i=this.model.getWordAtPosition(this.position);return i?{range:new tO.Q(this.position.lineNumber,i.startColumn,this.position.lineNumber,i.endColumn),text:i.word,rejectReason:t.length>0?t.join("\n"):void 0}:{range:tO.Q.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){let s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join("\n")};let o=await s.provideRenameEdits(this.model,this.position,e,n);return o?o.rejectReason?this._provideRenameEdits(e,t+1,i.concat(o.rejectReason),n):o:this._provideRenameEdits(e,t+1,i.concat(tn.kg(1365,"No result.")),n)}}async function bK(e,t,i,n){let s=new b$(t,i,e),o=await s.resolveRenameLocation(t6.XO.None);return o?.rejectReason?{edits:[],rejectReason:o.rejectReason}:s.provideRenameEdits(n,t6.XO.None)}let bG=class{static{eK=this}static{this.ID="editor.contrib.renameController"}static get(e){return e.getContribution(eK.ID)}constructor(e,t,i,n,s,o,r,a){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=o,this._configService=r,this._languageFeaturesService=a,this._disposableStore=new tT.Cm,this._cts=new t6.Qi,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(bH,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){let e,t=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new t6.Qi,!this.editor.hasModel())return void t("editor has no model");let i=this.editor.getPosition(),n=new b$(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return void t("skeleton has no provider");let s=new iN.gI(this.editor,5,void 0,this._cts.token);try{t("resolving rename location");let i=n.resolveRenameLocation(s.token);this._progressService.showWhile(i,250),e=await i,t("resolved rename location")}catch(e){e instanceof ih.AL?t("resolve rename location cancelled",JSON.stringify(e,null," ")):(t("resolve rename location failed",e instanceof Error?e:JSON.stringify(e,null," ")),("string"==typeof e||(0,ty.VS)(e))&&iH.get(this.editor)?.showMessage(e||tn.kg(1366,"An unknown error occurred while resolving rename location"),i));return}finally{s.dispose()}if(!e)return void t("returning early - no loc");if(e.rejectReason){t(`returning early - rejected with reason: ${e.rejectReason}`,e.rejectReason),iH.get(this.editor)?.showMessage(e.rejectReason,i);return}if(s.token.isCancellationRequested)return void t("returning early - cts1 cancelled");let o=new iN.gI(this.editor,5,e.range,this._cts.token),r=this.editor.getModel(),a=this._languageFeaturesService.newSymbolNamesProvider.all(r),l=await Promise.all(a.map(async e=>[e,await e.supportsAutomaticNewSymbolNamesTriggerKind??!1]));t("creating rename input field and awaiting its result");let h=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),d=await this._renameWidget.getInput(e.range,e.text,h,a.length>0?(t,i)=>{let n=l.slice();return t===iD.YT.Automatic&&(n=n.filter(([e,t])=>t)),n.map(([n])=>n.provideNewSymbolNames(r,e.range,t,i))}:void 0,o);if(t("received response from rename input field"),"boolean"==typeof d){t(`returning early - rename input field response - ${d}`),d&&this.editor.focus(),o.dispose();return}this.editor.focus(),t("requesting rename edits");let c=(0,tM.PK)(n.provideRenameEdits(d.newName,o.token),o.token).then(async i=>{if(!i)return void t("returning early - no rename edits result");if(!this.editor.hasModel())return void t("returning early - no model after rename edits are provided");if(i.rejectReason){t(`returning early - rejected with reason: ${i.rejectReason}`),this._notificationService.info(i.rejectReason);return}this.editor.setSelection(tO.Q.fromPositions(this.editor.getSelection().getPosition())),t("applying edits"),this._bulkEditService.apply(i,{editor:this.editor,showPreview:d.wantsPreview,label:tn.kg(1367,"Renaming '{0}' to '{1}'",e?.text,d.newName),code:"undoredo.rename",quotableLabel:tn.kg(1368,"Renaming {0} to {1}",e?.text,d.newName),respectAutoSaveConfig:!0,reason:n7.dg.rename()}).then(i=>{t("edits applied"),i.ariaSummary&&(0,tw.xE)(tn.kg(1369,"Successfully renamed '{0}' to '{1}'. Summary: {2}",e.text,d.newName,i.ariaSummary))}).catch(e=>{t(`error when applying edits ${JSON.stringify(e,null," ")}`),this._notificationService.error(tn.kg(1370,"Rename failed to apply edits")),this._logService.error(e)})},e=>{t("error when providing rename edits",JSON.stringify(e,null," ")),this._notificationService.error(tn.kg(1371,"Rename failed to compute edits")),this._logService.error(e)}).finally(()=>{o.dispose()});return t("returning rename operation"),this._progressService.showWhile(c,250),c}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}};bG=eK=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([bj(1,t5._Y),bj(2,nA.Ot),bj(3,iL.nu),bj(4,ig.N8),bj(5,t2.rr),bj(6,bP.U),bj(7,iI.u)],bG);class bq extends e6.ks{constructor(){super({id:"editor.action.rename",label:tn.aS(1373,"Rename Symbol"),precondition:tr.M$.and(ti.R.writable,ti.R.hasRenameProvider),kbOpts:{kbExpr:ti.R.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let i=e.get(te.T),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return i_.r.isUri(n)&&tR.y.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(e=>{e&&(e.setPosition(s),e.invokeWithinContext(t=>(this.reportTelemetry(t,e),this.run(t,e))))},ih.dz):super.runCommand(e,t)}run(e,t){let i=e.get(t2.rr),n=bG.get(t);return n?(i.trace("[RenameAction] got controller, running..."),n.run()):(i.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}(0,e6.HW)(bG.ID,bG,4),(0,e6.Fl)(bq);let bQ=e6.DX.bindToContribution(bG.get);(0,e6.E_)(new bQ({id:"acceptRenameInput",precondition:bW,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:tr.M$.and(ti.R.focus,tr.M$.not("isComposing")),primary:3}})),(0,e6.E_)(new bQ({id:"acceptRenameInputWithPreview",precondition:tr.M$.and(bW,tr.M$.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:tr.M$.and(ti.R.focus,tr.M$.not("isComposing")),primary:2051}})),(0,e6.E_)(new bQ({id:"cancelRenameInput",precondition:bW,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:ti.R.focus,primary:9,secondary:[1033]}})),(0,ts.ug)(class extends ts.L{constructor(){super({id:"focusNextRenameSuggestion",title:{...tn.aS(1374,"Focus Next Rename Suggestion")},precondition:bW,keybinding:[{primary:18,weight:199}]})}run(e){let t=e.get(te.T).getFocusedCodeEditor();if(!t)return;let i=bG.get(t);i&&i.focusNextRenameSuggestion()}}),(0,ts.ug)(class extends ts.L{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...tn.aS(1375,"Focus Previous Rename Suggestion")},precondition:bW,keybinding:[{primary:16,weight:199}]})}run(e){let t=e.get(te.T).getFocusedCodeEditor();if(!t)return;let i=bG.get(t);i&&i.focusPreviousRenameSuggestion()}}),(0,e6.ke)("_executeDocumentRenameProvider",function(e,t,i,...n){let[s]=n;(0,iu.j)("string"==typeof s);let{renameProvider:o}=e.get(iI.u);return bK(o,t,i,s)}),(0,e6.ke)("_executePrepareRename",async function(e,t,i){let{renameProvider:n}=e.get(iI.u),s=new b$(t,i,n),o=await s.resolveRenameLocation(t6.XO.None);if(o?.rejectReason)throw Error(o.rejectReason);return o}),iv.O.as(s$.Fd.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:6,description:tn.kg(1372,"Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var bY=function(e,t){return function(i,n){t(i,n,e)}};let bZ=class extends tT.jG{static{this.ID="editor.sectionHeaderDetector"}constructor(e,t,i){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(81)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(t.onDidChange(t=>{let i=this.editor.getModel()?.getLanguageId();i&&t.affects(i)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(t=>{(!this.options||t.hasChanged(81))&&(this.options=this.createOptions(e.getOption(81)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(e=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(e=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new tM.uC(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;let t=this.editor.getModel().getLanguageId();if(!t)return;let i=this.languageConfigurationService.getLanguageConfiguration(t).comments,n=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;if(i||n?.markers)return{foldingRules:n,markSectionHeaderRegex:e.markSectionHeaderRegex,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;let e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;let t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(i=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(i)})}updateDecorations(e){let t=this.editor.getModel();t&&(e=e.filter(e=>{if(!e.shouldBeInComments)return!0;let i=t.validateRange(e.range),n=t.tokenization.getLineTokens(i.startLineNumber),s=n.findTokenIndexAtOffset(i.startColumn-1),o=n.getStandardTokenType(s);return n.getLanguageId(s)===t.getLanguageId()&&1===o}));let i=Object.values(this.currentOccurrences).map(e=>e.decorationId),n=e.map(e=>{var t;return{range:(t=e).range,options:tA.kI.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:t.hasSeparatorLine?2:1,sectionHeaderText:t.text}})}});this.editor.changeDecorations(t=>{let s=t.deltaDecorations(i,n);this.currentOccurrences={};for(let t=0,i=s.length;t<i;t++){let i={sectionHeader:e[t],decorationId:s[t]};this.currentOccurrences[i.decorationId]=i}})}stop(){this.computeSectionHeaders.cancel(),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop(),this.decorations.clear()}};bZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([bY(1,r1.JZ),bY(2,or.w)],bZ),(0,e6.HW)(bZ.ID,bZ,1);var bX=i(4880),bJ=i(88521);function b0(e){let t=new Uint32Array(function(e){let t;if(t=2,"full"===e.type)t+=1+e.data.length;else for(let i of(t+=1,t+=3*e.deltas.length,e.deltas))i.data&&(t+=i.data.length);return t}(e)),i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else for(let n of(t[i++]=2,t[i++]=e.deltas.length,e.deltas))t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0;let n=new Uint8Array(t.buffer,t.byteOffset,4*t.length);return tJ.cm()||function(e){for(let t=0,i=e.length;t<i;t+=4){let i=e[t+0],n=e[t+1],s=e[t+2],o=e[t+3];e[t+0]=o,e[t+1]=s,e[t+2]=n,e[t+3]=i}}(n),f3.MB.wrap(n)}function b1(e){return e&&!!e.data}function b2(e){return e&&Array.isArray(e.edits)}class b5{constructor(e,t,i){this.provider=e,this.tokens=t,this.error=i}}async function b4(e,t,i,n,s){let o=function(e,t){let i=e.orderedGroups(t);return i.length>0?i[0]:[]}(e,t),r=await Promise.all(o.map(async e=>{let o,r=null;try{o=await e.provideDocumentSemanticTokens(t,e===i?n:null,s)}catch(e){r=e,o=null}return o&&(b1(o)||b2(o))||(o=null),new b5(e,o,r)}));for(let e of r){if(e.error)throw e.error;if(e.tokens)return e}return r.length>0?r[0]:null}class b3{constructor(e,t){this.provider=e,this.tokens=t}}function b7(e,t){let i=e.orderedGroups(t);return i.length>0?i[0]:[]}async function b9(e,t,i,n){let s=b7(e,t),o=await Promise.all(s.map(async e=>{let s;try{s=await e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){(0,ih.M_)(e),s=null}return s&&b1(s)||(s=null),new b3(e,s)}));for(let e of o)if(e.tokens)return e;return o.length>0?o[0]:null}tC.w.registerCommand("_provideDocumentSemanticTokensLegend",async(e,...t)=>{let[i]=t;(0,iu.j)(i instanceof i_.r);let n=e.get(n3.S).getModel(i);if(!n)return;let{documentSemanticTokensProvider:s}=e.get(iI.u),o=function(e,t){let i=e.orderedGroups(t);return i.length>0?i[0]:null}(s,n);return o?o[0].getLegend():e.get(tC.d).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)}),tC.w.registerCommand("_provideDocumentSemanticTokens",async(e,...t)=>{let[i]=t;(0,iu.j)(i instanceof i_.r);let n=e.get(n3.S).getModel(i);if(!n)return;let{documentSemanticTokensProvider:s}=e.get(iI.u);if(!s.has(n))return e.get(tC.d).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());let o=await b4(s,n,null,null,t6.XO.None);if(!o)return;let{provider:r,tokens:a}=o;if(!a||!b1(a))return;let l=b0({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l}),tC.w.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(e,...t)=>{let[i,n]=t;(0,iu.j)(i instanceof i_.r);let s=e.get(n3.S).getModel(i);if(!s)return;let{documentRangeSemanticTokensProvider:o}=e.get(iI.u),r=b7(o,s);if(0===r.length)return;if(1===r.length)return r[0].getLegend();if(!n||!tO.Q.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();let a=await b9(o,s,tO.Q.lift(n),t6.XO.None);if(a)return a.provider.getLegend()}),tC.w.registerCommand("_provideDocumentRangeSemanticTokens",async(e,...t)=>{let[i,n]=t;(0,iu.j)(i instanceof i_.r),(0,iu.j)(tO.Q.isIRange(n));let s=e.get(n3.S).getModel(i);if(!s)return;let{documentRangeSemanticTokensProvider:o}=e.get(iI.u),r=await b9(o,s,tO.Q.lift(n),t6.XO.None);if(r&&r.tokens)return b0({id:0,type:"full",data:r.tokens.data})});let b8="editor.semanticHighlighting";function b6(e,t,i){let n=i.getValue(b8,{overrideIdentifier:e.getLanguageId(),resource:e.uri})?.enabled;return"boolean"==typeof n?n:t.getColorTheme().semanticHighlighting}var Ce=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ct=function(e,t){return function(i,n){t(i,n,e)}};let Ci=class extends tT.jG{constructor(e,t,i,n,s,o){super(),this._watchers=new sQ.fT;let r=t=>{this._watchers.get(t.uri)?.dispose(),this._watchers.set(t.uri,new Cn(t,e,i,s,o))},a=(e,t)=>{t.dispose(),this._watchers.delete(e.uri)},l=()=>{for(let e of t.getModels()){let t=this._watchers.get(e.uri);b6(e,i,n)?t||r(e):t&&a(e,t)}};t.getModels().forEach(e=>{b6(e,i,n)&&r(e)}),this._register(t.onModelAdded(e=>{b6(e,i,n)&&r(e)})),this._register(t.onModelRemoved(e=>{let t=this._watchers.get(e.uri);t&&a(e,t)})),this._register(n.onDidChangeConfiguration(e=>{e.affectsConfiguration(b8)&&l()})),this._register(i.onDidColorThemeChange(l))}dispose(){(0,tT.AS)(this._watchers.values()),this._watchers.clear(),super.dispose()}};Ci=Ce([Ct(0,bJ.F),Ct(1,n3.S),Ct(2,tB.Gy),Ct(3,to.pG),Ct(4,s9.U),Ct(5,iI.u)],Ci);let Cn=class extends tT.jG{static{eG=this}static{this.REQUEST_MIN_DELAY=300}static{this.REQUEST_MAX_DELAY=2e3}constructor(e,t,i,n,s){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:eG.REQUEST_MIN_DELAY,max:eG.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new tM.uC(()=>this._fetchDocumentSemanticTokensNow(),eG.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));let o=()=>{for(let t of((0,tT.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._provider.all(e)))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};o(),this._register(this._provider.onDidChange(()=>{o(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(i.onDidColorThemeChange(e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),(0,tT.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){var e,t;if(this._currentDocumentRequestCancellationTokenSource)return;if(e=this._provider,t=this._model,!e.has(t)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let i=new t6.Qi,n=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,s=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,o=b4(this._provider,this._model,n,s,i.token);this._currentDocumentRequestCancellationTokenSource=i,this._providersChangedDuringRequest=!1;let r=[],a=this._model.onDidChangeContent(e=>{r.push(e)}),l=new t0.W(!1);o.then(e=>{if(this._debounceInformation.update(this._model,l.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),e){let{provider:t,tokens:i}=e,n=this._semanticTokensStylingService.getStyling(t);this._setDocumentSemanticTokens(t,i||null,n,r)}else this._setDocumentSemanticTokens(null,null,null,r)},e=>{e&&(ih.MB(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||ih.dz(e),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),(r.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let o=0;o<s;o++)i[n+o]=e[t+o]}_setDocumentSemanticTokens(e,t,i,n){let s=this._currentDocumentResponse,o=()=>{(n.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i)return void this._model.tokenization.setSemanticTokens(null,!1);if(!t){this._model.tokenization.setSemanticTokens(null,!0),o();return}if(b2(t)){if(!s)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:s.data};else{let e=0;for(let i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;let n=s.data,o=new Uint32Array(n.length+e),r=n.length,a=o.length;for(let e=t.edits.length-1;e>=0;e--){let l=t.edits[e];if(l.start>n.length){i.warnInvalidEditStart(s.resultId,t.resultId,e,l.start,n.length),this._model.tokenization.setSemanticTokens(null,!0);return}let h=r-(l.start+l.deleteCount);h>0&&(eG._copy(n,r-h,o,a-h,h),a-=h),l.data&&(eG._copy(l.data,0,o,a-l.data.length,l.data.length),a-=l.data.length),r=l.start}r>0&&eG._copy(n,0,o,0,r),t={resultId:t.resultId,data:o}}}if(b1(t)){this._currentDocumentResponse=new Cs(e,t.resultId,t.data);let s=(0,bX.b)(t,i,this._model.getLanguageId());if(n.length>0)for(let e of n)for(let t of s)for(let i of e.changes)t.applyEdit(i.range,i.text);this._model.tokenization.setSemanticTokens(s,!0)}else this._model.tokenization.setSemanticTokens(null,!0);o()}};Cn=eG=Ce([Ct(1,bJ.F),Ct(2,tB.Gy),Ct(3,s9.U),Ct(4,iI.u)],Cn);class Cs{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,oe.x)(Ci);var Co=function(e,t){return function(i,n){t(i,n,e)}};let Cr=class extends tT.jG{static{this.ID="editor.contrib.viewportSemanticTokens"}constructor(e,t,i,n,s,o){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=o.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new tM.uC(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];let r=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{r()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),r()})),this._register(this._editor.onDidChangeModelContent(e=>{this._cancelAll(),r()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),r()})),this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(b8)&&(this._cancelAll(),r())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),r()})),r()}_cancelAll(){for(let e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e)return void this._outstandingRequests.splice(t,1)}_tokenizeViewportNow(){var e;if(!this._editor.hasModel())return;let t=this._editor.getModel();if(t.tokenization.hasCompleteSemanticTokens())return;if(!b6(t,this._themeService,this._configurationService)||(e=this._provider,!e.has(t))){t.tokenization.hasSomeSemanticTokens()&&t.tokenization.setSemanticTokens(null,!1);return}let i=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(i.map(e=>this._requestRange(t,e)))}_requestRange(e,t){let i=e.getVersionId(),n=(0,tM.SS)(i=>Promise.resolve(b9(this._provider,e,t,i))),s=new t0.W(!1);return n.then(n=>{if(this._debounceInformation.update(e,s.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;let{provider:o,tokens:r}=n,a=this._semanticTokensStylingService.getStyling(o);e.tokenization.setPartialSemanticTokens(t,(0,bX.b)(r,a,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(n),()=>this._removeOutstandingRequest(n)),n}};Cr=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Co(1,bJ.F),Co(2,tB.Gy),Co(3,to.pG),Co(4,s9.U),Co(5,iI.u)],Cr),(0,e6.HW)(Cr.ID,Cr,1);class Ca{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){let i=[];for(let n of t){let t=[];i.push(t),this.selectSubwords&&this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){let n=t.getWordAtPosition(i);if(!n)return;let{word:s,startColumn:o}=n,r=i.column-o,a=r,l=r,h=0;for(;a>=0;a--){let e=s.charCodeAt(a);if(a!==r&&(95===e||45===e)||(0,iE.Lv)(e)&&(0,iE.Wv)(h))break;h=e}for(a+=1;l<s.length;l++){let e=s.charCodeAt(l);if((0,iE.Wv)(e)&&(0,iE.Lv)(h)||95===e||45===e)break;h=e}a<l&&e.push({range:new tO.Q(i.lineNumber,o+a,i.lineNumber,o+l)})}_addWordRanges(e,t,i){let n=t.getWordAtPosition(i);n&&e.push({range:new tO.Q(i.lineNumber,n.startColumn,i.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new tO.Q(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}class Cl{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;let i=new Cl(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let Ch=class{static{eq=this}static{this.ID="editor.contrib.smartSelectController"}static get(e){return e.getContribution(eq.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await Cg(this._languageFeaturesService.selectionRangeProvider,i,t.map(e=>e.getPosition()),this._editor.getOption(129),t6.XO.None).then(e=>{if(t8.EI(e)&&e.length===t.length&&this._editor.hasModel()&&t8.aI(this._editor.getSelections(),t,(e,t)=>e.equalsSelection(t))){for(let i=0;i<e.length;i++)e[i]=e[i].filter(e=>e.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition())),e[i].unshift(t[i]);this._state=e.map(e=>new Cl(0,e)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(t=>t.mov(e));let n=this._state.map(e=>tk.L.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}}};Ch=eq=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(R=iI.u,function(e,t){R(e,t,1)})],Ch);class Cd extends e6.ks{constructor(e,t){super(t),this._forward=e}async run(e,t){let i=Ch.get(t);i&&await i.run(this._forward)}}class Cc extends Cd{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:tn.aS(1385,"Expand Selection"),precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"1_basic",title:tn.kg(1383,"&&Expand Selection"),order:2}})}}tC.w.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class Cu extends Cd{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:tn.aS(1386,"Shrink Selection"),precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:ts.D8.MenubarSelectionMenu,group:"1_basic",title:tn.kg(1384,"&&Shrink Selection"),order:3}})}}async function Cg(e,t,i,n,s){let o=e.all(t).concat(new Ca(n.selectSubwords));1===o.length&&o.unshift(new gK);let r=[],a=[];for(let e of o)r.push(Promise.resolve(e.provideSelectionRanges(t,i,s)).then(e=>{if(t8.EI(e)&&e.length===i.length)for(let t=0;t<i.length;t++)for(let n of(a[t]||(a[t]=[]),e[t]))tO.Q.isIRange(n.range)&&tO.Q.containsPosition(n.range,i[t])&&a[t].push(tO.Q.lift(n.range))},ih.M_));return await Promise.all(r),a.map(e=>{let i;if(0===e.length)return[];e.sort((e,t)=>tR.y.isBefore(e.getStartPosition(),t.getStartPosition())?1:tR.y.isBefore(t.getStartPosition(),e.getStartPosition())?-1:tR.y.isBefore(e.getEndPosition(),t.getEndPosition())?-1:1*!!tR.y.isBefore(t.getEndPosition(),e.getEndPosition()));let s=[];for(let t of e)(!i||tO.Q.containsRange(t,i)&&!tO.Q.equalsRange(t,i))&&(s.push(t),i=t);if(!n.selectLeadingAndTrailingWhitespace)return s;let o=[s[0]];for(let e=1;e<s.length;e++){let i=s[e-1],n=s[e];if(n.startLineNumber!==i.startLineNumber||n.endLineNumber!==i.endLineNumber){let e=new tO.Q(i.startLineNumber,t.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,t.getLineLastNonWhitespaceColumn(i.endLineNumber));e.containsRange(i)&&!e.equalsRange(i)&&n.containsRange(e)&&!n.equalsRange(e)&&o.push(e);let s=new tO.Q(i.startLineNumber,1,i.endLineNumber,t.getLineMaxColumn(i.endLineNumber));s.containsRange(i)&&!s.equalsRange(e)&&n.containsRange(s)&&!n.equalsRange(s)&&o.push(s)}o.push(n)}return o})}(0,e6.HW)(Ch.ID,Ch,4),(0,e6.Fl)(Cc),(0,e6.Fl)(Cu),tC.w.registerCommand("_executeSelectionRangeProvider",async function(e,...t){let[i,n]=t;(0,iu.j)(i_.r.isUri(i));let s=e.get(iI.u).selectionRangeProvider,o=await e.get(rU.b).createModelReference(i);try{return Cg(s,o.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},t6.XO.None)}finally{o.dispose()}});let Cp=Object.freeze({View:(0,tn.aS)(1623,"View"),Help:(0,tn.aS)(1624,"Help"),Test:(0,tn.aS)(1625,"Test"),File:(0,tn.aS)(1626,"File"),Preferences:(0,tn.aS)(1627,"Preferences"),Developer:(0,tn.aS)(1628,"Developer")});class Cm extends e6.qO{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...(0,tn.aS)(1433,"Toggle Editor Sticky Scroll"),mnemonicTitle:(0,tn.kg)(1429,"&&Toggle Editor Sticky Scroll")},metadata:{description:(0,tn.aS)(1434,"Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:Cp.View,toggled:{condition:tr.M$.equals("config.editor.stickyScroll.enabled",!0),title:(0,tn.kg)(1430,"Sticky Scroll"),mnemonicTitle:(0,tn.kg)(1431,"&&Sticky Scroll")},menu:[{id:ts.D8.CommandPalette},{id:ts.D8.MenubarAppearanceMenu,group:"4_editor",order:3},{id:ts.D8.StickyScrollContext}]})}async runEditorCommand(e,t){let i=e.get(to.pG),n=!i.getValue("editor.stickyScroll.enabled"),s=ml.get(t)?.isFocused();i.updateValue("editor.stickyScroll.enabled",n),s&&t.focus()}}class Cf extends e6.qO{constructor(){super({id:"editor.action.focusStickyScroll",title:{...(0,tn.aS)(1435,"Focus Editor Sticky Scroll"),mnemonicTitle:(0,tn.kg)(1432,"&&Focus Editor Sticky Scroll")},precondition:tr.M$.and(tr.M$.has("config.editor.stickyScroll.enabled"),ti.R.stickyScrollVisible),menu:[{id:ts.D8.CommandPalette}]})}runEditorCommand(e,t){ml.get(t)?.focus()}}class C_ extends e6.qO{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:(0,tn.aS)(1436,"Select the next editor sticky scroll line"),precondition:ti.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:100,primary:18}})}runEditorCommand(e,t){ml.get(t)?.focusNext()}}class Cv extends e6.qO{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:(0,tn.aS)(1437,"Select the previous sticky scroll line"),precondition:ti.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:100,primary:16}})}runEditorCommand(e,t){ml.get(t)?.focusPrevious()}}class Cb extends e6.qO{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:(0,tn.aS)(1438,"Go to the focused sticky scroll line"),precondition:ti.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:100,primary:3}})}runEditorCommand(e,t){ml.get(t)?.goToFocused()}}class CC extends e6.qO{constructor(){super({id:"editor.action.selectEditor",title:(0,tn.aS)(1439,"Select Editor"),precondition:ti.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:100,primary:9}})}runEditorCommand(e,t){ml.get(t)?.selectEditor()}}(0,e6.HW)(ml.ID,ml,1),(0,ts.ug)(Cm),(0,ts.ug)(Cf),(0,ts.ug)(Cv),(0,ts.ug)(C_),(0,ts.ug)(Cb),(0,ts.ug)(CC);var Cw=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Cy=function(e,t){return function(i,n){t(i,n,e)}};class CS{constructor(e,t,i,n,s,o,r){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.action=o,this.completion=r}}let Ck=class extends tT.mp{constructor(e,t,i,n,s,o){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=o}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn<i.endColumn&&0===this.completionModel.getIncompleteProvider().size}get items(){let e=[],{items:t}=this.completionModel,i=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},t),n=ie.f.slice(t,i),s=ie.f.slice(t,0,i),o=5;for(let t of ie.f.concat(n,s)){if(t.score===aD.ne.Default)continue;let i=new tO.Q(t.editStart.lineNumber,t.editStart.column,t.editInsertEnd.lineNumber,t.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),n=t.completion.insertTextRules&&4&t.completion.insertTextRules?{snippet:t.completion.insertText}:t.completion.insertText;e.push(new CS(i,n,t.filterTextLow??t.labelLow,t.completion.additionalTextEdits,t.completion.command,t.completion.action,t)),o-- >=0&&t.resolve(t6.XO.None)}return e}};Ck=Cw([Cy(5,gV)],Ck);let Cx=class extends tT.jG{constructor(e,t,i,n){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=i,this._editorService=n,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,i,n){let s,o,r;if(i.selectedSuggestionInfo)return;for(let t of this._editorService.listCodeEditors())if(t.getModel()===e){s=t;break}if(!s)return;let a=s.getOption(102);if(c5.isAllOff(a))return;e.tokenization.tokenizeIfCheap(t.lineNumber);let l=e.tokenization.getLineTokens(t.lineNumber),h=l.getStandardTokenType(l.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==c5.valueFor(a,h))return;let d=e.getWordAtPosition(t);if(d?.word||(o=this._getTriggerCharacterInfo(e,t)),!d?.word&&!o||(d||(d=e.getWordUntilPosition(t)),d.endColumn!==t.column))return;let c=e.getValueInRange(new tO.Q(t.lineNumber,1,t.lineNumber,t.column));if(!o&&this._lastResult?.canBeReused(e,t.lineNumber,d)){let e=new gq(c,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),r=this._lastResult}else{let i,a=await c0(this._languageFeatureService.completionProvider,e,t,new cX(void 0,gJ.createSuggestFilter(s).itemKind,o?.providers),o&&{triggerKind:1,triggerCharacter:o.ch},n);a.needsClipboard&&(i=await this._clipboardService.readText());let l=new gQ(a.items,t.column,new gq(c,0),gG.None,s.getOption(134),s.getOption(128),{boostFullMatch:!1,firstMatchCanBeWeak:!1},i);r=new Ck(e,t.lineNumber,d,l,a,this._suggestMemoryService)}return this._lastResult=r,r}handleItemDidShow(e,t){t.completion.resolve(t6.XO.None)}disposeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){let i=e.getValueInRange(tO.Q.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),n=new Set;for(let t of this._languageFeatureService.completionProvider.all(e))t.triggerCharacters?.includes(i)&&n.add(t);if(0!==n.size)return{providers:n,ch:i}}};Cx=Cw([Cy(0,iI.u),Cy(1,t1.h),Cy(2,gV),Cy(3,te.T)],Cx),(0,oe.x)(Cx);class CL extends e6.ks{constructor(){super({id:"editor.action.forceRetokenize",label:tn.aS(1517,"Developer: Force Retokenize"),precondition:void 0})}run(e,t){if(!t.hasModel())return;let i=t.getModel();i.tokenization.resetTokenization();let n=new t0.W;i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}(0,e6.Fl)(CL);var CD=i(24417);class CI extends ts.L{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:CI.ID,title:tn.aS(1515,"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:tn.aS(1516,"Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){let e=!CD.M.getTabFocusMode();CD.M.setTabFocusMode(e),e?(0,tw.xE)(tn.kg(1513,"Pressing Tab will now move focus to the next focusable element")):(0,tw.xE)(tn.kg(1514,"Pressing Tab will now insert the tab character"))}}(0,ts.ug)(CI),i(30679);var CN=i(24377);i(43219);var CE=i(88723);i(22596);var CM=function(e,t){return function(i,n){t(i,n,e)}};let CT=class extends tT.jG{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n,s){super(),this._link=t,this._hoverService=n,this._enabled=!0,this.el=(0,e8.BC)(e,(0,e8.$)("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??(0,re.nZ)("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");let o=this._register(new CE.f(this.el,"click")),r=this._register(new CE.f(this.el,"keypress")),a=iA.Jh.chain(r.event,e=>e.map(e=>new bA.Z(e)).filter(e=>3===e.keyCode)),l=this._register(new CE.f(this.el,sk.B.Tap)).event;this._register(sk.q.addTarget(this.el));let h=iA.Jh.any(o.event,a,l);this._register(h(e=>{this.enabled&&(e8.fs.stop(e,!0),i?.opener?i.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};CT=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([CM(3,o6.TN),CM(4,iB.Cr)],CT);var CR=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},CO=function(e,t){return function(i,n){t(i,n,e)}};let CP=class extends tT.jG{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(CA))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,26)}};CP=CR([CO(1,t5._Y)],CP);let CA=class extends tT.jG{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(iF.T,{}),this.element=(0,e8.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"==typeof e.message?e.message:void 0}getBannerMessage(e){if("string"==typeof e){let t=(0,e8.$)("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){(0,e8.w_)(this.element)}show(e){(0,e8.w_)(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let i=(0,e8.BC)(this.element,(0,e8.$)("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild((0,e8.$)(`div${iM.L.asCSSSelector(e.icon)}`));let n=(0,e8.BC)(this.element,(0,e8.$)("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=(0,e8.BC)(this.element,(0,e8.$)("div.message-actions-container")),e.actions)for(let t of e.actions)this._register(this.instantiationService.createInstance(CT,this.messageActionsContainer,{...t,tabIndex:-1},{}));let s=(0,e8.BC)(this.element,(0,e8.$)("div.action-container"));this.actionBar=this._register(new nu.E(s)),this.actionBar.push(this._register(new oN.rc("banner.close",(0,tn.kg)(1518,"Close Banner"),iM.L.asClassName(sL.$_),!0,()=>{"function"==typeof e.onClose&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};CA=CR([CO(0,t5._Y)],CA);var CF=i(51543),CB=i(31799),CW=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},CH=function(e,t){return function(i,n){t(i,n,e)}};let CV=(0,sL.pU)("extensions-warning-message",e9.W.warning,tn.kg(1519,"Icon shown with a warning message in the extensions editor.")),Cz=class extends tT.jG{static{this.ID="editor.contrib.unicodeHighlighter"}constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){let t;if(this._bannerClosed)return;let i=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);if(e.nonBasicAsciiCharacterCount>=i)t={message:tn.kg(1520,"This document contains many non-basic ASCII unicode characters"),command:new C1};else if(e.ambiguousCharacterCount>=i)t={message:tn.kg(1521,"This document contains many ambiguous unicode characters"),command:new CJ};else if(e.invisibleCharacterCount>=i)t={message:tn.kg(1522,"This document contains many invisible unicode characters"),command:new C0};else throw Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:t.message,icon:CV,actions:[{label:t.command.shortLabel,href:`command:${t.command.desc.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(CP,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(142),this._register(i.onDidChangeTrust(e=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(142)&&(this._options=e.getOption(142),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){var e,t;if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;let i=(e=this._workspaceTrustService.isWorkspaceTrusted(),{nonBasicASCII:(t=this._options).nonBasicASCII===sv.XR?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===sv.XR?!e:t.includeComments,includeStrings:t.includeStrings===sv.XR?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales});if([i.nonBasicASCII,i.ambiguousCharacters,i.invisibleCharacters].every(e=>!1===e))return;let n={nonBasicASCII:i.nonBasicASCII,ambiguousCharacters:i.ambiguousCharacters,invisibleCharacters:i.invisibleCharacters,includeComments:i.includeComments,includeStrings:i.includeStrings,allowedCodePoints:Object.keys(i.allowedCharacters).map(e=>e.codePointAt(0)),allowedLocales:Object.keys(i.allowedLocales).map(e=>"_os"===e?_6.x.NumberFormat().value.resolvedOptions().locale:"_vscode"===e?tJ.BH:e)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new CU(this._editor,n,this._updateState,this._editorWorkerService):this._highlighter=new Cj(this._editor,n,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};Cz=CW([CH(1,or.w),CH(2,CF.L),CH(3,t5._Y)],Cz);let CU=class extends tT.jG{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new tM.uC(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();let e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);let i=[];if(!t.hasMore)for(let e of t.ranges)i.push({range:e,options:CY.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();return(0,CB.GN)(t,e)?{reason:CQ(t.getValueInRange(e.range),this._options),inComment:(0,CB.a6)(t,e),inString:(0,CB.wc)(t,e)}:null}};CU=CW([CH(3,or.w)],CU);class Cj extends tT.jG{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new tM.uC(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();let e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let t of e){let e=CN.P.computeUnicodeHighlights(this._model,this._options,t);for(let t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(let e of i.ranges)t.push({range:e,options:CY.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),i=t.getValueInRange(e.range);return(0,CB.GN)(t,e)?{reason:CQ(i,this._options),inComment:(0,CB.a6)(t,e),inString:(0,CB.wc)(t,e)}:null}}let C$=tn.kg(1523,"Configure Unicode Highlight Options"),CK=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];let i=this._editor.getModel(),n=this._editor.getContribution(Cz.ID);if(!n)return[];let s=[],o=new Set,r=300;for(let e of t){let t,a=n.getDecorationInfo(e);if(!a)continue;let l=i.getValueInRange(e.range).codePointAt(0),h=Cq(l);switch(a.reason.kind){case 0:t=(0,iE.aC)(a.reason.confusableWith)?tn.kg(1524,"The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,Cq(a.reason.confusableWith.codePointAt(0))):tn.kg(1525,"The character {0} could be confused with the character {1}, which is more common in source code.",h,Cq(a.reason.confusableWith.codePointAt(0)));break;case 1:t=tn.kg(1526,"The character {0} is invisible.",h);break;case 2:t=tn.kg(1527,"The character {0} is not a basic ASCII character.",h)}if(o.has(t))continue;o.add(t);let d={codePoint:l,reason:a.reason,inComment:a.inComment,inString:a.inString},c=tn.kg(1528,"Adjust settings"),u=(0,ty.AV)(C2.ID,d),g=new ty.Bc("",!0).appendMarkdown(t).appendText(" ").appendLink(u,c,C$);s.push(new rg(this,e.range,[g],!1,r++))}return s}renderHoverParts(e,t){return function(e,t,i,n,s){t.sort((0,t8.VE)(e=>e.ordinal,t8.U9));let o=[];for(let r of t){let t=rv(i,r,n,s,e.onContentsChanged);e.fragment.appendChild(t.hoverElement),o.push(t)}return new on(o)}(e,t,this._editor,this._languageService,this._openerService)}};function CG(e){return`U+${e.toString(16).padStart(4,"0")}`}function Cq(e){var t;let i=`\`${CG(e)}\``;return iE.y_.isInvisibleCharacter(e)||(i+=` "${96===(t=e)?"`` ` ``":"`"+String.fromCodePoint(t)+"`"}"`),i}function CQ(e,t){return CN.P.computeUnicodeHighlightReason(e,t)}CK=CW([CH(1,rs.L),CH(2,iB.Cr)],CK);class CY{constructor(){this.map=new Map}static{this.instance=new CY}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let i=`${e}${t}`,n=this.map.get(i);return n||(n=tA.kI.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}class CZ extends e6.ks{constructor(){super({id:CJ.ID,label:tn.aS(1537,"Disable highlighting of characters in comments"),precondition:void 0}),this.shortLabel=tn.kg(1529,"Disable Highlight In Comments")}async run(e,t,i){let n=e.get(to.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sv.Of.includeComments,!1,2)}}class CX extends e6.ks{constructor(){super({id:CJ.ID,label:tn.aS(1538,"Disable highlighting of characters in strings"),precondition:void 0}),this.shortLabel=tn.kg(1530,"Disable Highlight In Strings")}async run(e,t,i){let n=e.get(to.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sv.Of.includeStrings,!1,2)}}class CJ extends ts.L{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:CJ.ID,title:tn.aS(1539,"Disable highlighting of ambiguous characters"),precondition:void 0,f1:!1}),this.shortLabel=tn.kg(1531,"Disable Ambiguous Highlight")}async run(e,t,i){let n=e.get(to.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sv.Of.ambiguousCharacters,!1,2)}}class C0 extends ts.L{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:C0.ID,title:tn.aS(1540,"Disable highlighting of invisible characters"),precondition:void 0,f1:!1}),this.shortLabel=tn.kg(1532,"Disable Invisible Highlight")}async run(e,t,i){let n=e.get(to.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sv.Of.invisibleCharacters,!1,2)}}class C1 extends ts.L{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:C1.ID,title:tn.aS(1541,"Disable highlighting of non basic ASCII characters"),precondition:void 0,f1:!1}),this.shortLabel=tn.kg(1533,"Disable Non ASCII Highlight")}async run(e,t,i){let n=e.get(to.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(sv.Of.nonBasicASCII,!1,2)}}class C2 extends ts.L{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:C2.ID,title:tn.aS(1542,"Show Exclude Options"),precondition:void 0,f1:!1})}async run(e,t){let{codePoint:i,reason:n,inString:s,inComment:o}=t,r=String.fromCodePoint(i),a=e.get(ip.GK),l=e.get(to.pG),h=[];if(0===n.kind)for(let e of n.notAmbiguousInLocales)h.push({label:tn.kg(1536,'Allow unicode characters that are more common in the language "{0}".',e),run:async()=>{C4(l,[e])}});if(h.push({label:iE.y_.isInvisibleCharacter(i)?tn.kg(1534,"Exclude {0} (invisible character) from being highlighted",CG(i)):tn.kg(1535,"Exclude {0} from being highlighted",`${CG(i)} "${r}"`),run:()=>C5(l,[i])}),o){let e=new CZ;h.push({label:e.label,run:async()=>e.runAction(l)})}else if(s){let e=new CX;h.push({label:e.label,run:async()=>e.runAction(l)})}function d(e){return"string"==typeof e.desc.title?e.desc.title:e.desc.title.value}if(0===n.kind){let e=new CJ;h.push({label:d(e),run:async()=>e.runAction(l)})}else if(1===n.kind){let e=new C0;h.push({label:d(e),run:async()=>e.runAction(l)})}else if(2===n.kind){let e=new C1;h.push({label:d(e),run:async()=>e.runAction(l)})}else{var c=n;throw Error(`Unexpected value: ${c}`)}let u=await a.pick(h,{title:C$});u&&await u.run()}}async function C5(e,t){let i,n=e.getValue(sv.Of.allowedCharacters);for(let e of(i="object"==typeof n&&n?n:{},t))i[String.fromCodePoint(e)]=!0;await e.updateValue(sv.Of.allowedCharacters,i,2)}async function C4(e,t){let i,n=e.inspect(sv.Of.allowedLocales).user?.value;for(let e of(i="object"==typeof n&&n?Object.assign({},n):{},t))i[e]=!0;await e.updateValue(sv.Of.allowedLocales,i,2)}(0,ts.ug)(CJ),(0,ts.ug)(C0),(0,ts.ug)(C1),(0,ts.ug)(C2),(0,e6.HW)(Cz.ID,Cz,1),os.register(CK);var C3=i(80703),C7=function(e,t){return function(i,n){t(i,n,e)}};let C9="ignoreUnusualLineTerminators",C8=class extends tT.jG{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(143),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(143)&&(this._config=this._editor.getOption(143),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(e=>{e.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){var e,t;let i;if("off"===this._config||!this._editor.hasModel())return;let n=this._editor.getModel();if(n.mightContainUnusualLineTerminators()){if(!(!0===(e=this._codeEditorService,e.getModelProperty(n.uri,C9))||this._editor.getOption(104))){if("auto"===this._config)return void n.removeUnusualLineTerminators(this._editor.getSelections());if(!this._isPresentingDialog){try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:tn.kg(1543,"Unusual Line Terminators"),message:tn.kg(1544,"Detected unusual line terminators"),detail:tn.kg(1545,"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",(0,ij.P8)(n.uri)),primaryButton:tn.kg(1546,"&&Remove Unusual Line Terminators"),cancelButton:tn.kg(1547,"Ignore")})}finally{this._isPresentingDialog=!1}if(!i.confirmed)return void(t=this._codeEditorService,t.setModelProperty(n.uri,C9,!0));n.removeUnusualLineTerminators(this._editor.getSelections())}}}}};C8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([C7(1,C3.X),C7(2,te.T)],C8),(0,e6.HW)(C8.ID,C8,1);var C6=i(52989),we=i(95934);class wt{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,i){let n=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return n?e.isDisposed()?void 0:e.findMatches(n.word,!0,!1,!0,we.J3,!1).map(e=>({range:e.range,kind:iD.Kb.Text})):Promise.resolve([])}provideMultiDocumentHighlights(e,t,i,n){let s=new sQ.fT,o=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!o)return Promise.resolve(s);for(let t of[e,...i]){if(t.isDisposed())continue;let e=t.findMatches(o.word,!0,!1,!0,we.J3,!1).map(e=>({range:e.range,kind:iD.Kb.Text}));e&&s.set(t.uri,e)}return s}}let wi=class extends tT.jG{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new wt)),this._register(e.multiDocumentHighlightProvider.register("*",new wt))}};wi=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(O=iI.u,function(e,t){O(e,t,0)})],wi);var wn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ws=function(e,t){return function(i,n){t(i,n,e)}};let wo=new tr.N1("hasWordHighlights",!1);function wr(e,t,i,n){let s=e.ordered(t);return(0,tM.$1)(s.map(e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,ih.M_)),e=>null!=e).then(e=>{if(e){let i=new sQ.fT;return i.set(t.uri,e),i}return new sQ.fT})}class wa{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=(0,tM.SS)(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let i=e.getWordAtPosition(t.getPosition());return i?new tO.Q(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}cancel(){this.result.cancel()}}class wl extends wa{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return wr(this._providers,e,t.getPosition(),n).then(e=>e||new sQ.fT)}}class wh extends wa{constructor(e,t,i,n,s){super(e,t,i),this._providers=n,this._otherModels=s}_compute(e,t,i,n){return(function(e,t,i,n,s){let o=e.ordered(t);return(0,tM.$1)(o.map(e=>()=>{let o=s.filter(e=>(0,tP.vd)(e)).filter(t=>(0,C6.f)(e.selector,t.uri,t.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(e.provideMultiDocumentHighlights(t,i,o,n)).then(void 0,ih.M_)}),e=>null!=e)})(this._providers,e,t.getPosition(),n,this._otherModels).then(e=>e||new sQ.fT)}}(0,e6.ke)("_executeDocumentHighlights",async(e,t,i)=>{let n=e.get(iI.u),s=await wr(n.documentHighlightProvider,t,i,t6.XO.None);return s?.get(t.uri)});let wd=class{static{eQ=this}static{this.storedDecorationIDs=new sQ.fT}static{this.query=null}constructor(e,t,i,n,s,o,r,a){this.toUnhook=new tT.Cm,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new sQ.fT,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,this.runDelayer=this.toUnhook.add(new tM.ve(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=o,this.textModelService=s,this.configurationService=r,this.logService=a,this._hasWordHighlights=wo.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlightEnablement=this.editor.getOption(90),this.occurrencesHighlightDelay=this.configurationService.getValue("editor.occurrencesHighlightDelay"),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(e=>{this._ignorePositionChangeEvent||"off"!==this.occurrencesHighlightEnablement&&this.runDelayer.trigger(()=>{this._onPositionChanged(e)})})),this.toUnhook.add(e.onDidFocusEditorText(e=>{"off"!==this.occurrencesHighlightEnablement&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}))})),this.toUnhook.add(e.onDidChangeModelContent(e=>{(0,iU.v$)(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(e=>{!e.newModelUrl&&e.oldModelUrl?this._stopSingular():eQ.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(e=>{let t=this.editor.getOption(90);if(this.occurrencesHighlightEnablement!==t)switch(this.occurrencesHighlightEnablement=t,t){case"off":this._stopAll();break;case"singleFile":this._stopAll(eQ.query?.modelInfo?.modelURI);break;case"multiFile":eQ.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",t)}})),this.toUnhook.add(this.configurationService.onDidChangeConfiguration(e=>{if(e.affectsConfiguration("editor.occurrencesHighlightDelay")){let e=r.getValue("editor.occurrencesHighlightDelay");this.occurrencesHighlightDelay!==e&&(this.occurrencesHighlightDelay=e)}})),this.toUnhook.add(e.onDidBlurEditorWidget(()=>{let e=this.codeEditorService.getFocusedCodeEditor();e?e.getModel()?.uri.scheme===iU.ny.vscodeNotebookCell&&this.editor.getModel()?.uri.scheme!==iU.ny.vscodeNotebookCell&&this._stopAll():this._stopAll()})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,eQ.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(e){"off"!==this.occurrencesHighlightEnablement&&(this.runDelayer.cancel(),this.runDelayer.trigger(()=>{this._run(!1,e)}))}stop(){"off"!==this.occurrencesHighlightEnablement&&this._stopAll()}_getSortedHighlights(){return this.decorations.getRanges().sort(tO.Q.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),t=(e.findIndex(e=>e.containsPosition(this.editor.getPosition()))+1)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);let n=this._getWord();if(n){let s=this.editor.getModel().getLineContent(i.startLineNumber);(0,tw.xE)(`${s}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),t=(e.findIndex(e=>e.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);let n=this._getWord();if(n){let s=this.editor.getModel().getLineContent(i.startLineNumber);(0,tw.xE)(`${s}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;let e=eQ.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),eQ.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){let t=this.codeEditorService.listCodeEditors(),i=[];for(let n of t){if(!n.hasModel()||(0,ij.n4)(n.getModel().uri,e))continue;let t=eQ.storedDecorationIDs.get(n.getModel().uri);if(!t)continue;n.removeDecorations(t),i.push(n.getModel().uri);let s=wc.get(n);s?.wordHighlighter&&s.wordHighlighter.decorations.length>0&&(s.wordHighlighter.decorations.clear(),s.wordHighlighter.workerRequest=null,s.wordHighlighter._hasWordHighlights.set(!1))}for(let e of i)eQ.storedDecorationIDs.delete(e)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==iU.ny.vscodeNotebookCell&&eQ.query?.modelInfo?.modelURI.scheme!==iU.ny.vscodeNotebookCell?(eQ.query=null,this._run()):eQ.query?.modelInfo&&(eQ.query.modelInfo=null)),void 0!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),void 0!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if("off"===this.occurrencesHighlightEnablement||"api"!==e.source&&3!==e.reason)return void this._stopAll();this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===iU.ny.vscodeNotebookCell){let t=[];for(let i of this.codeEditorService.listCodeEditors()){let n=i.getModel();n&&n!==e&&n.uri.scheme===iU.ny.vscodeNotebookCell&&t.push(n)}return t}let t=[],i=this.codeEditorService.listCodeEditors();for(let n of i){if(!(0,rJ.Np)(n))continue;let i=n.getModel();i&&e===i.modified&&t.push(i.modified)}if(t.length)return t;if("singleFile"===this.occurrencesHighlightEnablement)return[];for(let n of i){let i=n.getModel();i&&i!==e&&t.push(i)}return t}async _run(e,t){if(this.editor.hasTextFocus()){let e=this.editor.getSelection();if(!e||e.startLineNumber!==e.endLineNumber){eQ.query=null,this._stopAll();return}let t=e.startColumn,i=e.endColumn,n=this._getWord();if(!n||n.startColumn>t||n.endColumn<i){eQ.query=null,this._stopAll();return}eQ.query={modelInfo:{modelURI:this.model.uri,selection:e}}}else if(!eQ.query)return void this._stopAll();if(this.lastCursorPositionChangeTime=new Date().getTime(),(0,ij.n4)(this.editor.getModel().uri,eQ.query.modelInfo?.modelURI)){if(!e){for(let e of this.decorations.getRanges())if(e.containsPosition(this.editor.getPosition()))return}this._stopAll(e?this.model.uri:void 0);let i=++this.workerRequestTokenId;this.workerRequestCompleted=!1;let n=this.getOtherModelsToHighlight(this.editor.getModel());if(!eQ.query||!eQ.query.modelInfo)return;let s=await this.textModelService.createModelReference(eQ.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(s.object.textEditorModel,eQ.query.modelInfo.selection,n),this.workerRequest?.result.then(e=>{i===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=e||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},ih.dz)}catch(e){this.logService.error("Unexpected error during occurrence request. Log: ",e)}finally{s.dispose()}}else if(this.model.uri.scheme===iU.ny.vscodeNotebookCell){let e=++this.workerRequestTokenId;if(this.workerRequestCompleted=!1,!eQ.query||!eQ.query.modelInfo)return;let i=await this.textModelService.createModelReference(eQ.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(i.object.textEditorModel,eQ.query.modelInfo.selection,[this.model]),this.workerRequest?.result.then(i=>{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=i||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},ih.dz)}catch(e){this.logService.error("Unexpected error during occurrence request. Log: ",e)}finally{i.dispose()}}}computeWithModel(e,t,i){var n,s;return i.length?(n=this.multiDocumentProviders,new wh(e,t,this.editor.getOption(148),n,i)):(s=this.providers,new wl(e,t,this.editor.getOption(148),s))}_beginRenderDecorations(e){let t=new Date().getTime(),i=this.lastCursorPositionChangeTime+e;t>=i?(this.renderDecorationsTimer=void 0,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},i-t)}renderDecorations(){for(let t of(this.renderDecorationsTimer=void 0,this.codeEditorService.listCodeEditors())){let i=wc.get(t);if(!i)continue;let n=[],s=t.getModel()?.uri;if(s&&this.workerRequestValue.has(s)){let o=eQ.storedDecorationIDs.get(s),r=this.workerRequestValue.get(s);if(r){for(let t of r)if(t.range){var e;n.push({range:t.range,options:(e=t.kind)===iD.Kb.Write?v2:e===iD.Kb.Text?v5:v7})}}let a=[];t.changeDecorations(e=>{a=e.deltaDecorations(o??[],n)}),eQ.storedDecorationIDs=eQ.storedDecorationIDs.set(s,a),n.length>0&&(i.wordHighlighter?.decorations.set(n),i.wordHighlighter?._hasWordHighlights.set(!0))}}this.workerRequest=null}dispose(){this._stopSingular(),this.toUnhook.dispose()}};wd=eQ=wn([ws(4,rU.b),ws(5,te.T),ws(6,to.pG),ws(7,t2.rr)],wd);let wc=class extends tT.jG{static{eY=this}static{this.ID="editor.contrib.wordHighlighter"}static get(e){return e.getContribution(eY.ID)}constructor(e,t,i,n,s,o,r){super(),this._wordHighlighter=null;let a=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&e.getModel().uri.scheme!==iU.ny.accessibleView&&(this._wordHighlighter=new wd(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,s,n,o,r))};this._register(e.onDidChangeModel(e=>{this._wordHighlighter&&(e.newModelUrl||e.oldModelUrl?.scheme===iU.ny.vscodeNotebookCell||this.wordHighlighter?.stop(),this._wordHighlighter.dispose(),this._wordHighlighter=null),a()})),a()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore(250)}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};wc=eY=wn([ws(1,tr.fN),ws(2,iI.u),ws(3,te.T),ws(4,rU.b),ws(5,to.pG),ws(6,t2.rr)],wc);class wu extends e6.ks{constructor(e,t){super(t),this._isNext=e}run(e,t){let i=wc.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class wg extends wu{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:tn.aS(1557,"Go to Next Symbol Highlight"),precondition:wo,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:65,weight:100}})}}class wp extends wu{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:tn.aS(1558,"Go to Previous Symbol Highlight"),precondition:wo,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:1089,weight:100}})}}class wm extends e6.ks{constructor(){super({id:"editor.action.wordHighlight.trigger",label:tn.aS(1559,"Trigger Symbol Highlight"),precondition:void 0,kbOpts:{kbExpr:ti.R.editorTextFocus,primary:0,weight:100}})}run(e,t,i){let n=wc.get(t);n&&n.restoreViewState(!0)}}(0,e6.HW)(wc.ID,wc,0),(0,e6.Fl)(wg),(0,e6.Fl)(wp),(0,e6.Fl)(wm),(0,oe.x)(wi);var wf=i(6849),w_=i(6581),wv=i(21348);class wb extends e6.DX{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;let n=(0,wv.i)(t.getOption(148),t.getOption(147)),s=t.getModel(),o=t.getSelections(),r=o.length>1,a=o.map(e=>{let t=new tR.y(e.positionLineNumber,e.positionColumn),i=this._move(n,s,t,this._wordNavigationType,r);return this._moveTo(e,i,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(e=>wf.MF.fromModelSelection(e))),1===a.length){let e=new tR.y(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new tk.L(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new tk.L(t.lineNumber,t.column,t.lineNumber,t.column)}}class wC extends wb{_move(e,t,i,n,s){return w_.z.moveWordLeft(e,t,i,n,s)}}class ww extends wb{_move(e,t,i,n,s){return w_.z.moveWordRight(e,t,i,n)}}class wy extends wC{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class wS extends wC{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class wk extends wC{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:tr.M$.and(ti.R.textInputFocus,tr.M$.and(o1.f,aG.nd)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}class wx extends wC{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class wL extends wC{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class wD extends wC{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:tr.M$.and(ti.R.textInputFocus,tr.M$.and(o1.f,aG.nd)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class wI extends wC{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,wv.i)(sv.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class wN extends wC{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,wv.i)(sv.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class wE extends ww{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class wM extends ww{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:tr.M$.and(ti.R.textInputFocus,tr.M$.and(o1.f,aG.nd)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}class wT extends ww{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class wR extends ww{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class wO extends ww{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:tr.M$.and(ti.R.textInputFocus,tr.M$.and(o1.f,aG.nd)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class wP extends ww{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class wA extends ww{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,wv.i)(sv.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class wF extends ww{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,wv.i)(sv.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class wB extends e6.DX{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){let n=e?.get(r1.JZ);if(!t.hasModel()||!n)return;let s=(0,wv.i)(t.getOption(148),t.getOption(147)),o=t.getModel(),r=t.getSelections(),a=t.getOption(10),l=t.getOption(15),h=n.getLanguageConfiguration(o.getLanguageId()).getAutoClosingPairs(),d=t._getViewModel(),c=r.map(e=>{let i=this._delete({wordSeparators:s,model:o,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(13),autoClosingBrackets:a,autoClosingQuotes:l,autoClosingPairs:h,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new tQ.iu(i,"")});t.pushUndoStop(),t.executeCommands(this.id,c),t.pushUndoStop()}}class wW extends wB{_delete(e,t){let i=w_.z.deleteWordLeft(e,t);return i||new tO.Q(1,1,1,1)}}class wH extends wB{_delete(e,t){let i=w_.z.deleteWordRight(e,t);if(i)return i;let n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new tO.Q(n,s,n,s)}}class wV extends wW{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:ti.R.writable})}}class wz extends wW{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:ti.R.writable})}}class wU extends wW{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class wj extends wH{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:ti.R.writable})}}class w$ extends wH{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:ti.R.writable})}}class wK extends wH{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class wG extends e6.ks{constructor(){super({id:"deleteInsideWord",precondition:ti.R.writable,label:tn.aS(1560,"Delete Word")})}run(e,t,i){if(!t.hasModel())return;let n=(0,wv.i)(t.getOption(148),t.getOption(147)),s=t.getModel(),o=t.getSelections().map(e=>{let t=w_.z.deleteInsideWord(n,s,e);return new tQ.iu(t,"")});t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}(0,e6.E_)(new wy),(0,e6.E_)(new wS),(0,e6.E_)(new wk),(0,e6.E_)(new wx),(0,e6.E_)(new wL),(0,e6.E_)(new wD),(0,e6.E_)(new wE),(0,e6.E_)(new wM),(0,e6.E_)(new wT),(0,e6.E_)(new wR),(0,e6.E_)(new wO),(0,e6.E_)(new wP),(0,e6.E_)(new wI),(0,e6.E_)(new wN),(0,e6.E_)(new wA),(0,e6.E_)(new wF),(0,e6.E_)(new wV),(0,e6.E_)(new wz),(0,e6.E_)(new wU),(0,e6.E_)(new wj),(0,e6.E_)(new w$),(0,e6.E_)(new wK),(0,e6.Fl)(wG);class wq extends wB{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let i=w_.c.deleteWordPartLeft(e);return i||new tO.Q(1,1,1,1)}}class wQ extends wB{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:ti.R.writable,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let i=w_.c.deleteWordPartRight(e);if(i)return i;let n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new tO.Q(n,s,n,s)}}class wY extends wb{_move(e,t,i,n,s){return w_.c.moveWordPartLeft(e,t,i,s)}}class wZ extends wY{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}tC.w.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class wX extends wY{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}tC.w.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class wJ extends wb{_move(e,t,i,n,s){return w_.c.moveWordPartRight(e,t,i)}}class w0 extends wJ{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class w1 extends wJ{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:ti.R.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}(0,e6.E_)(new wq),(0,e6.E_)(new wQ),(0,e6.E_)(new wZ),(0,e6.E_)(new wX),(0,e6.E_)(new w0),(0,e6.E_)(new w1);class w2 extends tT.jG{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=iH.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(105);t||(t=new ty.Bc(this.editor.isSimpleWidget?tn.kg(1363,"Cannot edit in read-only input"):tn.kg(1364,"Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}(0,e6.HW)(w2.ID,w2,2);var w5=i(77133),w4=function(e,t){return function(i,n){t(i,n,e)}};let w3=class extends tT.jG{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=(0,oM.FY)(this,void 0);let n=(0,oM.yQ)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),s=(0,oM.yQ)("_textModel.onDidChangeContent",iA.Jh.debounce(e=>this._textModel.onDidChangeContent(e),()=>void 0,100));this._register((0,oM.yC)(async(e,t)=>{n.read(e),s.read(e);let i=t.add(new vQ.MZ),o=await this._outlineModelService.getOrCreate(this._textModel,i.token);t.isDisposed||this._currentModel.set(o,void 0)}))}getBreadcrumbItems(e,t){let i=this._currentModel.read(t);if(!i)return[];let n=i.asListOfDocumentSymbols().filter(t=>e.contains(t.range.startLineNumber)&&!e.contains(t.range.endLineNumber));return n.sort((0,t8.Hw)((0,t8.VE)(e=>e.range.endLineNumber-e.range.startLineNumber,t8.U9))),n.map(e=>({name:e.name,kind:e.kind,startLineNumber:e.range.startLineNumber}))}};w3=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([w4(1,iI.u),w4(2,cU)],w3),w5.N.setBreadcrumbsSourceFactory((e,t)=>t.createInstance(w3,e)),i(11601);var w7=function(e,t){return function(i,n){t(i,n,e)}};let w9=class extends tT.jG{static{this.ID="editor.contrib.floatingToolbar"}constructor(e,t,i,n){super();let s=this._register((0,an.U)(e)),o=this._register(n.createMenu(ts.D8.EditorContent,e.contextKeyService)),r=(0,oM.y0)(this,o.onDidChange,()=>0===o.getActions().length);this._register((0,oM.fm)(e=>{if(r.read(e))return;let n=(0,e8.h)("div.floating-menu-overlay-widget");n.root.style.height="28px";let o=t.createInstance(oR.m,n.root,ts.D8.EditorContent,{actionViewItemProvider:(e,n)=>{if(!(e instanceof ts.Xe))return;let s=i.lookupKeybinding(e.id);if(s)return t.createInstance(class extends oT.oq{updateLabel(){this.options.label&&this.label&&(this.label.textContent=`${this._commandAction.label} (${s.getLabel()})`)}},e,{...n,keybindingNotRenderedWithLabel:!0})},hiddenItemStrategy:0,menuOptions:{shouldForwardArgs:!0},telemetrySource:"editor.overlayToolbar",toolbarOptions:{primaryGroup:()=>!0,useSeparatorsInPrimaryActions:!0}});e.store.add(o),e.store.add((0,oM.fm)(e=>{let t=s.model.read(e);o.context=t?.uri})),e.store.add(s.createOverlayWidget({allowEditorOverflow:!1,domNode:n.root,minContentWidthInPx:(0,oM.lk)(0),position:(0,oM.lk)({preference:1})}))}))}};w9=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([w7(1,t5._Y),w7(2,nf.b),w7(3,ts.ez)],w9),(0,e6.HW)(w9.ID,w9,1);var w8=i(63401);i(27097);class w6 extends tT.jG{static{this.ID="editor.contrib.iPadShowKeyboard"}constructor(e){super(),this.editor=e,this.widget=null,tJ.un&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(104);!this.widget&&e?this.widget=new ye(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}class ye extends tT.jG{static{this.ID="editor.contrib.ShowKeyboardWidget"}constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(e8.ko(this._domNode,"touchstart",e=>{this.editor.focus()})),this._register(e8.ko(this._domNode,"focus",e=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return ye.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}(0,e6.HW)(w6.ID,w6,3),i(34999);var yt=i(30868),yi=i(61142),yn=i(63438),ys=function(e,t){return function(i,n){t(i,n,e)}};let yo=class extends tT.jG{static{eZ=this}static{this.ID="editor.contrib.inspectTokens"}static get(e){return e.getContribution(eZ.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(e=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(e=>this.stop())),this._register(iD.dG.onDidChange(e=>this.stop())),this._register(this._editor.onKeyUp(e=>9===e.keyCode&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){!this._widget&&this._editor.hasModel()&&(this._widget=new ya(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};yo=eZ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ys(1,yn.L),ys(2,rs.L)],yo);class yr extends e6.ks{constructor(){super({id:"editor.action.inspectTokens",label:w8.YN.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let i=yo.get(t);i?.launch()}}class ya extends tT.jG{static{this._ID="editor.contrib.inspectTokensWidget"}constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=function(e,t){let i=iD.dG.get(t);if(i)return i;let n=e.encodeLanguageId(t);return{getInitialState:()=>yi.r3,tokenize:(e,i,n)=>(0,yi.$H)(t,n),tokenizeEncoded:(e,t,i)=>(0,yi.Lh)(n,i)}}(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(e=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return ya._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),i=0;for(let n=t.tokens1.length-1;n>=0;n--){let s=t.tokens1[n];if(e.column-1>=s.offset){i=n;break}}let n=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){n=i;break}let s=this._model.getLineContent(e.lineNumber),o="";if(i<t.tokens1.length){let e=t.tokens1[i].offset,n=i+1<t.tokens1.length?t.tokens1[i+1].offset:s.length;o=s.substring(e,n)}(0,e8.Ln)(this._domNode,(0,e8.$)("h2.tm-token",void 0,function(e){let t="";for(let i=0,n=e.length;i<n;i++){let n=e.charCodeAt(i);switch(n){case 9:t+="→";break;case 32:t+="\xb7";break;default:t+=String.fromCharCode(n)}}return t}(o),(0,e8.$)("span.tm-token-length",void 0,`${o.length} ${1===o.length?"char":"chars"}`))),(0,e8.BC)(this._domNode,(0,e8.$)("hr.tokens-inspect-separator",{style:"clear:both"}));let r=(n<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(n<<1)+1]):null;(0,e8.BC)(this._domNode,(0,e8.$)("table.tm-metadata-table",void 0,(0,e8.$)("tbody",void 0,(0,e8.$)("tr",void 0,(0,e8.$)("td.tm-metadata-key",void 0,"language"),(0,e8.$)("td.tm-metadata-value",void 0,`${r?r.languageId:"-?-"}`)),(0,e8.$)("tr",void 0,(0,e8.$)("td.tm-metadata-key",void 0,"token type"),(0,e8.$)("td.tm-metadata-value",void 0,`${r?this._tokenTypeToString(r.tokenType):"-?-"}`)),(0,e8.$)("tr",void 0,(0,e8.$)("td.tm-metadata-key",void 0,"font style"),(0,e8.$)("td.tm-metadata-value",void 0,`${r?this._fontStyleToString(r.fontStyle):"-?-"}`)),(0,e8.$)("tr",void 0,(0,e8.$)("td.tm-metadata-key",void 0,"foreground"),(0,e8.$)("td.tm-metadata-value",void 0,`${r?oo.Q1.Format.CSS.formatHex(r.foreground):"-?-"}`)),(0,e8.$)("tr",void 0,(0,e8.$)("td.tm-metadata-key",void 0,"background"),(0,e8.$)("td.tm-metadata-value",void 0,`${r?oo.Q1.Format.CSS.formatHex(r.background):"-?-"}`))))),(0,e8.BC)(this._domNode,(0,e8.$)("hr.tokens-inspect-separator")),i<t.tokens1.length&&(0,e8.BC)(this._domNode,(0,e8.$)("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){let t=iD.dG.getColorMap(),i=yt.x.getLanguageId(e),n=yt.x.getTokenType(e),s=yt.x.getFontStyle(e),o=yt.x.getForeground(e),r=yt.x.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(i),tokenType:n,fontStyle:s,foreground:t[o],background:t[r]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),8&e&&(t+="strikethrough "),0===t.length&&(t="---"),t}_getTokensAtLine(e){let t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),n=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:i.tokens,tokens2:n.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}(0,e6.HW)(yo.ID,yo,4),(0,e6.Fl)(yr);var yl=i(78343),yh=function(e,t){return function(i,n){t(i,n,e)}};let yd=class{static{eX=this}static{this.PREFIX="?"}constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=iv.O.as(yl.Fd.Quickaccess)}provide(e){let t=new tT.Cm;return t.add(e.onDidAccept(()=>{let[t]=e.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(e=>{let t=this.registry.getQuickAccessProvider(e.substr(eX.PREFIX.length));t&&t.prefix&&t.prefix!==eX.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(e=>e.prefix!==eX.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((e,t)=>e.prefix.localeCompare(t.prefix)).flatMap(e=>this.createPicks(e))}createPicks(e){return e.helpEntries.map(t=>{let i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:(0,tn.kg)(1730,"{0}, {1}",n,t.description),description:t.description}})}};yd=eX=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yh(0,ip.GK),yh(1,nf.b)],yd),iv.O.as(yl.Fd.Quickaccess).registerQuickAccessProvider({ctor:yd,prefix:"",helpEntries:[{description:w8.oq.helpQuickAccessActionLabel}]});var yc=i(20643);class yu{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,i){let n=new tT.Cm;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s=n.add(new tT.HE);return s.value=this.doProvide(e,t,i),n.add(this.onDidActiveTextEditorControlChange(()=>{s.value=void 0,s.value=this.doProvide(e,t)})),n}doProvide(e,t,i){let n=new tT.Cm,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){let o={editor:s},r=(0,rJ.jA)(s);if(r){let e=s.saveViewState()??void 0;n.add(r.onDidChangeCursorPosition(()=>{e=s.saveViewState()??void 0})),o.restoreViewState=()=>{e&&s===this.activeTextEditorControl&&s.restoreViewState(e)},n.add((0,yc.P)(t.onCancellationRequested)(()=>o.restoreViewState?.()))}n.add((0,tT.s)(()=>this.clearDecorations(s))),n.add(this.provideWithTextEditor(o,e,t,i))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();let i=e.getModel();i&&"getLineContent"in i&&(0,tw.h5)(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){return(0,rJ.Np)(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(e=>{let i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);let n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,tB.Yf)(hs.vp),position:tP.A5.Full}}}],[s,o]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:o}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class yg extends yu{static{this.PREFIX=":"}constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=(0,tn.kg)(1325,"Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,tT.jG.None}provideWithTextEditor(e,t,i){let n=e.editor,s=new tT.Cm;s.add(t.onDidAccept(i=>{let[s]=t.selectedItems;if(s){if(!this.isValidLineNumber(n,s.lineNumber))return;this.gotoLocation(e,{range:this.toRange(s.lineNumber,s.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}}));let o=()=>{let e=this.parsePosition(n,t.value.trim().substr(yg.PREFIX.length)),i=this.getPickLabel(n,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(n,e.lineNumber))return void this.clearDecorations(n);let s=this.toRange(e.lineNumber,e.column);n.revealRangeInCenter(s,0),this.addDecorations(n,s)};o(),s.add(t.onDidChangeValue(()=>o()));let r=(0,rJ.jA)(n);return r&&2===r.getOptions().get(76).renderType&&(r.updateOptions({lineNumbers:"on"}),s.add((0,tT.s)(()=>r.updateOptions({lineNumbers:"relative"})))),s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let i=t.split(/,|:|#/).map(e=>parseInt(e,10)).filter(e=>!isNaN(e)),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,tn.kg)(1326,"Go to line {0} and character {1}.",t,i):(0,tn.kg)(1327,"Go to line {0}.",t);let n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?(0,tn.kg)(1328,"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):(0,tn.kg)(1329,"Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!!t&&"number"==typeof t&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;let n=this.getModel(e);if(!n)return!1;let s={lineNumber:t,column:i};return n.validatePosition(s).equals(s)}lineCount(e){return this.getModel(e)?.getLineCount()??0}}let yp=class extends yg{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=iA.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};yp=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(P=te.T,function(e,t){P(e,t,0)})],yp);class ym extends e6.ks{static{this.ID="editor.action.gotoLine"}constructor(){super({id:ym.ID,label:w8.Hw.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(ip.GK).quickAccess.show(yp.PREFIX)}}(0,e6.Fl)(ym),iv.O.as(yl.Fd.Quickaccess).registerQuickAccessProvider({ctor:yp,prefix:yp.PREFIX,helpEntries:[{description:w8.Hw.gotoLineActionLabel,commandId:ym.ID}]});let yf=[void 0,[]];function y_(e,t,i=0,n=0){return t.values&&t.values.length>1?function(e,t,i,n){let s=0,o=[];for(let r of t){let[t,a]=yv(e,r,i,n);if("number"!=typeof t)return yf;s+=t,o.push(...a)}return[s,function(e){let t,i=e.sort((e,t)=>e.start-t.start),n=[];for(let e of i){var s,o;!t||(s=t,o=e,s.end<o.start||o.end<s.start)?(t=e,n.push(e)):(t.start=Math.min(t.start,e.start),t.end=Math.max(t.end,e.end))}return n}(o)]}(e,t.values,i,n):yv(e,t,i,n)}function yv(e,t,i,n){let s=(0,aD.dt)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],(0,aD.WJ)(s)]:yf}function yb(e){return e.startsWith('"')&&e.endsWith('"')}function yC(e){let t;"string"!=typeof e&&(e="");let i=e.toLowerCase(),{pathNormalized:n,normalized:s,normalizedLowercase:o}=yw(e),r=n.indexOf(ul.Vn)>=0,a=yb(e),l=e.split(" ");if(l.length>1)for(let e of l){let i=yb(e),{pathNormalized:n,normalized:s,normalizedLowercase:o}=yw(e);s&&(t||(t=[]),t.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:n,normalized:s,normalizedLowercase:o,expectContiguousMatch:i}))}return{original:e,originalLowercase:i,pathNormalized:n,normalized:s,normalizedLowercase:o,values:t,containsPathSeparator:r,expectContiguousMatch:a}}function yw(e){let t,i=(t=tJ.uF?e.replace(/\//g,ul.Vn):e.replace(/\\/g,ul.Vn)).replace(/[\*\u2026\s"]/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function yy(e){return Array.isArray(e)?yC(e.map(e=>e.original).join(" ")):yC(e.original)}Object.freeze({score:0});var yS=function(e,t){return function(i,n){t(i,n,e)}};let yk=class extends yu{static{eJ=this}static{this.PREFIX="@"}static{this.SCOPE_PREFIX=":"}static{this.PREFIX_BY_CATEGORY=`${this.PREFIX}${this.SCOPE_PREFIX}`}constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,tn.kg)(1330,"To go to a symbol, first open a text editor with symbol information.")),tT.jG.None}provideWithTextEditor(e,t,i,n){let s=e.editor,o=this.getModel(s);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,i,n):this.doProvideWithoutEditorSymbols(e,o,t,i):tT.jG.None}doProvideWithoutEditorSymbols(e,t,i,n){let s=new tT.Cm;return this.provideLabelPick(i,(0,tn.kg)(1331,"The active text editor does not provide symbol information.")),(async()=>{await this.waitForLanguageSymbolRegistry(t,s)&&!n.isCancellationRequested&&s.add(this.doProvideWithEditorSymbols(e,t,i,n))})(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let i=new tM.Zv,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))}));return t.add((0,tT.s)(()=>i.complete(!1))),i.p}doProvideWithEditorSymbols(e,t,i,n,s){let o=e.editor,r=new tT.Cm;r.add(i.onDidAccept(t=>{let[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),s?.handleAccept?.(n,t.inBackground),t.inBackground||i.hide())})),r.add(i.onDidTriggerItemButton(({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));let a=this.getDocumentSymbols(t,n),l=r.add(new tT.HE),h=async e=>{l?.value?.cancel(),i.busy=!1,l.value=new t6.Qi,i.busy=!0;try{let s=yC(i.value.substr(eJ.PREFIX.length).trim()),o=await this.doGetSymbolPicks(a,s,void 0,l.value.token,t);if(n.isCancellationRequested)return;if(o.length>0){if(i.items=o,e&&0===s.original.length){let t=(0,ho.Uk)(o,t=>!!("separator"!==t.type&&t.range&&tO.Q.containsPosition(t.range.decoration,e)));t&&(i.activeItems=[t])}}else s.original.length>0?this.provideLabelPick(i,(0,tn.kg)(1332,"No matching editor symbols")):this.provideLabelPick(i,(0,tn.kg)(1333,"No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return r.add(i.onDidChangeValue(()=>h(void 0))),h(o.getSelection()?.getPosition()),r.add(i.onDidChangeActive(()=>{let[e]=i.activeItems;e&&e.range&&(o.revealRangeInCenter(e.range.selection,0),this.addDecorations(o,e.range.decoration))})),r}async doGetSymbolPicks(e,t,i,n,s){let o,r,a,l=await e;if(n.isCancellationRequested)return[];let h=0===t.original.indexOf(eJ.SCOPE_PREFIX),d=+!!h;t.values&&t.values.length>1?(o=yy(t.values[0]),r=yy(t.values.slice(1))):o=t;let c=this.options?.openSideBySideDirection?.();c&&(a=[{iconClass:"right"===c?iM.L.asClassName(e9.W.splitHorizontal):iM.L.asClassName(e9.W.splitVertical),tooltip:"right"===c?(0,tn.kg)(1334,"Open to the Side"):(0,tn.kg)(1335,"Open to the Bottom")}]);let u=[];for(let e=0;e<l.length;e++){let n,h,c,g,p=l[e],m=(0,iE.Bq)(p.name),f=`$(${iD.gP.toIcon(p.kind).id}) ${m}`,_=f.length-m.length,v=p.containerName;if(i?.extraContainerLabel&&(v=v?`${i.extraContainerLabel} • ${v}`:i.extraContainerLabel),t.original.length>d){let e=!1;if(o!==t&&([n,h]=y_(f,{...t,values:void 0},d,_),"number"==typeof n&&(e=!0)),"number"!=typeof n&&([n,h]=y_(f,o,d,_),"number"!=typeof n))continue;if(!e&&r){if(v&&r.original.length>0&&([c,g]=y_(v,r)),"number"!=typeof c)continue;"number"==typeof n&&(n+=c)}}let b=p.tags&&p.tags.indexOf(1)>=0;u.push({index:e,kind:p.kind,score:n,label:f,ariaLabel:(0,iD.PK)(p.name,p.kind),description:v,highlights:b?void 0:{label:h,description:g},range:{selection:tO.Q.collapseToStart(p.selectionRange),decoration:p.range},uri:s.uri,symbolName:m,strikethrough:b,buttons:a})}let g=u.sort((e,t)=>h?this.compareByKindAndScore(e,t):this.compareByScore(e,t)),p=[];if(h){let e,t,i=0;function m(){t&&"number"==typeof e&&i>0&&(t.label=(0,iE.GP)(yL[e]||yx,i))}for(let n of g)e!==n.kind?(m(),e=n.kind,i=1,t={type:"separator"},p.push(t)):i++,p.push(n);m()}else g.length>0&&(p=[{label:(0,tn.kg)(1336,"symbols ({0})",u.length),type:"separator"},...g]);return p}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return -1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return -1;else if(e.score<t.score)return 1}return e.index<t.index?-1:+(e.index>t.index)}compareByKindAndScore(e,t){let i=yL[e.kind]||yx,n=yL[t.kind]||yx,s=i.localeCompare(n);return 0===s?this.compareByScore(e,t):s}async getDocumentSymbols(e,t){let i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};yk=eJ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yS(0,iI.u),yS(1,cU)],yk);let yx=(0,tn.kg)(1337,"properties ({0})"),yL={5:(0,tn.kg)(1338,"methods ({0})"),11:(0,tn.kg)(1339,"functions ({0})"),8:(0,tn.kg)(1340,"constructors ({0})"),12:(0,tn.kg)(1341,"variables ({0})"),4:(0,tn.kg)(1342,"classes ({0})"),22:(0,tn.kg)(1343,"structs ({0})"),23:(0,tn.kg)(1344,"events ({0})"),24:(0,tn.kg)(1345,"operators ({0})"),10:(0,tn.kg)(1346,"interfaces ({0})"),2:(0,tn.kg)(1347,"namespaces ({0})"),3:(0,tn.kg)(1348,"packages ({0})"),25:(0,tn.kg)(1349,"type parameters ({0})"),1:(0,tn.kg)(1350,"modules ({0})"),6:(0,tn.kg)(1351,"properties ({0})"),9:(0,tn.kg)(1352,"enumerations ({0})"),21:(0,tn.kg)(1353,"enumeration members ({0})"),14:(0,tn.kg)(1354,"strings ({0})"),0:(0,tn.kg)(1355,"files ({0})"),17:(0,tn.kg)(1356,"arrays ({0})"),15:(0,tn.kg)(1357,"numbers ({0})"),16:(0,tn.kg)(1358,"booleans ({0})"),18:(0,tn.kg)(1359,"objects ({0})"),19:(0,tn.kg)(1360,"keys ({0})"),7:(0,tn.kg)(1361,"fields ({0})"),13:(0,tn.kg)(1362,"constants ({0})")};var yD=function(e,t){return function(i,n){t(i,n,e)}};let yI=class extends yk{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=iA.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};yI=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yD(0,te.T),yD(1,iI.u),yD(2,cU)],yI);class yN extends e6.ks{static{this.ID="editor.action.quickOutline"}constructor(){super({id:yN.ID,label:w8.n9.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:ti.R.hasDocumentSymbolProvider,kbOpts:{kbExpr:ti.R.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(ip.GK).quickAccess.show(yk.PREFIX,{itemActivation:ip.C1.NONE})}}(0,e6.Fl)(yN),iv.O.as(yl.Fd.Quickaccess).registerQuickAccessProvider({ctor:yI,prefix:yk.PREFIX,helpEntries:[{description:w8.n9.quickOutlineActionLabel,prefix:yk.PREFIX,commandId:yN.ID},{description:w8.n9.quickOutlineByCategoryActionLabel,prefix:yk.PREFIX_BY_CATEGORY}]});var yE=i(96340),yM=i(74227);class yT{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){let i=this.computeEmbedding(e),n=new Map,s=[];for(let[e,o]of this.documents){if(t.isCancellationRequested)return[];for(let t of o.chunks){let o=this.computeSimilarityScore(t,i,n);o>0&&s.push({key:e,score:o})}}return s}static termFrequencies(e){var t=yT.splitTerms(e);let i=new Map;for(let e of t)i.set(e,(i.get(e)??0)+1);return i}static*splitTerms(e){let t=e=>e.toLowerCase();for(let[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);let e=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(e.length>1)for(let i of e)i.length>2&&/\p{Letter}{3,}/gu.test(i)&&(yield t(i))}}updateDocuments(e){for(let{key:t}of e)this.deleteDocument(t);for(let t of e){let e=[];for(let i of t.textChunks){let t=yT.termFrequencies(i);for(let e of t.keys())this.chunkOccurrences.set(e,(this.chunkOccurrences.get(e)??0)+1);e.push({text:i,tf:t})}this.chunkCount+=e.length,this.documents.set(t.key,{chunks:e})}return this}deleteDocument(e){let t=this.documents.get(e);if(t)for(let i of(this.documents.delete(e),this.chunkCount-=t.chunks.length,t.chunks))for(let e of i.tf.keys()){let t=this.chunkOccurrences.get(e);if("number"==typeof t){let i=t-1;i<=0?this.chunkOccurrences.delete(e):this.chunkOccurrences.set(e,i)}}}computeSimilarityScore(e,t,i){let n=0;for(let[s,o]of Object.entries(t)){let t=e.tf.get(s);if(!t)continue;let r=i.get(s);"number"!=typeof r&&(r=this.computeIdf(s),i.set(s,r)),n+=t*r*o}return n}computeEmbedding(e){let t=yT.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){let t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){let t=Object.create(null);for(let[i,n]of e){let e=this.computeIdf(i);e>0&&(t[i]=n*e)}return t}}function yR(e){return Array.isArray(e.items)}function yO(e){return!!e.picks&&e.additionalPicks instanceof Promise}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(e0||(e0={}));class yP extends tT.jG{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){let n,s=new tT.Cm;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o=s.add(new tT.HE),r=async()=>{n?.dispose(!0),e.busy=!1;let s=o.value=new tT.Cm,r=(n=s.add(new t6.Qi(t))).token,a=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(a=a.trim());let l=this._getPicks(a,s,r,i),h=(t,i)=>{let n,s;if(yR(t)?(n=t.items,s=t.active):n=t,0===n.length){if(i)return!1;(a.length>0||e.hideInput)&&this.options?.noResultsPick&&(n=(0,iu.Tn)(this.options.noResultsPick)?[this.options.noResultsPick(a)]:[this.options.noResultsPick])}return e.items=n,s&&(e.activeItems=[s]),!0},d=async t=>{let i=!1,n=!1;await Promise.all([(async()=>{("number"!=typeof t.mergeDelay||(await (0,tM.wR)(t.mergeDelay),!r.isCancellationRequested))&&(n||(i=h(t.picks,!0)))})(),(async()=>{e.busy=!0;try{let n,s,o,a,l=await t.additionalPicks;if(r.isCancellationRequested)return;if(yR(t.picks)?(n=t.picks.items,o=t.picks.active):n=t.picks,yR(l)?(s=l.items,a=l.active):s=l,s.length>0||!i){let t;if(!o&&!a){let i=e.activeItems[0];i&&-1!==n.indexOf(i)&&(t=i)}h({items:[...n,...s],active:o||a||t})}}finally{r.isCancellationRequested||(e.busy=!1),n=!0}})()])};if(null===l);else if(yO(l))await d(l);else if(l instanceof Promise){e.busy=!0;try{let e=await l;if(r.isCancellationRequested)return;yO(e)?await d(e):h(e)}finally{r.isCancellationRequested||(e.busy=!1)}}else h(l)};s.add(e.onDidChangeValue(()=>r())),r(),s.add(e.onDidAccept(t=>{if(i?.handleAccept){t.inBackground||e.hide(),i.handleAccept?.(e.activeItems[0],t.inBackground);return}let[n]=e.selectedItems;"function"==typeof n?.accept&&(t.inBackground||e.hide(),n.accept(e.keyMods,t))}));let a=async(i,n)=>{if("function"!=typeof n.trigger)return;let s=n.buttons?.indexOf(i)??-1;if(s>=0){let i=n.trigger(s,e.keyMods),o="number"==typeof i?i:await i;if(t.isCancellationRequested)return;switch(o){case e0.NO_ACTION:break;case e0.CLOSE_PICKER:e.hide();break;case e0.REFRESH_PICKER:r();break;case e0.REMOVE_ITEM:{let t=e.items.indexOf(n);if(-1!==t){let i=e.items.slice(),n=i.splice(t,1),s=e.activeItems.filter(e=>e!==n[0]),o=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,s&&(e.activeItems=s),e.keepScrollPosition=o}}}}};return s.add(e.onDidTriggerItemButton(({button:e,item:t})=>a(e,t))),s.add(e.onDidTriggerSeparatorButton(({button:e,separator:t})=>a(e,t))),s}}var yA=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},yF=function(e,t){return function(i,n){t(i,n,e)}};let yB=class extends yP{static{e1=this}static{this.PREFIX=">"}static{this.TFIDF_THRESHOLD=.5}static{this.TFIDF_MAX_RESULTS=5}static{this.WORD_FILTER=(0,aD.or)(aD.WP,aD.J1,aD.Tt)}constructor(e,t,i,n,s,o){super(e1.PREFIX,e),this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=o,this.commandsHistory=this._register(t.createInstance(yW)),this.options=e}async _getPicks(e,t,i,n){let s=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];let o=(0,yc.P)(()=>{let t=new yT;return t.updateDocuments(s.map(e=>({key:e.commandId,textChunks:[this.getTfIdfChunk(e)]}))),(function(e){let t=e.slice(0);t.sort((e,t)=>t.score-e.score);let i=t[0]?.score??0;if(i>0)for(let e of t)e.score/=i;return t})(t.calculateScores(e,i)).filter(e=>e.score>e1.TFIDF_THRESHOLD).slice(0,e1.TFIDF_MAX_RESULTS)}),r=[];for(let t of s){let n=e1.WORD_FILTER(e,t.label)??void 0,s=t.commandAlias?e1.WORD_FILTER(e,t.commandAlias)??void 0:void 0;if(n||s)t.highlights={label:n,detail:this.options.showAlias?s:void 0},r.push(t);else if(e===t.commandId)r.push(t);else if(e.length>=3){let e=o();if(i.isCancellationRequested)return[];let n=e.find(e=>e.key===t.commandId);n&&(t.tfIdfScore=n.score,r.push(t))}}let a=new Map;for(let e of r){let t=a.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):a.set(e.label,e)}r.sort((e,t)=>{if(e.tfIdfScore&&t.tfIdfScore)return e.tfIdfScore===t.tfIdfScore?e.label.localeCompare(t.label):t.tfIdfScore-e.tfIdfScore;if(e.tfIdfScore)return 1;if(t.tfIdfScore)return -1;let i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return -1;if(n)return 1;if(this.options.suggestedCommandIds){let i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return -1;if(n)return 1}return e.label.localeCompare(t.label)});let l=[],h=!1,d=!0,c=!!this.options.suggestedCommandIds;for(let e=0;e<r.length;e++){let t=r[e];0===e&&this.commandsHistory.peek(t.commandId)&&(l.push({type:"separator",label:(0,tn.kg)(1723,"recently used")}),h=!0),d&&void 0!==t.tfIdfScore&&(l.push({type:"separator",label:(0,tn.kg)(1724,"similar commands")}),d=!1),c&&void 0===t.tfIdfScore&&!this.commandsHistory.peek(t.commandId)&&this.options.suggestedCommandIds?.has(t.commandId)&&(l.push({type:"separator",label:(0,tn.kg)(1725,"commonly used")}),h=!0,c=!1),!h||void 0!==t.tfIdfScore||this.commandsHistory.peek(t.commandId)||this.options.suggestedCommandIds?.has(t.commandId)||(l.push({type:"separator",label:(0,tn.kg)(1726,"other commands")}),h=!1),l.push(this.toCommandPick(t,n))}return this.hasAdditionalCommandPicks(e,i)?{picks:l,additionalPicks:(async()=>{let t=await this.getAdditionalCommandPicks(s,r,e,i);if(i.isCancellationRequested)return[];let o=t.map(e=>this.toCommandPick(e,n));return d&&o[0]?.type!=="separator"&&o.unshift({type:"separator",label:(0,tn.kg)(1727,"similar commands")}),o})()}:l}toCommandPick(e,t){if("separator"===e.type)return e;let i=this.keybindingService.lookupKeybinding(e.commandId),n=i?(0,tn.kg)(1728,"{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(t){(0,ih.MB)(t)||this.dialogService.error((0,tn.kg)(1729,"Command '{0}' resulted in an error",e.label),nc(t))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}};yB=e1=yA([yF(1,t5._Y),yF(2,nf.b),yF(3,tC.d),yF(4,t3.k),yF(5,C3.X)],yB);let yW=class extends tT.jG{static{e2=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}static{this.hasChanges=!1}constructor(e,t,i){super(),this.storageService=e,this.configurationService=t,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===sY.LP.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){(!e||e.affectsConfiguration("workbench.commandPalette.history"))&&(this.configuredCommandsHistoryLength=e2.getConfiguredCommandHistoryLength(this.configurationService),e2.cache&&e2.cache.limit!==this.configuredCommandsHistoryLength&&(e2.cache.limit=this.configuredCommandsHistoryLength,e2.hasChanges=!0))}load(){let e,t=this.storageService.get(e2.PREF_KEY_CACHE,0);if(t)try{e=JSON.parse(t)}catch(e){this.logService.error(`[CommandsHistory] invalid data: ${e}`)}let i=e2.cache=new sQ.qK(this.configuredCommandsHistoryLength,1);e&&(e.usesLRU?e.entries:e.entries.sort((e,t)=>e.value-t.value)).forEach(e=>i.set(e.key,e.value));e2.counter=this.storageService.getNumber(e2.PREF_KEY_COUNTER,0,e2.counter)}push(e){e2.cache&&(e2.cache.set(e,e2.counter++),e2.hasChanges=!0)}peek(e){return e2.cache?.peek(e)}saveState(){if(!e2.cache||!e2.hasChanges)return;let e={usesLRU:!0,entries:[]};e2.cache.forEach((t,i)=>e.entries.push({key:i,value:t})),this.storageService.store(e2.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(e2.PREF_KEY_COUNTER,e2.counter,0,0),e2.hasChanges=!1}static getConfiguredCommandHistoryLength(e){let t=e.getValue(),i=t.workbench?.commandPalette?.history;return"number"==typeof i?i:e2.DEFAULT_COMMANDS_HISTORY_LENGTH}};yW=e2=yA([yF(0,sY.CS),yF(1,to.pG),yF(2,t2.rr)],yW);class yH extends yB{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let i of e.getSupportedActions()){let e;i.metadata?.description&&(e=(0,yM.f)(i.metadata.description)?i.metadata.description:{original:i.metadata.description,value:i.metadata.description}),t.push({commandId:i.id,commandAlias:i.alias,commandDescription:e,label:(0,yE.pS)(i.label)||i.id})}return t}}var yV=function(e,t){return function(i,n){t(i,n,e)}};let yz=class extends yH{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,i,n,s,o){super({showAlias:!1},e,i,n,s,o),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};yz=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yV(0,t5._Y),yV(1,te.T),yV(2,nf.b),yV(3,tC.d),yV(4,t3.k),yV(5,C3.X)],yz);class yU extends e6.ks{static{this.ID="editor.action.quickCommand"}constructor(){super({id:yU.ID,label:w8.gf.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:ti.R.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(ip.GK).quickAccess.show(yz.PREFIX)}}(0,e6.Fl)(yU),iv.O.as(yl.Fd.Quickaccess).registerQuickAccessProvider({ctor:yz,prefix:yz.PREFIX,helpEntries:[{description:w8.gf.quickCommandHelp,commandId:yU.ID}]});var yj=function(e,t){return function(i,n){t(i,n,e)}};let y$=class extends aY{constructor(e,t,i,n,s,o,r){super(!0,e,t,i,n,s,o,r)}};y$=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yj(1,tr.fN),yj(2,te.T),yj(3,nA.Ot),yj(4,t5._Y),yj(5,sY.CS),yj(6,to.pG)],y$),(0,e6.HW)(aY.ID,y$,4);var yK=i(58869);class yG extends e6.ks{constructor(){super({id:"editor.action.toggleHighContrast",label:w8.E6.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let i=e.get(yn.L),n=i.getColorTheme();(0,sp.Bb)(n.type)?(i.setTheme(this._originalThemeName||((0,sp.HD)(n.type)?yK.po:yK.tj)),this._originalThemeName=null):(i.setTheme((0,sp.HD)(n.type)?yK.aQ:yK.nr),this._originalThemeName=n.themeName)}}(0,e6.Fl)(yG);var yq=i(14027),yQ=Object.defineProperty,yY=Object.getOwnPropertyDescriptor,yZ=Object.getOwnPropertyNames,yX=Object.prototype.hasOwnProperty,yJ=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of yZ(t))yX.call(e,s)||s===i||yQ(e,s,{get:()=>t[s],enumerable:!(n=yY(t,s))||n.enumerable});return e},y0={};((e,t,i)=>(yJ(e,t,"default"),i&&yJ(i,t,"default")))(y0,yq);var y1={},y2={},y5=class e{static getOrCreate(t){return y2[t]||(y2[t]=new e(t)),y2[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,y1[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function y4(e){let t=e.id;y1[t]=e,y0.languages.register(e);let i=y5.getOrCreate(t);y0.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),y0.languages.onLanguageEncountered(t,async()=>{let e=await i.load();y0.languages.setLanguageConfiguration(t,e.conf)})}y4({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>i.e(52512).then(i.bind(i,52512))}),y4({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>i.e(89208).then(i.bind(i,89208))}),y4({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>i.e(42942).then(i.bind(i,42942))}),y4({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>i.e(29462).then(i.bind(i,29462))}),y4({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>i.e(98342).then(i.bind(i,98342))}),y4({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>i.e(39974).then(i.bind(i,39974))}),y4({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>i.e(50958).then(i.bind(i,28577))}),y4({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>i.e(45632).then(i.bind(i,45632))}),y4({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>i.e(66930).then(i.bind(i,66930))}),y4({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>i.e(66930).then(i.bind(i,66930))}),y4({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>i.e(8070).then(i.bind(i,85689))}),y4({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>i.e(35678).then(i.bind(i,35678))}),y4({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>i.e(342).then(i.bind(i,342))}),y4({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>i.e(18898).then(i.bind(i,18898))}),y4({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>i.e(72278).then(i.bind(i,72278))}),y4({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>i.e(63464).then(i.bind(i,63464))}),y4({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>i.e(64726).then(i.bind(i,64726))}),y4({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>i.e(69918).then(i.bind(i,69918))}),y4({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>i.e(77094).then(i.bind(i,77094))}),y4({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>i.e(71320).then(i.bind(i,71320))}),y4({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagAutoInterpolationDollar)}),y4({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagAngleInterpolationDollar)}),y4({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagBracketInterpolationDollar)}),y4({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagAngleInterpolationBracket)}),y4({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagBracketInterpolationBracket)}),y4({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagAutoInterpolationDollar)}),y4({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>i.e(70198).then(i.bind(i,70198)).then(e=>e.TagAutoInterpolationBracket)}),y4({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>i.e(71356).then(i.bind(i,71356))}),y4({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>i.e(52182).then(i.bind(i,52182))}),y4({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>i.e(68164).then(i.bind(i,68164))}),y4({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>i.e(98838).then(i.bind(i,98838))}),y4({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>i.e(83990).then(i.bind(i,83990))}),y4({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>i.e(16438).then(i.bind(i,16438))}),y4({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>i.e(32496).then(i.bind(i,32496))}),y4({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>i.e(38598).then(i.bind(i,38598))}),y4({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>i.e(34442).then(i.bind(i,34442))}),y4({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>i.e(26014).then(i.bind(i,26014))}),y4({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>i.e(19638).then(i.bind(i,19638))}),y4({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>i.e(47698).then(i.bind(i,47698))}),y4({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>i.e(57378).then(i.bind(i,57378))}),y4({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>i.e(13424).then(i.bind(i,13424))}),y4({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>i.e(15028).then(i.bind(i,15028))}),y4({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>i.e(41798).then(i.bind(i,41798))}),y4({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>i.e(39206).then(i.bind(i,39206))}),y4({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>i.e(94406).then(i.bind(i,94406))}),y4({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>i.e(61554).then(i.bind(i,61554))}),y4({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>i.e(30986).then(i.bind(i,30986))}),y4({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>i.e(22726).then(i.bind(i,22726))}),y4({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>i.e(28900).then(i.bind(i,28900))}),y4({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>i.e(31318).then(i.bind(i,31318))}),y4({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>i.e(11894).then(i.bind(i,11894))}),y4({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>i.e(16998).then(i.bind(i,16998))}),y4({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>i.e(1750).then(i.bind(i,1750))}),y4({id:"pla",extensions:[".pla"],loader:()=>i.e(80054).then(i.bind(i,80054))}),y4({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>i.e(74950).then(i.bind(i,74950))}),y4({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>i.e(34154).then(i.bind(i,34154))}),y4({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>i.e(29654).then(i.bind(i,29654))}),y4({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>i.e(46214).then(i.bind(i,23833))}),y4({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>i.e(27378).then(i.bind(i,27378))}),y4({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>i.e(24068).then(i.bind(i,24068))}),y4({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>i.e(17302).then(i.bind(i,17302))}),y4({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>i.e(97866).then(i.bind(i,97866))}),y4({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>i.e(99330).then(i.bind(i,99330))}),y4({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>i.e(72150).then(i.bind(i,49769))}),y4({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>i.e(36758).then(i.bind(i,36758))}),y4({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>i.e(15534).then(i.bind(i,15534))}),y4({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>i.e(3200).then(i.bind(i,3200))}),y4({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>i.e(95072).then(i.bind(i,95072))}),y4({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>i.e(38950).then(i.bind(i,38950))}),y4({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>i.e(98774).then(i.bind(i,98774))}),y4({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>i.e(99674).then(i.bind(i,99674))}),y4({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>i.e(77128).then(i.bind(i,77128))}),y4({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>i.e(35794).then(i.bind(i,35794))}),y4({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>i.e(15670).then(i.bind(i,15670))}),y4({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>i.e(23460).then(i.bind(i,23460))}),y4({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>i.e(52470).then(i.bind(i,52470))}),y4({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>i.e(1650).then(i.bind(i,1650))}),y4({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>i.e(19606).then(i.bind(i,19606))}),y4({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>i.e(16214).then(i.bind(i,16214))}),y4({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>i.e(74590).then(i.bind(i,74590))}),y4({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>i.e(74590).then(i.bind(i,74590))}),y4({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>i.e(28822).then(i.bind(i,28822))}),y4({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>i.e(5686).then(i.bind(i,5686))}),y4({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>i.e(23174).then(i.bind(i,23174))}),y4({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>i.e(88730).then(i.bind(i,88730))}),y4({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>i.e(11700).then(i.bind(i,11700))}),y4({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>i.e(50374).then(i.bind(i,50374))}),y4({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>i.e(26654).then(i.bind(i,26654))}),y4({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>i.e(40394).then(i.bind(i,40394))});var y3=Object.defineProperty,y7=Object.getOwnPropertyDescriptor,y9=Object.getOwnPropertyNames,y8=Object.prototype.hasOwnProperty,y6=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of y9(t))y8.call(e,s)||s===i||y3(e,s,{get:()=>t[s],enumerable:!(n=y7(t,s))||n.enumerable});return e},Se={};((e,t,i)=>(y6(e,t,"default"),i&&y6(i,t,"default")))(Se,yq);var St=class{constructor(e,t,i){this._onDidChange=new Se.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},Si={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},Sn={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},Ss=new St("css",Si,Sn),So=new St("scss",Si,Sn),Sr=new St("less",Si,Sn);function Sa(){return i.e(65759).then(i.bind(i,65759))}Se.languages.css={cssDefaults:Ss,lessDefaults:Sr,scssDefaults:So},Se.languages.onLanguage("less",()=>{Sa().then(e=>e.setupMode(Sr))}),Se.languages.onLanguage("scss",()=>{Sa().then(e=>e.setupMode(So))}),Se.languages.onLanguage("css",()=>{Sa().then(e=>e.setupMode(Ss))});var Sl=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,Sd=Object.getOwnPropertyNames,Sc=Object.prototype.hasOwnProperty,Su=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of Sd(t))Sc.call(e,s)||s===i||Sl(e,s,{get:()=>t[s],enumerable:!(n=Sh(t,s))||n.enumerable});return e},Sg={};((e,t,i)=>(Su(e,t,"default"),i&&Su(i,t,"default")))(Sg,yq);var Sp=class{constructor(e,t,i){this._onDidChange=new Sg.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},Sm={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},suggest:{},data:{useDefaultDataProvider:!0}};function Sf(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===S_,documentFormattingEdits:e===S_,documentRangeFormattingEdits:e===S_}}var S_="html",Sv="handlebars",Sb="razor",SC=SL(S_,Sm,Sf(S_)),Sw=SC.defaults,Sy=SL(Sv,Sm,Sf(Sv)),SS=Sy.defaults,Sk=SL(Sb,Sm,Sf(Sb)),Sx=Sk.defaults;function SL(e,t=Sm,n=Sf(e)){let s,o=new Sp(e,t,n),r=Sg.languages.onLanguage(e,async()=>{s=(await i.e(43071).then(i.bind(i,43071))).setupMode(o)});return{defaults:o,dispose(){r.dispose(),s?.dispose(),s=void 0}}}Sg.languages.html={htmlDefaults:Sw,razorDefaults:Sx,handlebarDefaults:SS,htmlLanguageService:SC,handlebarLanguageService:Sy,razorLanguageService:Sk,registerHTMLLanguageService:SL};var SD=Object.defineProperty,SI=Object.getOwnPropertyDescriptor,SN=Object.getOwnPropertyNames,SE=Object.prototype.hasOwnProperty,SM=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of SN(t))SE.call(e,s)||s===i||SD(e,s,{get:()=>t[s],enumerable:!(n=SI(t,s))||n.enumerable});return e},ST={};((e,t,i)=>(SM(e,t,"default"),i&&SM(i,t,"default")))(ST,yq);var SR=new class{constructor(e,t,i){this._onDidChange=new ST.Emitter,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function SO(){return i.e(40733).then(i.bind(i,40733))}ST.languages.json={jsonDefaults:SR,getWorker:()=>SO().then(e=>e.getWorker())},ST.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),ST.languages.onLanguage("json",()=>{SO().then(e=>e.setupMode(SR))}),i(96612);var SP=Object.defineProperty,SA=Object.getOwnPropertyDescriptor,SF=Object.getOwnPropertyNames,SB=Object.prototype.hasOwnProperty,SW=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of SF(t))SB.call(e,s)||s===i||SP(e,s,{get:()=>t[s],enumerable:!(n=SA(t,s))||n.enumerable});return e},SH={};((e,t,i)=>(SW(e,t,"default"),i&&SW(i,t,"default")))(SH,e4),e5="object"==typeof self&&self.constructor&&"DedicatedWorkerGlobalScope"===self.constructor.name&&void 0!==globalThis.workerttPolicy?globalThis.workerttPolicy:function(e,t){let i=globalThis.MonacoEnvironment;if(i?.createTrustedTypesPolicy)try{return i.createTrustedTypesPolicy(e,t)}catch(e){console.error(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){console.error(e);return}}("defaultWorkerFactory",{createScriptURL:e=>e});var SV=yq.editor.createWebWorker;yq.editor.createWebWorker=function(e){if(void 0===e.worker){let t=Promise.resolve(function(e){let t=e.label,i=globalThis.MonacoEnvironment;if(i){if("function"==typeof i.getWorker)return i.getWorker("workerMain.js",t);if("function"==typeof i.getWorkerUrl){let e=i.getWorkerUrl("workerMain.js",t);return new Worker(e5?e5.createScriptURL(e):e,{name:t,type:"module"})}}throw Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}({label:e.label??"monaco-editor-worker",moduleId:e.moduleId})).then(t=>(t.postMessage("ignore"),t.postMessage(e.createData),t));return SH.editor.createWebWorker({worker:t,host:e.host,keepIdleModels:e.keepIdleModels})}return SV(e)}},23315:(e,t,i)=>{"use strict";i.d(t,{Yh:()=>r,QM:()=>o});var n,s,o,r,a=i(15957),l=i(29195),h=i(95751),d=i(91523),c=i(50518),u=i(89597),g=i(6849),p=i(72553),m=i(23047);class f{static columnSelect(e,t,i,n,s,o){let r=Math.abs(s-i)+1,a=i>s,l=n>o,h=n<o,d=[];for(let s=0;s<r;s++){let r=i+(a?-s:s),c=e.columnFromVisibleColumn(t,r,n),u=e.columnFromVisibleColumn(t,r,o),f=e.visibleColumnFromColumn(t,new p.y(r,c)),_=e.visibleColumnFromColumn(t,new p.y(r,u));if(!h||!(f>o)&&!(_<n))l&&(_>n||f<o)||d.push(new g.mG(new m.Q(r,c,r,c),0,0,new p.y(r,u),0))}if(0===d.length)for(let e=0;e<r;e++){let n=i+(a?-e:e),s=t.getLineMaxColumn(n);d.push(new g.mG(new m.Q(n,s,n,s),0,0,new p.y(n,s),0))}return{viewStates:d,reversed:a,fromLineNumber:i,fromVisualColumn:n,toLineNumber:s,toVisualColumn:o}}static columnSelectLeft(e,t,i){let n=i.toViewVisualColumn;return n>0&&n--,f.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0,s=Math.min(i.fromViewLineNumber,i.toViewLineNumber),o=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=s;i<=o;i++){let s=t.getLineMaxColumn(i);n=Math.max(n,e.visibleColumnFromColumn(t,new p.y(i,s)))}let r=i.toViewVisualColumn;return r<n&&r++,this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,r)}static columnSelectUp(e,t,i,n){let s=n?e.pageSize:1,o=Math.max(1,i.toViewLineNumber-s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}static columnSelectDown(e,t,i,n){let s=n?e.pageSize:1,o=Math.min(t.getLineCount(),i.toViewLineNumber+s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}}var _=i(70986),v=i(9020),b=i(91461),C=i(42506),w=i(8820),y=i(18983),S=i(87899),k=i(69745);class x extends c.DX{runEditorCommand(e,t,i){let n=t._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}}!function(e){e.metadata={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:`Property-value pairs that can be passed through this argument:
456
456
  * 'to': A mandatory direction value.
457
457
  \`\`\`
458
458
  'up', 'down'