homebridge-config-ui-x 5.4.2-beta.16 → 5.4.2-beta.18

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 (148) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/core/auth/auth.controller.d.ts +1 -0
  3. package/dist/core/config/config.service.d.ts +3 -1
  4. package/dist/core/config/config.service.js +3 -2
  5. package/dist/core/config/config.service.js.map +1 -1
  6. package/dist/core/config/config.startup.d.ts +1 -0
  7. package/dist/core/config/config.startup.js +13 -3
  8. package/dist/core/config/config.startup.js.map +1 -1
  9. package/dist/core/spa/spa-html.service.d.ts +6 -0
  10. package/dist/core/spa/spa-html.service.js +40 -0
  11. package/dist/core/spa/spa-html.service.js.map +1 -0
  12. package/dist/core/spa/spa.filter.d.ts +2 -0
  13. package/dist/core/spa/spa.filter.js +17 -2
  14. package/dist/core/spa/spa.filter.js.map +1 -1
  15. package/dist/main.js +8 -3
  16. package/dist/main.js.map +1 -1
  17. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +1 -1
  18. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
  19. package/package.json +2 -2
  20. package/public/3rdpartylicenses.txt +13 -13
  21. package/public/assets/{monaco-0.52.2 → monaco}/min/vs/editor/editor.main.js +2 -2
  22. package/public/chunk-2GGT3SCW.js +1 -0
  23. package/public/{chunk-R7Y5ACQC.js → chunk-32KCOXXZ.js} +1 -1
  24. package/public/chunk-3ASJ4MIQ.js +1 -0
  25. package/public/chunk-3EJ4YUT7.js +1 -0
  26. package/public/chunk-3FGCHUZM.js +14 -0
  27. package/public/chunk-3LEW5FOJ.js +5 -0
  28. package/public/{chunk-UXALHV57.js → chunk-3O4LZ4AU.js} +1 -1
  29. package/public/chunk-52XZH5I7.js +40 -0
  30. package/public/{chunk-5TCYRJ6A.js → chunk-5WYRGCHF.js} +1 -1
  31. package/public/{chunk-Y7TNTIU3.js → chunk-67XMBTDZ.js} +2 -2
  32. package/public/chunk-6IDARBAH.js +1 -0
  33. package/public/chunk-6IWX4WEC.js +1 -0
  34. package/public/chunk-6N2TL3OX.js +49 -0
  35. package/public/{chunk-7OTNPUAL.js → chunk-7BJOEXZM.js} +1 -1
  36. package/public/{chunk-UHWT4HS2.js → chunk-AEEAPTXE.js} +1 -1
  37. package/public/{chunk-7BRVYYLY.js → chunk-AM53KSWA.js} +1 -1
  38. package/public/chunk-B5AUZBPY.js +1 -0
  39. package/public/{chunk-RYEUSRBX.js → chunk-BQMDK4YS.js} +2 -2
  40. package/public/chunk-C2ZPBNQL.js +1 -0
  41. package/public/{chunk-BU65ZOCD.js → chunk-CCHRGHTT.js} +1 -1
  42. package/public/{chunk-ZHPB347D.js → chunk-CIVLN3HQ.js} +1 -1
  43. package/public/{chunk-LPHTUMGC.js → chunk-CTYK4ZDT.js} +1 -1
  44. package/public/chunk-CWUYV4M6.js +20 -0
  45. package/public/chunk-D5OC6INP.js +1 -0
  46. package/public/chunk-DQ7H34Z3.js +3 -0
  47. package/public/chunk-EG2BFE2Y.js +1 -0
  48. package/public/{chunk-YATJTZML.js → chunk-EWO5Q2EI.js} +2 -2
  49. package/public/{chunk-NJOBXAPT.js → chunk-F3ULAZ4E.js} +1 -1
  50. package/public/chunk-FUFVCM4C.js +1 -0
  51. package/public/chunk-FZOVQ6IV.js +1 -0
  52. package/public/{chunk-MZ3XHPWZ.js → chunk-G634JYE2.js} +1 -1
  53. package/public/chunk-GUYJYCPC.js +1 -0
  54. package/public/chunk-H46D5ZZJ.js +1 -0
  55. package/public/{chunk-UGMDVR5V.js → chunk-HKOQ2LLE.js} +1 -1
  56. package/public/chunk-HUFUZTYU.js +1 -0
  57. package/public/chunk-IMUVCFNG.js +1 -0
  58. package/public/{chunk-D4JH4N33.js → chunk-IZN5MQII.js} +1 -1
  59. package/public/chunk-JI2XCHZB.js +1 -0
  60. package/public/chunk-JIAI6UD2.js +1 -0
  61. package/public/chunk-JXA6UYVW.js +1 -0
  62. package/public/{chunk-77JZBWAC.js → chunk-KNZTEJFP.js} +1 -1
  63. package/public/{chunk-V2P2FPJ7.js → chunk-KXMDG63G.js} +1 -1
  64. package/public/chunk-M2QSAMEV.js +1 -0
  65. package/public/{chunk-BSUFNH7A.js → chunk-M7Q6VBJE.js} +1 -1
  66. package/public/chunk-MDV2S56W.js +1 -0
  67. package/public/chunk-MVMZJM7B.js +9 -0
  68. package/public/chunk-NL5SKXRN.js +1 -0
  69. package/public/chunk-P4J7BQSF.js +1 -0
  70. package/public/{chunk-4JYGIYS6.js → chunk-PPRLJYJ7.js} +1 -1
  71. package/public/chunk-Q4376TC7.js +1 -0
  72. package/public/{chunk-QANVBO6M.js → chunk-QASANAGE.js} +1 -1
  73. package/public/chunk-QB7TEMX6.js +1 -0
  74. package/public/chunk-QKPDOQGQ.js +1 -0
  75. package/public/chunk-QMZFJZUI.js +1 -0
  76. package/public/chunk-R62RXKVZ.js +1 -0
  77. package/public/chunk-RHRWOYZU.js +1 -0
  78. package/public/chunk-RXBLFIBQ.js +1 -0
  79. package/public/chunk-SAPS6TFT.js +2 -0
  80. package/public/chunk-TKZ4YETU.js +1 -0
  81. package/public/{chunk-VNC5PDW7.js → chunk-UHCPPCOX.js} +1 -1
  82. package/public/chunk-VB7ZRXBC.js +1 -0
  83. package/public/{chunk-5B52GCDR.js → chunk-VSXAF6OX.js} +1 -1
  84. package/public/{chunk-2Z6NQOGB.js → chunk-WE3P5M5D.js} +1 -1
  85. package/public/chunk-WGHBOXD2.js +1 -0
  86. package/public/chunk-X2I5H52N.js +1 -0
  87. package/public/chunk-X5P2VUQB.js +1 -0
  88. package/public/chunk-XCXIKCFK.js +1 -0
  89. package/public/index.html +1 -1
  90. package/public/main-5CDFLH5S.js +1 -0
  91. package/public/polyfills-5KWHJ7II.js +2 -0
  92. package/public/assets/monaco-0.52.2/package.json +0 -82
  93. package/public/chunk-3F43PTVJ.js +0 -1
  94. package/public/chunk-3XFUWJGL.js +0 -3
  95. package/public/chunk-5B67RG5C.js +0 -1
  96. package/public/chunk-5KYV52LA.js +0 -1
  97. package/public/chunk-5YAMEU34.js +0 -1
  98. package/public/chunk-64DAPDF5.js +0 -1
  99. package/public/chunk-6GMXEQVA.js +0 -2
  100. package/public/chunk-6L4EKOQR.js +0 -1
  101. package/public/chunk-6XYLN2ON.js +0 -1
  102. package/public/chunk-72S6Y4C6.js +0 -1
  103. package/public/chunk-AE7VAWOU.js +0 -9
  104. package/public/chunk-BME7RDQX.js +0 -1
  105. package/public/chunk-BOEVHF5F.js +0 -1
  106. package/public/chunk-BYKIXKPO.js +0 -1
  107. package/public/chunk-C3MIVQCG.js +0 -1
  108. package/public/chunk-D3JHDB7S.js +0 -1
  109. package/public/chunk-DTWH4S27.js +0 -1
  110. package/public/chunk-EFN7OX2S.js +0 -20
  111. package/public/chunk-EZT3MKU2.js +0 -1
  112. package/public/chunk-FTPY4VTW.js +0 -1
  113. package/public/chunk-G7FA4DP4.js +0 -1
  114. package/public/chunk-GWXZ52WY.js +0 -14
  115. package/public/chunk-GYWHA4UG.js +0 -1
  116. package/public/chunk-H36QJYLQ.js +0 -4
  117. package/public/chunk-IHAZUOLN.js +0 -1
  118. package/public/chunk-IOTUAYMI.js +0 -49
  119. package/public/chunk-KCNLYISY.js +0 -1
  120. package/public/chunk-KOXRTPFB.js +0 -2
  121. package/public/chunk-KX3XFNU5.js +0 -1
  122. package/public/chunk-M2B6ISLX.js +0 -1
  123. package/public/chunk-NO5LCM63.js +0 -1
  124. package/public/chunk-OQGXXIW6.js +0 -1
  125. package/public/chunk-PB2PC33B.js +0 -1
  126. package/public/chunk-QXJDN2Q4.js +0 -40
  127. package/public/chunk-SAJTB4SR.js +0 -1
  128. package/public/chunk-TGMGUP4S.js +0 -1
  129. package/public/chunk-TGOCI72Q.js +0 -1
  130. package/public/chunk-TXP3432G.js +0 -1
  131. package/public/chunk-UOLP7IQJ.js +0 -1
  132. package/public/chunk-V3FPDJGI.js +0 -1
  133. package/public/chunk-VPCF2YXB.js +0 -1
  134. package/public/chunk-VY4A2U5R.js +0 -1
  135. package/public/chunk-WUPGTEQ4.js +0 -1
  136. package/public/chunk-Y3IHDNS4.js +0 -1
  137. package/public/chunk-ZTPRJUZ6.js +0 -1
  138. package/public/main-NLDH6GYP.js +0 -1
  139. package/public/polyfills-WE4HA5DL.js +0 -2
  140. /package/public/assets/{monaco-0.52.2 → monaco}/LICENSE +0 -0
  141. /package/public/assets/{monaco-0.52.2 → monaco}/ThirdPartyNotices.txt +0 -0
  142. /package/public/assets/{monaco-0.52.2 → monaco}/min/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  143. /package/public/assets/{monaco-0.52.2 → monaco}/min/vs/base/worker/workerMain.js +0 -0
  144. /package/public/assets/{monaco-0.52.2 → monaco}/min/vs/basic-languages/shell/shell.js +0 -0
  145. /package/public/assets/{monaco-0.52.2 → monaco}/min/vs/editor/editor.main.css +0 -0
  146. /package/public/assets/{monaco-0.52.2 → monaco}/min/vs/language/json/jsonMode.js +0 -0
  147. /package/public/assets/{monaco-0.52.2 → monaco}/min/vs/language/json/jsonWorker.js +0 -0
  148. /package/public/assets/{monaco-0.52.2 → monaco}/min/vs/loader.js +0 -0
@@ -598,7 +598,7 @@ ${S(t.Codicon.menuSubmenu)}
598
598
  background: ${O};
599
599
  }
600
600
  `)}return M}}),define(ne[643],se([1,0,87,359,41,26,30,6,2,3,44,477]),function(oe,e,d,k,I,E,y,m,_,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMenuAction=e.ToolBar=void 0;class n extends _.Disposable{constructor(i,s,g={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new m.EventMultiplexer),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new _.DisposableStore),g.hoverDelegate=g.hoverDelegate??this._register((0,p.createInstantHoverDelegate)()),this.options=g,this.toggleMenuAction=this._register(new o(()=>this.toggleMenuActionViewItem?.show(),g.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",i.appendChild(this.element),this.actionBar=this._register(new d.ActionBar(this.element,{orientation:g.orientation,ariaLabel:g.ariaLabel,actionRunner:g.actionRunner,allowContextMenu:g.allowContextMenu,highlightToggledItems:g.highlightToggledItems,hoverDelegate:g.hoverDelegate,actionViewItemProvider:(c,l)=>{if(c.id===o.ID)return this.toggleMenuActionViewItem=new k.DropdownMenuActionViewItem(c,c.menuActions,s,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:y.ThemeIcon.asClassNameArray(g.moreIcon??E.Codicon.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(g.actionViewItemProvider){const a=g.actionViewItemProvider(c,l);if(a)return a}if(c instanceof I.SubmenuAction){const a=new k.DropdownMenuActionViewItem(c,c.actions,s,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:c.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}set actionRunner(i){this.actionBar.actionRunner=i}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(i){return this.actionBar.getAction(i)}setActions(i,s){this.clear();const g=i?i.slice(0):[];this.hasSecondaryActions=!!(s&&s.length>0),this.hasSecondaryActions&&s&&(this.toggleMenuAction.menuActions=s.slice(0),g.push(this.toggleMenuAction)),g.forEach(c=>{this.actionBar.push(c,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(c)})})}getKeybindingLabel(i){return this.options.getKeyBinding?.(i)?.getLabel()??void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}e.ToolBar=n;class o extends I.Action{static{this.ID="toolbar.toggle.more"}constructor(i,s){s=s||b.localize(17,"More Actions..."),super(o.ID,s,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=i}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(i){this._menuActions=i}}e.ToggleMenuAction=o}),define(ne[176],se([1,0,5,93,47,87,260,259,257,115,175,249,159,41,13,14,26,30,45,6,82,2,141,19,3,44,21,46,478]),function(oe,e,d,k,I,E,y,m,_,b,p,n,o,t,i,s,g,c,l,a,r,u,C,f,h,v,w,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTree=e.TreeFindMatchType=e.TreeFindMode=e.FuzzyToggle=e.ModeToggle=e.TreeRenderer=e.RenderIndentGuides=e.ComposedTreeDelegate=void 0;class L extends _.ElementsDragAndDropData{constructor(B){super(B.elements.map($=>$.element)),this.data=B}}function D(X){return X instanceof _.ElementsDragAndDropData?new L(X):X}class T{constructor(B,$){this.modelProvider=B,this.dnd=$,this.autoExpandDisposable=u.Disposable.None,this.disposables=new u.DisposableStore}getDragURI(B){return this.dnd.getDragURI(B.element)}getDragLabel(B,$){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(B.map(Q=>Q.element),$)}onDragStart(B,$){this.dnd.onDragStart?.(D(B),$)}onDragOver(B,$,Q,Z,te,re=!0){const le=this.dnd.onDragOver(D(B),$&&$.element,Q,Z,te),me=this.autoExpandNode!==$;if(me&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=$),typeof $>"u")return le;if(me&&typeof le!="boolean"&&le.autoExpand&&(this.autoExpandDisposable=(0,s.disposableTimeout)(()=>{const Me=this.modelProvider(),Ae=Me.getNodeLocation($);Me.isCollapsed(Ae)&&Me.setCollapsed(Ae,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof le=="boolean"||!le.accept||typeof le.bubble>"u"||le.feedback){if(!re){const Me=typeof le=="boolean"?le:le.accept,Ae=typeof le=="boolean"?void 0:le.effect;return{accept:Me,effect:Ae,feedback:[Q]}}return le}if(le.bubble===1){const Me=this.modelProvider(),Ae=Me.getNodeLocation($),Ne=Me.getParentNodeLocation(Ae),Ke=Me.getNode(Ne),ze=Ne&&Me.getListIndex(Ne);return this.onDragOver(B,Ke,ze,Z,te,!1)}const Ce=this.modelProvider(),ye=Ce.getNodeLocation($),Le=Ce.getListIndex(ye),Ee=Ce.getListRenderCount(ye);return{...le,feedback:(0,i.range)(Le,Le+Ee)}}drop(B,$,Q,Z,te){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(D(B),$&&$.element,Q,Z,te)}onDragEnd(B){this.dnd.onDragEnd?.(B)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function M(X,B){return B&&{...B,identityProvider:B.identityProvider&&{getId($){return B.identityProvider.getId($.element)}},dnd:B.dnd&&new T(X,B.dnd),multipleSelectionController:B.multipleSelectionController&&{isSelectionSingleChangeEvent($){return B.multipleSelectionController.isSelectionSingleChangeEvent({...$,element:$.element})},isSelectionRangeChangeEvent($){return B.multipleSelectionController.isSelectionRangeChangeEvent({...$,element:$.element})}},accessibilityProvider:B.accessibilityProvider&&{...B.accessibilityProvider,getSetSize($){const Q=X(),Z=Q.getNodeLocation($),te=Q.getParentNodeLocation(Z);return Q.getNode(te).visibleChildrenCount},getPosInSet($){return $.visibleChildIndex+1},isChecked:B.accessibilityProvider&&B.accessibilityProvider.isChecked?$=>B.accessibilityProvider.isChecked($.element):void 0,getRole:B.accessibilityProvider&&B.accessibilityProvider.getRole?$=>B.accessibilityProvider.getRole($.element):()=>"treeitem",getAriaLabel($){return B.accessibilityProvider.getAriaLabel($.element)},getWidgetAriaLabel(){return B.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:B.accessibilityProvider&&B.accessibilityProvider.getWidgetRole?()=>B.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:B.accessibilityProvider&&B.accessibilityProvider.getAriaLevel?$=>B.accessibilityProvider.getAriaLevel($.element):$=>$.depth,getActiveDescendantId:B.accessibilityProvider.getActiveDescendantId&&($=>B.accessibilityProvider.getActiveDescendantId($.element))},keyboardNavigationLabelProvider:B.keyboardNavigationLabelProvider&&{...B.keyboardNavigationLabelProvider,getKeyboardNavigationLabel($){return B.keyboardNavigationLabelProvider.getKeyboardNavigationLabel($.element)}}}}class A{constructor(B){this.delegate=B}getHeight(B){return this.delegate.getHeight(B.element)}getTemplateId(B){return this.delegate.getTemplateId(B.element)}hasDynamicHeight(B){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(B.element)}setDynamicHeight(B,$){this.delegate.setDynamicHeight?.(B.element,$)}}e.ComposedTreeDelegate=A;var P;(function(X){X.None="none",X.OnHover="onHover",X.Always="always"})(P||(e.RenderIndentGuides=P={}));class N{get elements(){return this._elements}constructor(B,$=[]){this._elements=$,this.disposables=new u.DisposableStore,this.onDidChange=a.Event.forEach(B,Q=>this._elements=Q,this.disposables)}dispose(){this.disposables.dispose()}}class O{static{this.DefaultIndent=8}constructor(B,$,Q,Z,te,re={}){this.renderer=B,this.modelProvider=$,this.activeNodes=Z,this.renderedIndentGuides=te,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=O.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=u.Disposable.None,this.disposables=new u.DisposableStore,this.templateId=B.templateId,this.updateOptions(re),a.Event.map(Q,le=>le.node)(this.onDidChangeNodeTwistieState,this,this.disposables),B.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(B={}){if(typeof B.indent<"u"){const $=(0,C.clamp)(B.indent,0,40);if($!==this.indent){this.indent=$;for(const[Q,Z]of this.renderedNodes)this.renderTreeElement(Q,Z)}}if(typeof B.renderIndentGuides<"u"){const $=B.renderIndentGuides!==P.None;if($!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=$;for(const[Q,Z]of this.renderedNodes)this._renderIndentGuides(Q,Z);if(this.indentGuidesDisposable.dispose(),$){const Q=new u.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,Q),this.indentGuidesDisposable=Q,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof B.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=B.hideTwistiesOfChildlessElements)}renderTemplate(B){const $=(0,d.append)(B,(0,d.$)(".monaco-tl-row")),Q=(0,d.append)($,(0,d.$)(".monaco-tl-indent")),Z=(0,d.append)($,(0,d.$)(".monaco-tl-twistie")),te=(0,d.append)($,(0,d.$)(".monaco-tl-contents")),re=this.renderer.renderTemplate(te);return{container:B,indent:Q,twistie:Z,indentGuidesDisposable:u.Disposable.None,templateData:re}}renderElement(B,$,Q,Z){this.renderedNodes.set(B,Q),this.renderedElements.set(B.element,B),this.renderTreeElement(B,Q),this.renderer.renderElement(B,$,Q.templateData,Z)}disposeElement(B,$,Q,Z){Q.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(B,$,Q.templateData,Z),typeof Z=="number"&&(this.renderedNodes.delete(B),this.renderedElements.delete(B.element))}disposeTemplate(B){this.renderer.disposeTemplate(B.templateData)}onDidChangeTwistieState(B){const $=this.renderedElements.get(B);$&&this.onDidChangeNodeTwistieState($)}onDidChangeNodeTwistieState(B){const $=this.renderedNodes.get(B);$&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(B,$))}renderTreeElement(B,$){const Q=O.DefaultIndent+(B.depth-1)*this.indent;$.twistie.style.paddingLeft=`${Q}px`,$.indent.style.width=`${Q+this.indent-16}px`,B.collapsible?$.container.setAttribute("aria-expanded",String(!B.collapsed)):$.container.removeAttribute("aria-expanded"),$.twistie.classList.remove(...c.ThemeIcon.asClassNameArray(g.Codicon.treeItemExpanded));let Z=!1;this.renderer.renderTwistie&&(Z=this.renderer.renderTwistie(B.element,$.twistie)),B.collapsible&&(!this.hideTwistiesOfChildlessElements||B.visibleChildrenCount>0)?(Z||$.twistie.classList.add(...c.ThemeIcon.asClassNameArray(g.Codicon.treeItemExpanded)),$.twistie.classList.add("collapsible"),$.twistie.classList.toggle("collapsed",B.collapsed)):$.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(B,$)}_renderIndentGuides(B,$){if((0,d.clearNode)($.indent),$.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const Q=new u.DisposableStore,Z=this.modelProvider();for(;;){const te=Z.getNodeLocation(B),re=Z.getParentNodeLocation(te);if(!re)break;const le=Z.getNode(re),me=(0,d.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(le)&&me.classList.add("active"),$.indent.childElementCount===0?$.indent.appendChild(me):$.indent.insertBefore(me,$.indent.firstElementChild),this.renderedIndentGuides.add(le,me),Q.add((0,u.toDisposable)(()=>this.renderedIndentGuides.delete(le,me))),B=le}$.indentGuidesDisposable=Q}_onDidChangeActiveNodes(B){if(!this.shouldRenderIndentGuides)return;const $=new Set,Q=this.modelProvider();B.forEach(Z=>{const te=Q.getNodeLocation(Z);try{const re=Q.getParentNodeLocation(te);Z.collapsible&&Z.children.length>0&&!Z.collapsed?$.add(Z):re&&$.add(Q.getNode(re))}catch{}}),this.activeIndentNodes.forEach(Z=>{$.has(Z)||this.renderedIndentGuides.forEach(Z,te=>te.classList.remove("active"))}),$.forEach(Z=>{this.activeIndentNodes.has(Z)||this.renderedIndentGuides.forEach(Z,te=>te.classList.add("active"))}),this.activeIndentNodes=$}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,u.dispose)(this.disposables)}}e.TreeRenderer=O;class F{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(B,$,Q){this.tree=B,this.keyboardNavigationLabelProvider=$,this._filter=Q,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new u.DisposableStore,B.onWillRefilter(this.reset,this,this.disposables)}filter(B,$){let Q=1;if(this._filter){const re=this._filter.filter(B,$);if(typeof re=="boolean"?Q=re?1:0:(0,n.isFilterResult)(re)?Q=(0,n.getVisibleState)(re.visibility):Q=re,Q===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:r.FuzzyScore.Default,visibility:Q};const Z=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(B),te=Array.isArray(Z)?Z:[Z];for(const re of te){const le=re&&re.toString();if(typeof le>"u")return{data:r.FuzzyScore.Default,visibility:Q};let me;if(this.tree.findMatchType===H.Contiguous){const Ce=le.toLowerCase().indexOf(this._lowercasePattern);if(Ce>-1){me=[Number.MAX_SAFE_INTEGER,0];for(let ye=this._lowercasePattern.length;ye>0;ye--)me.push(Ce+ye-1)}}else me=(0,r.fuzzyScore)(this._pattern,this._lowercasePattern,0,le,le.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(me)return this._matchCount++,te.length===1?{data:me,visibility:Q}:{data:{label:le,score:me},visibility:Q}}return this.tree.findMode===q.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(B):2:{data:r.FuzzyScore.Default,visibility:Q}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,u.dispose)(this.disposables)}}class x extends p.Toggle{constructor(B){super({icon:g.Codicon.listFilter,title:(0,h.localize)(18,"Filter"),isChecked:B.isChecked??!1,hoverDelegate:B.hoverDelegate??(0,v.getDefaultHoverDelegate)("element"),inputActiveOptionBorder:B.inputActiveOptionBorder,inputActiveOptionForeground:B.inputActiveOptionForeground,inputActiveOptionBackground:B.inputActiveOptionBackground})}}e.ModeToggle=x;class W extends p.Toggle{constructor(B){super({icon:g.Codicon.searchFuzzy,title:(0,h.localize)(19,"Fuzzy Match"),isChecked:B.isChecked??!1,hoverDelegate:B.hoverDelegate??(0,v.getDefaultHoverDelegate)("element"),inputActiveOptionBorder:B.inputActiveOptionBorder,inputActiveOptionForeground:B.inputActiveOptionForeground,inputActiveOptionBackground:B.inputActiveOptionBackground})}}e.FuzzyToggle=W;const V={inputBoxStyles:m.unthemedInboxStyles,toggleStyles:p.unthemedToggleStyles,listFilterWidgetBackground:void 0,listFilterWidgetNoMatchesOutline:void 0,listFilterWidgetOutline:void 0,listFilterWidgetShadow:void 0};var q;(function(X){X[X.Highlight=0]="Highlight",X[X.Filter=1]="Filter"})(q||(e.TreeFindMode=q={}));var H;(function(X){X[X.Fuzzy=0]="Fuzzy",X[X.Contiguous=1]="Contiguous"})(H||(e.TreeFindMatchType=H={}));class z extends u.Disposable{set mode(B){this.modeToggle.checked=B===q.Filter,this.findInput.inputBox.setPlaceHolder(B===q.Filter?(0,h.localize)(20,"Type to filter"):(0,h.localize)(21,"Type to search"))}set matchType(B){this.matchTypeToggle.checked=B===H.Fuzzy}constructor(B,$,Q,Z,te,re){super(),this.tree=$,this.elements=(0,d.h)(".monaco-tree-type-filter",[(0,d.h)(".monaco-tree-type-filter-grab.codicon.codicon-debug-gripper@grab",{tabIndex:0}),(0,d.h)(".monaco-tree-type-filter-input@findInput"),(0,d.h)(".monaco-tree-type-filter-actionbar@actionbar")]),this.width=0,this.right=0,this.top=0,this._onDidDisable=new a.Emitter,B.appendChild(this.elements.root),this._register((0,u.toDisposable)(()=>this.elements.root.remove()));const le=re?.styles??V;le.listFilterWidgetBackground&&(this.elements.root.style.backgroundColor=le.listFilterWidgetBackground),le.listFilterWidgetShadow&&(this.elements.root.style.boxShadow=`0 0 8px 2px ${le.listFilterWidgetShadow}`);const me=this._register((0,v.createInstantHoverDelegate)());this.modeToggle=this._register(new x({...le.toggleStyles,isChecked:Z===q.Filter,hoverDelegate:me})),this.matchTypeToggle=this._register(new W({...le.toggleStyles,isChecked:te===H.Fuzzy,hoverDelegate:me})),this.onDidChangeMode=a.Event.map(this.modeToggle.onChange,()=>this.modeToggle.checked?q.Filter:q.Highlight,this._store),this.onDidChangeMatchType=a.Event.map(this.matchTypeToggle.onChange,()=>this.matchTypeToggle.checked?H.Fuzzy:H.Contiguous,this._store),this.findInput=this._register(new y.FindInput(this.elements.findInput,Q,{label:(0,h.localize)(22,"Type to search"),additionalToggles:[this.modeToggle,this.matchTypeToggle],showCommonFindToggles:!1,inputBoxStyles:le.inputBoxStyles,toggleStyles:le.toggleStyles,history:re?.history})),this.actionbar=this._register(new E.ActionBar(this.elements.actionbar)),this.mode=Z;const Ce=this._register(new k.DomEmitter(this.findInput.inputBox.inputElement,"keydown")),ye=a.Event.chain(Ce.event,Ae=>Ae.map(Ne=>new I.StandardKeyboardEvent(Ne)));this._register(ye(Ae=>{if(Ae.equals(3)){Ae.preventDefault(),Ae.stopPropagation(),this.findInput.inputBox.addToHistory(),this.tree.domFocus();return}if(Ae.equals(18)){Ae.preventDefault(),Ae.stopPropagation(),this.findInput.inputBox.isAtLastInHistory()||this.findInput.inputBox.isNowhereInHistory()?(this.findInput.inputBox.addToHistory(),this.tree.domFocus()):this.findInput.inputBox.showNextValue();return}if(Ae.equals(16)){Ae.preventDefault(),Ae.stopPropagation(),this.findInput.inputBox.showPreviousValue();return}}));const Le=this._register(new t.Action("close",(0,h.localize)(23,"Close"),"codicon codicon-close",!0,()=>this.dispose()));this.actionbar.push(Le,{icon:!0,label:!1});const Ee=this._register(new k.DomEmitter(this.elements.grab,"mousedown"));this._register(Ee.event(Ae=>{const Ne=new u.DisposableStore,Ke=Ne.add(new k.DomEmitter((0,d.getWindow)(Ae),"mousemove")),ze=Ne.add(new k.DomEmitter((0,d.getWindow)(Ae),"mouseup")),Ge=this.right,it=Ae.pageX,Oe=this.top,Fe=Ae.pageY;this.elements.grab.classList.add("grabbing");const fe=this.elements.root.style.transition;this.elements.root.style.transition="unset";const _e=xe=>{const be=xe.pageX-it;this.right=Ge-be;const ve=xe.pageY-Fe;this.top=Oe+ve,this.layout()};Ne.add(Ke.event(_e)),Ne.add(ze.event(xe=>{_e(xe),this.elements.grab.classList.remove("grabbing"),this.elements.root.style.transition=fe,Ne.dispose()}))}));const Me=a.Event.chain(this._register(new k.DomEmitter(this.elements.grab,"keydown")).event,Ae=>Ae.map(Ne=>new I.StandardKeyboardEvent(Ne)));this._register(Me(Ae=>{let Ne,Ke;if(Ae.keyCode===15?Ne=Number.POSITIVE_INFINITY:Ae.keyCode===17?Ne=0:Ae.keyCode===10&&(Ne=this.right===0?Number.POSITIVE_INFINITY:0),Ae.keyCode===16?Ke=0:Ae.keyCode===18&&(Ke=Number.POSITIVE_INFINITY),Ne!==void 0&&(Ae.preventDefault(),Ae.stopPropagation(),this.right=Ne,this.layout()),Ke!==void 0){Ae.preventDefault(),Ae.stopPropagation(),this.top=Ke;const ze=this.elements.root.style.transition;this.elements.root.style.transition="unset",this.layout(),setTimeout(()=>{this.elements.root.style.transition=ze},0)}})),this.onDidChangeValue=this.findInput.onDidChange}layout(B=this.width){this.width=B,this.right=(0,C.clamp)(this.right,0,Math.max(0,B-212)),this.elements.root.style.right=`${this.right}px`,this.top=(0,C.clamp)(this.top,0,24),this.elements.root.style.top=`${this.top}px`}showMessage(B){this.findInput.showMessage(B)}clearMessage(){this.findInput.clearMessage()}async dispose(){this._onDidDisable.fire(),this.elements.root.classList.add("disabled"),await(0,s.timeout)(300),super.dispose()}}class U{get pattern(){return this._pattern}get mode(){return this._mode}set mode(B){B!==this._mode&&(this._mode=B,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(B))}get matchType(){return this._matchType}set matchType(B){B!==this._matchType&&(this._matchType=B,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(B))}constructor(B,$,Q,Z,te,re={}){this.tree=B,this.view=Q,this.filter=Z,this.contextViewProvider=te,this.options=re,this._pattern="",this.width=0,this._onDidChangeMode=new a.Emitter,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new a.Emitter,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new a.Emitter,this._onDidChangeOpenState=new a.Emitter,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new u.DisposableStore,this.disposables=new u.DisposableStore,this._mode=B.options.defaultFindMode??q.Highlight,this._matchType=B.options.defaultFindMatchType??H.Fuzzy,$.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(B={}){B.defaultFindMode!==void 0&&(this.mode=B.defaultFindMode),B.defaultFindMatchType!==void 0&&(this.matchType=B.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){const B=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&B?((0,S.alert)((0,h.localize)(24,"No results")),this.tree.options.showNotFoundMessage??!0?this.widget?.showMessage({type:2,content:(0,h.localize)(25,"No elements found.")}):this.widget?.showMessage({type:2})):(this.widget?.clearMessage(),this.pattern&&(0,S.alert)((0,h.localize)(26,"{0} results",this.filter.matchCount)))}shouldAllowFocus(B){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!r.FuzzyScore.isDefault(B.filterData)}layout(B){this.width=B,this.widget?.layout(B)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function j(X,B){return X.position===B.position&&Y(X,B)}function Y(X,B){return X.node.element===B.node.element&&X.startIndex===B.startIndex&&X.height===B.height&&X.endIndex===B.endIndex}class G{constructor(B=[]){this.stickyNodes=B}get count(){return this.stickyNodes.length}equal(B){return(0,i.equals)(this.stickyNodes,B.stickyNodes,j)}lastNodePartiallyVisible(){if(this.count===0)return!1;const B=this.stickyNodes[this.count-1];if(this.count===1)return B.position!==0;const $=this.stickyNodes[this.count-2];return $.position+$.height!==B.position}animationStateChanged(B){if(!(0,i.equals)(this.stickyNodes,B.stickyNodes,Y)||this.count===0)return!1;const $=this.stickyNodes[this.count-1],Q=B.stickyNodes[B.count-1];return $.position!==Q.position}}class K{constrainStickyScrollNodes(B,$,Q){for(let Z=0;Z<B.length;Z++){const te=B[Z];if(te.position+te.height>Q||Z>=$)return B.slice(0,Z)}return B}}class R extends u.Disposable{constructor(B,$,Q,Z,te,re={}){super(),this.tree=B,this.model=$,this.view=Q,this.treeDelegate=te,this.maxWidgetViewRatio=.4;const le=this.validateStickySettings(re);this.stickyScrollMaxItemCount=le.stickyScrollMaxItemCount,this.stickyScrollDelegate=re.stickyScrollDelegate??new K,this._widget=this._register(new J(Q.getScrollableElement(),Q,B,Z,te,re.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(Q.onDidScroll(()=>this.update())),this._register(Q.onDidChangeContentHeight(()=>this.update())),this._register(B.onDidChangeCollapseState(()=>this.update())),this.update()}get height(){return this._widget.height}getNodeAtHeight(B){let $;if(B===0?$=this.view.firstVisibleIndex:$=this.view.indexAt(B+this.view.scrollTop),!($<0||$>=this.view.length))return this.view.element($)}update(){const B=this.getNodeAtHeight(0);if(!B||this.tree.scrollTop===0){this._widget.setState(void 0);return}const $=this.findStickyState(B);this._widget.setState($)}findStickyState(B){const $=[];let Q=B,Z=0,te=this.getNextStickyNode(Q,void 0,Z);for(;te&&($.push(te),Z+=te.height,!($.length<=this.stickyScrollMaxItemCount&&(Q=this.getNextVisibleNode(te),!Q)));)te=this.getNextStickyNode(Q,te.node,Z);const re=this.constrainStickyNodes($);return re.length?new G(re):void 0}getNextVisibleNode(B){return this.getNodeAtHeight(B.position+B.height)}getNextStickyNode(B,$,Q){const Z=this.getAncestorUnderPrevious(B,$);if(Z&&!(Z===B&&(!this.nodeIsUncollapsedParent(B)||this.nodeTopAlignsWithStickyNodesBottom(B,Q))))return this.createStickyScrollNode(Z,Q)}nodeTopAlignsWithStickyNodesBottom(B,$){const Q=this.getNodeIndex(B),Z=this.view.getElementTop(Q),te=$;return this.view.scrollTop===Z-te}createStickyScrollNode(B,$){const Q=this.treeDelegate.getHeight(B),{startIndex:Z,endIndex:te}=this.getNodeRange(B),re=this.calculateStickyNodePosition(te,$,Q);return{node:B,position:re,height:Q,startIndex:Z,endIndex:te}}getAncestorUnderPrevious(B,$=void 0){let Q=B,Z=this.getParentNode(Q);for(;Z;){if(Z===$)return Q;Q=Z,Z=this.getParentNode(Q)}if($===void 0)return Q}calculateStickyNodePosition(B,$,Q){let Z=this.view.getRelativeTop(B);if(Z===null&&this.view.firstVisibleIndex===B&&B+1<this.view.length){const Ce=this.treeDelegate.getHeight(this.view.element(B)),ye=this.view.getRelativeTop(B+1);Z=ye?ye-Ce/this.view.renderHeight:null}if(Z===null)return $;const te=this.view.element(B),re=this.treeDelegate.getHeight(te),me=Z*this.view.renderHeight+re;return $+Q>me&&$<=me?me-Q:$}constrainStickyNodes(B){if(B.length===0)return[];const $=this.view.renderHeight*this.maxWidgetViewRatio,Q=B[B.length-1];if(B.length<=this.stickyScrollMaxItemCount&&Q.position+Q.height<=$)return B;const Z=this.stickyScrollDelegate.constrainStickyScrollNodes(B,this.stickyScrollMaxItemCount,$);if(!Z.length)return[];const te=Z[Z.length-1];if(Z.length>this.stickyScrollMaxItemCount||te.position+te.height>$)throw new Error("stickyScrollDelegate violates constraints");return Z}getParentNode(B){const $=this.model.getNodeLocation(B),Q=this.model.getParentNodeLocation($);return Q?this.model.getNode(Q):void 0}nodeIsUncollapsedParent(B){const $=this.model.getNodeLocation(B);return this.model.getListRenderCount($)>1}getNodeIndex(B){const $=this.model.getNodeLocation(B);return this.model.getListIndex($)}getNodeRange(B){const $=this.model.getNodeLocation(B),Q=this.model.getListIndex($);if(Q<0)throw new Error("Node not found in tree");const Z=this.model.getListRenderCount($),te=Q+Z-1;return{startIndex:Q,endIndex:te}}nodePositionTopBelowWidget(B){const $=[];let Q=this.getParentNode(B);for(;Q;)$.push(Q),Q=this.getParentNode(Q);let Z=0;for(let te=0;te<$.length&&te<this.stickyScrollMaxItemCount;te++)Z+=this.treeDelegate.getHeight($[te]);return Z}domFocus(){this._widget.domFocus()}focusedLast(){return this._widget.focusedLast()}updateOptions(B={}){if(!B.stickyScrollMaxItemCount)return;const $=this.validateStickySettings(B);this.stickyScrollMaxItemCount!==$.stickyScrollMaxItemCount&&(this.stickyScrollMaxItemCount=$.stickyScrollMaxItemCount,this.update())}validateStickySettings(B){let $=7;return typeof B.stickyScrollMaxItemCount=="number"&&($=Math.max(B.stickyScrollMaxItemCount,1)),{stickyScrollMaxItemCount:$}}}class J{constructor(B,$,Q,Z,te,re){this.view=$,this.tree=Q,this.treeRenderers=Z,this.treeDelegate=te,this.accessibilityProvider=re,this._previousElements=[],this._previousStateDisposables=new u.DisposableStore,this._rootDomNode=(0,d.$)(".monaco-tree-sticky-container.empty"),B.appendChild(this._rootDomNode);const le=(0,d.$)(".monaco-tree-sticky-container-shadow");this._rootDomNode.appendChild(le),this.stickyScrollFocus=new ie(this._rootDomNode,$),this.onDidChangeHasFocus=this.stickyScrollFocus.onDidChangeHasFocus,this.onContextMenu=this.stickyScrollFocus.onContextMenu}get height(){if(!this._previousState)return 0;const B=this._previousState.stickyNodes[this._previousState.count-1];return B.position+B.height}setState(B){const $=!!this._previousState&&this._previousState.count>0,Q=!!B&&B.count>0;if(!$&&!Q||$&&Q&&this._previousState.equal(B))return;if($!==Q&&this.setVisible(Q),!Q){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}const Z=B.stickyNodes[B.count-1];if(this._previousState&&B.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${Z.position}px`;else{this._previousStateDisposables.clear();const te=Array(B.count);for(let re=B.count-1;re>=0;re--){const le=B.stickyNodes[re],{element:me,disposable:Ce}=this.createElement(le,re,B.count);te[re]=me,this._rootDomNode.appendChild(me),this._previousStateDisposables.add(Ce)}this.stickyScrollFocus.updateElements(te,B),this._previousElements=te}this._previousState=B,this._rootDomNode.style.height=`${Z.position+Z.height}px`}createElement(B,$,Q){const Z=B.startIndex,te=document.createElement("div");te.style.top=`${B.position}px`,this.tree.options.setRowHeight!==!1&&(te.style.height=`${B.height}px`),this.tree.options.setRowLineHeight!==!1&&(te.style.lineHeight=`${B.height}px`),te.classList.add("monaco-tree-sticky-row"),te.classList.add("monaco-list-row"),te.setAttribute("data-index",`${Z}`),te.setAttribute("data-parity",Z%2===0?"even":"odd"),te.setAttribute("id",this.view.getElementID(Z));const re=this.setAccessibilityAttributes(te,B.node.element,$,Q),le=this.treeDelegate.getTemplateId(B.node),me=this.treeRenderers.find(Ee=>Ee.templateId===le);if(!me)throw new Error(`No renderer found for template id ${le}`);let Ce=B.node;Ce===this.tree.getNode(this.tree.getNodeLocation(B.node))&&(Ce=new Proxy(B.node,{}));const ye=me.renderTemplate(te);me.renderElement(Ce,B.startIndex,ye,B.height);const Le=(0,u.toDisposable)(()=>{re.dispose(),me.disposeElement(Ce,B.startIndex,ye,B.height),me.disposeTemplate(ye),te.remove()});return{element:te,disposable:Le}}setAccessibilityAttributes(B,$,Q,Z){if(!this.accessibilityProvider)return u.Disposable.None;this.accessibilityProvider.getSetSize&&B.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize($,Q,Z))),this.accessibilityProvider.getPosInSet&&B.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet($,Q))),this.accessibilityProvider.getRole&&B.setAttribute("role",this.accessibilityProvider.getRole($)??"treeitem");const te=this.accessibilityProvider.getAriaLabel($),re=te&&typeof te!="string"?te:(0,w.constObservable)(te),le=(0,w.autorun)(Ce=>{const ye=Ce.readObservable(re);ye?B.setAttribute("aria-label",ye):B.removeAttribute("aria-label")});typeof te=="string"||te&&B.setAttribute("aria-label",te.get());const me=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel($);return typeof me=="number"&&B.setAttribute("aria-level",`${me}`),B.setAttribute("aria-selected",String(!1)),le}setVisible(B){this._rootDomNode.classList.toggle("empty",!B),B||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}}class ie extends u.Disposable{get domHasFocus(){return this._domHasFocus}set domHasFocus(B){B!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(B),this._domHasFocus=B)}constructor(B,$){super(),this.container=B,this.view=$,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new a.Emitter,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new a.Emitter,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register((0,d.addDisposableListener)(this.container,"focus",()=>this.onFocus())),this._register((0,d.addDisposableListener)(this.container,"blur",()=>this.onBlur())),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(Q=>this.onKeyDown(Q))),this._register(this.view.onMouseDown(Q=>this.onMouseDown(Q))),this._register(this.view.onContextMenu(Q=>this.handleContextMenu(Q)))}handleContextMenu(B){const $=B.browserEvent.target;if(!(0,b.isStickyScrollContainer)($)&&!(0,b.isStickyScrollElement)($)){this.focusedLast()&&this.view.domFocus();return}if(!(0,d.isKeyboardEvent)(B.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const re=this.state.stickyNodes.findIndex(le=>le.node.element===B.element?.element);if(re===-1)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(re);return}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");const Z=this.state.stickyNodes[this.focusedIndex].node.element,te=this.elements[this.focusedIndex];this._onContextMenu.fire({element:Z,anchor:te,browserEvent:B.browserEvent,isStickyScroll:!0})}onKeyDown(B){if(this.domHasFocus&&this.state){if(B.key==="ArrowUp")this.setFocusedElement(Math.max(0,this.focusedIndex-1)),B.preventDefault(),B.stopPropagation();else if(B.key==="ArrowDown"||B.key==="ArrowRight"){if(this.focusedIndex>=this.state.count-1){const $=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([$]),this.scrollNodeUnderWidget($,this.state)}else this.setFocusedElement(this.focusedIndex+1);B.preventDefault(),B.stopPropagation()}}}onMouseDown(B){const $=B.browserEvent.target;!(0,b.isStickyScrollContainer)($)&&!(0,b.isStickyScrollElement)($)||(B.browserEvent.preventDefault(),B.browserEvent.stopPropagation())}updateElements(B,$){if($&&$.count===0)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if($&&$.count!==B.length)throw new Error("Sticky scroll focus received illigel state");const Q=this.focusedIndex;if(this.removeFocus(),this.elements=B,this.state=$,$){const Z=(0,C.clamp)(Q,0,$.count-1);this.setFocus(Z)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=$?0:-1}setFocusedElement(B){const $=this.state;if(!$)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(B),!(B<$.count-1)&&$.lastNodePartiallyVisible()){const Q=$.stickyNodes[B];this.scrollNodeUnderWidget(Q.endIndex+1,$)}}scrollNodeUnderWidget(B,$){const Q=$.stickyNodes[$.count-1],Z=$.count>1?$.stickyNodes[$.count-2]:void 0,te=this.view.getElementTop(B),re=Z?Z.position+Z.height+Q.height:Q.height;this.view.scrollTop=te-re}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return this.state?this.view.getHTMLElement().classList.contains("sticky-scroll-focused"):!1}removeFocus(){this.focusedIndex!==-1&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(B){if(0>B)throw new Error("addFocus() can not remove focus");if(!this.state&&B>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&B>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");const $=this.focusedIndex;$>=0&&this.toggleElementFocus(this.elements[$],!1),B>=0&&this.toggleElementFocus(this.elements[B],!0),this.focusedIndex=B}toggleElementFocus(B,$){this.toggleElementActiveFocus(B,$&&this.domHasFocus),this.toggleElementPassiveFocus(B,$)}toggleCurrentElementActiveFocus(B){this.focusedIndex!==-1&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],B)}toggleElementActiveFocus(B,$){B.classList.toggle("focused",$)}toggleElementPassiveFocus(B,$){B.classList.toggle("passive-focused",$)}toggleStickyScrollFocused(B){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",B)}onFocus(){if(!this.state||this.elements.length===0)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),this.focusedIndex===-1&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function ue(X){let B=o.TreeMouseEventTarget.Unknown;return(0,d.hasParentWithClass)(X.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?B=o.TreeMouseEventTarget.Twistie:(0,d.hasParentWithClass)(X.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?B=o.TreeMouseEventTarget.Element:(0,d.hasParentWithClass)(X.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(B=o.TreeMouseEventTarget.Filter),{browserEvent:X.browserEvent,element:X.element?X.element.element:null,target:B}}function he(X){const B=(0,b.isStickyScrollContainer)(X.browserEvent.target);return{element:X.element?X.element.element:null,browserEvent:X.browserEvent,anchor:X.anchor,isStickyScroll:B}}function pe(X,B){B(X),X.children.forEach($=>pe($,B))}class ae{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(B,$){this.getFirstViewElementWithTrait=B,this.identityProvider=$,this.nodes=[],this._onDidChange=new a.Emitter,this.onDidChange=this._onDidChange.event}set(B,$){!$?.__forceEvent&&(0,i.equals)(this.nodes,B)||this._set(B,!1,$)}_set(B,$,Q){if(this.nodes=[...B],this.elements=void 0,this._nodeSet=void 0,!$){const Z=this;this._onDidChange.fire({get elements(){return Z.get()},browserEvent:Q})}}get(){return this.elements||(this.elements=this.nodes.map(B=>B.element)),[...this.elements]}getNodes(){return this.nodes}has(B){return this.nodeSet.has(B)}onDidModelSplice({insertedNodes:B,deletedNodes:$}){if(!this.identityProvider){const me=this.createNodeSet(),Ce=ye=>me.delete(ye);$.forEach(ye=>pe(ye,Ce)),this.set([...me.values()]);return}const Q=new Set,Z=me=>Q.add(this.identityProvider.getId(me.element).toString());$.forEach(me=>pe(me,Z));const te=new Map,re=me=>te.set(this.identityProvider.getId(me.element).toString(),me);B.forEach(me=>pe(me,re));const le=[];for(const me of this.nodes){const Ce=this.identityProvider.getId(me.element).toString();if(!Q.has(Ce))le.push(me);else{const Le=te.get(Ce);Le&&Le.visible&&le.push(Le)}}if(this.nodes.length>0&&le.length===0){const me=this.getFirstViewElementWithTrait();me&&le.push(me)}this._set(le,!0)}createNodeSet(){const B=new Set;for(const $ of this.nodes)B.add($);return B}}class ee extends b.MouseController{constructor(B,$,Q){super(B),this.tree=$,this.stickyScrollProvider=Q}onViewPointer(B){if((0,b.isButton)(B.browserEvent.target)||(0,b.isInputElement)(B.browserEvent.target)||(0,b.isMonacoEditor)(B.browserEvent.target)||B.browserEvent.isHandledByList)return;const $=B.element;if(!$)return super.onViewPointer(B);if(this.isSelectionRangeChangeEvent(B)||this.isSelectionSingleChangeEvent(B))return super.onViewPointer(B);const Q=B.browserEvent.target,Z=Q.classList.contains("monaco-tl-twistie")||Q.classList.contains("monaco-icon-label")&&Q.classList.contains("folder-icon")&&B.browserEvent.offsetX<16,te=(0,b.isStickyScrollElement)(B.browserEvent.target);let re=!1;if(te?re=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?re=this.tree.expandOnlyOnTwistieClick($.element):re=!!this.tree.expandOnlyOnTwistieClick,te)this.handleStickyScrollMouseEvent(B,$);else{if(re&&!Z&&B.browserEvent.detail!==2)return super.onViewPointer(B);if(!this.tree.expandOnDoubleClick&&B.browserEvent.detail===2)return super.onViewPointer(B)}if($.collapsible&&(!te||Z)){const le=this.tree.getNodeLocation($),me=B.browserEvent.altKey;if(this.tree.setFocus([le]),this.tree.toggleCollapsed(le,me),Z){B.browserEvent.isHandledByList=!0;return}}te||super.onViewPointer(B)}handleStickyScrollMouseEvent(B,$){if((0,b.isMonacoCustomToggle)(B.browserEvent.target)||(0,b.isActionItem)(B.browserEvent.target))return;const Q=this.stickyScrollProvider();if(!Q)throw new Error("Sticky scroll controller not found");const Z=this.list.indexOf($),te=this.list.getElementTop(Z),re=Q.nodePositionTopBelowWidget($);this.tree.scrollTop=te-re,this.list.domFocus(),this.list.setFocus([Z]),this.list.setSelection([Z])}onDoubleClick(B){B.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||B.browserEvent.isHandledByList||super.onDoubleClick(B)}onMouseDown(B){const $=B.browserEvent.target;if(!(0,b.isStickyScrollContainer)($)&&!(0,b.isStickyScrollElement)($)){super.onMouseDown(B);return}}onContextMenu(B){const $=B.browserEvent.target;if(!(0,b.isStickyScrollContainer)($)&&!(0,b.isStickyScrollElement)($)){super.onContextMenu(B);return}}}class de extends b.List{constructor(B,$,Q,Z,te,re,le,me){super(B,$,Q,Z,me),this.focusTrait=te,this.selectionTrait=re,this.anchorTrait=le}createMouseController(B){return new ee(this,B.tree,B.stickyScrollProvider)}splice(B,$,Q=[]){if(super.splice(B,$,Q),Q.length===0)return;const Z=[],te=[];let re;Q.forEach((le,me)=>{this.focusTrait.has(le)&&Z.push(B+me),this.selectionTrait.has(le)&&te.push(B+me),this.anchorTrait.has(le)&&(re=B+me)}),Z.length>0&&super.setFocus((0,i.distinct)([...super.getFocus(),...Z])),te.length>0&&super.setSelection((0,i.distinct)([...super.getSelection(),...te])),typeof re=="number"&&super.setAnchor(re)}setFocus(B,$,Q=!1){super.setFocus(B,$),Q||this.focusTrait.set(B.map(Z=>this.element(Z)),$)}setSelection(B,$,Q=!1){super.setSelection(B,$),Q||this.selectionTrait.set(B.map(Z=>this.element(Z)),$)}setAnchor(B,$=!1){super.setAnchor(B),$||(typeof B>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(B)]))}}class ge{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return a.Event.filter(a.Event.map(this.view.onMouseDblClick,ue),B=>B.target!==o.TreeMouseEventTarget.Filter)}get onMouseOver(){return a.Event.map(this.view.onMouseOver,ue)}get onMouseOut(){return a.Event.map(this.view.onMouseOut,ue)}get onContextMenu(){return a.Event.any(a.Event.filter(a.Event.map(this.view.onContextMenu,he),B=>!B.isStickyScroll),this.stickyScrollController?.onContextMenu??a.Event.None)}get onPointer(){return a.Event.map(this.view.onPointer,ue)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return a.Event.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){return this.findController?.mode??q.Highlight}set findMode(B){this.findController&&(this.findController.mode=B)}get findMatchType(){return this.findController?.matchType??H.Fuzzy}set findMatchType(B){this.findController&&(this.findController.matchType=B)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(B,$,Q,Z,te={}){this._user=B,this._options=te,this.eventBufferer=new a.EventBufferer,this.onDidChangeFindOpenState=a.Event.None,this.onDidChangeStickyScrollFocused=a.Event.None,this.disposables=new u.DisposableStore,this._onWillRefilter=new a.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new a.Emitter,this.treeDelegate=new A(Q);const re=new a.Relay,le=new a.Relay,me=this.disposables.add(new N(le.event)),Ce=new l.SetMap;this.renderers=Z.map(Ae=>new O(Ae,()=>this.model,re.event,me,Ce,te));for(const Ae of this.renderers)this.disposables.add(Ae);let ye;te.keyboardNavigationLabelProvider&&(ye=new F(this,te.keyboardNavigationLabelProvider,te.filter),te={...te,filter:ye},this.disposables.add(ye)),this.focus=new ae(()=>this.view.getFocusedElements()[0],te.identityProvider),this.selection=new ae(()=>this.view.getSelectedElements()[0],te.identityProvider),this.anchor=new ae(()=>this.view.getAnchorElement(),te.identityProvider),this.view=new de(B,$,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...M(()=>this.model,te),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(B,this.view,te),re.input=this.model.onDidChangeCollapseState;const Le=a.Event.forEach(this.model.onDidSplice,Ae=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(Ae),this.selection.onDidModelSplice(Ae)})},this.disposables);Le(()=>null,null,this.disposables);const Ee=this.disposables.add(new a.Emitter),Me=this.disposables.add(new s.Delayer(0));if(this.disposables.add(a.Event.any(Le,this.focus.onDidChange,this.selection.onDidChange)(()=>{Me.trigger(()=>{const Ae=new Set;for(const Ne of this.focus.getNodes())Ae.add(Ne);for(const Ne of this.selection.getNodes())Ae.add(Ne);Ee.fire([...Ae.values()])})})),le.input=Ee.event,te.keyboardSupport!==!1){const Ae=a.Event.chain(this.view.onKeyDown,Ne=>Ne.filter(Ke=>!(0,b.isInputElement)(Ke.target)).map(Ke=>new I.StandardKeyboardEvent(Ke)));a.Event.chain(Ae,Ne=>Ne.filter(Ke=>Ke.keyCode===15))(this.onLeftArrow,this,this.disposables),a.Event.chain(Ae,Ne=>Ne.filter(Ke=>Ke.keyCode===17))(this.onRightArrow,this,this.disposables),a.Event.chain(Ae,Ne=>Ne.filter(Ke=>Ke.keyCode===10))(this.onSpace,this,this.disposables)}if((te.findWidgetEnabled??!0)&&te.keyboardNavigationLabelProvider&&te.contextViewProvider){const Ae=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new U(this,this.model,this.view,ye,te.contextViewProvider,Ae),this.focusNavigationFilter=Ne=>this.findController.shouldAllowFocus(Ne),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=a.Event.None,this.onDidChangeFindMatchType=a.Event.None;te.enableStickyScroll&&(this.stickyScrollController=new R(this,this.model,this.view,this.renderers,this.treeDelegate,te),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=(0,d.createStyleSheet)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===P.Always)}updateOptions(B={}){this._options={...this._options,...B};for(const $ of this.renderers)$.updateOptions(B);this.view.updateOptions(this._options),this.findController?.updateOptions(B),this.updateStickyScroll(B),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===P.Always)}get options(){return this._options}updateStickyScroll(B){!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new R(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=a.Event.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),this.stickyScrollController?.updateOptions(B)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(B){this.view.scrollTop=B}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(B){this.view.ariaLabel=B}domFocus(){this.stickyScrollController?.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(B,$){this.view.layout(B,$),(0,f.isNumber)($)&&this.findController?.layout($)}style(B){const $=`.${this.view.domId}`,Q=[];B.treeIndentGuidesStroke&&(Q.push(`.monaco-list${$}:hover .monaco-tl-indent > .indent-guide, .monaco-list${$}.always .monaco-tl-indent > .indent-guide { border-color: ${B.treeInactiveIndentGuidesStroke}; }`),Q.push(`.monaco-list${$} .monaco-tl-indent > .indent-guide.active { border-color: ${B.treeIndentGuidesStroke}; }`));const Z=B.treeStickyScrollBackground??B.listBackground;Z&&(Q.push(`.monaco-list${$} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${Z}; }`),Q.push(`.monaco-list${$} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${Z}; }`)),B.treeStickyScrollBorder&&Q.push(`.monaco-list${$} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${B.treeStickyScrollBorder}; }`),B.treeStickyScrollShadow&&Q.push(`.monaco-list${$} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${B.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),B.listFocusForeground&&(Q.push(`.monaco-list${$}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${B.listFocusForeground}; }`),Q.push(`.monaco-list${$}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const te=(0,d.asCssValueWithDefault)(B.listFocusAndSelectionOutline,(0,d.asCssValueWithDefault)(B.listSelectionOutline,B.listFocusOutline??""));te&&(Q.push(`.monaco-list${$}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${te}; outline-offset: -1px;}`),Q.push(`.monaco-list${$}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),B.listFocusOutline&&(Q.push(`.monaco-list${$}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${B.listFocusOutline}; outline-offset: -1px; }`),Q.push(`.monaco-list${$}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),Q.push(`.monaco-workbench.context-menu-visible .monaco-list${$}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${B.listFocusOutline}; outline-offset: -1px; }`),Q.push(`.monaco-workbench.context-menu-visible .monaco-list${$}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),Q.push(`.monaco-workbench.context-menu-visible .monaco-list${$}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=Q.join(`
601
- `),this.view.style(B)}getParentElement(B){const $=this.model.getParentNodeLocation(B);return this.model.getNode($).element}getFirstElementChild(B){return this.model.getFirstElementChild(B)}getNode(B){return this.model.getNode(B)}getNodeLocation(B){return this.model.getNodeLocation(B)}collapse(B,$=!1){return this.model.setCollapsed(B,!0,$)}expand(B,$=!1){return this.model.setCollapsed(B,!1,$)}toggleCollapsed(B,$=!1){return this.model.setCollapsed(B,void 0,$)}isCollapsible(B){return this.model.isCollapsible(B)}setCollapsible(B,$){return this.model.setCollapsible(B,$)}isCollapsed(B){return this.model.isCollapsed(B)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(B,$){this.eventBufferer.bufferEvents(()=>{const Q=B.map(te=>this.model.getNode(te));this.selection.set(Q,$);const Z=B.map(te=>this.model.getListIndex(te)).filter(te=>te>-1);this.view.setSelection(Z,$,!0)})}getSelection(){return this.selection.get()}setFocus(B,$){this.eventBufferer.bufferEvents(()=>{const Q=B.map(te=>this.model.getNode(te));this.focus.set(Q,$);const Z=B.map(te=>this.model.getListIndex(te)).filter(te=>te>-1);this.view.setFocus(Z,$,!0)})}focusNext(B=1,$=!1,Q,Z=(0,d.isKeyboardEvent)(Q)&&Q.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(B,$,Q,Z)}focusPrevious(B=1,$=!1,Q,Z=(0,d.isKeyboardEvent)(Q)&&Q.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(B,$,Q,Z)}focusNextPage(B,$=(0,d.isKeyboardEvent)(B)&&B.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(B,$)}focusPreviousPage(B,$=(0,d.isKeyboardEvent)(B)&&B.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(B,$,()=>this.stickyScrollController?.height??0)}focusLast(B,$=(0,d.isKeyboardEvent)(B)&&B.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(B,$)}focusFirst(B,$=(0,d.isKeyboardEvent)(B)&&B.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(B,$)}getFocus(){return this.focus.get()}reveal(B,$){this.model.expandTo(B);const Q=this.model.getListIndex(B);if(Q!==-1)if(!this.stickyScrollController)this.view.reveal(Q,$);else{const Z=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(B));this.view.reveal(Q,$,Z)}}onLeftArrow(B){B.preventDefault(),B.stopPropagation();const $=this.view.getFocusedElements();if($.length===0)return;const Q=$[0],Z=this.model.getNodeLocation(Q);if(!this.model.setCollapsed(Z,!0)){const re=this.model.getParentNodeLocation(Z);if(!re)return;const le=this.model.getListIndex(re);this.view.reveal(le),this.view.setFocus([le])}}onRightArrow(B){B.preventDefault(),B.stopPropagation();const $=this.view.getFocusedElements();if($.length===0)return;const Q=$[0],Z=this.model.getNodeLocation(Q);if(!this.model.setCollapsed(Z,!1)){if(!Q.children.some(me=>me.visible))return;const[re]=this.view.getFocus(),le=re+1;this.view.reveal(le),this.view.setFocus([le])}}onSpace(B){B.preventDefault(),B.stopPropagation();const $=this.view.getFocusedElements();if($.length===0)return;const Q=$[0],Z=this.model.getNodeLocation(Q),te=B.browserEvent.altKey;this.model.setCollapsed(Z,void 0,te)}dispose(){(0,u.dispose)(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose()}}e.AbstractTree=ge}),define(ne[644],se([1,0,176,250]),function(oe,e,d,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class I extends d.AbstractTree{constructor(y,m,_,b,p,n={}){super(y,m,_,b,n),this.user=y,this.dataSource=p,this.identityProvider=n.identityProvider}createModel(y,m,_){return new k.ObjectTreeModel(y,m,_)}}e.DataTree=I}),define(ne[360],se([1,0,176,627,250,126,53]),function(oe,e,d,k,I,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTree=e.ObjectTree=void 0;class m extends d.AbstractTree{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(t,i,s,g,c={}){super(t,i,s,g,c),this.user=t}setChildren(t,i=y.Iterable.empty(),s){this.model.setChildren(t,i,s)}rerender(t){if(t===void 0){this.view.rerender();return}this.model.rerender(t)}hasElement(t){return this.model.has(t)}createModel(t,i,s){return new I.ObjectTreeModel(t,i,s)}}e.ObjectTree=m;class _{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(t,i,s){this._compressedTreeNodeProvider=t,this.stickyScrollDelegate=i,this.renderer=s,this.templateId=s.templateId,s.onDidChangeTwistieState&&(this.onDidChangeTwistieState=s.onDidChangeTwistieState)}renderTemplate(t){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(t)}}renderElement(t,i,s,g){let c=this.stickyScrollDelegate.getCompressedNode(t);c||(c=this.compressedTreeNodeProvider.getCompressedTreeNode(t.element)),c.element.elements.length===1?(s.compressedTreeNode=void 0,this.renderer.renderElement(t,i,s.data,g)):(s.compressedTreeNode=c,this.renderer.renderCompressedElements(c,i,s.data,g))}disposeElement(t,i,s,g){s.compressedTreeNode?this.renderer.disposeCompressedElements?.(s.compressedTreeNode,i,s.data,g):this.renderer.disposeElement?.(t,i,s.data,g)}disposeTemplate(t){this.renderer.disposeTemplate(t.data)}renderTwistie(t,i){return this.renderer.renderTwistie?this.renderer.renderTwistie(t,i):!1}}ke([E.memoize],_.prototype,"compressedTreeNodeProvider",null);class b{constructor(t){this.modelProvider=t,this.compressedStickyNodes=new Map}getCompressedNode(t){return this.compressedStickyNodes.get(t)}constrainStickyScrollNodes(t,i,s){if(this.compressedStickyNodes.clear(),t.length===0)return[];for(let g=0;g<t.length;g++){const c=t[g],l=c.position+c.height;if(g+1<t.length&&l+t[g+1].height>s||g>=i-1&&i<t.length){const r=t.slice(0,g),u=t.slice(g),C=this.compressStickyNodes(u);return[...r,C]}}return t}compressStickyNodes(t){if(t.length===0)throw new Error("Can't compress empty sticky nodes");const i=this.modelProvider();if(!i.isCompressionEnabled())return t[0];const s=[];for(let u=0;u<t.length;u++){const C=t[u],f=i.getCompressedTreeNode(C.node.element);if(f.element){if(u!==0&&f.element.incompressible)break;s.push(...f.element.elements)}}if(s.length<2)return t[0];const g=t[t.length-1],c={elements:s,incompressible:!1},l={...g.node,children:[],element:c},a=new Proxy(t[0].node,{}),r={node:a,startIndex:t[0].startIndex,endIndex:g.endIndex,position:t[0].position,height:t[0].height};return this.compressedStickyNodes.set(a,l),r}}function p(o,t){return t&&{...t,keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let s;try{s=o().getCompressedTreeNode(i)}catch{return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return s.element.elements.length===1?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(s.element.elements)}}}}class n extends m{constructor(t,i,s,g,c={}){const l=()=>this,a=new b(()=>this.model),r=g.map(u=>new _(l,a,u));super(t,i,s,r,{...p(l,c),stickyScrollDelegate:a})}setChildren(t,i=y.Iterable.empty(),s){this.model.setChildren(t,i,s)}createModel(t,i,s){return new k.CompressibleObjectTreeModel(t,i,s)}updateOptions(t={}){super.updateOptions(t),typeof t.compressionEnabled<"u"&&this.model.setCompressionEnabled(t.compressionEnabled)}getCompressedTreeNode(t=null){return this.model.getCompressedTreeNode(t)}}e.CompressibleObjectTree=n}),define(ne[645],se([1,0,257,176,249,360,159,14,26,30,8,6,53,2,19]),function(oe,e,d,k,I,E,y,m,_,b,p,n,o,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function s(P){return{...P,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function g(P,N){return N.parent?N.parent===P?!0:g(P,N.parent):!1}function c(P,N){return P===N||g(P,N)||g(N,P)}class l{get element(){return this.node.element.element}get children(){return this.node.children.map(N=>new l(N))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(N){this.node=N}}class a{constructor(N,O,F){this.renderer=N,this.nodeMapper=O,this.onDidChangeTwistieState=F,this.renderedNodes=new Map,this.templateId=N.templateId}renderTemplate(N){return{templateData:this.renderer.renderTemplate(N)}}renderElement(N,O,F,x){this.renderer.renderElement(this.nodeMapper.map(N),O,F.templateData,x)}renderTwistie(N,O){return N.slow?(O.classList.add(...b.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!0):(O.classList.remove(...b.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!1)}disposeElement(N,O,F,x){this.renderer.disposeElement?.(this.nodeMapper.map(N),O,F.templateData,x)}disposeTemplate(N){this.renderer.disposeTemplate(N.templateData)}dispose(){this.renderedNodes.clear()}}function r(P){return{browserEvent:P.browserEvent,elements:P.elements.map(N=>N.element)}}function u(P){return{browserEvent:P.browserEvent,element:P.element&&P.element.element,target:P.target}}class C extends d.ElementsDragAndDropData{constructor(N){super(N.elements.map(O=>O.element)),this.data=N}}function f(P){return P instanceof d.ElementsDragAndDropData?new C(P):P}class h{constructor(N){this.dnd=N}getDragURI(N){return this.dnd.getDragURI(N.element)}getDragLabel(N,O){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(N.map(F=>F.element),O)}onDragStart(N,O){this.dnd.onDragStart?.(f(N),O)}onDragOver(N,O,F,x,W,V=!0){return this.dnd.onDragOver(f(N),O&&O.element,F,x,W)}drop(N,O,F,x,W){this.dnd.drop(f(N),O&&O.element,F,x,W)}onDragEnd(N){this.dnd.onDragEnd?.(N)}dispose(){this.dnd.dispose()}}function v(P){return P&&{...P,collapseByDefault:!0,identityProvider:P.identityProvider&&{getId(N){return P.identityProvider.getId(N.element)}},dnd:P.dnd&&new h(P.dnd),multipleSelectionController:P.multipleSelectionController&&{isSelectionSingleChangeEvent(N){return P.multipleSelectionController.isSelectionSingleChangeEvent({...N,element:N.element})},isSelectionRangeChangeEvent(N){return P.multipleSelectionController.isSelectionRangeChangeEvent({...N,element:N.element})}},accessibilityProvider:P.accessibilityProvider&&{...P.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:P.accessibilityProvider.getRole?N=>P.accessibilityProvider.getRole(N.element):()=>"treeitem",isChecked:P.accessibilityProvider.isChecked?N=>!!P.accessibilityProvider?.isChecked(N.element):void 0,getAriaLabel(N){return P.accessibilityProvider.getAriaLabel(N.element)},getWidgetAriaLabel(){return P.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:P.accessibilityProvider.getWidgetRole?()=>P.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:P.accessibilityProvider.getAriaLevel&&(N=>P.accessibilityProvider.getAriaLevel(N.element)),getActiveDescendantId:P.accessibilityProvider.getActiveDescendantId&&(N=>P.accessibilityProvider.getActiveDescendantId(N.element))},filter:P.filter&&{filter(N,O){return P.filter.filter(N.element,O)}},keyboardNavigationLabelProvider:P.keyboardNavigationLabelProvider&&{...P.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(N){return P.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(N.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof P.expandOnlyOnTwistieClick>"u"?void 0:typeof P.expandOnlyOnTwistieClick!="function"?P.expandOnlyOnTwistieClick:N=>P.expandOnlyOnTwistieClick(N.element),defaultFindVisibility:N=>N.hasChildren&&N.stale?1:typeof P.defaultFindVisibility=="number"?P.defaultFindVisibility:typeof P.defaultFindVisibility>"u"?2:P.defaultFindVisibility(N.element)}}function w(P,N){N(P),P.children.forEach(O=>w(O,N))}class S{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return n.Event.map(this.tree.onDidChangeFocus,r)}get onDidChangeSelection(){return n.Event.map(this.tree.onDidChangeSelection,r)}get onMouseDblClick(){return n.Event.map(this.tree.onMouseDblClick,u)}get onPointer(){return n.Event.map(this.tree.onPointer,u)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(N,O,F,x,W,V={}){this.user=N,this.dataSource=W,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new n.Emitter,this._onDidChangeNodeSlowState=new n.Emitter,this.nodeMapper=new y.WeakMapper(q=>new l(q)),this.disposables=new t.DisposableStore,this.identityProvider=V.identityProvider,this.autoExpandSingleChildren=typeof V.autoExpandSingleChildren>"u"?!1:V.autoExpandSingleChildren,this.sorter=V.sorter,this.getDefaultCollapseState=q=>V.collapseByDefault?V.collapseByDefault(q)?y.ObjectTreeElementCollapseState.PreserveOrCollapsed:y.ObjectTreeElementCollapseState.PreserveOrExpanded:void 0,this.tree=this.createTree(N,O,F,x,V),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=s({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(N,O,F,x,W){const V=new k.ComposedTreeDelegate(F),q=x.map(z=>new a(z,this.nodeMapper,this._onDidChangeNodeSlowState.event)),H=v(W)||{};return new E.ObjectTree(N,O,V,q,H)}updateOptions(N={}){this.tree.updateOptions(N)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(N){this.tree.scrollTop=N}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(N,O){this.tree.layout(N,O)}style(N){this.tree.style(N)}getInput(){return this.root.element}async setInput(N,O){this.refreshPromises.forEach(x=>x.cancel()),this.refreshPromises.clear(),this.root.element=N;const F=O&&{viewState:O,focus:[],selection:[]};await this._updateChildren(N,!0,!1,F),F&&(this.tree.setFocus(F.focus),this.tree.setSelection(F.selection)),O&&typeof O.scrollTop=="number"&&(this.scrollTop=O.scrollTop)}async _updateChildren(N=this.root.element,O=!0,F=!1,x,W){if(typeof this.root.element>"u")throw new y.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await n.Event.toPromise(this._onDidRender.event));const V=this.getDataNode(N);if(await this.refreshAndRenderNode(V,O,x,W),F)try{this.tree.rerender(V)}catch{}}rerender(N){if(N===void 0||N===this.root.element){this.tree.rerender();return}const O=this.getDataNode(N);this.tree.rerender(O)}getNode(N=this.root.element){const O=this.getDataNode(N),F=this.tree.getNode(O===this.root?null:O);return this.nodeMapper.map(F)}collapse(N,O=!1){const F=this.getDataNode(N);return this.tree.collapse(F===this.root?null:F,O)}async expand(N,O=!1){if(typeof this.root.element>"u")throw new y.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await n.Event.toPromise(this._onDidRender.event));const F=this.getDataNode(N);if(this.tree.hasElement(F)&&!this.tree.isCollapsible(F)||(F.refreshPromise&&(await this.root.refreshPromise,await n.Event.toPromise(this._onDidRender.event)),F!==this.root&&!F.refreshPromise&&!this.tree.isCollapsed(F)))return!1;const x=this.tree.expand(F===this.root?null:F,O);return F.refreshPromise&&(await this.root.refreshPromise,await n.Event.toPromise(this._onDidRender.event)),x}setSelection(N,O){const F=N.map(x=>this.getDataNode(x));this.tree.setSelection(F,O)}getSelection(){return this.tree.getSelection().map(O=>O.element)}setFocus(N,O){const F=N.map(x=>this.getDataNode(x));this.tree.setFocus(F,O)}getFocus(){return this.tree.getFocus().map(O=>O.element)}reveal(N,O){this.tree.reveal(this.getDataNode(N),O)}getParentElement(N){const O=this.tree.getParentElement(this.getDataNode(N));return O&&O.element}getFirstElementChild(N=this.root.element){const O=this.getDataNode(N),F=this.tree.getFirstElementChild(O===this.root?null:O);return F&&F.element}getDataNode(N){const O=this.nodes.get(N===this.root.element?null:N);if(!O)throw new y.TreeError(this.user,`Data tree node not found: ${N}`);return O}async refreshAndRenderNode(N,O,F,x){await this.refreshNode(N,O,F),!this.disposables.isDisposed&&this.render(N,F,x)}async refreshNode(N,O,F){let x;if(this.subTreeRefreshPromises.forEach((W,V)=>{!x&&c(V,N)&&(x=W.then(()=>this.refreshNode(N,O,F)))}),x)return x;if(N!==this.root&&this.tree.getNode(N).collapsed){N.hasChildren=!!this.dataSource.hasChildren(N.element),N.stale=!0,this.setChildren(N,[],O,F);return}return this.doRefreshSubTree(N,O,F)}async doRefreshSubTree(N,O,F){let x;N.refreshPromise=new Promise(W=>x=W),this.subTreeRefreshPromises.set(N,N.refreshPromise),N.refreshPromise.finally(()=>{N.refreshPromise=void 0,this.subTreeRefreshPromises.delete(N)});try{const W=await this.doRefreshNode(N,O,F);N.stale=!1,await m.Promises.settled(W.map(V=>this.doRefreshSubTree(V,O,F)))}finally{x()}}async doRefreshNode(N,O,F){N.hasChildren=!!this.dataSource.hasChildren(N.element);let x;if(!N.hasChildren)x=Promise.resolve(o.Iterable.empty());else{const W=this.doGetChildren(N);if((0,i.isIterable)(W))x=Promise.resolve(W);else{const V=(0,m.timeout)(800);V.then(()=>{N.slow=!0,this._onDidChangeNodeSlowState.fire(N)},q=>null),x=W.finally(()=>V.cancel())}}try{const W=await x;return this.setChildren(N,W,O,F)}catch(W){if(N!==this.root&&this.tree.hasElement(N)&&this.tree.collapse(N),(0,p.isCancellationError)(W))return[];throw W}finally{N.slow&&(N.slow=!1,this._onDidChangeNodeSlowState.fire(N))}}doGetChildren(N){let O=this.refreshPromises.get(N);if(O)return O;const F=this.dataSource.getChildren(N.element);return(0,i.isIterable)(F)?this.processChildren(F):(O=(0,m.createCancelablePromise)(async()=>this.processChildren(await F)),this.refreshPromises.set(N,O),O.finally(()=>{this.refreshPromises.delete(N)}))}_onDidChangeCollapseState({node:N,deep:O}){N.element!==null&&!N.collapsed&&N.element.stale&&(O?this.collapse(N.element.element):this.refreshAndRenderNode(N.element,!1).catch(p.onUnexpectedError))}setChildren(N,O,F,x){const W=[...O];if(N.children.length===0&&W.length===0)return[];const V=new Map,q=new Map;for(const U of N.children)V.set(U.element,U),this.identityProvider&&q.set(U.id,{node:U,collapsed:this.tree.hasElement(U)&&this.tree.isCollapsed(U)});const H=[],z=W.map(U=>{const j=!!this.dataSource.hasChildren(U);if(!this.identityProvider){const R=s({element:U,parent:N,hasChildren:j,defaultCollapseState:this.getDefaultCollapseState(U)});return j&&R.defaultCollapseState===y.ObjectTreeElementCollapseState.PreserveOrExpanded&&H.push(R),R}const Y=this.identityProvider.getId(U).toString(),G=q.get(Y);if(G){const R=G.node;return V.delete(R.element),this.nodes.delete(R.element),this.nodes.set(U,R),R.element=U,R.hasChildren=j,F?G.collapsed?(R.children.forEach(J=>w(J,ie=>this.nodes.delete(ie.element))),R.children.splice(0,R.children.length),R.stale=!0):H.push(R):j&&!G.collapsed&&H.push(R),R}const K=s({element:U,parent:N,id:Y,hasChildren:j,defaultCollapseState:this.getDefaultCollapseState(U)});return x&&x.viewState.focus&&x.viewState.focus.indexOf(Y)>-1&&x.focus.push(K),x&&x.viewState.selection&&x.viewState.selection.indexOf(Y)>-1&&x.selection.push(K),(x&&x.viewState.expanded&&x.viewState.expanded.indexOf(Y)>-1||j&&K.defaultCollapseState===y.ObjectTreeElementCollapseState.PreserveOrExpanded)&&H.push(K),K});for(const U of V.values())w(U,j=>this.nodes.delete(j.element));for(const U of z)this.nodes.set(U.element,U);return N.children.splice(0,N.children.length,...z),N!==this.root&&this.autoExpandSingleChildren&&z.length===1&&H.length===0&&(z[0].forceExpanded=!0,H.push(z[0])),H}render(N,O,F){const x=N.children.map(V=>this.asTreeElement(V,O)),W=F&&{...F,diffIdentityProvider:F.diffIdentityProvider&&{getId(V){return F.diffIdentityProvider.getId(V.element)}}};this.tree.setChildren(N===this.root?null:N,x,W),N!==this.root&&this.tree.setCollapsible(N,N.hasChildren),this._onDidRender.fire()}asTreeElement(N,O){if(N.stale)return{element:N,collapsible:N.hasChildren,collapsed:!0};let F;return O&&O.viewState.expanded&&N.id&&O.viewState.expanded.indexOf(N.id)>-1?F=!1:N.forceExpanded?(F=!1,N.forceExpanded=!1):F=N.defaultCollapseState,{element:N,children:N.hasChildren?o.Iterable.map(N.children,x=>this.asTreeElement(x,O)):[],collapsible:N.hasChildren,collapsed:F}}processChildren(N){return this.sorter&&(N=[...N].sort(this.sorter.compare.bind(this.sorter))),N}dispose(){this.disposables.dispose(),this.tree.dispose()}}e.AsyncDataTree=S;class L{get element(){return{elements:this.node.element.elements.map(N=>N.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(N=>new L(N))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(N){this.node=N}}class D{constructor(N,O,F,x){this.renderer=N,this.nodeMapper=O,this.compressibleNodeMapperProvider=F,this.onDidChangeTwistieState=x,this.renderedNodes=new Map,this.disposables=[],this.templateId=N.templateId}renderTemplate(N){return{templateData:this.renderer.renderTemplate(N)}}renderElement(N,O,F,x){this.renderer.renderElement(this.nodeMapper.map(N),O,F.templateData,x)}renderCompressedElements(N,O,F,x){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(N),O,F.templateData,x)}renderTwistie(N,O){return N.slow?(O.classList.add(...b.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!0):(O.classList.remove(...b.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!1)}disposeElement(N,O,F,x){this.renderer.disposeElement?.(this.nodeMapper.map(N),O,F.templateData,x)}disposeCompressedElements(N,O,F,x){this.renderer.disposeCompressedElements?.(this.compressibleNodeMapperProvider().map(N),O,F.templateData,x)}disposeTemplate(N){this.renderer.disposeTemplate(N.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,t.dispose)(this.disposables)}}function T(P){const N=P&&v(P);return N&&{...N,keyboardNavigationLabelProvider:N.keyboardNavigationLabelProvider&&{...N.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(O){return P.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(O.map(F=>F.element))}}}}class M extends S{constructor(N,O,F,x,W,V,q={}){super(N,O,F,W,V,q),this.compressionDelegate=x,this.compressibleNodeMapper=new y.WeakMapper(H=>new L(H)),this.filter=q.filter}createTree(N,O,F,x,W){const V=new k.ComposedTreeDelegate(F),q=x.map(z=>new D(z,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),H=T(W)||{};return new E.CompressibleObjectTree(N,O,V,q,H)}asTreeElement(N,O){return{incompressible:this.compressionDelegate.isIncompressible(N.element),...super.asTreeElement(N,O)}}updateOptions(N={}){this.tree.updateOptions(N)}render(N,O,F){if(!this.identityProvider)return super.render(N,O);const x=G=>this.identityProvider.getId(G).toString(),W=G=>{const K=new Set;for(const R of G){const J=this.tree.getCompressedTreeNode(R===this.root?null:R);if(J.element)for(const ie of J.element.elements)K.add(x(ie.element))}return K},V=W(this.tree.getSelection()),q=W(this.tree.getFocus());super.render(N,O,F);const H=this.getSelection();let z=!1;const U=this.getFocus();let j=!1;const Y=G=>{const K=G.element;if(K)for(let R=0;R<K.elements.length;R++){const J=x(K.elements[R].element),ie=K.elements[K.elements.length-1].element;V.has(J)&&H.indexOf(ie)===-1&&(H.push(ie),z=!0),q.has(J)&&U.indexOf(ie)===-1&&(U.push(ie),j=!0)}G.children.forEach(Y)};Y(this.tree.getCompressedTreeNode(N===this.root?null:N)),z&&this.setSelection(H),j&&this.setFocus(U)}processChildren(N){return this.filter&&(N=o.Iterable.filter(N,O=>{const F=this.filter.filter(O,1),x=A(F);if(x===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return x===1})),super.processChildren(N)}}e.CompressibleAsyncDataTree=M;function A(P){return typeof P=="boolean"?P?1:0:(0,I.isFilterResult)(P)?(0,I.getVisibleState)(P.visibility):(0,I.getVisibleState)(P)}}),define(ne[361],se([1,0,8,6,2,42,16,11]),function(oe,e,d,k,I,E,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleWorkerServer=e.SimpleWorkerClient=void 0,e.logOnceWebWorkerWarning=o,e.create=f;const _=!1,b="default",p="$initialize";let n=!1;function o(h){y.isWeb&&(n||(n=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(h.message))}class t{constructor(v,w,S,L,D){this.vsWorker=v,this.req=w,this.channel=S,this.method=L,this.args=D,this.type=0}}class i{constructor(v,w,S,L){this.vsWorker=v,this.seq=w,this.res=S,this.err=L,this.type=1}}class s{constructor(v,w,S,L,D){this.vsWorker=v,this.req=w,this.channel=S,this.eventName=L,this.arg=D,this.type=2}}class g{constructor(v,w,S){this.vsWorker=v,this.req=w,this.event=S,this.type=3}}class c{constructor(v,w){this.vsWorker=v,this.req=w,this.type=4}}class l{constructor(v){this._workerId=-1,this._handler=v,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(v){this._workerId=v}sendMessage(v,w,S){const L=String(++this._lastSentReq);return new Promise((D,T)=>{this._pendingReplies[L]={resolve:D,reject:T},this._send(new t(this._workerId,L,v,w,S))})}listen(v,w,S){let L=null;const D=new k.Emitter({onWillAddFirstListener:()=>{L=String(++this._lastSentReq),this._pendingEmitters.set(L,D),this._send(new s(this._workerId,L,v,w,S))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(L),this._send(new c(this._workerId,L)),L=null}});return D.event}handleMessage(v){!v||!v.vsWorker||this._workerId!==-1&&v.vsWorker!==this._workerId||this._handleMessage(v)}createProxyToRemoteChannel(v,w){const S={get:(L,D)=>(typeof D=="string"&&!L[D]&&(u(D)?L[D]=T=>this.listen(v,D,T):r(D)?L[D]=this.listen(v,D,void 0):D.charCodeAt(0)===36&&(L[D]=async(...T)=>(await w?.(),this.sendMessage(v,D,T)))),L[D])};return new Proxy(Object.create(null),S)}_handleMessage(v){switch(v.type){case 1:return this._handleReplyMessage(v);case 0:return this._handleRequestMessage(v);case 2:return this._handleSubscribeEventMessage(v);case 3:return this._handleEventMessage(v);case 4:return this._handleUnsubscribeEventMessage(v)}}_handleReplyMessage(v){if(!this._pendingReplies[v.seq]){console.warn("Got reply to unknown seq");return}const w=this._pendingReplies[v.seq];if(delete this._pendingReplies[v.seq],v.err){let S=v.err;v.err.$isError&&(S=new Error,S.name=v.err.name,S.message=v.err.message,S.stack=v.err.stack),w.reject(S);return}w.resolve(v.res)}_handleRequestMessage(v){const w=v.req;this._handler.handleMessage(v.channel,v.method,v.args).then(L=>{this._send(new i(this._workerId,w,L,void 0))},L=>{L.detail instanceof Error&&(L.detail=(0,d.transformErrorForSerialization)(L.detail)),this._send(new i(this._workerId,w,void 0,(0,d.transformErrorForSerialization)(L)))})}_handleSubscribeEventMessage(v){const w=v.req,S=this._handler.handleEvent(v.channel,v.eventName,v.arg)(L=>{this._send(new g(this._workerId,w,L))});this._pendingEvents.set(w,S)}_handleEventMessage(v){if(!this._pendingEmitters.has(v.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(v.req).fire(v.event)}_handleUnsubscribeEventMessage(v){if(!this._pendingEvents.has(v.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(v.req).dispose(),this._pendingEvents.delete(v.req)}_send(v){const w=[];if(v.type===0)for(let S=0;S<v.args.length;S++)v.args[S]instanceof ArrayBuffer&&w.push(v.args[S]);else v.type===1&&v.res instanceof ArrayBuffer&&w.push(v.res);this._handler.sendMessage(v,w)}}class a extends I.Disposable{constructor(v,w){super(),this._localChannels=new Map,this._worker=this._register(v.create({amdModuleId:"vs/base/common/worker/simpleWorker",esmModuleLocation:w.esmModuleLocation,label:w.label},D=>{this._protocol.handleMessage(D)},D=>{(0,d.onUnexpectedError)(D)})),this._protocol=new l({sendMessage:(D,T)=>{this._worker.postMessage(D,T)},handleMessage:(D,T,M)=>this._handleMessage(D,T,M),handleEvent:(D,T,M)=>this._handleEvent(D,T,M)}),this._protocol.setWorkerId(this._worker.getId());let S=null;const L=globalThis.require;typeof L<"u"&&typeof L.getConfig=="function"?S=L.getConfig():typeof globalThis.requirejs<"u"&&(S=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(b,p,[this._worker.getId(),JSON.parse(JSON.stringify(S)),w.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(b,async()=>{await this._onModuleLoaded}),this._onModuleLoaded.catch(D=>{this._onError("Worker failed to load "+w.amdModuleId,D)})}_handleMessage(v,w,S){const L=this._localChannels.get(v);if(!L)return Promise.reject(new Error(`Missing channel ${v} on main thread`));if(typeof L[w]!="function")return Promise.reject(new Error(`Missing method ${w} on main thread channel ${v}`));try{return Promise.resolve(L[w].apply(L,S))}catch(D){return Promise.reject(D)}}_handleEvent(v,w,S){const L=this._localChannels.get(v);if(!L)throw new Error(`Missing channel ${v} on main thread`);if(u(w)){const D=L[w].call(L,S);if(typeof D!="function")throw new Error(`Missing dynamic event ${w} on main thread channel ${v}.`);return D}if(r(w)){const D=L[w];if(typeof D!="function")throw new Error(`Missing event ${w} on main thread channel ${v}.`);return D}throw new Error(`Malformed event name ${w}`)}setChannel(v,w){this._localChannels.set(v,w)}_onError(v,w){console.error(v),console.info(w)}}e.SimpleWorkerClient=a;function r(h){return h[0]==="o"&&h[1]==="n"&&m.isUpperAsciiLetter(h.charCodeAt(2))}function u(h){return/^onDynamic/.test(h)&&m.isUpperAsciiLetter(h.charCodeAt(9))}class C{constructor(v,w){this._localChannels=new Map,this._remoteChannels=new Map,this._requestHandlerFactory=w,this._requestHandler=null,this._protocol=new l({sendMessage:(S,L)=>{v(S,L)},handleMessage:(S,L,D)=>this._handleMessage(S,L,D),handleEvent:(S,L,D)=>this._handleEvent(S,L,D)})}onmessage(v){this._protocol.handleMessage(v)}_handleMessage(v,w,S){if(v===b&&w===p)return this.initialize(S[0],S[1],S[2]);const L=v===b?this._requestHandler:this._localChannels.get(v);if(!L)return Promise.reject(new Error(`Missing channel ${v} on worker thread`));if(typeof L[w]!="function")return Promise.reject(new Error(`Missing method ${w} on worker thread channel ${v}`));try{return Promise.resolve(L[w].apply(L,S))}catch(D){return Promise.reject(D)}}_handleEvent(v,w,S){const L=v===b?this._requestHandler:this._localChannels.get(v);if(!L)throw new Error(`Missing channel ${v} on worker thread`);if(u(w)){const D=L[w].call(L,S);if(typeof D!="function")throw new Error(`Missing dynamic event ${w} on request handler.`);return D}if(r(w)){const D=L[w];if(typeof D!="function")throw new Error(`Missing event ${w} on request handler.`);return D}throw new Error(`Malformed event name ${w}`)}getChannel(v){if(!this._remoteChannels.has(v)){const w=this._protocol.createProxyToRemoteChannel(v);this._remoteChannels.set(v,w)}return this._remoteChannels.get(v)}async initialize(v,w,S){if(this._protocol.setWorkerId(v),this._requestHandlerFactory){this._requestHandler=this._requestHandlerFactory(this);return}if(w&&(typeof w.baseUrl<"u"&&delete w.baseUrl,typeof w.paths<"u"&&typeof w.paths.vs<"u"&&delete w.paths.vs,typeof w.trustedTypesPolicy<"u"&&delete w.trustedTypesPolicy,w.catchError=!0,globalThis.require.config(w)),_){const L=E.FileAccess.asBrowserUri(`${S}.js`).toString(!0);return new Promise((D,T)=>{oe([`${L}`],D,T)}).then(D=>{if(this._requestHandler=D.create(this),!this._requestHandler)throw new Error("No RequestHandler!")})}return new Promise((L,D)=>{(globalThis.require||oe)([S],M=>{if(this._requestHandler=M.create(this),!this._requestHandler){D(new Error("No RequestHandler!"));return}L()},D)})}}e.SimpleWorkerServer=C;function f(h){return new C(h,null)}}),define(ne[646],se([1,0,103,8,42,361,2,13,3]),function(oe,e,d,k,I,E,y,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerDescriptor=void 0,e.createWebWorker=l;const b=!1;let p;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?p=globalThis.workerttPolicy:p=(0,d.createTrustedTypesPolicy)("defaultWorkerFactory",{createScriptURL:a=>a});function n(a,r){const u=globalThis.MonacoEnvironment;if(u){if(typeof u.getWorker=="function")return u.getWorker(r);if(typeof u.getWorkerUrl=="function"){const C=u.getWorkerUrl("workerMain.js",r);return new Worker(p?p.createScriptURL(C):C,{name:r,type:b?"module":void 0})}}if(typeof oe=="function"){const C=oe.toUrl("vs/base/worker/workerMain.js"),f="vs/base/worker/defaultWorkerFactory.js",h=oe.toUrl(f).slice(0,-f.length),v=o(r,C,h);return new Worker(p?p.createScriptURL(v):v,{name:r,type:b?"module":void 0})}if(a){const C=o(r,a.toString(!0)),f=new Worker(p?p.createScriptURL(C):C,{name:r,type:b?"module":void 0});return b?t(f):f}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function o(a,r,u){const C=/^((http:)|(https:)|(file:)|(vscode-file:))/.test(r);if(!(C&&r.substring(0,globalThis.origin.length)!==globalThis.origin)){const h=r.lastIndexOf("?"),v=r.lastIndexOf("#",h),w=h>0?new URLSearchParams(r.substring(h+1,~v?v:void 0)):new URLSearchParams;I.COI.addSearchParam(w,!0,!0),w.toString()?r=`${r}?${w.toString()}#${a}`:r=`${r}#${a}`}!b&&!C&&(r=new URL(r,globalThis.origin).toString());const f=new Blob([(0,m.coalesce)([`/*${a}*/`,u?`globalThis.MonacoEnvironment = { baseUrl: '${u}' };`:void 0,`globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify((0,_.getNLSMessages)())};`,`globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify((0,_.getNLSLanguage)())};`,`globalThis._VSCODE_FILE_ROOT = '${globalThis._VSCODE_FILE_ROOT}';`,"const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",b?`await import(ttPolicy?.createScriptURL('${r}') ?? '${r}');`:`importScripts(ttPolicy?.createScriptURL('${r}') ?? '${r}');`,b?"globalThis.postMessage({ type: 'vscode-worker-ready' });":void 0,`/*${a}*/`]).join("")],{type:"application/javascript"});return URL.createObjectURL(f)}function t(a){return new Promise((r,u)=>{a.onmessage=function(C){C.data.type==="vscode-worker-ready"&&(a.onmessage=null,r(a))},a.onerror=u})}function i(a){return typeof a.then=="function"}class s extends y.Disposable{constructor(r,u,C,f,h,v){super(),this.id=C,this.label=f;const w=n(r,f);i(w)?this.worker=w:this.worker=Promise.resolve(w),this.postMessage(u,[]),this.worker.then(S=>{S.onmessage=function(L){h(L.data)},S.onmessageerror=v,typeof S.addEventListener=="function"&&S.addEventListener("error",v)}),this._register((0,y.toDisposable)(()=>{this.worker?.then(S=>{S.onmessage=null,S.onmessageerror=null,S.removeEventListener("error",v),S.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(r,u){this.worker?.then(C=>{try{C.postMessage(r,u)}catch(f){(0,k.onUnexpectedError)(f),(0,k.onUnexpectedError)(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:f}))}})}}class g{constructor(r,u){this.amdModuleId=r,this.label=u,this.esmModuleLocation=b?I.FileAccess.asBrowserUri(`${r}.esm.js`):void 0}}e.WorkerDescriptor=g;class c{static{this.LAST_WORKER_ID=0}constructor(){this._webWorkerFailedBeforeError=!1}create(r,u,C){const f=++c.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new s(r.esmModuleLocation,r.amdModuleId,f,r.label||"anonymous"+f,u,h=>{(0,E.logOnceWebWorkerWarning)(h),this._webWorkerFailedBeforeError=h,C(h)})}}function l(a,r){const u=typeof a=="string"?new g(a,r):a;return new E.SimpleWorkerClient(new c,u)}}),define(ne[647],se([1,0,14,6,2,252,19]),function(oe,e,d,k,I,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.StorageHint=void 0;var m;(function(n){n[n.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",n[n.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(m||(e.StorageHint=m={}));var _;(function(n){n[n.None=0]="None",n[n.Initialized=1]="Initialized",n[n.Closed=2]="Closed"})(_||(e.StorageState=_={}));class b extends I.Disposable{static{this.DEFAULT_FLUSH_DELAY=100}constructor(o,t=Object.create(null)){super(),this.database=o,this.options=t,this._onDidChangeStorage=this._register(new k.PauseableEmitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=_.None,this.cache=new Map,this.flushDelayer=this._register(new d.ThrottledDelayer(b.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(o=>this.onDidChangeItemsExternal(o)))}onDidChangeItemsExternal(o){this._onDidChangeStorage.pause();try{o.changed?.forEach((t,i)=>this.acceptExternal(i,t)),o.deleted?.forEach(t=>this.acceptExternal(t,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(o,t){if(this.state===_.Closed)return;let i=!1;(0,y.isUndefinedOrNull)(t)?i=this.cache.delete(o):this.cache.get(o)!==t&&(this.cache.set(o,t),i=!0),i&&this._onDidChangeStorage.fire({key:o,external:!0})}get(o,t){const i=this.cache.get(o);return(0,y.isUndefinedOrNull)(i)?t:i}getBoolean(o,t){const i=this.get(o);return(0,y.isUndefinedOrNull)(i)?t:i==="true"}getNumber(o,t){const i=this.get(o);return(0,y.isUndefinedOrNull)(i)?t:parseInt(i,10)}async set(o,t,i=!1){if(this.state===_.Closed)return;if((0,y.isUndefinedOrNull)(t))return this.delete(o,i);const s=(0,y.isObject)(t)||Array.isArray(t)?(0,E.stringify)(t):String(t);if(this.cache.get(o)!==s)return this.cache.set(o,s),this.pendingInserts.set(o,s),this.pendingDeletes.delete(o),this._onDidChangeStorage.fire({key:o,external:i}),this.doFlush()}async delete(o,t=!1){if(!(this.state===_.Closed||!this.cache.delete(o)))return this.pendingDeletes.has(o)||this.pendingDeletes.add(o),this.pendingInserts.delete(o),this._onDidChangeStorage.fire({key:o,external:t}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const o={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(o).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async doFlush(o){return this.options.hint===m.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),o)}}e.Storage=b;class p{constructor(){this.onDidChangeItemsExternal=k.Event.None,this.items=new Map}async updateItems(o){o.insert?.forEach((t,i)=>this.items.set(i,t)),o.delete?.forEach(t=>this.items.delete(t))}}e.InMemoryStorageDatabase=p}),define(ne[362],se([1,0,2,6,5]),function(oe,e,d,k,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class E extends d.Disposable{constructor(m,_){super(),this._onDidChange=this._register(new k.Emitter),this.onDidChange=this._onDidChange.event,this._referenceDomElement=m,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,_)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let m=null;const _=()=>{m?this.observe({width:m.width,height:m.height}):this.observe()};let b=!1,p=!1;const n=()=>{if(b&&!p)try{b=!1,p=!0,_()}finally{(0,I.scheduleAtNextAnimationFrame)((0,I.getWindow)(this._referenceDomElement),()=>{p=!1,n()})}};this._resizeObserver=new ResizeObserver(o=>{o&&o[0]&&o[0].contentRect?m={width:o[0].contentRect.width,height:o[0].contentRect.height}:m=null,b=!0,n()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(m){this.measureReferenceDomElement(!0,m)}measureReferenceDomElement(m,_){let b=0,p=0;_?(b=_.width,p=_.height):this._referenceDomElement&&(b=this._referenceDomElement.clientWidth,p=this._referenceDomElement.clientHeight),b=Math.max(5,b),p=Math.max(5,p),(this._width!==b||this._height!==p)&&(this._width=b,this._height=p,m&&this._onDidChange.fire())}}e.ElementSizeObserver=E}),define(ne[648],se([1,0,5,18,57,19,3]),function(oe,e,d,k,I,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ManagedHoverWidget=void 0;class m{constructor(b,p,n){this.hoverDelegate=b,this.target=p,this.fadeInAnimation=n}async update(b,p,n){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let o;if(b===void 0||(0,E.isString)(b)||(0,d.isHTMLElement)(b))o=b;else if(!(0,E.isFunction)(b.markdown))o=b.markdown??b.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,y.localize)(69,"Loading..."),p,n),this._cancellationTokenSource=new k.CancellationTokenSource;const t=this._cancellationTokenSource.token;if(o=await b.markdown(t),o===void 0&&(o=b.markdownNotSupportedFallback),this.isDisposed||t.isCancellationRequested)return}this.show(o,p,n)}show(b,p,n){const o=this._hoverWidget;if(this.hasContent(b)){const t={content:b,target:this.target,actions:n?.actions,linkHandler:n?.linkHandler,trapFocus:n?.trapFocus,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!o,showHoverHint:n?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(t,p)}o?.dispose()}hasContent(b){return b?(0,I.isMarkdownString)(b)?!!b.value:!0:!1}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}e.ManagedHoverWidget=m}),define(ne[649],se([1,0,5,39,56]),function(oe,e,d,k,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class E extends I.ViewPart{constructor(o,t){super(o),this._viewDomNode=t,this._widgets={},this.domNode=(0,k.createFastDomNode)(document.createElement("div")),I.PartFingerprints.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,k.createFastDomNode)(document.createElement("div")),I.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(o){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(o);return!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLineMappingChanged(o){return this._updateAnchorsViewPositions(),!0}onLinesChanged(o){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(o){return this._updateAnchorsViewPositions(),!0}onLinesInserted(o){return this._updateAnchorsViewPositions(),!0}onScrollChanged(o){return!0}onZonesChanged(o){return!0}_updateAnchorsViewPositions(){const o=Object.keys(this._widgets);for(const t of o)this._widgets[t].updateAnchorViewPosition()}addWidget(o){const t=new y(this._context,this._viewDomNode,o);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(o,t,i,s,g){this._widgets[o.getId()].setPosition(t,i,s,g),this.setShouldRender()}removeWidget(o){const t=o.getId();if(this._widgets.hasOwnProperty(t)){const i=this._widgets[t];delete this._widgets[t];const s=i.domNode.domNode;s.remove(),s.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(o){return this._widgets.hasOwnProperty(o)?this._widgets[o].suppressMouseDown:!1}onBeforeRender(o){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(o)}prepareRender(o){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(o)}render(o){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(o)}}e.ViewContentWidgets=E;class y{constructor(o,t,i){this._primaryAnchor=new m(null,null),this._secondaryAnchor=new m(null,null),this._context=o,this._viewDomNode=t,this._actual=i,this.domNode=(0,k.createFastDomNode)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const s=this._context.configuration.options,g=s.get(146);this._fixedOverflowWidgets=s.get(42),this._contentWidth=g.contentWidth,this._contentLeft=g.contentLeft,this._lineHeight=s.get(67),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(o){const t=this._context.configuration.options;if(this._lineHeight=t.get(67),o.hasChanged(146)){const i=t.get(146);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(o,t,i){this._affinity=o,this._primaryAnchor=s(t,this._context.viewModel,this._affinity),this._secondaryAnchor=s(i,this._context.viewModel,this._affinity);function s(g,c,l){if(!g)return new m(null,null);const a=c.model.validatePosition(g);if(c.coordinatesConverter.modelPositionIsVisible(a)){const r=c.coordinatesConverter.convertModelPositionToViewPosition(a,l??void 0);return new m(g,r)}return new m(g,null)}}_getMaxWidth(){const o=this.domNode.domNode.ownerDocument,t=o.defaultView;return this.allowEditorOverflow?t?.innerWidth||o.documentElement.offsetWidth||o.body.offsetWidth:this._contentWidth}setPosition(o,t,i,s){this._setPosition(s,o,t),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(o,t,i,s){const g=o.top,c=g,l=o.top+o.height,a=s.viewportHeight-l,r=g-i,u=c>=i,C=l,f=a>=i;let h=o.left;return h+t>s.scrollLeft+s.viewportWidth&&(h=s.scrollLeft+s.viewportWidth-t),h<s.scrollLeft&&(h=s.scrollLeft),{fitsAbove:u,aboveTop:r,fitsBelow:f,belowTop:C,left:h}}_layoutHorizontalSegmentInPage(o,t,i,s){const l=Math.max(15,t.left-s),a=Math.min(t.left+t.width+s,o.width-15),u=this._viewDomNode.domNode.ownerDocument.defaultView;let C=t.left+i-(u?.scrollX??0);if(C+s>a){const f=C-(a-s);C-=f,i-=f}if(C<l){const f=C-l;C-=f,i-=f}return[i,C]}_layoutBoxInPage(o,t,i,s){const g=o.top-i,c=o.top+o.height,l=d.getDomNodePagePosition(this._viewDomNode.domNode),a=this._viewDomNode.domNode.ownerDocument,r=a.defaultView,u=l.top+g-(r?.scrollY??0),C=l.top+c-(r?.scrollY??0),f=d.getClientArea(a.body),[h,v]=this._layoutHorizontalSegmentInPage(f,l,o.left-s.scrollLeft+this._contentLeft,t),w=22,S=22,L=u>=w,D=C+i<=f.height-S;return this._fixedOverflowWidgets?{fitsAbove:L,aboveTop:Math.max(u,w),fitsBelow:D,belowTop:C,left:v}:{fitsAbove:L,aboveTop:g,fitsBelow:D,belowTop:c,left:h}}_prepareRenderWidgetAtExactPositionOverflowing(o){return new _(o.top,o.left+this._contentLeft)}_getAnchorsCoordinates(o){const t=g(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),i=this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,s=g(i,this._affinity,this._lineHeight);return{primary:t,secondary:s};function g(c,l,a){if(!c)return null;const r=o.visibleRangeForPosition(c);if(!r)return null;const u=c.column===1&&l===3?0:r.left,C=o.getVerticalOffsetForLineNumber(c.lineNumber)-o.scrollTop;return new b(C,u,a)}}_reduceAnchorCoordinates(o,t,i){if(!t)return o;const s=this._context.configuration.options.get(50);let g=t.left;return g<o.left?g=Math.max(g,o.left-i+s.typicalFullwidthCharacterWidth):g=Math.min(g,o.left+i-s.typicalFullwidthCharacterWidth),new b(o.top,g,o.height)}_prepareRenderWidget(o){if(!this._preference||this._preference.length===0)return null;const{primary:t,secondary:i}=this._getAnchorsCoordinates(o);if(!t)return{kind:"offViewport",preserveFocus:this.domNode.domNode.contains(this.domNode.domNode.ownerDocument.activeElement)};if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let c=null;if(typeof this._actual.beforeRender=="function"&&(c=p(this._actual.beforeRender,this._actual)),c)this._cachedDomNodeOffsetWidth=c.width,this._cachedDomNodeOffsetHeight=c.height;else{const a=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(a.width),this._cachedDomNodeOffsetHeight=Math.round(a.height)}}const s=this._reduceAnchorCoordinates(t,i,this._cachedDomNodeOffsetWidth);let g;this.allowEditorOverflow?g=this._layoutBoxInPage(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,o):g=this._layoutBoxInViewport(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,o);for(let c=1;c<=2;c++)for(const l of this._preference)if(l===1){if(!g)return null;if(c===2||g.fitsAbove)return{kind:"inViewport",coordinate:new _(g.aboveTop,g.left),position:1}}else if(l===2){if(!g)return null;if(c===2||g.fitsBelow)return{kind:"inViewport",coordinate:new _(g.belowTop,g.left),position:2}}else return this.allowEditorOverflow?{kind:"inViewport",coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new _(s.top,s.left)),position:0}:{kind:"inViewport",coordinate:new _(s.top,s.left),position:0};return null}onBeforeRender(o){!this._primaryAnchor.viewPosition||!this._preference||this._primaryAnchor.viewPosition.lineNumber<o.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>o.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(o){this._renderData=this._prepareRenderWidget(o)}render(o){if(!this._renderData||this._renderData.kind==="offViewport"){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this._renderData?.kind==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&p(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+o.scrollTop-o.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&p(this._actual.afterRender,this._actual,this._renderData.position)}}class m{constructor(o,t){this.modelPosition=o,this.viewPosition=t}}class _{constructor(o,t){this.top=o,this.left=t,this._coordinateBrand=void 0}}class b{constructor(o,t,i){this.top=o,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function p(n,o,...t){try{return n.call(o,...t)}catch{return null}}}),define(ne[650],se([1,0,39,56,5,492]),function(oe,e,d,k,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class E extends k.ViewPart{constructor(m,_){super(m),this._viewDomNode=_;const p=this._context.configuration.options.get(146);this._widgets={},this._verticalScrollbarWidth=p.verticalScrollbarWidth,this._minimapWidth=p.minimap.minimapWidth,this._horizontalScrollbarHeight=p.horizontalScrollbarHeight,this._editorHeight=p.height,this._editorWidth=p.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,d.createFastDomNode)(document.createElement("div")),k.PartFingerprints.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,d.createFastDomNode)(document.createElement("div")),k.PartFingerprints.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(m){const b=this._context.configuration.options.get(146);return this._verticalScrollbarWidth=b.verticalScrollbarWidth,this._minimapWidth=b.minimap.minimapWidth,this._horizontalScrollbarHeight=b.horizontalScrollbarHeight,this._editorHeight=b.height,this._editorWidth=b.width,!0}addWidget(m){const _=(0,d.createFastDomNode)(m.getDomNode());this._widgets[m.getId()]={widget:m,preference:null,domNode:_},_.setPosition("absolute"),_.setAttribute("widgetId",m.getId()),m.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(_):this._domNode.appendChild(_),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(m,_){const b=this._widgets[m.getId()],p=_?_.preference:null,n=_?.stackOridinal;return b.preference===p&&b.stack===n?(this._updateMaxMinWidth(),!1):(b.preference=p,b.stack=n,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(m){const _=m.getId();if(this._widgets.hasOwnProperty(_)){const p=this._widgets[_].domNode.domNode;delete this._widgets[_],p.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let m=0;const _=Object.keys(this._widgets);for(let b=0,p=_.length;b<p;b++){const n=_[b],t=this._widgets[n].widget.getMinContentWidthInPx?.();typeof t<"u"&&(m=Math.max(m,t))}this._context.viewLayout.setOverlayWidgetsMinWidth(m)}_renderWidget(m,_){const b=m.domNode;if(m.preference===null){b.setTop("");return}const p=2*this._verticalScrollbarWidth+this._minimapWidth;if(m.preference===0||m.preference===1){if(m.preference===1){const n=b.domNode.clientHeight;b.setTop(this._editorHeight-n-2*this._horizontalScrollbarHeight)}else b.setTop(0);m.stack!==void 0?(b.setTop(_[m.preference]),_[m.preference]+=b.domNode.clientWidth):b.setRight(p)}else if(m.preference===2)b.domNode.style.right="50%",m.stack!==void 0?(b.setTop(_[2]),_[2]+=b.domNode.clientHeight):b.setTop(0);else{const{top:n,left:o}=m.preference;if(this._context.configuration.options.get(42)&&m.widget.allowEditorOverflow){const i=this._viewDomNodeRect;b.setTop(n+i.top),b.setLeft(o+i.left),b.setPosition("fixed")}else b.setTop(n),b.setLeft(o),b.setPosition("absolute")}}prepareRender(m){this._viewDomNodeRect=I.getDomNodePagePosition(this._viewDomNode.domNode)}render(m){this._domNode.setWidth(this._editorWidth);const _=Object.keys(this._widgets),b=Array.from({length:3},()=>0);_.sort((p,n)=>(this._widgets[p].stack||0)-(this._widgets[n].stack||0));for(let p=0,n=_.length;p<n;p++){const o=_[p];this._renderWidget(this._widgets[o],b)}}}e.ViewOverlayWidgets=E}),define(ne[651],se([1,0,5,8,2]),function(oe,e,d,k,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditorContributions=void 0;class E extends I.Disposable{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new I.DisposableMap),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(m,_,b){this._editor=m,this._instantiationService=b;for(const p of _){if(this._pending.has(p.id)){(0,k.onUnexpectedError)(new Error(`Cannot have two contributions with the same id ${p.id}`));continue}this._pending.set(p.id,p)}this._instantiateSome(0),this._register((0,d.runWhenWindowIdle)((0,d.getWindow)(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register((0,d.runWhenWindowIdle)((0,d.getWindow)(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register((0,d.runWhenWindowIdle)((0,d.getWindow)(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){const m={};for(const[_,b]of this._instances)typeof b.saveViewState=="function"&&(m[_]=b.saveViewState());return m}restoreViewState(m){for(const[_,b]of this._instances)typeof b.restoreViewState=="function"&&b.restoreViewState(m[_])}get(m){return this._instantiateById(m),this._instances.get(m)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){return(0,d.runWhenWindowIdle)((0,d.getWindow)(this._editor?.getDomNode()),()=>{this._instantiateSome(1)},50)}_instantiateSome(m){if(this._finishedInstantiation[m])return;this._finishedInstantiation[m]=!0;const _=this._findPendingContributionsByInstantiation(m);for(const b of _)this._instantiateById(b.id)}_findPendingContributionsByInstantiation(m){const _=[];for(const[,b]of this._pending)b.instantiation===m&&_.push(b);return _}_instantiateById(m){const _=this._pending.get(m);if(_){if(this._pending.delete(m),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const b=this._instantiationService.createInstance(_.ctor,this._editor);this._instances.set(_.id,b),typeof b.restoreViewState=="function"&&_.instantiation!==0&&console.warn(`Editor contribution '${_.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(b){(0,k.onUnexpectedError)(b)}}}}e.CodeEditorContributions=E}),define(ne[363],se([1,0,173,2,21,65]),function(oe,e,d,k,I,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorSash=e.SashLayout=void 0;class y{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(b,p){this._options=b,this.dimensions=p,this.sashLeft=(0,E.derivedWithSetter)(this,n=>{const o=this._sashRatio.read(n)??this._options.splitViewDefaultRatio.read(n);return this._computeSashLeft(o,n)},(n,o)=>{const t=this.dimensions.width.get();this._sashRatio.set(n/t,o)}),this._sashRatio=(0,I.observableValue)(this,void 0)}_computeSashLeft(b,p){const n=this.dimensions.width.read(p),o=Math.floor(this._options.splitViewDefaultRatio.read(p)*n),t=this._options.enableSplitViewResizing.read(p)?Math.floor(b*n):o,i=100;return n<=i*2?o:t<i?i:t>n-i?n-i:t}}e.SashLayout=y;class m extends k.Disposable{constructor(b,p,n,o,t,i){super(),this._domNode=b,this._dimensions=p,this._enabled=n,this._boundarySashes=o,this.sashLeft=t,this._resetSash=i,this._sash=this._register(new d.Sash(this._domNode,{getVerticalSashTop:s=>0,getVerticalSashLeft:s=>this.sashLeft.get(),getVerticalSashHeight:s=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(s=>{this.sashLeft.set(this._startSashPosition+(s.currentX-s.startX),void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._resetSash())),this._register((0,I.autorun)(s=>{const g=this._boundarySashes.read(s);g&&(this._sash.orthogonalEndSash=g.bottom)})),this._register((0,I.autorun)(s=>{const g=this._enabled.read(s);this._sash.state=g?3:0,this.sashLeft.read(s),this._dimensions.height.read(s),this._sash.layout()}))}}e.DiffEditorSash=m}),define(ne[652],se([1,0,5,41,26,2,16,30,3]),function(oe,e,d,k,I,E,y,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffDeletedCodeMargin=void 0;class b extends E.Disposable{get visibility(){return this._visibility}set visibility(n){this._visibility!==n&&(this._visibility=n,this._diffActions.style.visibility=n?"visible":"hidden")}constructor(n,o,t,i,s,g,c,l,a){super(),this._getViewZoneId=n,this._marginDomNode=o,this._modifiedEditor=t,this._diff=i,this._editor=s,this._viewLineCounts=g,this._originalTextModel=c,this._contextMenuService=l,this._clipboardService=a,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=m.ThemeIcon.asClassName(I.Codicon.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const r=this._modifiedEditor.getOption(67);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${r}px`,this._diffActions.style.lineHeight=`${r}px`,this._marginDomNode.appendChild(this._diffActions);let u=0;const C=t.getOption(128)&&!y.isIOS,f=(h,v)=>{this._contextMenuService.showContextMenu({domForShadowRoot:C?t.getDomNode()??void 0:void 0,getAnchor:()=>({x:h,y:v}),getActions:()=>{const w=[],S=i.modified.isEmpty;return w.push(new k.Action("diff.clipboard.copyDeletedContent",S?i.original.length>1?(0,_.localize)(99,"Copy deleted lines"):(0,_.localize)(100,"Copy deleted line"):i.original.length>1?(0,_.localize)(101,"Copy changed lines"):(0,_.localize)(102,"Copy changed line"),void 0,!0,async()=>{const D=this._originalTextModel.getValueInRange(i.original.toExclusiveRange());await this._clipboardService.writeText(D)})),i.original.length>1&&w.push(new k.Action("diff.clipboard.copyDeletedLineContent",S?(0,_.localize)(103,"Copy deleted line ({0})",i.original.startLineNumber+u):(0,_.localize)(104,"Copy changed line ({0})",i.original.startLineNumber+u),void 0,!0,async()=>{let D=this._originalTextModel.getLineContent(i.original.startLineNumber+u);D===""&&(D=this._originalTextModel.getEndOfLineSequence()===0?`
601
+ `),this.view.style(B)}getParentElement(B){const $=this.model.getParentNodeLocation(B);return this.model.getNode($).element}getFirstElementChild(B){return this.model.getFirstElementChild(B)}getNode(B){return this.model.getNode(B)}getNodeLocation(B){return this.model.getNodeLocation(B)}collapse(B,$=!1){return this.model.setCollapsed(B,!0,$)}expand(B,$=!1){return this.model.setCollapsed(B,!1,$)}toggleCollapsed(B,$=!1){return this.model.setCollapsed(B,void 0,$)}isCollapsible(B){return this.model.isCollapsible(B)}setCollapsible(B,$){return this.model.setCollapsible(B,$)}isCollapsed(B){return this.model.isCollapsed(B)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(B,$){this.eventBufferer.bufferEvents(()=>{const Q=B.map(te=>this.model.getNode(te));this.selection.set(Q,$);const Z=B.map(te=>this.model.getListIndex(te)).filter(te=>te>-1);this.view.setSelection(Z,$,!0)})}getSelection(){return this.selection.get()}setFocus(B,$){this.eventBufferer.bufferEvents(()=>{const Q=B.map(te=>this.model.getNode(te));this.focus.set(Q,$);const Z=B.map(te=>this.model.getListIndex(te)).filter(te=>te>-1);this.view.setFocus(Z,$,!0)})}focusNext(B=1,$=!1,Q,Z=(0,d.isKeyboardEvent)(Q)&&Q.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(B,$,Q,Z)}focusPrevious(B=1,$=!1,Q,Z=(0,d.isKeyboardEvent)(Q)&&Q.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(B,$,Q,Z)}focusNextPage(B,$=(0,d.isKeyboardEvent)(B)&&B.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(B,$)}focusPreviousPage(B,$=(0,d.isKeyboardEvent)(B)&&B.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(B,$,()=>this.stickyScrollController?.height??0)}focusLast(B,$=(0,d.isKeyboardEvent)(B)&&B.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(B,$)}focusFirst(B,$=(0,d.isKeyboardEvent)(B)&&B.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(B,$)}getFocus(){return this.focus.get()}reveal(B,$){this.model.expandTo(B);const Q=this.model.getListIndex(B);if(Q!==-1)if(!this.stickyScrollController)this.view.reveal(Q,$);else{const Z=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(B));this.view.reveal(Q,$,Z)}}onLeftArrow(B){B.preventDefault(),B.stopPropagation();const $=this.view.getFocusedElements();if($.length===0)return;const Q=$[0],Z=this.model.getNodeLocation(Q);if(!this.model.setCollapsed(Z,!0)){const re=this.model.getParentNodeLocation(Z);if(!re)return;const le=this.model.getListIndex(re);this.view.reveal(le),this.view.setFocus([le])}}onRightArrow(B){B.preventDefault(),B.stopPropagation();const $=this.view.getFocusedElements();if($.length===0)return;const Q=$[0],Z=this.model.getNodeLocation(Q);if(!this.model.setCollapsed(Z,!1)){if(!Q.children.some(me=>me.visible))return;const[re]=this.view.getFocus(),le=re+1;this.view.reveal(le),this.view.setFocus([le])}}onSpace(B){B.preventDefault(),B.stopPropagation();const $=this.view.getFocusedElements();if($.length===0)return;const Q=$[0],Z=this.model.getNodeLocation(Q),te=B.browserEvent.altKey;this.model.setCollapsed(Z,void 0,te)}dispose(){(0,u.dispose)(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose()}}e.AbstractTree=ge}),define(ne[644],se([1,0,176,250]),function(oe,e,d,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class I extends d.AbstractTree{constructor(y,m,_,b,p,n={}){super(y,m,_,b,n),this.user=y,this.dataSource=p,this.identityProvider=n.identityProvider}createModel(y,m,_){return new k.ObjectTreeModel(y,m,_)}}e.DataTree=I}),define(ne[360],se([1,0,176,627,250,126,53]),function(oe,e,d,k,I,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTree=e.ObjectTree=void 0;class m extends d.AbstractTree{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(t,i,s,g,c={}){super(t,i,s,g,c),this.user=t}setChildren(t,i=y.Iterable.empty(),s){this.model.setChildren(t,i,s)}rerender(t){if(t===void 0){this.view.rerender();return}this.model.rerender(t)}hasElement(t){return this.model.has(t)}createModel(t,i,s){return new I.ObjectTreeModel(t,i,s)}}e.ObjectTree=m;class _{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(t,i,s){this._compressedTreeNodeProvider=t,this.stickyScrollDelegate=i,this.renderer=s,this.templateId=s.templateId,s.onDidChangeTwistieState&&(this.onDidChangeTwistieState=s.onDidChangeTwistieState)}renderTemplate(t){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(t)}}renderElement(t,i,s,g){let c=this.stickyScrollDelegate.getCompressedNode(t);c||(c=this.compressedTreeNodeProvider.getCompressedTreeNode(t.element)),c.element.elements.length===1?(s.compressedTreeNode=void 0,this.renderer.renderElement(t,i,s.data,g)):(s.compressedTreeNode=c,this.renderer.renderCompressedElements(c,i,s.data,g))}disposeElement(t,i,s,g){s.compressedTreeNode?this.renderer.disposeCompressedElements?.(s.compressedTreeNode,i,s.data,g):this.renderer.disposeElement?.(t,i,s.data,g)}disposeTemplate(t){this.renderer.disposeTemplate(t.data)}renderTwistie(t,i){return this.renderer.renderTwistie?this.renderer.renderTwistie(t,i):!1}}ke([E.memoize],_.prototype,"compressedTreeNodeProvider",null);class b{constructor(t){this.modelProvider=t,this.compressedStickyNodes=new Map}getCompressedNode(t){return this.compressedStickyNodes.get(t)}constrainStickyScrollNodes(t,i,s){if(this.compressedStickyNodes.clear(),t.length===0)return[];for(let g=0;g<t.length;g++){const c=t[g],l=c.position+c.height;if(g+1<t.length&&l+t[g+1].height>s||g>=i-1&&i<t.length){const r=t.slice(0,g),u=t.slice(g),C=this.compressStickyNodes(u);return[...r,C]}}return t}compressStickyNodes(t){if(t.length===0)throw new Error("Can't compress empty sticky nodes");const i=this.modelProvider();if(!i.isCompressionEnabled())return t[0];const s=[];for(let u=0;u<t.length;u++){const C=t[u],f=i.getCompressedTreeNode(C.node.element);if(f.element){if(u!==0&&f.element.incompressible)break;s.push(...f.element.elements)}}if(s.length<2)return t[0];const g=t[t.length-1],c={elements:s,incompressible:!1},l={...g.node,children:[],element:c},a=new Proxy(t[0].node,{}),r={node:a,startIndex:t[0].startIndex,endIndex:g.endIndex,position:t[0].position,height:t[0].height};return this.compressedStickyNodes.set(a,l),r}}function p(o,t){return t&&{...t,keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let s;try{s=o().getCompressedTreeNode(i)}catch{return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return s.element.elements.length===1?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(s.element.elements)}}}}class n extends m{constructor(t,i,s,g,c={}){const l=()=>this,a=new b(()=>this.model),r=g.map(u=>new _(l,a,u));super(t,i,s,r,{...p(l,c),stickyScrollDelegate:a})}setChildren(t,i=y.Iterable.empty(),s){this.model.setChildren(t,i,s)}createModel(t,i,s){return new k.CompressibleObjectTreeModel(t,i,s)}updateOptions(t={}){super.updateOptions(t),typeof t.compressionEnabled<"u"&&this.model.setCompressionEnabled(t.compressionEnabled)}getCompressedTreeNode(t=null){return this.model.getCompressedTreeNode(t)}}e.CompressibleObjectTree=n}),define(ne[645],se([1,0,257,176,249,360,159,14,26,30,8,6,53,2,19]),function(oe,e,d,k,I,E,y,m,_,b,p,n,o,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function s(P){return{...P,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function g(P,N){return N.parent?N.parent===P?!0:g(P,N.parent):!1}function c(P,N){return P===N||g(P,N)||g(N,P)}class l{get element(){return this.node.element.element}get children(){return this.node.children.map(N=>new l(N))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(N){this.node=N}}class a{constructor(N,O,F){this.renderer=N,this.nodeMapper=O,this.onDidChangeTwistieState=F,this.renderedNodes=new Map,this.templateId=N.templateId}renderTemplate(N){return{templateData:this.renderer.renderTemplate(N)}}renderElement(N,O,F,x){this.renderer.renderElement(this.nodeMapper.map(N),O,F.templateData,x)}renderTwistie(N,O){return N.slow?(O.classList.add(...b.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!0):(O.classList.remove(...b.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!1)}disposeElement(N,O,F,x){this.renderer.disposeElement?.(this.nodeMapper.map(N),O,F.templateData,x)}disposeTemplate(N){this.renderer.disposeTemplate(N.templateData)}dispose(){this.renderedNodes.clear()}}function r(P){return{browserEvent:P.browserEvent,elements:P.elements.map(N=>N.element)}}function u(P){return{browserEvent:P.browserEvent,element:P.element&&P.element.element,target:P.target}}class C extends d.ElementsDragAndDropData{constructor(N){super(N.elements.map(O=>O.element)),this.data=N}}function f(P){return P instanceof d.ElementsDragAndDropData?new C(P):P}class h{constructor(N){this.dnd=N}getDragURI(N){return this.dnd.getDragURI(N.element)}getDragLabel(N,O){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(N.map(F=>F.element),O)}onDragStart(N,O){this.dnd.onDragStart?.(f(N),O)}onDragOver(N,O,F,x,W,V=!0){return this.dnd.onDragOver(f(N),O&&O.element,F,x,W)}drop(N,O,F,x,W){this.dnd.drop(f(N),O&&O.element,F,x,W)}onDragEnd(N){this.dnd.onDragEnd?.(N)}dispose(){this.dnd.dispose()}}function v(P){return P&&{...P,collapseByDefault:!0,identityProvider:P.identityProvider&&{getId(N){return P.identityProvider.getId(N.element)}},dnd:P.dnd&&new h(P.dnd),multipleSelectionController:P.multipleSelectionController&&{isSelectionSingleChangeEvent(N){return P.multipleSelectionController.isSelectionSingleChangeEvent({...N,element:N.element})},isSelectionRangeChangeEvent(N){return P.multipleSelectionController.isSelectionRangeChangeEvent({...N,element:N.element})}},accessibilityProvider:P.accessibilityProvider&&{...P.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:P.accessibilityProvider.getRole?N=>P.accessibilityProvider.getRole(N.element):()=>"treeitem",isChecked:P.accessibilityProvider.isChecked?N=>!!P.accessibilityProvider?.isChecked(N.element):void 0,getAriaLabel(N){return P.accessibilityProvider.getAriaLabel(N.element)},getWidgetAriaLabel(){return P.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:P.accessibilityProvider.getWidgetRole?()=>P.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:P.accessibilityProvider.getAriaLevel&&(N=>P.accessibilityProvider.getAriaLevel(N.element)),getActiveDescendantId:P.accessibilityProvider.getActiveDescendantId&&(N=>P.accessibilityProvider.getActiveDescendantId(N.element))},filter:P.filter&&{filter(N,O){return P.filter.filter(N.element,O)}},keyboardNavigationLabelProvider:P.keyboardNavigationLabelProvider&&{...P.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(N){return P.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(N.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof P.expandOnlyOnTwistieClick>"u"?void 0:typeof P.expandOnlyOnTwistieClick!="function"?P.expandOnlyOnTwistieClick:N=>P.expandOnlyOnTwistieClick(N.element),defaultFindVisibility:N=>N.hasChildren&&N.stale?1:typeof P.defaultFindVisibility=="number"?P.defaultFindVisibility:typeof P.defaultFindVisibility>"u"?2:P.defaultFindVisibility(N.element)}}function w(P,N){N(P),P.children.forEach(O=>w(O,N))}class S{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return n.Event.map(this.tree.onDidChangeFocus,r)}get onDidChangeSelection(){return n.Event.map(this.tree.onDidChangeSelection,r)}get onMouseDblClick(){return n.Event.map(this.tree.onMouseDblClick,u)}get onPointer(){return n.Event.map(this.tree.onPointer,u)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(N,O,F,x,W,V={}){this.user=N,this.dataSource=W,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new n.Emitter,this._onDidChangeNodeSlowState=new n.Emitter,this.nodeMapper=new y.WeakMapper(q=>new l(q)),this.disposables=new t.DisposableStore,this.identityProvider=V.identityProvider,this.autoExpandSingleChildren=typeof V.autoExpandSingleChildren>"u"?!1:V.autoExpandSingleChildren,this.sorter=V.sorter,this.getDefaultCollapseState=q=>V.collapseByDefault?V.collapseByDefault(q)?y.ObjectTreeElementCollapseState.PreserveOrCollapsed:y.ObjectTreeElementCollapseState.PreserveOrExpanded:void 0,this.tree=this.createTree(N,O,F,x,V),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=s({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(N,O,F,x,W){const V=new k.ComposedTreeDelegate(F),q=x.map(z=>new a(z,this.nodeMapper,this._onDidChangeNodeSlowState.event)),H=v(W)||{};return new E.ObjectTree(N,O,V,q,H)}updateOptions(N={}){this.tree.updateOptions(N)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(N){this.tree.scrollTop=N}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(N,O){this.tree.layout(N,O)}style(N){this.tree.style(N)}getInput(){return this.root.element}async setInput(N,O){this.refreshPromises.forEach(x=>x.cancel()),this.refreshPromises.clear(),this.root.element=N;const F=O&&{viewState:O,focus:[],selection:[]};await this._updateChildren(N,!0,!1,F),F&&(this.tree.setFocus(F.focus),this.tree.setSelection(F.selection)),O&&typeof O.scrollTop=="number"&&(this.scrollTop=O.scrollTop)}async _updateChildren(N=this.root.element,O=!0,F=!1,x,W){if(typeof this.root.element>"u")throw new y.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await n.Event.toPromise(this._onDidRender.event));const V=this.getDataNode(N);if(await this.refreshAndRenderNode(V,O,x,W),F)try{this.tree.rerender(V)}catch{}}rerender(N){if(N===void 0||N===this.root.element){this.tree.rerender();return}const O=this.getDataNode(N);this.tree.rerender(O)}getNode(N=this.root.element){const O=this.getDataNode(N),F=this.tree.getNode(O===this.root?null:O);return this.nodeMapper.map(F)}collapse(N,O=!1){const F=this.getDataNode(N);return this.tree.collapse(F===this.root?null:F,O)}async expand(N,O=!1){if(typeof this.root.element>"u")throw new y.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await n.Event.toPromise(this._onDidRender.event));const F=this.getDataNode(N);if(this.tree.hasElement(F)&&!this.tree.isCollapsible(F)||(F.refreshPromise&&(await this.root.refreshPromise,await n.Event.toPromise(this._onDidRender.event)),F!==this.root&&!F.refreshPromise&&!this.tree.isCollapsed(F)))return!1;const x=this.tree.expand(F===this.root?null:F,O);return F.refreshPromise&&(await this.root.refreshPromise,await n.Event.toPromise(this._onDidRender.event)),x}setSelection(N,O){const F=N.map(x=>this.getDataNode(x));this.tree.setSelection(F,O)}getSelection(){return this.tree.getSelection().map(O=>O.element)}setFocus(N,O){const F=N.map(x=>this.getDataNode(x));this.tree.setFocus(F,O)}getFocus(){return this.tree.getFocus().map(O=>O.element)}reveal(N,O){this.tree.reveal(this.getDataNode(N),O)}getParentElement(N){const O=this.tree.getParentElement(this.getDataNode(N));return O&&O.element}getFirstElementChild(N=this.root.element){const O=this.getDataNode(N),F=this.tree.getFirstElementChild(O===this.root?null:O);return F&&F.element}getDataNode(N){const O=this.nodes.get(N===this.root.element?null:N);if(!O)throw new y.TreeError(this.user,`Data tree node not found: ${N}`);return O}async refreshAndRenderNode(N,O,F,x){await this.refreshNode(N,O,F),!this.disposables.isDisposed&&this.render(N,F,x)}async refreshNode(N,O,F){let x;if(this.subTreeRefreshPromises.forEach((W,V)=>{!x&&c(V,N)&&(x=W.then(()=>this.refreshNode(N,O,F)))}),x)return x;if(N!==this.root&&this.tree.getNode(N).collapsed){N.hasChildren=!!this.dataSource.hasChildren(N.element),N.stale=!0,this.setChildren(N,[],O,F);return}return this.doRefreshSubTree(N,O,F)}async doRefreshSubTree(N,O,F){let x;N.refreshPromise=new Promise(W=>x=W),this.subTreeRefreshPromises.set(N,N.refreshPromise),N.refreshPromise.finally(()=>{N.refreshPromise=void 0,this.subTreeRefreshPromises.delete(N)});try{const W=await this.doRefreshNode(N,O,F);N.stale=!1,await m.Promises.settled(W.map(V=>this.doRefreshSubTree(V,O,F)))}finally{x()}}async doRefreshNode(N,O,F){N.hasChildren=!!this.dataSource.hasChildren(N.element);let x;if(!N.hasChildren)x=Promise.resolve(o.Iterable.empty());else{const W=this.doGetChildren(N);if((0,i.isIterable)(W))x=Promise.resolve(W);else{const V=(0,m.timeout)(800);V.then(()=>{N.slow=!0,this._onDidChangeNodeSlowState.fire(N)},q=>null),x=W.finally(()=>V.cancel())}}try{const W=await x;return this.setChildren(N,W,O,F)}catch(W){if(N!==this.root&&this.tree.hasElement(N)&&this.tree.collapse(N),(0,p.isCancellationError)(W))return[];throw W}finally{N.slow&&(N.slow=!1,this._onDidChangeNodeSlowState.fire(N))}}doGetChildren(N){let O=this.refreshPromises.get(N);if(O)return O;const F=this.dataSource.getChildren(N.element);return(0,i.isIterable)(F)?this.processChildren(F):(O=(0,m.createCancelablePromise)(async()=>this.processChildren(await F)),this.refreshPromises.set(N,O),O.finally(()=>{this.refreshPromises.delete(N)}))}_onDidChangeCollapseState({node:N,deep:O}){N.element!==null&&!N.collapsed&&N.element.stale&&(O?this.collapse(N.element.element):this.refreshAndRenderNode(N.element,!1).catch(p.onUnexpectedError))}setChildren(N,O,F,x){const W=[...O];if(N.children.length===0&&W.length===0)return[];const V=new Map,q=new Map;for(const U of N.children)V.set(U.element,U),this.identityProvider&&q.set(U.id,{node:U,collapsed:this.tree.hasElement(U)&&this.tree.isCollapsed(U)});const H=[],z=W.map(U=>{const j=!!this.dataSource.hasChildren(U);if(!this.identityProvider){const R=s({element:U,parent:N,hasChildren:j,defaultCollapseState:this.getDefaultCollapseState(U)});return j&&R.defaultCollapseState===y.ObjectTreeElementCollapseState.PreserveOrExpanded&&H.push(R),R}const Y=this.identityProvider.getId(U).toString(),G=q.get(Y);if(G){const R=G.node;return V.delete(R.element),this.nodes.delete(R.element),this.nodes.set(U,R),R.element=U,R.hasChildren=j,F?G.collapsed?(R.children.forEach(J=>w(J,ie=>this.nodes.delete(ie.element))),R.children.splice(0,R.children.length),R.stale=!0):H.push(R):j&&!G.collapsed&&H.push(R),R}const K=s({element:U,parent:N,id:Y,hasChildren:j,defaultCollapseState:this.getDefaultCollapseState(U)});return x&&x.viewState.focus&&x.viewState.focus.indexOf(Y)>-1&&x.focus.push(K),x&&x.viewState.selection&&x.viewState.selection.indexOf(Y)>-1&&x.selection.push(K),(x&&x.viewState.expanded&&x.viewState.expanded.indexOf(Y)>-1||j&&K.defaultCollapseState===y.ObjectTreeElementCollapseState.PreserveOrExpanded)&&H.push(K),K});for(const U of V.values())w(U,j=>this.nodes.delete(j.element));for(const U of z)this.nodes.set(U.element,U);return N.children.splice(0,N.children.length,...z),N!==this.root&&this.autoExpandSingleChildren&&z.length===1&&H.length===0&&(z[0].forceExpanded=!0,H.push(z[0])),H}render(N,O,F){const x=N.children.map(V=>this.asTreeElement(V,O)),W=F&&{...F,diffIdentityProvider:F.diffIdentityProvider&&{getId(V){return F.diffIdentityProvider.getId(V.element)}}};this.tree.setChildren(N===this.root?null:N,x,W),N!==this.root&&this.tree.setCollapsible(N,N.hasChildren),this._onDidRender.fire()}asTreeElement(N,O){if(N.stale)return{element:N,collapsible:N.hasChildren,collapsed:!0};let F;return O&&O.viewState.expanded&&N.id&&O.viewState.expanded.indexOf(N.id)>-1?F=!1:N.forceExpanded?(F=!1,N.forceExpanded=!1):F=N.defaultCollapseState,{element:N,children:N.hasChildren?o.Iterable.map(N.children,x=>this.asTreeElement(x,O)):[],collapsible:N.hasChildren,collapsed:F}}processChildren(N){return this.sorter&&(N=[...N].sort(this.sorter.compare.bind(this.sorter))),N}dispose(){this.disposables.dispose(),this.tree.dispose()}}e.AsyncDataTree=S;class L{get element(){return{elements:this.node.element.elements.map(N=>N.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(N=>new L(N))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(N){this.node=N}}class D{constructor(N,O,F,x){this.renderer=N,this.nodeMapper=O,this.compressibleNodeMapperProvider=F,this.onDidChangeTwistieState=x,this.renderedNodes=new Map,this.disposables=[],this.templateId=N.templateId}renderTemplate(N){return{templateData:this.renderer.renderTemplate(N)}}renderElement(N,O,F,x){this.renderer.renderElement(this.nodeMapper.map(N),O,F.templateData,x)}renderCompressedElements(N,O,F,x){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(N),O,F.templateData,x)}renderTwistie(N,O){return N.slow?(O.classList.add(...b.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!0):(O.classList.remove(...b.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!1)}disposeElement(N,O,F,x){this.renderer.disposeElement?.(this.nodeMapper.map(N),O,F.templateData,x)}disposeCompressedElements(N,O,F,x){this.renderer.disposeCompressedElements?.(this.compressibleNodeMapperProvider().map(N),O,F.templateData,x)}disposeTemplate(N){this.renderer.disposeTemplate(N.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,t.dispose)(this.disposables)}}function T(P){const N=P&&v(P);return N&&{...N,keyboardNavigationLabelProvider:N.keyboardNavigationLabelProvider&&{...N.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(O){return P.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(O.map(F=>F.element))}}}}class M extends S{constructor(N,O,F,x,W,V,q={}){super(N,O,F,W,V,q),this.compressionDelegate=x,this.compressibleNodeMapper=new y.WeakMapper(H=>new L(H)),this.filter=q.filter}createTree(N,O,F,x,W){const V=new k.ComposedTreeDelegate(F),q=x.map(z=>new D(z,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),H=T(W)||{};return new E.CompressibleObjectTree(N,O,V,q,H)}asTreeElement(N,O){return{incompressible:this.compressionDelegate.isIncompressible(N.element),...super.asTreeElement(N,O)}}updateOptions(N={}){this.tree.updateOptions(N)}render(N,O,F){if(!this.identityProvider)return super.render(N,O);const x=G=>this.identityProvider.getId(G).toString(),W=G=>{const K=new Set;for(const R of G){const J=this.tree.getCompressedTreeNode(R===this.root?null:R);if(J.element)for(const ie of J.element.elements)K.add(x(ie.element))}return K},V=W(this.tree.getSelection()),q=W(this.tree.getFocus());super.render(N,O,F);const H=this.getSelection();let z=!1;const U=this.getFocus();let j=!1;const Y=G=>{const K=G.element;if(K)for(let R=0;R<K.elements.length;R++){const J=x(K.elements[R].element),ie=K.elements[K.elements.length-1].element;V.has(J)&&H.indexOf(ie)===-1&&(H.push(ie),z=!0),q.has(J)&&U.indexOf(ie)===-1&&(U.push(ie),j=!0)}G.children.forEach(Y)};Y(this.tree.getCompressedTreeNode(N===this.root?null:N)),z&&this.setSelection(H),j&&this.setFocus(U)}processChildren(N){return this.filter&&(N=o.Iterable.filter(N,O=>{const F=this.filter.filter(O,1),x=A(F);if(x===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return x===1})),super.processChildren(N)}}e.CompressibleAsyncDataTree=M;function A(P){return typeof P=="boolean"?P?1:0:(0,I.isFilterResult)(P)?(0,I.getVisibleState)(P.visibility):(0,I.getVisibleState)(P)}}),define(ne[361],se([1,0,8,6,2,42,16,11]),function(oe,e,d,k,I,E,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleWorkerServer=e.SimpleWorkerClient=void 0,e.logOnceWebWorkerWarning=o,e.create=f;const _=!1,b="default",p="$initialize";let n=!1;function o(h){y.isWeb&&(n||(n=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(h.message))}class t{constructor(v,w,S,L,D){this.vsWorker=v,this.req=w,this.channel=S,this.method=L,this.args=D,this.type=0}}class i{constructor(v,w,S,L){this.vsWorker=v,this.seq=w,this.res=S,this.err=L,this.type=1}}class s{constructor(v,w,S,L,D){this.vsWorker=v,this.req=w,this.channel=S,this.eventName=L,this.arg=D,this.type=2}}class g{constructor(v,w,S){this.vsWorker=v,this.req=w,this.event=S,this.type=3}}class c{constructor(v,w){this.vsWorker=v,this.req=w,this.type=4}}class l{constructor(v){this._workerId=-1,this._handler=v,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(v){this._workerId=v}sendMessage(v,w,S){const L=String(++this._lastSentReq);return new Promise((D,T)=>{this._pendingReplies[L]={resolve:D,reject:T},this._send(new t(this._workerId,L,v,w,S))})}listen(v,w,S){let L=null;const D=new k.Emitter({onWillAddFirstListener:()=>{L=String(++this._lastSentReq),this._pendingEmitters.set(L,D),this._send(new s(this._workerId,L,v,w,S))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(L),this._send(new c(this._workerId,L)),L=null}});return D.event}handleMessage(v){!v||!v.vsWorker||this._workerId!==-1&&v.vsWorker!==this._workerId||this._handleMessage(v)}createProxyToRemoteChannel(v,w){const S={get:(L,D)=>(typeof D=="string"&&!L[D]&&(u(D)?L[D]=T=>this.listen(v,D,T):r(D)?L[D]=this.listen(v,D,void 0):D.charCodeAt(0)===36&&(L[D]=async(...T)=>(await w?.(),this.sendMessage(v,D,T)))),L[D])};return new Proxy(Object.create(null),S)}_handleMessage(v){switch(v.type){case 1:return this._handleReplyMessage(v);case 0:return this._handleRequestMessage(v);case 2:return this._handleSubscribeEventMessage(v);case 3:return this._handleEventMessage(v);case 4:return this._handleUnsubscribeEventMessage(v)}}_handleReplyMessage(v){if(!this._pendingReplies[v.seq]){console.warn("Got reply to unknown seq");return}const w=this._pendingReplies[v.seq];if(delete this._pendingReplies[v.seq],v.err){let S=v.err;v.err.$isError&&(S=new Error,S.name=v.err.name,S.message=v.err.message,S.stack=v.err.stack),w.reject(S);return}w.resolve(v.res)}_handleRequestMessage(v){const w=v.req;this._handler.handleMessage(v.channel,v.method,v.args).then(L=>{this._send(new i(this._workerId,w,L,void 0))},L=>{L.detail instanceof Error&&(L.detail=(0,d.transformErrorForSerialization)(L.detail)),this._send(new i(this._workerId,w,void 0,(0,d.transformErrorForSerialization)(L)))})}_handleSubscribeEventMessage(v){const w=v.req,S=this._handler.handleEvent(v.channel,v.eventName,v.arg)(L=>{this._send(new g(this._workerId,w,L))});this._pendingEvents.set(w,S)}_handleEventMessage(v){if(!this._pendingEmitters.has(v.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(v.req).fire(v.event)}_handleUnsubscribeEventMessage(v){if(!this._pendingEvents.has(v.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(v.req).dispose(),this._pendingEvents.delete(v.req)}_send(v){const w=[];if(v.type===0)for(let S=0;S<v.args.length;S++)v.args[S]instanceof ArrayBuffer&&w.push(v.args[S]);else v.type===1&&v.res instanceof ArrayBuffer&&w.push(v.res);this._handler.sendMessage(v,w)}}class a extends I.Disposable{constructor(v,w){super(),this._localChannels=new Map,this._worker=this._register(v.create({amdModuleId:"vs/base/common/worker/simpleWorker",esmModuleLocation:w.esmModuleLocation,label:w.label},D=>{this._protocol.handleMessage(D)},D=>{(0,d.onUnexpectedError)(D)})),this._protocol=new l({sendMessage:(D,T)=>{this._worker.postMessage(D,T)},handleMessage:(D,T,M)=>this._handleMessage(D,T,M),handleEvent:(D,T,M)=>this._handleEvent(D,T,M)}),this._protocol.setWorkerId(this._worker.getId());let S=null;const L=globalThis.require;typeof L<"u"&&typeof L.getConfig=="function"?S=L.getConfig():typeof globalThis.requirejs<"u"&&(S=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(b,p,[this._worker.getId(),JSON.parse(JSON.stringify(S)),w.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(b,async()=>{await this._onModuleLoaded}),this._onModuleLoaded.catch(D=>{this._onError("Worker failed to load "+w.amdModuleId,D)})}_handleMessage(v,w,S){const L=this._localChannels.get(v);if(!L)return Promise.reject(new Error(`Missing channel ${v} on main thread`));if(typeof L[w]!="function")return Promise.reject(new Error(`Missing method ${w} on main thread channel ${v}`));try{return Promise.resolve(L[w].apply(L,S))}catch(D){return Promise.reject(D)}}_handleEvent(v,w,S){const L=this._localChannels.get(v);if(!L)throw new Error(`Missing channel ${v} on main thread`);if(u(w)){const D=L[w].call(L,S);if(typeof D!="function")throw new Error(`Missing dynamic event ${w} on main thread channel ${v}.`);return D}if(r(w)){const D=L[w];if(typeof D!="function")throw new Error(`Missing event ${w} on main thread channel ${v}.`);return D}throw new Error(`Malformed event name ${w}`)}setChannel(v,w){this._localChannels.set(v,w)}_onError(v,w){console.error(v),console.info(w)}}e.SimpleWorkerClient=a;function r(h){return h[0]==="o"&&h[1]==="n"&&m.isUpperAsciiLetter(h.charCodeAt(2))}function u(h){return/^onDynamic/.test(h)&&m.isUpperAsciiLetter(h.charCodeAt(9))}class C{constructor(v,w){this._localChannels=new Map,this._remoteChannels=new Map,this._requestHandlerFactory=w,this._requestHandler=null,this._protocol=new l({sendMessage:(S,L)=>{v(S,L)},handleMessage:(S,L,D)=>this._handleMessage(S,L,D),handleEvent:(S,L,D)=>this._handleEvent(S,L,D)})}onmessage(v){this._protocol.handleMessage(v)}_handleMessage(v,w,S){if(v===b&&w===p)return this.initialize(S[0],S[1],S[2]);const L=v===b?this._requestHandler:this._localChannels.get(v);if(!L)return Promise.reject(new Error(`Missing channel ${v} on worker thread`));if(typeof L[w]!="function")return Promise.reject(new Error(`Missing method ${w} on worker thread channel ${v}`));try{return Promise.resolve(L[w].apply(L,S))}catch(D){return Promise.reject(D)}}_handleEvent(v,w,S){const L=v===b?this._requestHandler:this._localChannels.get(v);if(!L)throw new Error(`Missing channel ${v} on worker thread`);if(u(w)){const D=L[w].call(L,S);if(typeof D!="function")throw new Error(`Missing dynamic event ${w} on request handler.`);return D}if(r(w)){const D=L[w];if(typeof D!="function")throw new Error(`Missing event ${w} on request handler.`);return D}throw new Error(`Malformed event name ${w}`)}getChannel(v){if(!this._remoteChannels.has(v)){const w=this._protocol.createProxyToRemoteChannel(v);this._remoteChannels.set(v,w)}return this._remoteChannels.get(v)}async initialize(v,w,S){if(this._protocol.setWorkerId(v),this._requestHandlerFactory){this._requestHandler=this._requestHandlerFactory(this);return}if(w&&(typeof w.baseUrl<"u"&&delete w.baseUrl,typeof w.paths<"u"&&typeof w.paths.vs<"u"&&delete w.paths.vs,typeof w.trustedTypesPolicy<"u"&&delete w.trustedTypesPolicy,w.catchError=!0,globalThis.require.config(w)),_){const L=E.FileAccess.asBrowserUri(`${S}.js`).toString(!0);return new Promise((D,T)=>{oe([`${L}`],D,T)}).then(D=>{if(this._requestHandler=D.create(this),!this._requestHandler)throw new Error("No RequestHandler!")})}return new Promise((L,D)=>{(globalThis.require||oe)([S],M=>{if(this._requestHandler=M.create(this),!this._requestHandler){D(new Error("No RequestHandler!"));return}L()},D)})}}e.SimpleWorkerServer=C;function f(h){return new C(h,null)}}),define(ne[646],se([1,0,103,8,42,361,2,13,3]),function(oe,e,d,k,I,E,y,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerDescriptor=void 0,e.createWebWorker=l;const b=!1;let p;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?p=globalThis.workerttPolicy:p=(0,d.createTrustedTypesPolicy)("defaultWorkerFactory",{createScriptURL:a=>a});function n(a,r){const u=globalThis.MonacoEnvironment;if(u){if(typeof u.getWorker=="function")return u.getWorker("workerMain.js",r);if(typeof u.getWorkerUrl=="function"){const C=u.getWorkerUrl("workerMain.js",r);return new Worker(p?p.createScriptURL(C):C,{name:r,type:b?"module":void 0})}}if(typeof oe=="function"){const C=oe.toUrl("vs/base/worker/workerMain.js"),f="vs/base/worker/defaultWorkerFactory.js",h=oe.toUrl(f).slice(0,-f.length),v=o(r,C,h);return new Worker(p?p.createScriptURL(v):v,{name:r,type:b?"module":void 0})}if(a){const C=o(r,a.toString(!0)),f=new Worker(p?p.createScriptURL(C):C,{name:r,type:b?"module":void 0});return b?t(f):f}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function o(a,r,u){const C=/^((http:)|(https:)|(file:)|(vscode-file:))/.test(r);if(!(C&&r.substring(0,globalThis.origin.length)!==globalThis.origin)){const h=r.lastIndexOf("?"),v=r.lastIndexOf("#",h),w=h>0?new URLSearchParams(r.substring(h+1,~v?v:void 0)):new URLSearchParams;I.COI.addSearchParam(w,!0,!0),w.toString()?r=`${r}?${w.toString()}#${a}`:r=`${r}#${a}`}!b&&!C&&(r=new URL(r,globalThis.origin).toString());const f=new Blob([(0,m.coalesce)([`/*${a}*/`,u?`globalThis.MonacoEnvironment = { baseUrl: '${u}' };`:void 0,`globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify((0,_.getNLSMessages)())};`,`globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify((0,_.getNLSLanguage)())};`,`globalThis._VSCODE_FILE_ROOT = '${globalThis._VSCODE_FILE_ROOT}';`,"const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",b?`await import(ttPolicy?.createScriptURL('${r}') ?? '${r}');`:`importScripts(ttPolicy?.createScriptURL('${r}') ?? '${r}');`,b?"globalThis.postMessage({ type: 'vscode-worker-ready' });":void 0,`/*${a}*/`]).join("")],{type:"application/javascript"});return URL.createObjectURL(f)}function t(a){return new Promise((r,u)=>{a.onmessage=function(C){C.data.type==="vscode-worker-ready"&&(a.onmessage=null,r(a))},a.onerror=u})}function i(a){return typeof a.then=="function"}class s extends y.Disposable{constructor(r,u,C,f,h,v){super(),this.id=C,this.label=f;const w=n(r,f);i(w)?this.worker=w:this.worker=Promise.resolve(w),this.postMessage(u,[]),this.worker.then(S=>{S.onmessage=function(L){h(L.data)},S.onmessageerror=v,typeof S.addEventListener=="function"&&S.addEventListener("error",v)}),this._register((0,y.toDisposable)(()=>{this.worker?.then(S=>{S.onmessage=null,S.onmessageerror=null,S.removeEventListener("error",v),S.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(r,u){this.worker?.then(C=>{try{C.postMessage(r,u)}catch(f){(0,k.onUnexpectedError)(f),(0,k.onUnexpectedError)(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:f}))}})}}class g{constructor(r,u){this.amdModuleId=r,this.label=u,this.esmModuleLocation=b?I.FileAccess.asBrowserUri(`${r}.esm.js`):void 0}}e.WorkerDescriptor=g;class c{static{this.LAST_WORKER_ID=0}constructor(){this._webWorkerFailedBeforeError=!1}create(r,u,C){const f=++c.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new s(r.esmModuleLocation,r.amdModuleId,f,r.label||"anonymous"+f,u,h=>{(0,E.logOnceWebWorkerWarning)(h),this._webWorkerFailedBeforeError=h,C(h)})}}function l(a,r){const u=typeof a=="string"?new g(a,r):a;return new E.SimpleWorkerClient(new c,u)}}),define(ne[647],se([1,0,14,6,2,252,19]),function(oe,e,d,k,I,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.StorageHint=void 0;var m;(function(n){n[n.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",n[n.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(m||(e.StorageHint=m={}));var _;(function(n){n[n.None=0]="None",n[n.Initialized=1]="Initialized",n[n.Closed=2]="Closed"})(_||(e.StorageState=_={}));class b extends I.Disposable{static{this.DEFAULT_FLUSH_DELAY=100}constructor(o,t=Object.create(null)){super(),this.database=o,this.options=t,this._onDidChangeStorage=this._register(new k.PauseableEmitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=_.None,this.cache=new Map,this.flushDelayer=this._register(new d.ThrottledDelayer(b.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(o=>this.onDidChangeItemsExternal(o)))}onDidChangeItemsExternal(o){this._onDidChangeStorage.pause();try{o.changed?.forEach((t,i)=>this.acceptExternal(i,t)),o.deleted?.forEach(t=>this.acceptExternal(t,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(o,t){if(this.state===_.Closed)return;let i=!1;(0,y.isUndefinedOrNull)(t)?i=this.cache.delete(o):this.cache.get(o)!==t&&(this.cache.set(o,t),i=!0),i&&this._onDidChangeStorage.fire({key:o,external:!0})}get(o,t){const i=this.cache.get(o);return(0,y.isUndefinedOrNull)(i)?t:i}getBoolean(o,t){const i=this.get(o);return(0,y.isUndefinedOrNull)(i)?t:i==="true"}getNumber(o,t){const i=this.get(o);return(0,y.isUndefinedOrNull)(i)?t:parseInt(i,10)}async set(o,t,i=!1){if(this.state===_.Closed)return;if((0,y.isUndefinedOrNull)(t))return this.delete(o,i);const s=(0,y.isObject)(t)||Array.isArray(t)?(0,E.stringify)(t):String(t);if(this.cache.get(o)!==s)return this.cache.set(o,s),this.pendingInserts.set(o,s),this.pendingDeletes.delete(o),this._onDidChangeStorage.fire({key:o,external:i}),this.doFlush()}async delete(o,t=!1){if(!(this.state===_.Closed||!this.cache.delete(o)))return this.pendingDeletes.has(o)||this.pendingDeletes.add(o),this.pendingInserts.delete(o),this._onDidChangeStorage.fire({key:o,external:t}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const o={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(o).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async doFlush(o){return this.options.hint===m.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),o)}}e.Storage=b;class p{constructor(){this.onDidChangeItemsExternal=k.Event.None,this.items=new Map}async updateItems(o){o.insert?.forEach((t,i)=>this.items.set(i,t)),o.delete?.forEach(t=>this.items.delete(t))}}e.InMemoryStorageDatabase=p}),define(ne[362],se([1,0,2,6,5]),function(oe,e,d,k,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class E extends d.Disposable{constructor(m,_){super(),this._onDidChange=this._register(new k.Emitter),this.onDidChange=this._onDidChange.event,this._referenceDomElement=m,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,_)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let m=null;const _=()=>{m?this.observe({width:m.width,height:m.height}):this.observe()};let b=!1,p=!1;const n=()=>{if(b&&!p)try{b=!1,p=!0,_()}finally{(0,I.scheduleAtNextAnimationFrame)((0,I.getWindow)(this._referenceDomElement),()=>{p=!1,n()})}};this._resizeObserver=new ResizeObserver(o=>{o&&o[0]&&o[0].contentRect?m={width:o[0].contentRect.width,height:o[0].contentRect.height}:m=null,b=!0,n()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(m){this.measureReferenceDomElement(!0,m)}measureReferenceDomElement(m,_){let b=0,p=0;_?(b=_.width,p=_.height):this._referenceDomElement&&(b=this._referenceDomElement.clientWidth,p=this._referenceDomElement.clientHeight),b=Math.max(5,b),p=Math.max(5,p),(this._width!==b||this._height!==p)&&(this._width=b,this._height=p,m&&this._onDidChange.fire())}}e.ElementSizeObserver=E}),define(ne[648],se([1,0,5,18,57,19,3]),function(oe,e,d,k,I,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ManagedHoverWidget=void 0;class m{constructor(b,p,n){this.hoverDelegate=b,this.target=p,this.fadeInAnimation=n}async update(b,p,n){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let o;if(b===void 0||(0,E.isString)(b)||(0,d.isHTMLElement)(b))o=b;else if(!(0,E.isFunction)(b.markdown))o=b.markdown??b.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,y.localize)(69,"Loading..."),p,n),this._cancellationTokenSource=new k.CancellationTokenSource;const t=this._cancellationTokenSource.token;if(o=await b.markdown(t),o===void 0&&(o=b.markdownNotSupportedFallback),this.isDisposed||t.isCancellationRequested)return}this.show(o,p,n)}show(b,p,n){const o=this._hoverWidget;if(this.hasContent(b)){const t={content:b,target:this.target,actions:n?.actions,linkHandler:n?.linkHandler,trapFocus:n?.trapFocus,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!o,showHoverHint:n?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(t,p)}o?.dispose()}hasContent(b){return b?(0,I.isMarkdownString)(b)?!!b.value:!0:!1}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}e.ManagedHoverWidget=m}),define(ne[649],se([1,0,5,39,56]),function(oe,e,d,k,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class E extends I.ViewPart{constructor(o,t){super(o),this._viewDomNode=t,this._widgets={},this.domNode=(0,k.createFastDomNode)(document.createElement("div")),I.PartFingerprints.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,k.createFastDomNode)(document.createElement("div")),I.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(o){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(o);return!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLineMappingChanged(o){return this._updateAnchorsViewPositions(),!0}onLinesChanged(o){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(o){return this._updateAnchorsViewPositions(),!0}onLinesInserted(o){return this._updateAnchorsViewPositions(),!0}onScrollChanged(o){return!0}onZonesChanged(o){return!0}_updateAnchorsViewPositions(){const o=Object.keys(this._widgets);for(const t of o)this._widgets[t].updateAnchorViewPosition()}addWidget(o){const t=new y(this._context,this._viewDomNode,o);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(o,t,i,s,g){this._widgets[o.getId()].setPosition(t,i,s,g),this.setShouldRender()}removeWidget(o){const t=o.getId();if(this._widgets.hasOwnProperty(t)){const i=this._widgets[t];delete this._widgets[t];const s=i.domNode.domNode;s.remove(),s.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(o){return this._widgets.hasOwnProperty(o)?this._widgets[o].suppressMouseDown:!1}onBeforeRender(o){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(o)}prepareRender(o){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(o)}render(o){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(o)}}e.ViewContentWidgets=E;class y{constructor(o,t,i){this._primaryAnchor=new m(null,null),this._secondaryAnchor=new m(null,null),this._context=o,this._viewDomNode=t,this._actual=i,this.domNode=(0,k.createFastDomNode)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const s=this._context.configuration.options,g=s.get(146);this._fixedOverflowWidgets=s.get(42),this._contentWidth=g.contentWidth,this._contentLeft=g.contentLeft,this._lineHeight=s.get(67),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(o){const t=this._context.configuration.options;if(this._lineHeight=t.get(67),o.hasChanged(146)){const i=t.get(146);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(o,t,i){this._affinity=o,this._primaryAnchor=s(t,this._context.viewModel,this._affinity),this._secondaryAnchor=s(i,this._context.viewModel,this._affinity);function s(g,c,l){if(!g)return new m(null,null);const a=c.model.validatePosition(g);if(c.coordinatesConverter.modelPositionIsVisible(a)){const r=c.coordinatesConverter.convertModelPositionToViewPosition(a,l??void 0);return new m(g,r)}return new m(g,null)}}_getMaxWidth(){const o=this.domNode.domNode.ownerDocument,t=o.defaultView;return this.allowEditorOverflow?t?.innerWidth||o.documentElement.offsetWidth||o.body.offsetWidth:this._contentWidth}setPosition(o,t,i,s){this._setPosition(s,o,t),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(o,t,i,s){const g=o.top,c=g,l=o.top+o.height,a=s.viewportHeight-l,r=g-i,u=c>=i,C=l,f=a>=i;let h=o.left;return h+t>s.scrollLeft+s.viewportWidth&&(h=s.scrollLeft+s.viewportWidth-t),h<s.scrollLeft&&(h=s.scrollLeft),{fitsAbove:u,aboveTop:r,fitsBelow:f,belowTop:C,left:h}}_layoutHorizontalSegmentInPage(o,t,i,s){const l=Math.max(15,t.left-s),a=Math.min(t.left+t.width+s,o.width-15),u=this._viewDomNode.domNode.ownerDocument.defaultView;let C=t.left+i-(u?.scrollX??0);if(C+s>a){const f=C-(a-s);C-=f,i-=f}if(C<l){const f=C-l;C-=f,i-=f}return[i,C]}_layoutBoxInPage(o,t,i,s){const g=o.top-i,c=o.top+o.height,l=d.getDomNodePagePosition(this._viewDomNode.domNode),a=this._viewDomNode.domNode.ownerDocument,r=a.defaultView,u=l.top+g-(r?.scrollY??0),C=l.top+c-(r?.scrollY??0),f=d.getClientArea(a.body),[h,v]=this._layoutHorizontalSegmentInPage(f,l,o.left-s.scrollLeft+this._contentLeft,t),w=22,S=22,L=u>=w,D=C+i<=f.height-S;return this._fixedOverflowWidgets?{fitsAbove:L,aboveTop:Math.max(u,w),fitsBelow:D,belowTop:C,left:v}:{fitsAbove:L,aboveTop:g,fitsBelow:D,belowTop:c,left:h}}_prepareRenderWidgetAtExactPositionOverflowing(o){return new _(o.top,o.left+this._contentLeft)}_getAnchorsCoordinates(o){const t=g(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),i=this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,s=g(i,this._affinity,this._lineHeight);return{primary:t,secondary:s};function g(c,l,a){if(!c)return null;const r=o.visibleRangeForPosition(c);if(!r)return null;const u=c.column===1&&l===3?0:r.left,C=o.getVerticalOffsetForLineNumber(c.lineNumber)-o.scrollTop;return new b(C,u,a)}}_reduceAnchorCoordinates(o,t,i){if(!t)return o;const s=this._context.configuration.options.get(50);let g=t.left;return g<o.left?g=Math.max(g,o.left-i+s.typicalFullwidthCharacterWidth):g=Math.min(g,o.left+i-s.typicalFullwidthCharacterWidth),new b(o.top,g,o.height)}_prepareRenderWidget(o){if(!this._preference||this._preference.length===0)return null;const{primary:t,secondary:i}=this._getAnchorsCoordinates(o);if(!t)return{kind:"offViewport",preserveFocus:this.domNode.domNode.contains(this.domNode.domNode.ownerDocument.activeElement)};if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let c=null;if(typeof this._actual.beforeRender=="function"&&(c=p(this._actual.beforeRender,this._actual)),c)this._cachedDomNodeOffsetWidth=c.width,this._cachedDomNodeOffsetHeight=c.height;else{const a=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(a.width),this._cachedDomNodeOffsetHeight=Math.round(a.height)}}const s=this._reduceAnchorCoordinates(t,i,this._cachedDomNodeOffsetWidth);let g;this.allowEditorOverflow?g=this._layoutBoxInPage(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,o):g=this._layoutBoxInViewport(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,o);for(let c=1;c<=2;c++)for(const l of this._preference)if(l===1){if(!g)return null;if(c===2||g.fitsAbove)return{kind:"inViewport",coordinate:new _(g.aboveTop,g.left),position:1}}else if(l===2){if(!g)return null;if(c===2||g.fitsBelow)return{kind:"inViewport",coordinate:new _(g.belowTop,g.left),position:2}}else return this.allowEditorOverflow?{kind:"inViewport",coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new _(s.top,s.left)),position:0}:{kind:"inViewport",coordinate:new _(s.top,s.left),position:0};return null}onBeforeRender(o){!this._primaryAnchor.viewPosition||!this._preference||this._primaryAnchor.viewPosition.lineNumber<o.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>o.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(o){this._renderData=this._prepareRenderWidget(o)}render(o){if(!this._renderData||this._renderData.kind==="offViewport"){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this._renderData?.kind==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&p(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+o.scrollTop-o.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&p(this._actual.afterRender,this._actual,this._renderData.position)}}class m{constructor(o,t){this.modelPosition=o,this.viewPosition=t}}class _{constructor(o,t){this.top=o,this.left=t,this._coordinateBrand=void 0}}class b{constructor(o,t,i){this.top=o,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function p(n,o,...t){try{return n.call(o,...t)}catch{return null}}}),define(ne[650],se([1,0,39,56,5,492]),function(oe,e,d,k,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class E extends k.ViewPart{constructor(m,_){super(m),this._viewDomNode=_;const p=this._context.configuration.options.get(146);this._widgets={},this._verticalScrollbarWidth=p.verticalScrollbarWidth,this._minimapWidth=p.minimap.minimapWidth,this._horizontalScrollbarHeight=p.horizontalScrollbarHeight,this._editorHeight=p.height,this._editorWidth=p.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,d.createFastDomNode)(document.createElement("div")),k.PartFingerprints.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,d.createFastDomNode)(document.createElement("div")),k.PartFingerprints.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(m){const b=this._context.configuration.options.get(146);return this._verticalScrollbarWidth=b.verticalScrollbarWidth,this._minimapWidth=b.minimap.minimapWidth,this._horizontalScrollbarHeight=b.horizontalScrollbarHeight,this._editorHeight=b.height,this._editorWidth=b.width,!0}addWidget(m){const _=(0,d.createFastDomNode)(m.getDomNode());this._widgets[m.getId()]={widget:m,preference:null,domNode:_},_.setPosition("absolute"),_.setAttribute("widgetId",m.getId()),m.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(_):this._domNode.appendChild(_),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(m,_){const b=this._widgets[m.getId()],p=_?_.preference:null,n=_?.stackOridinal;return b.preference===p&&b.stack===n?(this._updateMaxMinWidth(),!1):(b.preference=p,b.stack=n,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(m){const _=m.getId();if(this._widgets.hasOwnProperty(_)){const p=this._widgets[_].domNode.domNode;delete this._widgets[_],p.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let m=0;const _=Object.keys(this._widgets);for(let b=0,p=_.length;b<p;b++){const n=_[b],t=this._widgets[n].widget.getMinContentWidthInPx?.();typeof t<"u"&&(m=Math.max(m,t))}this._context.viewLayout.setOverlayWidgetsMinWidth(m)}_renderWidget(m,_){const b=m.domNode;if(m.preference===null){b.setTop("");return}const p=2*this._verticalScrollbarWidth+this._minimapWidth;if(m.preference===0||m.preference===1){if(m.preference===1){const n=b.domNode.clientHeight;b.setTop(this._editorHeight-n-2*this._horizontalScrollbarHeight)}else b.setTop(0);m.stack!==void 0?(b.setTop(_[m.preference]),_[m.preference]+=b.domNode.clientWidth):b.setRight(p)}else if(m.preference===2)b.domNode.style.right="50%",m.stack!==void 0?(b.setTop(_[2]),_[2]+=b.domNode.clientHeight):b.setTop(0);else{const{top:n,left:o}=m.preference;if(this._context.configuration.options.get(42)&&m.widget.allowEditorOverflow){const i=this._viewDomNodeRect;b.setTop(n+i.top),b.setLeft(o+i.left),b.setPosition("fixed")}else b.setTop(n),b.setLeft(o),b.setPosition("absolute")}}prepareRender(m){this._viewDomNodeRect=I.getDomNodePagePosition(this._viewDomNode.domNode)}render(m){this._domNode.setWidth(this._editorWidth);const _=Object.keys(this._widgets),b=Array.from({length:3},()=>0);_.sort((p,n)=>(this._widgets[p].stack||0)-(this._widgets[n].stack||0));for(let p=0,n=_.length;p<n;p++){const o=_[p];this._renderWidget(this._widgets[o],b)}}}e.ViewOverlayWidgets=E}),define(ne[651],se([1,0,5,8,2]),function(oe,e,d,k,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditorContributions=void 0;class E extends I.Disposable{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new I.DisposableMap),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(m,_,b){this._editor=m,this._instantiationService=b;for(const p of _){if(this._pending.has(p.id)){(0,k.onUnexpectedError)(new Error(`Cannot have two contributions with the same id ${p.id}`));continue}this._pending.set(p.id,p)}this._instantiateSome(0),this._register((0,d.runWhenWindowIdle)((0,d.getWindow)(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register((0,d.runWhenWindowIdle)((0,d.getWindow)(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register((0,d.runWhenWindowIdle)((0,d.getWindow)(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){const m={};for(const[_,b]of this._instances)typeof b.saveViewState=="function"&&(m[_]=b.saveViewState());return m}restoreViewState(m){for(const[_,b]of this._instances)typeof b.restoreViewState=="function"&&b.restoreViewState(m[_])}get(m){return this._instantiateById(m),this._instances.get(m)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){return(0,d.runWhenWindowIdle)((0,d.getWindow)(this._editor?.getDomNode()),()=>{this._instantiateSome(1)},50)}_instantiateSome(m){if(this._finishedInstantiation[m])return;this._finishedInstantiation[m]=!0;const _=this._findPendingContributionsByInstantiation(m);for(const b of _)this._instantiateById(b.id)}_findPendingContributionsByInstantiation(m){const _=[];for(const[,b]of this._pending)b.instantiation===m&&_.push(b);return _}_instantiateById(m){const _=this._pending.get(m);if(_){if(this._pending.delete(m),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const b=this._instantiationService.createInstance(_.ctor,this._editor);this._instances.set(_.id,b),typeof b.restoreViewState=="function"&&_.instantiation!==0&&console.warn(`Editor contribution '${_.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(b){(0,k.onUnexpectedError)(b)}}}}e.CodeEditorContributions=E}),define(ne[363],se([1,0,173,2,21,65]),function(oe,e,d,k,I,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorSash=e.SashLayout=void 0;class y{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(b,p){this._options=b,this.dimensions=p,this.sashLeft=(0,E.derivedWithSetter)(this,n=>{const o=this._sashRatio.read(n)??this._options.splitViewDefaultRatio.read(n);return this._computeSashLeft(o,n)},(n,o)=>{const t=this.dimensions.width.get();this._sashRatio.set(n/t,o)}),this._sashRatio=(0,I.observableValue)(this,void 0)}_computeSashLeft(b,p){const n=this.dimensions.width.read(p),o=Math.floor(this._options.splitViewDefaultRatio.read(p)*n),t=this._options.enableSplitViewResizing.read(p)?Math.floor(b*n):o,i=100;return n<=i*2?o:t<i?i:t>n-i?n-i:t}}e.SashLayout=y;class m extends k.Disposable{constructor(b,p,n,o,t,i){super(),this._domNode=b,this._dimensions=p,this._enabled=n,this._boundarySashes=o,this.sashLeft=t,this._resetSash=i,this._sash=this._register(new d.Sash(this._domNode,{getVerticalSashTop:s=>0,getVerticalSashLeft:s=>this.sashLeft.get(),getVerticalSashHeight:s=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(s=>{this.sashLeft.set(this._startSashPosition+(s.currentX-s.startX),void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._resetSash())),this._register((0,I.autorun)(s=>{const g=this._boundarySashes.read(s);g&&(this._sash.orthogonalEndSash=g.bottom)})),this._register((0,I.autorun)(s=>{const g=this._enabled.read(s);this._sash.state=g?3:0,this.sashLeft.read(s),this._dimensions.height.read(s),this._sash.layout()}))}}e.DiffEditorSash=m}),define(ne[652],se([1,0,5,41,26,2,16,30,3]),function(oe,e,d,k,I,E,y,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffDeletedCodeMargin=void 0;class b extends E.Disposable{get visibility(){return this._visibility}set visibility(n){this._visibility!==n&&(this._visibility=n,this._diffActions.style.visibility=n?"visible":"hidden")}constructor(n,o,t,i,s,g,c,l,a){super(),this._getViewZoneId=n,this._marginDomNode=o,this._modifiedEditor=t,this._diff=i,this._editor=s,this._viewLineCounts=g,this._originalTextModel=c,this._contextMenuService=l,this._clipboardService=a,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=m.ThemeIcon.asClassName(I.Codicon.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const r=this._modifiedEditor.getOption(67);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${r}px`,this._diffActions.style.lineHeight=`${r}px`,this._marginDomNode.appendChild(this._diffActions);let u=0;const C=t.getOption(128)&&!y.isIOS,f=(h,v)=>{this._contextMenuService.showContextMenu({domForShadowRoot:C?t.getDomNode()??void 0:void 0,getAnchor:()=>({x:h,y:v}),getActions:()=>{const w=[],S=i.modified.isEmpty;return w.push(new k.Action("diff.clipboard.copyDeletedContent",S?i.original.length>1?(0,_.localize)(99,"Copy deleted lines"):(0,_.localize)(100,"Copy deleted line"):i.original.length>1?(0,_.localize)(101,"Copy changed lines"):(0,_.localize)(102,"Copy changed line"),void 0,!0,async()=>{const D=this._originalTextModel.getValueInRange(i.original.toExclusiveRange());await this._clipboardService.writeText(D)})),i.original.length>1&&w.push(new k.Action("diff.clipboard.copyDeletedLineContent",S?(0,_.localize)(103,"Copy deleted line ({0})",i.original.startLineNumber+u):(0,_.localize)(104,"Copy changed line ({0})",i.original.startLineNumber+u),void 0,!0,async()=>{let D=this._originalTextModel.getLineContent(i.original.startLineNumber+u);D===""&&(D=this._originalTextModel.getEndOfLineSequence()===0?`
602
602
  `:`\r
603
603
  `),await this._clipboardService.writeText(D)})),t.getOption(92)||w.push(new k.Action("diff.inline.revertChange",(0,_.localize)(105,"Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),w},autoSelectFirstItem:!0})};this._register((0,d.addStandardDisposableListener)(this._diffActions,"mousedown",h=>{if(!h.leftButton)return;const{top:v,height:w}=(0,d.getDomNodePagePosition)(this._diffActions),S=Math.floor(r/3);h.preventDefault(),f(h.posx,v+w+S)})),this._register(t.onMouseMove(h=>{(h.target.type===8||h.target.type===5)&&h.target.detail.viewZoneId===this._getViewZoneId()?(u=this._updateLightBulbPosition(this._marginDomNode,h.event.browserEvent.y,r),this.visibility=!0):this.visibility=!1})),this._register(t.onMouseDown(h=>{h.event.leftButton&&(h.target.type===8||h.target.type===5)&&h.target.detail.viewZoneId===this._getViewZoneId()&&(h.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,h.event.browserEvent.y,r),f(h.event.posx,h.event.posy+r))}))}_updateLightBulbPosition(n,o,t){const{top:i}=(0,d.getDomNodePagePosition)(n),s=o-i,g=Math.floor(s/t),c=g*t;if(this._diffActions.style.top=`${c}px`,this._viewLineCounts){let l=0;for(let a=0;a<this._viewLineCounts.length;a++)if(l+=this._viewLineCounts[a],g<l)return a}return g}}e.InlineDiffDeletedCodeMargin=b}),define(ne[653],se([1,0,5,114,26,2,21,55,4,105,40,3]),function(oe,e,d,k,I,E,y,m,_,b,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RevertButton=e.RevertButtonsFeature=void 0;const o=[];class t extends E.Disposable{constructor(g,c,l,a){super(),this._editors=g,this._diffModel=c,this._options=l,this._widget=a,this._selectedDiffs=(0,y.derived)(this,r=>{const C=this._diffModel.read(r)?.diff.read(r);if(!C)return o;const f=this._editors.modifiedSelections.read(r);if(f.every(S=>S.isEmpty()))return o;const h=new m.LineRangeSet(f.map(S=>m.LineRange.fromRangeInclusive(S))),w=C.mappings.filter(S=>S.lineRangeMapping.innerChanges&&h.intersects(S.lineRangeMapping.modified)).map(S=>({mapping:S,rangeMappings:S.lineRangeMapping.innerChanges.filter(L=>f.some(D=>_.Range.areIntersecting(L.modifiedRange,D)))}));return w.length===0||w.every(S=>S.rangeMappings.length===0)?o:w}),this._register((0,y.autorunWithStore)((r,u)=>{if(!this._options.shouldRenderOldRevertArrows.read(r))return;const C=this._diffModel.read(r),f=C?.diff.read(r);if(!C||!f||C.movedTextToCompare.read(r))return;const h=[],v=this._selectedDiffs.read(r),w=new Set(v.map(S=>S.mapping));if(v.length>0){const S=this._editors.modifiedSelections.read(r),L=u.add(new i(S[S.length-1].positionLineNumber,this._widget,v.flatMap(D=>D.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(L),h.push(L)}for(const S of f.mappings)if(!w.has(S)&&!S.lineRangeMapping.modified.isEmpty&&S.lineRangeMapping.innerChanges){const L=u.add(new i(S.lineRangeMapping.modified.startLineNumber,this._widget,S.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(L),h.push(L)}u.add((0,E.toDisposable)(()=>{for(const S of h)this._editors.modified.removeGlyphMarginWidget(S)}))}))}}e.RevertButtonsFeature=t;class i extends E.Disposable{static{this.counter=0}getId(){return this._id}constructor(g,c,l,a){super(),this._lineNumber=g,this._widget=c,this._diffs=l,this._revertSelection=a,this._id=`revertButton${i.counter++}`,this._domNode=(0,d.h)("div.revertButton",{title:this._revertSelection?(0,n.localize)(122,"Revert Selected Changes"):(0,n.localize)(123,"Revert Change")},[(0,k.renderIcon)(I.Codicon.arrowRight)]).root,this._register((0,d.addDisposableListener)(this._domNode,d.EventType.MOUSE_DOWN,r=>{r.button!==2&&(r.stopPropagation(),r.preventDefault())})),this._register((0,d.addDisposableListener)(this._domNode,d.EventType.MOUSE_UP,r=>{r.stopPropagation(),r.preventDefault()})),this._register((0,d.addDisposableListener)(this._domNode,d.EventType.CLICK,r=>{this._diffs instanceof b.LineRangeMapping?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),r.stopPropagation(),r.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:p.GlyphMarginLane.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}e.RevertButton=i}),define(ne[88],se([1,0,67,18,2,21,362,9,4,113]),function(oe,e,d,k,I,E,y,m,_,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RefCounted=e.DisposableCancellationTokenSource=e.ManagedOverlayWidget=e.PlaceholderViewZone=e.ViewZoneOverlayWidget=e.ObservableElementSizeObserver=void 0,e.joinCombine=p,e.applyObservableDecorations=n,e.appendRemoveOnDispose=o,e.prependRemoveOnDispose=t,e.animatedObservable=s,e.applyStyle=r,e.applyViewZones=u,e.translatePosition=f,e.filterWithPrevious=v;function p(D,T,M,A){if(D.length===0)return T;if(T.length===0)return D;const P=[];let N=0,O=0;for(;N<D.length&&O<T.length;){const F=D[N],x=T[O],W=M(F),V=M(x);W<V?(P.push(F),N++):W>V?(P.push(x),O++):(P.push(A(F,x)),N++,O++)}for(;N<D.length;)P.push(D[N]),N++;for(;O<T.length;)P.push(T[O]),O++;return P}function n(D,T){const M=new I.DisposableStore,A=D.createDecorationsCollection();return M.add((0,E.autorunOpts)({debugName:()=>`Apply decorations from ${T.debugName}`},P=>{const N=T.read(P);A.set(N)})),M.add({dispose:()=>{A.clear()}}),M}function o(D,T){return D.appendChild(T),(0,I.toDisposable)(()=>{T.remove()})}function t(D,T){return D.prepend(T),(0,I.toDisposable)(()=>{T.remove()})}class i extends I.Disposable{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(T,M){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new y.ElementSizeObserver(T,M)),this._width=(0,E.observableValue)(this,this.elementSizeObserver.getWidth()),this._height=(0,E.observableValue)(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(A=>(0,E.transaction)(P=>{this._width.set(this.elementSizeObserver.getWidth(),P),this._height.set(this.elementSizeObserver.getHeight(),P)})))}observe(T){this.elementSizeObserver.observe(T)}setAutomaticLayout(T){this._automaticLayout=T,T?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}e.ObservableElementSizeObserver=i;function s(D,T,M){let A=T.get(),P=A,N=A;const O=(0,E.observableValue)("animatedValue",A);let F=-1;const x=300;let W;M.add((0,E.autorunHandleChanges)({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(q,H)=>(q.didChange(T)&&(H.animate=H.animate||q.change),!0)},(q,H)=>{W!==void 0&&(D.cancelAnimationFrame(W),W=void 0),P=N,A=T.read(q),F=Date.now()-(H.animate?0:x),V()}));function V(){const q=Date.now()-F;N=Math.floor(g(q,P,A-P,x)),q<x?W=D.requestAnimationFrame(V):N=A,O.set(N,void 0)}return O}function g(D,T,M,A){return D===A?T+M:M*(-Math.pow(2,-10*D/A)+1)+T}class c extends I.Disposable{constructor(T,M,A){super(),this._register(new a(T,A)),this._register(r(A,{height:M.actualHeight,top:M.actualTop}))}}e.ViewZoneOverlayWidget=c;class l{get afterLineNumber(){return this._afterLineNumber.get()}constructor(T,M){this._afterLineNumber=T,this.heightInPx=M,this.domNode=document.createElement("div"),this._actualTop=(0,E.observableValue)(this,void 0),this._actualHeight=(0,E.observableValue)(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=A=>{this._actualTop.set(A,void 0)},this.onComputedHeight=A=>{this._actualHeight.set(A,void 0)}}}e.PlaceholderViewZone=l;class a{static{this._counter=0}constructor(T,M){this._editor=T,this._domElement=M,this._overlayWidgetId=`managedOverlayWidget-${a._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}e.ManagedOverlayWidget=a;function r(D,T){return(0,E.autorun)(M=>{for(let[A,P]of Object.entries(T))P&&typeof P=="object"&&"read"in P&&(P=P.read(M)),typeof P=="number"&&(P=`${P}px`),A=A.replace(/[A-Z]/g,N=>"-"+N.toLowerCase()),D.style[A]=P})}function u(D,T,M,A){const P=new I.DisposableStore,N=[];return P.add((0,E.autorunWithStore)((O,F)=>{const x=T.read(O),W=new Map,V=new Map;M&&M(!0),D.changeViewZones(q=>{for(const H of N)q.removeZone(H),A?.delete(H);N.length=0;for(const H of x){const z=q.addZone(H);H.setZoneId&&H.setZoneId(z),N.push(z),A?.add(z),W.set(H,z)}}),M&&M(!1),F.add((0,E.autorunHandleChanges)({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(q,H){const z=V.get(q.changedObservable);return z!==void 0&&H.zoneIds.push(z),!0}},(q,H)=>{for(const z of x)z.onChange&&(V.set(z.onChange,W.get(z)),z.onChange.read(q));M&&M(!0),D.changeViewZones(z=>{for(const U of H.zoneIds)z.layoutZone(U)}),M&&M(!1)}))})),P.add({dispose(){M&&M(!0),D.changeViewZones(O=>{for(const F of N)O.removeZone(F)}),A?.clear(),M&&M(!1)}}),P}class C extends k.CancellationTokenSource{dispose(){super.dispose(!0)}}e.DisposableCancellationTokenSource=C;function f(D,T){const M=(0,d.findLast)(T,P=>P.original.startLineNumber<=D.lineNumber);if(!M)return _.Range.fromPositions(D);if(M.original.endLineNumberExclusive<=D.lineNumber){const P=D.lineNumber-M.original.endLineNumberExclusive+M.modified.endLineNumberExclusive;return _.Range.fromPositions(new m.Position(P,D.column))}if(!M.innerChanges)return _.Range.fromPositions(new m.Position(M.modified.startLineNumber,1));const A=(0,d.findLast)(M.innerChanges,P=>P.originalRange.getStartPosition().isBeforeOrEqual(D));if(!A){const P=D.lineNumber-M.original.startLineNumber+M.modified.startLineNumber;return _.Range.fromPositions(new m.Position(P,D.column))}if(A.originalRange.containsPosition(D))return A.modifiedRange;{const P=h(A.originalRange.getEndPosition(),D);return _.Range.fromPositions(P.addToPosition(A.modifiedRange.getEndPosition()))}}function h(D,T){return D.lineNumber===T.lineNumber?new b.TextLength(0,T.column-D.column):new b.TextLength(T.lineNumber-D.lineNumber,T.column-1)}function v(D,T){let M;return D.filter(A=>{const P=T(A,M);return M=A,P})}class w{static create(T,M=void 0){return new S(T,T,M)}static createWithDisposable(T,M,A=void 0){const P=new I.DisposableStore;return P.add(M),P.add(T),new S(T,P,A)}}e.RefCounted=w;class S extends w{constructor(T,M,A){super(),this.object=T,this._disposable=M,this._debugOwner=A,this._refCount=1,this._isDisposed=!1,this._owners=[],A&&this._addOwner(A)}_addOwner(T){T&&this._owners.push(T)}createNewRef(T){return this._refCount++,T&&this._addOwner(T),new L(this,T)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(T){if(this._refCount--,this._refCount===0&&this._disposable.dispose(),T){const M=this._owners.indexOf(T);M!==-1&&this._owners.splice(M,1)}}}class L extends w{constructor(T,M){super(),this._base=T,this._debugOwner=M,this._isDisposed=!1}get object(){return this._base.object}createNewRef(T){return this._base.createNewRef(T)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}}),define(ne[364],se([1,0,5,87,41,13,67,26,2,21,30,88,68,3]),function(oe,e,d,k,I,E,y,m,_,b,p,n,o,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MovedBlocksLinesFeature=void 0;class i extends _.Disposable{static{this.movedCodeBlockPadding=4}constructor(l,a,r,u,C){super(),this._rootElement=l,this._diffModel=a,this._originalEditorLayoutInfo=r,this._modifiedEditorLayoutInfo=u,this._editors=C,this._originalScrollTop=(0,b.observableFromEvent)(this,this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=(0,b.observableFromEvent)(this,this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=(0,b.observableSignalFromEvent)("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=(0,b.observableValue)(this,0),this._modifiedViewZonesChangedSignal=(0,b.observableSignalFromEvent)("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=(0,b.observableSignalFromEvent)("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=(0,b.derivedWithStore)(this,(S,L)=>{this._element.replaceChildren();const D=this._diffModel.read(S),T=D?.diff.read(S)?.movedTexts;if(!T||T.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(S);const M=this._originalEditorLayoutInfo.read(S),A=this._modifiedEditorLayoutInfo.read(S);if(!M||!A){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(S),this._originalViewZonesChangedSignal.read(S);const P=T.map(q=>{function H(ie,ue){const he=ue.getTopForLineNumber(ie.startLineNumber,!0),pe=ue.getTopForLineNumber(ie.endLineNumberExclusive,!0);return(he+pe)/2}const z=H(q.lineRangeMapping.original,this._editors.original),U=this._originalScrollTop.read(S),j=H(q.lineRangeMapping.modified,this._editors.modified),Y=this._modifiedScrollTop.read(S),G=z-U,K=j-Y,R=Math.min(z,j),J=Math.max(z,j);return{range:new o.OffsetRange(R,J),from:G,to:K,fromWithoutScroll:z,toWithoutScroll:j,move:q}});P.sort((0,E.tieBreakComparators)((0,E.compareBy)(q=>q.fromWithoutScroll>q.toWithoutScroll,E.booleanComparator),(0,E.compareBy)(q=>q.fromWithoutScroll>q.toWithoutScroll?q.fromWithoutScroll:-q.toWithoutScroll,E.numberComparator)));const N=s.compute(P.map(q=>q.range)),O=10,F=M.verticalScrollbarWidth,x=(N.getTrackCount()-1)*10+O*2,W=F+x+(A.contentLeft-i.movedCodeBlockPadding);let V=0;for(const q of P){const H=N.getTrack(V),z=F+O+H*10,U=15,j=15,Y=W,G=A.glyphMarginWidth+A.lineNumbersWidth,K=18,R=document.createElementNS("http://www.w3.org/2000/svg","rect");R.classList.add("arrow-rectangle"),R.setAttribute("x",`${Y-G}`),R.setAttribute("y",`${q.to-K/2}`),R.setAttribute("width",`${G}`),R.setAttribute("height",`${K}`),this._element.appendChild(R);const J=document.createElementNS("http://www.w3.org/2000/svg","g"),ie=document.createElementNS("http://www.w3.org/2000/svg","path");ie.setAttribute("d",`M 0 ${q.from} L ${z} ${q.from} L ${z} ${q.to} L ${Y-j} ${q.to}`),ie.setAttribute("fill","none"),J.appendChild(ie);const ue=document.createElementNS("http://www.w3.org/2000/svg","polygon");ue.classList.add("arrow"),L.add((0,b.autorun)(he=>{ie.classList.toggle("currentMove",q.move===D.activeMovedText.read(he)),ue.classList.toggle("currentMove",q.move===D.activeMovedText.read(he))})),ue.setAttribute("points",`${Y-j},${q.to-U/2} ${Y},${q.to} ${Y-j},${q.to+U/2}`),J.appendChild(ue),this._element.appendChild(J),V++}this.width.set(x,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register((0,_.toDisposable)(()=>this._element.remove())),this._register((0,b.autorun)(S=>{const L=this._originalEditorLayoutInfo.read(S),D=this._modifiedEditorLayoutInfo.read(S);!L||!D||(this._element.style.left=`${L.width-L.verticalScrollbarWidth}px`,this._element.style.height=`${L.height}px`,this._element.style.width=`${L.verticalScrollbarWidth+L.contentLeft-i.movedCodeBlockPadding+this.width.read(S)}px`)})),this._register((0,b.recomputeInitiallyAndOnChange)(this._state));const f=(0,b.derived)(S=>{const D=this._diffModel.read(S)?.diff.read(S);return D?D.movedTexts.map(T=>({move:T,original:new n.PlaceholderViewZone((0,b.constObservable)(T.lineRangeMapping.original.startLineNumber-1),18),modified:new n.PlaceholderViewZone((0,b.constObservable)(T.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register((0,n.applyViewZones)(this._editors.original,f.map(S=>S.map(L=>L.original)))),this._register((0,n.applyViewZones)(this._editors.modified,f.map(S=>S.map(L=>L.modified)))),this._register((0,b.autorunWithStore)((S,L)=>{const D=f.read(S);for(const T of D)L.add(new g(this._editors.original,T.original,T.move,"original",this._diffModel.get())),L.add(new g(this._editors.modified,T.modified,T.move,"modified",this._diffModel.get()))}));const h=(0,b.observableSignalFromEvent)("original.onDidFocusEditorWidget",S=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>S(void 0),0))),v=(0,b.observableSignalFromEvent)("modified.onDidFocusEditorWidget",S=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>S(void 0),0)));let w="modified";this._register((0,b.autorunHandleChanges)({createEmptyChangeSummary:()=>{},handleChange:(S,L)=>(S.didChange(h)&&(w="original"),S.didChange(v)&&(w="modified"),!0)},S=>{h.read(S),v.read(S);const L=this._diffModel.read(S);if(!L)return;const D=L.diff.read(S);let T;if(D&&w==="original"){const M=this._editors.originalCursor.read(S);M&&(T=D.movedTexts.find(A=>A.lineRangeMapping.original.contains(M.lineNumber)))}if(D&&w==="modified"){const M=this._editors.modifiedCursor.read(S);M&&(T=D.movedTexts.find(A=>A.lineRangeMapping.modified.contains(M.lineNumber)))}T!==L.movedTextToCompare.get()&&L.movedTextToCompare.set(void 0,void 0),L.setActiveMovedText(T)}))}}e.MovedBlocksLinesFeature=i;class s{static compute(l){const a=[],r=[];for(const u of l){let C=a.findIndex(f=>!f.intersectsStrict(u));C===-1&&(a.length>=6?C=(0,y.findMaxIdx)(a,(0,E.compareBy)(h=>h.intersectWithRangeLength(u),E.numberComparator)):(C=a.length,a.push(new o.OffsetRangeSet))),a[C].addRange(u),r.push(C)}return new s(a.length,r)}constructor(l,a){this._trackCount=l,this.trackPerLineIdx=a}getTrack(l){return this.trackPerLineIdx[l]}getTrackCount(){return this._trackCount}}class g extends n.ViewZoneOverlayWidget{constructor(l,a,r,u,C){const f=(0,d.h)("div.diff-hidden-lines-widget");super(l,a,f.root),this._editor=l,this._move=r,this._kind=u,this._diffModel=C,this._nodes=(0,d.h)("div.diff-moved-code-block",{style:{marginRight:"4px"}},[(0,d.h)("div.text-content@textContent"),(0,d.h)("div.action-bar@actionBar")]),f.root.appendChild(this._nodes.root);const h=(0,b.observableFromEvent)(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register((0,n.applyStyle)(this._nodes.root,{paddingRight:h.map(D=>D.verticalScrollbarWidth)}));let v;r.changes.length>0?v=this._kind==="original"?(0,t.localize)(118,"Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,t.localize)(119,"Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):v=this._kind==="original"?(0,t.localize)(120,"Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,t.localize)(121,"Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const w=this._register(new k.ActionBar(this._nodes.actionBar,{highlightToggledItems:!0})),S=new I.Action("",v,"",!1);w.push(S,{icon:!1,label:!0});const L=new I.Action("","Compare",p.ThemeIcon.asClassName(m.Codicon.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===r?void 0:this._move,void 0)});this._register((0,b.autorun)(D=>{const T=this._diffModel.movedTextToCompare.read(D)===r;L.checked=T})),w.push(L,{icon:!1,label:!0})}}}),define(ne[654],se([1,0,5,2,21,55,68]),function(oe,e,d,k,I,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorGutter=void 0;class m extends k.Disposable{constructor(p,n,o){super(),this._editor=p,this._domNode=n,this.itemProvider=o,this.scrollTop=(0,I.observableFromEvent)(this,this._editor.onDidScrollChange,s=>this._editor.getScrollTop()),this.isScrollTopZero=this.scrollTop.map(s=>s===0),this.modelAttached=(0,I.observableFromEvent)(this,this._editor.onDidChangeModel,s=>this._editor.hasModel()),this.editorOnDidChangeViewZones=(0,I.observableSignalFromEvent)("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=(0,I.observableSignalFromEvent)("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=(0,I.observableSignal)("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";const t=this._domNode.appendChild((0,d.h)("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),i=new ResizeObserver(()=>{(0,I.transaction)(s=>{this.domNodeSizeChanged.trigger(s)})});i.observe(this._domNode),this._register((0,k.toDisposable)(()=>i.disconnect())),this._register((0,I.autorun)(s=>{t.className=this.isScrollTopZero.read(s)?"":"scroll-decoration"})),this._register((0,I.autorun)(s=>this.render(s)))}dispose(){super.dispose(),(0,d.reset)(this._domNode)}render(p){if(!this.modelAttached.read(p))return;this.domNodeSizeChanged.read(p),this.editorOnDidChangeViewZones.read(p),this.editorOnDidContentSizeChange.read(p);const n=this.scrollTop.read(p),o=this._editor.getVisibleRanges(),t=new Set(this.views.keys()),i=y.OffsetRange.ofStartAndLength(0,this._domNode.clientHeight);if(!i.isEmpty)for(const s of o){const g=new E.LineRange(s.startLineNumber,s.endLineNumber+1),c=this.itemProvider.getIntersectingGutterItems(g,p);(0,I.transaction)(l=>{for(const a of c){if(!a.range.intersect(g))continue;t.delete(a.id);let r=this.views.get(a.id);if(r)r.item.set(a,l);else{const h=document.createElement("div");this._domNode.appendChild(h);const v=(0,I.observableValue)("item",a),w=this.itemProvider.createView(v,h);r=new _(v,w,h),this.views.set(a.id,r)}const u=a.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(a.range.startLineNumber,!0)-n:this._editor.getBottomForLineNumber(a.range.startLineNumber-1,!1)-n,f=(a.range.endLineNumberExclusive===1?Math.max(u,this._editor.getTopForLineNumber(a.range.startLineNumber,!1)-n):Math.max(u,this._editor.getBottomForLineNumber(a.range.endLineNumberExclusive-1,!0)-n))-u;r.domNode.style.top=`${u}px`,r.domNode.style.height=`${f}px`,r.gutterItemView.layout(y.OffsetRange.ofStartAndLength(u,f),i)}})}for(const s of t){const g=this.views.get(s);g.gutterItemView.dispose(),g.domNode.remove(),this.views.delete(s)}}}e.EditorGutter=m;class _{constructor(p,n,o){this.item=p,this.gutterItemView=n,this.domNode=o}}}),define(ne[365],se([1,0,41]),function(oe,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionRunnerWithContext=void 0;class k extends d.ActionRunner{constructor(E){super(),this._getContext=E}runAction(E,y){const m=this._getContext();return super.runAction(E,m)}}e.ActionRunnerWithContext=k}),define(ne[37],se([1,0,13,60,16,197,147,3]),function(oe,e,d,k,I,E,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOptions=e.editorOptionsRegistry=e.EDITOR_FONT_DEFAULTS=e.unicodeHighlightConfigKeys=e.inUntrustedWorkspace=e.ShowLightbulbIconMode=e.EditorLayoutInfoComputer=e.EditorFontVariations=e.EditorFontLigatures=e.TextEditorCursorStyle=e.ApplyUpdateResult=e.ComputeOptionsMemory=e.ConfigurationChangedEvent=e.MINIMAP_GUTTER_WIDTH=void 0,e.boolean=s,e.clampedInt=c,e.clampedFloat=a,e.stringSet=C,e.filterValidationDecorations=ge,e.MINIMAP_GUTTER_WIDTH=8;class _{constructor(fe){this._values=fe}hasChanged(fe){return this._values[fe]}}e.ConfigurationChangedEvent=_;class b{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=b;class p{constructor(fe,_e,xe,be){this.id=fe,this.name=_e,this.defaultValue=xe,this.schema=be}applyUpdate(fe,_e){return o(fe,_e)}compute(fe,_e,xe){return xe}}class n{constructor(fe,_e){this.newValue=fe,this.didChange=_e}}e.ApplyUpdateResult=n;function o(Fe,fe){if(typeof Fe!="object"||typeof fe!="object"||!Fe||!fe)return new n(fe,Fe!==fe);if(Array.isArray(Fe)||Array.isArray(fe)){const xe=Array.isArray(Fe)&&Array.isArray(fe)&&d.equals(Fe,fe);return new n(fe,!xe)}let _e=!1;for(const xe in fe)if(fe.hasOwnProperty(xe)){const be=o(Fe[xe],fe[xe]);be.didChange&&(Fe[xe]=be.newValue,_e=!0)}return new n(Fe,_e)}class t{constructor(fe){this.schema=void 0,this.id=fe,this.name="_never_",this.defaultValue=void 0}applyUpdate(fe,_e){return o(fe,_e)}validate(fe){return this.defaultValue}}class i{constructor(fe,_e,xe,be){this.id=fe,this.name=_e,this.defaultValue=xe,this.schema=be}applyUpdate(fe,_e){return o(fe,_e)}validate(fe){return typeof fe>"u"?this.defaultValue:fe}compute(fe,_e,xe){return xe}}function s(Fe,fe){return typeof Fe>"u"?fe:Fe==="false"?!1:!!Fe}class g extends i{constructor(fe,_e,xe,be=void 0){typeof be<"u"&&(be.type="boolean",be.default=xe),super(fe,_e,xe,be)}validate(fe){return s(fe,this.defaultValue)}}function c(Fe,fe,_e,xe){if(typeof Fe>"u")return fe;let be=parseInt(Fe,10);return isNaN(be)?fe:(be=Math.max(_e,be),be=Math.min(xe,be),be|0)}class l extends i{static clampedInt(fe,_e,xe,be){return c(fe,_e,xe,be)}constructor(fe,_e,xe,be,ve,we=void 0){typeof we<"u"&&(we.type="integer",we.default=xe,we.minimum=be,we.maximum=ve),super(fe,_e,xe,we),this.minimum=be,this.maximum=ve}validate(fe){return l.clampedInt(fe,this.defaultValue,this.minimum,this.maximum)}}function a(Fe,fe,_e,xe){if(typeof Fe>"u")return fe;const be=r.float(Fe,fe);return r.clamp(be,_e,xe)}class r extends i{static clamp(fe,_e,xe){return fe<_e?_e:fe>xe?xe:fe}static float(fe,_e){if(typeof fe=="number")return fe;if(typeof fe>"u")return _e;const xe=parseFloat(fe);return isNaN(xe)?_e:xe}constructor(fe,_e,xe,be,ve){typeof ve<"u"&&(ve.type="number",ve.default=xe),super(fe,_e,xe,ve),this.validationFn=be}validate(fe){return this.validationFn(r.float(fe,this.defaultValue))}}class u extends i{static string(fe,_e){return typeof fe!="string"?_e:fe}constructor(fe,_e,xe,be=void 0){typeof be<"u"&&(be.type="string",be.default=xe),super(fe,_e,xe,be)}validate(fe){return u.string(fe,this.defaultValue)}}function C(Fe,fe,_e,xe){return typeof Fe!="string"?fe:xe&&Fe in xe?xe[Fe]:_e.indexOf(Fe)===-1?fe:Fe}class f extends i{constructor(fe,_e,xe,be,ve=void 0){typeof ve<"u"&&(ve.type="string",ve.enum=be,ve.default=xe),super(fe,_e,xe,ve),this._allowedValues=be}validate(fe){return C(fe,this.defaultValue,this._allowedValues)}}class h extends p{constructor(fe,_e,xe,be,ve,we,Te=void 0){typeof Te<"u"&&(Te.type="string",Te.enum=ve,Te.default=be),super(fe,_e,xe,Te),this._allowedValues=ve,this._convert=we}validate(fe){return typeof fe!="string"?this.defaultValue:this._allowedValues.indexOf(fe)===-1?this.defaultValue:this._convert(fe)}}function v(Fe){switch(Fe){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class w extends p{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m.localize(183,"Use platform APIs to detect when a Screen Reader is attached."),m.localize(184,"Optimize for usage with a Screen Reader."),m.localize(185,"Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:m.localize(186,"Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(fe){switch(fe){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(fe,_e,xe){return xe===0?fe.accessibilitySupport:xe}}class S extends p{constructor(){const fe={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",fe,{"editor.comments.insertSpace":{type:"boolean",default:fe.insertSpace,description:m.localize(187,"Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:fe.ignoreEmptyLines,description:m.localize(188,"Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const _e=fe;return{insertSpace:s(_e.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:s(_e.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function L(Fe){switch(Fe){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var D;(function(Fe){Fe[Fe.Line=1]="Line",Fe[Fe.Block=2]="Block",Fe[Fe.Underline=3]="Underline",Fe[Fe.LineThin=4]="LineThin",Fe[Fe.BlockOutline=5]="BlockOutline",Fe[Fe.UnderlineThin=6]="UnderlineThin"})(D||(e.TextEditorCursorStyle=D={}));function T(Fe){switch(Fe){case"line":return D.Line;case"block":return D.Block;case"underline":return D.Underline;case"line-thin":return D.LineThin;case"block-outline":return D.BlockOutline;case"underline-thin":return D.UnderlineThin}}class M extends t{constructor(){super(143)}compute(fe,_e,xe){const be=["monaco-editor"];return _e.get(39)&&be.push(_e.get(39)),fe.extraEditorClassName&&be.push(fe.extraEditorClassName),_e.get(74)==="default"?be.push("mouse-default"):_e.get(74)==="copy"&&be.push("mouse-copy"),_e.get(112)&&be.push("showUnused"),_e.get(141)&&be.push("showDeprecated"),be.join(" ")}}class A extends g{constructor(){super(37,"emptySelectionClipboard",!0,{description:m.localize(189,"Controls whether copying without a selection copies the current line.")})}compute(fe,_e,xe){return xe&&fe.emptySelectionClipboard}}class P extends p{constructor(){const fe={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",fe,{"editor.find.cursorMoveOnType":{type:"boolean",default:fe.cursorMoveOnType,description:m.localize(190,"Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:fe.seedSearchStringFromSelection,enumDescriptions:[m.localize(191,"Never seed search string from the editor selection."),m.localize(192,"Always seed search string from the editor selection, including word at cursor position."),m.localize(193,"Only seed search string from the editor selection.")],description:m.localize(194,"Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:fe.autoFindInSelection,enumDescriptions:[m.localize(195,"Never turn on Find in Selection automatically (default)."),m.localize(196,"Always turn on Find in Selection automatically."),m.localize(197,"Turn on Find in Selection automatically when multiple lines of content are selected.")],description:m.localize(198,"Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:fe.globalFindClipboard,description:m.localize(199,"Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:I.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:fe.addExtraSpaceOnTop,description:m.localize(200,"Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:fe.loop,description:m.localize(201,"Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const _e=fe;return{cursorMoveOnType:s(_e.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof fe.seedSearchStringFromSelection=="boolean"?fe.seedSearchStringFromSelection?"always":"never":C(_e.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof fe.autoFindInSelection=="boolean"?fe.autoFindInSelection?"always":"never":C(_e.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:s(_e.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:s(_e.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:s(_e.loop,this.defaultValue.loop)}}}class N extends p{static{this.OFF='"liga" off, "calt" off'}static{this.ON='"liga" on, "calt" on'}constructor(){super(51,"fontLigatures",N.OFF,{anyOf:[{type:"boolean",description:m.localize(202,"Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:m.localize(203,"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:m.localize(204,"Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(fe){return typeof fe>"u"?this.defaultValue:typeof fe=="string"?fe==="false"||fe.length===0?N.OFF:fe==="true"?N.ON:fe:fe?N.ON:N.OFF}}e.EditorFontLigatures=N;class O extends p{static{this.OFF="normal"}static{this.TRANSLATE="translate"}constructor(){super(54,"fontVariations",O.OFF,{anyOf:[{type:"boolean",description:m.localize(205,"Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:m.localize(206,"Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:m.localize(207,"Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(fe){return typeof fe>"u"?this.defaultValue:typeof fe=="string"?fe==="false"?O.OFF:fe==="true"?O.TRANSLATE:fe:fe?O.TRANSLATE:O.OFF}compute(fe,_e,xe){return fe.fontInfo.fontVariationSettings}}e.EditorFontVariations=O;class F extends t{constructor(){super(50)}compute(fe,_e,xe){return fe.fontInfo}}class x extends i{constructor(){super(52,"fontSize",e.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:e.EDITOR_FONT_DEFAULTS.fontSize,description:m.localize(208,"Controls the font size in pixels.")})}validate(fe){const _e=r.float(fe,this.defaultValue);return _e===0?e.EDITOR_FONT_DEFAULTS.fontSize:r.clamp(_e,6,100)}compute(fe,_e,xe){return fe.fontInfo.fontSize}}class W extends p{static{this.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"]}static{this.MINIMUM_VALUE=1}static{this.MAXIMUM_VALUE=1e3}constructor(){super(53,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:W.MINIMUM_VALUE,maximum:W.MAXIMUM_VALUE,errorMessage:m.localize(209,'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:W.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:m.localize(210,'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(fe){return fe==="normal"||fe==="bold"?fe:String(l.clampedInt(fe,e.EDITOR_FONT_DEFAULTS.fontWeight,W.MINIMUM_VALUE,W.MAXIMUM_VALUE))}}class V extends p{constructor(){const fe={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",multipleTests:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:"",alternativeTestsCommand:""},_e={type:"string",enum:["peek","gotoAndPeek","goto"],default:fe.multiple,enumDescriptions:[m.localize(211,"Show Peek view of the results (default)"),m.localize(212,"Go to the primary result and show a Peek view"),m.localize(213,"Go to the primary result and enable Peek-less navigation to others")]},xe=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",fe,{"editor.gotoLocation.multiple":{deprecationMessage:m.localize(214,"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:m.localize(215,"Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),..._e},"editor.gotoLocation.multipleTypeDefinitions":{description:m.localize(216,"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),..._e},"editor.gotoLocation.multipleDeclarations":{description:m.localize(217,"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),..._e},"editor.gotoLocation.multipleImplementations":{description:m.localize(218,"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),..._e},"editor.gotoLocation.multipleReferences":{description:m.localize(219,"Controls the behavior the 'Go to References'-command when multiple target locations exist."),..._e},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:fe.alternativeDefinitionCommand,enum:xe,description:m.localize(220,"Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:fe.alternativeTypeDefinitionCommand,enum:xe,description:m.localize(221,"Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:fe.alternativeDeclarationCommand,enum:xe,description:m.localize(222,"Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:fe.alternativeImplementationCommand,enum:xe,description:m.localize(223,"Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:fe.alternativeReferenceCommand,enum:xe,description:m.localize(224,"Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const _e=fe;return{multiple:C(_e.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:_e.multipleDefinitions??C(_e.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:_e.multipleTypeDefinitions??C(_e.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:_e.multipleDeclarations??C(_e.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:_e.multipleImplementations??C(_e.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:_e.multipleReferences??C(_e.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),multipleTests:_e.multipleTests??C(_e.multipleTests,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:u.string(_e.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:u.string(_e.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:u.string(_e.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:u.string(_e.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:u.string(_e.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand),alternativeTestsCommand:u.string(_e.alternativeTestsCommand,this.defaultValue.alternativeTestsCommand)}}}class q extends p{constructor(){const fe={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",fe,{"editor.hover.enabled":{type:"boolean",default:fe.enabled,description:m.localize(225,"Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:fe.delay,minimum:0,maximum:1e4,description:m.localize(226,"Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:fe.sticky,description:m.localize(227,"Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:fe.hidingDelay,description:m.localize(228,"Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:fe.above,description:m.localize(229,"Prefer showing hovers above the line, if there's space.")}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const _e=fe;return{enabled:s(_e.enabled,this.defaultValue.enabled),delay:l.clampedInt(_e.delay,this.defaultValue.delay,0,1e4),sticky:s(_e.sticky,this.defaultValue.sticky),hidingDelay:l.clampedInt(_e.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:s(_e.above,this.defaultValue.above)}}}class H extends t{constructor(){super(146)}compute(fe,_e,xe){return H.computeLayout(_e,{memory:fe.memory,outerWidth:fe.outerWidth,outerHeight:fe.outerHeight,isDominatedByLongLines:fe.isDominatedByLongLines,lineHeight:fe.fontInfo.lineHeight,viewLineCount:fe.viewLineCount,lineNumbersDigitCount:fe.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:fe.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:fe.fontInfo.maxDigitWidth,pixelRatio:fe.pixelRatio,glyphMarginDecorationLaneCount:fe.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(fe){const _e=fe.height/fe.lineHeight,xe=Math.floor(fe.paddingTop/fe.lineHeight);let be=Math.floor(fe.paddingBottom/fe.lineHeight);fe.scrollBeyondLastLine&&(be=Math.max(be,_e-1));const ve=(xe+fe.viewLineCount+be)/(fe.pixelRatio*fe.height),we=Math.floor(fe.viewLineCount/ve);return{typicalViewportLineCount:_e,extraLinesBeforeFirstLine:xe,extraLinesBeyondLastLine:be,desiredRatio:ve,minimapLineCount:we}}static _computeMinimapLayout(fe,_e){const xe=fe.outerWidth,be=fe.outerHeight,ve=fe.pixelRatio;if(!fe.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(ve*be),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:be};const we=_e.stableMinimapLayoutInput,Te=we&&fe.outerHeight===we.outerHeight&&fe.lineHeight===we.lineHeight&&fe.typicalHalfwidthCharacterWidth===we.typicalHalfwidthCharacterWidth&&fe.pixelRatio===we.pixelRatio&&fe.scrollBeyondLastLine===we.scrollBeyondLastLine&&fe.paddingTop===we.paddingTop&&fe.paddingBottom===we.paddingBottom&&fe.minimap.enabled===we.minimap.enabled&&fe.minimap.side===we.minimap.side&&fe.minimap.size===we.minimap.size&&fe.minimap.showSlider===we.minimap.showSlider&&fe.minimap.renderCharacters===we.minimap.renderCharacters&&fe.minimap.maxColumn===we.minimap.maxColumn&&fe.minimap.scale===we.minimap.scale&&fe.verticalScrollbarWidth===we.verticalScrollbarWidth&&fe.isViewportWrapping===we.isViewportWrapping,Pe=fe.lineHeight,Be=fe.typicalHalfwidthCharacterWidth,He=fe.scrollBeyondLastLine,$e=fe.minimap.renderCharacters;let je=ve>=2?Math.round(fe.minimap.scale*2):fe.minimap.scale;const Xe=fe.minimap.maxColumn,et=fe.minimap.size,dt=fe.minimap.side,at=fe.verticalScrollbarWidth,st=fe.viewLineCount,pt=fe.remainingWidth,bt=fe.isViewportWrapping,De=$e?2:3;let Ie=Math.floor(ve*be);const Re=Ie/ve;let Se=!1,We=!1,qe=De*je,Ue=je/ve,Je=1;if(et==="fill"||et==="fit"){const{typicalViewportLineCount:Ve,extraLinesBeforeFirstLine:Ye,extraLinesBeyondLastLine:Ze,desiredRatio:nt,minimapLineCount:ct}=H.computeContainedMinimapLineCount({viewLineCount:st,scrollBeyondLastLine:He,paddingTop:fe.paddingTop,paddingBottom:fe.paddingBottom,height:be,lineHeight:Pe,pixelRatio:ve});if(st/ct>1)Se=!0,We=!0,je=1,qe=1,Ue=je/ve;else{let ft=!1,gt=je+1;if(et==="fit"){const mt=Math.ceil((Ye+st+Ze)*qe);bt&&Te&&pt<=_e.stableFitRemainingWidth?(ft=!0,gt=_e.stableFitMaxMinimapScale):ft=mt>Ie}if(et==="fill"||ft){Se=!0;const mt=je;qe=Math.min(Pe*ve,Math.max(1,Math.floor(1/nt))),bt&&Te&&pt<=_e.stableFitRemainingWidth&&(gt=_e.stableFitMaxMinimapScale),je=Math.min(gt,Math.max(1,Math.floor(qe/De))),je>mt&&(Je=Math.min(2,je/mt)),Ue=je/ve/Je,Ie=Math.ceil(Math.max(Ve,Ye+st+Ze)*qe),bt?(_e.stableMinimapLayoutInput=fe,_e.stableFitRemainingWidth=pt,_e.stableFitMaxMinimapScale=je):(_e.stableMinimapLayoutInput=null,_e.stableFitRemainingWidth=0)}}}const tt=Math.floor(Xe*Ue),Qe=Math.min(tt,Math.max(0,Math.floor((pt-at-2)*Ue/(Be+Ue)))+e.MINIMAP_GUTTER_WIDTH);let rt=Math.floor(ve*Qe);const Ct=rt/ve;rt=Math.floor(rt*Je);const ut=$e?1:2,ot=dt==="left"?0:xe-Qe-at;return{renderMinimap:ut,minimapLeft:ot,minimapWidth:Qe,minimapHeightIsEditorHeight:Se,minimapIsSampling:We,minimapScale:je,minimapLineHeight:qe,minimapCanvasInnerWidth:rt,minimapCanvasInnerHeight:Ie,minimapCanvasOuterWidth:Ct,minimapCanvasOuterHeight:Re}}static computeLayout(fe,_e){const xe=_e.outerWidth|0,be=_e.outerHeight|0,ve=_e.lineHeight|0,we=_e.lineNumbersDigitCount|0,Te=_e.typicalHalfwidthCharacterWidth,Pe=_e.maxDigitWidth,Be=_e.pixelRatio,He=_e.viewLineCount,$e=fe.get(138),je=$e==="inherit"?fe.get(137):$e,Xe=je==="inherit"?fe.get(133):je,et=fe.get(136),dt=_e.isDominatedByLongLines,at=fe.get(57),st=fe.get(68).renderType!==0,pt=fe.get(69),bt=fe.get(106),De=fe.get(84),Ie=fe.get(73),Re=fe.get(104),Se=Re.verticalScrollbarSize,We=Re.verticalHasArrows,qe=Re.arrowSize,Ue=Re.horizontalScrollbarSize,Je=fe.get(43),tt=fe.get(111)!=="never";let Qe=fe.get(66);Je&&tt&&(Qe+=16);let rt=0;if(st){const Dt=Math.max(we,pt);rt=Math.round(Dt*Pe)}let Ct=0;at&&(Ct=ve*_e.glyphMarginDecorationLaneCount);let ut=0,ot=ut+Ct,Ve=ot+rt,Ye=Ve+Qe;const Ze=xe-Ct-rt-Qe;let nt=!1,ct=!1,ht=-1;je==="inherit"&&dt?(nt=!0,ct=!0):Xe==="on"||Xe==="bounded"?ct=!0:Xe==="wordWrapColumn"&&(ht=et);const ft=H._computeMinimapLayout({outerWidth:xe,outerHeight:be,lineHeight:ve,typicalHalfwidthCharacterWidth:Te,pixelRatio:Be,scrollBeyondLastLine:bt,paddingTop:De.top,paddingBottom:De.bottom,minimap:Ie,verticalScrollbarWidth:Se,viewLineCount:He,remainingWidth:Ze,isViewportWrapping:ct},_e.memory||new b);ft.renderMinimap!==0&&ft.minimapLeft===0&&(ut+=ft.minimapWidth,ot+=ft.minimapWidth,Ve+=ft.minimapWidth,Ye+=ft.minimapWidth);const gt=Ze-ft.minimapWidth,mt=Math.max(1,Math.floor((gt-Se-2)/Te)),vt=We?qe:0;return ct&&(ht=Math.max(1,mt),Xe==="bounded"&&(ht=Math.min(ht,et))),{width:xe,height:be,glyphMarginLeft:ut,glyphMarginWidth:Ct,glyphMarginDecorationLaneCount:_e.glyphMarginDecorationLaneCount,lineNumbersLeft:ot,lineNumbersWidth:rt,decorationsLeft:Ve,decorationsWidth:Qe,contentLeft:Ye,contentWidth:gt,minimap:ft,viewportColumn:mt,isWordWrapMinified:nt,isViewportWrapping:ct,wrappingColumn:ht,verticalScrollbarWidth:Se,horizontalScrollbarHeight:Ue,overviewRuler:{top:vt,width:Se,height:be-2*vt,right:0}}}}e.EditorLayoutInfoComputer=H;class z extends p{constructor(){super(140,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[m.localize(230,"Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),m.localize(231,"Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:m.localize(232,"Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(fe){return C(fe,"simple",["simple","advanced"])}compute(fe,_e,xe){return _e.get(2)===2?"advanced":xe}}var U;(function(Fe){Fe.Off="off",Fe.OnCode="onCode",Fe.On="on"})(U||(e.ShowLightbulbIconMode=U={}));class j extends p{constructor(){const fe={enabled:U.OnCode};super(65,"lightbulb",fe,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[U.Off,U.OnCode,U.On],default:fe.enabled,enumDescriptions:[m.localize(233,"Disable the code action menu."),m.localize(234,"Show the code action menu when the cursor is on lines with code."),m.localize(235,"Show the code action menu when the cursor is on lines with code or on empty lines.")],description:m.localize(236,"Enables the Code Action lightbulb in the editor.")}})}validate(fe){return!fe||typeof fe!="object"?this.defaultValue:{enabled:C(fe.enabled,this.defaultValue.enabled,[U.Off,U.OnCode,U.On])}}}class Y extends p{constructor(){const fe={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(116,"stickyScroll",fe,{"editor.stickyScroll.enabled":{type:"boolean",default:fe.enabled,description:m.localize(237,"Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:fe.maxLineCount,minimum:1,maximum:20,description:m.localize(238,"Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:fe.defaultModel,description:m.localize(239,"Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:fe.scrollWithEditor,description:m.localize(240,"Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const _e=fe;return{enabled:s(_e.enabled,this.defaultValue.enabled),maxLineCount:l.clampedInt(_e.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:C(_e.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:s(_e.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class G extends p{constructor(){const fe={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(142,"inlayHints",fe,{"editor.inlayHints.enabled":{type:"string",default:fe.enabled,description:m.localize(241,"Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[m.localize(242,"Inlay hints are enabled"),m.localize(243,"Inlay hints are showing by default and hide when holding {0}",I.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),m.localize(244,"Inlay hints are hidden by default and show when holding {0}",I.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),m.localize(245,"Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:fe.fontSize,markdownDescription:m.localize(246,"Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:fe.fontFamily,markdownDescription:m.localize(247,"Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:fe.padding,description:m.localize(248,"Enables the padding around the inlay hints in the editor.")}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const _e=fe;return typeof _e.enabled=="boolean"&&(_e.enabled=_e.enabled?"on":"off"),{enabled:C(_e.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:l.clampedInt(_e.fontSize,this.defaultValue.fontSize,0,100),fontFamily:u.string(_e.fontFamily,this.defaultValue.fontFamily),padding:s(_e.padding,this.defaultValue.padding)}}}class K extends p{constructor(){super(66,"lineDecorationsWidth",10)}validate(fe){return typeof fe=="string"&&/^\d+(\.\d+)?ch$/.test(fe)?-parseFloat(fe.substring(0,fe.length-2)):l.clampedInt(fe,this.defaultValue,0,1e3)}compute(fe,_e,xe){return xe<0?l.clampedInt(-xe*fe.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):xe}}class R extends r{constructor(){super(67,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,fe=>r.clamp(fe,0,150),{markdownDescription:m.localize(249,`Controls the line height.
604
604
  - Use 0 to automatically compute the line height from the font size.
@@ -795,4 +795,4 @@ return moduleExports;
795
795
  });
796
796
 
797
797
  define("vs/editor/editor.main", ["vs/editor/edcore.main","vs/basic-languages/monaco.contribution","vs/language/css/monaco.contribution","vs/language/html/monaco.contribution","vs/language/json/monaco.contribution","vs/language/typescript/monaco.contribution"], function(api) { return api; });
798
- //# sourceMappingURL=../../../min-maps/vs/editor/editor.main.js.map
798
+ //# sourceMappingURL=../../../min-maps/vs/editor/editor.main.js.map