@opensumi/cli-engine 3.9.1-next-1776338823.0 → 3.9.1-next-1777269728.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33874,7 +33874,7 @@ a {
33874
33874
  }
33875
33875
  `},73136:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMentionBoxStyle=void 0;const e=20,n=({maxRows:r=10,minRows:o=2})=>({control:{fontSize:12},highlighter:{overflow:"hidden"},input:{margin:0},"&multiLine":{control:{border:"none"},highlighter:{padding:9},input:{boxSizing:"content-box",padding:"8px 0",lineHeight:`${e}px`,minHeight:`${e*o}px`,maxHeight:`${e*r}px`,outline:0,border:0,overflowY:"auto"}},suggestions:{dataA:"aaa",list:{backgroundColor:"var(--kt-selectDropdown-background)",fontSize:12,maxHeight:200,overflowY:"auto"},item:{backgroundColor:"var(--kt-selectDropdown-background)",color:"var(--kt-selectDropdown-foreground)",padding:"4px 16px","&focused":{backgroundColor:"var(--kt-selectDropdown-selectionBackground)"}}}});t.getMentionBoxStyle=n},5167:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMENT_TREE_NODE_HEIGHT=t.CommentNodeRendered=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(41869),v=e(53711),_=n.__importDefault(e(65887)),m=({item:p,defaultLeftPadding:s=8,leftPadding:h=8,decorations:a,onClick:g,onTwistierClick:d})=>{const u=(0,l.useDesignStyles)(_.default.expansion_toggle,"expansion_toggle"),E=(0,o.useCallback)(T=>{p.onSelect?p.onSelect(p):g(T,p)},[g]),f=(0,o.useCallback)(T=>{d(T,p)},[d]),c=`${s+(p.depth||0)*(h||0)+(v.CommentContentNode.is(p)?16:v.CommentFileNode.is(p)?0:28)}px`,y={height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`,paddingLeft:c},b=(0,o.useCallback)(T=>{if(v.CommentContentNode.is(T)||v.CommentFileNode.is(T))return o.default.createElement("div",{className:(0,r.default)(_.default.icon,T.icon),style:{height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`}})},[]),A=(0,o.useCallback)(T=>v.CommentContentNode.is(T)?o.default.createElement("div",{className:(0,r.default)(_.default.segment,_.default.displayname)},T.renderedLabel?T.renderedLabel:o.default.createElement(o.default.Fragment,null,T.comment,o.default.createElement("span",{className:_.default.separator},"\xB7"),T.author.name)):o.default.createElement("div",{className:(0,r.default)(_.default.segment,_.default.displayname)},T.renderedLabel),[]),S=(0,o.useCallback)(T=>o.default.createElement("div",{className:(0,r.default)(_.default.segment_grow,_.default.description)},T.renderedDescription),[]),w=(0,o.useCallback)(T=>o.default.createElement("div",{onClick:f,className:(0,r.default)(_.default.segment,u,(0,l.getIcon)("arrow-right"),{[`${_.default.mod_collapsed}`]:!T.expanded})}),[f]),I=(0,o.useCallback)(T=>{if(v.CommentFileNode.is(T)||T?.isAllowToggle)return w(T)},[]),D=(0,o.useCallback)(()=>p.tooltip,[p]);return o.default.createElement("div",{key:p.id,onClick:E,title:D(),className:(0,r.default)(_.default.comment_node,a?a.classlist:null),style:y,"data-id":p.id},o.default.createElement("div",{className:_.default.content},I(p),b(p),o.default.createElement("div",{className:_.default.overflow_wrap},A(p),S(p))))};t.CommentNodeRendered=m,t.COMMENT_TREE_NODE_HEIGHT=22},47842:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentModelService=t.CommentTreeModel=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(41869),v=e(23418),_=e(69635),m=e(53711),p=n.__importDefault(e(65887));let s=class extends o.TreeModel{constructor(g){super(),this.init(g)}};t.CommentTreeModel=s,t.CommentTreeModel=s=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[m.CommentRoot])],s);let h=class extends l.Disposable{constructor(){super(),this.selectedDecoration=new o.Decoration(p.default.mod_selected),this.focusedDecoration=new o.Decoration(p.default.mod_focused),this._selectedNodes=[],this.onDidUpdateTreeModelEmitter=new l.Emitter,this.disposableCollection=new l.DisposableCollection,this.applyFocusedDecoration=(g,d=!0)=>{var u;if(g){for(const E of this._selectedNodes)this.selectedDecoration.removeTarget(E);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(g),this.focusedDecoration.addTarget(g),this._focusedNode=g,this._selectedNodes=[g],d&&((u=this.treeModel)===null||u===void 0||u.dispatchChange())}},this.removeFocusedDecoration=()=>{var g;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),(g=this.treeModel)===null||g===void 0||g.dispatchChange()),this._focusedNode=null},this.handleTreeBlur=()=>{this.removeFocusedDecoration()},this.handleTwistierClick=async(g,d)=>{(m.CommentFileNode.is(d)||d?.isAllowToggle)&&this.toggleDirectory(d)},this.handleItemClick=async(g,d)=>{this.applyFocusedDecoration(d),(m.CommentFileNode.is(d)||d?.isAllowToggle)&&this.toggleDirectory(d);let u,E;d instanceof m.CommentReplyNode||d instanceof m.CommentContentNode?(u=d.thread.uri,E=d.thread.range):u=d.resource,this.editorService.open(u,{range:E}).then(()=>{d.thread&&d.thread.show()})},this.toggleDirectory=g=>{g.expanded?this.commentTreeHandle.collapseNode(g):this.commentTreeHandle.expandNode(g)},this._whenReady=this.initTreeModel()}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get whenReady(){return this._whenReady}get commentTreeHandle(){return this._commentTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}async initTreeModel(){const g=await this.commentService.resolveChildren();if(!g)return;const d=g[0];d&&(this._treeModel=this.injector.get(s,[d]),await this._treeModel.ensureReady,this.initDecorations(d),this.disposables.push(l.Event.any(this.commentService.onThreadsCommentChange,this.commentService.onThreadsChanged,this.commentService.onThreadsCreated)(()=>{this.refresh()})),this.onDidUpdateTreeModelEmitter.fire(this._treeModel))}initDecorations(g){return this._decorations=new o.DecorationsManager(g),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations}handleTreeHandler(g){this._commentTreeHandle=g}async refresh(){await this.whenReady,(0,l.runWhenIdle)(()=>{this.treeModel.root.refresh()})}async collapsedAll(){return await this.whenReady,this.treeModel.root.collapsedAll()}dispose(){this.disposableCollection.dispose()}};t.CommentModelService=h,n.__decorate([(0,r.Autowired)(_.ICommentsService),n.__metadata("design:type",Object)],h.prototype,"commentService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],h.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(v.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorService)],h.prototype,"editorService",void 0),t.CommentModelService=h=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],h)},53711:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentReplyNode=t.CommentContentNode=t.CommentFileNode=t.CommentRoot=void 0;const n=e(97267);class r extends n.CompositeTreeNode{static is(m){return!!m&&!m.parent}constructor(m){super(m,void 0)}get expanded(){return!0}}t.CommentRoot=r;class o extends n.CompositeTreeNode{static is(m){return n.CompositeTreeNode.is(m)&&"threads"in m}constructor(m,p,s="",h,a,g,d){super(m,d),this.threads=p,this.tooltip=h,this.icon=a,this.resource=g,this.isExpanded=!0,this._renderedLabel=this.resource.displayName,this._renderedDescription=s}set label(m){this._renderedLabel=m}set description(m){this._renderedDescription=m}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(m){this._onSelectHandler=m}get onSelect(){return this._onSelectHandler}}t.CommentFileNode=o;class l extends n.CompositeTreeNode{static is(m){return n.CompositeTreeNode.is(m)&&"author"in m}constructor(m,p,s,h="",a,g,d,u){super(m,u),this.thread=p,this.comment=s,this.icon=a,this.author=g,this.resource=d,this._renderedDescription=h,this.isExpanded=!0,this._isAllowToggle=!1}get isAllowToggle(){return this._isAllowToggle}setIsAllowToggle(m){this._isAllowToggle=m}set label(m){this._renderedLabel=m}set description(m){this._renderedDescription=m}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(m){this._onSelectHandler=m}get onSelect(){return this._onSelectHandler}}t.CommentContentNode=l;class v extends n.TreeNode{constructor(m,p,s,h="",a,g,d){super(m,d),this.thread=p,this.icon=a,this.resource=g,this._renderedLabel=s,this._renderedDescription=h}set label(m){this._renderedLabel=m}set description(m){this._renderedDescription=m}get renderedLabel(){return this._renderedLabel}get renderedDescription(){return this._renderedDescription}set onSelect(m){this._onSelectHandler=m}get onSelect(){return this._onSelectHandler}}t.CommentReplyNode=v},69635:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentReactionClick=t.CommentPanelCollapse=t.SwitchCommandReaction=t.CloseThreadId=t.CollapseId=t.ICommentsService=t.CommentsContribution=t.ICommentsFeatureRegistry=t.CommentPanelId=t.CommentGutterType=t.CommentThreadCollapsibleState=t.CommentMode=void 0;const n=e(41869);var r;(function(m){m[m.Editor=0]="Editor",m[m.Preview=1]="Preview"})(r||(t.CommentMode=r={}));var o;(function(m){m[m.Collapsed=0]="Collapsed",m[m.Expanded=1]="Expanded"})(o||(t.CommentThreadCollapsibleState=o={}));var l;(function(m){m.Thread="thread",m.Empty="empty"})(l||(t.CommentGutterType=l={})),t.CommentPanelId="CommentPanel",t.ICommentsFeatureRegistry=Symbol("ICommentsFeatureRegistry"),t.CommentsContribution=Symbol("CommentsContribution"),t.ICommentsService=Symbol("ICommentsService"),t.CollapseId="comments.panel.action.collapse",t.CloseThreadId="comments.thread.action.close",t.SwitchCommandReaction="comments.comment.action.switchCommand";class v extends n.BasicEvent{}t.CommentPanelCollapse=v;class _ extends n.BasicEvent{}t.CommentReactionClick=_},86077:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(69635),t)},79383:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Badge=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));e(4418);const l=({className:v,children:_,...m})=>o.default.createElement("span",{className:(0,r.default)("kt-badge",v),...m},_);t.Badge=l},48412:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(99613),v=e(54713);e(71682);const _=()=>o.default.createElement("svg",{viewBox:"0 0 1024 1024",focusable:"false",className:"kt-button-anticon-spin","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},o.default.createElement("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}));function m(){}t.Button=o.default.memo(({children:p,loading:s,className:h,type:a="primary",htmlType:g,size:d,ghost:u=!1,onClick:E,disabled:f,block:c,iconClass:y,icon:b,more:A,moreIconClass:S,menu:w,moreVisible:I,placement:D,title:T,showLoadingIcon:R=!0,onVisibleChange:M,...O})=>{const x=(0,r.default)("kt-button",h,{[`kt-${a}-button-loading`]:s,[`ghost-${a}-button`]:u&&!s&&a!=="link",[`${a}-button`]:a,[`${d}-button-size`]:d,"ghost-button":u&&a!=="link","block-button":c}),k=(0,r.default)(h,{"kt-clickable-icon":!!E});if(a==="icon")return o.default.createElement(v.Icon,{tooltip:T,disabled:f,icon:b,onClick:s||f?m:E,className:k,iconClass:y,...O});const F=y?o.default.createElement(v.Icon,{iconClass:y,disabled:f}):null;return w?o.default.createElement(l.Dropdown,{visible:I,className:"kt-menu",overlay:w,trigger:["click"],onVisibleChange:M,placement:D},o.default.createElement("button",{...O,disabled:f,className:x,type:g,onClick:s||f?m:E},s&&a!=="link"&&R&&o.default.createElement(_,null),F&&F,p,A&&o.default.createElement(v.Icon,{iconClass:S||(0,v.getIcon)("down"),className:"kt-button-secondary-more"}))):o.default.createElement("button",{...O,disabled:f,className:x,type:g,onClick:s||f?m:E},s&&a!=="link"&&R&&o.default.createElement(_,null),F&&F,p)})},7273:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckBox=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(65973);e(6099);const v=()=>o.default.createElement("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"})),_=({insertClass:m,className:p,label:s,size:h="default",disabled:a,checked:g,wrapTabIndex:d,...u})=>{(0,l.warning)(!m,"`insertClass` was deprecated, please use `className` instead");const E=u;return E.checked=g??!1,o.default.createElement("label",{className:(0,r.default)("kt-checkbox",m,p,{"kt-checkbox-large":h==="large","kt-checkbox-disabled":a}),tabIndex:d},o.default.createElement("span",{className:"kt-checkbox-lump"},o.default.createElement("input",{type:"checkbox",disabled:a,...E}),o.default.createElement("span",{className:"kt-checkbox-icon"},o.default.createElement(v,null))),s||" ")};t.CheckBox=_,t.CheckBox.displayName="OpenSumiCheckBox"},58998:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClickOutside=void 0;const r=e(85608).__importDefault(e(14041)),o=({mouseEvents:l=["click"],onOutsideClick:v,children:_,...m})=>{const p=r.default.useRef(null),s=r.default.useCallback(h=>{p.current&&h.target&&!p.current.contains(h.target)&&v(h)},[v]);return r.default.useEffect(()=>(l.forEach(h=>{window.addEventListener(h,s,!0)}),()=>{l.forEach(h=>{window.removeEventListener(h,s,!0)})}),[l]),r.default.createElement("div",{...m,ref:p},_)};t.ClickOutside=o},50570:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageType=void 0;var e;(function(n){n[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Info=2]="Info",n[n.Empty=3]="Empty"})(e||(t.MessageType=e={}))},89832:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dialog=t.DialogContent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(43718),v=e(48412),_=e(54713),m=e(79024);e(65773);const p=({onCancel:a,onOk:g,cancelText:d,okText:u})=>o.default.createElement(o.default.Fragment,null,o.default.createElement(v.Button,{onClick:a,type:"secondary"},d||(0,l.localize)("ButtonCancel")),o.default.createElement(v.Button,{onClick:g},u||(0,l.localize)("ButtonOK"))),s=({onClose:a,closable:g,type:d="confirm",messageType:u=l.MessageType.Info,icon:E,message:f,buttons:c,title:y,onOk:b,onCancel:A,okText:S,cancelText:w})=>{const{getIcon:I}=o.default.useContext(_.IconContext);return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-dialog-content"},E&&o.default.createElement("div",{style:{color:E.color},className:(0,r.default)("kt-dialog-icon",(0,_.getIcon)(E.className)||I(E.className))}),o.default.createElement("div",{className:"kt-dialog-content_area"},o.default.createElement("div",{className:"kt-dialog-content_title"},y),f&&o.default.createElement("span",{className:"kt-dialog-message"},f)),g&&d!=="basic"&&o.default.createElement("button",{className:(0,r.default)("kt-dialog-closex",(0,_.getIcon)("close")),onClick:a})),u!==l.MessageType.Empty&&d!=="basic"&&o.default.createElement("div",{className:"kt-dialog-buttonWrap"},d==="confirm"?c||o.default.createElement(p,{onCancel:A,onOk:b,okText:S,cancelText:w}):o.default.createElement(v.Button,{onClick:a},"OK")))};t.DialogContent=s;const h=({visible:a,onClose:g,closable:d,afterClose:u,messageType:E,icon:f,message:c,detail:y,buttons:b,type:A="confirm",title:S,onOk:w,onCancel:I,okText:D,cancelText:T,getContainer:R,keyboard:M,...O})=>o.default.createElement(m.Overlay,{visible:a,onClose:g,title:A==="basic"?S:null,closable:A==="basic",getContainer:R,keyboard:M,footer:A==="basic"?b||o.default.createElement(p,{onCancel:I,onOk:w,okText:D,cancelText:T}):void 0,afterClose:u,...O},o.default.createElement(t.DialogContent,{title:c,message:y,buttons:b,visible:a,icon:f,...O}));t.Dialog=h},99665:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(62596)),o=n.__importDefault(e(53373)),l=n.__importStar(e(14041)),v=e(48412),_=n.__importDefault(e(35060)),m=p=>{var s;const{prefixCls:h,type:a="primary",size:g="default",danger:d,disabled:u,loading:E,onClick:f,htmlType:c,children:y,className:b,overlay:A,trigger:S,align:w,visible:I,onVisibleChange:D,placement:T,getPopupContainer:R,href:M,icon:O=l.createElement(r.default,null),title:x,buttonsRender:k=H=>H,mouseEnterDelay:F,mouseLeaveDelay:L,overlayClassName:N,overlayStyle:U,...W}=p,j=h||"kt-dropdown-button",Q={align:w,overlay:A,disabled:u,trigger:u?[]:S,getPopupContainer:R,mouseEnterDelay:F,mouseLeaveDelay:L,overlayClassName:N,overlayStyle:U};Q.placement=(s=p?.placement)!==null&&s!==void 0?s:"bottomRight";const G=l.createElement(v.Button,{size:g,type:a,disabled:u,loading:E,onClick:f,htmlType:c,title:x},y),X=l.createElement(v.Button,{size:g,type:a},O??l.createElement(r.default,null)),[$,V]=k([G,X]);return l.createElement("div",{...W,className:(0,o.default)(j,b)},$,l.createElement(_.default,{...Q},V))};t.default=m},35060:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(64797)),o=n.__importDefault(e(53373)),l=n.__importDefault(e(5147)),v=n.__importDefault(e(14041)),_=e(43953),m=e(65973),p=(0,_.tuple)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");class s extends v.default.Component{constructor(){super(...arguments),this.renderOverlay=a=>{const{overlay:g}=this.props;let d;typeof g=="function"?d=g():d=g,d=v.default.Children.only(d);const u=d.props;(0,m.warning)(!u.mode||u.mode==="vertical",`[Dropdown] mode="${u.mode}" is not supported for Dropdown's Menu.`);const{selectable:E=!1,focusable:f=!0}=u,c=v.default.createElement("span",{className:`${a}-menu-submenu-arrow`},v.default.createElement(r.default,{className:`${a}-menu-submenu-arrow-icon`}));return typeof d.type=="string"?g:v.default.cloneElement(d,{mode:"vertical",selectable:E,focusable:f,expandIcon:c})},this.renderDropDown=()=>{const{prefixCls:a,children:g,trigger:d,disabled:u,getPopupContainer:E}=this.props,f=a||"kt-dropdown",c=v.default.Children.only(g),y=v.default.cloneElement(c,{className:(0,o.default)(c.props.className,`${f}-trigger`),disabled:u}),b=u?[]:d;let A;return b&&b.indexOf("contextMenu")!==-1&&(A=!0),v.default.createElement(l.default,{alignPoint:A,...this.props,prefixCls:f,getPopupContainer:E,transitionName:this.getTransitionName(),trigger:b,overlay:()=>this.renderOverlay(f)},y)}}getTransitionName(){const{placement:a="",transitionName:g}=this.props;return g!==void 0?g:a.indexOf("top")>=0?"slide-down":"slide-up"}render(){return this.renderDropDown()}}s.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"},t.default=s},99613:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DropdownButton=t.Dropdown=void 0;const n=e(85608),r=n.__importDefault(e(35060));t.Dropdown=r.default;const o=n.__importDefault(e(99665));t.DropdownButton=o.default,e(34643)},80564:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t._InternalIcon=t.IconContext=void 0,t.IconContextProvider=_;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(12122),v=e(76577);e(1914),t.IconContext=o.default.createContext({getIcon:(p,s)=>p});function _(p){return o.default.createElement(t.IconContext.Provider,{value:p.value},o.default.createElement(t.IconContext.Consumer,null,s=>p.value===s?p.children:null))}const m=function(p,s){const{size:h="small",loading:a,icon:g,iconClass:d,className:u,tooltip:E,rotate:f,anim:c,fill:y,disabled:b,onClick:A,children:S,resourceOptions:w,animate:I,style:D={},...T}=p,R={rotate:f,anim:c,fill:y};let M;if(g)if(l.defaultIconMap[g])M=(0,v.getIcon)(g,R);else{const{getIcon:O,getResourceIcon:x}=o.default.useContext(t.IconContext);w&&x?M=x(g,w):M=O(g,R)}else M=d;return I&&I==="spin"&&(D.animation="kt-icon-spin 1.5s steps(30) infinite"),o.default.createElement("span",{...T,title:E,onClick:A,ref:s,className:(0,r.default)("kt-icon",M,u,{"kt-icon-loading":a,"kt-icon-disabled":!!b,[`kt-icon-${h}`]:!!h,"kt-icon-clickable":!!A,"kt-icon-resource":!!w,expanded:!!w&&w.isOpenedDirectory}),style:D},S)};t._InternalIcon=o.default.memo(o.default.forwardRef(m)),t.Icon=o.default.memo(o.default.forwardRef(m))},10391:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFromIconfontCN=h;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(80564),v=e(76577),_=new Set;function m(a){return!!(typeof a=="string"&&a.length&&!_.has(a))}function p(a,g=0){const d=a[g];if(m(d)){const u=document.createElement("script");u.setAttribute("src",d),u.setAttribute("data-namespace",d),a.length>g+1&&(u.onload=()=>{p(a,g+1)},u.onerror=()=>{p(a,g+1)}),_.add(d),document.body.appendChild(u)}}const s={width:"1em",height:"1em",fill:"currentColor"};function h(a={}){const{scriptUrl:g,extraCommonProps:d={}}=a;g&&typeof document<"u"&&typeof window<"u"&&typeof document.createElement=="function"&&(Array.isArray(g)?p(g.reverse()):p([g]));const u=o.default.forwardRef((E,f)=>{const{icon:c,children:y,rotate:b,anim:A,fill:S,className:w="",...I}=E,D={rotate:b,anim:A,fill:S};let T=null;c&&(T=o.default.createElement("svg",{...s,focusable:"false"},o.default.createElement("use",{xlinkHref:`#${c}`}))),y&&(T=y);const R=(0,v.getIconShapeClxList)(D);return o.default.createElement(l._InternalIcon,{...d,...I,className:(0,r.default)(w,R),ref:f},T)});return u.displayName="Iconfont",u}},12122:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iconManager=t.defaultIconMap=t.defaultIconfont=void 0;const r=e(85608).__importDefault(e(65973)),o=e(81139);Object.defineProperty(t,"defaultIconfont",{enumerable:!0,get:function(){return o.defaultIconfont}});const l={"search-close":"close-square",fold:"collapse-all","setting-general":"setting","setting-file":"file-text","setting-extension":"extension","run-debug":"start","toggle-breakpoints":"deactivate-breakpoints",withdraw:"fallback",terminate1:"stop",stop1:"stop",add:"plus",rundebug:"start",terminate:"stop"},v=Object.assign({},o.defaultIconfont,l);t.defaultIconMap=new Proxy(v,{get(p,s){const h=l[s];return(0,r.default)(!h,`Icon '${s}' was a typo, please use '${h}' instead`),p[s]}});class _{constructor(){this._ktIconPrefixes=[],this._iconMap={}}update(s,h){this._iconMap[s]=h,this._ktIconPrefixes.push(s)}getIconClx(s){if(!s)return(0,r.default)(!1,"not a valid icon key:"+s),[];let h=this._ktIconPrefixes.length;for(;!this._iconMap[this._ktIconPrefixes[--h]][s]&&h!==0;);const a=this._iconMap[this._ktIconPrefixes[h]][s];return a?[`${this._ktIconPrefixes[h]}${a}`]:((0,r.default)(!1,"No icon found for "+s),[])}}t.iconManager=new _,t.iconManager.update("kaitian-icon kticon-",t.defaultIconMap)},81139:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIconfont=void 0,t.defaultIconfont={"Gitlab-fill":"Gitlab-fill",PR:"PR",ab:"ab",abl:"abl","activate-breakpoints":"activate-breakpoints","add-comments":"add-comments",afresh:"afresh","arrow-down":"arrow-down","arrow-right":"arrow-right",arrowdown:"arrowdown",arrowleft:"arrowleft",arrowright:"arrowright",arrowup:"arrowup",bash:"bash",bell:"bell",branches:"branches","breakpoint-activate":"breakpoint-activate","breakpoint-deactivate":"breakpoint-deactivate","breakpoint-disabled":"breakpoint-disabled","breakpoint-enabled":"breakpoint-enabled","breakpoint-stop":"breakpoint-stop","breakpoint-stop-before":"breakpoint-stop-before",brew:"brew","browser-preview":"browser-preview","caret-right":"caret-right",check:"check","check-circle-fill":"check-circle-fill","check-close-circle-o":"check-close-circle-o","check-square-o":"check-square-o","circle-pause":"circle-pause",clear:"clear","clear-bold":"clear-bold",close:"close","close-all":"close-all","close-circle":"close-circle","close-circle-fill":"close-circle-fill",close1:"close1",close_square:"close_square","cloud-download":"cloud-download","cloud-server":"cloud-server",code:"code",codebraces:"codebraces","collapse-all":"collapse-all",commit:"commit","content-search":"content-search",continue:"continue",control:"control",copy:"copy","create-pullrequest":"create-pullrequest","deactivate-breakpoints":"deactivate-breakpoints",debug:"debug","debug-alt-small":"debug-alt-small","debug-restart-frame":"debug-restart-frame","default-menu-icon":"default-menu-icon",delete:"delete",deploy:"deploy",detail:"detail",discard:"discard",disconnect:"disconnect","dock-down":"dock-down","dock-right":"dock-right",doubleleft:"doubleleft",doubleright:"doubleright",down:"down","down-arrow":"down-arrow",download:"download",drag:"drag",edit:"edit",editor:"editor",ellipsis:"ellipsis",embed:"embed",error:"error",expand:"expand","expand-all":"expand-all",experiment:"experiment",explorer:"explorer",extension:"extension",eye:"eye","eye-close":"eye-close",file:"file","file-copy":"file-copy","file-default":"file-default","file-exclamation":"file-exclamation","file-text":"file-text",filter:"filter",focus:"focus",folder:"folder","folder-default":"folder-default","follow-cursor":"follow-cursor",fullescreen:"fullescreen",fullscreen:"fullscreen","fullscreen-exit":"fullscreen-exit",git:"git","github-fill":"github-fill",gitlab:"gitlab","global-search":"global-search",go:"go",hex:"hex",image:"image","info-circle":"info-circle","info-circle-fill":"info-circle-fill",insert:"insert",java:"java",keyboard:"keyboard",kotlin:"kotlin",layout:"layout",layout1:"layout1",left:"left","left-nav-close":"left-nav-close","left-nav-open":"left-nav-open","left-right-subfield":"left-right-subfield",line:"line",link:"link",loading:"loading","magic-wand":"magic-wand",max:"max",mcp:"mcp","menubar-dashboard-back":"menubar-dashboard-back","menubar-edit":"menubar-edit","menubar-file":"menubar-file","menubar-go":"menubar-go","menubar-selection":"menubar-selection","menubar-setting":"menubar-setting","menubar-tool":"menubar-tool","menubar-view":"menubar-view","menubar-workspace":"menubar-workspace",message:"message",min:"min",minus:"minus",mobile:"mobile","mobile-phone":"mobile-phone",more:"more","new-file":"new-file","new-folder":"new-folder",node:"node",open:"open","open-changes":"open-changes",openfile:"openfile","out-link":"out-link",pause:"pause",pin:"pin",pipeline:"pipeline",plus:"plus","project-information":"project-information",python:"python","question-circle":"question-circle","question-circle-o":"question-circle-o",receive:"receive",refresh:"refresh",regex:"regex",reload:"reload",replace:"replace",repository:"repository",retrieval:"retrieval",revoke:"revoke","revoke-white":"revoke-white",right:"right","right-arrow":"right-arrow",rollback:"rollback",rules:"rules",run:"run",rust:"rust","save-all":"save-all",scm:"scm",search:"search",send:"send","send-outlined":"send-outlined","send-solid":"send-solid",setting:"setting",settings:"settings",sever:"sever",share:"share",shrink:"shrink",smile:"smile",start:"start",step:"step","step-in":"step-in","step-out":"step-out",stop:"stop",swap:"swap",sync:"sync",team:"team",terminal:"terminal",test:"test",thumbs:"thumbs","thumbs-fill":"thumbs-fill",thumbsdown:"thumbsdown","thumbsdown-fill":"thumbsdown-fill","time-circle":"time-circle",toolkit:"toolkit",tree:"tree",undock:"undock",unfullscreen:"unfullscreen",unmax:"unmax",unorderedlist:"unorderedlist",unpin:"unpin",up:"up","up-down-subfield":"up-down-subfield",vim:"vim",wait:"wait","warning-circle":"warning-circle",window:"window","window-close":"window-close","window-maximize":"window-maximize",zsh:"zsh",diff:"open-changes"}},54713:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFromIconfontCN=void 0;const n=e(85608);n.__exportStar(e(80564),t),n.__exportStar(e(76577),t);var r=e(10391);Object.defineProperty(t,"createFromIconfontCN",{enumerable:!0,get:function(){return r.createFromIconfontCN}})},76577:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateKaitianIconMap=t.getKaitianIcon=t.ANIM_TYPE=t.ROTATE_TYPE=void 0,t.updateIconMap=_,t.getIconShapeClxList=m,t.getIcon=p;const n=e(12122);var r;(function(s){s[s.rotate_90=0]="rotate_90",s[s.rotate_180=1]="rotate_180",s[s.rotate_270=2]="rotate_270",s[s.flip_horizontal=3]="flip_horizontal",s[s.flip_vertical=4]="flip_vertical",s[s.flip_both=5]="flip_both"})(r||(t.ROTATE_TYPE=r={}));var o;(function(s){s[s.spin=0]="spin",s[s.pulse=1]="pulse"})(o||(t.ANIM_TYPE=o={}));const l=["rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both"],v=["spin","pulse"];function _(s,h){n.iconManager.update(s,h)}function m(s){const{rotate:h,anim:a,fill:g}=s||{},d=[];return h!==void 0&&d.push(`iconfont-${l[h]}`),a!==void 0&&d.push(`iconfont-anim-${v[a]}`),g&&d.push("toggled"),d}function p(s,h){const a=n.iconManager.getIconClx(s),g=m(h);return a.push(...g),a.join(" ")}t.getKaitianIcon=p,t.updateKaitianIconMap=_},46541:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Image=void 0;const n=e(85608),r=n.__importDefault(e(24345)),o=n.__importDefault(e(14041));e(53960);const l=e(54713),v=_=>o.default.createElement(r.default,{prefixCls:"kt-image",preview:{getContainer:()=>{var m;return document.getElementById("main")||((m=document.getElementsByTagName("body"))===null||m===void 0?void 0:m[0])},mask:o.default.createElement("div",{className:"mask"},o.default.createElement(l.Icon,{iconClass:"codicon codicon-eye"}))},..._});t.Image=v},97267:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);e(39328),n.__exportStar(e(48412),t),n.__exportStar(e(79383),t),n.__exportStar(e(50708),t),n.__exportStar(e(7273),t),n.__exportStar(e(14640),t),n.__exportStar(e(54076),t),n.__exportStar(e(79024),t),n.__exportStar(e(89832),t),n.__exportStar(e(54713),t),n.__exportStar(e(46541),t),n.__exportStar(e(18875),t),n.__exportStar(e(91397),t),n.__exportStar(e(31059),t),n.__exportStar(e(72871),t),n.__exportStar(e(91416),t),n.__exportStar(e(34128),t),n.__exportStar(e(50570),t),n.__exportStar(e(77011),t),n.__exportStar(e(3660),t),n.__exportStar(e(58998),t),n.__exportStar(e(4981),t),n.__exportStar(e(99613),t)},15857:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryInputBox=void 0;const r=e(85608).__importDefault(e(14041)),o=e(54114),l=e(63924);class v extends r.default.Component{constructor(){super(...arguments),this.inputRef=r.default.createRef(),this.addToHistory=m=>{this.history&&m&&m!==this.getCurrentValue()&&this.history.add(m)},this.getHistory=()=>this.history&&this.history.getHistory()||[],this.showNextValue=()=>{const m=this.getCurrentValue()||"";this.history&&!this.history.has(m)&&this.addToHistory(m);let p=this.getNextValue();p&&(p=p===m?this.getNextValue():p),p&&this.onValueChange(p)},this.showPreviousValue=()=>{const m=this.getCurrentValue()||"";this.history&&!this.history.has(m)&&this.addToHistory(m);let p=this.getPreviousValue();p&&(p=p===m?this.getPreviousValue():p),p&&this.onValueChange(p)},this.clearHistory=()=>{this.history&&this.history.clear()},this.getCurrentValue=()=>{if(!this.history)return null;let m=this.history.current();return m||(m=this.history.last(),this.history.next()),m},this.getPreviousValue=()=>this.history&&(this.history.previous()||this.history.first())||null,this.getNextValue=()=>this.history&&(this.history.next()||this.history.last())||null,this.onValueChange=m=>{const{onValueChange:p}=this.props;this.setState({inputValue:m}),p&&p(m)},this.onKeyDown=m=>{const{onKeyDown:p}=this.props;p&&p(m)},this.focus=()=>{this.inputRef&&this.inputRef.current&&this.inputRef.current.focus()}}componentDidMount(){var m;const{history:p,onReady:s}=this.props;this.history=new o.HistoryNavigator(p||new Set([]),100),this.inputProps={...this.props},delete this.inputProps.onReady,this.setState({inputValue:((m=this.props.value)!==null&&m!==void 0?m:this.props.defaultValue)||""}),typeof s=="function"&&s({addToHistory:this.addToHistory,getHistory:this.getHistory,clearHistory:this.clearHistory,getCurrentValue:this.getCurrentValue,showNextValue:this.showNextValue,showPreviousValue:this.showPreviousValue,focus:this.focus})}render(){const m=this.state&&this.state.inputValue;return r.default.createElement(l.Input,{ref:this.inputRef,...this.inputProps,onValueChange:this.onValueChange,onKeyDown:this.onKeyDown,value:m})}}t.HistoryInputBox=v},63924:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Input=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(54713),v=n.__importDefault(e(65973));e(41065);function _(p){return typeof p>"u"}function m(p,s,h){if(typeof h=="function"){let a=s;if(s.type==="click"){a=Object.create(s),a.target=p,a.currentTarget=p;const g=p.value;p.value="",h(a),p.value=g;return}h(a)}}t.Input=o.default.forwardRef((p,s)=>{const{defaultValue:h,className:a,wrapperStyle:g,size:d="default",controls:u,onChange:E,selection:f,addonBefore:c,addonAfter:y,persistFocus:b=!0,hasClear:A,afterClear:S,value:w,onValueChange:I,onPressEnter:D,onKeyDown:T,as:R="input",...M}=p;(0,v.default)(!u,"[@opensumi/ide-components Input]: `controls` was deprecated, please use `addonAfter` instead");const O=o.default.useRef(null),[x,k]=o.default.useState(!1),[F,L]=o.default.useState(()=>(w??h)||""),[N,U]=o.default.useState(()=>(w??h)||"");o.default.useImperativeHandle(s,()=>O.current),o.default.useEffect(()=>{f&&!_(f.start)&&!x&&O.current.setSelectionRange(f.start,f.end)},[f,x]),o.default.useEffect(()=>{w===null||typeof w>"u"||(w!==N&&w!==F&&L(w),w!==N&&U(w))},[w]);const W=K=>{Q(K.target.value),m(O.current,K,E)},j=K=>{K.preventDefault(),Q(""),m(O.current,K,E),typeof S=="function"&&S()},Q=K=>{L(K),typeof I=="function"&&I(K),x||k(!0)},G=K=>{K.keyCode===13&&typeof D=="function"&&D(K),typeof T=="function"&&T(K)},X=y||u,$=b?{onMouseDown:K=>{K.preventDefault()}}:{},V=(K,Y)=>K?o.default.createElement("div",{className:(0,r.default)("kt-input-addon",Y),...$},o.default.Children.map(K,Z=>o.default.isValidElement(Z)?o.default.cloneElement(Z,$):null)):null,H=(0,r.default)("kt-input",a,{[`kt-input-${d}`]:d,"kt-input-disabled":p.disabled});return o.default.createElement("div",{className:H,style:g},V(c,"kt-input-addon-before"),o.default.createElement("div",{className:"kt-input-box"},o.default.createElement(R,{ref:O,type:"text",autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1,...M,value:F,onChange:W,onKeyDown:G}),A&&F&&o.default.createElement(l.Icon,{className:"kt-input-clear",icon:"close-circle-fill",onClick:j,...$})),V(X,"kt-input-addon-after"))}),t.Input.displayName="OpenSumiInput"},64545:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputNumber=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(32476)),l=n.__importDefault(e(14041));e(41065),e(17107);const v="kt-input-number",_=m=>{const{value:p,size:s="default",wrapperStyle:h,className:a,disabled:g,min:d,max:u,onChange:E,...f}=m,c=b=>{E&&E(b)},y=(0,r.default)("kt-input","kt-input-number",a,{[`kt-input-${s}`]:s,"kt-input-disabled":g});return l.default.createElement("div",{className:y,style:h},l.default.createElement("div",{className:"kt-input-box"},l.default.createElement(o.default,{prefixCls:v,min:d,max:u,value:p,type:"number",onChange:c,controls:!0,...f})))};t.InputNumber=_,t.InputNumber.displayName="OpenSumiInputNumber"},10413:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindInputElement=_;const r=e(85608).__importDefault(e(14041)),o=e(63924);class l extends r.default.Component{constructor(){super(...arguments),this.placeholderInputRef=r.default.createRef()}render(){const p={...this.props};return delete p.inputElement,delete p.innerRef,r.default.createElement(o.Input,{...p,type:"text",id:this.props.id,ref:this.placeholderInputRef})}componentDidMount(){const{innerRef:p,inputElement:s}=this.props;this.placeholderInputRef.current.parentElement.replaceChild(s,this.placeholderInputRef.current),this.applyAttributes(),s.focus(),typeof p=="function"?p(s):p!==null&&typeof p=="object"&&p.current===null&&(p.current=s)}UNSAFE_componentWillUnmount(){const{innerRef:p,inputElement:s}=this.props;s.parentElement.replaceChild(this.placeholderInputRef.current,s),p!==null&&typeof p=="object"&&p.current&&(p.current=null)}shouldComponentUpdate(p){return this.applyAttributes(p),!1}applyAttributes(p=this.props){const{className:s,id:h,inputElement:a,style:g}=p;if(typeof s=="string"&&(a.className=s),typeof h=="string"&&(a.id=h),g!==null&&typeof g=="object")for(const d in g)typeof g[d]=="string"&&a[d]&&(a[d]=g[d])}}const v=r.default.forwardRef((m,p)=>r.default.createElement(l,{...m,innerRef:p}));function _(m){return p=>r.default.createElement(v,{...p,inputElement:m})}},61172:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextArea=void 0;const r=e(85608).__importDefault(e(14041)),o=e(63924);t.TextArea=r.default.forwardRef((l,v)=>r.default.createElement(o.Input,{...l,as:"textarea",ref:v})),t.TextArea.displayName="OpenSumiTextArea"},34390:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidateInput=t.VALIDATE_TYPE=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(63924);e(13254);var v;(function(_){_[_.INFO=1]="INFO",_[_.ERROR=2]="ERROR",_[_.WARNING=3]="WARNING",_[_.IGNORE=4]="IGNORE"})(v||(t.VALIDATE_TYPE=v={})),t.ValidateInput=o.default.forwardRef(({type:_,className:m,validate:p,onChange:s,onValueChange:h,validateMessage:a,popup:g=!0,...d},u)=>{const[E,f]=o.default.useState();o.default.useEffect(()=>{f(a)},[a]);const c=(0,r.default)({"validate-error":E&&E.type===v.ERROR,"validate-warning":E&&E.type===v.WARNING,"validate-info":E&&E.type===v.INFO}),y=()=>{if(E&&E.message)return o.default.createElement("div",{className:(0,r.default)("validate-message",c,{popup:g})},E.message)},b=A=>{const S=A.target;let w;if(S.type==="number"?w=A.target.valueAsNumber:w=A.target.value,typeof p=="function"){let I;_==="number"?/^[0-9]+$/.test(w)?I=p(Number(w)):I=p(String(w)):I=p(w),f(I)}typeof s=="function"&&s(A),typeof h=="function"&&h(w)};return o.default.createElement("div",{className:(0,r.default)("input-box",{popup:g})},o.default.createElement(l.Input,{type:_,ref:u,className:(0,r.default)(m,E,c),onChange:b,...d}),y())}),t.ValidateInput.displayName="ValidateInput"},50708:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(61172),t),n.__exportStar(e(63924),t),n.__exportStar(e(34390),t),n.__exportStar(e(10413),t),n.__exportStar(e(64545),t)},3660:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(3205),t)},3205:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const r=e(85608).__importDefault(e(14041));e(21221),t.Loading=r.default.memo(()=>r.default.createElement("div",{className:"loading_indicator"})),t.Loading.displayName="Loading"},4981:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalizeContext=void 0,t.LocalizeContextProvider=_,t.ComponentContextProvider=m;const r=e(85608).__importDefault(e(14041)),o=e(54713),l=e(65973),v=p=>((0,l.warning)(!1,"Using the default localize fn"),"");t.LocalizeContext=r.default.createContext({localize:v}),t.LocalizeContext.displayName="LocalizeContext";function _(p){return r.default.createElement(t.LocalizeContext.Provider,{value:p.value},r.default.createElement(t.LocalizeContext.Consumer,null,s=>p.value===s?p.children:null))}function m(p){return r.default.createElement(o.IconContextProvider,{value:p.value},r.default.createElement(_,{value:{localize:p.value.localize}},p.children))}},13719:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(44547),t),n.__exportStar(e(32592),t)},32592:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownReactParser=void 0;const n=e(85608),r=e(33714),o=n.__importDefault(e(14041));class l extends r.marked.Renderer{constructor(m){super(),this.renderer=m.renderer}parse(m){return m.map((p,s)=>{const h=(()=>{switch(p.type){case"html":{const a=p;return this.renderer.html(a.text)}case"space":return null;case"heading":{const a=p,g=a.depth;return this.renderer.heading(this.parseInline(a.tokens),g)}case"paragraph":{const a=p;return this.renderer.paragraph(this.parseInline(a.tokens))}case"text":{const a=p;return a.tokens?this.parseInline(a.tokens):a.text}case"blockquote":{const a=p,g=this.parse(a.tokens);return this.renderer.blockquote(g)}case"list":{const a=p,g=a.items.map((d,u)=>{var E;const f=[];return d.task&&f.push(this.renderer.checkbox((E=d.checked)!==null&&E!==void 0?E:!1)),f.push(this.parse(d.tokens)),o.default.cloneElement(this.renderer.listItem(f),{key:`list-item-${u}`})});return this.renderer.list(g,a.ordered)}case"code":{const a=p;return this.renderer.code(a.text,a.lang)}case"table":{const a=p,g=a.header.map((c,y)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(c.tokens),{header:!0,align:a.align[y]}),{key:`header-cell-${y}`})),d=o.default.cloneElement(this.renderer.tableRow(g),{key:"header-row"}),u=this.renderer.tableHeader(d),E=a.rows.map((c,y)=>{const b=c.map((A,S)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(A.tokens),{header:!1,align:a.align[S]}),{key:`body-cell-${y}-${S}`}));return o.default.cloneElement(this.renderer.tableRow(b),{key:`body-row-${y}`})}),f=this.renderer.tableBody(E);return this.renderer.table([u,f])}case"hr":return this.renderer.hr();default:return console.warn(`Token with "${p.type}" type was not found`),null}})();return o.default.isValidElement(h)?o.default.cloneElement(h,{key:`token-${s}`}):h})}parseInline(m=[]){return m.map(p=>{switch(p.type){case"text":{const h=v(p.text);return this.renderer.text(h)}case"strong":{const s=p;return this.renderer.strong(this.parseInline(s.tokens))}case"em":{const s=p;return this.renderer.em(this.parseInline(s.tokens))}case"del":{const s=p;return this.renderer.del(this.parseInline(s.tokens))}case"codespan":{const s=p;return this.renderer.codespan(v(s.text))}case"link":{const s=p;return this.renderer.link(s.href,this.parseInline(s.tokens))}case"image":{const s=p;return this.renderer.image(s.href,s.text,s.title)}case"html":{const s=p;return this.renderer.html(s.text)}case"br":return this.renderer.br();case"escape":{const s=p;return this.renderer.text(s.text)}default:return console.warn(`Token with "${p.type}" type was not found`),null}})}}t.MarkdownReactParser=l;function v(_){return _.replace(/&#(\d+);/g,(m,p)=>String.fromCharCode(p)).replace(/&#x([0-9A-Fa-f]+);/g,(m,p)=>String.fromCharCode(parseInt(p,16)))}},44547:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownReactRenderer=void 0;const r=e(85608).__importStar(e(14041));class o{constructor(v={}){this.uid=0,this.options=v}node(v,_=null,m={}){const p={key:`marked-react-${this.uid}`};return this.incrementUID(),(0,r.createElement)(v,{...m,...p},_)}incrementUID(){this.uid+=1}heading(v,_){return this.node(`h${_}`,v)}paragraph(v){return this.node("p",v)}joinBase(v,_){if(!_)return v;try{return new URL(v,_).href}catch{return v}}link(v,_){const m=this.joinBase(v,this.options.baseURL);return this.node("a",_,{href:m,target:"_blank",rel:"noopener noreferrer"})}image(v,_,m=null){const p=this.joinBase(v,this.options.baseURL);return this.node("img",null,{src:p,alt:_,title:m})}codespan(v,_=null){const m=_?`${this.options.langPrefix}${_}`:null;return this.node("code",v,{className:m})}code(v,_){return this.node("pre",this.codespan(v,_))}blockquote(v){return this.node("blockquote",v)}list(v,_){return this.node(_?"ol":"ul",v)}listItem(v){return this.node("li",v)}checkbox(v){return this.node("input",null,{type:"checkbox",disabled:!0,checked:v})}table(v){return this.node("table",v)}tableHeader(v){return this.node("thead",v)}tableBody(v){return this.node("tbody",v)}tableRow(v){return this.node("tr",v)}tableCell(v,_){const m=_.header?"th":"td";return this.node(m,v,{align:_.align})}strong(v){return this.node("strong",v)}em(v){return this.node("em",v)}del(v){return this.node("del",v)}text(v){return v}html(v){return r.default.createElement("div",{dangerouslySetInnerHTML:{__html:v}})}hr(){return this.node("hr")}br(){return this.node("br")}}t.MarkdownReactRenderer=o},56849:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultMarkedRenderer=t.linkify=void 0,t.Markdown=m;const n=e(85608),r=e(33714),o=n.__importDefault(e(14041)),l=e(39777),v=(p,s,h)=>`<a rel="noopener" ${l.DATA_SET_COMMAND}="${p}" title="${s??p}">${h}</a>`;t.linkify=v;class _ extends r.Renderer{link({href:s,title:h,text:a}){return(0,t.linkify)(s,h||null,a)}}t.DefaultMarkedRenderer=_;function m(p){const s=(g,d)=>{const u=r.marked.parse(g,{renderer:d,async:!1});return typeof u=="string"?u:""},[h,a]=o.default.useState(s(p.value||"",p.renderer));return o.default.useEffect(()=>{a(s(p.value||"",p.renderer))},[p.renderer,p.value]),o.default.createElement(l.RenderWrapper,{opener:p.opener,html:h})}},39777:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderWrapper=t.DATA_SET_COMMAND=void 0;const r=e(85608).__importStar(e(14041));e(28566),t.DATA_SET_COMMAND="data-command";const o=l=>{const v=(0,r.useRef)(),{html:_,opener:m}=l;(0,r.useEffect)(()=>(v&&v.current&&v.current.addEventListener("click",p),()=>{v&&v.current&&v.current.removeEventListener("click",p)}),[]);const p=s=>{let h=s.target;if(h.className.includes("codicon")&&(h=h.parentNode),h.tagName.toLowerCase()==="a"&&h.hasAttribute(t.DATA_SET_COMMAND)){const a=h.getAttribute(t.DATA_SET_COMMAND);a&&m&&m.open(a)}};return r.default.createElement("div",{className:"kt-md-renderer-wrap",dangerouslySetInnerHTML:{__html:_},ref:v})};t.RenderWrapper=o},98113:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(0,e(14041).createContext)({inlineCollapsed:!1});t.default=r},64063:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=e(31363),o=n.__importDefault(e(14041)),l=n.__importDefault(e(98113));class v extends o.default.Component{constructor(){super(...arguments),this.renderItem=()=>{const{title:m,...p}=this.props;return o.default.createElement(l.default.Consumer,null,({inlineCollapsed:s})=>s?o.default.createElement(r.Item,{...p,title:m}):o.default.createElement(r.Item,{...p,title:m}))}}render(){return this.renderItem()}}v.isMenuItem=!0,t.default=v},91886:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(39067)),o=e(31363),l=n.__importDefault(e(14041));class v extends l.default.Component{render(){const{popupClassName:m}=this.props;return l.default.createElement(o.SubMenu,{...this.props,popupClassName:m})}}v.contextTypes={antdMenuTheme:r.default.string},v.isSubMenu=1,t.default=v},45803:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Menu=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(31363)),l=n.__importDefault(e(14041)),v=e(90146),_=e(2835),m=e(47768),p=e(65973),s=n.__importDefault(e(98113)),h=n.__importDefault(e(64063)),a=n.__importDefault(e(91886));e(42985);class g extends l.default.Component{static getDerivedStateFromProps(E,f){const{prevProps:c}=f,y={prevProps:E};return c.mode==="inline"&&E.mode!=="inline"&&(y.switchingModeFromInline=!0),"openKeys"in E?y.openKeys=E.openKeys:(E.inlineCollapsed&&!c.inlineCollapsed&&(y.switchingModeFromInline=!0,y.inlineOpenKeys=f.openKeys,y.openKeys=[]),!E.inlineCollapsed&&c.inlineCollapsed&&(y.openKeys=f.inlineOpenKeys,y.inlineOpenKeys=[])),y}constructor(E){super(E),this.handleMouseEnter=c=>{this.restoreModeVerticalFromInline();const{onMouseEnter:y}=this.props;y&&y(c)},this.handleTransitionEnd=c=>{const y=c.propertyName==="width"&&c.target===c.currentTarget,{className:b}=c.target,A=Object.prototype.toString.call(b)==="[object SVGAnimatedString]"?b.animVal:b,S=c.propertyName==="font-size"&&A.indexOf("anticon")>=0;(y||S)&&this.restoreModeVerticalFromInline()},this.handleClick=c=>{this.handleOpenChange([]);const{onClick:y}=this.props;y&&y(c)},this.handleOpenChange=c=>{this.setOpenKeys(c);const{onOpenChange:y}=this.props;y&&y(c)},this.renderMenu=()=>{const{prefixCls:c,className:y}=this.props,b=this.getRealMenuMode(),A=this.getOpenMotionProps(b),S=c||"kt-inner-menu",w=(0,r.default)(y,{[`${S}-inline-collapsed`]:this.getInlineCollapsed()}),I={openKeys:this.state.openKeys,onOpenChange:this.handleOpenChange,className:w,mode:b,...A};return b!=="inline"&&(I.onClick=this.handleClick),this.getInlineCollapsed()&&(I.openKeys=[]),l.default.createElement(o.default,{...this.props,...I,prefixCls:S,onTransitionEnd:this.handleTransitionEnd,onMouseEnter:this.handleMouseEnter})},(0,p.warning)(!("onOpen"in E||"onClose"in E),"[Menu] `onOpen` and `onClose` are removed, please use `onOpenChange` instead, see: https://u.ant.design/menu-on-open-change."),(0,p.warning)(!("inlineCollapsed"in E&&E.mode!=="inline"),"[Menu] `inlineCollapsed` should only be used when `mode` is inline.");let f;"openKeys"in E?f=E.openKeys:"defaultOpenKeys"in E&&(f=E.defaultOpenKeys),this.state={openKeys:f||[],switchingModeFromInline:!1,inlineOpenKeys:[],prevProps:E}}componentWillUnmount(){m.wrapperRaf.cancel(this.mountRafId)}setOpenKeys(E){"openKeys"in this.props||this.setState({openKeys:E})}getRealMenuMode(){const E=this.getInlineCollapsed();if(this.state.switchingModeFromInline&&E)return"inline";const{mode:f}=this.props;return E?"vertical":f}getInlineCollapsed(){const{inlineCollapsed:E}=this.props;return E}getOpenMotionProps(E){const{openTransitionName:f,openAnimation:c,motion:y}=this.props;return y?{motion:y}:c?((0,p.warning)(typeof c=="string","[Menu] `openAnimation` do not support object. Please use `motion` instead."),{openAnimation:c}):f?{openTransitionName:f}:E==="horizontal"?{motion:{motionName:"slide-up"}}:E==="inline"?{motion:_.collapseMotion}:{motion:{motionName:""}}}restoreModeVerticalFromInline(){const{switchingModeFromInline:E}=this.state;E&&this.setState({switchingModeFromInline:!1})}render(){return l.default.createElement(s.default.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1}},this.renderMenu())}}g.defaultProps={className:"",focusable:!1},(0,v.polyfill)(g);class d extends l.default.Component{render(){return l.default.createElement(g,{...this.props})}}t.Menu=d,d.Divider=o.Divider,d.Item=h.default,d.SubMenu=a.default,d.ItemGroup=o.ItemGroup},31059:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.message=void 0;const r=e(85608).__importDefault(e(71036));e(38663);function o(l){return(v,_)=>new Promise(m=>{r.default[l](v,_,m)})}t.message={success:o("success"),error:o("error"),info:o("info"),warning:o("warning"),loading:o("loading")}},71036:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(29517)),o=n.__importDefault(e(96041)),l=n.__importDefault(e(63492)),v=n.__importDefault(e(36117)),_=n.__importDefault(e(59303)),m=n.__importDefault(e(10435)),p=n.__importDefault(e(14041));let s=3,h,a,g=1,d="kt-message",u="move-up",E,f;function c(w){if(a){w(a);return}m.default.newInstance({prefixCls:d,transitionName:u,style:{top:h},getContainer:E,maxCount:f},I=>{if(a){w(a);return}a=I,w(I)})}const y={info:v.default,success:r.default,error:o.default,warning:l.default,loading:_.default};function b(w){const I=w.duration!==void 0?w.duration:s,D=w.key||g++,T=new Promise(M=>{const O=()=>(typeof w.onClose=="function"&&w.onClose(),M(!0));c(x=>{const k=y[w.type];x.notice({key:D,duration:I,style:{},content:p.default.createElement("div",{className:`${d}-custom-content${w.type?` ${d}-${w.type}`:""}`},w.icon||k&&p.default.createElement(k,null),p.default.createElement("span",null,w.content)),onClose:O})})}),R=()=>{a&&a.removeNotice(D)};return R.then=(M,O)=>T.then(M,O),R.promise=T,R}function A(w){return Object.prototype.toString.call(w)==="[object Object]"&&!!w.content}const S={open:b,config(w){w.top!==void 0&&(h=w.top,a=null),w.duration!==void 0&&(s=w.duration),w.prefixCls!==void 0&&(d=w.prefixCls),w.getContainer!==void 0&&(E=w.getContainer),w.transitionName!==void 0&&(u=w.transitionName,a=null),w.maxCount!==void 0&&(f=w.maxCount,a=null)},destroy(){a&&(a.destroy(),a=null)}};["success","info","warning","error","loading"].forEach(w=>{S[w]=(I,D,T)=>A(I)?S.open({...I,type:w}):(typeof D=="function"&&(T=D,D=void 0),S.open({content:I,duration:D,type:w,onClose:T}))}),S.warn=S.warning,t.default=S},6656:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.destroyFns=void 0;const n=e(85608),r=n.__importDefault(e(22143)),o=n.__importDefault(e(53373)),l=n.__importDefault(e(39067)),v=n.__importDefault(e(91812)),_=n.__importDefault(e(25946)),m=n.__importDefault(e(14041)),p=e(48412),s=e(69587);let h;t.destroyFns=[];const a=d=>{h={x:d.pageX,y:d.pageY},setTimeout(()=>h=null,100)};typeof window<"u"&&window.document&&window.document.documentElement&&(0,_.default)(document.documentElement,"click",a);class g extends m.default.Component{constructor(){super(...arguments),this.handleCancel=u=>{const{onCancel:E}=this.props;E&&E(u)},this.handleOk=u=>{const{onOk:E}=this.props;E&&E(u)},this.renderFooter=u=>{const{okText:E,okType:f,cancelText:c,confirmLoading:y}=this.props;return m.default.createElement("div",null,m.default.createElement(p.Button,{onClick:this.handleCancel,...this.props.cancelButtonProps},c||u.cancelText),m.default.createElement(p.Button,{type:f,loading:y,onClick:this.handleOk,...this.props.okButtonProps},E||u.okText))},this.renderModal=()=>{const{prefixCls:u,footer:E,visible:f,wrapClassName:c,centered:y,getContainer:b,closeIcon:A,closable:S=!0,...w}=this.props,I=u||"kt-modal",D=this.renderFooter((0,s.getConfirmLocale)()),T=m.default.createElement("span",{className:`${I}-close-x`},A||m.default.createElement(r.default,{className:`${I}-close-icon`}));return m.default.createElement(v.default,{...w,animation:this.props.animation,getContainer:b,prefixCls:I,wrapClassName:(0,o.default)({[`${I}-centered`]:!!y},c),footer:E===void 0?D:E,visible:f,mousePosition:h,onClose:this.handleCancel,closeIcon:T})}}render(){return this.renderModal()}}g.defaultProps={width:520,confirmLoading:!1,visible:!1,okType:"primary"},g.propTypes={prefixCls:l.default.string,onOk:l.default.func,onCancel:l.default.func,okText:l.default.node,cancelText:l.default.node,centered:l.default.bool,width:l.default.oneOfType([l.default.number,l.default.string]),confirmLoading:l.default.bool,visible:l.default.bool,footer:l.default.node,title:l.default.node,closable:l.default.bool,closeIcon:l.default.node},t.default=g},53017:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const r=e(85608).__importDefault(e(6656));t.Modal=r.default,e(61349)},69587:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.changeConfirmLocale=r,t.getConfirmLocale=o;const e={okText:"OK",cancelText:"Cancel",justOkText:"OK"};let n={...e};function r(l){l?n={...n,...l}:n={...e}}function o(){return n}},18875:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notification=void 0,t.open=h,t.close=a,t.update=g;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(43718),v=e(70392),_=e(48412),m=n.__importDefault(e(70748));e(1477);const p={[l.MessageType.Info]:15,[l.MessageType.Warning]:18,[l.MessageType.Error]:20};m.default.config({placement:"bottomRight"}),t.notification=m.default;const s=new Map;function h(u,E,f=!0,c,y,b,A,S){return(0,v.createCancelablePromise)(w=>(w.onCancellationRequested(()=>{a(c)}),new Promise(I=>{const D={key:c,className:(0,r.default)("kt-notification-wrapper",{"kt-notification-info":E===l.MessageType.Info,"kt-notification-error":E===l.MessageType.Error,"kt-notification-warn":E===l.MessageType.Warning}),duration:(0,v.isUndefined)(A)?p[E]:A,onClose:()=>{S&&S(),s.delete(c),I(void 0)},btn:y?y.map((T,R)=>{const M=typeof T=="string",O={className:`${(0,r.default)("kt-notification-button")}${M?"":T.class}`,ghost:M?R===0:!T.primary,key:M?T:T.id,onClick:()=>{I(T),m.default.close(c),M||T.run()}},x=M?T:T.label;return o.default.createElement(_.Button,{size:"small",...O},x)}):null,message:u,description:b,closable:f};s.set(c,[E,D]),d(E,D)})))}function a(u){t.notification.close(u)}function g(u,E){const f=s.get(u);d(f[0],{...f[1],key:u,message:E})}function d(u,E){switch(u){case l.MessageType.Info:t.notification.info(E);break;case l.MessageType.Warning:t.notification.warning(E);break;case l.MessageType.Error:t.notification.error(E);break;default:t.notification.open(E);break}}},70748:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(55435)),o=n.__importDefault(e(31079)),l=n.__importDefault(e(22143)),v=n.__importDefault(e(5550)),_=n.__importDefault(e(74339)),m=n.__importDefault(e(10435)),p=n.__importDefault(e(14041)),s=e(70392),h={};let a=4.5,g=24,d=24,u="topRight",E,f;function c(I){const{duration:D,placement:T,bottom:R,top:M,getContainer:O,closeIcon:x}=I;D!==void 0&&(a=D),T!==void 0&&(u=T),R!==void 0&&(d=R),M!==void 0&&(g=M),O!==void 0&&(E=O),x!==void 0&&(f=x)}function y(I,D=g,T=d){let R;switch(I){case"topLeft":R={left:0,top:D,bottom:"auto"};break;case"topRight":R={right:0,top:D,bottom:"auto"};break;case"bottomLeft":R={left:0,top:"auto",bottom:T};break;default:R={right:0,top:"auto",bottom:T};break}return R}function b({prefixCls:I,placement:D=u,getContainer:T=E,top:R,bottom:M,closeIcon:O=f},x){const k=`${I}-${D}`;if(h[k]){x(h[k]);return}const F=p.default.createElement("span",{className:`${I}-close-x`},O||p.default.createElement(l.default,{className:`${I}-close-icon`}));m.default.newInstance({prefixCls:I,className:`${I}-${D}`,style:y(D,R,M),getContainer:T,closeIcon:F},L=>{h[k]=L,x(L)})}const A={success:r.default,info:_.default,error:o.default,warning:v.default};function S(I){const D=I.prefixCls||"kt-notification",T=`${D}-notice`,R=(0,s.isUndefined)(I.duration)?a:I.duration;let M=null;I.icon?M=p.default.createElement("span",{className:`${T}-icon`},I.icon):I.type&&(M=p.default.createElement(A[I.type]||null,{className:`${T}-icon ${T}-icon-${I.type}`}));const{placement:O,top:x,bottom:k,getContainer:F,closeIcon:L}=I;b({prefixCls:D,placement:O,top:x,bottom:k,getContainer:F,closeIcon:L},N=>{var U;N.notice({content:p.default.createElement("div",{className:M?`${T}-with-icon`:""},M,p.default.createElement("div",{className:`${T}-message`},I.message),p.default.createElement("div",{className:`${T}-description`},I.description),I.btn?p.default.createElement("span",{className:`${T}-btn`},I.btn):null),duration:R,closable:(U=I.closable)!==null&&U!==void 0?U:!0,onClose:I.onClose,onClick:I.onClick,key:I.key,style:I.style||{},className:I.className})})}const w={open:S,close(I){Object.keys(h).forEach(D=>h[D].removeNotice(I))},config:c,destroy(){Object.keys(h).forEach(I=>{h[I].destroy(),delete h[I]})}};["success","info","warning","error"].forEach(I=>{w[I]=D=>w.open({...D,type:I})}),w.warn=w.warning,t.default=w},79024:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Overlay=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(53017);e(45531);const v=({maskClosable:_=!1,closable:m=!0,className:p,onClose:s,children:h,footer:a,title:g,getContainer:d,keyboard:u,...E})=>o.default.createElement(l.Modal,{footer:a||null,maskClosable:_,closable:m,onCancel:s,title:g,getContainer:d,className:(0,r.default)("kt-overlay",p),keyboard:u,...E},h);t.Overlay=v},91397:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Popover=t.PopoverPosition=t.PopoverTriggerType=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(6208)),l=n.__importStar(e(14041));e(14856);const v=e(48412);var _;(function(s){s.hover="hover",s.click="click",s.focus="focus"})(_||(t.PopoverTriggerType=_={}));var m;(function(s){s.top="top",s.bottom="bottom",s.left="left",s.right="right",s.topLeft="topLeft",s.topRight="topRight",s.bottomLeft="bottomLeft",s.bottomRight="bottomRight",s.leftTop="leftTop",s.leftBottom="leftBottom",s.rightTop="rightTop",s.rightBottom="rightBottom"})(m||(t.PopoverPosition=m={}));const p=({children:s,trigger:h=_.hover,visible:a,content:g,position:d=m.top,showArrow:u=!0,title:E,titleClassName:f,overlay:c,overlayClassName:y,overlayStyle:b,action:A,delay:S=200,zIndex:w=1e3,onClickAction:I,onVisibleChange:D,getTooltipContainer:T,...R})=>{const M=(0,l.useCallback)(x=>{I&&I(x)},[I]),O=(0,l.useMemo)(()=>c||(!E&&!g?null:l.default.createElement(l.default.Fragment,null,E&&l.default.createElement("p",{className:(0,r.default)("kt-popover-title",f)},E,A&&l.default.createElement(v.Button,{size:"small",type:"link",onClick:M},A)),g||"")),[c,g,A,M]);return O?l.default.createElement(o.default,{...R,visible:a,placement:d,mouseEnterDelay:S?S/1e3:void 0,trigger:h,showArrow:u,onVisibleChange:D,overlayClassName:y,prefixCls:"kt-popover",overlayStyle:b,getTooltipContainer:T,overlay:O,zIndex:w},l.default.createElement("div",{className:"kt-popover-trigger"},s)):s};t.Popover=p},8573:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleList=t.RECYCLE_LIST_OVER_SCAN_COUNT=t.RECYCLE_LIST_STABILIZATION_TIME=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=n.__importDefault(e(19686)),v=e(58723),_=e(77011);t.RECYCLE_LIST_STABILIZATION_TIME=500,t.RECYCLE_LIST_OVER_SCAN_COUNT=50;const m=({width:p,height:s,maxHeight:h,minHeight:a,className:g,style:d,data:u,onReady:E,onScroll:f,itemHeight:c,header:y,footer:b,template:A,paddingBottomSize:S,getSize:w,hiddenVerticalScrollbar:I,hiddenHorizontalScrollbar:D})=>{const T=(0,o.useRef)(),R=(0,o.useRef)(),M=(0,o.useRef)({}),O=(0,o.useRef)(0),x=(0,o.useRef)();(0,o.useEffect)(()=>{typeof E=="function"&&E({scrollTo:K=>{var Y;(Y=T.current)===null||Y===void 0||Y.scrollTo(K)},scrollToIndex:(K,Y="start")=>{var Z,oe;let ie=K;if(y&&ie++,typeof c=="number")(Z=T.current)===null||Z===void 0||Z.scrollToItem(ie,Y);else{x.current&&clearTimeout(x.current);const me=(M.current?Object.keys(M.current):[]).slice(0,ie).reduce((q,be)=>q+F(be),0);(oe=T.current)===null||oe===void 0||oe.scrollToItem(K,Y),x.current=setTimeout(()=>{var q;(M.current?Object.keys(M.current):[]).slice(0,ie).reduce((te,ge)=>te+F(ge),0)!==me&&((q=T.current)===null||q===void 0||q.scrollToItem(K,Y)),x.current=null},t.RECYCLE_LIST_STABILIZATION_TIME)}}})},[]);const k=(H,K)=>{var Y;M.current[H]!==K&&(M.current={...M.current,[H]:K},T.current&&((Y=T.current)===null||Y===void 0||Y.resetAfterIndex(0)))},F=(0,o.useCallback)(H=>w?w(Number(H)):(M?.current||[])[H]||c||100,[c,w]),L=(0,o.useCallback)(()=>{if(h){let H=0;for(let K=0;K<u.length;K++)H+=F(K);return H>h?h:H}},[h,u]),N=(0,o.useCallback)(()=>{if(a)return a},[a,u]),U=(0,o.useMemo)(()=>{let H=u.length;return y&&H++,b&&H++,H},[u,b,y]),W=({index:H,style:K})=>{let Y;if(H===0&&y)return o.default.createElement("div",{style:K},o.default.createElement(y,null));if(H+1===U&&b)return o.default.createElement("div",{style:K},o.default.createElement(b,null));if(y?Y=u[H-1]:Y=u[H],!Y)return o.default.createElement("div",{style:K});const Z={"aria-setsize":U,"aria-posinset":H};return o.default.createElement("div",{tabIndex:0,style:K,role:"listitem",...Z},o.default.createElement(A,{data:Y,index:H}))},j=({index:H,style:K})=>{const Y=(0,o.useRef)(null),Z=(0,o.useRef)(),oe=()=>{if(Y.current){let he=0;for(let me=0;me<Y.current.children.length;me++)he+=Y.current.children[me].getBoundingClientRect().height;k(H,he)}};(0,o.useEffect)(()=>{if(Y.current&&T.current){Z.current=new MutationObserver(()=>{oe()});const he={childList:!0,attributes:!0,characterData:!0,attributeFilter:["class","style"],attributeOldValue:!0,characterDataOldValue:!0};Z.current.observe(Y.current,he),oe()}return()=>{Z.current.disconnect()}},[Y.current]);let ie;return H===0&&y?o.default.createElement("div",{style:K},o.default.createElement(y,null)):H+1===U&&b?o.default.createElement("div",{style:K},o.default.createElement(b,null)):(y?ie=u[H-1]:ie=u[H],ie?o.default.createElement("div",{style:K,ref:Y},o.default.createElement(A,{data:ie,index:H})):o.default.createElement("div",{style:K}))},Q=(0,o.useMemo)(()=>u.reduce((K,Y)=>K+F(Y),0)/u.length,[u]),G=(0,o.useCallback)(H=>{O.current=H.scrollOffset,f&&f(H)},[f]),X=(0,o.useMemo)(()=>(0,o.forwardRef)((H,K)=>{const{style:Y,...Z}=H;return o.default.createElement("div",{ref:K,style:{...Y,height:`${parseFloat(Y.height)+(S||0)}px`},...Z})}),[S]),$=(0,o.useMemo)(()=>(0,o.forwardRef)((H,K)=>o.default.createElement(_.Scrollbars,{hiddenVertical:I,hiddenHorizontal:D,...H,thumbSize:10,forwardedRef:K})),[I,D]);return(()=>{const H=typeof c!="number",K=!p||!s;return(()=>{const Z=({width:oe,height:ie})=>{R.current&&(R.current.scrollTop=O.current);const he=L(),me=N();let q=ie;return me?q=Math.min(ie,me):he&&(q=he),H?o.default.createElement(v.VariableSizeList,{onScroll:G,width:oe,height:q,itemData:[],itemSize:F,itemCount:U,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:T,style:{transform:"translate3d(0px, 0px, 0px)",...d},className:(0,r.default)(g,"kt-recycle-list"),innerElementType:X,outerElementType:$,estimatedItemSize:Q},j):o.default.createElement(v.FixedSizeList,{onScroll:G,width:oe,height:q,itemData:[],itemSize:c,itemCount:U,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:T,outerRef:R,style:{transform:"translate3d(0px, 0px, 0px)",...d},className:(0,r.default)(g,"recycle-list"),innerElementType:X,outerElementType:$},W)};return K?o.default.createElement(l.default,null,Z):Z({width:p,height:s})})()})()};t.RecycleList=m},34128:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(8573),t)},57621:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTree=t.RenderErrorType=void 0;const n=e(85608),r=n.__importDefault(e(39050)),o=n.__importStar(e(14041)),l=e(58723),v=e(70392),_=e(77011),m=e(48103),p=e(65601),s=e(43685),h=e(13429),a=e(34054);var g;(function(E){E[E.RENDER_ITEM=0]="RENDER_ITEM",E[E.GET_RENDED_KEY=1]="GET_RENDED_KEY",E[E.RENDER_ERROR=2]="RENDER_ERROR"})(g||(t.RenderErrorType=g={}));const d=o.default.forwardRef((E,f)=>{const{style:c,...y}=E;return o.default.createElement("div",{ref:f,style:{...c,height:`${parseFloat(c.height)+u.PADDING_BOTTOM_SIZE}px`},...y})});class u extends o.default.Component{constructor(){super(...arguments),this.idxToRendererPropsCache=new Map,this.dynamicSizeMap=new Map,this.listRef=o.default.createRef(),this.disposables=new v.DisposableCollection,this.onErrorEmitter=new v.Emitter,this.onDidUpdateEmitter=new v.Emitter,this.onDidModelChangeEmitter=new v.Emitter,this.newPromptInsertionIndex=-1,this.idToFilterRendererPropsCache=new Map,this.filterFlattenBranchChildrenCache=new Map,this.filterWatcherDisposeCollection=new v.DisposableCollection,this.queueUpdatePromise=null,this.updateCancelToken=new v.CancellationTokenSource,this.expandNodeCancelToken=new v.CancellationTokenSource,this.willUpdateTasks=0,this.queueUpdateThrottler=new v.Throttler,this.doBatchUpdate=(()=>{const f=(c,y)=>{if(this.disposables.disposed)return;const{root:b}=this.props.model;let A=-1;if(this.promptTargetID>-1&&this.promptHandle instanceof p.NewPromptHandle&&this.promptHandle.parent&&this.promptHandle.parent.expanded&&b.isItemVisibleAtSurface(this.promptHandle.parent)&&!this.promptHandle.destroyed){const S=b.getIndexAtTreeNodeId(this.promptTargetID);if(S>-1||this.promptHandle.parent===b)if(this.promptHandle.type===a.TreeNodeType.TreeNode){const w=this.promptHandle.parent;w?A=this.getNewPromptInsertIndex(S,w):A=S+1}else A=S+1;else this.promptTargetID=-1}if(A===-1&&this.promptHandle&&this.promptHandle.constructor===p.NewPromptHandle&&!this.promptHandle.destroyed&&this.promptHandle.destroy(),this.newPromptInsertionIndex=A,this.idxToRendererPropsCache.clear(),y.isCancellationRequested){c();return}this.forceUpdate(()=>{c(),this.props.filter&&this.props.filterProvider&&this.props.filterProvider.filterAlways&&this.filterItems(this.props.filter)})};return()=>{const c=(A,S)=>{const w=!!this.willUpdateTasks;if(this.willUpdateTasks=0,!w)S.resolve();else{this.updateCancelToken.cancel(),this.updateCancelToken=new v.CancellationTokenSource;const I=this.updateCancelToken.token;requestAnimationFrame(()=>{if(I.isCancellationRequested){S();return}f(S,I)})}return A};let y;const b=new Promise(A=>y=A);return b.then(()=>{this.onDidUpdateEmitter.fire()}),c(b,y),b}})(),this.batchUpdate=()=>(this.willUpdateTasks++,this.queueUpdatePromise=this.queueUpdateThrottler.queue(this.doBatchUpdate),this.queueUpdatePromise),this.promptNewTreeNode=f=>this.promptNew(f),this.promptNewCompositeTreeNode=f=>this.promptNew(f,a.TreeNodeType.CompositeTreeNode),this.promptRename=async(f,c)=>{var y,b;const{root:A}=this.props.model,S=typeof f=="string"?await A.getTreeNodeByPath(f):f;if(!s.TreeNode.is(S)||s.CompositeTreeNode.isRoot(S))throw new TypeError(`Cannot rename object of type ${typeof S}`);const w=new m.RenamePromptHandle(c||S.name,S);return this.promptHandle=w,this.promptTargetID=S.id,A.isItemVisibleAtSurface(S)?await this.batchUpdate():await S.parent.setExpanded(!0),(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(A.getIndexAtTreeNodeId(this.promptTargetID)),this.promptHandle},this.expandNode=async f=>{const{root:c}=this.props.model,y=typeof f=="string"?c.getTreeNodeByPath(f):f;if(this.expandNodeCancelToken.token.isCancellationRequested&&(this.expandNodeCancelToken=new v.CancellationTokenSource),y&&s.CompositeTreeNode.is(y)&&!y.disposed)return y.setExpanded(!1,!1,!0,this.expandNodeCancelToken.token)},this.collapseNode=async f=>{const{root:c}=this.props.model,y=typeof f=="string"?c.getTreeNodeByPath(f):f;if(y&&s.CompositeTreeNode.is(y)&&!y.disposed)return this.expandNodeCancelToken.cancel(),y.setCollapsed()},this._isEnsuring=!1,this.ensureVisible=async(f,c="smart",y=!1)=>{if(this._isEnsuring)return;this._isEnsuring=!0;const{root:b}=this.props.model,A=typeof f=="string"?b.getTreeNodeByPath(f)||await b.loadTreeNodeByPath(f):f;if(A&&!b.isItemVisibleAtSurface(A)&&await b.loadTreeNodeByPath(A.path),!s.TreeNode.is(A)||s.CompositeTreeNode.isRoot(A)){this._isEnsuring=!1;return}return y?this.tryScrollIntoViewWhileStable(A,c):this.tryScrollIntoView(A,c),this._isEnsuring=!1,A},this.getItemAtIndex=f=>{const{filter:c}=this.props;if(c&&this.filterFlattenBranch.length>0)return this.idToFilterRendererPropsCache.get(this.filterFlattenBranch[f]);let y=this.idxToRendererPropsCache.get(f);if(!y){const b=this.newPromptInsertionIndex,{root:A}=this.props.model;if(b>-1&&this.promptHandle&&this.promptHandle.constructor===p.NewPromptHandle&&!this.promptHandle.destroyed)if(f===b)y={itemType:a.TreeNodeType.NewPrompt,item:this.promptHandle};else{const S=A.getTreeNodeAtIndex(f-(f>=b?1:0));y={itemType:s.CompositeTreeNode.is(S)?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode,item:S}}else{const S=A.getTreeNodeAtIndex(f);S&&S.id===this.promptTargetID&&this.promptHandle&&this.promptHandle.constructor===m.RenamePromptHandle&&!this.promptHandle.destroyed?y={itemType:a.TreeNodeType.RenamePrompt,item:this.promptHandle}:y={itemType:s.CompositeTreeNode.is(S)?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode,item:S}}this.idxToRendererPropsCache.set(f,y)}return y},this.handleListScroll=({scrollOffset:f})=>{const{model:c,height:y,itemHeight:b}=this.props;if(c.state.saveScrollOffset(f),!this.promptHandle||!b)return;let A;this.promptHandle instanceof p.NewPromptHandle&&this.newPromptInsertionIndex>-1?A=this.newPromptInsertionIndex:A=c.root.getIndexAtTreeNodeId(this.promptHandle.id),(f+y<A*b||A*b<f)&&this.promptHandle.destroy()},this.getItemKey=f=>{const c=this.getItemAtIndex(f),{getItemKey:y}=this.props,b=y?y(c):void 0;return b??f},this.filterItems=f=>{const{model:{root:c},filterProvider:y}=this.props;if(this.filterWatcherDisposeCollection.dispose(),this.idToFilterRendererPropsCache.clear(),!f)return;const b=/\//.test(f),A=new Set,S=new Map,w=[];for(let I=0,D=c.branchSize;I<D;I++){const T=c.getTreeNodeAtIndex(I);w.push(T)}if(b)w.forEach(I=>{if(I&&I.path.indexOf(f)>-1){A.add(I.id);let D=I.parent;for(;D&&!s.CompositeTreeNode.isRoot(D);)A.add(D.id),D=D.parent}});else{let I=[];y?I=r.default.filter(f,w,y.fuzzyOptions()):I=r.default.filter(f,w,u.FILTER_FUZZY_OPTIONS);const D=T=>{const R=T.children||[];if(R.length>0)for(const M of R)A.add(M.id),s.CompositeTreeNode.is(M)&&M.expanded&&D(M)};I.forEach(T=>{const R=T.original;A.add(R.id);let M=R.parent;for(S.set(R.id,()=>o.default.createElement("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:T.string||""}})),s.CompositeTreeNode.is(R)&&D(R);M&&!s.CompositeTreeNode.isRoot(M);)A.add(M.id),M=M.parent})}this.filterFlattenBranch=new Array(A.size);for(let I=0,D=0,T=c.branchSize;D<T;D++){const R=c.getTreeNodeAtIndex(D);R&&A.has(R.id)&&(this.filterFlattenBranch[I]=R.id,s.CompositeTreeNode.is(R)?this.idToFilterRendererPropsCache.set(R.id,{item:R,itemType:a.TreeNodeType.CompositeTreeNode,template:S.has(R.id)?S.get(R.id):void 0}):this.idToFilterRendererPropsCache.set(R.id,{item:R,itemType:a.TreeNodeType.TreeNode,template:S.has(R.id)?S.get(R.id):void 0}),I++)}this.filterWatcherDisposeCollection.push(c.watcher.on(a.TreeNodeEvent.DidChangeExpansionState,(I,D)=>{const T=this.filterFlattenBranch.indexOf(I.id);if(D){const R=this.filterFlattenBranchChildrenCache.get(I.id);R&&R.length>0&&(this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,T+1,0,R),this.filterFlattenBranchChildrenCache.delete(I.id))}else{const R=[];for(let M=T+1;M<this.filterFlattenBranch.length;M++){const O=c.getTreeNodeById(this.filterFlattenBranch[M]);if(O&&O.depth>I.depth)R.push(O.id);else break}this.filterFlattenBranchChildrenCache.set(I.id,R),this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,T+1,R.length)}})),this.filterWatcherDisposeCollection.push(v.Disposable.create(()=>{this.filterFlattenBranchChildrenCache.clear()}))},this.renderItem=({index:f,style:c})=>{var y,b,A,S,w,I,D;const{children:T,overflow:R="ellipsis",supportDynamicHeights:M}=this.props,O=this.getItemAtIndex(f),x=(0,o.useRef)(null),k=(0,o.useMemo)(()=>M?()=>{let j=0;if(x.current){const Q=x.current;j=Array.from(Q.children).reduce((G,X)=>G+X.getBoundingClientRect().height,0)}return j&&(this.dynamicSizeMap.set(f,j),this.layoutItem()),Math.max(j,u.DEFAULT_ITEM_HEIGHT)}:()=>{},[M]);if((0,o.useEffect)(()=>{x.current&&k()},[]),!O)return o.default.createElement(o.default.Fragment,null);const{item:F,itemType:L,template:N}=O;if(!F)return o.default.createElement("div",{style:c});let U;s.CompositeTreeNode.is(F)?U={"aria-label":(y=F.accessibilityInformation)===null||y===void 0?void 0:y.label,"aria-expanded":F.expanded,"aria-level":F.depth,"aria-setsize":(A=(b=F.parent)===null||b===void 0?void 0:b.children)===null||A===void 0?void 0:A.length,"aria-posinset":f}:s.TreeNode.is(F)&&(U={"aria-label":(S=F.accessibilityInformation)===null||S===void 0?void 0:S.label,"aria-level":F.depth,"aria-setsize":(I=(w=F.parent)===null||w===void 0?void 0:w.children)===null||I===void 0?void 0:I.length,"aria-posinset":f});const W=R==="ellipsis"?c:{...c,width:"auto",minWidth:"100%"};return o.default.createElement("div",{ref:x,style:W,role:((D=F.accessibilityInformation)===null||D===void 0?void 0:D.role)||"treeiem",...U},o.default.createElement(h.NodeRendererWrap,{item:F,depth:F.depth,itemType:L,template:N,hasPrompt:!!this.promptHandle&&!this.promptHandle.destroyed,expanded:s.CompositeTreeNode.is(F)?F.expanded:void 0},T))},this.layoutItem=()=>{var f,c,y,b;if(this.props.supportDynamicHeights&&this.listRef&&!((f=this.listRef)===null||f===void 0)&&f.current&&"_getRangeToRender"in((c=this.listRef)===null||c===void 0?void 0:c.current)){const A=(y=this.listRef)===null||y===void 0?void 0:y.current._getRangeToRender();if(A){const S=A[0];((b=this.listRef)===null||b===void 0?void 0:b.current).resetAfterIndex(S)}}}}getNewPromptInsertIndex(f,c){const{root:y}=this.props.model;let b=f+1;for(;b-f<=c.branchSize;b++){const A=y.getTreeNodeAtIndex(b);if(!A)return b;if(!s.CompositeTreeNode.is(A)){if(A?.depth>c.depth+1)continue;return b}}return b}UNSAFE_componentWillUpdate(f){this.props.filter!==f.filter&&this.filterItems(f.filter),this.props.model!==f.model&&(this.idxToRendererPropsCache.clear(),this.idToFilterRendererPropsCache.clear(),this.dynamicSizeMap.clear())}componentDidUpdate(f){var c,y;if(this.props.model!==f.model){this.disposables.dispose();const{model:b}=this.props;(y=(c=this.listRef)===null||c===void 0?void 0:c.current)===null||y===void 0||y.scrollTo(b.state.scrollOffset),this.disposables.push(b.onChange(this.batchUpdate.bind(this))),this.disposables.push(b.state.onDidLoadState(()=>{var A,S;(S=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||S===void 0||S.scrollTo(b.state.scrollOffset)})),this.onDidModelChangeEmitter.fire({preModel:f.model,nextModel:b})}}async promptNew(f,c=a.TreeNodeType.TreeNode){var y,b;const{root:A}=this.props.model;let S=typeof f=="string"?await A.getTreeNodeByPath(f):f;if(c!==a.TreeNodeType.TreeNode&&c!==a.TreeNodeType.CompositeTreeNode)throw new TypeError(`Invalid type supplied. Expected 'TreeNodeType.TreeNode' or 'TreeNodeType.CompositeTreeNode', got ${c}`);if(S&&!s.CompositeTreeNode.is(S)&&(S=S.parent,!s.CompositeTreeNode.is(S)))throw new TypeError(`Cannot create new prompt at object of type ${typeof S}`);if(!S)throw new Error(`Cannot find node at ${f}`);const w=new p.NewPromptHandle(c,S);return this.promptHandle=w,this.promptTargetID=S.id,S!==A&&(!S.expanded||!A.isItemVisibleAtSurface(S))?await S.setExpanded(!0):await this.batchUpdate(),this.newPromptInsertionIndex>=0?(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(this.newPromptInsertionIndex):this.tryScrollIntoViewWhileStable(this.promptHandle),this.promptHandle}tryScrollIntoView(f,c="auto"){var y,b,A,S;const{root:w}=this.props.model;f.constructor===p.NewPromptHandle&&!f.destroyed?(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(this.newPromptInsertionIndex):w.isItemVisibleAtSurface(f)&&((S=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||S===void 0||S.scrollToItem(w.getIndexAtTreeNode(f),c))}tryScrollIntoViewWhileStable(f,c="smart"){const{root:y}=this.props.model;if(this.tryEnsureVisibleTimes>u.TRY_ENSURE_VISIBLE_MAX_TIMES){this.tryEnsureVisibleTimes=0;return}v.Event.once(this.props.model.onChange)(async()=>{var b,A,S,w;await this.queueUpdatePromise,f.constructor===p.NewPromptHandle&&!f.destroyed?(A=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||A===void 0||A.scrollToItem(this.newPromptInsertionIndex):y.isItemVisibleAtSurface(f)?((w=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||w===void 0||w.scrollToItem(y.getIndexAtTreeNode(f),c),this.tryEnsureVisibleTimes=0):(this.tryEnsureVisibleTimes++,this.tryScrollIntoViewWhileStable(f,c))})}componentDidMount(){var f,c;const{model:y,onReady:b}=this.props;if((c=(f=this.listRef)===null||f===void 0?void 0:f.current)===null||c===void 0||c.scrollTo(y.state.scrollOffset),this.disposables.push(y.onChange(this.batchUpdate.bind(this))),this.disposables.push(y.state.onDidLoadState(()=>{var A,S;(S=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||S===void 0||S.scrollTo(y.state.scrollOffset)})),typeof b=="function"){const A={promptNewTreeNode:this.promptNewTreeNode,promptNewCompositeTreeNode:this.promptNewCompositeTreeNode,promptRename:this.promptRename,expandNode:this.expandNode,collapseNode:this.collapseNode,ensureVisible:this.ensureVisible,getModel:()=>this.props.model,layoutItem:this.layoutItem,getCurrentSize:()=>({width:this.props.width,height:this.props.height}),onDidChangeModel:this.onDidModelChangeEmitter.event,onDidUpdate:this.onDidUpdateEmitter.event,onOnceDidUpdate:v.Event.once(this.onDidUpdateEmitter.event),onError:this.onErrorEmitter.event};b(A)}}componentWillUnmount(){this.disposables.dispose()}set promptHandle(f){this._promptHandle!==f&&(this._promptHandle instanceof m.PromptHandle&&!this._promptHandle.destroyed&&this._promptHandle.destroy(),f.onDestroy(this.batchUpdate),this._promptHandle=f)}get promptHandle(){return this._promptHandle}get adjustedRowCount(){const{root:f}=this.props.model,{filter:c}=this.props;return c?this.filterFlattenBranch.length:this.newPromptInsertionIndex>-1&&this.promptHandle&&this.promptHandle.constructor===p.NewPromptHandle&&!this.promptHandle.destroyed?f.branchSize+1:f.branchSize}getItemSize(f){return this.dynamicSizeMap.get(f)||this.props.itemHeight}render(){const{children:f,itemHeight:c,width:y="100%",height:b,style:A,className:S,placeholder:w,overScanCount:I,leaveBottomBlank:D,supportDynamicHeights:T}=this.props;if(w&&this.adjustedRowCount===0){const M=w;return o.default.createElement(M,null)}const R={children:f,height:b,width:y,itemData:[],itemCount:this.adjustedRowCount,itemKey:this.getItemKey,overscanCount:I||u.DEFAULT_OVER_SCAN_COUNT,onScroll:this.handleListScroll,style:{transform:"translate3d(0px, 0px, 0px)",...A},className:S,outerElementType:_.ScrollbarsVirtualList};return D&&(R.innerElementType=d),T?o.default.createElement(l.VariableSizeList,{ref:this.listRef,itemSize:this.getItemSize.bind(this),...R},this.renderItem):o.default.createElement(l.FixedSizeList,{ref:this.listRef,itemSize:c,...R},this.renderItem)}}t.RecycleTree=u,u.PADDING_BOTTOM_SIZE=22,u.DEFAULT_ITEM_HEIGHT=22,u.TRY_ENSURE_VISIBLE_MAX_TIMES=5,u.FILTER_FUZZY_OPTIONS={pre:"<match>",post:"</match>",extract:E=>E?.name||""},u.DEFAULT_OVER_SCAN_COUNT=50},13429:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRendererWrap=void 0;const r=e(85608).__importDefault(e(14041));class o extends r.default.Component{render(){const{item:v,itemType:_,children:m,template:p,hasPrompt:s}=this.props;return r.default.createElement(m,{item:v,itemType:_,template:p,hasPrompt:s,key:v.id})}shouldComponentUpdate(v){return!0}}t.NodeRendererWrap=o},75821:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicRecycleTree=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=n.__importDefault(e(26460)),l=e(58998),v=e(57621),_=e(64013),m=e(84225),p=e(17462),s=e(78569),h=e(45203);e(12794),e(34728),n.__exportStar(e(92532),t);const a=({width:g,height:d,itemHeight:u=22,itemClassname:E,indent:f,baseIndent:c,containerClassname:y,onClick:b,onContextMenu:A,onTwistierClick:S,onIconClick:w,onDbClick:I,resolveChildren:D,sortComparator:T,treeData:R,inlineMenus:M,inlineMenuActuator:O,onReady:x,contextMenus:k,contextMenuActuator:F,treeName:L,leaveBottomBlank:N=!0})=>{const[U,W]=(0,r.useState)({show:!1}),[j,Q]=(0,r.useState)([]),[G,X]=(0,r.useState)(),$=(0,r.useRef)(!1),V=(0,r.useRef)(),H=(0,r.useRef)(),K=(0,r.useRef)(null),Y=(0,r.useCallback)(Ne=>{var De;return r.default.createElement(p.BasicTreeNodeRenderer,{item:Ne.item,itemType:Ne.itemType,itemHeight:u,indent:f,baseIndent:c,className:E,inlineMenus:M,inlineMenuActuator:O,onClick:he,onDbClick:q,onContextMenu:be,onTwistierClick:te,onIconClick:me,decorations:(De=V.current)===null||De===void 0?void 0:De.decorations.getDecorations(Ne.item)})},[G]);(0,r.useEffect)(()=>{var Ne,De;V.current=new h.BasicTreeService(R,D,T,{treeName:L});const Ce=(Ne=V.current)===null||Ne===void 0?void 0:Ne.onDidUpdateTreeModel(Te=>{Z(Te)}),ke=()=>{var Te;(Te=V.current)===null||Te===void 0||Te.enactiveFocusedDecoration()};return(De=K.current)===null||De===void 0||De.addEventListener("blur",ke,!0),()=>{var Te,We;$.current=!0,(Te=K.current)===null||Te===void 0||Te.removeEventListener("blur",ke,!0),Ce.dispose(),(We=V.current)===null||We===void 0||We.dispose()}},[]),(0,r.useEffect)(()=>{var Ne;(Ne=V.current)===null||Ne===void 0||Ne.updateTreeData(R)},[R]);const Z=async Ne=>{Ne&&await Ne.ensureReady,$.current||X(Ne)},oe=async Ne=>{var De;(De=V.current)===null||De===void 0||De.activeFocusedDecoration(Ne),s.BasicCompositeTreeNode.is(Ne)&&fe(Ne)},ie=(0,r.useCallback)(Ne=>{x&&x({...Ne,selectItem:oe,focusItem:async De=>{var Ce;const ke=`/${L}/${De}`;await G?.ensureReady;const Te=await Ne.ensureVisible(ke,"auto",!0);Te&&((Ce=V.current)===null||Ce===void 0||Ce.activeFocusedDecoration(Te))}}),H.current=Ne},[V.current]),he=(0,r.useCallback)((Ne,De)=>{oe(De),b&&b(Ne,De)},[b]),me=(0,r.useCallback)((Ne,De)=>{w&&w(Ne,De)},[w]),q=(0,r.useCallback)((Ne,De)=>{I&&I(Ne,De)},[I]),be=(0,r.useCallback)((Ne,De)=>{var Ce,ke;if(De?(Ce=V.current)===null||Ce===void 0||Ce.activeContextMenuDecoration(De):(ke=V.current)===null||ke===void 0||ke.enactiveFocusedDecoration(),A)A(Ne,De);else{let Te=[];Array.isArray(k)?Te=k:typeof k=="function"&&(Te=k(De));const We=new Set,pe={};for(const Ue of Te)We.add(Ue.group||"-1"),pe[Ue.group||"-1"]||(pe[Ue.group||"-1"]=[]),pe[Ue.group||"-1"].push(Ue);const re=Array.from(We).sort((Ue,Ye)=>Ue.localeCompare(Ye,"kn",{numeric:!0}));let ue=[];for(const Ue of re)ue=ue.concat(pe[Ue].map(Ye=>({id:Ye.id,label:Ye.title,group:Ye.group}))),ue=ue.concat([{id:`${Ue}_divider`,label:"",type:"divider"}]);ue.pop(),JSON.stringify(ue)!==JSON.stringify(j)&&Q(ue);const{x:Se,y:ye}=Ne.nativeEvent;W({show:!0,point:{pageX:Se,pageY:ye},activeNode:De})}},[I]),fe=(0,r.useCallback)(Ne=>{var De,Ce;Ne.expanded?(De=H.current)===null||De===void 0||De.collapseNode(Ne):(Ce=H.current)===null||Ce===void 0||Ce.expandNode(Ne)},[]),te=(0,r.useCallback)((Ne,De)=>{s.BasicCompositeTreeNode.is(De)&&fe(De),S&&S(Ne,De)},[S]),ge=(0,r.useCallback)(()=>{var Ne;(Ne=V.current)===null||Ne===void 0||Ne.enactiveFocusedDecoration()},[]),Re=(0,r.useCallback)((Ne,De)=>{A&&A(Ne,De)},[]),Oe=(0,r.useCallback)(()=>{W({...U,show:!1})},[U]),Le=(0,r.useCallback)(()=>k?r.default.createElement(o.default,{popupPlacement:"bottomLeft",popupVisible:U.show,action:["contextMenu"],popupAlign:{overflow:{adjustX:1,adjustY:1},offset:[window.scrollX,window.scrollY]},point:U.point||{},builtinPlacements:m.placements,popup:r.default.createElement(l.ClickOutside,{className:"basic_tree_menubars",mouseEvents:["click","contextmenu"],onOutsideClick:Oe},j.map(({id:Ne,label:De,type:Ce})=>r.default.createElement(_.BasicMenuItem,{key:Ne,id:Ne,label:De,type:Ce,focusMode:U.show,onClick:ke=>{F&&F(U.activeNode,ke),W({show:!1})}}))),alignPoint:!0}):null,[j,F,U]);return r.default.createElement("div",{className:"basic_tree",tabIndex:-1,ref:K,onClick:ge,onContextMenu:Re},Le(),G?r.default.createElement(v.RecycleTree,{height:d,width:g,itemHeight:u,model:G,onReady:ie,className:y,leaveBottomBlank:N},Y):null)};t.BasicRecycleTree=a},64013:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicMenuItem=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=({id:v,label:_,type:m,focusMode:p,onClick:s})=>{const[h,a]=o.default.useState(!1),g=o.default.useCallback(()=>{a(p?!0:u=>!u),s(v)},[v]),d=o.default.useCallback(()=>{},[v,p]);return m==="divider"?o.default.createElement("div",{className:"basic_menu_item_divider"}):o.default.createElement("div",{className:(0,r.default)("basic_menu_item",{"menu-open":h}),onMouseOver:d,onClick:g},_)};t.BasicMenuItem=l},84225:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placements=void 0;const e={adjustX:1,adjustY:1},n=[0,0];t.placements={bottomLeft:{points:["tl","bl"],overflow:e,offset:[0,4],targetOffset:n}}},78569:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeNode=t.BasicCompositeTreeNode=t.BasicTreeRoot=void 0;const n=e(43685);class r extends n.CompositeTreeNode{constructor(_,m,p,s={}){super(_,m,void 0,{treeName:s.treeName}),this._raw=p}get name(){var _;return(_=this.getMetadata("treeName"))!==null&&_!==void 0?_:`BasicTreeRoot_${this.id}`}get raw(){return this._raw}get expanded(){return!0}}t.BasicTreeRoot=r;class o extends n.CompositeTreeNode{constructor(_,m,p,s){super(_,m,void 0,{name:p.label}),this.isExpanded=p.expanded||!1,this.id=s||this.id,this._displayName=p.label,this._raw=p}get displayName(){return this._displayName}get renderLabel(){return this.raw.renderLabel}get icon(){return this.raw.icon}get iconClassName(){return this.raw.iconClassName}get className(){return this.raw.className}get twisterClassName(){return this.raw.twisterClassName}get twisterPlaceholderClassName(){return this.raw.twisterPlaceholderClassName}get indentOffset(){return this.raw.indentOffset}get description(){return this.raw.description}get raw(){return this._raw}get expandable(){return!!this._raw.expandable}}t.BasicCompositeTreeNode=o;class l extends n.TreeNode{constructor(_,m,p,s){super(_,m,void 0,{name:p.label}),this.id=s||this.id,this._displayName=p.label,this._raw=p}get displayName(){return this._displayName}get renderLabel(){return this.raw.renderLabel}get description(){return this.raw.description}get icon(){return this.raw.icon}get iconClassName(){return this.raw.iconClassName}get className(){return this.raw.className}get twisterClassName(){return this.raw.twisterClassName}get indentOffset(){return this.raw.indentOffset}get twisterPlaceholderClassName(){return this.raw.twisterPlaceholderClassName}get raw(){return this._raw}}t.BasicTreeNode=l},17462:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeNodeRenderer=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(48412),v=e(54713),_=e(3660),m=e(78569),p=e(92532);e(12794);const s=({item:h,className:a,itemHeight:g=22,indent:d=8,baseIndent:u=8,onClick:E,onDbClick:f,onTwistierClick:c,onIconClick:y,onContextMenu:b,decorations:A,inlineMenus:S=[],inlineMenuActuator:w=()=>{}})=>{const I=(0,o.useCallback)($=>{E&&($.stopPropagation(),E($,h))},[E]),D=(0,o.useCallback)($=>{f&&($.stopPropagation(),f($,h))},[f]),T=(0,o.useCallback)($=>{b&&($.stopPropagation(),$.preventDefault(),b($,h))},[b]),R=(0,o.useCallback)($=>{$.stopPropagation(),c?c($,h):E&&E($,h)},[E,c]),M=(0,o.useCallback)($=>{$.stopPropagation(),y?y($,h):E&&E($,h)},[E,y]);let x=(h.depth>0?h.depth-1:0)*d;u&&(x+=u),h.indentOffset&&(x+=h.indentOffset);const k={height:g,lineHeight:`${g}px`,paddingLeft:`${x}px`},F=(0,o.useCallback)($=>o.default.createElement(v.Icon,{onClick:M,icon:$.icon,className:(0,r.default)("icon",$.iconClassName)}),[]),L=(0,o.useCallback)($=>$.displayName.replace(/\n/g,"\u21B5"),[]),N=(0,o.useCallback)($=>$.displayName&&o.default.createElement("div",{className:(0,r.default)("segment","display_name")},L($)),[]),U=(0,o.useCallback)($=>$.renderLabel,[]),W=(0,o.useCallback)($=>$.description?typeof $.description=="string"?o.default.createElement("div",{className:(0,r.default)("segment_grow","description")},$.description):$.description:null,[]),j=(0,o.useCallback)($=>{if(Array.isArray(S))return S;if(typeof S=="function")return S($)},[S]),Q=()=>{var $;const V=m.BasicCompositeTreeNode.is(h),H=($=j(h))===null||$===void 0?void 0:$.filter(Y=>V?Y.position===p.IBasicInlineMenuPosition.TREE_CONTAINER:Y.position===p.IBasicInlineMenuPosition.TREE_NODE);if(!H?.length)return null;const K=(0,o.useCallback)((Y,Z)=>{Y.stopPropagation(),w(h,Z)},[]);return o.default.createElement("div",{className:(0,r.default)("segment","tail")},H.map(Y=>o.default.createElement(l.Button,{style:{marginRight:"5px"},type:"icon",key:`${h.id}-${Y.icon}`,icon:Y.icon,title:Y.title,onClick:Z=>K(Z,Y)})))},G=($,V)=>A&&A?.classlist.indexOf(p.DECORATIONS.LOADING)>-1?o.default.createElement(_.Loading,null):o.default.createElement(v.Icon,{className:(0,r.default)("segment","expansion_toggle",$.twisterClassName,{mod_collapsed:!$.expanded}),onClick:V,icon:"arrow-right"}),X=$=>{if(!$.expandable)return o.default.createElement("div",{className:(0,r.default)("segment","expansion_toggle",$.twisterPlaceholderClassName)});if(m.BasicCompositeTreeNode.is($))return G($,R)};return o.default.createElement("div",{key:h.id,onClick:I,onDoubleClick:D,onContextMenu:T,className:(0,r.default)("tree_node",a,A?A.classlist:null,h.className),style:k,"data-id":h.id},o.default.createElement("div",{className:"content"},X(h),F(h),o.default.createElement("div",{className:"overflow_wrap"},U(h)||N(h),W(h)),Q()))};t.BasicTreeNodeRenderer=s},45203:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasicTreeModel=t.BasicTreeService=void 0;const n=e(70392),r=e(43685),o=e(34054),l=e(78569),v=e(92532);class _ extends r.Tree{constructor(s,h,a,g={}){super(),this._treeData=s,this._resolveChildren=h,this._sortComparator=a,this.treeOptions=g,this.selectedDecoration=new r.Decoration(v.DECORATIONS.SELECTED),this.focusedDecoration=new r.Decoration(v.DECORATIONS.FOCUSED),this.contextMenuDecoration=new r.Decoration(v.DECORATIONS.ACTIVED),this.loadingDecoration=new r.Decoration(v.DECORATIONS.LOADING),this._selectedNodes=[],this.disposableCollection=new n.DisposableCollection,this.decorationDisposableCollection=new n.DisposableCollection,this.onDidUpdateTreeModelEmitter=new n.Emitter,this.sortComparator=(d,u)=>{if(this._sortComparator){const E=this._sortComparator(d.raw,u.raw);if(typeof E<"u")return E}return super.sortComparator(d,u)},this.activeFocusedDecoration=d=>{var u;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this.clearDecoration(this.focusedDecoration),this.clearDecoration(this.selectedDecoration),this._contextMenuNode=void 0),d&&(this.selectedNodes.length>0&&this.clearDecoration(this.selectedDecoration),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.selectedDecoration.addTarget(d),this.focusedDecoration.addTarget(d),this._focusedNode=d,this._selectedNodes=[d],(u=this.model)===null||u===void 0||u.dispatchChange())},this.activeContextMenuDecoration=d=>{var u;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this._contextMenuNode=void 0),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(d),this._contextMenuNode=d,(u=this.model)===null||u===void 0||u.dispatchChange()},this.enactiveFocusedDecoration=()=>{var d;this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0,(d=this.model)===null||d===void 0||d.dispatchChange())},this.disposableCollection.push(this.onDidUpdateTreeModelEmitter)}setUpTreeModel(){this._root=new l.BasicTreeRoot(this,void 0,{children:this._treeData,label:"",command:"",icon:""},{treeName:this.treeOptions.treeName}),this._model=new m,this._model.init(this._root),this.initDecorations(this._root),this.onDidUpdateTreeModelEmitter.fire(this._model)}resetState(){this._selectedNodes=[],this._contextMenuNode=void 0,this._focusedNode=void 0}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get model(){return this._model}get root(){return this._root}get decorations(){return this._decorations}initDecorations(s){this.decorationDisposableCollection.dispose(),this._decorations=new r.DecorationsManager(s),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration),this.decorationDisposableCollection.push(s.watcher.on(o.TreeNodeEvent.WillResolveChildren,h=>{this.loadingDecoration.addTarget(h)})),this.decorationDisposableCollection.push(s.watcher.on(o.TreeNodeEvent.DidResolveChildren,h=>{this.loadingDecoration.removeTarget(h)})),this.decorationDisposableCollection.push(this._decorations)}updateTreeData(s){this._treeData=s,this.resetState(),this.setUpTreeModel()}async resolveChildren(s){return this._resolveChildren?this.transformTreeNode(s,this._resolveChildren(s?.raw)||[]):this.transformTreeNode(s,s?.raw.children||[])}transformTreeNode(s,h){if(!h)return[];const a=[];for(const g of h)g.children?a.push(new l.BasicCompositeTreeNode(this,s,g)):a.push(new l.BasicTreeNode(this,s,g));return a}get selectedNodes(){return this._selectedNodes}get focusedNode(){return this._focusedNode}get contextMenuNode(){return this._contextMenuNode}clearDecoration(s){for(const h of s.appliedTargets.keys())s.removeTarget(h)}dispose(){super.dispose(),this.disposableCollection.dispose(),this.decorationDisposableCollection.dispose()}}t.BasicTreeService=_;class m extends r.TreeModel{}t.BasicTreeModel=m},92532:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DECORATIONS=t.IBasicInlineMenuPosition=void 0;var e;(function(n){n[n.TREE_NODE=1]="TREE_NODE",n[n.TREE_CONTAINER=2]="TREE_CONTAINER"})(e||(t.IBasicInlineMenuPosition=e={})),t.DECORATIONS={SELECTED:"mod_selected",FOCUSED:"mod_focused",ACTIVED:"mod_actived",LOADING:"mod_loading"}},24786:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeAdaptiveDecorator=void 0;const r=e(85608).__importDefault(e(14041)),o=e(34054),l=v=>_=>{const{model:m,itemHeight:p,onReady:s}=_,h=r.default.useRef(),a=r.default.useRef(!1),[g,d]=r.default.useState(0),u=()=>{d(m.root.branchSize*p)},E=f=>{s&&s({...f,promptNewTreeNode:async c=>{var y;const b=await f.promptNewTreeNode(c);return!((y=h.current)===null||y===void 0)&&y.root.branchSize?d(h.current.root.branchSize*p+p):d(p),a.current=!1,b.onDestroy(()=>{var A;!((A=h.current)===null||A===void 0)&&A.root.branchSize&&d(h.current.root.branchSize*p)}),b.onCancel(()=>{h.current&&d(h.current.root.branchSize*p)}),b.onBlur(()=>a.current),b},promptNewCompositeTreeNode:async c=>{var y;const b=await f.promptNewCompositeTreeNode(c);return!((y=h.current)===null||y===void 0)&&y.root.branchSize?d(h.current.root.branchSize*p+p):d(p),b.onDestroy(()=>{var A;!((A=h.current)===null||A===void 0)&&A.root.branchSize&&d(h.current.root.branchSize*p)}),b.onCancel(()=>{var A;!((A=h.current)===null||A===void 0)&&A.root.branchSize&&d(h.current.root.branchSize*p)}),b.onBlur(()=>a.current),b}})};return r.default.useEffect(()=>{h.current=m,h.current.root&&(d(h.current.root.branchSize*p),h.current.root.watcher.on(o.TreeNodeEvent.DidChangeExpansionState,u))},[m]),r.default.useEffect(()=>{setTimeout(()=>{a.current=!0},100)},[g]),r.default.createElement(r.default.Fragment,null,r.default.createElement(v,{..._,height:g,onReady:E}))};t.RecycleTreeAdaptiveDecorator=l},326:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeFilterDecorator=void 0;const n=e(85608),r=n.__importDefault(e(97331)),o=n.__importStar(e(14041)),l=e(54713),v=e(50708),_=e(4981);e(69715);const m=30,p=500,s=a=>{const{localize:g}=o.default.useContext(_.LocalizeContext);return o.default.createElement("div",{className:"kt-recycle-tree-filter-wrapper"},o.default.createElement(v.Input,{hasClear:!0,autoFocus:!0,className:"kt-recycle-tree-filter-input",size:"small",...a,placeholder:a.placeholder||g("tree.filter.placeholder"),addonBefore:o.default.createElement(l.Icon,{className:"kt-recycle-tree-filter-icon",icon:"retrieval"})}))},h=a=>g=>{const[d,u]=o.default.useState(""),[E,f]=o.default.useState(""),{beforeFilterValueChange:c,filterEnabled:y,height:b,filterPlaceholder:A,filterAfterClear:S,onReady:w,onFilterBlur:I,filterAutoFocus:D,...T}=g,R=(0,r.default)(async x=>{c&&await c(x),f(x)},p),M=(0,o.useCallback)(x=>{u(x),R(x)},[d]),O=(0,o.useCallback)(x=>{w&&w({...x,clearFilter:()=>{f(""),u("")}})},[w]);return o.default.createElement(o.default.Fragment,null,y&&o.default.createElement(s,{afterClear:S,placeholder:A,value:d,autoFocus:D,onBlur:I,onValueChange:M}),o.default.createElement(a,{...T,height:b-(y?m:0),onReady:O,filter:E}))};t.RecycleTreeFilterDecorator=h},72731:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(326),t),n.__exportStar(e(24786),t)},91416:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(57621),t),n.__exportStar(e(13429),t),n.__exportStar(e(48103),t),n.__exportStar(e(43685),t),n.__exportStar(e(34054),t),n.__exportStar(e(72731),t),n.__exportStar(e(75821),t)},65601:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NewPromptHandle=void 0;const n=e(43685),r=e(65747);class o extends r.PromptHandle{constructor(v,_){super(),this.type=v,this.parent=_,this._id=n.TreeNode.nextId()}get id(){return this._id}get depth(){return this.parent.depth+1}}t.NewPromptHandle=o},65747:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromptHandle=t.VALIDATE_CLASS_NAME=t.PROMPT_VALIDATE_TYPE=void 0;const n=e(70392),r=e(50708),o=e(84605),l=p=>new Promise(s=>setTimeout(s,p));var v;(function(p){p[p.INFO=1]="INFO",p[p.ERROR=2]="ERROR",p[p.WARNING=3]="WARNING"})(v||(t.PROMPT_VALIDATE_TYPE=v={}));var _;(function(p){p.INFO="validate-info",p.ERROR="validate-error",p.WARNING="validate-warning"})(_||(t.VALIDATE_CLASS_NAME=_={}));class m{constructor(){this.disposables=new n.DisposableCollection,this.isInPendingCommitState=!1,this._destroyed=!1,this._hasValidateElement=!1,this._hasAddonAfter=!1,this._inComposition=!1,this.onChangeEmitter=new n.Emitter,this.onCommitEmitter=new n.Emitter,this.onCancelEmitter=new n.Emitter,this.onFocusEmitter=new n.Emitter,this.onBlurEmitter=new n.Emitter,this.onDestroyEmitter=new n.Emitter,this.markdownRenderer=(0,o.createMarkedRenderer)(),this.handleClick=s=>{s.stopPropagation()},this.handleDBClick=s=>{s.stopPropagation()},this.handleCompositionstart=()=>{this._inComposition=!0},this.handleCompositionend=()=>{this._inComposition=!1},this.handleKeyup=()=>{this._inComposition||this.onChangeEmitter.fire(this.$.value)},this.handleKeydown=async s=>{if(!this._inComposition){if(s.key==="Escape"){if((await this.onCancelEmitter.fireAndAwait(this.$.value)).some(a=>a.result===!1||!!a.err))return;this.destroy()}if(s.key==="Enter"){if(this.isInPendingCommitState=!0,this.$.disabled=!0,(await this.onCommitEmitter.fireAndAwait(this.$.value)).some(a=>a.result===!1||!!a.err)){this.isInPendingCommitState=!1,this.$.disabled=!1,this.$.focus();return}this.isInPendingCommitState=!1,this.$.disabled=!1,this.destroy()}}},this.handleFocus=()=>{this.onFocusEmitter.fire(this.$.value)},this.handleBlur=async s=>{await l(0),!(!this.$.isConnected&&!this.destroyed||(await this.onBlurEmitter.fireAndAwait(this.$.value)).some(a=>a.result===!1||!!a.err))&&(this.isInPendingCommitState||this.destroy())},this.$=document.createElement("input"),this.$.setAttribute("type","text"),this.$.setAttribute("name","no_keybinding"),this.$.setAttribute("spellcheck","false"),this.$.setAttribute("autoCapitalize","off"),this.$.setAttribute("autoCorrect","off"),this.$.setAttribute("autoComplete","off"),this.ProxiedInput=(0,r.bindInputElement)(this.$),this.$.addEventListener("click",this.handleClick),this.$.addEventListener("dblclick",this.handleDBClick),this.$.addEventListener("keyup",this.handleKeyup),this.$.addEventListener("keydown",this.handleKeydown),this.$.addEventListener("focus",this.handleFocus),this.$.addEventListener("blur",this.handleBlur),this.$.addEventListener("compositionstart",this.handleCompositionstart),this.$.addEventListener("compositionend",this.handleCompositionend),this.$validate=document.createElement("div"),this.$validate.setAttribute("style","top: 100%;"),this.$addonAfter=document.createElement("div"),this.$addonAfter.setAttribute("class","kt-input-addon-after")}get destroyed(){return this._destroyed}get onChange(){return this.onChangeEmitter.event}get onCommit(){return this.onCommitEmitter.event}get onCancel(){return this.onCancelEmitter.event}get onFocus(){return this.onFocusEmitter.event}get onBlur(){return this.onBlurEmitter.event}get onDestroy(){return this.onDestroyEmitter.event}focus(){this.$.focus()}setSelectionRange(s,h){this.$.setSelectionRange(s,h)}addClassName(s){this.$.classList.add(s)}removeClassName(s){this.$.classList.remove(s)}addAddonAfter(s){var h,a;!this._hasAddonAfter&&!this._destroyed&&((a=(h=this.$.parentElement)===null||h===void 0?void 0:h.parentElement)===null||a===void 0||a.appendChild(this.$addonAfter),this._hasAddonAfter=!0);const g=document.createElement("div");g.setAttribute("class",s),this.$addonAfter.appendChild(g)}removeAddonAfter(){var s,h,a;this._hasAddonAfter&&((s=this.$addonAfter.firstChild)===null||s===void 0||s.remove(),(a=(h=this.$.parentElement)===null||h===void 0?void 0:h.parentElement)===null||a===void 0||a.removeChild(this.$addonAfter),this._hasAddonAfter=!1)}addValidateMessage(s){var h,a,g,d,u,E,f;!this._hasValidateElement&&!this._destroyed&&((g=(a=(h=this.$.parentElement)===null||h===void 0?void 0:h.parentElement)===null||a===void 0?void 0:a.parentElement)===null||g===void 0||g.appendChild(this.$validate),this._hasValidateElement=!0);let c="validate-message popup ";s&&s.type===v.ERROR?this._validateClassName=_.ERROR:s&&s.type===v.WARNING?this._validateClassName=_.WARNING:this._validateClassName=_.INFO,c+=this._validateClassName,this.$validate.classList.value=c;const y=(0,o.toMarkdownHtml)(s.message||"",{renderer:this.markdownRenderer});this.$validate.innerHTML=typeof y=="string"?y:"",(u=(d=this.$.parentElement)===null||d===void 0?void 0:d.parentElement)===null||u===void 0||u.classList.remove(_.INFO,_.ERROR,_.WARNING),(f=(E=this.$.parentElement)===null||E===void 0?void 0:E.parentElement)===null||f===void 0||f.classList.add(this._validateClassName)}removeValidateMessage(){var s,h,a,g,d;this._hasValidateElement&&((a=(h=(s=this.$.parentElement)===null||s===void 0?void 0:s.parentElement)===null||h===void 0?void 0:h.parentElement)===null||a===void 0||a.removeChild(this.$validate),this._hasValidateElement=!1,(d=(g=this.$.parentElement)===null||g===void 0?void 0:g.parentElement)===null||d===void 0||d.classList.remove(this._validateClassName))}destroy(){if(this._destroyed)return;const s=this.focusPrevActiveElement();this._destroyed=!0,this.$.removeEventListener("click",this.handleClick),this.$.removeEventListener("keyup",this.handleKeyup),this.$.removeEventListener("keydown",this.handleKeydown),this.$.removeEventListener("focus",this.handleFocus),this.$.removeEventListener("blur",this.handleBlur),this.removeValidateMessage(),this.removeAddonAfter(),this.$.disabled=!1,this.onDestroyEmitter.fire(this.$.value),this.disposables.dispose(),requestAnimationFrame(()=>{s?.focus()})}focusPrevActiveElement(){let s=this.$.parentElement;for(;s&&!(typeof s.attributes.tabindex<"u");)s=s?.parentElement;return s}}t.PromptHandle=m},58357:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenamePromptHandle=void 0;const n=e(65747);class r extends n.PromptHandle{constructor(l,v){super(),this.originalFileName=l,this.target=v,this.$.value=l,this.setSelectionRange(0,l.lastIndexOf("."))}get id(){return this.target.id}get depth(){return this.target.depth}}t.RenamePromptHandle=r},48103:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(65747),t),n.__exportStar(e(58357),t),n.__exportStar(e(65601),t)},29805:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tree=void 0;const n=e(70392),r=e(26353);class o{constructor(){this.onChangedEmitter=new n.Emitter,this.toDispose=new n.DisposableCollection,this.nodes={}}dispose(){var v;this.toDispose.dispose(),(v=this._root)===null||v===void 0||v.dispose()}get root(){return this._root}set root(v){var _;v!==this._root&&((_=this._root)===null||_===void 0||_.dispose(),this._root=v)}fireChanged(){this.onChangedEmitter.fire(void 0)}sortComparator(v,_){return v.constructor===_.constructor?v.name>_.name?1:v.name<_.name?-1:0:r.CompositeTreeNode.is(v)?-1:r.CompositeTreeNode.is(_)?1:0}}t.Tree=o},26353:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeTreeNode=t.TreeNode=t.BranchOperatorStatus=void 0,t.spliceArray=l;const n=e(70392),r=e(34054),{Path:o}=n.path;function l(p,s,h=0,a){const g=p.slice(0);return g.splice(s,h,...a||[]),g}var v;(function(p){p[p.EXPANDED=1]="EXPANDED",p[p.SHRINKED=2]="SHRINKED"})(v||(t.BranchOperatorStatus=v={}));class _{static is(s){return!!s&&"depth"in s&&"name"in s&&"path"in s&&"id"in s}static getTreeNodeById(s){return _.idToTreeNode.get(s)}static getTreeNodeByPath(s){return _.pathToTreeNode.get(s)}static setTreeNode(s,h,a){_.idToTreeNode.set(s,a),_.pathToTreeNode.set(h,a)}static removeTreeNode(s,h){_.idToTreeNode.delete(s),_.pathToTreeNode.delete(h)}static getIdByPath(s){return _.pathToId.get(s)}static setIdByPath(s,h){return _.pathToId.set(s,h)}static getGlobalTreeState(s){let h=_.pathToGlobalTreeState.get(s);return h||(h={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),h}static setGlobalTreeState(s,h){let a=_.pathToGlobalTreeState.get(s);return a||(a={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),a={...a,...h},_.pathToGlobalTreeState.set(s,a),a}constructor(s,h,a,g){this._uid=_.nextId(),this._parent=h,this._tree=s,this._disposed=!1,this._visible=!0,this._metadata={...g||{}},this._depth=h?h.depth+1:0,a?this._watcher=a:h&&(this._watcher=h.watcher)}get disposed(){return this._disposed}get depth(){return this._depth}get parent(){return this._parent}set parent(s){this._parent=s,this._path=""}get type(){return r.TreeNodeType.TreeNode}get id(){return this._uid}set id(s){this._uid=s}get displayName(){return this.name}get name(){return this.parent?this.getMetadata("name")||String(this.id):`root_${this.id}`}set name(s){this.addMetadata("name",s),this._path=""}get path(){return this._path||(this.parent?this._path=this.name.startsWith(o.separator)?`${this.parent.path}${this.name}`:`${this.parent.path}${o.separator}${this.name}`:this._path=this.name.startsWith(o.separator)?this.name:`${o.separator}${this.name}`),this._path}get checkboxInfo(){return{checked:!1,tooltip:"",accessibilityInformation:this.accessibilityInformation}}get accessibilityInformation(){return{label:this.name,role:"treeitem"}}getMetadata(s){return s==="name"&&!this._metadata[s]&&(this._metadata[s]=String(_.nextId())),this._metadata[s]}addMetadata(s,h){if(!(s in this._metadata))this._metadata[s]=h,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Added,key:s,prevValue:void 0,value:h});else{const a=this._metadata[s];this._metadata[s]=h,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Updated,key:s,prevValue:a,value:h})}}removeMetadata(s){if(s in this._metadata){const h=this._metadata[s];delete this._metadata[s],this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Removed,key:s,prevValue:h,value:void 0})}}mv(s,h=this.name){const a=this._parent;if(s===null||!m.is(s)){this._parent=void 0,this.dispose();return}const g=a!==s,d=this.path;this._depth=s.depth+1,(g||h!==this.name)&&(this.name=h,g&&this._watcher.notifyWillChangeParent(this,a,s),this.parent&&(this.parent.unlinkItem(this,!0),this.parent=s,this.parent.insertItem(this)),g&&this._watcher.notifyDidChangeParent(this,a,s)),this.path!==d&&this._watcher.notifyDidChangePath(this)}get visible(){return this._visible}setVisible(s){return this._visible=s,this}dispose(){this._disposed||(_.removeTreeNode(this.id,this.path),this._disposed=!0,this._watcher.notifyDidDispose(this))}}t.TreeNode=_,_.nextId=(()=>{let p=0;return()=>p++})(),_.idToTreeNode=new Map,_.pathToTreeNode=new Map,_.pathToId=new Map,_.pathToGlobalTreeState=new Map;class m extends _{static defaultSortComparator(s,h){return s.constructor===h.constructor?s.name>h.name?1:s.name<h.name?-1:0:m.is(s)?-1:m.is(h)?1:0}static is(s){return!!s&&"children"in s}static isRoot(s){return m.is(s)&&!s.parent}generatorWatcher(){const s=new n.Emitter,h=s.event,a=new n.DisposableCollection,g=u=>{this.watchEvents.delete(u)};return{notifyWillProcessWatchEvent:(u,E)=>{s.fire({type:r.TreeNodeEvent.WillProcessWatchEvent,args:[u,E]})},notifyWillChangeParent:(u,E,f)=>{s.fire({type:r.TreeNodeEvent.WillChangeParent,args:[u,E,f]})},notifyDidChangeParent:(u,E,f)=>{s.fire({type:r.TreeNodeEvent.DidChangeParent,args:[u,E,f]})},notifyDidDispose:u=>{s.fire({type:r.TreeNodeEvent.DidDispose,args:[u]})},notifyDidProcessWatchEvent:(u,E)=>{s.fire({type:r.TreeNodeEvent.DidProcessWatchEvent,args:[u,E]})},notifyDidChangePath:u=>{s.fire({type:r.TreeNodeEvent.DidChangePath,args:[u]})},notifyWillChangeExpansionState:(u,E)=>{const f=this.isItemVisibleAtSurface(u);s.fire({type:r.TreeNodeEvent.WillChangeExpansionState,args:[u,E,f]})},notifyDidChangeExpansionState:(u,E)=>{const f=this.isItemVisibleAtSurface(u);s.fire({type:r.TreeNodeEvent.DidChangeExpansionState,args:[u,E,f]})},notifyDidChangeMetadata:(u,E)=>{s.fire({type:r.TreeNodeEvent.DidChangeMetadata,args:[u,E]})},notifyDidUpdateBranch:()=>{s.fire({type:r.TreeNodeEvent.BranchDidUpdate,args:[]})},notifyWillResolveChildren:(u,E)=>{s.fire({type:r.TreeNodeEvent.WillResolveChildren,args:[u,E]})},notifyDidResolveChildren:(u,E)=>{s.fire({type:r.TreeNodeEvent.DidResolveChildren,args:[u,E]})},on:(u,E)=>{const f=h(c=>{c.type===u&&E(...c.args)});return a.push(f),f},onWatchEvent:(u,E)=>{const f=g;return this.watchEvents.set(u,{terminator:f,callback:E}),f},dispose:a}}constructor(s,h,a,g){super(s,h,a,g),this._children=null,this._lock=!1,this.refreshThrottler=new n.ThrottledDelayer(m.REFRESH_DELAY),this.toRefreshPathQueue=new Set,this.handleWatchEvent=async d=>{switch(this.watcher.notifyWillProcessWatchEvent(this,d),d.type){case r.WatchEvent.Moved:{const{oldPath:u,newPath:E}=d;if(typeof u!="string")throw new TypeError("Expected oldPath to be a string");if(typeof E!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(u))throw new TypeError("oldPath must be absolute");if(o.isRelative(E))throw new TypeError("newPath must be absolute");this.transferItem(u,E);break}case r.WatchEvent.Added:{const{node:u}=d;if(!_.is(u))throw new TypeError("Expected node to be a TreeNode");this.insertItem(u);break}case r.WatchEvent.Removed:{const{path:u}=d,E=new o(u),f=E.dir.toString(),c=E.base.toString();if(f===this.path&&this.children){const y=this.children.find(b=>b.name===c);y&&this.unlinkItem(y)}break}default:this.isItemVisibleAtRootSurface(this)?await this.refresh():(this.isExpanded=!1,this._children=null);break}this.watcher.notifyDidProcessWatchEvent(this,d)},this.isExpanded=!h,this._branchSize=0,h?this._watcher=h.watcher:(this.watchEvents=new Map,this._watcher=this.generatorWatcher(),this._root=this,_.setTreeNode(this.id,this.path,this))}set name(s){const h=this.path;!m.isRoot(this)&&typeof this.watchTerminator=="function"?(this.watchTerminator(h),this.addMetadata("name",s),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)):this.addMetadata("name",s),this._path=""}get name(){return this.parent?this.getMetadata("name"):`root_${this.id}`}get watcher(){return this._watcher}get type(){return r.TreeNodeType.CompositeTreeNode}get children(){return this._children}get expanded(){return this.isExpanded}get branchSize(){return this._branchSize}get flattenedBranch(){return this._flattenedBranch}get lock(){return this._lock}get root(){return(0,n.isUndefined)(this._root)&&(this._root=this.getRoot()||null),this._root}getRoot(){let s=this.parent;for(;s&&s.parent;)s=s.parent;return s}async ensureLoaded(s){if(!this._children)return await this.hardReloadChildren(s)}async setExpanded(s=!0,h=!1,a=!0,g){if(!this.disposed&&!m.isRoot(this)&&!this.isExpanded){if(a){const d=_.getGlobalTreeState(this.path);d.loadPathCancelToken.cancel(),d.refreshCancelToken.cancel(),_.setGlobalTreeState(this.path,{isExpanding:!0})}if(this.isExpanded=!0,this._children===null&&(this._watcher.notifyWillResolveChildren(this,this.isExpanded),await this.hardReloadChildren(g),this._watcher.notifyDidResolveChildren(this,this.isExpanded),!this.isExpanded||g?.isCancellationRequested)){a&&_.setGlobalTreeState(this.path,{isExpanding:!1});return}if(s&&this.parent&&m.is(this.parent)&&await this.parent.setExpanded(!0,!h,!1,g),g?.isCancellationRequested){a&&_.setGlobalTreeState(this.path,{isExpanding:!1});return}this.isExpanded&&(this._watcher.notifyWillChangeExpansionState(this,!0),this.expandBranch(this,h),this._watcher.notifyDidChangeExpansionState(this,!0)),a&&(_.setGlobalTreeState(this.path,{isExpanding:!1}),_.setTreeNode(this.id,this.path,this))}}getAllExpandedNodePath(){var s,h;const a=[];let g=0;m.isRoot(this)||(g=((s=this.root)===null||s===void 0?void 0:s.getIndexAtTreeNodeId(this.id))+1);const d=g+this.branchSize;for(let u=g;u<d;u++){const E=(h=this.root)===null||h===void 0?void 0:h.getTreeNodeAtIndex(u);m.is(E)&&E.expanded&&a.push(E.path)}return a}getAllCollapsedNodePath(){let s=[];if(this.children){for(let h=0;h<this.children.length;h++){const a=this.children[h];m.is(a)&&(a.isExpanded?s=s.concat(a.getAllCollapsedNodePath()):s.push(a.path))}return s}else return s}async resolveChildrens(s){var h,a,g;let d=this.children,u=[];try{d=await this._tree.resolveChildren(this)||[]}catch{d=[]}if(s?.isCancellationRequested)return!1;const E=new Array(d.length);this._children=Array(d.length);for(let c=0;c<d.length;c++){const y=d[c];y.id=_.getIdByPath(y.path)||y.id,this._children[c]=y,_.setIdByPath(y.path,y.id)}(h=this._children)===null||h===void 0||h.sort(this._tree.sortComparator||m.defaultSortComparator);for(let c=0;c<d.length;c++)E[c]=this._children[c].id;const f=[];for(let c=0,y=((a=this.children)===null||a===void 0?void 0:a.length)||0;c<y;c++){const b=(g=this.children)===null||g===void 0?void 0:g[c];if(m.is(b)&&b.expanded){const A=await b.resolveChildrens(s);if(A&&(u=u.concat(A)),s?.isCancellationRequested)return;f.push(b)}}this._branchSize=E.length,this.setFlattenedBranch(E);for(let c=0;c<f.length;c++){const y=f[c];y.expandBranch(y,!0)}return u.concat(f.map(c=>c.path.toString()))}updateTreeNodeCache(s){var h;if(_.setTreeNode(s.id,s.path,s),m.is(s)&&s.expanded&&(!((h=s.children)===null||h===void 0)&&h.length))for(let a=0;a<s.children.length;a++){const g=s.children[a];this.updateTreeNodeCache(g)}}async refreshTreeNodeByPaths(s=this.getAllExpandedNodePath(),h,a){if(!m.is(this))return;let g;const d=this.children;let u=this.children||[];if(this.expanded){if(this===a){try{u=await this._tree.resolveChildren(this)||[]}catch{u=[]}if(h?.isCancellationRequested)return;if(!this.expanded){if(this.children&&this.children&&this.parent){for(let E=0;E<this.children.length;E++)this.children[E].dispose();this._children=null}return}}for(;g=s.shift();){if(!(g.indexOf(`${this.path}${o.separator}`)>-1)){g===this.path&&(g=void 0);break}const f=u?.find(c=>c.path===g);if(f){if(m.is(f)&&!f.expanded){f.isExpanded=!0;const c=await f.resolveChildrens(h);if(h?.isCancellationRequested||(c&&(s=s.filter(y=>!c.find(b=>b.includes(y)))),s.length>0&&!h?.isCancellationRequested&&(s=await f.refreshTreeNodeByPaths([...s],h,a)||[],h?.isCancellationRequested)))return}}else{if(!u||u.length===0)break;for(let c=0;c<u.length;c++){const y=u[c];if(g.indexOf(`${y.path}${o.separator}`)===0&&m.is(y)){if(!m.is(y))continue;y.isExpanded=!0;const A=await y.resolveChildrens(h);if(h?.isCancellationRequested||(A&&(s=s.filter(S=>!A.find(w=>w===S))),y.path!==g&&!s.includes(y.path)&&s.unshift(g),s.length>0&&(s=await y.refreshTreeNodeByPaths([...s],h,a)||[],h?.isCancellationRequested)))return;break}}}}if(g){if(s.unshift(g),this===a){if(d){this.shrinkBranch(this,!0);for(let c=0;c<d.length;c++){const y=d[c];y?.dispose()}}const E=[],f=new Array(u.length);this._children=Array(u.length);for(let c=0;c<u.length;c++){const y=u[c];y.id=_.getIdByPath(y.path)||y.id,this._children[c]=y,_.setIdByPath(y.path,y.id),m.is(y)&&y.expanded&&E.push(y)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let c=0;c<u.length;c++)f[c]=this._children[c].id;this._branchSize=f.length,this.setFlattenedBranch(f,!0),this.watcher.notifyDidUpdateBranch()}return this.parent!==a&&this.expandBranch(this,!0),s}else if(m.isRoot(this)){if(this.children){this.shrinkBranch(this,!0);for(let y=0;y<this.children.length;y++){const b=this.children[y];b?.dispose()}}const E=[],f=[],c=new Array(u.length);this._children=Array(u.length);for(let y=0;y<u.length;y++){const b=u[y];if(b.id=_.getIdByPath(b.path)||b.id,this._children[y]=b,_.setIdByPath(b.path,b.id),m.is(b)&&b.expanded){if(!b.children&&(await b.resolveChildrens(h),h?.isCancellationRequested))return;E.push(b)}else f.push(b)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let y=0;y<u.length;y++)c[y]=this._children[y].id;this._branchSize=c.length,this.setFlattenedBranch(c,!0);for(let y=0;y<E.length;y++){const b=E[y];b.expandBranch(b,!0),this.updateTreeNodeCache(b)}for(let y=0;y<f.length;y++){const b=f[y];this.updateTreeNodeCache(b)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this.watcher.notifyDidUpdateBranch()}else{const E=[];if(this===a){if(this.children&&this.shrinkBranch(this,!0),this.children)for(let c=0,y=this.children.length;c<y;c++)this.children[c].dispose();const f=new Array(u.length);this._children=Array(u.length);for(let c=0,y=u.length;c<y;c++){const b=u[c];b.id=_.getIdByPath(b.path)||b.id,this._children[c]=b,_.setIdByPath(b.path,b.id),m.is(b)&&b.expanded&&E.push(b),this.updateTreeNodeCache(b)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let c=0;c<u.length;c++)f[c]=this._children[c].id;this._branchSize=f.length,this.setFlattenedBranch(f);for(let c=0;c<E.length;c++){const y=E[c];y.expandBranch(y,!0)}}else for(let f=0;f<u.length;f++){const c=u[f];c.expanded&&E.push(c)}for(let f=0;f<E.length;f++){const c=E[f];c.expandBranch(c,!0)}typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),this===a&&this.expandBranch(this)}}else{if(this.children&&this.children&&this.parent){for(let E=0,f=this.children.length;E<f;E++)this.children[E].dispose();this._children=null}return}}async expandedAll(s=this.getAllCollapsedNodePath()){if(!m.isRoot(this))return;s=s.sort((a,g)=>o.pathDepth(a)-o.pathDepth(g));let h;for(;s.length>0;){h=s.pop();const a=_.getTreeNodeByPath(h);m.is(a)&&await a.setExpanded(!1,!0)}this.watcher.notifyDidUpdateBranch()}async collapsedAll(s=this.getAllExpandedNodePath()){if(!m.isRoot(this))return;s=s.sort((a,g)=>o.pathDepth(a)-o.pathDepth(g));let h;for(;s.length>0;){h=s.pop();const a=_.getTreeNodeByPath(h);m.is(a)&&a.setCollapsed(!0)}this.watcher.notifyDidUpdateBranch()}setCollapsed(s=!1){if(m.isRoot(this)||this.disposed||!this.isExpanded)return;const h=_.getGlobalTreeState(this.path);h.isExpanding||(h.loadPathCancelToken.cancel(),h.refreshCancelToken.cancel(),this._watcher.notifyWillChangeExpansionState(this,!1),this._children&&this.parent&&this.shrinkBranch(this,s),this.isExpanded=!1,_.setTreeNode(this.id,this.path,this),this._watcher.notifyDidChangeExpansionState(this,!1))}mv(s,h=this.name){const a=this.path;if(super.mv(s,h),typeof this.watchTerminator=="function"&&(this.watchTerminator(a),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)),this.children)for(let g=0;g<this.children.length;g++){const d=this.children[g];d.mv(d.parent,d.name)}}insertItem(s){if(s.parent!==this){s.mv(this,s.name);return}if(this.children){for(let f=0;f<this.children.length;f++)if(this.children[f].path===s.path){this.children[f]=s;return}}const h=1+(s instanceof m&&s.expanded?s._branchSize:0);this._children&&(this._children.push(s),this._children.sort(this._tree.sortComparator||m.defaultSortComparator)),this._branchSize+=h;let a=this;for(;!a._flattenedBranch;)a.parent&&(a=a.parent,a._branchSize+=h);if(!this._children)return;let g=this._children.indexOf(s),d;const u=this._children[g-1];u?g=a._flattenedBranch.indexOf(u.id)+(u instanceof m&&u.expanded?u._branchSize:0):g=a._flattenedBranch.indexOf(this.id),g===-1&&this._branchSize===1&&(g=0),d=g+1,a._flattenedBranch.length===0&&(d=0);let E=[s.id];return s instanceof m&&s.expanded&&s._flattenedBranch&&(E=E.concat(s._flattenedBranch),s.setFlattenedBranch(null)),a.setFlattenedBranch(l(a._flattenedBranch,d,0,E)),_.setTreeNode(s.id,s.path,s),s}unlinkItem(s,h){var a;if(!this._children)return;const g=this._children.indexOf(s);if(g===-1||!this.isItemVisibleAtRootSurface(this))return;(a=this._children)===null||a===void 0||a.splice(g,1);const d=1+(s instanceof m&&s.expanded?s._branchSize:0);this._branchSize-=d;let u=this;for(;!u._flattenedBranch;)u.parent&&(u=u.parent,u._branchSize-=d);const E=u._flattenedBranch.indexOf(s.id);E!==-1&&(s instanceof m&&s.expanded&&s.setFlattenedBranch(u._flattenedBranch.slice(E+1,E+d)),u.setFlattenedBranch(l(u._flattenedBranch,E,d)),!h&&s.parent===this&&s.mv(null))}transferItem(s,h){var a;const g=new o(s),d=g.dir.toString();if(d!==this.path)return;const u=g.base.toString(),E=(a=this._children)===null||a===void 0?void 0:a.find(b=>b.name===u);if(!E)return;const f=new o(h),c=f.dir.toString(),y=c===d?this:_.getTreeNodeByPath(c);if(!m.is(y)){this.unlinkItem(E);return}return E.mv(y,f.base.toString()),E}dispose(){if(this.watchEvents){const s=this.watchEvents.get(this.path);s&&s.terminator(),this.watchEvents.clear()}this._children&&(this.isExpanded=!1,this._children.forEach(s=>{s.dispose()}),this._children=null,this._flattenedBranch=null),super.dispose()}setFlattenedBranch(s,h){this._flattenedBranch=s,m.isRoot(this)&&!h&&this.watcher.notifyDidUpdateBranch()}expandBranch(s,h){if(this!==s&&s._flattenedBranch&&(this._branchSize+=s._branchSize),this!==s&&this._flattenedBranch){const a=this._flattenedBranch.indexOf(s.id)+1;if(a===0)return;this.setFlattenedBranch(l(this._flattenedBranch,a,0,s._flattenedBranch),h),s.setFlattenedBranch(null,h)}else this.parent&&this.parent.expandBranch(s,h)}shrinkBranch(s,h){if(this!==s&&(this._branchSize-=s._branchSize),this!==s&&this._flattenedBranch){const a=this._flattenedBranch.indexOf(s.id)+1;if(a===0)return;s.setFlattenedBranch(this._flattenedBranch.slice(a,a+s._branchSize),h),this.setFlattenedBranch(l(this._flattenedBranch,a,s._flattenedBranch?s._flattenedBranch.length:0),h)}else this.parent&&this.parent.shrinkBranch(s,h)}async hardReloadChildren(s){let h;const a=this.path;try{h=await this._tree.resolveChildren(this)||[]}catch{h=[]}if(!this.expanded||s?.isCancellationRequested)return!1;this.path!==a&&_.setGlobalTreeState(a,{isExpanding:!1,isLoadingPath:!1,isRefreshing:!1});const g=[],d=new Array(h.length),u=new Array(h.length);for(let E=0;E<h.length;E++){const f=h[E];if(f.id=_.getIdByPath(f.path)||f.id,u[E]=f,_.setIdByPath(f.path,f.id),m.is(f)&&f.expanded){if(f.children||await f.resolveChildrens(s),s?.isCancellationRequested)return!1;g.push(f)}}u.sort(this._tree.sortComparator||m.defaultSortComparator);for(let E=0;E<h.length;E++)d[E]=u[E].id;if(this.children&&this.shrinkBranch(this),this.children)for(let E=0;E<this.children.length;E++){const f=this.children[E];f?.dispose()}for(let E=0;E<u.length;E++)this.updateTreeNodeCache(u[E]);this._children=u,this._branchSize=d.length,this.setFlattenedBranch(d);for(let E=0;E<g.length;E++){const f=g[E];f.expandBranch(f,!0)}return typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),!0}moveNode(s,h){if(typeof s!="string")throw new TypeError("Expected oldPath to be a string");if(typeof h!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(s))throw new TypeError("oldPath must be absolute");if(o.isRelative(h))throw new TypeError("newPath must be absolute");return this.transferItem(s,h)}addNode(s){if(!_.is(s))throw new TypeError("Expected node to be a TreeNode");return this.insertItem(s)}removeNode(s){const h=new o(s),a=h.dir.toString(),g=h.base.toString();if(a===this.path&&this.children){const d=this.children.find(u=>u.name===g);d&&this.unlinkItem(d)}}async refresh(s,h){if(!m.isRoot(this))return await this.root.refresh(s,this);const a=_.getGlobalTreeState(this.path);if(a.isLoadingPath||a.isExpanding)return;let g;if(s&&!s.token.isCancellationRequested)_.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:s}),g=s.token;else if(a.refreshCancelToken.token.isCancellationRequested){const d=new n.CancellationTokenSource;_.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:d}),g=d.token}else g=a.refreshCancelToken.token;this.toRefreshPathQueue.add((h||this).path),await this.refreshThrottler.trigger(()=>this.doRefresh(g)),_.setGlobalTreeState(this.path,{isRefreshing:!1})}async doRefresh(s){const h=this.getRefreshNode()||this;if(!m.is(h))return;const a=h.getAllExpandedNodePath();await h.refreshTreeNodeByPaths(a,s,h)}getRefreshNode(){let s=Array.from(this.toRefreshPathQueue);if(this.toRefreshPathQueue.clear(),!s.length)return this.root;if(s=s.sort((g,d)=>{const u=o.pathDepth(g),E=o.pathDepth(d);return u-E}),s.length===1||o.pathDepth(s[0])===1)return _.getTreeNodeByPath(s[0]);const h=s.map(g=>new o(g));let a=h[0];for(let g=1,d=h.length;g<d;g++)if(!a.isEqualOrParent(h[g]))for(;!a.isRoot&&(a=a.dir,!(!a||a.isEqualOrParent(h[g]))););return a?_.getTreeNodeByPath(a.toString()):this.root}isItemVisibleAtRootSurface(s){let h=s;for(;h.parent;)h=h.parent;return h.isItemVisibleAtSurface(s)}isItemVisibleAtSurface(s){return s===this?!0:!!this._flattenedBranch&&this._flattenedBranch.indexOf(s.id)>-1}transformToRelativePath(s){const{splitPath:h}=o,a=h(s);return a.shift(),a}async loadTreeNodeByPath(s,h=!1){if(!m.isRoot(this))return;const a=_.getGlobalTreeState(this.path);if(a.isExpanding)return;a.refreshCancelToken.cancel(),a.loadPathCancelToken.cancel();const g=new n.CancellationTokenSource;_.setGlobalTreeState(this.path,{isLoadingPath:!0,loadPathCancelToken:g});const d=g.token,u=[],{splitPath:E,isRelative:f}=o,c=f(s)?E(s):this.transformToRelativePath(s);if(c.length===0)return _.setGlobalTreeState(this.path,{isLoadingPath:!1}),this;if(this.children||await this.ensureLoaded(d),d.isCancellationRequested){_.setGlobalTreeState(this.path,{isLoadingPath:!1});return}let y=this._children,b,A="",S;for(;y&&(S=c.shift());){let w=y.find(I=>I.name.indexOf(S)===0);if(w){if(m.is(w)){if(w._watcher.notifyWillChangeExpansionState(w,!0),w.isExpanded=!0,!w.children&&(await w.resolveChildrens(d),d.isCancellationRequested)){_.setGlobalTreeState(this.path,{isLoadingPath:!1});return}u.push(w),w._watcher.notifyDidChangeExpansionState(w,!0)}if(c.length===0){b=w;break}}if(!w&&b){const I=E(b.name).slice(1);if(I[0]===S){for(I.shift();I.length>0&&I[0]===c[0];)I.shift(),c.shift();S=c.shift(),w=y.find(D=>D.name.indexOf(S)===0)}}if(!w||!m.is(w)&&c.length>0)break;if(m.is(w)){if(w.name.indexOf(o.separator)>0){const D=E(w.name).slice(1);for(;D.length>0&&D[0]===c[0];)D.shift(),c.shift()}if(!w._children&&(A=w.path,m.is(w))){if(w.isExpanded=!0,!w.children&&(await w.resolveChildrens(d),d.isCancellationRequested)){_.setGlobalTreeState(this.path,{isLoadingPath:!1});return}u.push(w)}if(w&&c.length===0){b=w;break}else{if(A&&A!==w.path){const D=E(A),T=E(w.path);T.length>D.length&&c.splice(0,T.length-D.length)}y=w._children,b=w}}}if(b){let w;if(b.disposed){_.setGlobalTreeState(this.path,{isLoadingPath:!1});return}for(;w=u.pop();)w.expandBranch(w,!0),u.length===0&&this.updateTreeNodeCache(w);return h||this.watcher.notifyDidUpdateBranch(),_.setGlobalTreeState(this.path,{isLoadingPath:!1}),b}_.setGlobalTreeState(this.path,{isLoadingPath:!1})}getIndexAtTreeNodeId(s){return this._flattenedBranch?this._flattenedBranch.indexOf(s):-1}getIndexAtTreeNode(s){return this._flattenedBranch?this._flattenedBranch.indexOf(s.id):-1}getTreeNodeAtIndex(s){var h;const a=(h=this._flattenedBranch)===null||h===void 0?void 0:h[s];if(a)return _.getTreeNodeById(a)}getTreeNodeById(s){return _.getTreeNodeById(s)}getTreeNodeByPath(s){return _.getTreeNodeByPath(s)}}t.CompositeTreeNode=m,m.REFRESH_DELAY=200},58781:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeDecoration=t.ChangeReason=t.CompositeDecorationType=t.ClasslistComposite=void 0;const n=e(70392),r=e(96336);class o{constructor(p,s){this.addChangeListener=p,this.removeChangeListener=s}}t.ClasslistComposite=o;var l;(function(m){m[m.Applicable=1]="Applicable",m[m.Inheritable=2]="Inheritable"})(l||(t.CompositeDecorationType=l={}));var v;(function(m){m[m.UnTargetDecoration=1]="UnTargetDecoration",m[m.TargetDecoration=2]="TargetDecoration"})(v||(t.ChangeReason=v={}));class _{constructor(p,s,h){this.handleDecorationDidAddClassname=a=>{const{classname:g}=a;!this.selfOwned||!g||(this.compositeCssClasslist.classlist.push(g),this.notifyClasslistChange())},this.handleDecorationDidRemoveClassname=a=>{const{classname:g}=a;if(!this.selfOwned||!g)return;const d=this.compositeCssClasslist.classlist.indexOf(g);d>-1&&(this.compositeCssClasslist.classlist.splice(d,1),this.notifyClasslistChange())},this.mergeDecorationClasslist=a=>{const{decoration:g}=a;this.selfOwned&&(this.compositeCssClasslist.classlist.push(...g.cssClassList),this.notifyClasslistChange())},this.handleDecorationDisable=a=>{const{decoration:g}=a;this.removeDecorationClasslist(g)},this.target=p,this.type=s,this.linkedComposites=new Set,this.classlistChangeCallbacks=new Set,this.compositeCssClasslist=new o(this.classlistChangeCallbacks.add.bind(this.classlistChangeCallbacks),this.classlistChangeCallbacks.delete.bind(this.classlistChangeCallbacks)),h?(this.selfOwned=!1,this.parent=h,this.renderedDecorations=h.renderedDecorations,this.compositeCssClasslist.classlist=h.compositeCssClasslist.classlist,h.linkedComposites.add(this)):(this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set,this.compositeCssClasslist.classlist=[],this.selfOwned=!0)}changeParent(p){if(p){if(!this.selfOwned)return this.parentOwn(p);for(const[s]of this.renderedDecorations)this.recursiveRefresh(this,!1,v.UnTargetDecoration,s,!1);this.parent!==p&&(this.parent.linkedComposites.delete(this),this.parent=p,p.linkedComposites.add(this));for(const[s]of p.renderedDecorations)this.recursiveRefresh(this,!1,v.TargetDecoration,s,!1)}}add(p){const s=p.appliedTargets.get(this.target),h=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),a=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===l.Applicable&&!h)&&!(this.type===l.Inheritable&&!a)){if(!this.selfOwned){this.selfOwn(v.TargetDecoration,p),this.targetedDecorations.add(p);return}this.targetedDecorations.has(p)||(this.targetedDecorations.add(p),this.recursiveRefresh(this,!1,v.TargetDecoration,p))}}remove(p){if(this.selfOwned&&this.targetedDecorations.delete(p)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn(void 0,v.UnTargetDecoration,p);this.recursiveRefresh(this,!1,v.UnTargetDecoration,p)}}negate(p){const s=p.negatedTargets.get(this.target),h=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),a=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===l.Applicable&&!h)&&!(this.type===l.Inheritable&&!a)){if(!this.selfOwned){this.selfOwn(v.UnTargetDecoration,p),this.negatedDecorations.add(p);return}this.negatedDecorations.has(p)||(this.negatedDecorations.add(p),this.renderedDecorations.has(p)&&this.removeDecorationClasslist(p))}}unNegate(p){if(this.selfOwned&&this.negatedDecorations.delete(p)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn();!this.renderedDecorations.has(p)&&(this.parent.renderedDecorations.has(p)||p.appliedTargets.has(this.target))&&this.recursiveRefresh(this,!1,v.TargetDecoration,p)}}selfOwn(p,s){if(this.selfOwned)throw new Error("CompositeDecoration is already self owned");const h=this.parent;this.selfOwned=!0,this.compositeCssClasslist.classlist=[],this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set;for(const[a]of h.renderedDecorations)a!==s&&this.processCompositeAlteration(v.TargetDecoration,a);p===v.UnTargetDecoration&&this.parent.renderedDecorations.has(s)&&!this.renderedDecorations.has(s)&&this.notifyClasslistChange(!1),this.recursiveRefresh(this,!0,p,s)}parentOwn(p,s,h){this.selfOwned=!1,this.targetedDecorations&&this.targetedDecorations.clear(),this.negatedDecorations&&this.negatedDecorations.clear(),p&&this.parent!==p&&(this.parent&&this.parent.linkedComposites.delete(this),p.linkedComposites.add(this),this.parent=p),this.recursiveRefresh(this,!0,s,h)}processCompositeAlteration(p,s){if(!this.selfOwned)throw new Error("CompositeDecoration is not self owned");if(p===v.UnTargetDecoration){const h=this.renderedDecorations.get(s);if(h){const a=s.appliedTargets.get(this.target),g=a&&(a===r.TargetMatchMode.Self||a===r.TargetMatchMode.SelfAndChildren),d=a&&(a===r.TargetMatchMode.Children||a===r.TargetMatchMode.SelfAndChildren);return g&&this.type===l.Applicable||d&&this.type===l.Inheritable?!1:(this.removeDecorationClasslist(s,!1),h&&h.dispose(),this.renderedDecorations.delete(s))}return!1}if(p===v.TargetDecoration){const h=s.negatedTargets.get(this.target),a=h&&(h===r.TargetMatchMode.Self||h===r.TargetMatchMode.SelfAndChildren),g=h&&(h===r.TargetMatchMode.Children||h===r.TargetMatchMode.SelfAndChildren);if(a&&this.type===l.Applicable||g&&this.type===l.Inheritable)return!1;if(!this.renderedDecorations.has(s)){const d=new n.DisposableCollection;return d.push(s.onDidAddCSSClassname(this.handleDecorationDidAddClassname)),d.push(s.onDidRemoveCSSClassname(this.handleDecorationDidRemoveClassname)),d.push(s.onDidDisableDecoration(this.handleDecorationDisable)),d.push(s.onDidEnableDecoration(this.mergeDecorationClasslist)),this.renderedDecorations.set(s,d),s.disabled?!1:(this.compositeCssClasslist.classlist.push(...s.cssClassList),!0)}}return!1}recursiveRefresh(p,s,h,a,g=!0){if(!this.selfOwned&&s&&(this.renderedDecorations=this.parent.renderedDecorations,this.compositeCssClasslist.classlist=this.parent.compositeCssClasslist.classlist),this.selfOwned&&s&&p!==this){for(const[d]of this.renderedDecorations)this.processCompositeAlteration(v.UnTargetDecoration,d);for(const[d]of this.parent.renderedDecorations)this.processCompositeAlteration(v.TargetDecoration,d);g&&this.notifyClasslistChange(!1)}else this.selfOwned&&h===v.UnTargetDecoration&&a&&this.renderedDecorations.has(a)?(this.processCompositeAlteration(h,a),g&&this.notifyClasslistChange(!1)):this.selfOwned&&h===v.TargetDecoration&&a&&this.processCompositeAlteration(h,a)&&g?this.notifyClasslistChange(!1):!this.selfOwned&&g&&this.notifyClasslistChange(!1);for(const d of this.linkedComposites)d.recursiveRefresh(p,s,h,a,g)}removeDecorationClasslist(p,s=!0){if(this.selfOwned){for(const h of p.cssClassList){const a=this.compositeCssClasslist.classlist.indexOf(h);a>-1&&this.compositeCssClasslist.classlist.splice(a,1)}s&&this.notifyClasslistChange()}}notifyClasslistChange(p=!0){for(const s of[...this.classlistChangeCallbacks])s();if(p)for(const s of this.linkedComposites)s.selfOwned||s.notifyClasslistChange()}}t.CompositeDecoration=_},96336:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Decoration=t.TargetMatchMode=void 0;const n=e(70392),r=e(26353);var o;(function(v){v[v.None=1]="None",v[v.Self=2]="Self",v[v.Children=3]="Children",v[v.SelfAndChildren=4]="SelfAndChildren"})(o||(t.TargetMatchMode=o={}));class l{constructor(..._){if(this._appliedTargets=new Map,this._negatedTargets=new Map,this._disabled=!1,this.appliedTargetsDisposables=new WeakMap,this.negatedTargetsDisposables=new WeakMap,this.onDidAddCSSClassnameEmitter=new n.Emitter,this.onDidRemoveCSSClassnameEmitter=new n.Emitter,this.onDidDisableDecorationEmitter=new n.Emitter,this.onDidEnableDecorationEmitter=new n.Emitter,this.onDidAddTargetEmitter=new n.Emitter,this.onDidRemoveTargetEmitter=new n.Emitter,this.onDidNegateTargetEmitter=new n.Emitter,this.onDidUnNegateTargetEmitter=new n.Emitter,Array.isArray(_))if(_.every(m=>typeof m=="string"))this._cssClassList=new Set(_);else throw new TypeError("classlist must be of type `Array<string>`");else this._cssClassList=new Set}get disabled(){return this._disabled}set disabled(_){this._disabled=_,_?this.onDidDisableDecorationEmitter.fire({decoration:this}):this.onDidEnableDecorationEmitter.fire({decoration:this})}get appliedTargets(){return this._appliedTargets}get negatedTargets(){return this._negatedTargets}get cssClassList(){return this._cssClassList}get onDidAddCSSClassname(){return this.onDidAddCSSClassnameEmitter.event}get onDidRemoveCSSClassname(){return this.onDidRemoveCSSClassnameEmitter.event}get onDidDisableDecoration(){return this.onDidDisableDecorationEmitter.event}get onDidEnableDecoration(){return this.onDidEnableDecorationEmitter.event}get onDidAddTarget(){return this.onDidAddTargetEmitter.event}get onDidRemoveTarget(){return this.onDidRemoveTargetEmitter.event}get onDidNegateTarget(){return this.onDidNegateTargetEmitter.event}get onDidUnNegateTarget(){return this.onDidUnNegateTargetEmitter.event}addCSSClass(_){this._cssClassList.has(_)||(this._cssClassList.add(_),this.onDidAddCSSClassnameEmitter.fire({decoration:this,classname:_}))}removeCSSClass(_){this._cssClassList.has(_)&&(this._cssClassList.delete(_),this.onDidRemoveCSSClassnameEmitter.fire({decoration:this,classname:_}))}hasTarget(_){return!!this._appliedTargets.get(_)}addTarget(_,m=o.Self){if(this._appliedTargets.get(_)===m||!r.TreeNode.is(_))return;this._appliedTargets.set(_,m);const s=n.Disposable.create(()=>{this.removeTarget(_)});return this.appliedTargetsDisposables.set(_,s),this.onDidAddTargetEmitter.fire({decoration:this,target:_}),s}removeTarget(_){if(this._appliedTargets.delete(_)){const m=this.appliedTargetsDisposables.get(_);m&&m.dispose(),this.onDidRemoveTargetEmitter.fire({decoration:this,target:_})}}clearAppliedTarget(){const _=Array.from(this._appliedTargets.keys());for(const m of _)this.removeTarget(m)}clearNegateTarget(){const _=Array.from(this._negatedTargets.keys());for(const m of _)this.unNegateTarget(m)}negateTarget(_,m=o.Self){if(this._negatedTargets.get(_)===m||!r.TreeNode.is(_))return;this._negatedTargets.set(_,m);const s=n.Disposable.create(()=>{this.unNegateTarget(_)});return this.negatedTargetsDisposables.set(_,s),this.onDidNegateTargetEmitter.fire({decoration:this,target:_}),s}unNegateTarget(_){if(this._negatedTargets.delete(_)){const m=this.negatedTargetsDisposables.get(_);m&&m.dispose(),this.onDidUnNegateTargetEmitter.fire({decoration:this,target:_})}}}t.Decoration=l},29701:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationsManager=void 0;const n=e(70392),r=e(34054),o=e(26353),l=e(58781);class v{constructor(m){this.root=m,this.decorations=new Map,this.decorationsMeta=new WeakMap,this.disposables=new n.DisposableCollection,this.disposed=!1,this.targetDecoration=p=>{const{decoration:s,target:h}=p,a=this.getDecorationData(h);if(a){const{applicable:g,inheritable:d}=a;g.add(s),d&&d.add(s)}},this.updateTarget=()=>{for(const[p]of this.decorations)for(const[s,h]of Array.from(p.appliedTargets)){p.removeTarget(s);const a=this.root.getTreeNodeByPath(s.path);a&&p.addTarget(a,h)}},this.unTargetDecoration=p=>{const{decoration:s,target:h}=p,a=this.getDecorationData(h);if(a){const{applicable:g,inheritable:d}=a;g.remove(s),d&&d.remove(s)}},this.negateDecoration=p=>{const{decoration:s,target:h}=p,a=this.getDecorationData(h);if(a){const{applicable:g,inheritable:d}=a;g.negate(s),d&&d.negate(s)}},this.unNegateDecoration=p=>{const{decoration:s,target:h}=p,a=this.getDecorationData(h);if(a){const{applicable:g,inheritable:d}=a;g.unNegate(s),d&&d.unNegate(s)}},this.switchParent=(p,s,h)=>{const a=this.decorationsMeta.get(p);if(!a)return;const g=this.getDecorationData(h);g&&(a.applicable.changeParent(g.inheritable),a.inheritable&&a.inheritable.changeParent(g.inheritable))},this.decorationsMeta.set(m,{applicable:new l.CompositeDecoration(m,l.CompositeDecorationType.Applicable),inheritable:new l.CompositeDecoration(m,l.CompositeDecorationType.Inheritable)}),this.disposables.push(m.watcher.on(r.TreeNodeEvent.DidChangeParent,this.switchParent)),this.disposables.push(m.watcher.on(r.TreeNodeEvent.DidDispose,p=>this.decorationsMeta.delete(p))),this.disposables.push(m.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.updateTarget))}dispose(){for(const[m]of this.decorations)this.removeDecoration(m);this.disposables.dispose(),this.disposed=!0}addDecoration(m){if(this.disposed)throw new Error("DecorationManager disposed");if(this.decorations.has(m))return;const p=new n.DisposableCollection;p.push(m.onDidAddTarget(this.targetDecoration)),p.push(m.onDidRemoveTarget(this.unTargetDecoration)),p.push(m.onDidNegateTarget(this.negateDecoration)),p.push(m.onDidUnNegateTarget(this.unNegateDecoration)),this.decorations.set(m,p);for(const[s]of m.appliedTargets)this.targetDecoration({decoration:m,target:s});for(const[s]of m.negatedTargets)this.negateDecoration({decoration:m,target:s})}removeDecoration(m){const p=this.decorations.get(m);if(p){for(const[s]of m.appliedTargets){const h=this.decorationsMeta.get(s);h&&(h.applicable.remove(m),h.inheritable&&h.inheritable.remove(m))}for(const[s]of m.negatedTargets){const h=this.decorationsMeta.get(s);h&&(h.applicable.unNegate(m),h.inheritable&&h.inheritable.unNegate(m))}p.dispose(),this.decorations.delete(m)}}getDecorations(m){if(!m||!o.TreeNode.is(m))return;const p=this.getDecorationData(m);if(p)return p.applicable.compositeCssClasslist}getDecorationData(m){if(this.disposed)return;const p=this.decorationsMeta.get(m);if(p)return p;if(!m||!m.parent)return;const s=this.getDecorationData(m.parent);if(s){const h={applicable:new l.CompositeDecoration(m,l.CompositeDecorationType.Applicable,s.inheritable),inheritable:o.CompositeTreeNode.is(m)?new l.CompositeDecoration(m,l.CompositeDecorationType.Inheritable,s.inheritable):void 0};return this.decorationsMeta.set(m,h),h}}}t.DecorationsManager=v},24936:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(96336),t),n.__exportStar(e(29701),t),n.__exportStar(e(58781),t)},43685:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(29805),t),n.__exportStar(e(26353),t),n.__exportStar(e(58615),t),n.__exportStar(e(24936),t)},13674:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeModel=void 0;const n=e(70392),r=e(34054),o=e(70609);class l{constructor(){this.onChangeEmitter=new n.Emitter,this.dispatchChange=()=>{this.onChangeEmitter.fire()}}get onChange(){return this.onChangeEmitter.event}get ensureReady(){return this._ensureReady}get root(){return this._root}set root(_){this._root=_,this.initState(_),this.root&&(this._ensureReady=this.root.ensureLoaded())}get state(){return this._state}set state(_){this._state=_}init(_){this.root=_,this.root.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.dispatchChange)}initState(_){this.state=new o.TreeStateManager(_)}loadTreeState(_){return typeof _=="string"&&(_=JSON.parse(_)),this.state.loadTreeState(_)}getTreeStateWatcher(_=!1){return new o.TreeStateWatcher(this.state,_)}resolveChildren(_){return Promise.resolve(Array.from(_.children))}}t.TreeModel=l},58615:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(13674),t)},12165:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateManager=t.Operation=void 0;const n=e(70392),r=e(34054),o=e(26353),{Path:l}=n.path;var v;(function(p){p[p.SetExpanded=1]="SetExpanded",p[p.SetCollapsed=2]="SetCollapsed",p[p.SetActive=3]="SetActive"})(v||(t.Operation=v={}));var _;(function(p){p[p.Expanded=1]="Expanded",p[p.Collapsed=2]="Collapsed",p[p.Disabled=4]="Disabled"})(_||(_={}));class m{constructor(s){this.expandedDirectories=new Map,this._scrollOffset=0,this.stashing=!1,this.stashLockingItems=new Set,this.onDidLoadStateEmitter=new n.Emitter,this.onChangeScrollOffsetEmitter=new n.Emitter,this.onDidChangeExpansionStateEmitter=new n.Emitter,this.onDidChangeRelativePathEmitter=new n.Emitter,this.handleExpansionChange=(h,a,g)=>{var d;if(this.stashing&&this.stashKeyframes&&this.stashKeyframes.set(h.id,a?_.Expanded:_.Collapsed),this.stashKeyframes&&!this.stashing){if(a){let E=h;for(;E;){if(this.stashKeyframes.has(E.id)){let f=this.stashKeyframes.get(E.id);f=f|_.Disabled,this.stashKeyframes.set(E.id,f)}E=E.parent}this.stashLockingItems.add(h)}if(this.stashLockingItems&&this.stashLockingItems.has(h)&&!a){let E=h;for(;E;){if(this.stashKeyframes.has(E.id)){let f=this.stashKeyframes.get(E.id);f&=~_.Disabled,this.stashKeyframes.set(E.id,f)}E=E.parent}this.stashLockingItems.delete(h)}}let u=this.expandedDirectories.get(h);a&&!u?(u=(d=new l(this.root.path).relative(new l(h.path)))===null||d===void 0?void 0:d.toString(),this.expandedDirectories.set(h,u),this.onDidChangeExpansionStateEmitter.fire({relativePath:u,isExpanded:a,isVisibleAtSurface:g})):!a&&u&&(this.expandedDirectories.delete(h),this.onDidChangeExpansionStateEmitter.fire({relativePath:u,isExpanded:a,isVisibleAtSurface:g}))},this.handleDidChangePath=h=>{var a;if(this.expandedDirectories.has(h)){const g=this.expandedDirectories.get(h),d=(a=new l(this.root.path).relative(new l(h.path)))===null||a===void 0?void 0:a.toString();this.expandedDirectories.set(h,d),this.onDidChangeRelativePathEmitter.fire({prevPath:g,newPath:d})}},this.root=s,this.root.watcher.on(r.TreeNodeEvent.DidChangeExpansionState,this.handleExpansionChange),this.root.watcher.on(r.TreeNodeEvent.DidChangePath,this.handleDidChangePath)}get scrollOffset(){return this._scrollOffset}saveScrollOffset(s){this._scrollOffset=s,this.onChangeScrollOffsetEmitter.fire(s)}get onDidLoadState(){return this.onDidLoadStateEmitter.event}get onChangeScrollOffset(){return this.onChangeScrollOffsetEmitter.event}get onDidChangeExpansionState(){return this.onDidChangeExpansionStateEmitter.event}get onDidChangeRelativePath(){return this.onDidChangeRelativePathEmitter.event}async loadTreeState(s){if(s){for(const h of s.expandedDirectories.buried)try{const a=await this.root.loadTreeNodeByPath(h);if(!a)break;a&&o.CompositeTreeNode.is(a)&&a.setCollapsed()}catch{}for(const h of s.expandedDirectories.atSurface)try{if(!await this.root.loadTreeNodeByPath(h,!0))break}catch{}this._scrollOffset=typeof s.scrollPosition=="number"&&s.scrollPosition>-1?s.scrollPosition:this._scrollOffset,this.root.watcher.notifyDidUpdateBranch(),this.onDidLoadStateEmitter.fire()}}excludeFromStash(s){this.stashKeyframes&&!this.stashing&&this.handleExpansionChange(o.CompositeTreeNode.is(s)?s:s.parent,!0,this.root.isItemVisibleAtSurface(s))}beginStashing(){this.stashing=!0,this.stashKeyframes=new Map}endStashing(){this.stashing=!1,this.stashLockingItems.clear()}async reverseStash(){if(!this.stashKeyframes)return;this.endStashing();const s=Array.from(this.stashKeyframes);this.stashKeyframes=null;for(const[h,a]of s){const g=(a&_.Disabled)===_.Disabled,d=o.TreeNode.getTreeNodeById(h);!d||g||((a&_.Expanded)===_.Expanded?d.setCollapsed():(a&_.Collapsed)===_.Collapsed&&await d.setExpanded())}}}t.TreeStateManager=m},72782:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=void 0;const n=e(70392),r=e(13440);class o{constructor(v,_=!1){this._disposed=!1,this.disposables=new n.DisposableCollection,this.onDidTreeStateChangeEmitter=new n.Emitter,this.currentState={specVersion:1,scrollPosition:0,expandedDirectories:{atSurface:[],buried:[]}},this.disposables.push(v.onChangeScrollOffset(m=>{this.currentState.scrollPosition=m,this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.ScrollOffset)})),this.disposables.push(v.onDidChangeRelativePath(({prevPath:m,newPath:p})=>{let s=!1;const h=new Set(this.currentState.expandedDirectories.atSurface);if(h.has(m)&&(h.delete(m),h.add(p),s=!0),this.currentState.expandedDirectories.atSurface=Array.from(h),_){const a=new Set(this.currentState.expandedDirectories.buried);a.has(m)&&(h.delete(m),h.add(p),s=!0),this.currentState.expandedDirectories.buried=Array.from(a)}s&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.PathsUpdated)})),this.disposables.push(v.onDidChangeExpansionState(({relativePath:m,isExpanded:p,isVisibleAtSurface:s})=>{let h=!1;const a=new Set(this.currentState.expandedDirectories.atSurface),g=new Set(this.currentState.expandedDirectories.buried);if(a.has(m)&&(!p||!s)){a.delete(m);const u=Array.from(a).filter(E=>E.indexOf(m)>=0);for(const E of u)a.delete(E),g.has(E)||g.add(E);h=!0}else p&&s&&(a.add(m),h=!0);this.currentState.expandedDirectories.atSurface=Array.from(a),_||(g.has(m)&&(!p||s)?(g.delete(m),h=!0):p&&!s&&(g.add(m),h=!0),this.currentState.expandedDirectories.buried=Array.from(g)),h&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.DirExpansionState)}))}get onDidChange(){return this.onDidTreeStateChangeEmitter.event}dispose(){this._disposed||(this._disposed=!0,this.disposables.dispose())}snapshot(){return{...this.currentState,expandedDirectories:{atSurface:this.currentState.expandedDirectories.atSurface.slice(),buried:this.currentState.expandedDirectories.buried.slice()}}}toString(){return JSON.stringify(this.currentState)}}t.TreeStateWatcher=o},70609:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=t.TreeStateManager=void 0;var n=e(12165);Object.defineProperty(t,"TreeStateManager",{enumerable:!0,get:function(){return n.TreeStateManager}});var r=e(72782);Object.defineProperty(t,"TreeStateWatcher",{enumerable:!0,get:function(){return r.TreeStateWatcher}})},13440:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcherChangeType=t.TreeStateEvent=void 0;var e;(function(r){r[r.DidChangeScrollOffset=1]="DidChangeScrollOffset",r[r.DidChangeDirExpansionState=2]="DidChangeDirExpansionState",r[r.DidChangeRelativePath=3]="DidChangeRelativePath",r[r.DidChange=4]="DidChange",r[r.DidLoadState=5]="DidLoadState"})(e||(t.TreeStateEvent=e={}));var n;(function(r){r[r.ScrollOffset=1]="ScrollOffset",r[r.DirExpansionState=2]="DirExpansionState",r[r.PathsUpdated=3]="PathsUpdated"})(n||(t.TreeStateWatcherChangeType=n={}))},34054:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79632),t),n.__exportStar(e(32281),t),n.__exportStar(e(3754),t)},32281:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeNodeType=void 0;var e;(function(n){n[n.TreeNode=1]="TreeNode",n[n.CompositeTreeNode=2]="CompositeTreeNode",n[n.NewPrompt=3]="NewPrompt",n[n.RenamePrompt=4]="RenamePrompt"})(e||(t.TreeNodeType=e={}))},79632:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3754:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataChangeType=t.WatchEvent=t.TreeNodeEvent=void 0;var e;(function(o){o[o.WillChangeExpansionState=1]="WillChangeExpansionState",o[o.DidChangeExpansionState=2]="DidChangeExpansionState",o[o.WillChangeParent=3]="WillChangeParent",o[o.DidChangeParent=4]="DidChangeParent",o[o.DidDispose=5]="DidDispose",o[o.BranchDidUpdate=6]="BranchDidUpdate",o[o.DidChangePath=7]="DidChangePath",o[o.DidProcessWatchEvent=8]="DidProcessWatchEvent",o[o.WillProcessWatchEvent=9]="WillProcessWatchEvent",o[o.DidChangeMetadata=10]="DidChangeMetadata",o[o.DidResolveChildren=11]="DidResolveChildren",o[o.WillResolveChildren=12]="WillResolveChildren"})(e||(t.TreeNodeEvent=e={}));var n;(function(o){o[o.Added=1]="Added",o[o.Removed=2]="Removed",o[o.Changed=3]="Changed",o[o.Moved=4]="Moved"})(n||(t.WatchEvent=n={}));var r;(function(o){o[o.Added=1]="Added",o[o.Updated=2]="Updated",o[o.Removed=3]="Removed"})(r||(t.MetadataChangeType=r={}))},77011:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollbarsVirtualList=t.Scrollbars=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(97331)),l=n.__importStar(e(14041)),v=e(70392),_=e(56875);e(93324);const m=({onScroll:p,onUpdate:s,forwardedRef:h,style:a,children:g,className:d,onReachBottom:u,tabBarMode:E,thumbSize:f=5,hiddenVertical:c,hiddenHorizontal:y,universal:b=!1})=>{const A=(0,l.useRef)(new v.DisposableCollection),S=(0,l.useRef)(),w=(0,l.useCallback)(M=>{M?(S.current=M.view,h&&(typeof h=="function"?h(M.view):h.current=M.view)):h&&typeof h=="function"&&h(null)},[]),I=(0,l.useRef)(),D=(0,l.useRef)(),T=(0,l.useCallback)(M=>{if(!M)return;const{scrollTop:O,scrollHeight:x,clientHeight:k}=M;if(x===0&&k===0)return;(O+100)/(x-k)>1&&u&&u()},[u]),R=(0,l.useCallback)((0,o.default)(M=>{if(!M)return;const{scrollTop:O,scrollLeft:x}=M,k=1/20*Math.min(O,20),F=1/20*Math.min(x,20);I.current&&(I.current.style.opacity=String(F)),D.current&&(D.current.style.opacity=String(k)),T(M),s&&s(M)},100),[s,T,I.current,D.current]);return(0,l.useEffect)(()=>{const M=O=>{S.current&&(O.preventDefault(),O.stopPropagation(),S.current.clientHeight>=S.current.scrollHeight&&(O.deltaY!==0&&(S.current.scrollLeft+=O.deltaY),O.deltaX!==0&&(S.current.scrollLeft+=O.deltaX)))};return E&&S.current&&S.current.addEventListener("wheel",M,{passive:!0}),()=>{var O;(O=S.current)===null||O===void 0||O.removeEventListener("wheel",M)}},[S.current,E]),(0,l.useEffect)(()=>()=>A.current.dispose(),[]),l.default.createElement(_.Scrollbars,{ref:w,style:{...a,overflow:"hidden"},className:(0,r.default)(d,"kt-scrollbar"),onUpdate:R,onScroll:p,universal:b,renderTrackHorizontal:({style:M,...O})=>{const x={...M,height:f,left:0,right:0,bottom:1};return y&&(x.display="none"),l.default.createElement("div",{...O,style:x})},renderTrackVertical:({style:M,...O})=>{const x={...M,width:f,top:0,right:1,bottom:0};return c&&(x.display="none"),l.default.createElement("div",{...O,style:x})},renderThumbVertical:({style:M,className:O,...x})=>{const k={...M,width:f};return c&&(k.display="none"),l.default.createElement("div",{...x,style:k,className:(0,r.default)(O,"scrollbar-thumb-vertical")})},renderThumbHorizontal:({style:M,className:O,...x})=>{const k={...M,height:f,display:"none"};return y&&(k.display="none"),l.default.createElement("div",{...x,style:k,className:(0,r.default)(O,"scrollbar-thumb-horizontal")})}},!c&&l.default.createElement("div",{ref:M=>{I.current=M},className:"scrollbar-decoration-vertical"}),!y&&l.default.createElement("div",{ref:M=>{D.current=M},className:"scrollbar-decoration-horizontal"}),g)};t.Scrollbars=m,t.Scrollbars.displayName="CustomScrollbars",t.ScrollbarsVirtualList=l.default.forwardRef((p,s)=>l.default.createElement(t.Scrollbars,{...p,thumbSize:10,forwardedRef:s})),t.ScrollbarsVirtualList.displayName="ScrollbarsVirtualList"},14640:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectOptionsList=t.Option=void 0,t.isDataOptions=a,t.isDataOptionGroups=g,t.Select=A;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(54713),v=e(50708);e(11110);const _=({value:w,children:I,disabled:D,onClick:T,className:R,...M})=>o.default.createElement("span",{...M,className:(0,r.default)(R,{"kt-option-disabled":D}),onClick:()=>T&&!D&&T(w)},I);t.Option=_;function m(...w){}function p(w,I){return I?w.props[I]:w.props.value}function s(w,I){let D=[];return Array.isArray(w)?D=o.default.Children.toArray(w).map(I):D=[I(w)],D}function h(w,I,D=(T,R)=>T===R){const R=o.default.Children.toArray(I).filter(M=>o.default.isValidElement(M)).find(M=>{var O;return M.props&&D((O=M.props)===null||O===void 0?void 0:O.value,w)?M:null});return R?.props}function a(w){return w?w.length===0?!0:d(w[0]):!1}function g(w){return w?w.length===0?!0:u(w[0]):!1}function d(w){return w.value!==void 0}function u(w){return w.groupName!==void 0&&a(w.options)}function E(w){return o.default.createElement(o.default.Fragment,null,w.data.iconClass?o.default.createElement("div",{className:(0,r.default)(w.data.iconClass,"kt-select-option-icon")}):void 0,w.data.label)}function f({group:w,index:I}){return o.default.createElement("div",{key:"header_"+I,className:"kt-select-group-header"},w.iconClass?o.default.createElement("div",{className:(0,r.default)(w.iconClass,"kt-select-option-icon")}):void 0,o.default.createElement("div",null,w.groupName))}function c(w,I){let D=I.label;if(D===void 0)try{D=I.value.toString()}catch{D=void 0}return typeof D=="string"?D.indexOf(w)!==-1:!1}const y=o.default.memo(({selected:w,selectedRenderer:I})=>I?o.default.createElement(I,{data:w}):o.default.createElement(o.default.Fragment,null,w.iconClass&&o.default.createElement("div",{className:(0,r.default)(w.iconClass,"kt-select-option-icon")}),o.default.createElement("span",{className:"kt-select-option"},w.label))),b=o.default.memo(({value:w,onChange:I,placeholder:D,size:T="default"})=>o.default.createElement(v.Input,{className:"kt-select-search",value:w,size:T,onChange:R=>I(R.target.value),autoFocus:!0,placeholder:D||""}));function A({disabled:w,options:I,size:D="default",children:T,value:R,onChange:M,onMouseEnter:O,optionLabelProp:x,style:k,optionStyle:F,className:L,maxHeight:N,equals:U=(q,be)=>q===be,optionRenderer:W=E,groupTitleRenderer:j,footerComponent:Q,headerComponent:G,showSearch:X=!1,filterOption:$=c,searchPlaceholder:V="",emptyComponent:H,selectedRenderer:K,onBeforeShowOptions:Y,allowOptionsOverflow:Z,dropdownRenderType:oe="fixed",description:ie,notMatchWarning:he,onSearchChange:me}){const[q,be]=(0,o.useState)(!1),[fe,te]=(0,o.useState)(""),ge=o.default.useRef(null),Re=o.default.useRef(null),Oe=(0,o.useCallback)(ye=>{ye.preventDefault(),ye.stopPropagation(),!(!q&&Y?.())&&be(!q)},[q,Y]),Ne=(0,o.useCallback)(()=>{var ye,Ue,Ye,He,pt,vt,Mt,dt,Dt;if(I&&a(I)){for(const Je of I)if(U(R,Je.value))return{iconClass:Je.iconClass,label:Je.label,value:Je.value};return{iconClass:(ye=I[0])===null||ye===void 0?void 0:ye.iconClass,label:(Ue=I[0])===null||Ue===void 0?void 0:Ue.label,value:(Ye=I[0])===null||Ye===void 0?void 0:Ye.value}}else if(I&&g(I)){for(const Je of I)for(const tt of Je.options)if(U(R,tt.value))return{iconClass:tt.iconClass,label:tt.label,value:tt.value};return{iconClass:(pt=(He=I[0])===null||He===void 0?void 0:He.options[0])===null||pt===void 0?void 0:pt.iconClass,label:(Mt=(vt=I[0])===null||vt===void 0?void 0:vt.options[0])===null||Mt===void 0?void 0:Mt.label,value:(Dt=(dt=I[0])===null||dt===void 0?void 0:dt.options[0])===null||Dt===void 0?void 0:Dt.value}}else{const Je=T&&h(R,T);if(Je)return{label:Je.label||Je.value,value:Je.value}}return{label:R,value:R,notMatch:!0}},[I,R,T])(),De=(0,r.default)("kt-select-options",{"kt-select-options-visible":q,[`kt-select-options-${D}`]:D}),Ce=he&&Ne.notMatch,ke=(0,r.default)("kt-select-value",{"kt-select-warning":Ce,"kt-select-disabled":w,"kt-select-value-active":q,[`kt-select-value-${D}`]:D});function Te(ye,Ue){var Ye;if(!ye)return null;(typeof ye=="string"||typeof ye=="number")&&(ye=o.default.createElement(t.Option,{value:ye,label:String(ye),key:`${ye}_${Ue}`},ye));const He=ye,pt=((Ye=He.props)===null||Ye===void 0?void 0:Ye.disabled)||!1;return o.default.createElement("div",{key:`${He.props.value}_${Ue}`,className:(0,r.default)({"kt-select-option-select":R===He.props.value}),onMouseEnter:()=>O?.(He.props.value,Ue),onClick:pt?m:()=>{be(!1),M&&M(p(ye,x))}},ye)}(0,o.useEffect)(()=>{!q&&fe&&te("")},[]),(0,o.useEffect)(()=>{if(!q)return;const ye=Ue=>{ge.current&&!ge.current.contains(Ue.target)&&be(!1)};return document.addEventListener("click",ye),()=>document.removeEventListener("click",ye)},[q]);const We=(0,o.useCallback)(()=>{if(!ge.current||!Re.current)return;const ye=ge.current.getBoundingClientRect(),Ue=Re.current;Z?(Ue.style.minWidth=`${ye.width}px`,Ue.style.maxWidth=`${window.innerWidth-ye.left-4}px`):Ue.style.width=`${ye.width}px`;const Ye=window.innerHeight-ye.bottom-50,He=Ue.clientHeight;Ye<He?Ue.style.bottom=`${ye.height+4}px`:(Ue.style.maxHeight=`${Ye}px`,Ue.style.bottom="auto"),Ue.style.position=oe},[Z,oe]);(0,o.useEffect)(()=>{if(q)return We(),window.addEventListener("resize",We),()=>window.removeEventListener("resize",We)},[q,We]);const pe=(0,o.useMemo)(()=>fe?a(I)?I.filter(ye=>$(fe,ye)):g(I)?I.reduce((ye,Ue)=>{const Ye=Ue.options.filter(He=>$(fe,He,Ue));return Ye.length&&ye.push({...Ue,options:Ye}),ye},[]):I:I,[I,fe,$]),re=()=>o.default.createElement(o.default.Fragment,null,o.default.createElement(y,{selected:Ne,selectedRenderer:K}),o.default.createElement(l.Icon,{iconClass:(0,r.default)((0,l.getIcon)("down"),"kt-select-value-default-icon")})),ue=(0,o.useCallback)(ye=>{te(ye),me?.(ye)},[fe,me]),Se=()=>o.default.createElement(b,{value:fe,onChange:ue,placeholder:V});return o.default.createElement("div",{className:(0,r.default)("kt-select-container",L),ref:ge},o.default.createElement("div",{className:ke,onClick:Oe,style:k},X&&q?Se():re()),Ce&&o.default.createElement("div",{className:"kt-select-warning-text"},he),q&&!fe&&(a(pe)||g(pe)?o.default.createElement(t.SelectOptionsList,{optionRenderer:W,options:pe,equals:U,optionStyle:F,currentValue:R,size:D,onSelect:ye=>{M&&M(ye),be(!1)},groupTitleRenderer:j,className:De,style:{maxHeight:`${N}px`},ref:Re,footerComponent:Q,headerComponent:G,emptyComponent:H}):o.default.createElement("div",{className:De,style:{maxHeight:`${N}px`},ref:Re},I&&I.map((ye,Ue)=>Te(ye,Ue)),T&&s(T,Te),ie&&o.default.createElement(S,{text:ie}),o.default.createElement("div",{className:"kt-select-overlay",onClick:Oe}))))}function S({text:w}){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-option-divider"}),o.default.createElement("div",{className:"kt-option-description"},w))}t.SelectOptionsList=o.default.forwardRef((w,I)=>{const{options:D,optionRenderer:T=E,equals:R=(H,K)=>H===K,onSelect:M,currentValue:O,optionStyle:x,size:k,className:F,style:L,groupTitleRenderer:N=f,renderCheck:U,headerComponent:W,footerComponent:j,emptyComponent:Q}=w,G=(0,r.default)("kt-select-options",{[`kt-select-options-${k}`]:!0},F);function X(H){return H.map((K,Y)=>{const Z=o.default.createElement(N,{group:K,index:Y});return o.default.createElement(o.default.Fragment,{key:"group_"+Y},Z,$(K.options))})}function $(H){return H&&H.map((K,Y)=>{const Z=R(O,K.value);return o.default.createElement(t.Option,{value:Y,key:Y,className:(0,r.default)({"kt-select-option-select":Z,"kt-select-option-default":!0,"kt-option-with-check":U}),onClick:()=>M(K.value),style:x},U&&R(O,K.value)?o.default.createElement("div",{className:"kt-option-check"},o.default.createElement(l.Icon,{icon:"check"})):void 0,o.default.createElement(T,{data:K,isCurrent:Z}))})}let V;return g(D)?V=D.filter(H=>H.options.length>0).length===0:V=D.length===0,o.default.createElement("div",{className:G,style:L,ref:I,onClick:H=>{H.stopPropagation()}},W?o.default.createElement(W,null):null,V&&Q?o.default.createElement(Q,null):(g(D)?X(D):$(D))||Q&&o.default.createElement(Q,null),j?o.default.createElement(j,null):null)})},54076:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tabs=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));e(1030);const l=v=>{const{tabs:_,className:m,value:p,onChange:s,mini:h,style:a,...g}=v,d=o.default.useCallback(u=>{typeof s=="function"&&s(u)},[]);return o.default.createElement("div",{...g,style:a,className:(0,r.default)("kt-tabs",m,{"kt-tabs-mini":h})},_.map((u,E)=>{const f=E===p?"kt-tab-selected":"";return typeof u=="string"?o.default.createElement("div",{key:E,className:(0,r.default)("kt-tab",f,{"kt-mini-tab":h}),onClick:d.bind(null,E)},u):o.default.createElement("div",{key:E,className:(0,r.default)("kt-custom-tab",f,{"kt-mini-tab":h}),onClick:d.bind(null,E)},u)}))};t.Tabs=l},72871:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041));e(24571);const l=({title:v,children:_,delay:m})=>{const[p,s]=(0,o.useState)(!1),h=(0,o.useRef)(null),a=(0,o.useRef)(null),g=(0,o.useRef)(null),d=(0,o.useRef)(null);(0,o.useEffect)(()=>()=>clearTimeout(d.current),[]);function u(){if(p){d.current&&clearTimeout(d.current);return}d.current=setTimeout(()=>{if(s(!0),a.current&&h.current&&g.current){const{x:f,y:c,width:y,height:b}=h.current.getBoundingClientRect(),A=a.current.getBoundingClientRect();c<A.height*1.5?(g.current.className+=" kt-tooltip-reverse-arrow",a.current.style.top=`${c+b+A.height/2}px`):a.current.style.top=`${c-A.height*1.5}px`,f+A.width/2>=document.body.offsetWidth?(g.current.style.right=`${y/2-7}px`,a.current.style.left=`${f+y-A.width}px`):f-A.width/2<=0?(g.current.style.left=`${y/2-7}px`,a.current.style.left=`${f}px`):(g.current.style.left=`${A.width/2-7}px`,a.current.style.left=`${f+y/2-A.width/2}px`)}clearTimeout(d.current)},m||500)}function E(){d.current&&clearTimeout(d.current),s(!1)}return o.default.createElement("p",{ref:h,className:"kt-tooltip-wrapper",onMouseEnter:u,onMouseLeave:E},_,p&&o.default.createElement("span",{ref:a,className:(0,r.default)("kt-tooltip-content")},v,o.default.createElement("span",{ref:g,className:"kt-tooltip-arrow-placeholder"})))};t.Tooltip=l},40604:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deprecated=l;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(65973));function l(v,_){return m=>(r.default.useEffect(()=>{(0,o.default)(!1,`${v.displayName||v.name} is deprecated: ${_}`)},[]),r.default.createElement(v,m))}},84605:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(40604),t),n.__exportStar(e(65973),t),n.__exportStar(e(43953),t),n.__exportStar(e(2835),t),n.__exportStar(e(47768),t),n.__exportStar(e(26809),t)},26809:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseWithoutEscape=t.toMarkdownHtml=t.parseMarkdown=t.createMarkedRenderer=t.marked=void 0;const n=e(33714);Object.defineProperty(t,"marked",{enumerable:!0,get:function(){return n.marked}});const r=()=>new n.Renderer;t.createMarkedRenderer=r;const o=(_,m)=>n.marked.parse(_,m);t.parseMarkdown=o;const l=(_,m)=>(0,n.marked)(_,m);t.toMarkdownHtml=l;const v=_=>{if(_.type==="escape"){const m=_;m.text=m.raw}return _};t.parseWithoutEscape=v},2835:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.collapseMotion=void 0;const e=()=>({height:0,opacity:0}),n=o=>({height:o.scrollHeight,opacity:1}),r=o=>({height:o.offsetHeight});t.collapseMotion={motionName:"kt-motion-collapse",onAppearStart:e,onEnterStart:e,onAppearActive:n,onEnterActive:n,onLeaveStart:r,onLeaveActive:e}},47768:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapperRaf=v;const r=e(85608).__importDefault(e(10719));let o=0;const l={};function v(_,m=1){const p=o++;let s=m;function h(){s-=1,s<=0?(_(),delete l[p]):l[p]=(0,r.default)(h)}return l[p]=(0,r.default)(h),p}v.cancel=function(m){m!==void 0&&(r.default.cancel(l[m]),delete l[m])},v.ids=l},43953:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tupleNum=t.tuple=void 0;const e=(...r)=>r;t.tuple=e;const n=(...r)=>r;t.tupleNum=n},65973:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=n,t.note=r,t.resetWarned=o,t.call=l,t.warningOnce=v,t.noteOnce=_;let e={};function n(m,p){}function r(m,p){}function o(){e={}}function l(m,p,s){!p&&!e[s]&&(m(!1,s),e[s]=!0)}function v(m,p){l(n,m,p)}function _(m,p){l(r,m,p)}t.default=v},91802:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualList=void 0;const r=e(85608).__importStar(e(14041)),o=e(24241),l=e(77011),v=({data:_,className:m,template:p,refSetter:s,onRangeChanged:h})=>{const a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{s?.(a.current)},[a.current]),r.default.createElement(l.Scrollbars,{thumbSize:0},r.default.createElement(o.Virtuoso,{rangeChanged:g=>{h?.(g)},overscan:20,ref:a,style:{height:"100%"},className:m,data:_,itemContent:(g,d)=>r.default.createElement(p,{index:g,data:d})}))};t.VirtualList=v},18740:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(59019),t)},59019:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSChannelHandler=void 0;const n=e(40396),r=e(43718),o=e(54558),l=e(47561);class v{onChannelCreated(m,p){return this._onChannelCreatedEmitter.on(m,p)}constructor(m,p,s={}){this.connection=m,this._disposables=new r.DisposableStore,this._onChannelCreatedEmitter=this._disposables.add(new n.EventEmitter),this.channelMap=new Map,this.channelCloseEventMap=new r.MultiMap,this.logger=console,this.openingBarrier=new r.Barrier,this.logger=s.logger||this.logger,this.clientId=p,this.LOG_TAG=`[WSChannelHandler] [client-id:${this.clientId}]`;const h=s.serializer||o.furySerializer;this.wrappedConnection=(0,o.wrapSerializer)(this.connection,h)}replaceLogger(m){m&&(this.logger=m)}setReporter(m){this.reporterService=m}heartbeatMessage(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this.heartbeatMessageTimer=setTimeout(()=>{this.channelMap.forEach(m=>{m.ping()}),this.heartbeatMessage()},1e4)}async initHandler(){this.wrappedConnection.onMessage(p=>{switch(this.heartbeatMessage(),p.kind){case"pong":break;default:{const s=this.channelMap.get(p.id);s?s.dispatch(p):this.logger.warn(this.LOG_TAG,`channel ${p.id} not found`)}}});const m=()=>{this.channelMap.size>0&&this.channelMap.forEach(p=>{p.open(p.channelPath,this.clientId)})};this.connection.onClose((p,s)=>{this.channelMap.forEach(h=>{h.close(p,s)})}),this.connection.isOpen()&&(this.heartbeatMessage(),this.openingBarrier.open()),this.connection.onOpen(()=>{this.heartbeatMessage(),this.openingBarrier.isOpen()?m():this.openingBarrier.open()}),await this.openingBarrier.wait()}fillKey(m){return`${this.clientId}:${m}`}getChannel(m){return this.channelMap.get(this.fillKey(m))}async openChannel(m){const p=this.fillKey(m);this.channelMap.has(p)&&(this.channelMap.get(p).dispose(),this.logger.log(this.LOG_TAG,`channel ${p} already exists, dispose it`));const s=new l.WSChannel(this.wrappedConnection,{id:p,logger:this.logger,ensureServerReady:!0});this.channelMap.set(s.id,s),this._onChannelCreatedEmitter.emit(m,s);let h=0;s.onOpen(()=>{h++,h>1?(s.fireReopen(),this.logger.log(this.LOG_TAG,`channel reconnect ${this.clientId}:${s.channelPath}, count: ${h}`)):this.logger.log(this.LOG_TAG,`channel open ${this.clientId}:${s.channelPath}`);const d=this.channelCloseEventMap.get(s.id);d&&(d.forEach(u=>{this.reporterService&&this.reporterService.point(r.REPORT_NAME.CHANNEL_RECONNECT,r.REPORT_NAME.CHANNEL_RECONNECT,u)}),this.channelCloseEventMap.delete(s.id))}),s.onClose((d,u)=>{this.channelCloseEventMap.set(s.id,{channelPath:m,closeEvent:{code:d,reason:u},connectInfo:navigator.connection}),this.logger.log(this.LOG_TAG,`channel ${m} closed, code: ${d}, reason: ${u}`)});const a=new r.Deferred,g=s.onOpen(()=>{a.resolve(),g.dispose()});return s.open(m,this.clientId),await a.promise,s}dispose(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this._disposables.dispose()}awaitChannelReady(m){const p=this.getChannel(m),s=new r.Deferred;if(p)p.onServerReady(()=>{s.resolve()});else{const h=this.onChannelCreated(m,a=>{a.onServerReady(()=>{s.resolve()}),h.dispose()})}return s.promise}}t.WSChannelHandler=v},98710:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=t.Buffers=t.emptyBuffer=void 0,t.copy=e,t.emptyBuffer=new Uint8Array(0);function e(o,l,v,_,m){l.set(o.subarray(_,m),v)}class n{constructor(){this.buffers=[],this.size=0}get byteLength(){return this.size}push(l){this.buffers.push(l),this.size+=l.length}unshift(l){this.buffers.unshift(l),this.size+=l.length}slice(l,v){const _=this.buffers;if(v===void 0&&(v=this.size),l===void 0&&(l=0),v>this.size&&(v=this.size),l>=v)return t.emptyBuffer;let m=0,p=0;for(;p<_.length&&m+_[p].length<=l;p++)m+=_[p].length;const s=new Uint8Array(v-l);let h=0;for(let a=p;h<v-l&&a<_.length;a++){const g=_[a].length,d=h===0?l-m:0,u=h+g>=v-l?Math.min(d+(v-l)-h,g):g;e(_[a],s,h,d,u),h+=u-d}return s}pos(l){if(l<0||l>=this.size)throw new Error(`out of range, ${l} not in [0, ${this.size})`);let v=l,_=0,m=null;for(;;){if(m=this.buffers[_],v<m.length)return{buf:_,offset:v};v-=m.length,_++}}copy(l,v=0,_=0,m=this.size){return e(this.slice(_,m),l,v,0,m-_)}splice(l,v,..._){const m=this.buffers,p=l>=0?l:this.size-l;v===void 0?v=this.size-p:v>this.size-p&&(v=this.size-p);for(const g of _)this.size+=g.length;const s=new n;let h=0,a=0;for(;a<m.length&&h+m[a].length<p;a++)h+=m[a].length;if(p-h>0){const g=p-h;if(g+v<m[a].length){s.push(m[a].slice(g,g+v));const d=m[a],u=new Uint8Array(g);for(let f=0;f<g;f++)u[f]=d[f];const E=new Uint8Array(d.length-g-v);for(let f=g+v;f<d.length;f++)E[f-v-g]=d[f];if(_.length>0){const f=_.slice();f.unshift(u),f.push(E),m.splice.apply(m,[a,1,...f]),a+=f.length,_=[]}else m.splice(a,1,u,E),a+=2}else s.push(m[a].slice(g)),m[a]=m[a].slice(0,g),a++}for(_.length>0&&(m.splice.apply(m,[a,0,..._]),a+=_.length);s.byteLength<v;){const g=m[a],d=g.length,u=Math.min(d,v-s.byteLength);u===d?(s.push(g),m.splice(a,1)):(s.push(g.slice(0,u)),m[a]=m[a].slice(u))}return this.size-=s.byteLength,s}get(l){const{buf:v,offset:_}=this.pos(l);return this.buffers[v][_]}set(l,v){const{buf:_,offset:m}=this.pos(l);this.buffers[_][m]=v}cursor(l=0){return new r(this,l)}dispose(){this.buffers=[],this.size=0}}t.Buffers=n;class r{constructor(l,v=0){this.buffers=l,this.offset=v,this.chunkIndex=0,this.chunkOffset=0,this.updatePosition()}updatePosition(){if(this.offset===0){this.chunkIndex=0,this.chunkOffset=0;return}const{buf:l,offset:v}=this.buffers.pos(this.offset);this.chunkIndex=l,this.chunkOffset=v}get line(){return this.chunkIndex}get lineWidth(){return this.buffers.buffers[this.chunkIndex].byteLength}get value(){return this.buffers.buffers[this.chunkIndex][this.chunkOffset]}get lineOffset(){return this.chunkOffset}*iterator(){for(;this.chunkIndex<this.buffers.buffers.length;){const l=this.buffers.buffers[this.chunkIndex],v=l.byteLength;for(;this.chunkOffset<v;){const _=l[this.chunkOffset];this.chunkOffset++,this.offset++,yield _}this.chunkOffset=0,this.chunkIndex++}}read(l){const v=this.offset+l,_=this.buffers.slice(this.offset,v);return this.skip(l),_}skip(l){let v=0;for(;this.chunkIndex<this.buffers.buffers.length;){const m=this.buffers.buffers[this.chunkIndex].byteLength;for(;this.chunkOffset<m;)if(this.chunkOffset++,this.offset++,++v===l)return;this.chunkOffset=0,this.chunkIndex++}}moveTo(l){this.offset=l,this.updatePosition()}dispose(){this.buffers=null,this.offset=0}reset(){this.offset=0,this.chunkIndex=0,this.chunkOffset=0}}t.Cursor=r},30613:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Capturer=t.ResponseStatus=t.MessageType=void 0,t.getCapturer=_;const n=e(43718),r=e(65265);var o;(function(p){p.SendNotification="sendNotification",p.SendRequest="sendRequest",p.RequestResult="requestResult",p.OnNotification="onNotification",p.OnRequest="onRequest",p.OnRequestResult="onRequestResult"})(o||(t.MessageType=o={}));var l;(function(p){p.Success="success",p.Fail="fail"})(l||(t.ResponseStatus=l={}));const v=typeof e.g>"u"?typeof window>"u"?{__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__:void 0}:window:e.g;function _(){const p=v.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__;if(p)return p.captureRPC}class m{constructor(s){this.source=s,this._disposables=new n.DisposableStore,this.capturer=null,this.setupListener=h=>{const{command:a}=h.detail;a===r.DevtoolsLantencyCommand.Start?this.capturer=_():a===r.DevtoolsLantencyCommand.Stop&&(this.capturer=null)},this.prefix=(0,n.randomString)(6),this.capturer=_(),typeof v.addEventListener=="function"&&(v.addEventListener(r.EDevtoolsEvent.Latency,this.setupListener),this._disposables.add({dispose:()=>{v.removeEventListener(r.EDevtoolsEvent.Latency,this.setupListener)}}))}capture(s){if(!this.capturer)return;const h={...s,source:this.source};h.data&&(0,n.isUint8Array)(h.data)&&(h.data="<Uint8Array>"),s.requestId&&(h.requestId=`${this.prefix}-${s.requestId}`),s.error&&(h.error=(0,n.transformErrorForSerialization)(s.error)),this.capturer(h)}captureOnRequest(s,h,a){this.capturer&&this.capture({type:o.OnRequest,requestId:`\u2193${s}`,serviceMethod:h,arguments:a})}captureOnRequestResult(s,h,a){this.capturer&&this.capture({type:o.OnRequestResult,status:l.Success,requestId:`\u2193${s}`,serviceMethod:h,data:a})}captureOnRequestFail(s,h,a){this.capturer&&this.capture({type:o.OnRequestResult,status:l.Fail,requestId:`\u2193${s}`,serviceMethod:h,error:a})}captureSendRequest(s,h,a){this.capturer&&this.capture({type:o.SendRequest,requestId:s,serviceMethod:h,arguments:a})}captureSendRequestResult(s,h,a){this.capturer&&this.capture({type:o.RequestResult,status:l.Success,requestId:s,serviceMethod:h,data:a})}captureSendRequestFail(s,h,a){this.capturer&&this.capture({type:o.RequestResult,status:l.Fail,requestId:s,serviceMethod:h,error:a})}captureSendNotification(s,h,a){this.capturer&&this.capture({type:o.SendNotification,serviceMethod:h,arguments:a,requestId:s})}captureOnNotification(s,h,a){this.capturer&&this.capture({type:o.OnNotification,serviceMethod:h,arguments:a,requestId:`\u2193${s}`})}dispose(){this._disposables.dispose()}}t.Capturer=m},29433:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(39048),t)},39048:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessageCode=void 0;var e;(function(n){n[n.ChannelNotFound=1]="ChannelNotFound"})(e||(t.ErrorMessageCode=e={}))},9811:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRPCService=l,t.createRPCService=v,t.getRPCService=_;const n=e(85608),r=e(62199),o=e(8140);function l(m){return{createRPCService:(p,s)=>{const h=v(p,m);return s&&h.onRequestService(s),h},getRPCService:p=>_(p,m)}}function v(m,p){return new r.RPCServiceStub(m,p,o.ServiceType.Service).getProxy()}function _(m,p){return new r.RPCServiceStub(m,p,o.ServiceType.Stub).getProxy()}n.__exportStar(e(62199),t)},35821:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnection=void 0;class e{}t.BaseConnection=e},57358:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LengthFieldBasedFrameDecoder=t.indicator=void 0;const n=e(89212),r=e(43718),o=e(98710);t.indicator=new Uint8Array([13,10,13,10]);class l{constructor(){this.dataEmitter=new r.Emitter,this.onData=this.dataEmitter.event,this.buffers=new o.Buffers,this.cursor=this.buffers.cursor(),this.contentLength=-1,this.state=0,this.lengthFieldLength=4}reset(){this.contentLength=-1,this.state=0,this.cursor.reset()}push(_){this.buffers.push(_);let m=!1;for(;!m;)m=this.readFrame()}readFrame(){if(this.readLengthField()){const m=this.cursor.offset,p=m+this.contentLength,s=this.buffers.slice(m,p);if(this.dataEmitter.fire(s),this.buffers.byteLength>p)return this.contentLength=-1,this.state=0,this.cursor.moveTo(p),!1;this.buffers.splice(0,p),this.reset()}return!0}readLengthField(){const _=this.buffers.byteLength;if(this.state!==4){if(this.cursor.offset+t.indicator.length>_)return!1;this.readIndicator()}if(this.state!==4)return!1;if(this.contentLength===-1){if(this.cursor.offset+this.lengthFieldLength>_)return!1;const m=this.cursor.read(this.lengthFieldLength);this.contentLength=(0,r.readUInt32LE)(m,0)}return!(this.cursor.offset+this.contentLength>_)}readIndicator(){const _=this.cursor.iterator();let m=_.next();for(;!m.done;){switch(m.value){case 13:switch(this.state){case 0:this.state=1;break;case 2:this.state=3;break;default:this.state=0;break}break;case 10:switch(this.state){case 1:this.state=2;break;case 3:this.state=4,_.return();break;default:this.state=0;break}break;default:this.state=0;break}m=_.next()}}dispose(){this.dataEmitter.dispose(),this.buffers.dispose()}static construct(_){return l.writer.reset(),l.writer.buffer(t.indicator),l.writer.uint32(_.byteLength),l.writer.buffer(_),l.writer.dump()}}t.LengthFieldBasedFrameDecoder=l,l.writer=(0,n.BinaryWriter)({})},34982:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(35821),t),n.__exportStar(e(71056),t),n.__exportStar(e(57625),t),n.__exportStar(e(15272),t)},92917:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(l){super(),this.port=l,l.start()}send(l){this.port.postMessage(l)}onMessage(l){const v=_=>{l(_.data)};return this.port.addEventListener("message",v),{dispose:()=>{this.port.removeEventListener("message",v)}}}onceClose(l){return this.port.addEventListener("close",l),{dispose:()=>{this.port.addEventListener("close",l)}}}dispose(){}}t.MessagePortConnection=r},71056:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeMessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(l){super(),this.port=l}send(l){this.port.postMessage(l)}onMessage(l){return this.port.on("message",l),{dispose:()=>{this.port.off("message",l)}}}onceClose(l){return this.port.once("close",l),{dispose:()=>{this.port.off("close",l)}}}dispose(){this.port.removeAllListeners()}}t.NodeMessagePortConnection=r},91493:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReconnectingWebSocketConnection=void 0;const r=e(85608).__importDefault(e(31133)),o=e(35821);class l extends o.BaseConnection{constructor(_){super(),this.socket=_}send(_){this.socket.send(_)}isOpen(){return this.socket.readyState===this.socket.OPEN}onOpen(_){return this.socket.addEventListener("open",_),{dispose:()=>{this.socket.removeEventListener("open",_)}}}onMessage(_){const m=p=>{var s,h;let a;if(p.data instanceof Blob)a=p.data.arrayBuffer();else if(p.data instanceof ArrayBuffer)a=Promise.resolve(p.data);else if(((h=(s=p.data)===null||s===void 0?void 0:s.constructor)===null||h===void 0?void 0:h.name)==="Buffer")a=Promise.resolve(p.data);else throw new Error("unknown message type, expect Blob or ArrayBuffer, received: "+typeof p.data);a.then(g=>_(new Uint8Array(g,0,g.byteLength)))};return this.socket.addEventListener("message",m),{dispose:()=>{this.socket.removeEventListener("message",m)}}}onceClose(_){const m=this.onClose(p);return{dispose:()=>{m.dispose()}};function p(s,h){_(s,h),m.dispose()}}onClose(_){const m=p=>{_(p.code,p.reason)};return this.socket.addEventListener("close",m),{dispose:()=>{this.socket.removeEventListener("close",m)}}}onError(_){const m=p=>{_(p.error)};return this.socket.addEventListener("error",m),{dispose:()=>{this.socket.removeEventListener("error",m)}}}dispose(){}static forURL(_,m,p){const s=new r.default(_,m,p);return s.binaryType="arraybuffer",new l(s)}}t.ReconnectingWebSocketConnection=l},57625:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetSocketConnection=void 0;const n=e(36932);class r extends n.StreamConnection{constructor(l){super(l,l),this.socket=l}isOpen(){return this.socket.readyState==="open"}onOpen(l){return this.socket.on("connect",l),{dispose:()=>{this.socket.off("connect",l)}}}destroy(){this.socket.destroy()}}t.NetSocketConnection=r},36932:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamConnection=void 0;const n=e(35821),r=e(57358);class o extends n.BaseConnection{constructor(v,_){super(),this.readable=v,this.writable=_,this.decoder=new r.LengthFieldBasedFrameDecoder;const m=p=>{this.decoder.push(p)};this.readable.on("data",m),this.readable.once("close",()=>{this.decoder.dispose(),this.readable.off("data",m)})}send(v){const _=r.LengthFieldBasedFrameDecoder.construct(v);this.writable.write(_,()=>{})}onMessage(v){return this.decoder.onData(v)}onceClose(v){const _=this.onClose(m);return{dispose:()=>{_.dispose()}};function m(p,s){v(p,s),_.dispose()}}onClose(v){const _=m=>{v(m?1:0,m?"had error":"")};return this.readable.on("close",_),this.writable!==this.readable&&this.writable.on("close",_),{dispose:()=>{this.readable.off("close",_),this.writable!==this.readable&&this.writable.off("close",_)}}}onError(v){return this.readable.on("error",v),this.writable!==this.readable&&this.writable.on("error",v),{dispose:()=>{this.readable.off("error",v),this.writable!==this.readable&&this.writable.off("error",v)}}}dispose(){this.decoder.dispose()}}t.StreamConnection=o},15272:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSWebSocketConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(l){super(),this.socket=l}send(l){this.socket.send(l)}onMessage(l){return this.socket.on("message",l),{dispose:()=>{this.socket.off("message",l)}}}onceClose(l){return this.socket.once("close",l),{dispose:()=>{this.socket.off("close",l)}}}isOpen(){return this.socket.readyState===this.socket.OPEN}dispose(){this.socket.removeAllListeners()}}t.WSWebSocketConnection=r},90750:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(34982),t)},91676:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.METHOD_NOT_REGISTERED=void 0,t.METHOD_NOT_REGISTERED="$$METHOD_NOT_REGISTERED"},89104:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtObjectTransfer=t.AnySerializer=t.ProtocolType=void 0;const n=e(43718);var r;(function(_){_[_.String=0]="String",_[_.Buffer=1]="Buffer",_[_.Number=2]="Number",_[_.JSONObject=3]="JSONObject",_[_.BigInt=4]="BigInt",_[_.Array=5]="Array",_[_.Object=6]="Object",_[_.Undefined=7]="Undefined",_[_.Null=8]="Null",_[_.Boolean=9]="Boolean"})(r||(t.ProtocolType=r={}));class o{constructor(m,p,s){this.writer=m,this.reader=p,this.objectTransfer=s,this.deserialize=h=>(this.reader.reset(h),this.read()),this.serialize=h=>(this.writer.reset(),this.write(h),this.writer.dump())}write(m){var p;const{writer:s}=this,h=typeof m;switch(s.reserve(1),m){case null:s.uint8(r.Null);return;default:switch(h){case"undefined":s.uint8(r.Undefined);break;case"string":s.uint8(r.String),s.stringOfVarUInt32(m);break;case"boolean":s.reserve(1),s.uint8(r.Boolean),s.uint8(m?1:0);break;case"number":s.reserve(8),s.uint8(r.Number),s.double(m);break;case"bigint":s.reserve(8),s.uint8(r.BigInt),s.int64(m);break;case"object":if(Array.isArray(m)){s.reserve(4),s.uint8(r.Array),s.varUInt32(m.length);for(const a of m)this.write(a)}else(0,n.isUint8Array)(m)?(s.reserve(4),s.uint8(r.Buffer),s.varUInt32(m.byteLength),s.buffer(m)):(s.uint8(r.JSONObject),s.stringOfVarUInt32(JSON.stringify(m,(p=this.objectTransfer)===null||p===void 0?void 0:p.replacer)));break;default:throw new Error(`Unknown type ${h}`)}}}read(){var m;const{reader:p}=this,s=p.uint8();switch(s){case r.Undefined:return;case r.Null:return null;case r.String:return p.stringOfVarUInt32();case r.Buffer:{const h=p.varUInt32();return p.buffer(h)}case r.Number:return p.double();case r.JSONObject:{const h=p.stringOfVarUInt32();return JSON.parse(h,(m=this.objectTransfer)===null||m===void 0?void 0:m.reviver)}case r.BigInt:return p.int64();case r.Array:{const h=p.varUInt32(),a=[];for(let g=0;g<h;g++)a.push(this.read());return a}case r.Boolean:return p.uint8()===1;default:throw new Error(`Unknown type ${s}`)}}}t.AnySerializer=o;var l;(function(_){_.CODE_URI="CodeURI",_.BUFFER="Buffer"})(l||(l={}));class v{static replacer(m,p){if(p){switch(p.$mid){case 1:{const s=n.Uri.revive(p);return{$type:l.CODE_URI,data:s.toString()}}}if(p instanceof Uint8Array||p instanceof Uint32Array||p instanceof Uint16Array)return{$type:"Buffer",data:Array.from(p)};if(p instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(p))};if(p.type==="Buffer")return{$type:"Buffer",data:p.data}}return p}static reviver(m,p){if(p&&p.$type!==void 0&&p.data!==void 0)switch(p.$type){case l.CODE_URI:return n.Uri.parse(p.data);case l.BUFFER:return Uint8Array.from(p.data)}return p}}t.ExtObjectTransfer=v},94846:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oneOf=void 0;const n=e(26246),r=e(4405),o=8,l=(v,_)=>{_||(_=(0,r.furyFactory)());const{fury:m,reader:p,writer:s}=_,h=new Array(o),a=new Array(o),g={};return v.forEach((E,f)=>{const c=E.options.tag;h[f]=(0,n.generateSerializer)(m,E),a[f]=c,g[c]=f}),{deserialize:E=>{p.reset(E);const f=p.uint8();let c;switch(f){case 0:c=h[0].read();break;case 1:c=h[1].read();break;case 2:c=h[2].read();break;case 3:c=h[3].read();break;case 4:c=h[4].read();break;case 5:c=h[5].read();break;case 6:c=h[6].read();break;case 7:c=h[7].read();break}return c.kind=a[f],c},serialize:E=>{const f=g[E.kind];switch(s.reset(),s.uint8(f),f){case 0:h[0].write(E);break;case 1:h[1].write(E);break;case 2:h[2].write(E);break;case 3:h[3].write(E);break;case 4:h[4].write(E);break;case 5:h[5].write(E);break;case 6:h[6].write(E);break;case 7:h[7].write(E);break}return s.dump()}}};t.oneOf=l},4405:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furyFactory=void 0;const r=e(85608).__importDefault(e(97419)),o=l=>{const v=new r.default(l),_=v.binaryReader,m=v.binaryWriter;return{fury:v,reader:_,writer:m}};t.furyFactory=o},25285:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(66748),t),n.__exportStar(e(62199),t),n.__exportStar(e(86058),t),n.__exportStar(e(15726),t),n.__exportStar(e(30613),t),n.__exportStar(e(47561),t),n.__exportStar(e(9811),t),n.__exportStar(e(8140),t),n.__exportStar(e(90750),t),n.__exportStar(e(54558),t),n.__exportStar(e(29433),t)},16908:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommonServerProtocol=void 0;const n=e(26387),r=e(43718);t.CommonServerProtocol={name:r.CommonServerPath,methods:[{method:"getBackendOS",request:[],response:{type:n.Type.uint16()}}]}},52890:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PositionProto=t.SelectionProto=t.RangeProto=t.UriComponentsProto=void 0;const n=e(26387);t.UriComponentsProto=n.Type.object("uri-components",{scheme:n.Type.string(),authority:n.Type.string(),path:n.Type.string(),query:n.Type.string(),fragment:n.Type.string()}),t.RangeProto=n.Type.object("range",{startLineNumber:n.Type.uint32(),startColumn:n.Type.uint32(),endLineNumber:n.Type.uint32(),endColumn:n.Type.uint32()}),t.SelectionProto=n.Type.object("selection",{selectionStartLineNumber:n.Type.uint32(),selectionStartColumn:n.Type.uint32(),positionLineNumber:n.Type.uint32(),positionColumn:n.Type.uint32()}),t.PositionProto=n.Type.object("position",{lineNumber:n.Type.uint32(),column:n.Type.uint32()})},11431:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDocumentProtocol=void 0;const n=e(26387),r=e(52890);t.ExtensionDocumentProtocol={name:"ExtHostDocuments",methods:[{method:"$fireModelChangedEvent",request:[{name:"event",type:n.Type.object("model-changed-event",{changes:n.Type.array(n.Type.object("model-changed-event-changes",{range:r.RangeProto,rangeLength:n.Type.uint32(),rangeOffset:n.Type.uint32(),text:n.Type.string()})),uri:n.Type.string(),versionId:n.Type.uint32(),eol:n.Type.string(),dirty:n.Type.bool(),isRedoing:n.Type.bool(),isUndoing:n.Type.bool()})}]},{method:"$fireModelOpenedEvent",request:[{name:"event",type:n.Type.object("model-open-event",{uri:n.Type.string(),lines:n.Type.array(n.Type.string()),eol:n.Type.string(),versionId:n.Type.uint32(),languageId:n.Type.string(),dirty:n.Type.bool()})}]},{method:"$provideTextDocumentContent",request:[{name:"path",type:n.Type.string()},{name:"encoding",type:n.Type.string()}],response:{type:n.Type.string()}}]}},26166:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceCenter=void 0,t.getNotificationName=s,t.getRequestName=h,t.getMethodName=a;const n=e(43718),r=e(96068),o=e(91676),l=e(8140),v=e(66748),_=e(92408),m=200;class p{constructor(d,u){this.bench=d,this._disposables=new n.DisposableStore,this.proxies=[],this.serviceRegistry=this._disposables.add(new _.ServiceRegistry),this.protocolRegistry=this._disposables.add(new _.ProtocolRegistry),this.deferred=new n.Deferred,this._reportThreshold=m,this.uid=(0,n.randomString)(6),this.logger=u||console}setReporter(d,u=m){this._reporterService=d,this._reportThreshold=u}registerService(d,u){u===l.ServiceType.Service&&this.bench&&this.bench.registerService(d)}ready(){return this.deferred.promise}loadProtocol(d){this.protocolRegistry.addProtocol(d,{nameConverter:u=>a(d.name,u)})}setSumiConnection(d){this.proxies.length===0&&this.deferred.resolve(),this.protocolRegistry.applyTo(d.io);const u=new v.ProxySumi(this.serviceRegistry,this.logger);u.listen(d);const E=(0,r.addElement)(this.proxies,u);return{dispose:()=>{E.dispose(),u.dispose()}}}setConnection(d){this.proxies.length===0&&this.deferred.resolve();const u=new v.ProxyJson(this.serviceRegistry,this.logger);u.listen(d);const E=(0,r.addElement)(this.proxies,u);return{dispose:()=>{E.dispose(),u.dispose()}}}onRequest(d,u,E){this.serviceRegistry.register(a(d,u),E)}onRequestService(d,u){this.serviceRegistry.registerService(u,{nameConverter:E=>a(d,E)})}async broadcast(d,u,...E){await this.ready();const f=a(d,u);let c;this._reporterService&&(c=this._reporterService.time(n.REPORT_NAME.RPC_TIMMING_MEASURE));const y=await Promise.all(this.proxies.map(S=>S.invoke(f,...E))),b=[],A=[];for(const S of y)S===o.METHOD_NOT_REGISTERED?b.push(S):A.push(S);if(b.length>0&&this.logger.warn(`broadcast rpc \`${f}\` getting doubtful responses: ${b.join(",")}`),A.length===0)throw c&&c.timeEnd(f,{success:!1},{minimumReportThresholdTime:this._reportThreshold}),new Error(`broadcast rpc \`${f}\` error: no remote service can handle this call`);return c&&c.timeEnd(f,{success:!0},{minimumReportThresholdTime:this._reportThreshold}),A.length===1?A[0]:A}dispose(){this._disposables.dispose(),this.proxies.forEach(d=>d.dispose()),this.proxies=[]}}t.RPCServiceCenter=p;function s(g,d){return`on:${g}:${d}`}function h(g,d){return`${g}:${d}`}function a(g,d){return d.startsWith("on")?s(g,d):h(g,d)}},62199:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCService=void 0;const n=e(85608);n.__exportStar(e(68855),t),n.__exportStar(e(26166),t),n.__exportStar(e(92408),t);class r{get client(){return this.rpcClient?this.rpcClient[0]:void 0}}t.RPCService=r},59875:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyBase=void 0;const n=e(43718),r=new Set(["then","finally"]);let o=0;class l{constructor(_,m){this.registry=_,this.connectionPromise=new n.Deferred,this._disposables=new n.DisposableStore,this.logger=m||console,this.registry.onServicesUpdate(p=>{this.connection&&this.bindMethods(p)})}nextRequestId(){return String(o++)}listen(_){this.connection=_,this._disposables.add(this.connection),this.bindMethods(this.registry.methods()),_.listen(),this.connectionPromise.resolve()}listenService(_){this.registry.registerService(_)}dispose(){this._disposables.dispose()}getInvokeProxy(){return new Proxy(Object.create(null),{get:(_,m)=>typeof m!="string"?null:r.has(m)?Promise.resolve():(_[m]||(_[m]=(...p)=>this.invoke(m,...p)),_[m])})}}t.ProxyBase=l},66748:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(33716),t),n.__exportStar(e(16420),t)},33716:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyJson=void 0;const n=e(30613),r=e(91676),o=e(59875);class l extends o.ProxyBase{constructor(){super(...arguments),this.engine="json",this.capturer=this._disposables.add(new n.Capturer(this.engine))}bindMethods(_){for(const m of _)m.startsWith("on")?this.connection.onNotification(m,async(...p)=>{this.capturer.captureOnNotification("_",m,p);try{await this.registry.invoke(m,...this.serializeArguments(p))}catch(s){this.logger.warn(`notification exec ${m} error`,s)}}):this.connection.onRequest(m,async(...p)=>{const s=this.nextRequestId();this.capturer.captureOnRequest(s,m,p);try{const h=await this.registry.invoke(m,...this.serializeArguments(p));return this.capturer.captureOnRequestResult(s,m,h),{error:!1,data:h}}catch(h){return this.capturer.captureOnRequestFail(s,m,h),{error:!0,data:{message:h.message,stack:h.stack}}}})}async invoke(_,...m){await this.connectionPromise.promise;let p=!1;if(m.length===1&&Array.isArray(m[0])&&(p=!0),_.startsWith("on"))this.capturer.captureSendNotification("_",_,m),p?this.connection.sendNotification(_,[...m]):this.connection.sendNotification(_,...m);else{const s=this.nextRequestId();let h;p?h=this.connection.sendRequest(_,[...m]):h=this.connection.sendRequest(_,...m),this.capturer.captureSendRequest(s,_,m);const a=await h;if(a.error){const g=new Error(a.data.message);throw a.data.stack&&(g.stack=a.data.stack),this.capturer.captureSendRequestFail(s,_,a.data),g}else return this.capturer.captureSendRequestResult(s,_,a.data),a.data}}serializeArguments(_){const m=_[_.length-1];return _.length===2&&Array.isArray(_[0])&&Object.prototype.hasOwnProperty.call(m,"_isCancelled")?[..._[0],m]:_}listen(_){super.listen(_),this._disposables.add(_.onRequest(m=>{if(!this.registry.has(m)){const p=this.nextRequestId();this.capturer.captureOnRequest(p,m,[]);const s={data:r.METHOD_NOT_REGISTERED};return this.capturer.captureOnRequestFail(p,m,s.data),s}}))}}t.ProxyJson=l},16420:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxySumi=void 0;const n=e(91676),r=e(59875);class o extends r.ProxyBase{constructor(){super(...arguments),this.engine="sumi"}bindMethods(v){for(const _ of v)_.startsWith("on")?this.connection.onNotification(_,async(...m)=>{try{await this.registry.invoke(_,...m)}catch(p){this.logger.warn(`notification exec ${_} error`,p)}}):this.connection.onRequest(_,async(...m)=>await this.registry.invoke(_,...m))}async invoke(v,..._){if(await this.connectionPromise.promise,v.startsWith("on"))this.connection.sendNotification(v,..._);else return await this.connection.sendRequest(v,..._)}listen(v){super.listen(v),this._disposables.add(v.onRequestNotFound(()=>{throw n.METHOD_NOT_REGISTERED}))}}t.ProxySumi=o},92408:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolRegistry=t.ServiceRegistry=void 0,t.getServiceMethods=o;const n=e(43718),r=new Set(["constructor"]);function o(_){const m=new Set;let p=_;do{const h=Object.getOwnPropertyNames(p);for(const a of h)r.has(a)||typeof _[a]=="function"&&m.add(a)}while(p=Object.getPrototypeOf(p));const s=Array.from(m);return s.sort(),s}class l{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onServicesUpdate=this.emitter.event,this.serviceMethodMap=new Map}register(m,p){this.serviceMethodMap.set(m,p),this.emitter.fire([m])}registerService(m,p){const s=[],{nameConverter:h}=p||{},a=o(m);for(const g of a){let d=g;h&&(d=h(g)),this.serviceMethodMap.set(d,m[g].bind(m)),s.push(d)}this.emitter.fire(s)}has(m){return this.serviceMethodMap.has(m)}invoke(m,...p){return this.serviceMethodMap.get(m)(...p)}methods(){return Array.from(this.serviceMethodMap.keys())}dispose(){this._disposables.dispose()}}t.ServiceRegistry=l;class v{constructor(){this._disposables=new n.DisposableStore,this.emitter=this._disposables.add(new n.Emitter),this.onProtocolUpdate=this.emitter.event,this.protocolMap=new Map}addProtocol(m,p){const s=[],{nameConverter:h}=p||{},{methods:a}=m;for(const g of a){let d=g.method;h&&(d=h(d)),this.protocolMap.set(d,{...g,method:d}),s.push(d)}this.emitter.fire(s)}applyTo(m){if(m.loadProtocolMethod){for(const p of this.protocolMap.values())m.loadProtocolMethod(p);this._disposables.add(this.onProtocolUpdate(p=>{if(m.loadProtocolMethod)for(const s of p){const h=this.protocolMap.get(s);h&&m.loadProtocolMethod(h)}}))}}dispose(){this._disposables.dispose()}}t.ProtocolRegistry=v},68855:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceStub=void 0;class e{constructor(r,o,l){this.serviceName=r,this.center=o,this.type=l,this.getProxy=()=>new Proxy(this,{get:(v,_)=>typeof _=="symbol"?Promise.resolve():(v[_]||(v[_]=(...m)=>this.broadcast(_,...m)),v[_])}),this.center.registerService(r,this.type)}on(r,o){this.onRequest(r,o)}onRequestService(r){this.center.onRequestService(this.serviceName,r)}onRequest(r,o){this.center.onRequest(this.serviceName,r,o)}broadcast(r,...o){return this.center.broadcast(this.serviceName,r,...o)}}t.RPCServiceStub=e},97349:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnection=void 0;const n=e(43718),r=e(70392),o=e(93062),l=e(30613),v=e(90750),_=e(91676),m=e(48218),p=e(76339),s={},h={chunked:!0};class a{constructor(d,u={}){this.socket=d,this.options=u,this.disposable=new r.DisposableStore,this._requestHandlers=new Map,this._notificationHandlers=new Map,this._requestId=0,this._callbacks=new Map,this._reqTimeoutHandles=new Map,this._cancellationTokenSources=new Map,this._knownCanceledRequests=new Set,this.activeRequestPool=new Map,u.logger?this.logger=u.logger:this.logger=(0,n.getDebugLogger)(),this.io=u.io||new p.MessageIO,this.capturer=new l.Capturer(u.name||"sumi"),this.disposable.add(this.capturer)}sendNotification(d,...u){const E=this._requestId++;this.capturer.captureSendNotification(E,d,u),this.socket.send(this.io.Notification(E,d,s,u))}sendRequest(d,...u){return new Promise((E,f)=>{const c=this._requestId++;if(this._callbacks.set(c,(b,A,S)=>{if(A){if(this.traceRequestError(c,d,u,A),A===_.METHOD_NOT_REGISTERED){E(A);return}f(A);return}this.capturer.captureSendRequestResult(c,d,S),E(S)}),this.options.timeout&&this.options.timeout!==-1){const b=setTimeout(()=>{this._handleTimeout(d,c)},this.options.timeout);this._reqTimeoutHandles.set(c,b)}const y=u.length&&r.CancellationToken.isCancellationToken(u[u.length-1])?u.pop():void 0;if(y&&y.isCancellationRequested)return Promise.reject((0,r.canceled)());y&&y.onCancellationRequested(()=>this.cancelRequest(c)),this.capturer.captureSendRequest(c,d,u),this.socket.send(this.io.Request(c,d,{cancelable:!!y||void 0},u))})}cancelRequest(d){this.socket.send(this.io.Cancel(d))}_handleTimeout(d,u){if(!this._callbacks.has(u)||!this._reqTimeoutHandles.has(u))return;const E=this._callbacks.get(u);this._callbacks.delete(u),this._reqTimeoutHandles.delete(u),E(s,new m.MethodTimeoutError(d))}onRequest(d,u){return this._requestHandlers.set(d,u),{dispose:()=>{this._requestHandlers.delete(d)}}}onRequestNotFound(d){return this._starRequestHandler=d,{dispose:()=>{this._starRequestHandler=void 0}}}onNotification(d,u){return this._notificationHandlers.set(d,u),{dispose:()=>{this._notificationHandlers.delete(d)}}}onNotificationNotFound(d){return this._starNotificationHandler=d,{dispose:()=>{this._starNotificationHandler=void 0}}}listen(){this.disposable.add(this.socket.onMessage(d=>{const u=this.io.parse(d),E=u.kind,f=u.requestId;switch(E===p.OperationType.Error&&this.logger.warn(`[${u.requestId}] Error received from server method ${u.method}: ${u.error}`),E){case p.OperationType.Error:case p.OperationType.Response:{const{headers:c,method:y}=u,b=u.error,A=u.result;this._reqTimeoutHandles.has(f)&&(clearTimeout(this._reqTimeoutHandles.get(f)),this._reqTimeoutHandles.delete(f));const S=(w,I,D)=>{const T=this._callbacks.get(f);if(!T){this.logger.error(`Cannot find callback for request ${f}: ${y}`);return}this._callbacks.delete(f),T(w,I,D)};if(c&&c.chunked){let w;if(this.activeRequestPool.has(f)?w=this.activeRequestPool.get(f):(w=new o.SumiReadableStream,this.activeRequestPool.set(f,w),S(c,void 0,w)),A===null){w.end(),this.activeRequestPool.delete(f);break}if(b){w.emitError(b);break}w.emitData(A);break}S(c,b,A);break}case p.OperationType.Notification:case p.OperationType.Request:{const{method:c,headers:y,args:b}=u;if(y.cancelable){const A=new r.CancellationTokenSource;this._cancellationTokenSources.set(f,A),b.push(A.token),this._knownCanceledRequests.has(f)&&(A.cancel(),this._knownCanceledRequests.delete(f))}switch(E){case p.OperationType.Request:{this.capturer.captureOnRequest(f,c,b);let A;try{let I;const D=this._requestHandlers.get(c);D?I=D(...b):this._starRequestHandler&&(I=this._starRequestHandler(c,b)),A=Promise.resolve(I)}catch(I){A=Promise.reject(I)}const S=I=>{this.capturer.captureOnRequestResult(f,c,I),(0,o.isReadableStream)(I)?(0,o.listenReadable)(I,{onData:D=>{this.socket.send(this.io.Response(f,c,h,D))},onEnd:()=>{this.socket.send(this.io.Response(f,c,h,null)),this._cancellationTokenSources.delete(f)},onError:D=>{this.socket.send(this.io.Error(f,c,h,D)),this._cancellationTokenSources.delete(f)}}):(this.socket.send(this.io.Response(f,c,s,I)),this._cancellationTokenSources.delete(f))},w=I=>{this.traceRequestError(f,c,b,I),this.socket.send(this.io.Error(f,c,s,I)),this._cancellationTokenSources.delete(f)};A.then(S).catch(w);break}case p.OperationType.Notification:{this.capturer.captureOnNotification(f,c,b);const A=this._notificationHandlers.get(c);A?A(...b):this._starNotificationHandler&&this._starNotificationHandler(c,b);break}}break}case p.OperationType.Cancel:{const c=this._cancellationTokenSources.get(f);c?c.cancel():this._knownCanceledRequests.add(f);break}default:break}}))}dispose(){this.disposable.dispose()}static forWSWebSocket(d,u={}){return new a(new v.WSWebSocketConnection(d),u)}static forNetSocket(d,u={}){return new a(new v.NetSocketConnection(d),u)}traceRequestError(d,u,E,f){this.capturer.captureSendRequestFail(d,u,f)}toJSON(){throw new Error(`You're trying to serialize a SumiConnection instance, which is not allowed.
33876
33876
  Please check your code, and remove the rpc proxy reference.`)}}t.SumiConnection=a},48218:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MethodTimeoutError=void 0;class e extends Error{constructor(r){super(`method ${r} timeout`)}}t.MethodTimeoutError=e},76339:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawMessageIO=t.MessageIO=t.IMessageIO=t.AnyProtocolSerializer=t.HeadersProto=t.OperationType=void 0;const n=e(26387),r=e(26246),o=e(86560),l=e(89104),v=e(4405),_=1;var m;(function(u){u[u.Request=0]="Request",u[u.Notification=1]="Notification",u[u.Response=2]="Response",u[u.Cancel=3]="Cancel",u[u.Error=4]="Error"})(m||(t.OperationType=m={})),t.HeadersProto={Request:n.Type.object("req-headers",{cancelable:n.Type.bool()}),Response:n.Type.object("resp-headers",{chunked:n.Type.bool()})};const p={Request:m.Request<<8|_,Notification:m.Notification<<8|_,Response:m.Response<<8|_,Cancel:m.Cancel<<8|_,Error:m.Error<<8|_};class s{constructor(E,f){this.fury=f;const c=[];for(const A of E.request)c.push(A.type);const y=n.Type.tuple(c);let b=n.Type.any();E.response&&E.response.type&&(b=E.response.type),this.request=this.fury.registerSerializer(y),this.result=this.fury.registerSerializer(b)}writeRequest(E){return this.request.serializer.write(E)}readRequest(){return this.request.serializer.read()}writeResponse(E){return this.result.serializer.write(E)}readResponse(){return this.result.serializer.read()}}class h{constructor(E,f,c){this.writer=E,this.reader=f,this.anySerializer=new l.AnySerializer(this.writer,this.reader,c)}writeRequest(E){this.anySerializer.write(E)}readRequest(){return this.anySerializer.read()}writeResponse(E){this.anySerializer.write(E)}readResponse(){return this.anySerializer.read()}}t.AnyProtocolSerializer=h;class a{}t.IMessageIO=a;class g extends a{constructor(){super(),this.serializerMap=new Map;const E=(0,v.furyFactory)();this.fury=E.fury,this.reader=E.reader,this.writer=E.writer,this.requestHeadersSerializer=(0,r.generateSerializer)(this.fury,t.HeadersProto.Request),this.responseHeadersSerializer=(0,r.generateSerializer)(this.fury,t.HeadersProto.Response),this.anySerializer=new h(this.writer,this.reader)}setAnySerializer(E){this.anySerializer=E}has(E){return this.serializerMap.has(E)}loadProtocol(E,f){const{methods:c}=E;for(const y of c)this.loadProtocolMethod(y,f)}loadProtocolMethod(E,f){let c=E.method;f?.nameConverter&&(c=f.nameConverter(c)),this.serializerMap.set(c,new s(E,this.fury))}getProcessor(E){const f=this.serializerMap.get(E);return f||this.anySerializer}Notification(E,f,c,y){const{writer:b}=this;return b.reset(),b.uint16(p.Notification),b.uint32(E),b.stringOfVarUInt32(f),this.requestHeadersSerializer.write(c),this.getProcessor(f).writeRequest(y),b.dump()}Request(E,f,c,y){const{writer:b}=this;return b.reset(),b.uint16(p.Request),b.uint32(E),b.stringOfVarUInt32(f),this.requestHeadersSerializer.write(c),this.getProcessor(f).writeRequest(y),b.dump()}Cancel(E){const{writer:f}=this;return f.reset(),f.uint16(p.Cancel),f.uint32(E),f.dump()}Response(E,f,c,y){const{writer:b}=this;return b.reset(),b.uint16(p.Response),b.uint32(E),b.stringOfVarUInt32(f),this.responseHeadersSerializer.write(c),this.getProcessor(f).writeResponse(y),b.dump()}Error(E,f,c,y){const{writer:b}=this;return b.reset(),b.uint16(p.Error),b.uint32(E),b.stringOfVarUInt32(f),this.responseHeadersSerializer.write(c),b.stringOfVarUInt32((0,o.stringifyError)(y)),b.dump()}parse(E){const{reader:f}=this;f.reset(E),f.skip(1);const c=f.uint8(),y=f.uint32();switch(c){case m.Request:case m.Notification:{const b=f.stringOfVarUInt32(),A=this.requestHeadersSerializer.read(),S=this.getProcessor(b).readRequest();return{kind:c,requestId:y,method:b,headers:A,args:S}}case m.Error:{const b=f.stringOfVarUInt32(),A=this.responseHeadersSerializer.read(),S=(0,o.parseError)(f.stringOfVarUInt32());return{kind:m.Error,requestId:y,method:b,headers:A,error:S}}case m.Response:{const b=f.stringOfVarUInt32(),A=this.responseHeadersSerializer.read(),S=this.getProcessor(b).readResponse();return{kind:m.Response,requestId:y,method:b,headers:A,result:S}}case m.Cancel:return{kind:m.Cancel,requestId:y};default:throw new Error(`Unknown message type: ${c}`)}}}t.MessageIO=g;class d{Request(E,f,c,y){return{kind:m.Request,requestId:E,method:f,headers:c,args:y}}Notification(E,f,c,y){return{kind:m.Notification,requestId:E,method:f,headers:c,args:y}}Cancel(E){return{kind:m.Cancel,requestId:E}}Response(E,f,c,y){return{kind:m.Response,requestId:E,headers:c,method:f,result:y}}Error(E,f,c,y){return{kind:m.Error,requestId:E,method:f,headers:c,error:y}}parse(E){return E}}t.RawMessageIO=d},86058:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnectionMultiplexer=t.IRPCProtocol=t.ProxyIdentifier=void 0,t.createExtMessageIO=v;const n=e(89104),r=e(97349),o=e(76339);class l{constructor(p){this.serviceId=p,this.countId=++l.count}static for(p){return new l(p)}}t.ProxyIdentifier=l,l.count=0,t.IRPCProtocol=Symbol("IRPCProtocol");function v(m){const p=new o.MessageIO;return p.setAnySerializer(new o.AnyProtocolSerializer(p.writer,p.reader,n.ExtObjectTransfer)),m?.forEach((s,h)=>{p.loadProtocol(s,{nameConverter:a=>_.getRPCName(h.serviceId,a)})}),p}class _ extends r.SumiConnection{static getRPCName(p,s){return`${p}${_.SEP}${s}`}static extractServiceAndMethod(p){const s=p.indexOf(_.SEP);return[p.substring(0,s),p.substring(s+_.SEP_LENGTH)]}static normalizeServiceId(p){return p.replace(/\//g,"_")}constructor(p,s={}){super(p,{...s,io:s.io||v()}),this.socket=p,this.options=s,this._locals=new Map,this._proxies=new Map,this.onRequestNotFound((h,a)=>this.invoke(h,a)),this.listen()}set(p,s){const h=_.normalizeServiceId(p.serviceId);return this._locals.set(h,s),s}get(p){return this._locals.get(_.normalizeServiceId(p.serviceId))}getProxy(p){const s=_.normalizeServiceId(p.serviceId);return this._proxies.has(s)||this._proxies.set(s,this._createProxy(s)),this._proxies.get(s)}_createProxy(p){const s={get:(h,a)=>{if(typeof a=="symbol")return null;if(!h[a])if(a.charCodeAt(0)===36){const g=_.getRPCName(p,a);h[a]=(...d)=>this.sendRequest(g,...d)}else a==="toJSON"&&(h[a]=()=>{throw new Error("Cannot serialize a rpc protocol proxy object")});return h[a]}};return new Proxy(Object.create(null),s)}async invoke(p,s){const[h,a]=_.extractServiceAndMethod(p),g=this._locals.get(h);if(!g)throw new Error("Unknown actor "+h);const d=await g[a];if(typeof d!="function")throw new Error("Unknown method "+a+" on actor "+h);return d.apply(g,s)}getSocket(){return this.socket}}t.SumiConnectionMultiplexer=_,_.SEP="/",_.SEP_LENGTH=_.SEP.length},15726:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCProtocol=t.MessageIO=t.ObjectTransfer=t.ProxyIdentifier=t.IRPCProtocol=t.RPCProtocolEnv=void 0,t.createExtHostContextProxyIdentifier=l,t.createMainContextProxyIdentifier=v;const n=e(43718),r=e(86058);Object.defineProperty(t,"IRPCProtocol",{enumerable:!0,get:function(){return r.IRPCProtocol}}),Object.defineProperty(t,"ProxyIdentifier",{enumerable:!0,get:function(){return r.ProxyIdentifier}});var o;(function(h){h[h.MAIN=0]="MAIN",h[h.EXT=1]="EXT"})(o||(t.RPCProtocolEnv=o={}));function l(h){return new r.ProxyIdentifier(h)}function v(h){return new r.ProxyIdentifier(h)}var _;(function(h){function a(d,u){if(u){if(u.$mid===1)return{$type:"VSCODE_URI",data:n.Uri.revive(u).toString()};if(u instanceof Uint8Array||u instanceof Uint32Array||u instanceof Uint16Array)return{$type:"Buffer",data:Array.from(u)};if(u instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(u))};if(u.type==="Buffer")return{$type:"Buffer",data:u.data}}return u}h.replacer=a;function g(d,u){if(u&&u.$type!==void 0&&u.data!==void 0){if(u.$type==="VSCODE_URI")return n.Uri.parse(u.data);if(u.$type==="Buffer")return Uint8Array.from(u.data)}return u}h.reviver=g})(_||(t.ObjectTransfer=_={}));class m{static cancel(a,g){return`{"type":4,"id":"${a}"}`}static serializeRequest(a,g,d,u){return u=u.map(E=>{if(E instanceof Error){const f=Array.prototype.slice.call(arguments);return f[0]=E.stack,f.join(`
33877
- `)}return E}),`{"type": 1, "id": "${a}", "proxyId": "${g}", "method": "${d}", "args": ${JSON.stringify(u,_.replacer)}}`}static serializeReplyOK(a,g,d){if(typeof g>"u")return`{"type": 2, "id": "${a}"}`;try{return`{"type": 2, "id": "${a}", "res": ${JSON.stringify(g,_.replacer)}}`}catch{return d&&d.warn("res",g),`{"type": 2, "id": "${a}", "res": {}}`}}static serializeReplyError(a,g,d){try{return`{"type": 3, "id": "${a}", "res": ${JSON.stringify((0,n.transformErrorForSerialization)(g),_.replacer)}}`}catch{return d&&d.error("error",g),`{"type": 3, "id": "${a}", "res": {}}`}}}t.MessageIO=m;function p(){const h=new Error("Canceled");return h.name=h.message,h}class s{constructor(a,g){this._protocol=a,this._locals=new Map,this._proxies=new Map,this._pendingRPCReplies=new Map,this._cancellationTokenSources=new Map,this._timeoutHandles=new Map,this._lastMessageId=0,this.logger=g||console,this.logger.error("You are using the deprecated class: 'RPCProtocol'. Please use the new one: 'SumiConnectionMultiplexer'"),this._protocol.onMessage(d=>this._receiveOneMessage(d))}set(a,g){return this._locals.set(a.serviceId,g),g}get(a){return this._locals.get(a.serviceId)}getProxy(a){return this._proxies.has(a.serviceId)||this._proxies.set(a.serviceId,this._createProxy(a.serviceId)),this._proxies.get(a.serviceId)}_createProxy(a){const g={get:(d,u)=>typeof u=="symbol"?null:(!d[u]&&u.charCodeAt(0)===36&&(d[u]=(...E)=>this._remoteCall(a,u,E)),d[u])};return new Proxy(Object.create(null),g)}_remoteCall(a,g,d){const u=d.length&&n.CancellationToken.isCancellationToken(d[d.length-1])?d.pop():void 0;if(u&&u.isCancellationRequested)return Promise.reject(p());const E=String(++this._lastMessageId),f=new n.Deferred;u&&(d.push("add.cancellation.token"),u.onCancellationRequested(()=>this._protocol.send(m.cancel(E)))),this._pendingRPCReplies.set(E,f);const c=m.serializeRequest(E,a,g,d);if(this._protocol.send(c),this._protocol.timeout&&this._protocol.timeout!==-1){const y=setTimeout(()=>{this._handleTimeout(E)},this._protocol.timeout);this._timeoutHandles.set(E,y)}return f.promise}_receiveOneMessage(a){const g=JSON.parse(a,_.reviver);switch(this._timeoutHandles.has(g.id)&&(typeof clearTimeout=="function"&&clearTimeout(this._timeoutHandles.get(g.id)),this._timeoutHandles.delete(g.id)),g.type){case 1:this._receiveRequest(g);break;case 2:this._receiveReply(g);break;case 4:this._receiveCancel(g);break;case 3:this._receiveError(g);break}}_receiveCancel(a){const g=this._cancellationTokenSources.get(a.id);g&&g.cancel()}_receiveError(a){const g=a.id;if(!this._pendingRPCReplies.has(g))return;const d=this._pendingRPCReplies.get(g);this._pendingRPCReplies.delete(g);let u;a.res&&(a.res.$isError?(u=new Error,u.name=a.res.name,u.message=a.res.message,u.stack=a.res.stack):u=a.res),d.reject(u)}_receiveRequest(a){const g=a.id,d=a.proxyId,u=a.method,E=a.args.map(y=>y===null?void 0:y);if(E.length&&E[E.length-1]==="add.cancellation.token"?E.pop():!1){const y=new n.CancellationTokenSource;this._cancellationTokenSources.set(g,y),E.push(y.token)}this._invokeHandler(d,u,E).then(y=>{this._protocol.send(m.serializeReplyOK(g,y)),this._cancellationTokenSources.delete(g)}).catch(y=>{this._protocol.send(m.serializeReplyError(g,y)),this._cancellationTokenSources.delete(g)})}_invokeHandler(a,g,d){try{return this._doInvokeHandler(a,g,d)}catch(u){return Promise.reject(u)}}async _doInvokeHandler(a,g,d){const u=this._locals.get(a);if(!u)throw new Error("Unknown actor "+a);const E=await u[g];if(typeof E!="function")throw new Error("Unknown method "+g+" on actor "+a);return E.apply(u,d)}_receiveReply(a){const g=a.id;if(!this._pendingRPCReplies.has(g))return;const d=this._pendingRPCReplies.get(g);this._pendingRPCReplies.delete(g),d.resolve(a.res)}_handleTimeout(a){if(!this._pendingRPCReplies.has(a)||!this._timeoutHandles.has(a))return;const g=this._pendingRPCReplies.get(a);this._pendingRPCReplies.delete(a),this._timeoutHandles.delete(a),g.reject(new Error("RPC Timeout: "+a))}}t.RPCProtocol=s},64592:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furySerializer=t.CloseProtocol=t.BinaryProtocol=t.DataProtocol=t.ErrorProtocol=t.ServerReadyProtocol=t.OpenProtocol=t.PongProtocol=t.PingProtocol=void 0;const n=e(26387),r=e(94846);function o(){return{id:n.Type.string()}}t.PingProtocol=n.Type.object("ping",{...o()}),t.PongProtocol=n.Type.object("pong",{...o()}),t.OpenProtocol=n.Type.object("open",{...o(),clientId:n.Type.string(),path:n.Type.string(),traceId:n.Type.string()}),t.ServerReadyProtocol=n.Type.object("server-ready",{...o(),traceId:n.Type.string()}),t.ErrorProtocol=n.Type.object("error",{...o(),code:n.Type.uint16(),message:n.Type.string()}),t.DataProtocol=n.Type.object("data",{...o(),content:n.Type.string()}),t.BinaryProtocol=n.Type.object("binary",{...o(),binary:n.Type.binary()}),t.CloseProtocol=n.Type.object("close",{...o(),code:n.Type.uint32(),reason:n.Type.string()});const l=(0,r.oneOf)([t.PingProtocol,t.PongProtocol,t.OpenProtocol,t.ServerReadyProtocol,t.DataProtocol,t.BinaryProtocol,t.CloseProtocol,t.ErrorProtocol]);t.furySerializer=l},54558:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapSerializer=void 0;const n=e(85608);n.__exportStar(e(64592),t),n.__exportStar(e(43620),t),n.__exportStar(e(41619),t);const r=(o,l)=>({onceClose(v){return o.onceClose(v)},onMessage(v){return o.onMessage(_=>{v(l.deserialize(_))})},send(v){o.send(l.serialize(v))}});t.wrapSerializer=r},43620:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rawSerializer=void 0,t.rawSerializer={serialize:e=>e,deserialize:e=>e}},41619:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},76271:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceChannelPath=t.BaseCommonChannelHandler=t.CommonChannelPathHandler=void 0,t.injectConnectionProviders=m;const n=e(39048),r=e(54558),o=e(47561);class l{constructor(){this.handlerMap=new Map,this.paramsKey=new Map}register(s,h){const a=s.indexOf("/:"),g=a>=0;let d=s;g&&(d=s.slice(0,a),this.paramsKey.set(d,s.slice(a+2))),this.handlerMap.has(d)||this.handlerMap.set(d,[]);const u=this.handlerMap.get(d),E=h.handler.bind(h),f=(c,y,b)=>{h.connection=c,E(c,y,b)};h.handler=f,u.push(h),this.handlerMap.set(d,u)}getParams(s,h){const a={};if(this.paramsKey.has(s)){const g=this.paramsKey.get(s);g&&(a[g]=h)}return a}removeHandler(s,h){const a=s.indexOf(":"),g=a>=0;let d=s;g&&(d=s.slice(0,a));const u=this.handlerMap.get(d)||[],E=u.indexOf(h);E!==-1&&u.splice(E,1),this.handlerMap.set(s,u)}get(s){return this.handlerMap.get(s)}disposeConnectionClientId(s,h){this.handlerMap.forEach(a=>{a.forEach(g=>{g.dispose(s,h)})})}openChannel(s,h,a){let g=this.get(s),d;if(!g){const u=s.indexOf("/");u>=0&&(g=this.get(s.slice(0,u)),d=this.getParams(s.slice(0,u),s.slice(u+1)))}if(g)for(let u=0,E=g.length;u<E;u++)g[u].handler(h,a,d)}getAll(){return Array.from(this.handlerMap.values())}}t.CommonChannelPathHandler=l;var v;(function(p){p[p.ConnectionClosed=1]="ConnectionClosed",p[p.NewChannelOpened=2]="NewChannelOpened"})(v||(v={}));class _{constructor(s,h,a=console,g={}){this.handlerId=s,this.commonChannelPathHandler=h,this.logger=a,this.channelMap=new Map,this.heartbeatTimer=null,this.serializer=r.furySerializer,g.serializer&&(this.serializer=g.serializer)}heartbeat(s){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.heartbeatTimer=setTimeout(()=>{this.doHeartbeat(s),this.heartbeat(s)},5e3)}receiveConnection(s){let h;this.heartbeat(s);const a=(0,r.wrapSerializer)(s,this.serializer);a.onMessage(g=>{try{switch(g.kind){case"open":{const{id:d,path:u,traceId:E}=g;h=g.clientId,this.logger.log(`open a new connection channel ${h} with path ${u}`);let f=this.channelMap.get(d);f&&(f.close(v.NewChannelOpened,"new channel opened for the same channel id"),f.dispose()),f=new o.WSServerChannel(a,{id:d,clientId:h,logger:this.logger}),this.channelMap.set(d,f),this.commonChannelPathHandler.openChannel(u,f,h),f.serverReady(E);break}default:{const{id:d}=g,u=this.channelMap.get(d);u?u.dispatch(g):(a.send({kind:"error",id:d,code:n.ErrorMessageCode.ChannelNotFound,message:`channel ${d} not found`}),this.logger.warn(`channel ${d} is not found`))}}}catch(d){this.logger.error("handle connection message error",d)}}),s.onceClose(()=>{this.logger.log(`connection ${h} is closed, dispose all channels`),this.commonChannelPathHandler.disposeConnectionClientId(s,h),Array.from(this.channelMap.values()).filter(g=>g.clientId===h).forEach(g=>{g.close(v.ConnectionClosed,"connection closed"),g.dispose(),this.channelMap.delete(g.id),this.logger.log(`Remove connection channel ${g.id}`)})})}dispose(){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer)}}t.BaseCommonChannelHandler=_,t.RPCServiceChannelPath="RPCService";function m(p){const s=new l;p.addProviders({token:l,useValue:s})}},8140:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceType=void 0;var e;(function(n){n[n.Service=0]="Service",n[n.Stub=1]="Stub"})(e||(t.ServiceType=e={}))},47561:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSServerChannel=t.WSChannel=void 0;const n=e(40396),r=e(43718),o=e(39048),l=e(97349);var v;(function(s){s[s.ReSend=0]="ReSend",s[s.Sended=1]="Sended",s[s.Success=2]="Success",s[s.Failed=3]="Failed"})(v||(v={}));class _{constructor(){this.map=new Map,this.deliveryTimeout=500,this.timerMap=new Map}setDeliveryTimeout(h){this.deliveryTimeout=h}set(h,a){this.map.set(h,a)}get(h){return this.map.get(h)}success(h){this.map.set(h,v.Success);const a=this.timerMap.get(h);a&&clearTimeout(a)}dispose(){this.timerMap.forEach(h=>{clearTimeout(h)})}stop(h){const a=this.timerMap.get(h);a&&clearTimeout(a)}send(h,a){this.set(h,v.Sended),this.guard(h,a)}guard(h,a){const g=this.timerMap.get(h);g&&clearTimeout(g);const d=setTimeout(()=>{this.set(h,v.ReSend),a.whenRetry()},this.deliveryTimeout);this.timerMap.set(h,d)}}class m{constructor(h,a){this.connection=h,this._disposables=new r.DisposableStore,this.emitter=this._disposables.add(new n.EventEmitter),this.onBinaryQueue=this._disposables.add(new r.EventQueue),this.sendQueue=[],this._isServerReady=!1,this.stateTracer=new _,this.LOG_TAG="[WSChannel]",this.logger=console;const{id:g,logger:d,ensureServerReady:u}=a;this.id=g,this.LOG_TAG=`[WSChannel id:${this.id}]`,d&&(this.logger=d),this._ensureServerReady=!!u,a.deliveryTimeout&&this.stateTracer.setDeliveryTimeout(a.deliveryTimeout),this._disposables.add(this.emitter.on("binary",E=>this.onBinaryQueue.push(E)))}inqueue(h){if(this._ensureServerReady&&!this._isServerReady){this.sendQueue||(this.sendQueue=[]),this.sendQueue.push(h);return}this.connection.send(h)}ensureMessageDeliveried(h,a=(0,r.randomString)(16)){const g=this.stateTracer.get(a);if(g&&g>=v.Sended){this.logger.error(`message already send already success or in progress, traceId: ${a}, state: ${g}`);return}h.traceId=a,this.connection.send(h),this.stateTracer.send(a,{whenRetry:()=>{if(this._isServerReady){this.stateTracer.stop(a);return}this.ensureMessageDeliveried(h,a)}})}onMessage(h){return this.emitter.on("message",h)}onBinary(h){return this.onBinaryQueue.on(h)}onOpen(h){return this.emitter.on("open",h)}onReopen(h){return this.emitter.on("reopen",h)}pause(){this._isServerReady=!1}onServerReady(h){if(this._isServerReady){h();return}return this.emitter.on("open",h)}resume(){if(this._isServerReady=!0,this.sendQueue){for(const h of this.sendQueue)this.connection.send(h);this.sendQueue=[]}}dispatch(h){switch(h.kind){case"server-ready":h.traceId&&this.stateTracer.success(h.traceId),this.resume(),this.emitter.emit("open",h.id);break;case"data":this.emitter.emit("message",h.content);break;case"binary":this.emitter.emit("binary",h.binary);break;case"error":switch(this.logger.error(this.LOG_TAG,`receive error: id: ${h.id}, code: ${h.code}, error: ${h.message}`),h.code){case o.ErrorMessageCode.ChannelNotFound:this.channelPath&&(this.pause(),this.open(this.channelPath,this.clientId));break}break}}open(h,a){this.channelPath=h,this.clientId=a,this.LOG_TAG=`[WSChannel id=${this.id} path=${h}]`;const g={kind:"open",id:this.id,path:h,clientId:a};this._ensureServerReady?this.ensureMessageDeliveried(g):this.connection.send(g)}send(h){this.inqueue({kind:"data",id:this.id,content:h})}sendBinary(h){this.inqueue({kind:"binary",id:this.id,binary:h})}onError(){}close(h,a){this.pause(),this.emitter.emit("close",h,a)}fireReopen(){this.emitter.emit("reopen")}onClose(h){return this.emitter.on("close",h)}onceClose(h){return this.emitter.once("close",h)}createConnection(){return{onceClose:h=>this.onceClose(h),onMessage:h=>this.onBinary(h),send:h=>{this.sendBinary(h)},dispose(){}}}createSumiConnection(h={}){return new l.SumiConnection(this.createConnection(),h)}dispose(){this.stateTracer.dispose(),this.sendQueue=[],this._disposables.dispose()}ping(){this.connection.send({kind:"ping",id:this.id})}}t.WSChannel=m;class p extends m{constructor(h,a){super(h,a),this.connection=h,this.messageQueue=[],this.clientId=a.clientId}serverReady(h){this.connection.send({kind:"server-ready",id:this.id,traceId:h})}dispatch(h){switch(h.kind){case"data":this.emitter.emit("message",h.content);break;case"binary":this.emitter.emit("binary",h.binary);break;case"ping":this.connection.send({kind:"pong",id:this.id});break}}}t.WSServerChannel=p},8919:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(25285),t)},70650:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AINativeConfigService=void 0;const n=e(85608),r=e(76003),o=e(89195),l=e(1149),v=e(11050),_={supportsMarkers:!0,supportsChatAssistant:!0,supportsCodeAction:!0,supportsInlineChat:!0,supportsInlineCompletion:!0,supportsConflictResolve:!0,supportsRenameSuggestions:!0,supportsProblemFix:!0,supportsTerminalDetection:!0,supportsTerminalCommandSuggest:!0,supportsCustomLLMSettings:!0,supportsMCP:!0,supportsAgentMode:!0},m={};Object.keys(_).forEach(a=>{m[a]=!1});const p={inputWidth:320,inputKeybinding:"ctrlcmd+k",logo:o.AILogoAvatar},s={triggerKeybinding:"alt+\\"};let h=class{constructor(){this.aiModuleLoaded=!1,this.internalCapabilities=_,this.internalInlineChat=p,this.internalCodeEdits=s}get capabilities(){if(!this.aiModuleLoaded)return m;const{AINativeConfig:g}=this.appConfig;return g?.capabilities?{...this.internalCapabilities,...g.capabilities}:this.internalCapabilities}get inlineChat(){const{AINativeConfig:g}=this.appConfig;return g?.inlineChat?{...this.internalInlineChat,...g.inlineChat}:this.internalInlineChat}get codeEdits(){const{AINativeConfig:g}=this.appConfig;return g?.codeEdits?{...this.internalCodeEdits,...g.codeEdits}:this.internalCodeEdits}setAINativeModuleLoaded(g){this.aiModuleLoaded=g}};t.AINativeConfigService=h,n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],h.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(l.LayoutViewSizeConfig),n.__metadata("design:type",l.LayoutViewSizeConfig)],h.prototype,"layoutViewSize",void 0),t.AINativeConfigService=h=n.__decorate([(0,r.Injectable)()],h)},41480:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIReporter=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(52664);let v=class{constructor(){this.reportInfoCache=new Map,this.reporterCancelHandler=new Map}getRelationId(){return(0,o.uuid)()}getCacheReportInfo(m){return this.reportInfoCache.get(m)}getCommonReportInfo(){return{}}start(m,p,s=60*1e3){const h=this.getRelationId();this.report(h,{...p,msgType:m,isStart:!0});const a=setTimeout(()=>{this.report(h,{...p,success:!1})},s);return this.reporterCancelHandler.set(h,a),h}end(m,p){const s=this.reporterCancelHandler.get(m);s&&clearTimeout(s),this.report(m,{success:!0,...p,isStart:!1})}send(m){this.reporter.point(l.AI_REPORTER_NAME,m.msgType,m)}record(m,p){p||(p=this.getRelationId());const s=this.reportInfoCache.get(p)||{},h={...this.getCommonReportInfo(),...s,...m,relationId:p};return this.reportInfoCache.set(p,h),h}report(m,p){const s=this.record(p,m);this.reporter.point(l.AI_REPORTER_NAME,p.msgType||s.msgType,s)}};t.AIReporter=v,n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],v.prototype,"reporter",void 0),t.AIReporter=v=n.__decorate([(0,r.Injectable)()],v)},57925:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AI_CODE_EDITS_COMMANDS=t.AI_CODE_ACTION=t.AI_CHAT_VISIBLE=t.AI_INLINE_COMPLETION_REPORTER=t.AI_INLINE_DIFF_PARTIAL_EDIT=t.AI_INLINE_COMPLETION_VISIBLE=t.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL=t.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE=t.AI_INLINE_CHAT_VISIBLE=void 0,t.AI_INLINE_CHAT_VISIBLE={id:"ai.inlineChat.visible"},t.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE={id:"ai.inlineChat.interactiveInput.visible"},t.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL={id:"ai.inlineChat.interactiveInput.cancel"},t.AI_INLINE_COMPLETION_VISIBLE={id:"ai.inline.completion.visible"},t.AI_INLINE_DIFF_PARTIAL_EDIT={id:"ai.inline.diff.partial.edit"},t.AI_INLINE_COMPLETION_REPORTER={id:"ai.inline.completion.reporter"},t.AI_CHAT_VISIBLE={id:"ai.chat.visible"},t.AI_CODE_ACTION={id:"ai.code.action"};var e;(function(n){n.DISCARD={id:"ai.codeEdits.discard"},n.ACCEPT={id:"ai.codeEdits.accept"},n.TRIGGER={id:"ai.codeEdits.trigger"}})(e||(t.AI_CODE_EDITS_COMMANDS=e={}))},38070:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeConflictReportService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(70650);let v=class extends o.Disposable{constructor(){super(...arguments),this.reportInfoMap=new Map,this.unique2RelationMap=new Map}record(m,p){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return p;let s="";return this.unique2RelationMap.has(m)?(s=this.unique2RelationMap.get(m),this.aiReporter.record(p,s)):(s=this.aiReporter.record({...p,msgType:o.AIServiceType.MergeConflict,message:o.AIServiceType.MergeConflict,editorMode:p.editorMode||o.MergeConflictEditorMode.traditional}).relationId,this.unique2RelationMap.set(m,s)),{...p,relationId:s}}report(m,p){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.record(m,p);this.aiReporter.end(s.relationId,s)}reportIncrementNum(m,p){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.unique2RelationMap.get(m);if(!s)return;const h=this.aiReporter.getCacheReportInfo(s)[p]||0;this.report(m,{[p]:h+1})}dispose(){super.dispose(),this.reportInfoMap.clear()}};t.MergeConflictReportService=v,n.__decorate([(0,r.Autowired)(l.AINativeConfigService),n.__metadata("design:type",l.AINativeConfigService)],v.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,r.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],v.prototype,"aiReporter",void 0),t.MergeConflictReportService=v=n.__decorate([(0,r.Injectable)()],v)},95040:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IAIInlineChatService=void 0,e(85608).__exportStar(e(70650),t),t.IAIInlineChatService=Symbol("IAIInlineChatService")},12956:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppStateService=t.ClientAppStateEvent=void 0;const n=e(85608),r=e(76003),o=e(43718);class l extends o.BasicEvent{}t.ClientAppStateEvent=l;let v=class{constructor(){this._state="init",this.deferred={}}get state(){return this._state}set state(m){m!==this._state&&(this._state=m,this.deferred[m]===void 0&&(this.deferred[m]=new o.Deferred),this.deferred[m].resolve(),this.eventBus.fire(new l(m)))}reachedState(m){return this.deferred[m]===void 0&&(this.deferred[m]=new o.Deferred),this.deferred[m].promise}reachedAnyState(...m){return Promise.race(m.map(p=>this.reachedState(p)))}};t.ClientAppStateService=v,n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],v.prototype,"eventBus",void 0),t.ClientAppStateService=v=n.__decorate([(0,r.Injectable)()],v)},59555:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationService=void 0;const n=e(85608),r=e(76003),o=e(59019),l=e(43718),v=e(11050),_=e(42101);let m=class{constructor(){this._initialized=new l.Deferred}async initializeData(){this._backendOS=await this.commonServer.getBackendOS(),this._initialized.resolve()}get frontendOS(){return l.OS.type()}get backendOS(){if(this._backendOS)return this._backendOS;if(this.appConfig.isElectronRenderer)return this.frontendOS;throw new Error("Can't get backend os type before initialize, if you want wait to get backend os, please use async method: getBackendOS")}async getBackendOS(){return await this._initialized.promise,this.backendOS}get clientId(){return this.injector.get(o.WSChannelHandler).clientId}get windowId(){return this.appConfig.isElectronRenderer?_.electronEnv.currentWindowId:this.injector.get(o.WSChannelHandler).clientId}};t.ApplicationService=m,n.__decorate([(0,r.Autowired)(l.CommonServerPath),n.__metadata("design:type",Object)],m.prototype,"commonServer",void 0),n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),t.ApplicationService=m=n.__decorate([(0,r.Injectable)()],m)},16884:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(12956),t),n.__exportStar(e(59555),t)},22914:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(18740),l=e(43718),v=e(32796),_=e(38578),m=(0,l.getDebugLogger)();let p=class{async createRPCServiceChannel(h){var a;const g=this.createConnection(),d=(a=this.appConfig.clientId)!==null&&a!==void 0?a:this.getDefaultClientId(),u=new o.WSChannelHandler(g,d,{logger:m});return(0,v.createConnectionService)(this.injector,h,u)}};t.BaseConnectionHelper=p,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(_.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(l.IReporterService),n.__metadata("design:type",Object)],p.prototype,"reporterService",void 0),t.BaseConnectionHelper=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},41320:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRuntime=void 0;const n=e(85608),r=e(76003),o=e(44142),l=e(6858),v=e(53206);let _=class extends l.RendererRuntime{constructor(){super(...arguments),this.runtimeName=o.ESupportRuntime.Web}registerRuntimeModuleProviders(p,s){s.webProviders&&p.addProviders(...s.webProviders)}registerRuntimeInnerProviders(p){(0,v.injectBrowserInnerProviders)(p)}};t.BrowserRuntime=_,t.BrowserRuntime=_=n.__decorate([(0,r.Injectable)()],_)},53206:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectBrowserInnerProviders=o;const n=e(93899),r=e(97222);function o(l){l.addProviders({token:n.ICtxMenuRenderer,useClass:r.BrowserCtxMenuRenderer})}},55267:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.WebConnectionHelper=void 0;const r=e(85608),o=e(76003),l=e(91493),v=e(43718),_=e(22914);let m=n=class extends _.BaseConnectionHelper{constructor(s){super(),this.options=s,this.clientId=n.clientIdFactory()}getDefaultClientId(){return this.clientId}createConnection(){return l.ReconnectingWebSocketConnection.forURL(this.options.connectionPath,this.options.connectionProtocols)}static clientIdFactory(){return`CLIENT_ID_${(0,v.uuid)()}`}};t.WebConnectionHelper=m,t.WebConnectionHelper=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object])],m)},44142:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onigWasmCDNUri=t.ESupportRuntime=void 0;var e;(function(n){n.Electron="electron",n.Web="web"})(e||(t.ESupportRuntime=e={})),t.onigWasmCDNUri="https://g.alicdn.com/kaitian/vscode-oniguruma-wasm/1.5.1/onig.wasm"},59574:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronRendererRuntime=void 0;const n=e(85608),r=e(76003),o=e(38578),l=e(42101),v=e(44142),_=e(6858),m=e(38892);let p=class extends _.RendererRuntime{constructor(){super(...arguments),this.runtimeName=v.ESupportRuntime.Electron}registerRuntimeModuleProviders(a,g){g.electronProviders&&a.addProviders(...g.electronProviders)}registerRuntimeInnerProviders(a){(0,m.injectElectronInnerProviders)(a)}mergeAppConfig(a){return s(a)}async provideResourceUri(a){switch(a){case _.EKnownResources.OnigWasm:return l.electronEnv.onigWasmUri||this.appConfig.onigWasmUri||v.onigWasmCDNUri;case _.EKnownResources.TreeSitterWasmDirectory:return l.electronEnv.treeSitterWasmDirectoryUri||this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${a}`)}}};t.ElectronRendererRuntime=p,t.ElectronRendererRuntime=p=n.__decorate([(0,r.Injectable)()],p);function s(h){var a;const g=(a=l.electronEnv.metadata)!==null&&a!==void 0?a:{},d={...h,appRoot:h.appRoot||l.electronEnv.appPath,extensionDir:h.extensionDir||g.extensionDir};return g.extensionDevelopmentHost&&(h.extensionDevelopmentHost=g.extensionDevelopmentHost),g.extensionCandidate&&(h.extensionCandidate=(h.extensionCandidate||[]).concat(l.electronEnv.metadata.extensionCandidate||[])),d}},38892:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectElectronInnerProviders=m;const n=e(43718),r=e(37406),o=e(93899),l=e(27790),v=e(11050),_=e(42101);function m(p){const s=p.get(v.AppConfig);p.addProviders({token:n.IElectronMainMenuService,useValue:(0,_.createElectronMainApi)(n.IElectronMainMenuService,s.devtools)},{token:r.IElectronMainUIService,useValue:(0,_.createElectronMainApi)(r.IElectronMainUIService,s.devtools)},{token:r.IElectronMainLifeCycleService,useValue:(0,_.createElectronMainApi)(r.IElectronMainLifeCycleService,s.devtools)},{token:r.IElectronURLService,useValue:(0,_.createElectronMainApi)(r.IElectronURLService,s.devtools)},{token:l.IElectronMenuFactory,useClass:l.ElectronMenuFactory},{token:l.IElectronMenuBarService,useClass:l.ElectronMenuBarService},{token:o.ICtxMenuRenderer,useClass:l.ElectronCtxMenuRenderer})}},63977:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(42101),l=e(22914);let v=class extends l.BaseConnectionHelper{getDefaultClientId(){return o.electronEnv.metadata.windowClientId}createConnection(){return(0,o.createNetSocketConnection)()}};t.ElectronConnectionHelper=v,t.ElectronConnectionHelper=v=n.__decorate([(0,r.Injectable)({multiple:!0})],v)},18379:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionHelperFactory=_;const n=e(85608),r=e(38578),o=e(55267),l=e(44142),v=e(63977);n.__exportStar(e(55267),t),n.__exportStar(e(63977),t),n.__exportStar(e(22914),t),n.__exportStar(e(44142),t);function _(m){return p=>{const s=m.get(r.AppConfig);let h;switch(p){case l.ESupportRuntime.Electron:h=m.get(v.ElectronConnectionHelper);break;case l.ESupportRuntime.Web:h=m.get(o.WebConnectionHelper,[{connectionPath:s.connectionPath,connectionProtocols:s.connectionProtocols}]);break;default:throw new Error(`Unknown backend type: ${p}`)}return h}}},6858:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RendererRuntime=t.EKnownResources=void 0;const n=e(85608),r=e(76003),o=e(11050),l=e(44142);var v;(function(m){m.OnigWasm="wasm:onig",m.TreeSitterWasmDirectory="wasm:tree-sitter"})(v||(t.EKnownResources=v={}));let _=class{mergeAppConfig(p){return p}async provideResourceUri(p){switch(p){case v.OnigWasm:return this.appConfig.onigWasmUri||l.onigWasmCDNUri;case v.TreeSitterWasmDirectory:return this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${p}`)}}};t.RendererRuntime=_,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),t.RendererRuntime=_=n.__decorate([(0,r.Injectable)()],_)},37638:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(66549);let v=class{onStart(){this.authenticationService.initialize()}registerCommands(m){m.registerCommand({id:o.noAccountsId,label:"%authentication.noAccounts%"},{execute:()=>{}})}};t.AuthenticationContribution=v,n.__decorate([(0,r.Autowired)(o.IAuthenticationService),n.__metadata("design:type",Object)],v.prototype,"authenticationService",void 0),t.AuthenticationContribution=v=n.__decorate([(0,o.Domain)(l.ClientAppContribution,o.CommandContribution)],v)},10605:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(93899);let v=class extends o.Disposable{constructor(){super(...arguments),this._onDidRegisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidRegisterAuthenticationProvider=this._onDidRegisterAuthenticationProvider.event,this._onDidUnregisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidUnregisterAuthenticationProvider=this._onDidUnregisterAuthenticationProvider.event,this._onDidChangeSessions=this.registerDispose(new o.Emitter),this.onDidChangeSessions=this._onDidChangeSessions.event,this._authenticationProviders=new Map,this._signInRequestItems=new Map}async initialize(){this._storage=await this.getStorage(new o.URI("authentication").withScheme(o.STORAGE_SCHEMA.GLOBAL));const m=new Map;this.onDidChangeSessions(async p=>{if(p.event.added.length>0){const s=await this.getSessions(p.providerId);s.forEach(h=>{if(s.find(b=>m.get(b.id)))return;const a=new o.DisposableCollection,g=`account-sign-out-${p.providerId}-${h.id}`,d=this.commands.registerCommand({id:g,label:(0,o.formatLocalize)("authentication.signOut",p.label)},{execute:async()=>{await this.signOutOfAccount(p.providerId,h.account.label)}}),u=`manage-trusted-${p.providerId}-${h.id}`,E=this.commands.registerCommand({id:u,label:"%authentication.manageTrustedExtensions%"},{execute:async()=>{await this.manageTrustedExtensionsForAccount(p.providerId,h.account.label)}}),f=`${p.providerId}${h.account.label}`,c=this.menus.registerMenuItem(l.MenuId.AccountsContext,{submenu:f,label:`${h.account.label} (${p.label})`}),y=this.menus.registerMenuItems(f,[{command:u},{command:g}]);a.push(c),a.push(y),a.push(d),a.push(E),m.set(h.id,a)})}p.event.removed.length>0&&p.event.removed.forEach(s=>{const h=m.get(s.id);h&&(h.dispose(),m.delete(s.id))})})}get storage(){return this._storage}registerAuthenticationProvider(m,p){this._authenticationProviders.set(m,p),this._onDidRegisterAuthenticationProvider.fire({id:m,label:p.label}),this.updateAccountsMenuItem()}async sessionsUpdate(m,p){const s=this._authenticationProviders.get(m);s&&(this._onDidChangeSessions.fire({providerId:m,label:s.label,event:p}),await s.updateSessionItems(p),this.updateAccountsMenuItem(),p.added&&await this.updateNewSessionRequests(s))}async updateNewSessionRequests(m){const p=this._signInRequestItems.get(m.id);if(!p)return;const s=await m.getSessions();Object.keys(p).forEach(h=>{if(s.some(a=>a.scopes.slice().sort().join("")===h)){const a=p[h];a&&a.disposables.forEach(g=>g.dispose()),delete p[h],Object.keys(p).length===0?this._signInRequestItems.delete(m.id):this._signInRequestItems.set(m.id,p)}})}getTrustedKey(m,p){return`trusted-${m}-${p}`}async getAllowedExtensions(m,p){const s=this.getTrustedKey(m,p);let h=[];try{const a=await this.storage.get(s);a&&(h=JSON.parse(a))}catch(a){this.logger.warn("read allow extensions error: "+a)}return h}async setAllowedExtensions(m,p,s){const h=this.getTrustedKey(m,p);await this.storage.set(h,JSON.stringify(s))}async removeAllowedExtensions(m,p){const s=this.getTrustedKey(m,p);await this.storage.delete(s)}async updatedAllowedExtension(m,p,s,h,a){const g=await this.getAllowedExtensions(m,p),d=g.findIndex(u=>u.id===s);d===-1?g.push({id:s,name:h,allowed:a}):g[d].allowed=a,await this.setAllowedExtensions(m,p,g)}async isAccessAllowed(m,p,s){const a=(await this.getAllowedExtensions(m,p)).find(g=>g.id===s);return a?a.allowed!==void 0?a.allowed:!0:!1}async tryActivateProvider(m){await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onView",data:m}));let p=this._authenticationProviders.get(m);if(p)return p;const s=new Promise((a,g)=>{this.onDidRegisterAuthenticationProvider(d=>{if(d.id===m)if(p=this._authenticationProviders.get(m),p)a(p);else throw new Error(`No authentication provider '${m}' is currently registered.`)})}),h=new Promise((a,g)=>{setTimeout(()=>{g(new Error(`didRegister ${m} timeout`))},5e3)});return Promise.race([s,h])}async getSessions(m,p,s,h){try{return await(this._authenticationProviders.get(m)||await this.tryActivateProvider(m)).getSessions(p,h)}catch{throw new Error(`No authentication provider '${m}' is currently registered.`)}}isAuthenticationProviderRegistered(m){return this._authenticationProviders.has(m)}getProviderIds(){const m=[];return this._authenticationProviders.forEach(p=>{m.push(p.id)}),m}unregisterAuthenticationProvider(m){const p=this._authenticationProviders.get(m);p&&(p.dispose(),this._authenticationProviders.delete(m),this._onDidUnregisterAuthenticationProvider.fire({id:m,label:p.label}),this.updateAccountsMenuItem())}updateAccountsMenuItem(){let m=!1;this._authenticationProviders.forEach(p=>{m=m||p.hasSessions()}),m&&this._noAccountsMenuItem&&(this._noAccountsMenuItem.dispose(),this._noAccountsMenuItem=void 0),!m&&!this._noAccountsMenuItem&&(this._noAccountsMenuItem=this.menus.registerMenuItem(l.MenuId.AccountsContext,{group:"0_accounts",command:o.noAccountsId}))}async requestNewSession(m,p,s,h,a){let g=this._authenticationProviders.get(m);if(g||await new Promise((d,u)=>{this.onDidRegisterAuthenticationProvider(E=>{E.id===m&&(g=this._authenticationProviders.get(m),d())})}),g){const d=this._signInRequestItems.get(m),u=p.sort().join("");if(d&&d[u]&&d[u].requestingExtensionIds.includes(h))return;const f=this.commands.registerCommand({id:`${h}signIn`,label:(0,o.formatLocalize)("authentication.signInRequests",a)},{execute:async()=>{const y=await this.login(m,p,s),b=y.account.label,A=await this.getAllowedExtensions(m,b);A.find(S=>S.id===h)||(A.push({id:h,name:a}),await this.setAllowedExtensions(m,b,A)),await this.setExtensionSessionId(a,m,y.id)}}),c=this.menus.registerMenuItem(l.MenuId.AccountsContext,{group:"2_signInRequests",command:`${h}signIn`});if(d){const y=d[u]||{disposables:[],requestingExtensionIds:[]};d[u]={disposables:[...y.disposables,c,f],requestingExtensionIds:[...y.requestingExtensionIds,h]},this._signInRequestItems.set(m,d)}else this._signInRequestItems.set(m,{[u]:{disposables:[c,f],requestingExtensionIds:[h]}})}}getLabel(m){const p=this._authenticationProviders.get(m);if(p)return p.label;throw new Error(`No authentication provider '${m}' has been declared.`)}supportsMultipleAccounts(m){const p=this._authenticationProviders.get(m);if(p)return p.supportsMultipleAccounts;throw new Error(`No authentication provider '${m}' is currently registered.`)}async login(m,p,s){try{return await(this._authenticationProviders.get(m)||await this.tryActivateProvider(m)).login(p,s)}catch(h){throw new Error(`No authentication provider '${m}' is currently registered, error messge: ${h.message}`)}}logout(m,p){const s=this._authenticationProviders.get(m);if(s)return s.logout(p);throw new Error(`No authentication provider '${m}' is currently registered.`)}manageTrustedExtensionsForAccount(m,p){const s=this._authenticationProviders.get(m);if(s)return s.manageTrustedExtensions(p);throw new Error(`No authentication provider '${m}' is currently registered.`)}signOutOfAccount(m,p){const s=this._authenticationProviders.get(m);if(s)return s.signOut(p);throw new Error(`No authentication provider '${m}' is currently registered.`)}getUsagesKey(m,p){return`usages-${m}-${p}`}async getAccountUsages(m,p){const s=this.getUsagesKey(m,p),h=await this.storage.get(s);let a=[];if(h)try{a=JSON.parse(h)}catch(g){this.logger.warn("parse account usages error: "+g)}return a}async addAccountUsage(m,p,s,h){const a=this.getUsagesKey(m,p),g=await this.getAccountUsages(m,p),d=g.findIndex(u=>u.extensionId===s);d>-1?g.splice(d,1,{extensionId:s,extensionName:h,lastUsed:Date.now()}):g.push({extensionId:s,extensionName:h,lastUsed:Date.now()}),await this.storage.set(a,JSON.stringify(g))}async removeAccountUsage(m,p){const s=this.getUsagesKey(m,p);await this.storage.delete(s)}getExtensionSessionIdKey(m,p){return`session-${m}-${p}`}async getExtensionSessionId(m,p){const s=this.getExtensionSessionIdKey(m,p);return await this.storage.get(s)}async setExtensionSessionId(m,p,s){const h=this.getExtensionSessionIdKey(m,p);await this.storage.set(h,s)}async removeExtensionSessionId(m,p){const s=this.getExtensionSessionIdKey(m,p);await this.storage.delete(s)}};t.AuthenticationService=v,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],v.prototype,"getStorage",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],v.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(l.IMenuRegistry),n.__metadata("design:type",l.IMenuRegistry)],v.prototype,"menus",void 0),n.__decorate([(0,r.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],v.prototype,"commands",void 0),t.AuthenticationService=v=n.__decorate([(0,r.Injectable)()],v)},72746:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},33916:(P,t,e)=>{"use strict";var n;n={value:!0},t.j=void 0,e(37533);const r=e(76003),o=e(43718),l=e(4588),v=e(37406),_=e(16884),m=e(18379),p=e(41320),s=e(59574),h=e(6858),a=e(36206),g=e(66963),d=e(18193),u=e(41118),E=e(1149),f=e(11949),c=e(64102),y=e(78132),b=e(11050),A=e(67304),S=e(79951),w=e(79248),I=e(96302),D=e(71843);e(99696);class T{constructor(M){var O,x,k;this.opts=M,this.appInitialized=new o.Deferred,this.browserModules=[],this._disposables=new o.DisposableCollection,this._inComposition=!1,this._handleBeforeUpload=K=>{if(this.config.isElectronRenderer){if(this.stateService.state==="electron_confirmed_close")return;K.returnValue="",K.preventDefault(),this.stateService.state!=="electron_asking_close"&&(this.stateService.state="electron_asking_close",this.preventStopElectron().then(Y=>{if(Y)this.stateService.state="ready";else return this.stopContributionsElectron().then(()=>{this.stateService.state="electron_confirmed_close";const Z=this.injector.get(v.IElectronMainLifeCycleService);setTimeout(()=>{Z.closeWindow(S.electronEnv.currentWindowId)},0)})}))}else if(this.preventStop())return(K||window.event).returnValue=!0,!0},this._handleUnload=()=>{this.stateService.state="closing_window",this.config.isElectronRenderer||(this.disposeSideEffect(),this.stopContributions())},this._handleResize=()=>{},this._handleKeydown=K=>{K&&K.target.name!==u.NO_KEYBINDING_NAME&&this.keybindingService.run(K)},this._handleKeyup=K=>{this.keybindingService.resolveModifierKey(K)},this._handleWheel=()=>{};const{modules:F,contributions:L,iconStyleSheets:N,useCdnIcon:U,editorBackgroundImage:W,defaultPreferences:j,allowSetDocumentTitleFollowWorkspaceDir:Q=!0,...G}=M;this.initEarlyPreference(M.workspaceDir||"");const X=(0,y.getPreferenceLanguageId)(j);(0,o.setLanguageId)(X),this.injector=M.injector||new r.Injector,this.modules=F,this.modules.forEach(K=>this.resolveModuleDeps(K)),this.browserModules=M.modulesInstances||[];const $=(O=M.isElectronRenderer)!==null&&O!==void 0?O:this.detectRuntime()===m.ESupportRuntime.Electron;this.config={appName:l.DEFAULT_APPLICATION_NAME,appHost:$?l.DEFAULT_APPLICATION_DESKTOP_HOST:l.DEFAULT_APPLICATION_WEB_HOST,appRoot:M.appRoot||"",uriScheme:l.DEFAULT_URI_SCHEME,...G,isElectronRenderer:$,workspaceDir:M.workspaceDir||"",extensionDir:M.extensionDir||"",injector:this.injector,wsPath:M.wsPath||`ws://${window.location.hostname}:8000`,layoutConfig:M.layoutConfig,editorBackgroundImage:M.editorBackgroundImage||W,allowSetDocumentTitleFollowWorkspaceDir:Q,devtools:(x=M.devtools)!==null&&x!==void 0?x:!1,rpcMessageTimeout:M.rpcMessageTimeout||-1},this.config.connectionPath=M.connectionPath||`${this.config.wsPath}/service`;const V=this.injector.get(E.LayoutViewSizeConfig);V.init(M.layoutViewSize),this.config.layoutViewSize=V,this.injector.get(E.DesignLayoutConfig).setLayout(M.designLayout,(k=M.AINativeConfig)===null||k===void 0?void 0:k.layout),this.injector.addProviders({token:a.IClientApp,useValue:this}),this.injector.addProviders({token:b.AppConfig,useValue:this.config}),this.runtime=$?this.injector.get(s.ElectronRendererRuntime):this.injector.get(p.BrowserRuntime),this.injector.addProviders({token:h.RendererRuntime,useValue:this.runtime}),this.config.devtools&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__={}),M.extensionDevelopmentPath&&(this.config.extensionCandidate=(this.config.extensionCandidate||[]).concat(Array.isArray(M.extensionDevelopmentPath)?M.extensionDevelopmentPath.map(K=>(0,o.asExtensionCandidate)(K,!0)):[(0,o.asExtensionCandidate)(M.extensionDevelopmentPath,!0)]),this.config.extensionDevelopmentHost=!0),this.config=this.runtime.mergeAppConfig(this.config),L&&this.injector.addProviders(...L),this.initBaseProvider(),this.initFields(),this.appendIconStyleSheets(N,U),this.createBrowserModules(j)}resolveModuleDeps(M){const O=Reflect.getMetadata("dependencies",M);O&&O.forEach(x=>{this.modules.indexOf(x)===-1&&this.modules.push(x)})}get lifeCycleService(){return this.injector.get(o.AppLifeCycleServiceToken)}async start(M,O,x){const F=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE);this.lifeCycleService.phase=1,x?(console.error("You're using deprecated method 'start()' with connection parameter"),console.error("We introduced a new connection service to replace the old one"),(0,I.bindConnectionServiceDeprecated)(this.injector,this.modules,x)):O&&await this.createConnection(O),F.timeEnd("ClientApp.createConnection"),this.logger=this.injector.get(o.ILogger),this.stateService.state="client_connected",this.registerEventListeners(),await this.injector.get(o.IApplicationService).initializeData(),await this.measure("Contributions.start",()=>this.startContributions(M)),this.stateService.state="started_contributions",this.stateService.state="ready",this.lifeCycleService.phase=4,F.timeEnd("Framework.ready")}async createConnection(M){(await this.injector.get(m.ConnectionHelperFactory)(M).createRPCServiceChannel(this.modules)).onReopen(()=>{this.onReconnectContributions()})}onReconnectContributions(){const M=this.contributions;for(const O of M)O.onReconnect&&O.onReconnect(this)}initBaseProvider(){(0,D.injectInnerProviders)(this.injector),this.runtime.registerRuntimeInnerProviders(this.injector)}initFields(){this.contributionsProvider=this.injector.get(g.ClientAppContribution),this.commandRegistry=this.injector.get(o.CommandRegistry),this.keybindingRegistry=this.injector.get(u.KeybindingRegistry),this.keybindingService=this.injector.get(u.KeybindingService),this.stateService=this.injector.get(_.ClientAppStateService),this.nextMenuRegistry=this.injector.get(c.IMenuRegistry)}createBrowserModules(M){const O=this.injector;for(const x of this.modules){const k=O.get(x);this.browserModules.push(k),k.providers&&this.injector.addProviders(...k.providers),this.runtime.registerRuntimeModuleProviders(this.injector,k),k.preferences&&k.preferences(this.injector)}(0,d.injectCorePreferences)(this.injector),this.injectPreferenceService(this.injector,M),this.injectStorageProvider(this.injector);for(const x of this.browserModules)if(x.contributionProvider)if(Array.isArray(x.contributionProvider))for(const k of x.contributionProvider)(0,o.createContributionProvider)(this.injector,k);else(0,o.createContributionProvider)(this.injector,x.contributionProvider)}get contributions(){return this.contributionsProvider.getContributions()}async startContributions(M){await this.measure("RenderApp.render",()=>this.renderApp(M)),this.lifeCycleService.phase=2,await this.measure("Contributions.initialize",()=>this.initializeContributions()),await this.initializeCoreRegistry(),this.stateService.state="core_module_initialized",this.lifeCycleService.phase=3,await this.measure("Contributions.onStart",()=>this.onStartContributions()),await this.runContributionsPhase(this.contributions,"onDidStart")}async initializeCoreRegistry(){this.commandRegistry.initialize(),await this.keybindingRegistry.initialize(),this.nextMenuRegistry.initialize()}async initializeContributions(){await this.runContributionsPhase(this.contributions,"initialize"),this.appInitialized.resolve(),this.logger.verbose("contributions.initialize done")}async onStartContributions(){await this.runContributionsPhase(this.contributions,"onStart")}async runContributionsPhase(M,O){return await Promise.all(M.map(x=>this.contributionPhaseRunner(x,O)))}async contributionPhaseRunner(M,O){const x=M[O];if(typeof x=="function")try{const k=M.constructor.name+"."+O;return await this.measure(k,()=>x.call(M,this))}catch(k){this.logger.error(`Could not run contribution#${O}`,k)}}async renderApp(M){await(0,w.renderClientApp)(this,M),this.injector.get(o.IEventBus).fire(new f.RenderedEvent)}async measure(M,O){const k=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE),F=await O();return k.timeEnd(M),F}preventStop(){const O=this.injector.get(d.CorePreferences)["application.confirmExit"];if(O==="never")return!1;for(const x of this.contributions)if(x.onWillStop)try{if(x.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return O==="always"}async preventStopElectron(){if(this.injector.get(d.CorePreferences)["application.confirmExit"]==="never")return!1;for(const x of this.contributions)if(x.onWillStop)try{if(await x.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return!1}stopContributions(){for(const M of this.contributions)if(M.onStop)try{M.onStop(this)}catch(O){this.logger.error("Could not stop contribution",O)}}async stopContributionsElectron(){const M=[];for(const O of this.contributions)O.onStop&&M.push((async()=>{try{await O.onStop(this)}catch(x){this.logger.error("Could not stop contribution",x)}})());await Promise.all(M)}registerEventListeners(){var M,O;window.addEventListener("beforeunload",this._handleBeforeUpload),window.addEventListener("unload",this._handleUnload),window.addEventListener("resize",this._handleResize),window.addEventListener("compositionstart",(M=this.keybindingService)===null||M===void 0?void 0:M.handleCompositionStart),window.addEventListener("compositionend",(O=this.keybindingService)===null||O===void 0?void 0:O.handleCompositionEnd),window.addEventListener("keydown",this._handleKeydown,!0),window.addEventListener("keyup",this._handleKeyup,!0),o.isOSX&&document.body.addEventListener("wheel",this._handleWheel,{passive:!1})}injectPreferenceService(M,O){const x=()=>k=>{const F=M.get(y.PreferenceProvider,{tag:k});return F.asScope(k),F};if((0,y.injectPreferenceConfigurations)(M),(0,y.injectPreferenceSchemaProvider)(M),M.addProviders({token:y.PreferenceProviderProvider,useFactory:x},{token:y.PreferenceService,useClass:y.PreferenceServiceImpl}),O){const F=M.get(y.PreferenceProviderProvider)(y.PreferenceScope.Default);for(const L of Object.keys(O))F.setPreference(L,O[L])}}injectStorageProvider(M){M.addProviders({token:o.DefaultStorageProvider,useClass:o.DefaultStorageProvider}),M.addProviders({token:o.StorageProvider,useFactory:O=>x=>O.get(o.DefaultStorageProvider).get(x)}),(0,o.createContributionProvider)(M,o.StorageResolverContribution)}fireOnReload(M=!1){window.location.reload(M)}appendIconStyleSheets(M,O){const x=O?[A.DEFAULT_CDN_ICON,A.IDE_OCTICONS_CN_CSS,A.IDE_CODICONS_CN_CSS]:[];M&&M.length&&M.forEach(k=>{this.updateIconMap(k.prefix,k.iconMap),x.push(k.cssPath)});for(const k of x){const F=document.createElement("link");F.setAttribute("rel","stylesheet"),F.setAttribute("href",k),document.getElementsByTagName("head")[0].appendChild(F)}}updateIconMap(M,O){M==="kaitian-icon kticon-"&&this.logger.error(`The icon prefix '${M}' conflicts with the built-in icon, please check the icon configuration.`),(0,A.updateIconMap)(M,O)}initEarlyPreference(M){this._disposables.push((0,y.registerLocalStorageProvider)(o.GeneralSettingsId.Theme,M)),this._disposables.push((0,y.registerLocalStorageProvider)(o.GeneralSettingsId.Icon,M)),this._disposables.push((0,y.registerLocalStorageProvider)(o.GeneralSettingsId.Language,M))}async dispose(){var M,O;window.removeEventListener("beforeunload",this._handleBeforeUpload),window.removeEventListener("unload",this._handleUnload),window.removeEventListener("resize",this._handleResize),window.removeEventListener("compositionstart",(M=this.keybindingService)===null||M===void 0?void 0:M.handleCompositionStart),window.removeEventListener("compositionend",(O=this.keybindingService)===null||O===void 0?void 0:O.handleCompositionEnd),window.removeEventListener("keydown",this._handleKeydown,!0),o.isOSX&&document.body.removeEventListener("wheel",this._handleWheel),this._disposables.dispose(),this.disposeSideEffect()}disposeSideEffect(){for(const M of this.contributions)if(M.onDisposeSideEffects)try{M.onDisposeSideEffects(this)}catch(O){this.logger.error("Could not dispose contribution",O)}}detectRuntime(){return window.isElectronRenderer||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0?m.ESupportRuntime.Electron:m.ESupportRuntime.Web}}t.j=T},79248:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.App=d,t.renderClientApp=f;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(25873)),l=e(97267),v=e(43718),_=e(28003),m=e(68456),p=e(11050),s=e(52564),h=e(26542),a=e(67304),g=e(75206);function d(c){const y=c.app.injector,b=y.get(v.IEventBus),A=y.get(h.LabelService),S=r.default.useCallback((w,I)=>A.getIcon(v.URI.parse(w),I),[]);return r.default.useEffect(()=>{let w;const I=()=>{w&&window.cancelAnimationFrame(w),w=window.requestAnimationFrame(()=>{w=null,s.allSlot.forEach(D=>{b.fire(new m.ResizeEvent({slotLocation:D.slot})),b.fireDirective(m.ResizeEvent.createDirective(D.slot))})})};return window.addEventListener("resize",I),()=>{window.removeEventListener("resize",I)}},[]),r.default.createElement(l.ComponentContextProvider,{value:{getIcon:a.getIcon,localize:v.localize,getResourceIcon:S}},r.default.createElement(p.ConfigProvider,{value:c.app.config},r.default.createElement(c.main,{callback:c.callback}),c.overlays&&c.overlays.map((w,I)=>r.default.createElement(w,{key:I}))))}const u=c=>y=>{o.default.createRoot(c).render(r.default.createElement(y,null))},E=(0,v.getDebugLogger)();function f(c,y){let b=c.config.layoutComponent||_.DefaultLayout;const A=c.browserModules.filter(R=>R.isOverlay).map(R=>R.component?R.component:(E.warn("Overlay module does not have component",R),null)).filter(Boolean),S=c.injector;S.get(g.ClientAppContextContribution).getContributions().forEach(R=>b=R.registerClientAppContext(b,S));const D=R=>r.default.createElement(d,{...R,app:c,main:b,overlays:A});return(typeof y=="function"?y:u(y))(D)}},96302:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnectionService=m,t.bindConnectionServiceDeprecated=p;const n=e(8919),r=e(18740),o=e(76271),l=e(43718),v=e(16884),_=e(11050);async function m(h,a,g,d={}){var u;const E=h.get(_.AppConfig),f=h.get(l.IReporterService);g.setReporter(f);const c=h.get(l.IEventBus),y=h.get(v.ClientAppStateService),b=()=>{y.reachedState("core_module_initialized").then(()=>{c.fire(new l.BrowserConnectionOpenEvent)})};g.connection.isOpen()&&b(),g.connection.onOpen(()=>{b()}),g.connection.onClose(()=>{y.reachedState("core_module_initialized").then(()=>{c.fire(new l.BrowserConnectionCloseEvent)})}),g.connection.onError(I=>{y.reachedState("core_module_initialized").then(()=>{c.fire(new l.BrowserConnectionErrorEvent(I))})}),await g.initHandler(),h.addProviders({token:r.WSChannelHandler,useValue:g});const A=await g.openChannel(o.RPCServiceChannelPath),S=new n.RPCServiceCenter;return S.setSumiConnection(A.createSumiConnection(d)),!((u=E?.measure)===null||u===void 0)&&u.connection&&S.setReporter(f,E.measure.connection.minimumReportThresholdTime),s(h,a,S),h.get(l.ILogger).reportToServer(),A}function p(h,a,g){const d=new n.RPCServiceCenter,u=d.setConnection(g),E=g.onClose(()=>{u.dispose(),E.dispose()});s(h,a,d)}function s(h,a,g){const{getRPCService:d}=(0,n.initRPCService)(g),u=[],E=[];for(const f of a){const c=h.get(f);if(c.backServices)for(const y of c.backServices)u.push(y),y.protocol&&g.loadProtocol(y.protocol)}for(const f of u){const{servicePath:c}=f,y=d(c),b={token:c,useValue:y};h.addProviders(b),f.clientToken&&E.push(f)}for(const f of E){const{servicePath:c}=f,y=d(c);if(f.clientToken){const b=h.get(f.clientToken);y.onRequestService(b)}}}},75206:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContextContribution=void 0,t.ClientAppContextContribution=Symbol("ClientAppContextContribution")},32796:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(72746),t),n.__exportStar(e(79248),t),n.__exportStar(e(96302),t),n.__exportStar(e(75206),t)},71843:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectInnerProviders=$;const n=e(43718),r=e(96405),o=e(16872),l=e(41480),v=e(12956),_=e(59555),m=e(18379),p=e(10605),s=e(66963),h=e(71707),a=e(80832),g=e(23396),d=e(77273),u=e(41118),E=e(37015),f=e(68456),c=e(75694),y=e(93899),b=e(77666),A=e(90697),S=e(73967),w=e(78132),I=e(68969),D=e(11719),T=e(52564),R=e(26542),M=e(52993),O=e(10845),x=e(40827),k=e(32242),F=e(99e3),L=e(42637),N=e(62652),U=e(27957),W=e(45670),j=e(66894),Q=e(63921),G=e(75206),X=e(82493);function $(V){(0,n.createContributionProvider)(V,s.ClientAppContribution),(0,n.createContributionProvider)(V,n.CommandContribution),(0,n.createContributionProvider)(V,d.FsProviderContribution),(0,n.createContributionProvider)(V,u.KeybindingContribution),(0,n.createContributionProvider)(V,y.MenuContribution),(0,n.createContributionProvider)(V,f.ComponentContribution),(0,n.createContributionProvider)(V,T.SlotRendererContribution),(0,n.createContributionProvider)(V,w.PreferenceContribution),(0,n.createContributionProvider)(V,W.VariableContribution),(0,n.createContributionProvider)(V,f.TabBarToolbarContribution),(0,n.createContributionProvider)(V,L.ToolBarActionContribution),(0,n.createContributionProvider)(V,k.StaticResourceContribution),(0,n.createContributionProvider)(V,G.ClientAppContextContribution);const H=[{token:n.IEventBus,useClass:n.EventBusImpl},{token:n.CommandService,useClass:n.CommandServiceImpl},{token:n.CommandRegistry,useClass:n.CommandRegistryImpl},{token:u.KeybindingRegistry,useClass:u.KeybindingRegistryImpl},{token:u.KeybindingService,useFactory:K=>K.get(u.KeybindingRegistry)},{token:o.KeyboardNativeLayoutService,useClass:E.BrowserKeyboardLayoutImpl},{token:o.KeyboardLayoutChangeNotifierService,useFactory:K=>K.get(o.KeyboardNativeLayoutService)},{token:E.KeyValidator,useFactory:K=>K.get(o.KeyboardNativeLayoutService)},v.ClientAppStateService,{token:c.ILogger,useClass:c.Logger},{token:c.Logger,useAlias:c.ILogger},{token:f.ComponentRegistry,useClass:f.ComponentRegistryImpl},{token:W.VariableRegistry,useClass:W.VariableRegistryImpl},{token:y.AbstractMenuService,useClass:y.MenuServiceImpl},{token:y.AbstractContextMenuService,useClass:y.ContextMenuServiceImpl},{token:y.IMenuRegistry,useClass:y.MenuRegistryImpl},{token:b.IToolbarActionService,useClass:b.ToolbarActionService},{token:y.AbstractMenubarService,useClass:y.MenubarServiceImpl},{token:n.IReporter,useClass:n.DefaultReporter},{token:n.IReporterService,useClass:n.ReporterService},{token:n.ReporterMetadata,useValue:{host:n.REPORT_HOST.BROWSER}},{token:I.IProgressService,useClass:D.ProgressService},{token:L.IToolbarRegistry,useClass:U.NextToolbarRegistryImpl},{token:L.IToolbarPopoverRegistry,useClass:N.ToolbarPopoverRegistry},U.ToolbarClientAppContribution,{token:n.IProblemPatternRegistry,useClass:n.ProblemPatternRegistryImpl},{token:n.IProblemMatcherRegistry,useClass:n.ProblemMatchersRegistryImpl},{token:n.ITaskDefinitionRegistry,useClass:n.TaskDefinitionRegistryImpl},{token:A.IOpenerService,useClass:S.OpenerService},{token:j.IWindowService,useClass:Q.WindowService},{token:n.IApplicationService,useClass:_.ApplicationService},{token:M.IClipboardService,useClass:M.BrowserClipboardService},{token:O.IExternalUriService,useClass:O.ExternalUriService},{token:n.IAuthenticationService,useClass:p.AuthenticationService},{token:R.ICryptoService,useClass:R.CryptoService},{token:R.ICredentialsService,useClass:R.CredentialsService},{token:r.IHashCalculateService,useClass:r.HashCalculateServiceImpl},{token:n.IExtensionsSchemaService,useClass:g.ExtensionsPointServiceImpl},{token:n.AppLifeCycleServiceToken,useClass:X.AppLifeCycleService},{token:k.StaticResourceService,useClass:F.StaticResourceServiceImpl},x.StaticResourceClientAppContribution,{token:h.ISplitPanelService,useClass:h.SplitPanelService},{token:n.IAIReporter,useClass:l.AIReporter},{token:a.IDesignStyleService,useClass:a.DesignStyleService},{token:m.ConnectionHelperFactory,useFactory:m.ConnectionHelperFactory}];V.addProviders(...H)}},82493:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppLifeCycleService=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class{constructor(){this.onDidChangeLifecyclePhaseEmitter=new o.Emitter,this.onDidLifeCyclePhaseChange=this.onDidChangeLifecyclePhaseEmitter.event}set phase(_){this.lifeCyclePhase=_,this.onDidChangeLifecyclePhaseEmitter.fire(this.lifeCyclePhase)}get phase(){return this.lifeCyclePhase}};t.AppLifeCycleService=l,t.AppLifeCycleService=l=n.__decorate([(0,r.Injectable)()],l)},99696:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=e(85608).__importDefault(e(99126));typeof window.ResizeObserver>"u"&&(window.ResizeObserver=r.default)},36206:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserModule=t.IClientApp=void 0;const n=e(85608),r=e(76003),o=e(43718);t.IClientApp=Symbol("CLIENT_APP_TOKEN");class l extends o.BasicModule{}t.BrowserModule=l,n.__decorate([(0,r.Autowired)(t.IClientApp),n.__metadata("design:type",Object)],l.prototype,"app",void 0)},14109:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MERGE_CONFLICT_COMMANDS=t.SCM_COMMANDS=t.QUICK_OPEN_COMMANDS=t.MARKER_COMMANDS=t.LAYOUT_COMMANDS=t.TERMINAL_COMMANDS=t.DIALOG_COMMANDS=t.KEYBOARD_COMMANDS=t.WORKSPACE_COMMANDS=t.OUTLINE_COMMANDS=t.SEARCH_COMMANDS=t.MULTI_DIFF_EDITOR_COMMANDS=t.DIFF_EDITOR_COMMANDS=t.EDITOR_COMMANDS=t.COMMON_COMMANDS=t.OPEN_EDITORS_COMMANDS=t.FILE_COMMANDS=void 0;const n=e(67304);var r;(function(b){const A="file";b.NEW_FILE={id:"file.new",category:A,iconClass:(0,n.getIcon)("new-file")},b.RENAME_FILE={id:"file.rename",category:A},b.DELETE_FILE={id:"file.delete",category:A},b.NEW_FOLDER={id:"file.folder.new",category:A,iconClass:(0,n.getIcon)("new-folder")},b.COMPARE_SELECTED={id:"file.compare",category:A},b.OPEN_FILE={id:"file.open",category:A},b.SAVE_FILE={id:"file.save",category:A},b.COLLAPSE_ALL={id:"filetree.collapse.all",category:A,iconClass:(0,n.getIcon)("collapse-all")},b.REFRESH_ALL={id:"filetree.refresh.all",category:A,iconClass:(0,n.getIcon)("refresh")},b.OPEN_RESOURCES={id:"filetree.open.file",category:A},b.OPEN_TO_THE_SIDE={id:"filetree.open.side",category:A},b.OPEN_TYPE_WITH={id:"filetree.open.with",category:A},b.COPY_PATH={id:"filetree.copy.path",category:A,label:"%file.copy.path%"},b.COPY_RELATIVE_PATH={id:"filetree.copy.relativepath",category:A},b.COPY_FILE={id:"filetree.copy.file",category:A},b.CUT_FILE={id:"filetree.cut.file",category:A},b.PASTE_FILE={id:"filetree.paste.file",category:A},b.SELECT_CURRENT_NODE={id:"filetree.selectCurrentNode",category:A},b.LOCATION={id:"filetree.location",category:A},b.LOCATION_WITH_EDITOR={id:"filetree.location_with_editor",category:A,iconClass:(0,n.getIcon)("focus")},b.OPEN_FOLDER={id:"filetree.open.folder",category:A,label:"%file.open.folder%"},b.VSCODE_OPEN_FOLDER={id:"filetree.open.vscode_open_folder",category:A},b.OPEN_WORKSPACE={id:"filetree.open.workspace",category:A,label:"%file.open.workspace%"},b.SEARCH_ON_FOLDER={id:"filetree.search.folder",category:A},b.FOCUS_FILES={id:"filetree.focus.files",category:A,label:"%file.focus.files%"},b.FILTER_TOGGLE={id:"filetree.files.filter_toggle",category:A,iconClass:(0,n.getIcon)("retrieval")},b.FILTER_OPEN={id:"filetree.files.filter_open",category:A},b.OPEN_TERMINAL_WITH_PATH={id:"filetree.openTerminalWithPath",category:A},b.FILTER_CLOSE={id:"filetree.quitFilterMode",category:A},b.NEXT={id:"filetree.next",category:A},b.PREV={id:"filetree.prev",category:A},b.COLLAPSE={id:"filetree.collapse",category:A},b.EXPAND={id:"filetree.expand",category:A},b.REVEAL_IN_EXPLORER={id:"filetree.revealInExplorer",category:A},b.TOGGLE_OR_OPEN={id:"filetree.toggleOrOpen",category:A}})(r||(t.FILE_COMMANDS=r={}));var o;(function(b){const A="openeditors";b.SAVE_ALL={id:"opened.editors.save.all",category:A,iconClass:(0,n.getIcon)("save-all")},b.CLOSE_ALL={id:"opened.editors.close.all",category:A,iconClass:(0,n.getIcon)("close-all")},b.SAVE_BY_GROUP={id:"opened.editors.save.byGroup"},b.CLOSE_BY_GROUP={id:"opened.editors.close.byGroup"},b.OPEN={id:"opened.editors.open",category:A},b.CLOSE={id:"opened.editors.close",category:A},b.OPEN_TO_THE_SIDE={id:"opened.editors.openToTheSide",category:A},b.COMPARE_SELECTED={id:"opened.editors.compare",category:A},b.COPY_RELATIVE_PATH={id:"opened.editors.copyRelativePath",category:A},b.COPY_PATH={id:"opened.editors.copyPath",category:A},b.LOCATION={id:"opened.editors.location",category:A}})(o||(t.OPEN_EDITORS_COMMANDS=o={}));var l;(function(b){b.FIND={id:"core.find",label:"%common.find%"},b.REPLACE={id:"core.replace",label:"%common.replace%"},b.ABOUT_COMMAND={id:"core.about",label:"%common.about%"},b.OPEN_PREFERENCES={id:"core.openpreference",label:"%common.preference.open%"},b.LOCATE_PREFERENCES={id:"workbench.preferences.locate"},b.OPEN_KEYMAPS={id:"core.keymaps.open",label:"%common.keymaps.open%"},b.OPEN_LAUNCH_CONFIGURATION={id:"core.launchConfiguration.open",label:"%debug.action.open.configuration%"},b.ENVIRONMENT_VARIABLE={id:"core.environment.variable"}})(l||(t.COMMON_COMMANDS=l={}));var v;(function(b){const A="editor";b.API_OPEN_EDITOR_COMMAND_ID="_workbench.open",b.API_OPEN_DIFF_EDITOR_COMMAND_ID="_workbench.diff",b.API_OPEN_WITH_EDITOR_COMMAND_ID="_workbench.openWith",b.VSCODE_OPEN_MULTI_DIFF_EDITOR_COMMAND_ID="_workbench.openMultiDiffEditor",b.NEW_UNTITLED_FILE={id:"file.new.untitled",category:A,label:"%file.new%",iconClass:(0,n.getIcon)("new-file")},b.UNDO={id:"editor.undo",category:A,label:"%editor.undo%"},b.REDO={id:"editor.redo",category:A,label:"%editor.redo%"},b.SELECT_ALL={id:"editor.selectAll",category:A,label:"%selection.all%"},b.OPEN_RESOURCE={id:"editor.openUri",category:A},b.OPEN_RESOURCES={id:"editor.openUris",category:A},b.SAVE_URI={id:"editor.saveUri",category:A},b.SAVE_CURRENT={id:"editor.saveCurrent",category:A,label:"%editor.saveCurrent%"},b.FOCUS_IF_NOT_ACTIVATE_ELEMENT={id:"editor.focusIfNotActivateElement",category:A,label:"%editor.saveCurrent%"},b.COMPARE={id:"editor.compare",category:A},b.OPEN_MERGEEDITOR={id:"editor.open.mergeEditor",category:A},b.OPEN_MERGEEDITOR_DEV={id:"editor.open.mergeEditor.dev",category:"Merge Editor (Dev)",label:"Open Merge Editor State from Json"},b.MERGEEDITOR_RESET={id:"editor.mergeEditor.reset",category:A,label:"%mergeEditor.reset%"},b.CLOSE={id:"editor.close",category:A,label:"%editor.closeCurrent%"},b.CLOSE_ALL_IN_GROUP={id:"editor.closeAllInGroup",category:A,label:"%editor.closeAllInGroup%"},b.CLOSE_OTHER_IN_GROUP={id:"editor.closeOtherEditorsInGroup",category:A,label:"%editor.closeOtherEditors%"},b.CLOSE_ALL={id:"editor.closeAll",category:A,label:"%editor.close.all%"},b.CLOSE_SAVED={id:"editor.closeSaved",category:A,label:"%editor.closeSaved%"},b.SAVE_ALL={id:"editor.saveAll",category:A,label:"%editor.saveAll%"},b.CLOSE_TO_RIGHT={id:"editor.closeToRight",category:A,label:"%editor.closeToRight%"},b.GET_CURRENT={id:"editor.getCurrent",category:A},b.GET_CURRENT_RESOURCE={id:"editor.getCurrentResource",category:A},b.SPLIT_TO_LEFT={id:"editor.splitToLeft",category:A,label:"%editor.splitToLeft%"},b.SPLIT_TO_RIGHT={id:"editor.splitToRight",category:A,label:"%editor.splitToRight%"},b.SPLIT_TO_TOP={id:"editor.splitToTop",category:A,label:"%editor.splitToTop%"},b.SPLIT_TO_BOTTOM={id:"editor.splitToBottom",category:A,label:"%editor.splitToBottom%"},b.CHANGE_LANGUAGE={id:"editor.changeLanguage",category:A},b.CHANGE_ENCODING={id:"editor.changeEncoding",category:A},b.GET_ENCODING={id:"editor.getEncoding",category:A},b.CHANGE_EOL={id:"editor.changeEol",category:A},b.NAVIGATE_LEFT={id:"editor.navigateLeft",category:A},b.NAVIGATE_RIGHT={id:"editor.navigateRight",category:A},b.NAVIGATE_UP={id:"editor.navigateUp",category:A},b.NAVIGATE_DOWN={id:"editor.navigateDown",category:A},b.NAVIGATE_NEXT={id:"editor.navigateNext",category:A},b.NAVIGATE_PREVIOUS={id:"editor.navigatePrevious",category:A},b.PREVIOUS={id:"editor.previous",category:A},b.NEXT={id:"editor.next",category:A},b.PREVIOUS_IN_GROUP={id:"editor.previousInGroup",category:A},b.NEXT_IN_GROUP={id:"editor.nextInGroup",category:A},b.LAST_IN_GROUP={id:"editor.lastInGroup",category:A},b.CLOSE_OTHER_GROUPS={id:"editor.closeOtherGroup",category:A,label:"%editor.closeEditorsInOtherGroups%"},b.OPEN_EDITOR_AT_INDEX={id:"editor.openEditorAtIndex",category:A},b.EVEN_EDITOR_GROUPS={id:"editor.evenEditorGroups",category:A,label:"%editor.resetEditorGroups%"},b.REVERT_DOCUMENT={id:"editor.document.revert",category:A,label:"%editor.revert%"},b.REVERT_AND_CLOSE={id:"editor.revertAndClose",category:A},b.GO_FORWARD={id:"editor.goForward",category:A},b.GO_BACK={id:"editor.goBack",category:A},b.PIN_CURRENT={id:"editor.pinCurrent",category:A},b.COPY_CURRENT_PATH={id:"editor.copyCurrentPath",category:A},b.GO_TO_GROUP={id:"editor.goToGroup",category:A},b.MOVE_GROUP={id:"editor.moveGroup",category:A},b.REOPEN_CLOSED={id:"editor.reopenClosed",category:A},b.FOCUS={id:"editor.focus",category:A},b.TEST_TOKENIZE={id:"editor.tokenize.test",category:A,label:"%editor.tokenize.test%"},b.AUTO_SAVE={id:"editor.autoSave",category:A},b.FOCUS_ACTIVE_EDITOR_GROUP={id:"editor.focusActiveEditorGroup",category:A},b.COMPONENT_UNDO={id:"editor.componentUndo",category:A},b.COMPONENT_REDO={id:"editor.componentRedo"},b.SEARCH_WORKSPACE_SYMBOL={id:"editor.workspaceSymbol.quickopen",label:"%editor.workspaceSymbol.quickopen%",category:A},b.SEARCH_WORKSPACE_SYMBOL_CLASS={id:"editor.workspaceSymbolClass.quickopen",label:"%editor.workspaceSymbolClass.quickopen%",category:A},b.GO_TO_LINE={id:"editor.action.gotoLine",label:"%editor.goToLine%",category:A},b.QUICK_OPEN={id:"workbench.action.quickOpen",category:A,label:"%editor.quickOpen%"},b.TOGGLE_WORD_WRAP={id:"editor.toggleWordWrap",label:"%editor.toggleWordWrap%",category:A},b.TOGGLE_COLUMN_SELECTION={id:"editor.action.toggleColumnSelection",label:"%editor.action.toggleColumnSelection%",category:A},b.FORMAT_DOCUMENT={id:"editor.action.formatDocument",category:A},b.FORMAT_SELECTION={id:"editor.action.formatSelection",category:A},b.FORMAT_DOCUMENT_WITH={id:"editor.action.formatDocument.multiple",category:A,label:"%editor.formatDocument.label.multiple%"},b.FORMAT_SELECTION_WITH={id:"editor.action.formatSelection.multiple",category:A,label:"%editor.formatSelection.label.multiple%"},b.COPY_PATH={id:"editor.action.copyPath",category:A,label:"%editor.copyPath%"},b.COPY_RELATIVE_PATH={id:"editor.action.copyRelativePath",category:A,label:"%editor.copyRelativePath%"}})(v||(t.EDITOR_COMMANDS=v={}));var _;(function(b){const A="diff-editor";b.REVERT={id:"editor.diff.revert",category:A},b.ACCEPT={id:"editor.diff.accept",category:A},b.TOGGLE_COLLAPSE_UNCHANGED_REGIONS={id:"editor.diff.toggleCollapseUnchangedRegions",category:A}})(_||(t.DIFF_EDITOR_COMMANDS=_={}));var m;(function(b){const A="multi-diff-editor";b.COLLAPSE_FILES={id:"editor.diff.collapseFiles",category:A},b.EXPAND_FILES={id:"editor.diff.expandFiles",category:A}})(m||(t.MULTI_DIFF_EDITOR_COMMANDS=m={}));var p;(function(b){const A="search";b.OPEN_SEARCH={id:"content-search.openSearch",category:A,label:"Open search sidebar"},b.REFRESH={id:"file-search.refresh",label:"refresh search",iconClass:(0,n.getIcon)("refresh"),category:A},b.CLEAN={id:"file-search.clean",label:"clean search",iconClass:(0,n.getIcon)("clear"),category:A},b.GET_RECENT_SEARCH_WORD={id:"search.getRecentSearchWordCmd",category:A},b.GET_BACK_RECENT_SEARCH_WORD={id:"search.getBackRecentSearchWordCmd",category:A},b.MENU_REPLACE={id:"search.menu.replace",category:A,label:"%search.replace.title%"},b.MENU_REPLACE_ALL={id:"search.menu.replaceAll",category:A,label:"%search.replaceAll.label%"},b.MENU_HIDE={id:"search.menu.hide",category:A,label:"%search.result.hide%"},b.MENU_COPY={id:"search.menu.copy",category:A,label:"%file.copy.file%"},b.MENU_COPY_ALL={id:"search.menu.copyAll",category:A,label:"%search.menu.copyAll%"},b.MENU_COPY_PATH={id:"search.menu.copyPath",category:A,label:"%file.copy.path%"},b.REPLACE={id:"search.replace",category:A},b.CLOSE={id:"search.close",category:A}})(p||(t.SEARCH_COMMANDS=p={}));var s;(function(b){const A="outline";b.OUTLINE_COLLAPSE_ALL={id:"outline.collapse.all",category:A},b.OUTLINE_FOLLOW_CURSOR={id:"outline.follow.cursor",category:A},b.OUTLINE_SORT_KIND={id:"outline.sort.kind",category:A},b.OUTLINE_SORT_NAME={id:"outline.sort.name",category:A},b.OUTLINE_SORT_POSITION={id:"outline.sort.position",category:A}})(s||(t.OUTLINE_COMMANDS=s={}));var h;(function(b){const A="workspace";b.ADD_WORKSPACE_FOLDER={id:"workspace.addFolderToWorkspace",label:"%workspace.addFolderToWorkspace%",category:A},b.REMOVE_WORKSPACE_FOLDER={id:"workspace.removeFolderFromWorkspace",label:"%workspace.removeFolderFromWorkspace%",category:A},b.SAVE_WORKSPACE_AS_FILE={id:"workspace.saveWorkspaceAsFile",label:"%workspace.saveWorkspaceAsFile%",category:A}})(h||(t.WORKSPACE_COMMANDS=h={}));var a;(function(b){const A="keyboard";b.CHOOSE_KEYBOARD_LAYOUT={id:"keyboard.chooseKeyboardLayout",label:"%keyboard.chooseKeyboardLayout%",category:A}})(a||(t.KEYBOARD_COMMANDS=a={}));var g;(function(b){const A="dialog";b.ENSURE={id:"dialog.ensure",category:A}})(g||(t.DIALOG_COMMANDS=g={}));var d;(function(b){b.CATEGORY="%terminal.name%",b.FOCUS_NEXT_TERMINAL={id:"workbench.action.terminal.focusNextPane",label:"%terminal.focusNext.inTerminalGroup%",category:b.CATEGORY},b.FOCUS_PREVIOUS_TERMINAL={id:"workbench.action.terminal.focusPreviousPane",label:"%terminal.focusPrevious.inTerminalGroup%",category:b.CATEGORY},b.SPLIT={id:"terminal.split",label:"%terminal.split%",category:b.CATEGORY},b.ADD={id:"terminal.add",label:"%terminal.new%",category:b.CATEGORY},b.REMOVE={id:"terminal.remove",label:"%terminal.remove%",category:b.CATEGORY},b.CLEAR={id:"terminal.clear",label:"%terminal.clear%",category:b.CATEGORY},b.OPEN_SEARCH={id:"terminal.search",label:"%terminal.search%",category:b.CATEGORY},b.SEARCH_NEXT={id:"terminal.search.next",label:"%terminal.search.next%",category:b.CATEGORY},b.OPEN_WITH_PATH={id:"terminal.openWithPath",category:b.CATEGORY},b.CLEAR_CONTENT={id:"terminal.clearContent",label:"%terminal.menu.clearCurrentContent%",category:b.CATEGORY},b.CLEAR_ALL_CONTENT={id:"terminal.clearAllContent",label:"%terminal.menu.clearAllContents%",category:b.CATEGORY},b.TAB_RENAME={id:"terminal.tabRename",category:b.CATEGORY},b.SELECT_ALL_CONTENT={id:"terminal.selectAllContent",label:"%terminal.menu.selectAllContent%",category:b.CATEGORY},b.MORE_SETTINGS={id:"terminal.moreSettings",label:"%terminal.menu.moreSettings%",category:b.CATEGORY},b.SELECT_TYPE={id:"terminal.selectType",category:b.CATEGORY},b.SELECT_ZSH={id:"terminal.selectTypeZsh",label:"zsh",category:b.CATEGORY},b.SELECT_BASH={id:"terminal.selectTypeBash",label:"bash",category:b.CATEGORY},b.SELECT_SH={id:"terminal.selectTypeSh",label:"sh",category:b.CATEGORY},b.SELECT_CMD={id:"terminal.selectTypeCMD",label:"cmd",category:b.CATEGORY},b.SELECT_POWERSHELL={id:"terminal.selectTypePowerShell",label:"powershell",category:b.CATEGORY},b.COPY={id:"terminal.copy",label:"%edit.copy%",category:b.CATEGORY},b.PASTE={id:"terminal.paste",label:"%edit.paste%",category:b.CATEGORY},b.SELECT_ALL={id:"terminal.selectAll",label:"%terminal.menu.selectCurrentContent%",category:b.CATEGORY},b.RE_LAUNCH={id:"terminal.relaunch",category:b.CATEGORY},b.TOGGLE_TERMINAL={id:"terminal.toggleTerminal",label:"%terminal.toggleTerminal%",category:b.CATEGORY},b.KILL_PROCESS={id:"terminal.killProcess",label:"%terminal.killProcess%",category:b.CATEGORY}})(d||(t.TERMINAL_COMMANDS=d={}));var u;(function(b){const A="view";b.QUICK_OPEN_VIEW={id:"layout.action.quickOpenView",category:A},b.OPEN_VIEW={id:"layout.action.openView",label:"%layout.action.openView%",category:A},b.MAXIMIZE_EDITOR={id:"layout.action.Maximizeeditor",category:A},b.TOGGLE_SIDEBAR_VISIBILITY={id:"main-layout.view.toggle",category:A}})(u||(t.LAYOUT_COMMANDS=u={}));var E;(function(b){const A="marker";b.SHOW_ERRORS_WARNINGS={id:"marker.action.showErrorsWarnings",category:A},b.TOGGLE_SHOW_ERRORS_WARNINGS={id:"marker.action.toggleShowErrorsWarnings",category:A}})(E||(t.MARKER_COMMANDS=E={}));var f;(function(b){b.OPEN={id:"editor.action.quickCommand"},b.OPEN_OUTLINE={id:"editor.action.quickOutline"},b.OPEN_VIEW={id:"editor.action.quickView"},b.OPEN_WITH_COMMAND={id:"editor.action.quickCommand.withCommand"}})(f||(t.QUICK_OPEN_COMMANDS=f={}));var c;(function(b){const A="SCM";b.GetSCMResource={id:"scm.getResource",category:A},b._GIT_OPEN_MERGE_EDITOR={id:"_git.openMergeEditor"},b.GIT_OPEN_MERGE_EDITOR={id:"git.openMergeEditor"}})(c||(t.SCM_COMMANDS=c={}));var y;(function(b){const A="MergeConflict";b.AI_ACCEPT={id:"merge-conflict.ai.accept",category:A},b.ALL_RESET={id:"merge-conflict.ai.all-reset",category:A},b.AI_ALL_ACCEPT={id:"merge-conflict.ai.all-accept",category:A},b.AI_ALL_ACCEPT_STOP={id:"merge-conflict.ai.all-accept-stop",category:A}})(y||(t.MERGE_CONFLICT_COMMANDS=y={}))},22780:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonContribution=t.locationProtocolContextKey=t.inputFocusedContextKey=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(43718),v=e(53736),_=e(18193),m=e(22366),p=e(41118),s=e(1149),h=e(64102),a=e(39496),g=e(78132),d=e(11050),u=e(14109),E=e(66549);t.inputFocusedContextKey="inputFocus",t.locationProtocolContextKey="locationProtocol";let f=class{constructor(){this.schema=_.corePreferenceSchema;const y={"application.supportsOpenFolder":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"application.supportsOpenWorkspace":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"debug.toolbar.top":this.appConfig.isElectronRenderer?0:this.layoutViewSize.menubarHeight},b=Object.keys(this.schema.properties);for(const A of b)this.schema.properties[A].default=y[A]||this.schema.properties[A].default}onStart(){this.contextKeyService.createKey(t.locationProtocolContextKey,window.location.protocol.split(":")[0]),this.inputFocusedContext=this.contextKeyService.createKey(t.inputFocusedContextKey,!1),window.addEventListener("focusin",this.updateInputContextKeys.bind(this))}onStop(){window.removeEventListener("focusin",this.updateInputContextKeys.bind(this))}activeElementIsInput(){return!!document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.tagName==="TEXTAREA")}updateInputContextKeys(){const y=this.activeElementIsInput();if(this.inputFocusedContext.set(y),y){const b=(0,m.trackFocus)(document.activeElement);l.Event.once(b.onDidBlur)(()=>{this.inputFocusedContext.set(this.activeElementIsInput()),b.dispose()})}}registerCommands(y){y.registerCommand(u.EDITOR_COMMANDS.UNDO),y.registerCommand(u.EDITOR_COMMANDS.REDO),y.registerCommand(u.EDITOR_COMMANDS.SELECT_ALL),y.registerCommand(u.COMMON_COMMANDS.ABOUT_COMMAND,{execute:()=>{alert((0,l.replaceLocalizePlaceholder)(this.appConfig.appName))}})}registerMenus(y){y.registerMenubarItem(a.MenuId.MenubarFileMenu,{label:(0,l.localize)("menu-bar.title.file"),order:1,iconClass:(0,o.getIcon)("menubar-file")}),y.registerMenubarItem(a.MenuId.MenubarEditMenu,{label:(0,l.localize)("menu-bar.title.edit"),order:2,iconClass:(0,o.getIcon)("menubar-edit")}),y.registerMenubarItem(a.MenuId.MenubarSelectionMenu,{label:(0,l.localize)("menu-bar.title.selection"),order:3,iconClass:(0,o.getIcon)("menubar-selection")}),y.registerMenubarItem(a.MenuId.MenubarViewMenu,{label:(0,l.localize)("menu-bar.title.view"),order:4,iconClass:(0,o.getIcon)("menubar-view")}),y.registerMenubarItem(a.MenuId.MenubarGoMenu,{label:(0,l.localize)("menu-bar.title.go"),order:5,iconClass:(0,o.getIcon)("menubar-go")}),y.registerMenubarItem(a.MenuId.MenubarTerminalMenu,{label:(0,l.localize)("menu-bar.title.terminal"),order:5,iconClass:(0,o.getIcon)("terminal")}),y.registerMenubarItem(a.MenuId.MenubarHelpMenu,{label:(0,l.localize)("menu-bar.title.help"),order:999,iconClass:(0,o.getIcon)("question-circle")}),y.registerMenuItems(a.MenuId.MenubarFileMenu,[{command:u.FILE_COMMANDS.OPEN_FOLDER.id,group:"1_open",when:"config.application.supportsOpenFolder"},{command:u.FILE_COMMANDS.OPEN_WORKSPACE.id,group:"1_open",when:"config.application.supportsOpenWorkspace"},{command:u.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:u.WORKSPACE_COMMANDS.SAVE_WORKSPACE_AS_FILE.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:u.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,group:"2_new"},{command:{id:u.EDITOR_COMMANDS.SAVE_CURRENT.id,label:(0,l.localize)("file.save")},group:"3_save"},{command:{id:u.EDITOR_COMMANDS.SAVE_ALL.id,label:(0,l.localize)("file.saveAll")},group:"3_save"},{command:{id:u.EDITOR_COMMANDS.AUTO_SAVE.id,label:(0,l.localize)("file.autoSave")},toggledWhen:"config.editor.autoSave != off",group:"4_autosave"}]),y.registerMenuItems(a.MenuId.MenubarGoMenu,[{command:{id:u.EDITOR_COMMANDS.GO_BACK.id,label:(0,l.localize)("editor.goBack")},group:"1_go"},{command:{id:u.EDITOR_COMMANDS.GO_FORWARD.id,label:(0,l.localize)("editor.goForward")},group:"1_go"},{command:{id:u.EDITOR_COMMANDS.QUICK_OPEN.id,label:(0,l.localize)("editor.quickOpen")},group:"2_go_file"},{command:{id:u.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,label:(0,l.localize)("editor.workspaceSymbol.quickopen")},group:"2_go_file"},{command:{id:u.EDITOR_COMMANDS.GO_TO_LINE.id,label:(0,l.localize)("editor.goToLine")},group:"3_go_infile"},{command:{id:"editor.action.jumpToBracket",label:(0,l.localize)("menu-bar.go.jumpToBracket")},group:"3_go_infile"},{command:{id:"editor.action.marker.nextInFiles",label:(0,l.localize)("menu-bar.go.nextProblemInFiles")},group:"6_go_problem"},{command:{id:"editor.action.marker.prevInFiles",label:(0,l.localize)("menu-bar.go.prevProblemInFiles")},group:"6_go_problem"}]),y.registerMenuItems(a.MenuId.MenubarTerminalMenu,[{command:{id:u.TERMINAL_COMMANDS.ADD.id,label:u.TERMINAL_COMMANDS.ADD.label},group:"1_terminal"},{command:{id:u.TERMINAL_COMMANDS.SPLIT.id,label:u.TERMINAL_COMMANDS.SPLIT.label},group:"1_terminal"}])}registerKeybindings(y){y.registerKeybinding({command:u.EDITOR_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:"editorFocus"}),y.registerKeybinding({command:u.EDITOR_COMMANDS.UNDO.id,keybinding:"ctrlcmd+z",when:"editorFocus"}),y.registerKeybinding({command:u.EDITOR_COMMANDS.REDO.id,keybinding:"ctrlcmd+shift+z",when:"editorFocus"})}};t.ClientCommonContribution=f,n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],f.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(v.IContextKeyService),n.__metadata("design:type",Object)],f.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(d.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(s.LayoutViewSizeConfig),n.__metadata("design:type",s.LayoutViewSizeConfig)],f.prototype,"layoutViewSize",void 0),t.ClientCommonContribution=f=n.__decorate([(0,l.Domain)(l.CommandContribution,E.ClientAppContribution,g.PreferenceContribution,h.MenuContribution,p.KeybindingContribution),n.__metadata("design:paramtypes",[])],f)},66549:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContribution=void 0,t.ClientAppContribution=Symbol("ClientAppContribution")},34505:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonModule=void 0;const n=e(85608),r=e(76003),o=e(16908),l=e(43718),v=e(37638),_=e(36206),m=e(136),p=e(90697),s=e(45829),h=e(44867),a=e(22780),g=e(10797),d=e(17821);let u=class extends _.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[p.OpenerContribution],this.providers=[a.ClientCommonContribution,h.DefaultOpenerContribution,h.OpenerContributionClient,v.AuthenticationContribution,m.HashCalculateContribution],this.electronProviders=[g.ClientElectronCommonContribution,s.ElectronOpenerContributionClient],this.webProviders=[d.ClientWebCommonContribution],this.backServices=[{servicePath:l.CommonServerPath,protocol:o.CommonServerProtocol},{servicePath:l.KeytarServicePath},{servicePath:l.CryptoServicePath}]}};t.ClientCommonModule=u,t.ClientCommonModule=u=n.__decorate([(0,r.Injectable)()],u)},98881:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecentStorage=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class{async getScopeStorage(){return this.recentStorage=this.recentStorage||await this.getStorage(o.STORAGE_NAMESPACE.RECENT_DATA),this.recentStorage}async getGlobalStorage(){return this.recentGlobalStorage=this.recentGlobalStorage||await this.getStorage(o.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA),this.recentGlobalStorage}};t.RecentStorage=l,n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],l.prototype,"getStorage",void 0),t.RecentStorage=l=n.__decorate([(0,r.Injectable)()],l)},30144:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_CONTAINER_ID=t.SCM_CONTAINER_ID=t.SEARCH_CONTAINER_ID=t.EXPLORER_CONTAINER_ID=t.DEBUG_CONTAINER_ID=t.TEST_RESULT_CONTAINER_ID=t.DEBUG_CONSOLE_CONTAINER_ID=t.TERMINAL_CONTAINER_ID=t.OUTPUT_CONTAINER_ID=t.MARKER_CONTAINER_ID=void 0,t.MARKER_CONTAINER_ID="markers",t.OUTPUT_CONTAINER_ID="output",t.TERMINAL_CONTAINER_ID="terminal",t.DEBUG_CONSOLE_CONTAINER_ID="debug-console",t.TEST_RESULT_CONTAINER_ID="test-result",t.DEBUG_CONTAINER_ID="debug",t.EXPLORER_CONTAINER_ID="explorer",t.SEARCH_CONTAINER_ID="search",t.SCM_CONTAINER_ID="scm",t.EXTENSION_CONTAINER_ID="extension"},10797:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientElectronCommonContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(64102),v=e(39496),_=e(11050);let m=class{registerMenus(s){s.registerMenubarItem(v.MenuId.MenubarAppMenu,{label:(0,o.localize)("app.name",this.appConfig.appName),order:0}),s.registerMenuItems(v.MenuId.MenubarEditMenu,[{command:{id:"electron.undo",label:(0,o.localize)("editor.undo")},nativeRole:"undo",group:"1_undo"},{command:{id:"electron.redo",label:(0,o.localize)("editor.redo")},group:"1_undo",nativeRole:"redo"},{command:{label:(0,o.localize)("edit.cut"),id:"electron.cut"},nativeRole:"cut",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.copy"),id:"electron.copy"},nativeRole:"copy",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.paste"),id:"electron.paste"},nativeRole:"paste",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.selectAll"),id:"electron.selectAll"},nativeRole:"selectAll",group:"2_clipboard"}]),s.registerMenuItems(v.MenuId.MenubarAppMenu,[{command:{id:"electron.quit",label:(0,o.localize)("app.quit")},nativeRole:"quit",group:"4_quit"}])}};t.ClientElectronCommonContribution=m,n.__decorate([(0,r.Autowired)(_.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.ClientElectronCommonContribution=m=n.__decorate([(0,o.Domain)(l.MenuContribution)],m)},66963:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(14109),t),n.__exportStar(e(34505),t),n.__exportStar(e(66549),t),n.__exportStar(e(98881),t)},17821:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientWebCommonContribution=void 0;const n=e(85608),r=e(43718),o=e(64102),l=e(39496),v=e(14109);let _=class{registerMenus(p){p.registerMenuItems(l.MenuId.MenubarEditMenu,[{command:v.EDITOR_COMMANDS.REDO.id,group:"1_undo"},{command:v.EDITOR_COMMANDS.UNDO.id,group:"1_undo"}]),p.registerMenuItem(l.MenuId.MenubarHelpMenu,{command:{id:v.COMMON_COMMANDS.ABOUT_COMMAND.id,label:v.COMMON_COMMANDS.ABOUT_COMMAND.label},nativeRole:"about",group:"0_about"})}};t.ClientWebCommonContribution=_,t.ClientWebCommonContribution=_=n.__decorate([(0,r.Domain)(o.MenuContribution)],_)},25918:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleActionList=t.InlineActionWidget=t.MenuActionList=void 0,t.InlineActionBar=c,t.InlineMenuBar=y;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),v=e(45803),_=e(43718),m=e(93899),p=e(48560),s=e(79951),h=e(55693),a=n.__importDefault(e(17647)),g=n.__importDefault(e(54859)),d=({data:b,hasSubmenu:A,disabled:S,iconService:w,hasChecked:I})=>o.default.createElement("div",{className:(0,r.default)(g.default.menuAction,{[g.default.disabled]:S,[g.default.checked]:b.checked})},o.default.createElement("div",{className:(0,r.default)({[g.default.icon]:I})},b.checked?o.default.createElement(l.Icon,{icon:"check"}):null),o.default.createElement("div",{className:g.default.label},b.label?(0,s.transformLabelWithCodicon)(_.strings.mnemonicButtonLabel(b.label,!0),{margin:"0 3px"},w?.fromString.bind(w)):""),o.default.createElement("div",{className:g.default.tip},b.keybinding?o.default.createElement("div",{className:g.default.shortcut},b.keybinding):null,A?o.default.createElement("div",{className:g.default.submenuIcon},o.default.createElement(l.Icon,{icon:"right"})):null,!b.keybinding&&!A&&b.extraDesc&&o.default.createElement("div",{className:g.default.extraDesc},b.extraDesc))),u=({data:b=[],context:A=[],afterClick:S,style:w,iconService:I,renderSubMenuTitle:D,renderMenuItem:T})=>{if(!b.length)return null;const R=o.default.useCallback(k=>{const{key:F,item:L}=k;if([m.SeparatorMenuItemNode.ID,m.SubmenuItemNode.ID].includes(F))return;const U=(Array.isArray(L.props.children)?L.props.children[0]:L.props.children).props.data;U&&(typeof U.execute=="function"&&U.execute(A),typeof S=="function"&&S(U))},[b,A]),M=o.default.useCallback((k,F)=>{if(D){const L=D(k,{hasSubmenu:!0,disabled:!1});if(L)return L}return o.default.createElement(d,{hasChecked:F,hasSubmenu:!0,data:k,iconService:I})},[D]),O=o.default.useCallback((k,F)=>{if(T){const L=T(k,{hasSubmenu:!1,disabled:k.disabled});if(L)return L}return o.default.createElement(d,{hasChecked:F,data:k,disabled:k.disabled,iconService:I})},[T]),x=o.default.useCallback(k=>{const F=k.some(L=>L.checked);return k.map((L,N)=>{if(L.id===m.SeparatorMenuItemNode.ID)return null;const U=k[N+1]&&k[N+1].id===m.SeparatorMenuItemNode.ID;return L.id===m.SubmenuItemNode.ID?!Array.isArray(L.children)||!L.children.length?null:o.default.createElement(o.default.Fragment,{key:`${L.id}-${L.submenuId}-${N}`},o.default.createElement(v.Menu.SubMenu,{key:`${L.id}-${L.submenuId}-${N}`,className:g.default.submenuItem,popupClassName:"kt-menu",title:M(L,F)},x(L.children)),U?o.default.createElement(v.Menu.Divider,{key:`divider-${N}`,className:g.default.menuItemDivider}):null):o.default.createElement(o.default.Fragment,{key:`${L.id}-${N}`},o.default.createElement(v.Menu.Item,{id:`${L.id}-${N}`,key:`${L.id}-${N}`,className:g.default.menuItem,disabled:L.disabled},O(L,F)),U?o.default.createElement(v.Menu.Divider,{key:`divider-${N}`,className:g.default.menuItemDivider}):null)})},[]);return o.default.createElement(v.Menu,{className:"kt-menu",selectable:!1,motion:{motionLeave:!1,motionEnter:!1},builtinPlacements:a.default,onClick:R,style:w},x(b))};t.MenuActionList=u;const E=({type:b,icon:A,disabled:S,onClick:w,title:I})=>{const D=(0,h.useDesignStyles)(g.default.btnAction,"btnAction");if(b==="icon")return o.default.createElement(l.Button,{size:"small",type:b,className:D,onClick:w,title:I,icon:A||"ellipsis"});const T={};return(0,_.isBoolean)(S)&&(T.disabled=S),o.default.createElement(l.Button,{size:"small",type:"secondary",className:D,onClick:w,...T,title:I},o.default.createElement(l.Icon,{icon:A||"ellipsis"}))};E.displayName="EllipsisWidget",t.InlineActionWidget=o.default.memo(({iconService:b,type:A="icon",data:S,context:w=[],className:I,afterClick:D,...T})=>{const R=(0,h.useDesignStyles)(g.default.iconAction,"iconAction"),M=(0,h.useDesignStyles)(g.default.btnAction,"btnAction"),[O,x]=(0,o.useState)(!1),k=o.default.useCallback(async(U,...W)=>{if(U&&(U.preventDefault(),U.stopPropagation()),!O){if(x(!0),S.id===m.SubmenuItemNode.ID&&U){const j={x:U.clientX,y:U.clientY};await S.execute([j,...w])}else typeof S.execute=="function"&&await S.execute([...w,...W]);x(!1),typeof D=="function"&&D()}},[S,w]),[F,L]=o.default.useMemo(()=>{let U=S.tooltip||S.label;const W=S.label;return S.keybinding&&(U=`${U} (${S.keybinding})`),[U,W]},[S]),N=S.id===m.SubmenuItemNode.ID;return A==="icon"&&!S.type?o.default.createElement(l.Button,{type:S.icon?"icon":"link",className:(0,r.default)(R,I,{[g.default.disabled]:S.disabled,[g.default.submenuIconAction]:N}),title:F,iconClass:S.icon,onClick:k,...T},!S.icon&&L):S.type==="checkbox"?o.default.createElement(l.CheckBox,{className:(0,r.default)(I,M),disabled:S.disabled,label:S.label,title:F,checked:S.checked,onChange:U=>k(void 0,U.target.checked),...T}):o.default.createElement(l.Button,{loading:O,showLoadingIcon:!1,className:(0,r.default)(I,M),disabled:S.disabled,onClick:k,size:"small",type:S.type,title:F,...T},(0,s.transformLabelWithCodicon)(L,{margin:"0 3px"},b?.fromString.bind(b)),N&&o.default.createElement(l.Icon,{icon:"down",className:"kt-button-secondary-more"}))}),t.InlineActionWidget.displayName="InlineAction";const f=({data:b,context:A})=>{const S=o.default.useCallback(()=>b.getExecuteArgs(A),[b,A]);return o.default.createElement(b.component,{getExecuteArgs:S})};f.displayName="CustomAction",t.TitleActionList=o.default.memo(({type:b="icon",nav:A=[],more:S=[],moreIcon:w,moreTitle:I,context:D=[],extraNavActions:T=[],moreAtFirst:R=!1,className:M,afterClick:O,menuId:x,iconService:k,regroup:F=(...L)=>L})=>{const L=(0,p.useInjectable)(m.ICtxMenuRenderer),N=(0,p.useInjectable)(m.AbstractMenuService),U=(0,h.useDesignStyles)(g.default.titleActions,"titleActions"),[W,j]=F(A,S),Q=o.default.useCallback(X=>{X.preventDefault(),X.stopPropagation(),j&&L.show({anchor:{x:X.clientX,y:X.clientY},menuNodes:j,args:D,onHide:O})},[j,D]);if(W.length===0&&j.length===0&&T.length===0)return null;const G=j.length>0?o.default.createElement(E,{disabled:j[0].disabled,icon:w,type:b,onClick:Q,title:I}):null;return o.default.createElement("div",{className:(0,r.default)([U,M]),"data-menu-id":x},R&&G,W.map(X=>{if(X.id===m.ComponentMenuItemNode.ID)return o.default.createElement(f,{context:D,data:X,key:X.nodeId});if(X.id===m.SubmenuItemNode.ID){const V=N.createMenu(X.submenuId);if(!((0,m.generateMergedCtxMenu)({menus:V}).length>0))return}if(X.id===m.SeparatorMenuItemNode.ID)return o.default.createElement("span",{key:`vertical-divider-${X.id}`,className:g.default.verticalDivider});const $=X.id===m.SubmenuItemNode.ID?X.submenuId:X.id;return o.default.createElement(t.InlineActionWidget,{id:$,key:$,className:(0,r.default)({[g.default.selected]:X.checked}),type:b,data:X,afterClick:O,context:D,iconService:k})}),Array.isArray(T)&&T.length?o.default.createElement(o.default.Fragment,null,W.length&&o.default.createElement("span",{className:g.default.divider}),T):null,!R&&G)}),t.TitleActionList.displayName="TitleActionList";function c(b){const{menus:A,context:S,separator:w="navigation",debounce:I,isFlattenMenu:D=!1,...T}=b,[R,M]=(0,h.useMenus)(A,w,S,I),O=(0,o.useMemo)(()=>D?[...R,...M]:R,[R,M,D]);return o.default.createElement(t.TitleActionList,{menuId:A.menuId,nav:O,more:w==="inline"||D?[]:M,...T})}function y(b){const{iconService:A,menus:S,context:w,moreIcon:I,moreTitle:D,separator:T="navigation",...R}=b,[M,O]=(0,h.useContextMenus)(S);return o.default.createElement(t.TitleActionList,{menuId:S.menuId,nav:M,more:T==="inline"?[]:O,moreIcon:I,moreTitle:D,context:w,iconService:A,...R})}y.displayName="InlineMenuBar"},17647:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placements=void 0;const e={adjustX:1,adjustY:1},n=[0,0];t.placements={topLeft:{points:["bl","tl"],overflow:e,offset:[0,-4],targetOffset:n},topCenter:{points:["bc","tc"],overflow:e,offset:[0,-4],targetOffset:n},topRight:{points:["br","tr"],overflow:e,offset:[0,-4],targetOffset:n},bottomLeft:{points:["tl","bl"],overflow:e,offset:[0,4],targetOffset:n},bottomCenter:{points:["tc","bc"],overflow:e,offset:[0,4],targetOffset:n},bottomRight:{points:["tr","br"],overflow:e,offset:[0,4],targetOffset:n}},t.default=t.placements},89847:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIAction=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(43718),v=e(70650),_=e(22689),m=e(48560),p=e(57995),s=e(24951),h=e(49716),a=e(52141),g=n.__importDefault(e(27410)),d=(0,_.createLayoutEventType)(l.AIInlineChatContentWidgetId),u=new CustomEvent(d,{bubbles:!0}),E=f=>{const{operationList:c,moreOperation:y,showClose:b=!0,onClickItem:A,onClose:S,customOperationRender:w,loading:I,loadingShowOperation:D=!1}=f,T=o.default.useRef(null),[R,M]=(0,m.useHover)(),O=(0,m.useInjectable)(v.AINativeConfigService),x=(0,o.useCallback)(()=>{S?.()},[S]);(0,m.useChange)(M,()=>{var N;(N=T.current)===null||N===void 0||N.dispatchEvent(u)});const k=(0,o.useMemo)(()=>{const N=O?.inlineChat.logo;return typeof N=="string"?o.default.createElement("img",{src:N,className:g.default.ai_action_icon}):o.default.isValidElement(N)?N:typeof N=="function"?o.default.createElement(N,null):null},[O?.inlineChat.logo]),F=(0,o.useCallback)(()=>I&&D?o.default.createElement("div",{className:g.default.loading_mask}):null,[I,D]),L=(0,o.useCallback)(()=>{if(I&&!D)return null;const N=o.default.createElement(o.default.Fragment,null,c?.map(({name:U,title:W,id:j},Q)=>W?o.default.createElement(a.EnhancePopover,{id:j,title:W,key:`popover_${Q}`},o.default.createElement(p.EnhanceIcon,{wrapperClassName:g.default.operate_item,onClick:()=>A?.(j)},o.default.createElement("span",{key:Q},U))):o.default.createElement(p.EnhanceIcon,{wrapperClassName:g.default.operate_item,onClick:()=>A?.(j),key:Q},o.default.createElement("span",null,U))),y?.length?o.default.createElement(p.EnhanceIconWithCtxMenu,{icon:"more",menuNodes:y,wrapperClassName:g.default.operate_btn,skew:{x:-83,y:5}}):null);return o.default.createElement("div",{ref:R,className:g.default.operate_container},F(),k&&o.default.createElement(s.LineVertical,{height:"100%",margin:"0 8px",maxHeight:14,minHeight:14}),w?o.default.createElement("div",{className:g.default.custom_operation_wrapper},w):o.default.createElement("div",{className:g.default.default_operation_wrapper},N))},[w,c,y,I,D,k]);return o.default.createElement("div",{ref:T,className:(0,r.default)(g.default.ai_action_wrapper,I&&g.default.loading,D&&g.default.loading_show_operation)},o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:g.default.stable_container},I?o.default.createElement(a.EnhancePopover,{id:"inline_chat_loading",title:(0,l.localize)("aiNative.inline.chat.operate.loading.cancel")},o.default.createElement(h.Loading,{className:g.default.loading_icon})):k?o.default.createElement("div",{className:g.default.logo_container},k):null),L(),b&&o.default.createElement("div",{className:g.default.close_container},o.default.createElement(s.LineVertical,{height:"100%",margin:"0px 8px",maxHeight:14,minHeight:14}),o.default.createElement(p.EnhanceIcon,{wrapperClassName:g.default.operate_btn,icon:"window-close",onClick:x}))))};t.AIAction=E},66205:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContentWidgetContainerPanel=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(41771)),l=v=>r.default.createElement("div",{className:o.default.inline_chat_container_panel,style:v.style},v.children);t.ContentWidgetContainerPanel=l},57995:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AILogoAvatar=t.EnhanceIconWithCtxMenu=t.EnhanceIcon=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(43718),v=e(81878),_=e(97222),m=e(48560),p=n.__importDefault(e(42798));t.EnhanceIcon=o.default.forwardRef((a,g)=>o.default.createElement("div",{className:(0,r.default)(a.wrapperClassName,p.default.ai_enhance_icon),style:a.wrapperStyle,onClick:a.onClick,ref:g,tabIndex:a.tabIndex,role:a.role,"aria-label":a.ariaLabel,"aria-pressed":a.ariaPressed},o.default.createElement(v.Icon,{className:(0,r.default)(a.className,p.default.icon),children:null,onClick:()=>null,style:(a.icon||a.iconClass)&&a.children?{marginRight:5}:{},icon:a.icon,iconClass:a.iconClass}),a.children&&o.default.createElement("span",{className:p.default.children_wrap},a.children)));const s=a=>{const{children:g,menuNodes:d,skew:u,id:E,...f}=a,c=(0,m.useInjectable)(l.CommandService),y=(0,m.useInjectable)(_.IBrowserCtxMenu),[b,A]=o.default.useState(void 0),S=o.default.useRef(null);o.default.useEffect(()=>{w()},[S.current,u]);const w=(0,o.useCallback)(D=>{requestAnimationFrame(()=>{if(S.current){const T=S.current.getBoundingClientRect(),{x:R,y:M,width:O,height:x}=T,k={x:R+O,y:M+x};u&&(k.x+=u.x,k.y+=u.y),A(k),D&&D(k)}})},[S.current,u]),I=o.default.useCallback(()=>{b&&(d?w(D=>{y.show({anchor:D,menuNodes:d})}):E&&c.executeCommand(E))},[S.current,d,b,E]);return o.default.createElement(t.EnhanceIcon,{ref:S,onClick:I,...f},g)};t.EnhanceIconWithCtxMenu=s;const h=a=>o.default.createElement("div",{className:(0,r.default)(p.default.ai_logo_avatar_container,a.className)},o.default.createElement(v.Icon,{icon:"magic-wand",className:(0,r.default)(a.iconClassName,p.default.avatar_icon)}));t.AILogoAvatar=h},89195:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(89847),t),n.__exportStar(e(57995),t),n.__exportStar(e(28229),t),n.__exportStar(e(24951),t),n.__exportStar(e(52141),t),n.__exportStar(e(75777),t),n.__exportStar(e(49716),t),n.__exportStar(e(83913),t)},28229:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIInlineResult=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(57995),v=e(24951),_=e(75777),m=n.__importDefault(e(5011)),p=s=>{const{iconItems:h,isRenderThumbs:a=!0,isRenderClose:g=!1,closeClick:d}=s;return o.default.createElement("div",{className:m.default.ai_inline_result_panel},o.default.createElement("div",{className:m.default.side},h.map(({icon:u,text:E,onClick:f,btnType:c},y)=>o.default.createElement(l.EnhanceIcon,{wrapperClassName:(0,r.default)(m.default.operate_btn,c==="default"?m.default.default:""),icon:u,onClick:f,key:y},o.default.createElement("span",null,E)))),a&&o.default.createElement(o.default.Fragment,null,o.default.createElement(v.LineVertical,{height:"60%",margin:"0px 6px 0 6px"}),o.default.createElement("div",{className:m.default.side},o.default.createElement(_.Thumbs,{wrapperClassName:m.default.operate_icon}))),g&&o.default.createElement(o.default.Fragment,null,o.default.createElement(l.EnhanceIcon,{wrapperClassName:m.default.operate_btn,icon:"close",onClick:d})))};t.AIInlineResult=p},83913:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InteractiveInput=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),v=e(43718),_=e(37015),m=e(48560),p=e(7369),s=e(89195),h=n.__importDefault(e(42348)),a=160,g=32,d="ai-native-chat-input-history",u=10;t.InteractiveInput=o.default.forwardRef((E,f)=>{const{placeholder:c,onKeyDown:y,onBlur:b,onValueChange:A,onHeightChange:S,onFocus:w,onSend:I,onStop:D,disabled:T=!1,className:R,height:M,width:O,sendBtnClassName:x,popoverPosition:k,autoFocus:F,defaultValue:L}=E,N=(0,o.useRef)(null),U=(0,m.useInjectable)(p.GlobalBrowserStorageService),W=(0,o.useRef)(),j=(0,o.useRef)(0),[Q,G]=(0,o.useState)(L||E.value||""),[X,$]=(0,o.useState)(M||g),[V,H]=(0,o.useState)(!1),K=o.default.useRef(!1);(0,o.useImperativeHandle)(f,()=>N.current),(0,o.useEffect)(()=>{const fe=U.getData(d);fe&&(W.current=fe)},[]),(0,o.useEffect)(()=>{N&&N.current&&F&&N.current.focus()},[N]),(0,o.useEffect)(()=>{var fe;const te=E.value;(0,v.isUndefined)(te)||te!==((fe=N.current)===null||fe===void 0?void 0:fe.value)&&G(te||"")},[E.value,Q,N]),(0,o.useEffect)(()=>{(0,v.isUndefined)(M)||M!==X&&$(M)},[M,X,S]),(0,o.useEffect)(()=>{if(!Q){$(g);return}if(N&&N.current&&X<=a){N.current.style.height="0px";const fe=N.current.scrollHeight;N.current.style.height=Math.min(fe,a)+"px";const te=Math.min(fe+12,a);$(te)}},[N,Q,S,X]),(0,o.useEffect)(()=>{S?.(X)},[X]);const Y=(0,o.useCallback)(fe=>{K.current=!0,G(fe),A?.(fe)},[A]),Z=(0,o.useCallback)(fe=>{H(!0),w?.(fe)},[w]),oe=(0,o.useCallback)(fe=>{H(!1),b?.(fe)},[b]),ie=(0,o.useCallback)(()=>{D&&D()},[]),he=(0,o.useCallback)(()=>{T||Q.trim()&&(W.current=W.current||[],W.current.push(Q),j.current=0,U.setData(d,W.current.slice(-u)),K.current=!1,I?.(Q))},[I,Q,T]),me=(0,o.useCallback)(fe=>{var te,ge,Re;if(fe.key===_.Key.ENTER.code&&!fe.nativeEvent.isComposing){if(fe.shiftKey)return;fe.preventDefault(),he();return}else if((fe.key===_.Key.ARROW_UP.code||fe.key===_.Key.ARROW_DOWN.code)&&(!Q||!K.current)){if(fe.preventDefault(),fe.key===_.Key.ARROW_UP.code){const Oe=(te=W.current)===null||te===void 0?void 0:te[W.current.length-1-j.current];Oe&&(G(Oe),A?.(Oe),j.current=Math.min(j.current+1,((ge=W.current)===null||ge===void 0?void 0:ge.length)||0))}else if(fe.key===_.Key.ARROW_DOWN.code){fe.preventDefault();const Oe=(Re=W.current)===null||Re===void 0?void 0:Re[W.current.length-1-j.current];Oe&&(G(Oe),A?.(Oe),j.current=Math.max(j.current-1,0))}}y?.(fe)},[y,he,Q]),q=(0,o.useMemo)(()=>o.default.createElement("div",{className:h.default.input_icon_container},o.default.createElement("div",{className:(0,r.default)(h.default.send_chat_btn,V&&h.default.active,T&&h.default.disabled,x)},T?D?o.default.createElement(l.Popover,{id:`ai_chat_input_send_${(0,v.uuid)(4)}`,content:(0,v.localize)("aiNative.chat.enter.send"),delay:1500,position:k??l.PopoverPosition.top,disable:T},o.default.createElement(s.EnhanceIcon,{wrapperClassName:h.default.stop_icon,className:"codicon codicon-debug-stop",onClick:ie,tabIndex:0,role:"button",ariaLabel:(0,v.localize)("aiNative.chat.enter.send")})):o.default.createElement("div",{className:h.default.ai_loading},o.default.createElement("div",{className:h.default.loader}),o.default.createElement("div",{className:h.default.loader}),o.default.createElement("div",{className:h.default.loader})):o.default.createElement(l.Popover,{id:`ai_chat_input_send_${(0,v.uuid)(4)}`,content:(0,v.localize)("aiNative.chat.enter.send"),delay:1500,position:k??l.PopoverPosition.top,disable:T},o.default.createElement(s.EnhanceIcon,{wrapperClassName:h.default.send_icon,className:(0,l.getIcon)("send-solid"),onClick:he,tabIndex:0,role:"button",ariaLabel:(0,v.localize)("aiNative.chat.enter.send")})))),[V,T,x,Q,k]),be=(0,o.useMemo)(()=>(0,v.isUndefined)(O)?"100%":O+"px",[O]);return o.default.createElement(l.TextArea,{ref:N,placeholder:c,wrapperStyle:{height:X+"px",width:be},style:{height:X-10+"px"},value:Q,onKeyDown:me,onFocus:Z,onBlur:oe,onValueChange:Y,disabled:T,className:(0,r.default)(h.default.interactive_input_container,V?h.default.active:null,R),addonAfter:q})}),t.InteractiveInput.displayName="interactiveInput"},24951:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HorizontalVertical=t.LineVertical=void 0;const r=e(85608).__importDefault(e(14041)),o={backgroundColor:"var(--editorGroup-border)",height:"100%",width:"1px",minWidth:"1px"},l={backgroundColor:"var(--editorGroup-border)",width:"100%",height:"1px",minHeight:"1px"},v=m=>r.default.createElement("span",{style:{...o,...m}});t.LineVertical=v;const _=m=>r.default.createElement("span",{style:{...l,...m}});t.HorizontalVertical=_},49716:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=n.__importDefault(e(43135));t.Loading=o.default.memo(_=>o.default.createElement(l.Icon,{className:(0,r.default)(_.className,v.default.loading_indicator),iconClass:(0,l.getIcon)("loading")})),t.Loading.displayName="Loading"},52141:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnhancePopover=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),l=e(43718),v=_=>{const{children:m,id:p,title:s,onClick:h}=_,[a,g]=r.default.useState(!1),d=(0,r.useMemo)(()=>p+(0,l.uuid)(6),[p]),u=(0,r.useCallback)(f=>{g(!1),h&&h(f)},[h]),E=(0,r.useCallback)(f=>{g(f)},[]);return r.default.createElement(o.Popover,{id:d,title:s,onClick:u,display:a,onDisplayChange:E},m)};t.EnhancePopover=v},75777:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Thumbs=void 0;const r=e(85608).__importStar(e(14041)),o=e(43718),l=e(95040),v=e(81878),_=e(48560),m=e(67304),p=e(57995),s=h=>{const a=(0,_.useInjectable)(l.IAIInlineChatService),{relationId:g,onClick:d,wrapperClassName:u}=h,[E,f]=(0,r.useState)("thumbs"),[c,y]=(0,r.useState)("thumbsdown"),b=(0,r.useCallback)(w=>{d&&d(w),a&&a.fireThumbsEvent(w)},[g,a]),A=(0,r.useCallback)(w=>{w==="up"&&E==="thumbs"&&(f("thumbs-fill"),y(!1),b(!0)),w==="up"&&E==="thumbs-fill"&&(f("thumbs"),y("thumbsdown")),w==="down"&&c==="thumbsdown"&&(y("thumbsdown-fill"),f(!1),b(!1)),w==="down"&&c==="thumbsdown-fill"&&(y("thumbsdown"),f("thumbs"))},[E,c]),S=(0,_.useUUID)();return r.default.createElement(r.default.Fragment,null,typeof E=="string"&&r.default.createElement(v.Popover,{id:`ai-chat-thumbsup-${S}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title")},r.default.createElement(p.EnhanceIcon,{wrapperClassName:u,onClick:()=>A("up"),className:(0,m.getExternalIcon)(E,m.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title"),ariaPressed:E==="thumbs-fill"?"true":"false"})),typeof c=="string"&&r.default.createElement(v.Popover,{id:`ai-chat-thumbsdown-${S}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title")},r.default.createElement(p.EnhanceIcon,{wrapperClassName:u,onClick:()=>A("down"),className:(0,m.getExternalIcon)(c,m.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title"),ariaPressed:c==="thumbsdown-fill"?"true":"false"})))};t.Thumbs=s},81878:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scroll=t.Scrollbars=t.NativeSelect=void 0;const n=e(85608);n.__exportStar(e(97885),t),n.__exportStar(e(73215),t),n.__exportStar(e(32293),t);var r=e(77331);Object.defineProperty(t,"NativeSelect",{enumerable:!0,get:function(){return r.Select}}),n.__exportStar(e(48412),t),n.__exportStar(e(79383),t),n.__exportStar(e(50708),t),n.__exportStar(e(7273),t),n.__exportStar(e(14640),t),n.__exportStar(e(54076),t),n.__exportStar(e(79024),t),n.__exportStar(e(89832),t),n.__exportStar(e(54713),t),n.__exportStar(e(18875),t),n.__exportStar(e(91397),t),n.__exportStar(e(31059),t),n.__exportStar(e(72871),t),n.__exportStar(e(34128),t);var o=e(77011);Object.defineProperty(t,"Scrollbars",{enumerable:!0,get:function(){return o.Scrollbars}}),Object.defineProperty(t,"Scroll",{enumerable:!0,get:function(){return o.Scrollbars}})},57327:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoxPanel=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(48560),v=e(38578),_=e(55693),m=e(25719),p=n.__importDefault(e(91290)),s=({className:h,children:a=[],direction:g="left-to-right",...d})=>{const u=o.default.Children.toArray(a),E=(0,l.useInjectable)(v.AppConfig),f=(0,_.useDesignStyles)(p.default["box-panel"],"box-panel");(0,o.useEffect)(()=>{E.didRendered&&E.didRendered()},[]);const c=m.Layout.getStyleProperties(g);return o.default.createElement("div",{...d,className:(0,r.default)(f,h),style:{flexDirection:c.direction,zIndex:d.zIndex||d["z-index"]}},u.map((y,b)=>{const A=y.props||{};return o.default.createElement("div",{key:b,id:A["data-wrapper-id"],className:(0,r.default)(p.default.wrapper,A["data-wrapper-class"]),style:{flex:A.flex,overflow:A.overflow,zIndex:A.zIndex||A["z-index"],[c.minSize]:A.defaultSize,backgroundColor:A.backgroundColor}},y)}))};t.BoxPanel=s},28003:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLayout=t.getStorageValue=void 0,t.ToolbarActionBasedLayout=m,t.fixLayout=p;const r=e(85608).__importDefault(e(14041)),o=e(52564),l=e(57327),v=e(99333),_=()=>{let s={},h={};try{const a=localStorage.getItem("layout");a&&(s=JSON.parse(a));const g=localStorage.getItem("theme");g&&(h=JSON.parse(g))}catch{}return{layout:p(s),colors:h}};t.getStorageValue=_,t.DefaultLayout=m;function m(s={}){var h,a,g,d,u,E;const{layout:f}=(0,t.getStorageValue)();return r.default.createElement(l.BoxPanel,{direction:"top-to-bottom"},r.default.createElement(o.SlotRenderer,{id:"top",defaultSize:s.topSlotDefaultSize||0,slot:"top",zIndex:s.topSlotZIndex}),r.default.createElement(v.SplitPanel,{id:"main-horizontal",flex:1},r.default.createElement(o.SlotRenderer,{slot:o.SlotLocation.view,isTabbar:!0,defaultSize:!((h=f.left)===null||h===void 0)&&h.currentId?((a=f.left)===null||a===void 0?void 0:a.size)||310:49,minResize:280,maxResize:480,minSize:49}),r.default.createElement(v.SplitPanel,{id:"main-vertical",minResize:300,flexGrow:1,direction:"top-to-bottom"},r.default.createElement(o.SlotRenderer,{flex:2,flexGrow:1,minResize:200,slot:"main"}),r.default.createElement(o.SlotRenderer,{flex:1,defaultSize:!((g=f.bottom)===null||g===void 0)&&g.currentId?(d=f.bottom)===null||d===void 0?void 0:d.size:24,minResize:160,slot:o.SlotLocation.panel,isTabbar:!0})),r.default.createElement(o.SlotRenderer,{slot:o.SlotLocation.extendView,isTabbar:!0,defaultSize:!((u=f.right)===null||u===void 0)&&u.currentId?((E=f.right)===null||E===void 0?void 0:E.size)||310:0,minResize:280,maxResize:480,minSize:0})),r.default.createElement(o.SlotRenderer,{id:"statusBar",defaultSize:24,slot:"statusBar"}))}function p(s){const h={...s};for(const a in s)!s[a]||a==="containerLocations"||!s[a].size&&s[a].currentId&&(h[a].currentId="");return h}},32293:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(25719),t),n.__exportStar(e(99333),t),n.__exportStar(e(57327),t),n.__exportStar(e(28003),t)},25719:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Layout=void 0;const n=e(73215),r={"left-to-right":{direction:"row",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"right-to-left":{direction:"row-reverse",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"top-to-bottom":{direction:"column",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"},"bottom-to-top":{direction:"column-reverse",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"}};var o;(function(l){function v(d){return r[d]}l.getStyleProperties=v;function _(d){return r[d].direction}l.getFlexDirection=_;function m(d){return r[d].size}l.getSizeProperty=m;function p(d){return r[d].domSize}l.getDomSizeProperty=p;function s(d){return r[d].minSize}l.getMinSizeProperty=s;function h(d){return r[d].maxSize}l.getMaxSizeProperty=h;function a(d){return d==="bottom-to-top"||d==="top-to-bottom"?n.ResizeHandleVertical:n.ResizeHandleHorizontal}l.getResizeHandle=a;function g(d){return d==="bottom-to-top"||d==="top-to-bottom"?"row":"column"}l.getTabbarDirection=g})(o||(t.Layout=o={}))},99333:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPanel=t.PanelContext=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(43718),v=e(68456),_=e(48560),m=e(73215),p=e(25719),s=e(71707),h=n.__importDefault(e(91290));t.PanelContext=o.default.createContext({setSize:(u,E)=>{},setRelativeSize:(u,E,f)=>{},getSize:u=>0,getRelativeSize:u=>[0,0],lockSize:(u,E)=>{},setMaxSize:(u,E)=>{},hidePanel:u=>{}});const a=(u,E,f)=>{var c,y;return(y=u&&u.props&&((c=u.props[E])!==null&&c!==void 0?c:u.props[`data-sp-${E}`]))!==null&&y!==void 0?y:f};function g(u,E){return a(u,"savedSize")?a(u,"savedSize")+"px":a(u,"defaultSize")!==void 0?a(u,"defaultSize")+"px":a(u,"flex")?a(u,"flex")/E*100+"%":1/E*100+"%"}const d=u=>{const E=(0,_.useInjectable)(s.SplitPanelManager).getService(u.id),{id:f,className:c,headerSize:y,resizeHandleClassName:b,style:A,children:S=[],direction:w="left-to-right",resizeKeep:I=!0,dynamicTarget:D}=o.default.useMemo(()=>E.interceptProps(u),[E,E.interceptProps,u]),T=p.Layout.getResizeHandle(w),R=p.Layout.getStyleProperties(w),M=o.default.useMemo(()=>o.default.Children.toArray(S),[S]),O=o.default.useMemo(()=>M.find(fe=>a(fe,"flexGrow")),[M]),x=o.default.useMemo(()=>M.reduce((fe,te)=>fe+a(te,"flex",1),0),[M]),k=o.default.useRef([]),F=(0,_.useInjectable)(l.IEventBus),L=o.default.useRef(),N=o.default.useRef(M.map(()=>!1)),U=o.default.useRef(M.map(()=>!1)),W=o.default.useRef(N.current.slice(0,M.length-1)),[j,Q]=o.default.useState(W.current),[G,X]=o.default.useState(U.current),[$,V]=o.default.useState(N.current);E.panels=[];const H=o.default.useCallback(fe=>(te,ge)=>{const Re=ge?fe-1:fe,Oe=k.current[Re];Oe&&Oe.setAbsoluteSize(te!==void 0?te:a(M[fe],"defaultSize"),ge,I)},[k.current]),K=o.default.useCallback(fe=>(te,ge,Re)=>{const Oe=Re?fe-1:fe,Le=k.current[Oe];Le&&Le.setRelativeSize(te,ge)},[k.current]),Y=o.default.useCallback(fe=>te=>{const ge=te?fe-1:fe,Re=k.current[ge];return Re?Re.getAbsoluteSize(te):0},[k.current]),Z=o.default.useCallback(fe=>te=>{const ge=te?fe-1:fe,Re=k.current[ge];return Re?Re.getRelativeSize():[0,0]},[k.current]),oe=o.default.useCallback(fe=>(te,ge)=>{const Re=ge?fe-1:fe,Oe=W.current.map((Le,Ne)=>Ne===Re?te!==void 0?te:!Le:Le);W.current=Oe,Q(Oe)},[k.current]),ie=o.default.useCallback(fe=>te=>{const ge=N.current.map((Re,Oe)=>Oe===fe?te!==void 0?te:!Re:Re);N.current=ge,V(ge)},[k.current]),he=o.default.useCallback(fe=>te=>{const ge=U.current.map((Oe,Le)=>Le===fe?te!==void 0?!te:!Oe:Oe);U.current=ge;const Re=a(M[fe],"slot")||a(M[fe],"id");Re&&me(Re),X(ge)},[M,U.current]),me=o.default.useCallback(fe=>{fe&&(F.fire(new v.ResizeEvent({slotLocation:fe})),F.fireDirective(v.ResizeEvent.createDirective(fe)))},[F]),q=o.default.useMemo(()=>M.map((fe,te)=>{const ge=[],Re=a(fe,"minSize"),Oe=a(fe,"maxSize"),Le=a(fe,"flexGrow");if(te!==0){const Ne=te===1?M[te-1]:M[te];let De;Le?De=m.ResizeFlexMode.Prev:a(M[te-1],"flexGrow")&&(De=m.ResizeFlexMode.Next),a(Ne,"noResize")||j[te-1]||ge.push(o.default.createElement(T,{className:b,onResize:()=>{const ke=a(M[te-1],"slot")||a(M[te-1],"id"),Te=a(M[te],"slot")||a(M[te],"id");me(ke),me(Te)},noColor:!0,findNextElement:D?ke=>E.getFirstResizablePanel(te-1,ke):void 0,findPrevElement:D?ke=>E.getFirstResizablePanel(te-1,ke,!0):void 0,key:`split-handle-${te}`,delegate:ke=>{k.current.push(ke)},flexMode:De}))}return ge.push(o.default.createElement(t.PanelContext.Provider,{key:te,value:{setSize:H(te),getSize:Y(te),setRelativeSize:K(te),getRelativeSize:Z(te),lockSize:oe(te),setMaxSize:ie(te),hidePanel:he(te)}},o.default.createElement("div",{"data-min-resize":a(fe,"minResize"),"data-max-resize":a(fe,"maxResize"),ref:Ne=>{Ne&&E.panels.indexOf(Ne)===-1&&E.panels.push(Ne)},className:g(fe,x)===`${y}px`?m.RESIZE_LOCK:"",id:a(fe,"id"),style:{...a(fe,"flex")&&!a(fe,"savedSize")&&!O?{flex:a(fe,"flex")}:{[R.size]:g(fe,x)},[R.minSize]:Re?Re+"px":"-1px",[R.maxSize]:$[te]&&Oe?Oe+"px":"unset",...Le!==void 0?{flexGrow:Le}:{},display:G[te]?"none":"block"}},fe))),ge}).filter(Boolean),[S,M,b,D,k.current,G,j]);return o.default.useEffect(()=>{L.current&&E.setRootNode(L.current);const fe=F.onDirective(v.ResizeEvent.createDirective(f),()=>{M.forEach(te=>{me(a(te,"slot")||a(te,"id"))})});return()=>{fe.dispose()}},[]),o.default.useMemo(()=>{const{minResize:fe,flexGrow:te,minSize:ge,maxSize:Re,savedSize:Oe,defaultSize:Le,flex:Ne,noResize:De,slot:Ce,headerSize:ke,...Te}=u;return delete Te.resizeHandleClassName,delete Te.dynamicTarget,delete Te.resizeKeep,delete Te.direction,E.renderSplitPanel(o.default.createElement("div",{...Te,ref:We=>L.current=We,className:(0,r.default)(h.default["split-panel"],c),style:{flexDirection:R.direction,...A},"data-min-resize":fe,"data-max-resize":Re,"data-min-size":ge,"data-max-size":Re,"data-saved-size":Oe,"data-default-size":Le,"data-header-size":ke,"data-flex":Ne,"data-flex-grow":te,"data-no-resize":De,"data-slot":Ce}),q,Te)},[E,E.renderSplitPanel,q,L,A,u])};t.SplitPanel=d},71707:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPanelManager=t.SplitPanelService=t.ISplitPanelService=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),l=e(43718),v=e(38578),_=e(73215);t.ISplitPanelService=Symbol("ISplitPanelService");let m=class extends l.Disposable{constructor(h){super(),this.panelId=h,this._whenReadyDeferred=new l.Deferred,this.panels=[]}get isVisible(){return this.rootNode&&this.rootNode.clientHeight>0||!1}get whenReady(){return this._whenReadyDeferred.promise}setRootNode(h){this.rootNode=h,this._whenReadyDeferred.resolve()}getFirstResizablePanel(h,a,g){if(g){if(a){for(let d=h;d>=0;d--)if(!this.panels[d].classList.contains(_.RESIZE_LOCK))return this.panels[d]}else for(let d=h;d>=0;d--)if(!this.panels[d].classList.contains(_.RESIZE_LOCK))return this.panels[d]}else if(a){for(let d=h+1;d<this.panels.length;d++)if(!this.panels[d].classList.contains(_.RESIZE_LOCK))return this.panels[d]}else for(let d=h+1;d<this.panels.length;d++)if(!this.panels[d].classList.contains(_.RESIZE_LOCK))return this.panels[d]}checkChildNoResize(h){var a,g;if(h&&h.type===v.SlotRenderer){const d=(g=this.appConfig.layoutConfig[(a=h.props)===null||a===void 0?void 0:a.slot])===null||g===void 0?void 0:g.modules;if(!d||d.length===0)return!0}return!1}renderSplitPanel(h,a,g){return r.default.cloneElement(h,{...g,...h.props},a)}interceptProps(h){return h}};t.SplitPanelService=m,n.__decorate([(0,o.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.SplitPanelService=m=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],m);let p=class{constructor(){this.services=new Map}getService(h){let a=this.services.get(h);return a||(a=this.injector.get(t.ISplitPanelService,[h]),this.services.set(h,a)),a}};t.SplitPanelManager=p,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],p.prototype,"injector",void 0),t.SplitPanelManager=p=n.__decorate([(0,o.Injectable)()],p)},89897:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(85266),t)},85266:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const r=e(85608).__importDefault(e(14041));e(18182);const o=()=>r.default.createElement("div",{className:"loading_indicator "});t.Loading=o,t.Loading.displayName="Loading"},97885:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=e(85608).__importDefault(e(43144)),o=e(48560),l=({id:v,className:_,children:m})=>{const p=(0,o.usePortal)(v,_);return r.default.createPortal(m,p)};t.default=l},73215:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResizeHandleVertical=t.ResizeHandleHorizontal=t.ResizeFlexMode=t.RESIZE_LOCK=void 0,t.preventWebviewCatchMouseEvents=m,t.allowWebviewCatchMouseEvents=p;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(22366),v=n.__importDefault(e(57482));t.RESIZE_LOCK="resize-lock";var _;(function(a){a.Prev="prev",a.Next="next",a.Percentage="Percentage"})(_||(t.ResizeFlexMode=_={}));function m(){const a=document.getElementsByTagName("iframe"),g=document.getElementsByTagName("webview"),d=document.getElementsByClassName("shadow-root-host");for(const u of g)u.classList.add("none-pointer-event");for(const u of a)u.classList.add("none-pointer-event");for(const u of d)u?.classList.add("none-pointer-event")}function p(){const a=document.getElementsByTagName("iframe"),g=document.getElementsByTagName("webview"),d=document.getElementsByClassName("shadow-root-host");for(const u of g)u.classList.remove("none-pointer-event");for(const u of a)u.classList.remove("none-pointer-event");for(const u of d)u?.classList.remove("none-pointer-event")}const s=a=>{const g=o.default.useRef(),d=o.default.useRef(!1),u=o.default.useRef(0),E=o.default.useRef(0),f=o.default.useRef(0),c=o.default.useRef(),y=o.default.useRef(),b=o.default.useRef(),A=(L,N)=>{const U=a.findPrevElement?a.findPrevElement():c.current,W=a.findNextElement?a.findNextElement():y.current;if(U&&U.classList.contains(t.RESIZE_LOCK)||W&&W.classList.contains(t.RESIZE_LOCK))return;const j=g.current.parentElement.offsetWidth,Q=Number(U?.dataset.minResize||0),G=Number(W?.dataset.minResize||0),X=Number(U?.dataset.maxResize||0),$=Number(W?.dataset.maxResize||0);(Q||G)&&(L*j<=Q||N*j<=G)||(X||$)&&(L*j>=X||N*j>=$)||(W&&(W.style.width=N*100+"%"),U&&(U.style.width=L*100+"%"),a.onResize&&W&&U&&a.onResize(U,W))},S=(L,N,U,W)=>{var j,Q;const G=a.findPrevElement?a.findPrevElement(W):c.current,X=a.findNextElement?a.findNextElement(W):y.current,$=Number((j=G?.dataset.minResize)!==null&&j!==void 0?j:0),V=Number((Q=X?.dataset.minResize)!==null&&Q!==void 0?Q:0),H=G?.dataset.maxResize?Number(G?.dataset.maxResize):null,K=X?.dataset.maxResize?Number(X?.dataset.maxResize):null,Y=a.flexMode===_.Prev,Z=Y?G:X,oe=Y?X:G;let ie=Y?L:N;U||(($||V)&&(Y?$>L?ie=$:V>N&&(ie=L+N-V):V>N?ie=V:$>L&&(ie=L+N-$)),(H||K)&&(Y?H&&H<=L?ie=H:K&&K>N&&(ie=L+N-K):K&&K<=N?ie=K:H&&H>N&&(ie=L+N-H))),Z.style.width=ie+"px",Z.style.flexGrow="0",Z.style.flexShrink="1",oe.style.width="0",oe.style.flexGrow="1",oe.style.flexShrink="0",a.onResize&&X&&G&&a.onResize(G,X)},w=(L,N)=>{const U=c.current,W=y.current;let j;a.flexMode?j=(U.offsetWidth+W.offsetWidth)/U.parentElement.offsetWidth*100:j=+y.current.style.width.replace("%","")+ +c.current.style.width.replace("%",""),W&&(W.style.width=N/(L+N)*j+"%"),U&&(U.style.width=L/(L+N)*j+"%"),I(L,N),a.onResize&&W&&U&&a.onResize(U,W)},I=(L,N)=>{const U=c.current,W=y.current;let j=!1;U&&(L===0?(U.classList.add("kt_display_none"),j=!0):U.classList.remove("kt_display_none")),W&&(N===0?(W.classList.add("kt_display_none"),j=!0):W.classList.remove("kt_display_none")),g.current&&(j?g.current.classList.add("none-pointer-event"):g.current.classList.remove("none-pointer-event"))},D=()=>{const L=c.current.clientWidth,N=y.current.clientWidth,U=L+N,W=[];return W.push(L/U),W.push(N/U),W},T=(L,N)=>{l.fastdom.mutate(()=>{const U=c.current.clientWidth,W=y.current.clientWidth,j=U+W;if(a.flexMode){const Q=a.flexMode===_.Prev?L:j-L,G=a.flexMode===_.Next?L:j-L;S(Q,G,!0)}else{const Q=+y.current.style.width.replace("%",""),G=+c.current.style.width.replace("%",""),X=Q+G;N?(y.current.style.width=X*(L/j)+"%",c.current.style.width=X*(1-L/j)+"%"):(c.current.style.width=X*(L/j)+"%",y.current.style.width=X*(1-L/j)+"%")}N?I(j-L,L):I(L,j-L),a.onResize&&a.onResize(c.current,y.current)})},R=L=>L?y.current.clientWidth:c.current.clientWidth,M=L=>{const N=L.classList,U=v.default["resize-overflow-hidden"];N?.contains(U)||N.add(U)},O=L=>{const N=L.classList,U=v.default["resize-overflow-hidden"];N?.contains(U)&&N.remove(U)},x=L=>{if(L.preventDefault(),g.current&&g.current.classList.contains("no-resize"))return;const N=E.current+L.pageX-u.current,U=f.current-(L.pageX-u.current);b.current&&b.current.dispose(),b.current=l.fastdom.mutate(()=>{if(a.flexMode)S(N,U);else{const W=g.current.parentElement.offsetWidth;A(N/W,U/W)}})},k=()=>{d.current=!1,document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k),a.onFinished&&a.onFinished(),l.fastdom.mutate(()=>{var L;(L=g.current)===null||L===void 0||L.classList.remove(v.default.active),O(c.current),O(y.current),p()})},F=L=>{d.current=!0,document.addEventListener("mousemove",x),document.addEventListener("mouseup",k),u.current=L.pageX,l.fastdom.measure(()=>{E.current=c.current.offsetWidth,f.current=y.current.offsetWidth,l.fastdom.mutate(()=>{var N;(N=g.current)===null||N===void 0||N.classList.add(v.default.active),M(c.current),M(y.current),m()})})};return o.default.useEffect(()=>(g.current&&(g.current.addEventListener("mousedown",F),c.current=g.current.previousSibling,y.current=g.current.nextSibling),()=>{g.current&&(g.current.removeEventListener("mousedown",F),g.current.removeEventListener("mousemove",x),g.current.removeEventListener("mouseup",k))}),[]),a.delegate&&a.delegate({setSize:A,setAbsoluteSize:T,getAbsoluteSize:R,setRelativeSize:w,getRelativeSize:D}),o.default.createElement("div",{ref:L=>{g.current=L},className:(0,r.default)({[v.default["resize-handle-horizontal"]]:!0,[v.default["with-color"]]:!a.noColor,[a.className||""]:!0})})};t.ResizeHandleHorizontal=s;const h=a=>{const g=o.default.useRef(),d=o.default.useRef(!1),u=o.default.useRef(0),E=o.default.useRef(0),f=o.default.useRef(0),c=o.default.useRef(),y=o.default.useRef(),b=o.default.useRef(),A=o.default.useRef(),S=(L,N,U)=>{const W=a.findPrevElement?a.findPrevElement(U):c.current,j=a.findNextElement?a.findNextElement(U):y.current;!j||!W||W.classList.contains(t.RESIZE_LOCK)||j.classList.contains(t.RESIZE_LOCK)||(j.style.height=N*100+"%",W.style.height=L*100+"%",a.onResize&&a.onResize(W,j))},w=(L,N,U,W)=>{var j,Q;const G=a.findPrevElement?a.findPrevElement(W):c.current,X=a.findNextElement?a.findNextElement(W):y.current;let $,V,H=0;const K=Number(((j=G?.dataset)===null||j===void 0?void 0:j.minResize)||0),Y=Number(((Q=X?.dataset)===null||Q===void 0?void 0:Q.minResize)||0);a.flexMode===_.Prev?($=G,V=X,H=L,U||(K>L?H=K:Y>N&&(H=L+N-Y))):($=X,V=G,H=N,U||(Y>N?H=Y:K>L&&(H=L+N-K))),$.style.height=H+"px",$.style.flexGrow="0",$.style.flexShrink="1",V.style.height="0",V.style.flexGrow="1",V.style.flexShrink="0",a.onResize&&X&&G&&a.onResize(G,X)},I=(L,N)=>{const U=c.current,W=y.current;let j;a.flexMode?j=(U.offsetHeight+W.offsetHeight)/U.parentElement.offsetHeight*100:j=+W.style.height.replace("%","")+ +U.style.height.replace("%",""),W&&(W.style.height=N/(L+N)*j+"%"),U&&(U.style.height=L/(L+N)*j+"%"),D(L,N),a.onResize&&W&&U&&a.onResize(U,W)},D=(L,N)=>{const U=c.current,W=y.current;let j=!1;U&&(L===0?(U.classList.add("kt_display_none"),j=!0):U.classList.remove("kt_display_none")),W&&(N===0?(W.classList.add("kt_display_none"),j=!0):W.classList.remove("kt_display_none")),g.current&&(j?g.current.classList.add("none-pointer-event"):g.current.classList.remove("none-pointer-event"))},T=()=>{const L=c.current.clientHeight,N=y.current.clientHeight,U=L+N,W=[];return W.push(L/U),W.push(N/U),W},R=(L,N,U,W)=>{U.classList.contains(t.RESIZE_LOCK)||W.classList.contains(t.RESIZE_LOCK)||(W.style.height=N+"px",U.style.height=L+"px",W.style.flex="unset",U.style.flex="unset",a.onResize&&W&&U&&a.onResize(U,W))},M=(L,N,U)=>{if(!c.current||!y.current)return;const W=c.current.clientHeight,j=y.current.clientHeight,Q=W+j;if(a.flexMode){const G=a.flexMode===_.Prev?L:Q-L,X=a.flexMode===_.Next?L:Q-L;w(G,X,!0)}else{const G=+y.current.style.height.replace(/\%|px/,""),X=+c.current.style.height.replace(/\%|px/,""),$=G+X;if(N){U&&(c.current.style.height=$*(1-L/Q)+"%");const V=$*(L/Q);y.current.style.height=V===0?V+"px":V+"%"}else c.current.style.height=$*(L/Q)+"%",U&&(y.current.style.height=$*(1-L/Q)+"%")}N?D(Q-L,L):D(L,Q-L),a.onResize&&a.onResize(c.current,y.current)},O=L=>L?y.current.clientHeight:c.current.clientHeight,x=L=>{d.current=!0,document.addEventListener("mousemove",k),document.addEventListener("mouseup",F),u.current=L.pageY,A.current=y.current,b.current=c.current,l.fastdom.measure(()=>{E.current=c.current.offsetHeight,f.current=y.current.offsetHeight,l.fastdom.mutate(()=>{var N;(N=g.current)===null||N===void 0||N.classList.add(v.default.active),m()})})},k=L=>{L.preventDefault(),!(g.current&&g.current.classList.contains("no-resize"))&&l.fastdom.measure(()=>{const N=L.pageY>u.current,U=a.findNextElement?a.findNextElement(N):null,W=a.findPrevElement?a.findPrevElement(N):null;if(U!==null&&A.current!==U||W!==null&&b.current!==W){if(!U||!W)return;A.current=U,b.current=W,u.current=L.pageY,E.current=b.current.offsetHeight,f.current=A.current.offsetHeight}const j=E.current+L.pageY-u.current,Q=f.current-(L.pageY-u.current),G=Number(b.current.dataset.minResize||0),X=Number(A.current.dataset.minResize||0);(G||X)&&(j<=G||Q<=X)||l.fastdom.mutate(()=>{if(a.flexMode===_.Prev||a.flexMode===_.Next)w(j,Q);else if(a.flexMode===_.Percentage){const $=g.current.parentElement.offsetHeight;S(j/$,Q/$)}else R(j,Q,b.current,A.current)})})},F=L=>{d.current=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",F),l.fastdom.mutate(()=>{var N;(N=g.current)===null||N===void 0||N.classList.remove(v.default.active),a.onFinished&&a.onFinished(),p()})};return o.default.useEffect(()=>(g.current.addEventListener("mousedown",x),c.current=g.current.previousSibling,y.current=g.current.nextSibling,()=>{g.current.removeEventListener("mousedown",x),document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",F)}),[]),a.delegate&&a.delegate({setSize:S,setAbsoluteSize:M,getAbsoluteSize:O,setRelativeSize:I,getRelativeSize:T}),o.default.createElement("div",{ref:L=>L&&(g.current=L),className:(0,r.default)({[v.default["resize-handle-vertical"]]:!0,[a.className||""]:!0,[v.default["with-color"]]:!a.noColor})})};t.ResizeHandleVertical=h},77331:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Select=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));n.__exportStar(e(88706),t);const l=v=>(v={...v,className:(0,r.default)("kt_select",v.className)},o.default.createElement("select",{...v}));t.Select=l},53736:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextKeyChangeEvent=t.IContextKeyService=void 0;const n=e(43718);t.IContextKeyService=Symbol("IContextKeyService");class r extends n.BasicEvent{}t.ContextKeyChangeEvent=r},50394:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineInputWidgetIsStreaming=t.InlineInputWidgetIsVisible=t.CodeEditsIsVisible=t.InlineDiffPartialEditsIsVisible=t.InlineHintWidgetIsVisible=t.InlineCompletionIsTrigger=t.InlineChatIsVisible=void 0;const n=e(40191);t.InlineChatIsVisible=new n.RawContextKey("ai.native.inlineChatIsVisible",!1),t.InlineCompletionIsTrigger=new n.RawContextKey("ai.native.inlineCompletionIsTrigger",!1),t.InlineHintWidgetIsVisible=new n.RawContextKey("ai.native.inlineHintWidgetIsVisible",!1),t.InlineDiffPartialEditsIsVisible=new n.RawContextKey("ai.native.inlineDiffPartialEditsIsVisible",!1),t.CodeEditsIsVisible=new n.RawContextKey("ai.native.codeEditsIsVisible",!1),t.InlineInputWidgetIsVisible=new n.RawContextKey("ai.native.inlineInputWidgetIsVisible",!1),t.InlineInputWidgetIsStreaming=new n.RawContextKey("ai.native.inlineInputWidgetIsStreaming",!1)},20162:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialogViewVisibleContext=t.DialogViewVisibleContext=void 0;const n=e(40191);t.DialogViewVisibleContext=new n.RawContextKey("dialogViewVisible",!1),t.FileDialogViewVisibleContext=new n.RawContextKey("fileDialogViewVisible",!1)},16413:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerCompressedLastFocusContext=t.ExplorerCompressedFirstFocusContext=t.ExplorerCompressedFocusContext=t.FilesExplorerFilteredContext=t.FilesExplorerInputFocusedContext=t.FilesExplorerFocusedContext=t.ExplorerFilteredContext=t.ExplorerFocusedContext=t.ExplorerResourceCut=t.ExplorerViewletVisibleContext=t.ExplorerResourceIsFolderContext=void 0;const n=e(40191);t.ExplorerResourceIsFolderContext=new n.RawContextKey("explorerResourceIsFolder",!1),t.ExplorerViewletVisibleContext=new n.RawContextKey("explorerViewletVisible",!0),t.ExplorerResourceCut=new n.RawContextKey("explorerResourceCut",!1),t.ExplorerFocusedContext=new n.RawContextKey("explorerViewletFocus",!1),t.ExplorerFilteredContext=new n.RawContextKey("explorerViewletFilter",!1),t.FilesExplorerFocusedContext=new n.RawContextKey("filesExplorerFocus",!1),t.FilesExplorerInputFocusedContext=new n.RawContextKey("filesExplorerInputFocus",!1),t.FilesExplorerFilteredContext=new n.RawContextKey("filesExplorerFilteredContext",!1),t.ExplorerCompressedFocusContext=new n.RawContextKey("explorerViewletCompressedFocus",!1),t.ExplorerCompressedFirstFocusContext=new n.RawContextKey("explorerViewletCompressedFirstFocus",!1),t.ExplorerCompressedLastFocusContext=new n.RawContextKey("explorerViewletCompressedLastFocus",!1)},66e3:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(16413),t),n.__exportStar(e(91830),t),n.__exportStar(e(29906),t),n.__exportStar(e(96774),t),n.__exportStar(e(73537),t),n.__exportStar(e(20162),t)},379:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowExcludedFilesFilterContextKey=t.ShowActiveFileFilterContextKey=t.ShowInfoFilterContextKey=t.ShowWarningsFilterContextKey=t.ShowErrorsFilterContextKey=t.RelatedInformationFocusContextKey=t.MarkerViewFilterFocusContextKey=t.MarkerFocusContextKey=t.MarkersTreeVisibilityContextKey=void 0;const n=e(40191);t.MarkersTreeVisibilityContextKey=new n.RawContextKey("problemsVisibility",!1),t.MarkerFocusContextKey=new n.RawContextKey("problemFocus",!1),t.MarkerViewFilterFocusContextKey=new n.RawContextKey("problemsFilterFocus",!1),t.RelatedInformationFocusContextKey=new n.RawContextKey("relatedInformationFocus",!1),t.ShowErrorsFilterContextKey=new n.RawContextKey("problems.filter.errors",!0),t.ShowWarningsFilterContextKey=new n.RawContextKey("problems.filter.warnings",!0),t.ShowInfoFilterContextKey=new n.RawContextKey("problems.filter.info",!0),t.ShowActiveFileFilterContextKey=new n.RawContextKey("problems.filter.activeFile",!1),t.ShowExcludedFilesFilterContextKey=new n.RawContextKey("problems.filter.excludedFiles",!0)},96774:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutlineFollowCursorContext=t.OutlineSortTypeContext=void 0;const n=e(40191);t.OutlineSortTypeContext=new n.RawContextKey("outlineSortType",0),t.OutlineFollowCursorContext=new n.RawContextKey("outlineFollowCursor",!1)},91830:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceContextKey=void 0;const n=e(43718),r=e(63214);class o{constructor(v,_=r.getLanguageIdFromMonaco,m="resource"){if(this.contextKeyService=v,this.languageResolver=_,!m)throw new Error("resource key prefix cannot be empty!");this.resourceScheme=this.contextKeyService.createKey(m+"Scheme",""),this.resourceFilename=this.contextKeyService.createKey(m+"Filename",""),this.resourceExtname=this.contextKeyService.createKey(m+"Extname",""),this.resourceLangId=this.contextKeyService.createKey(m+"LangId",""),this.resourceKey=this.contextKeyService.createKey(m,""),this.isFileSystemResource=this.contextKeyService.createKey("isFileSystem"+m.substr(0,1).toUpperCase()+m.substr(1),!1)}set(v){if(!v){this.reset();return}const _=this.resourceKey.get();v.isEqual(new n.URI(_))||(this.resourceScheme.set(v.scheme),this.resourceFilename.set(v.path.name+v.path.ext),this.resourceExtname.set(v.path.ext),this.resourceLangId.set(this.languageResolver(v)),this.resourceKey.set(v.toString()),this.isFileSystemResource.set(v.scheme===n.Schemes.file))}reset(){this.resourceScheme.set(""),this.resourceFilename.set(""),this.resourceExtname.set(""),this.resourceLangId.set(""),this.resourceKey.set(""),this.isFileSystemResource.set(!1)}}t.ResourceContextKey=o},67386:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InTreeViewKey=t.ViewHasSomeCollapsibleKey=t.ViewHasFilePatternKey=t.ViewHasReplacePatternKey=t.ViewHasSearchPatternKey=t.MatchFocusKey=t.ResourceFolderFocusKey=t.FolderFocusKey=t.FileFocusKey=t.FileMatchOrFolderMatchWithResourceFocusKey=t.FileMatchOrFolderMatchFocusKey=t.FileMatchOrMatchFocusKey=t.FirstMatchFocusKey=t.ReplaceActiveKey=t.PatternExcludesFocusedKey=t.PatternIncludesFocusedKey=t.InputBoxFocusedKey=t.SearchViewVisibleKey=t.HasSearchResults=t.ReplaceInputBoxFocusedKey=t.SearchInputBoxFocusedKey=t.SearchViewFocusedKey=void 0;const n=e(40191);t.SearchViewFocusedKey=new n.RawContextKey("searchViewletFocus",!1),t.SearchInputBoxFocusedKey=new n.RawContextKey("searchInputBoxFocus",!1),t.ReplaceInputBoxFocusedKey=new n.RawContextKey("replaceInputBoxFocus",!1),t.HasSearchResults=new n.RawContextKey("hasSearchResult",!1),t.SearchViewVisibleKey=new n.RawContextKey("searchViewletVisible",!0),t.InputBoxFocusedKey=new n.RawContextKey("inputBoxFocus",!1),t.PatternIncludesFocusedKey=new n.RawContextKey("patternIncludesInputBoxFocus",!1),t.PatternExcludesFocusedKey=new n.RawContextKey("patternExcludesInputBoxFocus",!1),t.ReplaceActiveKey=new n.RawContextKey("replaceActive",!1),t.FirstMatchFocusKey=new n.RawContextKey("firstMatchFocus",!1),t.FileMatchOrMatchFocusKey=new n.RawContextKey("fileMatchOrMatchFocus",!1),t.FileMatchOrFolderMatchFocusKey=new n.RawContextKey("fileMatchOrFolderMatchFocus",!1),t.FileMatchOrFolderMatchWithResourceFocusKey=new n.RawContextKey("fileMatchOrFolderMatchWithResourceFocus",!1),t.FileFocusKey=new n.RawContextKey("fileMatchFocus",!1),t.FolderFocusKey=new n.RawContextKey("folderMatchFocus",!1),t.ResourceFolderFocusKey=new n.RawContextKey("folderMatchWithResourceFocus",!1),t.MatchFocusKey=new n.RawContextKey("matchFocus",!1),t.ViewHasSearchPatternKey=new n.RawContextKey("viewHasSearchPattern",!1),t.ViewHasReplacePatternKey=new n.RawContextKey("viewHasReplacePattern",!1),t.ViewHasFilePatternKey=new n.RawContextKey("viewHasFilePattern",!1),t.ViewHasSomeCollapsibleKey=new n.RawContextKey("viewHasSomeCollapsibleResult",!1),t.InTreeViewKey=new n.RawContextKey("inTreeView",!1)},29906:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShellExecutionSupported=t.IsTerminalFocused=t.IsTerminalViewInitialized=void 0;const n=e(40191);t.IsTerminalViewInitialized=new n.RawContextKey("isTerminalViewInitialized",!1),t.IsTerminalFocused=new n.RawContextKey("isTerminalFocused",!1),t.ShellExecutionSupported=new n.RawContextKey("shellExecutionSupported",!0)},12288:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingCanRefreshTests=t.TestingIsPeekVisible=t.TestingIsInPeek=t.TestingIsRunning=t.TestingHasAnyResults=t.TestingServiceHasDebuggableContextKey=t.TestingServiceProviderCount=void 0;const n=e(40191);t.TestingServiceProviderCount=new n.RawContextKey("service.testing.providerCount",0),t.TestingServiceHasDebuggableContextKey=new n.RawContextKey("service.testing.hasDebuggableContext",!1),t.TestingHasAnyResults=new n.RawContextKey("testing.hasAnyResults",!1),t.TestingIsRunning=new n.RawContextKey("testing.isRunning",!1),t.TestingIsInPeek=new n.RawContextKey("testing.isInPeek",!0),t.TestingIsPeekVisible=new n.RawContextKey("testing.isPeekVisible",!1),t.TestingCanRefreshTests=new n.RawContextKey("testing.canRefresh",!1)},73537:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualWorkspace=t.WorkspaceTrusted=t.WorkspaceFolderCount=t.WorkbenchState=void 0;const n=e(40191);t.WorkbenchState=new n.RawContextKey("workbenchState","empty"),t.WorkspaceFolderCount=new n.RawContextKey("workspaceFolderCount",0),t.WorkspaceTrusted=new n.RawContextKey("isWorkspaceTrusted",!0),t.VirtualWorkspace=new n.RawContextKey("virtualWorkspace",!1)},18193:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorePreferences=t.corePreferenceSchema=t.FILE_TREE_DEFAULTS=t.FILES_DEFAULTS=void 0,t.injectCorePreferences=_;const n=e(43718),r=e(69734),o=e(87863),l=e(78132),v={confirmDelete:!0,confirmMove:!0};t.FILES_DEFAULTS={filesWatcherExclude:o.defaultFilesWatcherExcludes,filesExclude:{"**/.git":!0,"**/.svn":!0,"**/.hg":!0,"**/CVS":!0,"**/.DS_Store":!0}},t.FILE_TREE_DEFAULTS={baseIndent:10,indent:8},t.corePreferenceSchema={type:"object",properties:{[n.GeneralSettingsId.Language]:{type:"string",enum:(0,n.getAvailableLanguages)().map(m=>m.languageId),default:r.LOCALE_TYPES.EN_US},[n.GeneralSettingsId.Theme]:{type:"string",default:"vs-dark",enum:[]},"general.askReloadOnLanguageChange":{type:"boolean",default:!0,description:"%preference.description.general.askReloadOnLanguageChange%"},[n.GeneralSettingsId.Icon]:{type:"string",default:"vs-minimal",enum:[]},[n.GeneralSettingsId.ProductIconTheme]:{type:"string",default:"opensumi-icons",enum:["opensumi-icons"]},"workbench.colorCustomizations":{type:"object",description:"%preference.workbench.colorCustomizations%",default:{}},"application.supportsOpenFolder":{type:"boolean",default:!1,description:"Whether default open folder behavior is supported"},"application.supportsOpenWorkspace":{type:"boolean",default:!1,description:"Whether default open workspace behavior is supported"},"application.confirmExit":{type:"string",enum:["never","ifRequired","always"],default:"always",description:"When to confirm before closing the application window."},"application.preferMarkdownPreview":{type:"boolean",default:!1,description:"Use markdown preview first"},"application.invalidExthostReload":{type:"string",enum:["ifRequired","always"],default:"ifRequired",description:"Reload strategy when exthost process became invalid."},"workbench.list.openMode":{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:"%preference.workbench.list.openMode%"},"workbench.commandPalette.history":{type:"number",default:50,minimum:0,description:"Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history."},"workbench.refactoringChanges.showPreviewStrategy":{type:"string",default:"askMe",enum:["show","hide","askMe"],description:"%preference.workbench.refactoringChanges.showPreviewStrategy%"},"workbench.quickOpen.preserveInput":{type:"boolean",default:!0,description:"%workbench.quickOpen.preserveInput%"},"workbench.hideSlotTabBarWhenHidePanel":{type:"boolean",default:!1,description:"%workbench.hideSlotTabBarWhenHidePanel%"},"explorer.confirmMove":{type:"boolean",default:v.confirmDelete,description:"%preference.explorer.confirm.move%"},"explorer.confirmDelete":{type:"boolean",default:v.confirmMove,description:"%preference.explorer.confirm.delete%"},"explorer.fileTree.baseIndent":{type:"number",default:t.FILE_TREE_DEFAULTS.baseIndent},"explorer.fileTree.indent":{type:"number",default:t.FILE_TREE_DEFAULTS.indent},"explorer.compactFolders":{type:"boolean",description:"%preference.explorer.compactFolders%",default:!0},"explorer.autoReveal":{type:"boolean",default:!0},"debug.toolbar.float":{type:"boolean",default:!0},"debug.breakpoint.editorHint":{type:"boolean",default:!0,description:"%preference.debug.breakpoint.editorHint%"},"debug.breakpoint.showBreakpointsInOverviewRuler":{type:"boolean",default:!1,description:"%preference.debug.breakpoint.showBreakpointsInOverviewRuler%"},"debug.toolbar.top":{type:"number",default:0,description:"%preference.debug.toolbar.top%"},"debug.toolbar.height":{type:"number",default:30,description:"%preference.debug.toolbar.height%"},"debug.console.filter.mode":{type:"string",enum:["filter","matcher"],default:"filter"},"files.exclude":{type:"object",description:"%preference.files.exclude%",default:t.FILES_DEFAULTS.filesExclude,additionalProperties:{anyOf:[{type:"boolean",description:(0,n.localize)("files.exclude.boolean","The glob pattern to match file paths against. Set to true or false to enable or disable the pattern.")}]}},"files.watcherExclude":{type:"object",default:t.FILES_DEFAULTS.filesWatcherExclude,description:"%preference.files.watcherExclude%"},"files.associations":{type:"object",markdownDescription:"%preference.files.associations%"},"files.encoding":{type:"string",description:"%preference.files.encoding%",default:"utf8",enum:Object.keys(n.SUPPORTED_ENCODINGS)},"files.eol":{type:"string",enum:[`
33877
+ `)}return E}),`{"type": 1, "id": "${a}", "proxyId": "${g}", "method": "${d}", "args": ${JSON.stringify(u,_.replacer)}}`}static serializeReplyOK(a,g,d){if(typeof g>"u")return`{"type": 2, "id": "${a}"}`;try{return`{"type": 2, "id": "${a}", "res": ${JSON.stringify(g,_.replacer)}}`}catch{return d&&d.warn("res",g),`{"type": 2, "id": "${a}", "res": {}}`}}static serializeReplyError(a,g,d){try{return`{"type": 3, "id": "${a}", "res": ${JSON.stringify((0,n.transformErrorForSerialization)(g),_.replacer)}}`}catch{return d&&d.error("error",g),`{"type": 3, "id": "${a}", "res": {}}`}}}t.MessageIO=m;function p(){const h=new Error("Canceled");return h.name=h.message,h}class s{constructor(a,g){this._protocol=a,this._locals=new Map,this._proxies=new Map,this._pendingRPCReplies=new Map,this._cancellationTokenSources=new Map,this._timeoutHandles=new Map,this._lastMessageId=0,this.logger=g||console,this.logger.error("You are using the deprecated class: 'RPCProtocol'. Please use the new one: 'SumiConnectionMultiplexer'"),this._protocol.onMessage(d=>this._receiveOneMessage(d))}set(a,g){return this._locals.set(a.serviceId,g),g}get(a){return this._locals.get(a.serviceId)}getProxy(a){return this._proxies.has(a.serviceId)||this._proxies.set(a.serviceId,this._createProxy(a.serviceId)),this._proxies.get(a.serviceId)}_createProxy(a){const g={get:(d,u)=>typeof u=="symbol"?null:(!d[u]&&u.charCodeAt(0)===36&&(d[u]=(...E)=>this._remoteCall(a,u,E)),d[u])};return new Proxy(Object.create(null),g)}_remoteCall(a,g,d){const u=d.length&&n.CancellationToken.isCancellationToken(d[d.length-1])?d.pop():void 0;if(u&&u.isCancellationRequested)return Promise.reject(p());const E=String(++this._lastMessageId),f=new n.Deferred;u&&(d.push("add.cancellation.token"),u.onCancellationRequested(()=>this._protocol.send(m.cancel(E)))),this._pendingRPCReplies.set(E,f);const c=m.serializeRequest(E,a,g,d);if(this._protocol.send(c),this._protocol.timeout&&this._protocol.timeout!==-1){const y=setTimeout(()=>{this._handleTimeout(E)},this._protocol.timeout);this._timeoutHandles.set(E,y)}return f.promise}_receiveOneMessage(a){const g=JSON.parse(a,_.reviver);switch(this._timeoutHandles.has(g.id)&&(typeof clearTimeout=="function"&&clearTimeout(this._timeoutHandles.get(g.id)),this._timeoutHandles.delete(g.id)),g.type){case 1:this._receiveRequest(g);break;case 2:this._receiveReply(g);break;case 4:this._receiveCancel(g);break;case 3:this._receiveError(g);break}}_receiveCancel(a){const g=this._cancellationTokenSources.get(a.id);g&&g.cancel()}_receiveError(a){const g=a.id;if(!this._pendingRPCReplies.has(g))return;const d=this._pendingRPCReplies.get(g);this._pendingRPCReplies.delete(g);let u;a.res&&(a.res.$isError?(u=new Error,u.name=a.res.name,u.message=a.res.message,u.stack=a.res.stack):u=a.res),d.reject(u)}_receiveRequest(a){const g=a.id,d=a.proxyId,u=a.method,E=a.args.map(y=>y===null?void 0:y);if(E.length&&E[E.length-1]==="add.cancellation.token"?E.pop():!1){const y=new n.CancellationTokenSource;this._cancellationTokenSources.set(g,y),E.push(y.token)}this._invokeHandler(d,u,E).then(y=>{this._protocol.send(m.serializeReplyOK(g,y)),this._cancellationTokenSources.delete(g)}).catch(y=>{this._protocol.send(m.serializeReplyError(g,y)),this._cancellationTokenSources.delete(g)})}_invokeHandler(a,g,d){try{return this._doInvokeHandler(a,g,d)}catch(u){return Promise.reject(u)}}async _doInvokeHandler(a,g,d){const u=this._locals.get(a);if(!u)throw new Error("Unknown actor "+a);const E=await u[g];if(typeof E!="function")throw new Error("Unknown method "+g+" on actor "+a);return E.apply(u,d)}_receiveReply(a){const g=a.id;if(!this._pendingRPCReplies.has(g))return;const d=this._pendingRPCReplies.get(g);this._pendingRPCReplies.delete(g),d.resolve(a.res)}_handleTimeout(a){if(!this._pendingRPCReplies.has(a)||!this._timeoutHandles.has(a))return;const g=this._pendingRPCReplies.get(a);this._pendingRPCReplies.delete(a),this._timeoutHandles.delete(a),g.reject(new Error("RPC Timeout: "+a))}}t.RPCProtocol=s},64592:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furySerializer=t.CloseProtocol=t.BinaryProtocol=t.DataProtocol=t.ErrorProtocol=t.ServerReadyProtocol=t.OpenProtocol=t.PongProtocol=t.PingProtocol=void 0;const n=e(26387),r=e(94846);function o(){return{id:n.Type.string()}}t.PingProtocol=n.Type.object("ping",{...o()}),t.PongProtocol=n.Type.object("pong",{...o()}),t.OpenProtocol=n.Type.object("open",{...o(),clientId:n.Type.string(),path:n.Type.string(),traceId:n.Type.string()}),t.ServerReadyProtocol=n.Type.object("server-ready",{...o(),traceId:n.Type.string()}),t.ErrorProtocol=n.Type.object("error",{...o(),code:n.Type.uint16(),message:n.Type.string()}),t.DataProtocol=n.Type.object("data",{...o(),content:n.Type.string()}),t.BinaryProtocol=n.Type.object("binary",{...o(),binary:n.Type.binary()}),t.CloseProtocol=n.Type.object("close",{...o(),code:n.Type.uint32(),reason:n.Type.string()});const l=(0,r.oneOf)([t.PingProtocol,t.PongProtocol,t.OpenProtocol,t.ServerReadyProtocol,t.DataProtocol,t.BinaryProtocol,t.CloseProtocol,t.ErrorProtocol]);t.furySerializer=l},54558:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapSerializer=void 0;const n=e(85608);n.__exportStar(e(64592),t),n.__exportStar(e(43620),t),n.__exportStar(e(41619),t);const r=(o,l)=>({onceClose(v){return o.onceClose(v)},onMessage(v){return o.onMessage(_=>{v(l.deserialize(_))})},send(v){o.send(l.serialize(v))}});t.wrapSerializer=r},43620:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rawSerializer=void 0,t.rawSerializer={serialize:e=>e,deserialize:e=>e}},41619:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},76271:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceChannelPath=t.BaseCommonChannelHandler=t.CommonChannelPathHandler=void 0,t.injectConnectionProviders=m;const n=e(39048),r=e(54558),o=e(47561);class l{constructor(){this.handlerMap=new Map,this.paramsKey=new Map}register(s,h){const a=s.indexOf("/:"),g=a>=0;let d=s;g&&(d=s.slice(0,a),this.paramsKey.set(d,s.slice(a+2))),this.handlerMap.has(d)||this.handlerMap.set(d,[]);const u=this.handlerMap.get(d),E=h.handler.bind(h),f=(c,y,b)=>{h.connection=c,E(c,y,b)};h.handler=f,u.push(h),this.handlerMap.set(d,u)}getParams(s,h){const a={};if(this.paramsKey.has(s)){const g=this.paramsKey.get(s);g&&(a[g]=h)}return a}removeHandler(s,h){const a=s.indexOf(":"),g=a>=0;let d=s;g&&(d=s.slice(0,a));const u=this.handlerMap.get(d)||[],E=u.indexOf(h);E!==-1&&u.splice(E,1),this.handlerMap.set(s,u)}get(s){return this.handlerMap.get(s)}disposeConnectionClientId(s,h){this.handlerMap.forEach(a=>{a.forEach(g=>{g.dispose(s,h)})})}openChannel(s,h,a){let g=this.get(s),d;if(!g){const u=s.indexOf("/");u>=0&&(g=this.get(s.slice(0,u)),d=this.getParams(s.slice(0,u),s.slice(u+1)))}if(g)for(let u=0,E=g.length;u<E;u++)g[u].handler(h,a,d)}getAll(){return Array.from(this.handlerMap.values())}}t.CommonChannelPathHandler=l;var v;(function(p){p[p.ConnectionClosed=1]="ConnectionClosed",p[p.NewChannelOpened=2]="NewChannelOpened"})(v||(v={}));class _{constructor(s,h,a=console,g={}){this.handlerId=s,this.commonChannelPathHandler=h,this.logger=a,this.channelMap=new Map,this.heartbeatTimer=null,this.serializer=r.furySerializer,g.serializer&&(this.serializer=g.serializer)}heartbeat(s){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.heartbeatTimer=setTimeout(()=>{this.doHeartbeat(s),this.heartbeat(s)},5e3)}receiveConnection(s){let h;this.heartbeat(s);const a=(0,r.wrapSerializer)(s,this.serializer);a.onMessage(g=>{try{switch(g.kind){case"open":{const{id:d,path:u,traceId:E}=g;h=g.clientId,this.logger.log(`open a new connection channel ${h} with path ${u}`);let f=this.channelMap.get(d);f&&(f.close(v.NewChannelOpened,"new channel opened for the same channel id"),f.dispose()),f=new o.WSServerChannel(a,{id:d,clientId:h,logger:this.logger}),this.channelMap.set(d,f),this.commonChannelPathHandler.openChannel(u,f,h),f.serverReady(E);break}default:{const{id:d}=g,u=this.channelMap.get(d);u?u.dispatch(g):(a.send({kind:"error",id:d,code:n.ErrorMessageCode.ChannelNotFound,message:`channel ${d} not found`}),this.logger.warn(`channel ${d} is not found`))}}}catch(d){this.logger.error("handle connection message error",d)}}),s.onceClose(()=>{this.logger.log(`connection ${h} is closed, dispose all channels`),this.commonChannelPathHandler.disposeConnectionClientId(s,h),Array.from(this.channelMap.values()).filter(g=>g.clientId===h).forEach(g=>{g.close(v.ConnectionClosed,"connection closed"),g.dispose(),this.channelMap.delete(g.id),this.logger.log(`Remove connection channel ${g.id}`)})})}dispose(){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer)}}t.BaseCommonChannelHandler=_,t.RPCServiceChannelPath="RPCService";function m(p){const s=new l;p.addProviders({token:l,useValue:s})}},8140:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceType=void 0;var e;(function(n){n[n.Service=0]="Service",n[n.Stub=1]="Stub"})(e||(t.ServiceType=e={}))},47561:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSServerChannel=t.WSChannel=void 0;const n=e(40396),r=e(43718),o=e(39048),l=e(97349);var v;(function(s){s[s.ReSend=0]="ReSend",s[s.Sended=1]="Sended",s[s.Success=2]="Success",s[s.Failed=3]="Failed"})(v||(v={}));class _{constructor(){this.map=new Map,this.deliveryTimeout=500,this.timerMap=new Map}setDeliveryTimeout(h){this.deliveryTimeout=h}set(h,a){this.map.set(h,a)}get(h){return this.map.get(h)}success(h){this.map.set(h,v.Success);const a=this.timerMap.get(h);a&&clearTimeout(a)}dispose(){this.timerMap.forEach(h=>{clearTimeout(h)})}stop(h){const a=this.timerMap.get(h);a&&clearTimeout(a)}send(h,a){this.set(h,v.Sended),this.guard(h,a)}guard(h,a){const g=this.timerMap.get(h);g&&clearTimeout(g);const d=setTimeout(()=>{this.set(h,v.ReSend),a.whenRetry()},this.deliveryTimeout);this.timerMap.set(h,d)}}class m{constructor(h,a){this.connection=h,this._disposables=new r.DisposableStore,this.emitter=this._disposables.add(new n.EventEmitter),this.onBinaryQueue=this._disposables.add(new r.EventQueue),this.sendQueue=[],this._isServerReady=!1,this.stateTracer=new _,this.LOG_TAG="[WSChannel]",this.logger=console;const{id:g,logger:d,ensureServerReady:u}=a;this.id=g,this.LOG_TAG=`[WSChannel id:${this.id}]`,d&&(this.logger=d),this._ensureServerReady=!!u,a.deliveryTimeout&&this.stateTracer.setDeliveryTimeout(a.deliveryTimeout),this._disposables.add(this.emitter.on("binary",E=>this.onBinaryQueue.push(E)))}inqueue(h){if(this._ensureServerReady&&!this._isServerReady){this.sendQueue||(this.sendQueue=[]),this.sendQueue.push(h);return}this.connection.send(h)}ensureMessageDeliveried(h,a=(0,r.randomString)(16)){const g=this.stateTracer.get(a);if(g&&g>=v.Sended){this.logger.error(`message already send already success or in progress, traceId: ${a}, state: ${g}`);return}h.traceId=a,this.connection.send(h),this.stateTracer.send(a,{whenRetry:()=>{if(this._isServerReady){this.stateTracer.stop(a);return}this.ensureMessageDeliveried(h,a)}})}onMessage(h){return this.emitter.on("message",h)}onBinary(h){return this.onBinaryQueue.on(h)}onOpen(h){return this.emitter.on("open",h)}onReopen(h){return this.emitter.on("reopen",h)}pause(){this._isServerReady=!1}onServerReady(h){if(this._isServerReady){h();return}return this.emitter.on("open",h)}resume(){if(this._isServerReady=!0,this.sendQueue){for(const h of this.sendQueue)this.connection.send(h);this.sendQueue=[]}}dispatch(h){switch(h.kind){case"server-ready":h.traceId&&this.stateTracer.success(h.traceId),this.resume(),this.emitter.emit("open",h.id);break;case"data":this.emitter.emit("message",h.content);break;case"binary":this.emitter.emit("binary",h.binary);break;case"error":switch(this.logger.error(this.LOG_TAG,`receive error: id: ${h.id}, code: ${h.code}, error: ${h.message}`),h.code){case o.ErrorMessageCode.ChannelNotFound:this.channelPath&&(this.pause(),this.open(this.channelPath,this.clientId));break}break}}open(h,a){this.channelPath=h,this.clientId=a,this.LOG_TAG=`[WSChannel id=${this.id} path=${h}]`;const g={kind:"open",id:this.id,path:h,clientId:a};this._ensureServerReady?this.ensureMessageDeliveried(g):this.connection.send(g)}send(h){this.inqueue({kind:"data",id:this.id,content:h})}sendBinary(h){this.inqueue({kind:"binary",id:this.id,binary:h})}onError(){}close(h,a){this.pause(),this.emitter.emit("close",h,a)}fireReopen(){this.emitter.emit("reopen")}onClose(h){return this.emitter.on("close",h)}onceClose(h){return this.emitter.once("close",h)}createConnection(){return{onceClose:h=>this.onceClose(h),onMessage:h=>this.onBinary(h),send:h=>{this.sendBinary(h)},dispose(){}}}createSumiConnection(h={}){return new l.SumiConnection(this.createConnection(),h)}dispose(){this.stateTracer.dispose(),this.sendQueue=[],this._disposables.dispose()}ping(){this.connection.send({kind:"ping",id:this.id})}}t.WSChannel=m;class p extends m{constructor(h,a){super(h,a),this.connection=h,this.messageQueue=[],this.clientId=a.clientId}serverReady(h){this.connection.send({kind:"server-ready",id:this.id,traceId:h})}dispatch(h){switch(h.kind){case"data":this.emitter.emit("message",h.content);break;case"binary":this.emitter.emit("binary",h.binary);break;case"ping":this.connection.send({kind:"pong",id:this.id});break}}}t.WSServerChannel=p},8919:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(25285),t)},70650:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AINativeConfigService=void 0;const n=e(85608),r=e(76003),o=e(89195),l=e(1149),v=e(11050),_={supportsMarkers:!0,supportsChatAssistant:!0,supportsCodeAction:!0,supportsInlineChat:!0,supportsInlineCompletion:!0,supportsConflictResolve:!0,supportsRenameSuggestions:!0,supportsProblemFix:!0,supportsTerminalDetection:!0,supportsTerminalCommandSuggest:!0,supportsCustomLLMSettings:!0,supportsMCP:!0,supportsAgentMode:!0},m={};Object.keys(_).forEach(a=>{m[a]=!1});const p={inputWidth:320,inputKeybinding:"ctrlcmd+k",logo:o.AILogoAvatar},s={triggerKeybinding:"alt+\\"};let h=class{constructor(){this.aiModuleLoaded=!1,this.internalCapabilities=_,this.internalInlineChat=p,this.internalCodeEdits=s}get capabilities(){if(!this.aiModuleLoaded)return m;const{AINativeConfig:g}=this.appConfig;return g?.capabilities?{...this.internalCapabilities,...g.capabilities}:this.internalCapabilities}get inlineChat(){const{AINativeConfig:g}=this.appConfig;return g?.inlineChat?{...this.internalInlineChat,...g.inlineChat}:this.internalInlineChat}get codeEdits(){const{AINativeConfig:g}=this.appConfig;return g?.codeEdits?{...this.internalCodeEdits,...g.codeEdits}:this.internalCodeEdits}setAINativeModuleLoaded(g){this.aiModuleLoaded=g}};t.AINativeConfigService=h,n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],h.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(l.LayoutViewSizeConfig),n.__metadata("design:type",l.LayoutViewSizeConfig)],h.prototype,"layoutViewSize",void 0),t.AINativeConfigService=h=n.__decorate([(0,r.Injectable)()],h)},41480:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIReporter=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(52664);let v=class{constructor(){this.reportInfoCache=new Map,this.reporterCancelHandler=new Map}getRelationId(){return(0,o.uuid)()}getCacheReportInfo(m){return this.reportInfoCache.get(m)}getCommonReportInfo(){return{}}start(m,p,s=60*1e3){const h=this.getRelationId();this.report(h,{...p,msgType:m,isStart:!0});const a=setTimeout(()=>{this.report(h,{...p,success:!1})},s);return this.reporterCancelHandler.set(h,a),h}end(m,p){const s=this.reporterCancelHandler.get(m);s&&clearTimeout(s),this.report(m,{success:!0,...p,isStart:!1})}send(m){this.reporter.point(l.AI_REPORTER_NAME,m.msgType,m)}record(m,p){p||(p=this.getRelationId());const s=this.reportInfoCache.get(p)||{},h={...this.getCommonReportInfo(),...s,...m,relationId:p};return this.reportInfoCache.set(p,h),h}report(m,p){const s=this.record(p,m);this.reporter.point(l.AI_REPORTER_NAME,p.msgType||s.msgType,s)}};t.AIReporter=v,n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],v.prototype,"reporter",void 0),t.AIReporter=v=n.__decorate([(0,r.Injectable)()],v)},57925:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AI_CODE_EDITS_COMMANDS=t.AI_CODE_ACTION=t.AI_CHAT_VISIBLE=t.AI_INLINE_COMPLETION_REPORTER=t.AI_INLINE_DIFF_PARTIAL_EDIT=t.AI_INLINE_COMPLETION_VISIBLE=t.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL=t.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE=t.AI_INLINE_CHAT_VISIBLE=void 0,t.AI_INLINE_CHAT_VISIBLE={id:"ai.inlineChat.visible"},t.AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE={id:"ai.inlineChat.interactiveInput.visible"},t.AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL={id:"ai.inlineChat.interactiveInput.cancel"},t.AI_INLINE_COMPLETION_VISIBLE={id:"ai.inline.completion.visible"},t.AI_INLINE_DIFF_PARTIAL_EDIT={id:"ai.inline.diff.partial.edit"},t.AI_INLINE_COMPLETION_REPORTER={id:"ai.inline.completion.reporter"},t.AI_CHAT_VISIBLE={id:"ai.chat.visible"},t.AI_CODE_ACTION={id:"ai.code.action"};var e;(function(n){n.DISCARD={id:"ai.codeEdits.discard"},n.ACCEPT={id:"ai.codeEdits.accept"},n.TRIGGER={id:"ai.codeEdits.trigger"}})(e||(t.AI_CODE_EDITS_COMMANDS=e={}))},38070:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeConflictReportService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(70650);let v=class extends o.Disposable{constructor(){super(...arguments),this.reportInfoMap=new Map,this.unique2RelationMap=new Map}record(m,p){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return p;let s="";return this.unique2RelationMap.has(m)?(s=this.unique2RelationMap.get(m),this.aiReporter.record(p,s)):(s=this.aiReporter.record({...p,msgType:o.AIServiceType.MergeConflict,message:o.AIServiceType.MergeConflict,editorMode:p.editorMode||o.MergeConflictEditorMode.traditional}).relationId,this.unique2RelationMap.set(m,s)),{...p,relationId:s}}report(m,p){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.record(m,p);this.aiReporter.end(s.relationId,s)}reportIncrementNum(m,p){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.unique2RelationMap.get(m);if(!s)return;const h=this.aiReporter.getCacheReportInfo(s)[p]||0;this.report(m,{[p]:h+1})}dispose(){super.dispose(),this.reportInfoMap.clear()}};t.MergeConflictReportService=v,n.__decorate([(0,r.Autowired)(l.AINativeConfigService),n.__metadata("design:type",l.AINativeConfigService)],v.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,r.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],v.prototype,"aiReporter",void 0),t.MergeConflictReportService=v=n.__decorate([(0,r.Injectable)()],v)},95040:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IAIInlineChatService=void 0,e(85608).__exportStar(e(70650),t),t.IAIInlineChatService=Symbol("IAIInlineChatService")},12956:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppStateService=t.ClientAppStateEvent=void 0;const n=e(85608),r=e(76003),o=e(43718);class l extends o.BasicEvent{}t.ClientAppStateEvent=l;let v=class{constructor(){this._state="init",this.deferred={}}get state(){return this._state}set state(m){m!==this._state&&(this._state=m,this.deferred[m]===void 0&&(this.deferred[m]=new o.Deferred),this.deferred[m].resolve(),this.eventBus.fire(new l(m)))}reachedState(m){return this.deferred[m]===void 0&&(this.deferred[m]=new o.Deferred),this.deferred[m].promise}reachedAnyState(...m){return Promise.race(m.map(p=>this.reachedState(p)))}};t.ClientAppStateService=v,n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],v.prototype,"eventBus",void 0),t.ClientAppStateService=v=n.__decorate([(0,r.Injectable)()],v)},59555:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationService=void 0;const n=e(85608),r=e(76003),o=e(59019),l=e(43718),v=e(11050),_=e(42101);let m=class{constructor(){this._initialized=new l.Deferred}async initializeData(){this._backendOS=await this.commonServer.getBackendOS(),this._initialized.resolve()}get frontendOS(){return l.OS.type()}get backendOS(){if(this._backendOS)return this._backendOS;if(this.appConfig.isElectronRenderer)return this.frontendOS;throw new Error("Can't get backend os type before initialize, if you want wait to get backend os, please use async method: getBackendOS")}async getBackendOS(){return await this._initialized.promise,this.backendOS}get clientId(){return this.injector.get(o.WSChannelHandler).clientId}get windowId(){return this.appConfig.isElectronRenderer?_.electronEnv.currentWindowId:this.injector.get(o.WSChannelHandler).clientId}};t.ApplicationService=m,n.__decorate([(0,r.Autowired)(l.CommonServerPath),n.__metadata("design:type",Object)],m.prototype,"commonServer",void 0),n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),t.ApplicationService=m=n.__decorate([(0,r.Injectable)()],m)},16884:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(12956),t),n.__exportStar(e(59555),t)},22914:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(18740),l=e(43718),v=e(32796),_=e(38578),m=(0,l.getDebugLogger)();let p=class{async createRPCServiceChannel(h){var a;const g=this.createConnection(),d=(a=this.appConfig.clientId)!==null&&a!==void 0?a:this.getDefaultClientId(),u=new o.WSChannelHandler(g,d,{logger:m});return(0,v.createConnectionService)(this.injector,h,u)}};t.BaseConnectionHelper=p,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(_.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(l.IReporterService),n.__metadata("design:type",Object)],p.prototype,"reporterService",void 0),t.BaseConnectionHelper=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},41320:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRuntime=void 0;const n=e(85608),r=e(76003),o=e(44142),l=e(6858),v=e(53206);let _=class extends l.RendererRuntime{constructor(){super(...arguments),this.runtimeName=o.ESupportRuntime.Web}registerRuntimeModuleProviders(p,s){s.webProviders&&p.addProviders(...s.webProviders)}registerRuntimeInnerProviders(p){(0,v.injectBrowserInnerProviders)(p)}};t.BrowserRuntime=_,t.BrowserRuntime=_=n.__decorate([(0,r.Injectable)()],_)},53206:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectBrowserInnerProviders=o;const n=e(93899),r=e(97222);function o(l){l.addProviders({token:n.ICtxMenuRenderer,useClass:r.BrowserCtxMenuRenderer})}},55267:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.WebConnectionHelper=void 0;const r=e(85608),o=e(76003),l=e(91493),v=e(43718),_=e(22914);let m=n=class extends _.BaseConnectionHelper{constructor(s){super(),this.options=s,this.clientId=n.clientIdFactory()}getDefaultClientId(){return this.clientId}createConnection(){return l.ReconnectingWebSocketConnection.forURL(this.options.connectionPath,this.options.connectionProtocols)}static clientIdFactory(){return`CLIENT_ID_${(0,v.uuid)()}`}};t.WebConnectionHelper=m,t.WebConnectionHelper=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object])],m)},44142:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onigWasmCDNUri=t.ESupportRuntime=void 0;var e;(function(n){n.Electron="electron",n.Web="web"})(e||(t.ESupportRuntime=e={})),t.onigWasmCDNUri="https://g.alicdn.com/kaitian/vscode-oniguruma-wasm/1.5.1/onig.wasm"},59574:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronRendererRuntime=void 0;const n=e(85608),r=e(76003),o=e(38578),l=e(42101),v=e(44142),_=e(6858),m=e(38892);let p=class extends _.RendererRuntime{constructor(){super(...arguments),this.runtimeName=v.ESupportRuntime.Electron}registerRuntimeModuleProviders(a,g){g.electronProviders&&a.addProviders(...g.electronProviders)}registerRuntimeInnerProviders(a){(0,m.injectElectronInnerProviders)(a)}mergeAppConfig(a){return s(a)}async provideResourceUri(a){switch(a){case _.EKnownResources.OnigWasm:return l.electronEnv.onigWasmUri||this.appConfig.onigWasmUri||v.onigWasmCDNUri;case _.EKnownResources.TreeSitterWasmDirectory:return l.electronEnv.treeSitterWasmDirectoryUri||this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${a}`)}}};t.ElectronRendererRuntime=p,t.ElectronRendererRuntime=p=n.__decorate([(0,r.Injectable)()],p);function s(h){var a;const g=(a=l.electronEnv.metadata)!==null&&a!==void 0?a:{},d={...h,appRoot:h.appRoot||l.electronEnv.appPath,extensionDir:h.extensionDir||g.extensionDir};return g.extensionDevelopmentHost&&(h.extensionDevelopmentHost=g.extensionDevelopmentHost),g.extensionCandidate&&(h.extensionCandidate=(h.extensionCandidate||[]).concat(l.electronEnv.metadata.extensionCandidate||[])),d}},38892:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectElectronInnerProviders=m;const n=e(43718),r=e(37406),o=e(93899),l=e(27790),v=e(11050),_=e(42101);function m(p){const s=p.get(v.AppConfig);p.addProviders({token:n.IElectronMainMenuService,useValue:(0,_.createElectronMainApi)(n.IElectronMainMenuService,s.devtools)},{token:r.IElectronMainUIService,useValue:(0,_.createElectronMainApi)(r.IElectronMainUIService,s.devtools)},{token:r.IElectronMainLifeCycleService,useValue:(0,_.createElectronMainApi)(r.IElectronMainLifeCycleService,s.devtools)},{token:r.IElectronURLService,useValue:(0,_.createElectronMainApi)(r.IElectronURLService,s.devtools)},{token:l.IElectronMenuFactory,useClass:l.ElectronMenuFactory},{token:l.IElectronMenuBarService,useClass:l.ElectronMenuBarService},{token:o.ICtxMenuRenderer,useClass:l.ElectronCtxMenuRenderer})}},63977:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(42101),l=e(22914);let v=class extends l.BaseConnectionHelper{getDefaultClientId(){return o.electronEnv.metadata.windowClientId}createConnection(){return(0,o.createNetSocketConnection)()}};t.ElectronConnectionHelper=v,t.ElectronConnectionHelper=v=n.__decorate([(0,r.Injectable)({multiple:!0})],v)},18379:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionHelperFactory=_;const n=e(85608),r=e(38578),o=e(55267),l=e(44142),v=e(63977);n.__exportStar(e(55267),t),n.__exportStar(e(63977),t),n.__exportStar(e(22914),t),n.__exportStar(e(44142),t);function _(m){return p=>{const s=m.get(r.AppConfig);let h;switch(p){case l.ESupportRuntime.Electron:h=m.get(v.ElectronConnectionHelper);break;case l.ESupportRuntime.Web:h=m.get(o.WebConnectionHelper,[{connectionPath:s.connectionPath,connectionProtocols:s.connectionProtocols}]);break;default:throw new Error(`Unknown backend type: ${p}`)}return h}}},6858:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RendererRuntime=t.EKnownResources=void 0;const n=e(85608),r=e(76003),o=e(11050),l=e(44142);var v;(function(m){m.OnigWasm="wasm:onig",m.TreeSitterWasmDirectory="wasm:tree-sitter"})(v||(t.EKnownResources=v={}));let _=class{mergeAppConfig(p){return p}async provideResourceUri(p){switch(p){case v.OnigWasm:return this.appConfig.onigWasmUri||l.onigWasmCDNUri;case v.TreeSitterWasmDirectory:return this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${p}`)}}};t.RendererRuntime=_,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),t.RendererRuntime=_=n.__decorate([(0,r.Injectable)()],_)},37638:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(66549);let v=class{onStart(){this.authenticationService.initialize()}registerCommands(m){m.registerCommand({id:o.noAccountsId,label:"%authentication.noAccounts%"},{execute:()=>{}})}};t.AuthenticationContribution=v,n.__decorate([(0,r.Autowired)(o.IAuthenticationService),n.__metadata("design:type",Object)],v.prototype,"authenticationService",void 0),t.AuthenticationContribution=v=n.__decorate([(0,o.Domain)(l.ClientAppContribution,o.CommandContribution)],v)},10605:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(93899);let v=class extends o.Disposable{constructor(){super(...arguments),this._onDidRegisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidRegisterAuthenticationProvider=this._onDidRegisterAuthenticationProvider.event,this._onDidUnregisterAuthenticationProvider=this.registerDispose(new o.Emitter),this.onDidUnregisterAuthenticationProvider=this._onDidUnregisterAuthenticationProvider.event,this._onDidChangeSessions=this.registerDispose(new o.Emitter),this.onDidChangeSessions=this._onDidChangeSessions.event,this._authenticationProviders=new Map,this._signInRequestItems=new Map}async initialize(){this._storage=await this.getStorage(new o.URI("authentication").withScheme(o.STORAGE_SCHEMA.GLOBAL));const m=new Map;this.onDidChangeSessions(async p=>{if(p.event.added.length>0){const s=await this.getSessions(p.providerId);s.forEach(h=>{if(s.find(b=>m.get(b.id)))return;const a=new o.DisposableCollection,g=`account-sign-out-${p.providerId}-${h.id}`,d=this.commands.registerCommand({id:g,label:(0,o.formatLocalize)("authentication.signOut",p.label)},{execute:async()=>{await this.signOutOfAccount(p.providerId,h.account.label)}}),u=`manage-trusted-${p.providerId}-${h.id}`,E=this.commands.registerCommand({id:u,label:"%authentication.manageTrustedExtensions%"},{execute:async()=>{await this.manageTrustedExtensionsForAccount(p.providerId,h.account.label)}}),f=`${p.providerId}${h.account.label}`,c=this.menus.registerMenuItem(l.MenuId.AccountsContext,{submenu:f,label:`${h.account.label} (${p.label})`}),y=this.menus.registerMenuItems(f,[{command:u},{command:g}]);a.push(c),a.push(y),a.push(d),a.push(E),m.set(h.id,a)})}p.event.removed.length>0&&p.event.removed.forEach(s=>{const h=m.get(s.id);h&&(h.dispose(),m.delete(s.id))})})}get storage(){return this._storage}registerAuthenticationProvider(m,p){this._authenticationProviders.set(m,p),this._onDidRegisterAuthenticationProvider.fire({id:m,label:p.label}),this.updateAccountsMenuItem()}async sessionsUpdate(m,p){const s=this._authenticationProviders.get(m);s&&(this._onDidChangeSessions.fire({providerId:m,label:s.label,event:p}),await s.updateSessionItems(p),this.updateAccountsMenuItem(),p.added&&await this.updateNewSessionRequests(s))}async updateNewSessionRequests(m){const p=this._signInRequestItems.get(m.id);if(!p)return;const s=await m.getSessions();Object.keys(p).forEach(h=>{if(s.some(a=>a.scopes.slice().sort().join("")===h)){const a=p[h];a&&a.disposables.forEach(g=>g.dispose()),delete p[h],Object.keys(p).length===0?this._signInRequestItems.delete(m.id):this._signInRequestItems.set(m.id,p)}})}getTrustedKey(m,p){return`trusted-${m}-${p}`}async getAllowedExtensions(m,p){const s=this.getTrustedKey(m,p);let h=[];try{const a=await this.storage.get(s);a&&(h=JSON.parse(a))}catch(a){this.logger.warn("read allow extensions error: "+a)}return h}async setAllowedExtensions(m,p,s){const h=this.getTrustedKey(m,p);await this.storage.set(h,JSON.stringify(s))}async removeAllowedExtensions(m,p){const s=this.getTrustedKey(m,p);await this.storage.delete(s)}async updatedAllowedExtension(m,p,s,h,a){const g=await this.getAllowedExtensions(m,p),d=g.findIndex(u=>u.id===s);d===-1?g.push({id:s,name:h,allowed:a}):g[d].allowed=a,await this.setAllowedExtensions(m,p,g)}async isAccessAllowed(m,p,s){const a=(await this.getAllowedExtensions(m,p)).find(g=>g.id===s);return a?a.allowed!==void 0?a.allowed:!0:!1}async tryActivateProvider(m){await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onView",data:m}));let p=this._authenticationProviders.get(m);if(p)return p;const s=new Promise((a,g)=>{this.onDidRegisterAuthenticationProvider(d=>{if(d.id===m)if(p=this._authenticationProviders.get(m),p)a(p);else throw new Error(`No authentication provider '${m}' is currently registered.`)})}),h=new Promise((a,g)=>{setTimeout(()=>{g(new Error(`didRegister ${m} timeout`))},5e3)});return Promise.race([s,h])}async getSessions(m,p,s,h){try{return await(this._authenticationProviders.get(m)||await this.tryActivateProvider(m)).getSessions(p,h)}catch{throw new Error(`No authentication provider '${m}' is currently registered.`)}}isAuthenticationProviderRegistered(m){return this._authenticationProviders.has(m)}getProviderIds(){const m=[];return this._authenticationProviders.forEach(p=>{m.push(p.id)}),m}unregisterAuthenticationProvider(m){const p=this._authenticationProviders.get(m);p&&(p.dispose(),this._authenticationProviders.delete(m),this._onDidUnregisterAuthenticationProvider.fire({id:m,label:p.label}),this.updateAccountsMenuItem())}updateAccountsMenuItem(){let m=!1;this._authenticationProviders.forEach(p=>{m=m||p.hasSessions()}),m&&this._noAccountsMenuItem&&(this._noAccountsMenuItem.dispose(),this._noAccountsMenuItem=void 0),!m&&!this._noAccountsMenuItem&&(this._noAccountsMenuItem=this.menus.registerMenuItem(l.MenuId.AccountsContext,{group:"0_accounts",command:o.noAccountsId}))}async requestNewSession(m,p,s,h,a){let g=this._authenticationProviders.get(m);if(g||await new Promise((d,u)=>{this.onDidRegisterAuthenticationProvider(E=>{E.id===m&&(g=this._authenticationProviders.get(m),d())})}),g){const d=this._signInRequestItems.get(m),u=p.sort().join("");if(d&&d[u]&&d[u].requestingExtensionIds.includes(h))return;const f=this.commands.registerCommand({id:`${h}signIn`,label:(0,o.formatLocalize)("authentication.signInRequests",a)},{execute:async()=>{const y=await this.login(m,p,s),b=y.account.label,A=await this.getAllowedExtensions(m,b);A.find(S=>S.id===h)||(A.push({id:h,name:a}),await this.setAllowedExtensions(m,b,A)),await this.setExtensionSessionId(a,m,y.id)}}),c=this.menus.registerMenuItem(l.MenuId.AccountsContext,{group:"2_signInRequests",command:`${h}signIn`});if(d){const y=d[u]||{disposables:[],requestingExtensionIds:[]};d[u]={disposables:[...y.disposables,c,f],requestingExtensionIds:[...y.requestingExtensionIds,h]},this._signInRequestItems.set(m,d)}else this._signInRequestItems.set(m,{[u]:{disposables:[c,f],requestingExtensionIds:[h]}})}}getLabel(m){const p=this._authenticationProviders.get(m);if(p)return p.label;throw new Error(`No authentication provider '${m}' has been declared.`)}supportsMultipleAccounts(m){const p=this._authenticationProviders.get(m);if(p)return p.supportsMultipleAccounts;throw new Error(`No authentication provider '${m}' is currently registered.`)}async login(m,p,s){try{return await(this._authenticationProviders.get(m)||await this.tryActivateProvider(m)).login(p,s)}catch(h){throw new Error(`No authentication provider '${m}' is currently registered, error messge: ${h.message}`)}}logout(m,p){const s=this._authenticationProviders.get(m);if(s)return s.logout(p);throw new Error(`No authentication provider '${m}' is currently registered.`)}manageTrustedExtensionsForAccount(m,p){const s=this._authenticationProviders.get(m);if(s)return s.manageTrustedExtensions(p);throw new Error(`No authentication provider '${m}' is currently registered.`)}signOutOfAccount(m,p){const s=this._authenticationProviders.get(m);if(s)return s.signOut(p);throw new Error(`No authentication provider '${m}' is currently registered.`)}getUsagesKey(m,p){return`usages-${m}-${p}`}async getAccountUsages(m,p){const s=this.getUsagesKey(m,p),h=await this.storage.get(s);let a=[];if(h)try{a=JSON.parse(h)}catch(g){this.logger.warn("parse account usages error: "+g)}return a}async addAccountUsage(m,p,s,h){const a=this.getUsagesKey(m,p),g=await this.getAccountUsages(m,p),d=g.findIndex(u=>u.extensionId===s);d>-1?g.splice(d,1,{extensionId:s,extensionName:h,lastUsed:Date.now()}):g.push({extensionId:s,extensionName:h,lastUsed:Date.now()}),await this.storage.set(a,JSON.stringify(g))}async removeAccountUsage(m,p){const s=this.getUsagesKey(m,p);await this.storage.delete(s)}getExtensionSessionIdKey(m,p){return`session-${m}-${p}`}async getExtensionSessionId(m,p){const s=this.getExtensionSessionIdKey(m,p);return await this.storage.get(s)}async setExtensionSessionId(m,p,s){const h=this.getExtensionSessionIdKey(m,p);await this.storage.set(h,s)}async removeExtensionSessionId(m,p){const s=this.getExtensionSessionIdKey(m,p);await this.storage.delete(s)}};t.AuthenticationService=v,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],v.prototype,"getStorage",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],v.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(l.IMenuRegistry),n.__metadata("design:type",l.IMenuRegistry)],v.prototype,"menus",void 0),n.__decorate([(0,r.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],v.prototype,"commands",void 0),t.AuthenticationService=v=n.__decorate([(0,r.Injectable)()],v)},72746:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},33916:(P,t,e)=>{"use strict";var n;n={value:!0},t.j=void 0,e(37533);const r=e(76003),o=e(43718),l=e(4588),v=e(37406),_=e(16884),m=e(18379),p=e(41320),s=e(59574),h=e(6858),a=e(36206),g=e(66963),d=e(18193),u=e(41118),E=e(1149),f=e(11949),c=e(64102),y=e(78132),b=e(11050),A=e(67304),S=e(79951),w=e(79248),I=e(96302),D=e(71843);e(99696);class T{constructor(M){var O,x,k;this.opts=M,this.appInitialized=new o.Deferred,this.browserModules=[],this._disposables=new o.DisposableCollection,this._inComposition=!1,this._handleBeforeUpload=K=>{if(this.config.isElectronRenderer){if(this.stateService.state==="electron_confirmed_close")return;K.returnValue="",K.preventDefault(),this.stateService.state!=="electron_asking_close"&&(this.stateService.state="electron_asking_close",this.preventStopElectron().then(Y=>{if(Y)this.stateService.state="ready";else return this.stopContributionsElectron().then(()=>{this.stateService.state="electron_confirmed_close";const Z=this.injector.get(v.IElectronMainLifeCycleService);setTimeout(()=>{Z.closeWindow(S.electronEnv.currentWindowId)},0)})}))}else if(this.preventStop())return(K||window.event).returnValue=!0,!0},this._handleUnload=()=>{this.stateService.state="closing_window",this.config.isElectronRenderer||(this.disposeSideEffect(),this.stopContributions())},this._handleResize=()=>{},this._handleKeydown=K=>{K&&K.target.name!==u.NO_KEYBINDING_NAME&&this.keybindingService.run(K)},this._handleKeyup=K=>{this.keybindingService.resolveModifierKey(K)},this._handleWheel=()=>{};const{modules:F,contributions:L,iconStyleSheets:N,useCdnIcon:U,editorBackgroundImage:W,defaultPreferences:j,allowSetDocumentTitleFollowWorkspaceDir:Q=!0,...G}=M;this.initEarlyPreference(M.workspaceDir||"");const X=(0,y.getPreferenceLanguageId)(j);(0,o.setLanguageId)(X),this.injector=M.injector||new r.Injector,this.modules=F,this.modules.forEach(K=>this.resolveModuleDeps(K)),this.browserModules=M.modulesInstances||[];const $=(O=M.isElectronRenderer)!==null&&O!==void 0?O:this.detectRuntime()===m.ESupportRuntime.Electron;this.config={appName:l.DEFAULT_APPLICATION_NAME,appHost:$?l.DEFAULT_APPLICATION_DESKTOP_HOST:l.DEFAULT_APPLICATION_WEB_HOST,appRoot:M.appRoot||"",uriScheme:l.DEFAULT_URI_SCHEME,...G,isElectronRenderer:$,workspaceDir:M.workspaceDir||"",extensionDir:M.extensionDir||"",injector:this.injector,wsPath:M.wsPath||`ws://${window.location.hostname}:8000`,layoutConfig:M.layoutConfig,editorBackgroundImage:M.editorBackgroundImage||W,allowSetDocumentTitleFollowWorkspaceDir:Q,devtools:(x=M.devtools)!==null&&x!==void 0?x:!1,rpcMessageTimeout:M.rpcMessageTimeout||-1},this.config.connectionPath=M.connectionPath||`${this.config.wsPath}/service`;const V=this.injector.get(E.LayoutViewSizeConfig);V.init(M.layoutViewSize),this.config.layoutViewSize=V,this.injector.get(E.DesignLayoutConfig).setLayout(M.designLayout,(k=M.AINativeConfig)===null||k===void 0?void 0:k.layout),this.injector.addProviders({token:a.IClientApp,useValue:this}),this.injector.addProviders({token:b.AppConfig,useValue:this.config}),this.runtime=$?this.injector.get(s.ElectronRendererRuntime):this.injector.get(p.BrowserRuntime),this.injector.addProviders({token:h.RendererRuntime,useValue:this.runtime}),this.config.devtools&&(window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__={}),M.extensionDevelopmentPath&&(this.config.extensionCandidate=(this.config.extensionCandidate||[]).concat(Array.isArray(M.extensionDevelopmentPath)?M.extensionDevelopmentPath.map(K=>(0,o.asExtensionCandidate)(K,!0)):[(0,o.asExtensionCandidate)(M.extensionDevelopmentPath,!0)]),this.config.extensionDevelopmentHost=!0),this.config=this.runtime.mergeAppConfig(this.config),L&&this.injector.addProviders(...L),this.initBaseProvider(),this.initFields(),this.appendIconStyleSheets(N,U),this.createBrowserModules(j)}resolveModuleDeps(M){const O=Reflect.getMetadata("dependencies",M);O&&O.forEach(x=>{this.modules.indexOf(x)===-1&&this.modules.push(x)})}get lifeCycleService(){return this.injector.get(o.AppLifeCycleServiceToken)}async start(M,O,x){const F=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE);this.lifeCycleService.phase=1,x?(console.error("You're using deprecated method 'start()' with connection parameter"),console.error("We introduced a new connection service to replace the old one"),(0,I.bindConnectionServiceDeprecated)(this.injector,this.modules,x)):O&&await this.createConnection(O),F.timeEnd("ClientApp.createConnection"),this.logger=this.injector.get(o.ILogger),this.stateService.state="client_connected",this.registerEventListeners(),await this.injector.get(o.IApplicationService).initializeData(),await this.measure("Contributions.start",()=>this.startContributions(M)),this.stateService.state="started_contributions",this.stateService.state="ready",this.lifeCycleService.phase=4,F.timeEnd("Framework.ready")}async createConnection(M){(await this.injector.get(m.ConnectionHelperFactory)(M).createRPCServiceChannel(this.modules)).onReopen(()=>{this.onReconnectContributions()})}onReconnectContributions(){const M=this.contributions;for(const O of M)O.onReconnect&&O.onReconnect(this)}initBaseProvider(){(0,D.injectInnerProviders)(this.injector),this.runtime.registerRuntimeInnerProviders(this.injector)}initFields(){this.contributionsProvider=this.injector.get(g.ClientAppContribution),this.commandRegistry=this.injector.get(o.CommandRegistry),this.keybindingRegistry=this.injector.get(u.KeybindingRegistry),this.keybindingService=this.injector.get(u.KeybindingService),this.stateService=this.injector.get(_.ClientAppStateService),this.nextMenuRegistry=this.injector.get(c.IMenuRegistry)}createBrowserModules(M){const O=this.injector;for(const x of this.modules){const k=O.get(x);this.browserModules.push(k),k.providers&&this.injector.addProviders(...k.providers),this.runtime.registerRuntimeModuleProviders(this.injector,k),k.preferences&&k.preferences(this.injector)}(0,d.injectCorePreferences)(this.injector),this.injectPreferenceService(this.injector,M),this.injectStorageProvider(this.injector);for(const x of this.browserModules)if(x.contributionProvider)if(Array.isArray(x.contributionProvider))for(const k of x.contributionProvider)(0,o.createContributionProvider)(this.injector,k);else(0,o.createContributionProvider)(this.injector,x.contributionProvider)}get contributions(){return this.contributionsProvider.getContributions()}async startContributions(M){await this.measure("RenderApp.render",()=>this.renderApp(M)),this.lifeCycleService.phase=2,await this.measure("Contributions.initialize",()=>this.initializeContributions()),await this.initializeCoreRegistry(),this.stateService.state="core_module_initialized",this.lifeCycleService.phase=3,await this.measure("Contributions.onStart",()=>this.onStartContributions()),await this.runContributionsPhase(this.contributions,"onDidStart")}async initializeCoreRegistry(){this.commandRegistry.initialize(),await this.keybindingRegistry.initialize(),this.nextMenuRegistry.initialize()}async initializeContributions(){await this.runContributionsPhase(this.contributions,"initialize"),this.appInitialized.resolve(),this.logger.verbose("contributions.initialize done")}async onStartContributions(){await this.runContributionsPhase(this.contributions,"onStart")}async runContributionsPhase(M,O){return await Promise.all(M.map(x=>this.contributionPhaseRunner(x,O)))}async contributionPhaseRunner(M,O){const x=M[O];if(typeof x=="function")try{const k=M.constructor.name+"."+O;return await this.measure(k,()=>x.call(M,this))}catch(k){this.logger.error(`Could not run contribution#${O}`,k)}}async renderApp(M){await(0,w.renderClientApp)(this,M),this.injector.get(o.IEventBus).fire(new f.RenderedEvent)}async measure(M,O){const k=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE),F=await O();return k.timeEnd(M),F}preventStop(){const O=this.injector.get(d.CorePreferences)["application.confirmExit"];if(O==="never")return!1;for(const x of this.contributions)if(x.onWillStop)try{if(x.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return O==="always"}async preventStopElectron(){if(this.injector.get(d.CorePreferences)["application.confirmExit"]==="never")return!1;for(const x of this.contributions)if(x.onWillStop)try{if(await x.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return!1}stopContributions(){for(const M of this.contributions)if(M.onStop)try{M.onStop(this)}catch(O){this.logger.error("Could not stop contribution",O)}}async stopContributionsElectron(){const M=[];for(const O of this.contributions)O.onStop&&M.push((async()=>{try{await O.onStop(this)}catch(x){this.logger.error("Could not stop contribution",x)}})());await Promise.all(M)}registerEventListeners(){var M,O;window.addEventListener("beforeunload",this._handleBeforeUpload),window.addEventListener("unload",this._handleUnload),window.addEventListener("resize",this._handleResize),window.addEventListener("compositionstart",(M=this.keybindingService)===null||M===void 0?void 0:M.handleCompositionStart),window.addEventListener("compositionend",(O=this.keybindingService)===null||O===void 0?void 0:O.handleCompositionEnd),window.addEventListener("keydown",this._handleKeydown,!0),window.addEventListener("keyup",this._handleKeyup,!0),o.isOSX&&document.body.addEventListener("wheel",this._handleWheel,{passive:!1})}injectPreferenceService(M,O){const x=()=>k=>{const F=M.get(y.PreferenceProvider,{tag:k});return F.asScope(k),F};if((0,y.injectPreferenceConfigurations)(M),(0,y.injectPreferenceSchemaProvider)(M),M.addProviders({token:y.PreferenceProviderProvider,useFactory:x},{token:y.PreferenceService,useClass:y.PreferenceServiceImpl}),O){const F=M.get(y.PreferenceProviderProvider)(y.PreferenceScope.Default);for(const L of Object.keys(O))F.setPreference(L,O[L])}}injectStorageProvider(M){M.addProviders({token:o.DefaultStorageProvider,useClass:o.DefaultStorageProvider}),M.addProviders({token:o.StorageProvider,useFactory:O=>x=>O.get(o.DefaultStorageProvider).get(x)}),(0,o.createContributionProvider)(M,o.StorageResolverContribution)}fireOnReload(M=!1){window.location.reload(M)}appendIconStyleSheets(M,O){const x=O?[A.DEFAULT_CDN_ICON,A.IDE_OCTICONS_CN_CSS,A.IDE_CODICONS_CN_CSS]:[];M&&M.length&&M.forEach(k=>{this.updateIconMap(k.prefix,k.iconMap),x.push(k.cssPath)});for(const k of x){const F=document.createElement("link");F.setAttribute("rel","stylesheet"),F.setAttribute("href",k),document.getElementsByTagName("head")[0].appendChild(F)}}updateIconMap(M,O){M==="kaitian-icon kticon-"&&this.logger.error(`The icon prefix '${M}' conflicts with the built-in icon, please check the icon configuration.`),(0,A.updateIconMap)(M,O)}initEarlyPreference(M){this._disposables.push((0,y.registerLocalStorageProvider)(o.GeneralSettingsId.Theme,M)),this._disposables.push((0,y.registerLocalStorageProvider)(o.GeneralSettingsId.Icon,M)),this._disposables.push((0,y.registerLocalStorageProvider)(o.GeneralSettingsId.Language,M))}async dispose(){var M,O;window.removeEventListener("beforeunload",this._handleBeforeUpload),window.removeEventListener("unload",this._handleUnload),window.removeEventListener("resize",this._handleResize),window.removeEventListener("compositionstart",(M=this.keybindingService)===null||M===void 0?void 0:M.handleCompositionStart),window.removeEventListener("compositionend",(O=this.keybindingService)===null||O===void 0?void 0:O.handleCompositionEnd),window.removeEventListener("keydown",this._handleKeydown,!0),o.isOSX&&document.body.removeEventListener("wheel",this._handleWheel),this._disposables.dispose(),this.disposeSideEffect()}disposeSideEffect(){for(const M of this.contributions)if(M.onDisposeSideEffects)try{M.onDisposeSideEffects(this)}catch(O){this.logger.error("Could not dispose contribution",O)}}detectRuntime(){return window.isElectronRenderer||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0?m.ESupportRuntime.Electron:m.ESupportRuntime.Web}}t.j=T},79248:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.App=d,t.renderClientApp=f;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(25873)),l=e(97267),v=e(43718),_=e(28003),m=e(68456),p=e(11050),s=e(52564),h=e(26542),a=e(67304),g=e(75206);function d(c){const y=c.app.injector,b=y.get(v.IEventBus),A=y.get(h.LabelService),S=r.default.useCallback((w,I)=>A.getIcon(v.URI.parse(w),I),[]);return r.default.useEffect(()=>{let w;const I=()=>{w&&window.cancelAnimationFrame(w),w=window.requestAnimationFrame(()=>{w=null,s.allSlot.forEach(D=>{b.fire(new m.ResizeEvent({slotLocation:D.slot})),b.fireDirective(m.ResizeEvent.createDirective(D.slot))})})};return window.addEventListener("resize",I),()=>{window.removeEventListener("resize",I)}},[]),r.default.createElement(l.ComponentContextProvider,{value:{getIcon:a.getIcon,localize:v.localize,getResourceIcon:S}},r.default.createElement(p.ConfigProvider,{value:c.app.config},r.default.createElement(c.main,{callback:c.callback}),c.overlays&&c.overlays.map((w,I)=>r.default.createElement(w,{key:I}))))}const u=c=>y=>{o.default.createRoot(c).render(r.default.createElement(y,null))},E=(0,v.getDebugLogger)();function f(c,y){let b=c.config.layoutComponent||_.DefaultLayout;const A=c.browserModules.filter(R=>R.isOverlay).map(R=>R.component?R.component:(E.warn("Overlay module does not have component",R),null)).filter(Boolean),S=c.injector;S.get(g.ClientAppContextContribution).getContributions().forEach(R=>b=R.registerClientAppContext(b,S));const D=R=>r.default.createElement(d,{...R,app:c,main:b,overlays:A});return(typeof y=="function"?y:u(y))(D)}},96302:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnectionService=m,t.bindConnectionServiceDeprecated=p;const n=e(8919),r=e(18740),o=e(76271),l=e(43718),v=e(16884),_=e(11050);async function m(h,a,g,d={}){var u;const E=h.get(_.AppConfig),f=h.get(l.IReporterService);g.setReporter(f);const c=h.get(l.IEventBus),y=h.get(v.ClientAppStateService),b=()=>{y.reachedState("core_module_initialized").then(()=>{c.fire(new l.BrowserConnectionOpenEvent)})};g.connection.isOpen()&&b(),g.connection.onOpen(()=>{b()}),g.connection.onClose(()=>{y.reachedState("core_module_initialized").then(()=>{c.fire(new l.BrowserConnectionCloseEvent)})}),g.connection.onError(I=>{y.reachedState("core_module_initialized").then(()=>{c.fire(new l.BrowserConnectionErrorEvent(I))})}),await g.initHandler(),h.addProviders({token:r.WSChannelHandler,useValue:g});const A=await g.openChannel(o.RPCServiceChannelPath),S=new n.RPCServiceCenter;return S.setSumiConnection(A.createSumiConnection(d)),!((u=E?.measure)===null||u===void 0)&&u.connection&&S.setReporter(f,E.measure.connection.minimumReportThresholdTime),s(h,a,S),h.get(l.ILogger).reportToServer(),A}function p(h,a,g){const d=new n.RPCServiceCenter,u=d.setConnection(g),E=g.onClose(()=>{u.dispose(),E.dispose()});s(h,a,d)}function s(h,a,g){const{getRPCService:d}=(0,n.initRPCService)(g),u=[],E=[];for(const f of a){const c=h.get(f);if(c.backServices)for(const y of c.backServices)u.push(y),y.protocol&&g.loadProtocol(y.protocol)}for(const f of u){const{servicePath:c}=f,y=d(c),b={token:c,useValue:y};h.addProviders(b),f.clientToken&&E.push(f)}for(const f of E){const{servicePath:c}=f,y=d(c);if(f.clientToken){const b=h.get(f.clientToken);y.onRequestService(b)}}}},75206:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContextContribution=void 0,t.ClientAppContextContribution=Symbol("ClientAppContextContribution")},32796:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(72746),t),n.__exportStar(e(79248),t),n.__exportStar(e(96302),t),n.__exportStar(e(75206),t)},71843:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectInnerProviders=$;const n=e(43718),r=e(96405),o=e(16872),l=e(41480),v=e(12956),_=e(59555),m=e(18379),p=e(10605),s=e(66963),h=e(71707),a=e(80832),g=e(23396),d=e(77273),u=e(41118),E=e(37015),f=e(68456),c=e(75694),y=e(93899),b=e(77666),A=e(90697),S=e(73967),w=e(78132),I=e(68969),D=e(11719),T=e(52564),R=e(26542),M=e(52993),O=e(10845),x=e(40827),k=e(32242),F=e(99e3),L=e(42637),N=e(62652),U=e(27957),W=e(45670),j=e(66894),Q=e(63921),G=e(75206),X=e(82493);function $(V){(0,n.createContributionProvider)(V,s.ClientAppContribution),(0,n.createContributionProvider)(V,n.CommandContribution),(0,n.createContributionProvider)(V,d.FsProviderContribution),(0,n.createContributionProvider)(V,u.KeybindingContribution),(0,n.createContributionProvider)(V,y.MenuContribution),(0,n.createContributionProvider)(V,f.ComponentContribution),(0,n.createContributionProvider)(V,T.SlotRendererContribution),(0,n.createContributionProvider)(V,w.PreferenceContribution),(0,n.createContributionProvider)(V,W.VariableContribution),(0,n.createContributionProvider)(V,f.TabBarToolbarContribution),(0,n.createContributionProvider)(V,L.ToolBarActionContribution),(0,n.createContributionProvider)(V,k.StaticResourceContribution),(0,n.createContributionProvider)(V,G.ClientAppContextContribution);const H=[{token:n.IEventBus,useClass:n.EventBusImpl},{token:n.CommandService,useClass:n.CommandServiceImpl},{token:n.CommandRegistry,useClass:n.CommandRegistryImpl},{token:u.KeybindingRegistry,useClass:u.KeybindingRegistryImpl},{token:u.KeybindingService,useFactory:K=>K.get(u.KeybindingRegistry)},{token:o.KeyboardNativeLayoutService,useClass:E.BrowserKeyboardLayoutImpl},{token:o.KeyboardLayoutChangeNotifierService,useFactory:K=>K.get(o.KeyboardNativeLayoutService)},{token:E.KeyValidator,useFactory:K=>K.get(o.KeyboardNativeLayoutService)},v.ClientAppStateService,{token:c.ILogger,useClass:c.Logger},{token:c.Logger,useAlias:c.ILogger},{token:f.ComponentRegistry,useClass:f.ComponentRegistryImpl},{token:W.VariableRegistry,useClass:W.VariableRegistryImpl},{token:y.AbstractMenuService,useClass:y.MenuServiceImpl},{token:y.AbstractContextMenuService,useClass:y.ContextMenuServiceImpl},{token:y.IMenuRegistry,useClass:y.MenuRegistryImpl},{token:b.IToolbarActionService,useClass:b.ToolbarActionService},{token:y.AbstractMenubarService,useClass:y.MenubarServiceImpl},{token:n.IReporter,useClass:n.DefaultReporter},{token:n.IReporterService,useClass:n.ReporterService},{token:n.ReporterMetadata,useValue:{host:n.REPORT_HOST.BROWSER}},{token:I.IProgressService,useClass:D.ProgressService},{token:L.IToolbarRegistry,useClass:U.NextToolbarRegistryImpl},{token:L.IToolbarPopoverRegistry,useClass:N.ToolbarPopoverRegistry},U.ToolbarClientAppContribution,{token:n.IProblemPatternRegistry,useClass:n.ProblemPatternRegistryImpl},{token:n.IProblemMatcherRegistry,useClass:n.ProblemMatchersRegistryImpl},{token:n.ITaskDefinitionRegistry,useClass:n.TaskDefinitionRegistryImpl},{token:A.IOpenerService,useClass:S.OpenerService},{token:j.IWindowService,useClass:Q.WindowService},{token:n.IApplicationService,useClass:_.ApplicationService},{token:M.IClipboardService,useClass:M.BrowserClipboardService},{token:O.IExternalUriService,useClass:O.ExternalUriService},{token:n.IAuthenticationService,useClass:p.AuthenticationService},{token:R.ICryptoService,useClass:R.CryptoService},{token:R.ICredentialsService,useClass:R.CredentialsService},{token:r.IHashCalculateService,useClass:r.HashCalculateServiceImpl},{token:n.IExtensionsSchemaService,useClass:g.ExtensionsPointServiceImpl},{token:n.AppLifeCycleServiceToken,useClass:X.AppLifeCycleService},{token:k.StaticResourceService,useClass:F.StaticResourceServiceImpl},x.StaticResourceClientAppContribution,{token:h.ISplitPanelService,useClass:h.SplitPanelService},{token:n.IAIReporter,useClass:l.AIReporter},{token:a.IDesignStyleService,useClass:a.DesignStyleService},{token:m.ConnectionHelperFactory,useFactory:m.ConnectionHelperFactory}];V.addProviders(...H)}},82493:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppLifeCycleService=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class{constructor(){this.onDidChangeLifecyclePhaseEmitter=new o.Emitter,this.onDidLifeCyclePhaseChange=this.onDidChangeLifecyclePhaseEmitter.event}set phase(_){this.lifeCyclePhase=_,this.onDidChangeLifecyclePhaseEmitter.fire(this.lifeCyclePhase)}get phase(){return this.lifeCyclePhase}};t.AppLifeCycleService=l,t.AppLifeCycleService=l=n.__decorate([(0,r.Injectable)()],l)},99696:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=e(85608).__importDefault(e(99126));typeof window.ResizeObserver>"u"&&(window.ResizeObserver=r.default)},36206:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserModule=t.IClientApp=void 0;const n=e(85608),r=e(76003),o=e(43718);t.IClientApp=Symbol("CLIENT_APP_TOKEN");class l extends o.BasicModule{}t.BrowserModule=l,n.__decorate([(0,r.Autowired)(t.IClientApp),n.__metadata("design:type",Object)],l.prototype,"app",void 0)},14109:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MERGE_CONFLICT_COMMANDS=t.SCM_COMMANDS=t.QUICK_OPEN_COMMANDS=t.MARKER_COMMANDS=t.LAYOUT_COMMANDS=t.TERMINAL_COMMANDS=t.DIALOG_COMMANDS=t.KEYBOARD_COMMANDS=t.WORKSPACE_COMMANDS=t.OUTLINE_COMMANDS=t.SEARCH_COMMANDS=t.MULTI_DIFF_EDITOR_COMMANDS=t.DIFF_EDITOR_COMMANDS=t.EDITOR_COMMANDS=t.COMMON_COMMANDS=t.OPEN_EDITORS_COMMANDS=t.FILE_COMMANDS=void 0;const n=e(67304);var r;(function(b){const A="file";b.NEW_FILE={id:"file.new",category:A,iconClass:(0,n.getIcon)("new-file")},b.RENAME_FILE={id:"file.rename",category:A},b.DELETE_FILE={id:"file.delete",category:A},b.NEW_FOLDER={id:"file.folder.new",category:A,iconClass:(0,n.getIcon)("new-folder")},b.COMPARE_SELECTED={id:"file.compare",category:A},b.OPEN_FILE={id:"file.open",category:A},b.SAVE_FILE={id:"file.save",category:A},b.COLLAPSE_ALL={id:"filetree.collapse.all",category:A,iconClass:(0,n.getIcon)("collapse-all")},b.REFRESH_ALL={id:"filetree.refresh.all",category:A,iconClass:(0,n.getIcon)("refresh")},b.OPEN_RESOURCES={id:"filetree.open.file",category:A},b.OPEN_TO_THE_SIDE={id:"filetree.open.side",category:A},b.OPEN_TYPE_WITH={id:"filetree.open.with",category:A},b.COPY_PATH={id:"filetree.copy.path",category:A,label:"%file.copy.path%"},b.COPY_RELATIVE_PATH={id:"filetree.copy.relativepath",category:A,label:"%file.copy.relativepath%"},b.COPY_FILE={id:"filetree.copy.file",category:A},b.CUT_FILE={id:"filetree.cut.file",category:A},b.PASTE_FILE={id:"filetree.paste.file",category:A},b.SELECT_CURRENT_NODE={id:"filetree.selectCurrentNode",category:A},b.LOCATION={id:"filetree.location",category:A},b.LOCATION_WITH_EDITOR={id:"filetree.location_with_editor",category:A,iconClass:(0,n.getIcon)("focus")},b.OPEN_FOLDER={id:"filetree.open.folder",category:A,label:"%file.open.folder%"},b.VSCODE_OPEN_FOLDER={id:"filetree.open.vscode_open_folder",category:A},b.OPEN_WORKSPACE={id:"filetree.open.workspace",category:A,label:"%file.open.workspace%"},b.SEARCH_ON_FOLDER={id:"filetree.search.folder",category:A},b.FOCUS_FILES={id:"filetree.focus.files",category:A,label:"%file.focus.files%"},b.FILTER_TOGGLE={id:"filetree.files.filter_toggle",category:A,iconClass:(0,n.getIcon)("retrieval")},b.FILTER_OPEN={id:"filetree.files.filter_open",category:A},b.OPEN_TERMINAL_WITH_PATH={id:"filetree.openTerminalWithPath",category:A},b.FILTER_CLOSE={id:"filetree.quitFilterMode",category:A},b.NEXT={id:"filetree.next",category:A},b.PREV={id:"filetree.prev",category:A},b.COLLAPSE={id:"filetree.collapse",category:A},b.EXPAND={id:"filetree.expand",category:A},b.REVEAL_IN_EXPLORER={id:"filetree.revealInExplorer",category:A},b.TOGGLE_OR_OPEN={id:"filetree.toggleOrOpen",category:A}})(r||(t.FILE_COMMANDS=r={}));var o;(function(b){const A="openeditors";b.SAVE_ALL={id:"opened.editors.save.all",category:A,iconClass:(0,n.getIcon)("save-all")},b.CLOSE_ALL={id:"opened.editors.close.all",category:A,iconClass:(0,n.getIcon)("close-all")},b.SAVE_BY_GROUP={id:"opened.editors.save.byGroup"},b.CLOSE_BY_GROUP={id:"opened.editors.close.byGroup"},b.OPEN={id:"opened.editors.open",category:A},b.CLOSE={id:"opened.editors.close",category:A},b.OPEN_TO_THE_SIDE={id:"opened.editors.openToTheSide",category:A},b.COMPARE_SELECTED={id:"opened.editors.compare",category:A},b.COPY_RELATIVE_PATH={id:"opened.editors.copyRelativePath",category:A},b.COPY_PATH={id:"opened.editors.copyPath",category:A},b.LOCATION={id:"opened.editors.location",category:A}})(o||(t.OPEN_EDITORS_COMMANDS=o={}));var l;(function(b){b.FIND={id:"core.find",label:"%common.find%"},b.REPLACE={id:"core.replace",label:"%common.replace%"},b.ABOUT_COMMAND={id:"core.about",label:"%common.about%"},b.OPEN_PREFERENCES={id:"core.openpreference",label:"%common.preference.open%"},b.LOCATE_PREFERENCES={id:"workbench.preferences.locate"},b.OPEN_KEYMAPS={id:"core.keymaps.open",label:"%common.keymaps.open%"},b.OPEN_LAUNCH_CONFIGURATION={id:"core.launchConfiguration.open",label:"%debug.action.open.configuration%"},b.ENVIRONMENT_VARIABLE={id:"core.environment.variable"}})(l||(t.COMMON_COMMANDS=l={}));var v;(function(b){const A="editor";b.API_OPEN_EDITOR_COMMAND_ID="_workbench.open",b.API_OPEN_DIFF_EDITOR_COMMAND_ID="_workbench.diff",b.API_OPEN_WITH_EDITOR_COMMAND_ID="_workbench.openWith",b.VSCODE_OPEN_MULTI_DIFF_EDITOR_COMMAND_ID="_workbench.openMultiDiffEditor",b.NEW_UNTITLED_FILE={id:"file.new.untitled",category:A,label:"%file.new%",iconClass:(0,n.getIcon)("new-file")},b.UNDO={id:"editor.undo",category:A,label:"%editor.undo%"},b.REDO={id:"editor.redo",category:A,label:"%editor.redo%"},b.SELECT_ALL={id:"editor.selectAll",category:A,label:"%selection.all%"},b.OPEN_RESOURCE={id:"editor.openUri",category:A},b.OPEN_RESOURCES={id:"editor.openUris",category:A},b.SAVE_URI={id:"editor.saveUri",category:A},b.SAVE_CURRENT={id:"editor.saveCurrent",category:A,label:"%editor.saveCurrent%"},b.FOCUS_IF_NOT_ACTIVATE_ELEMENT={id:"editor.focusIfNotActivateElement",category:A,label:"%editor.saveCurrent%"},b.COMPARE={id:"editor.compare",category:A},b.OPEN_MERGEEDITOR={id:"editor.open.mergeEditor",category:A},b.OPEN_MERGEEDITOR_DEV={id:"editor.open.mergeEditor.dev",category:"Merge Editor (Dev)",label:"Open Merge Editor State from Json"},b.MERGEEDITOR_RESET={id:"editor.mergeEditor.reset",category:A,label:"%mergeEditor.reset%"},b.CLOSE={id:"editor.close",category:A,label:"%editor.closeCurrent%"},b.CLOSE_ALL_IN_GROUP={id:"editor.closeAllInGroup",category:A,label:"%editor.closeAllInGroup%"},b.CLOSE_OTHER_IN_GROUP={id:"editor.closeOtherEditorsInGroup",category:A,label:"%editor.closeOtherEditors%"},b.CLOSE_ALL={id:"editor.closeAll",category:A,label:"%editor.close.all%"},b.CLOSE_SAVED={id:"editor.closeSaved",category:A,label:"%editor.closeSaved%"},b.SAVE_ALL={id:"editor.saveAll",category:A,label:"%editor.saveAll%"},b.CLOSE_TO_RIGHT={id:"editor.closeToRight",category:A,label:"%editor.closeToRight%"},b.GET_CURRENT={id:"editor.getCurrent",category:A},b.GET_CURRENT_RESOURCE={id:"editor.getCurrentResource",category:A},b.SPLIT_TO_LEFT={id:"editor.splitToLeft",category:A,label:"%editor.splitToLeft%"},b.SPLIT_TO_RIGHT={id:"editor.splitToRight",category:A,label:"%editor.splitToRight%"},b.SPLIT_TO_TOP={id:"editor.splitToTop",category:A,label:"%editor.splitToTop%"},b.SPLIT_TO_BOTTOM={id:"editor.splitToBottom",category:A,label:"%editor.splitToBottom%"},b.CHANGE_LANGUAGE={id:"editor.changeLanguage",category:A},b.CHANGE_ENCODING={id:"editor.changeEncoding",category:A},b.GET_ENCODING={id:"editor.getEncoding",category:A},b.CHANGE_EOL={id:"editor.changeEol",category:A},b.NAVIGATE_LEFT={id:"editor.navigateLeft",category:A},b.NAVIGATE_RIGHT={id:"editor.navigateRight",category:A},b.NAVIGATE_UP={id:"editor.navigateUp",category:A},b.NAVIGATE_DOWN={id:"editor.navigateDown",category:A},b.NAVIGATE_NEXT={id:"editor.navigateNext",category:A},b.NAVIGATE_PREVIOUS={id:"editor.navigatePrevious",category:A},b.PREVIOUS={id:"editor.previous",category:A},b.NEXT={id:"editor.next",category:A},b.PREVIOUS_IN_GROUP={id:"editor.previousInGroup",category:A},b.NEXT_IN_GROUP={id:"editor.nextInGroup",category:A},b.LAST_IN_GROUP={id:"editor.lastInGroup",category:A},b.CLOSE_OTHER_GROUPS={id:"editor.closeOtherGroup",category:A,label:"%editor.closeEditorsInOtherGroups%"},b.OPEN_EDITOR_AT_INDEX={id:"editor.openEditorAtIndex",category:A},b.EVEN_EDITOR_GROUPS={id:"editor.evenEditorGroups",category:A,label:"%editor.resetEditorGroups%"},b.REVERT_DOCUMENT={id:"editor.document.revert",category:A,label:"%editor.revert%"},b.REVERT_AND_CLOSE={id:"editor.revertAndClose",category:A},b.GO_FORWARD={id:"editor.goForward",category:A},b.GO_BACK={id:"editor.goBack",category:A},b.PIN_CURRENT={id:"editor.pinCurrent",category:A},b.COPY_CURRENT_PATH={id:"editor.copyCurrentPath",category:A},b.GO_TO_GROUP={id:"editor.goToGroup",category:A},b.MOVE_GROUP={id:"editor.moveGroup",category:A},b.REOPEN_CLOSED={id:"editor.reopenClosed",category:A},b.FOCUS={id:"editor.focus",category:A},b.TEST_TOKENIZE={id:"editor.tokenize.test",category:A,label:"%editor.tokenize.test%"},b.AUTO_SAVE={id:"editor.autoSave",category:A},b.FOCUS_ACTIVE_EDITOR_GROUP={id:"editor.focusActiveEditorGroup",category:A},b.COMPONENT_UNDO={id:"editor.componentUndo",category:A},b.COMPONENT_REDO={id:"editor.componentRedo"},b.SEARCH_WORKSPACE_SYMBOL={id:"editor.workspaceSymbol.quickopen",label:"%editor.workspaceSymbol.quickopen%",category:A},b.SEARCH_WORKSPACE_SYMBOL_CLASS={id:"editor.workspaceSymbolClass.quickopen",label:"%editor.workspaceSymbolClass.quickopen%",category:A},b.GO_TO_LINE={id:"editor.action.gotoLine",label:"%editor.goToLine%",category:A},b.QUICK_OPEN={id:"workbench.action.quickOpen",category:A,label:"%editor.quickOpen%"},b.TOGGLE_WORD_WRAP={id:"editor.toggleWordWrap",label:"%editor.toggleWordWrap%",category:A},b.TOGGLE_COLUMN_SELECTION={id:"editor.action.toggleColumnSelection",label:"%editor.action.toggleColumnSelection%",category:A},b.FORMAT_DOCUMENT={id:"editor.action.formatDocument",category:A},b.FORMAT_SELECTION={id:"editor.action.formatSelection",category:A},b.FORMAT_DOCUMENT_WITH={id:"editor.action.formatDocument.multiple",category:A,label:"%editor.formatDocument.label.multiple%"},b.FORMAT_SELECTION_WITH={id:"editor.action.formatSelection.multiple",category:A,label:"%editor.formatSelection.label.multiple%"},b.COPY_PATH={id:"editor.action.copyPath",category:A,label:"%editor.copyPath%"},b.COPY_RELATIVE_PATH={id:"editor.action.copyRelativePath",category:A,label:"%editor.copyRelativePath%"}})(v||(t.EDITOR_COMMANDS=v={}));var _;(function(b){const A="diff-editor";b.REVERT={id:"editor.diff.revert",category:A},b.ACCEPT={id:"editor.diff.accept",category:A},b.TOGGLE_COLLAPSE_UNCHANGED_REGIONS={id:"editor.diff.toggleCollapseUnchangedRegions",category:A}})(_||(t.DIFF_EDITOR_COMMANDS=_={}));var m;(function(b){const A="multi-diff-editor";b.COLLAPSE_FILES={id:"editor.diff.collapseFiles",category:A},b.EXPAND_FILES={id:"editor.diff.expandFiles",category:A}})(m||(t.MULTI_DIFF_EDITOR_COMMANDS=m={}));var p;(function(b){const A="search";b.OPEN_SEARCH={id:"content-search.openSearch",category:A,label:"Open search sidebar"},b.REFRESH={id:"file-search.refresh",label:"refresh search",iconClass:(0,n.getIcon)("refresh"),category:A},b.CLEAN={id:"file-search.clean",label:"clean search",iconClass:(0,n.getIcon)("clear"),category:A},b.GET_RECENT_SEARCH_WORD={id:"search.getRecentSearchWordCmd",category:A},b.GET_BACK_RECENT_SEARCH_WORD={id:"search.getBackRecentSearchWordCmd",category:A},b.MENU_REPLACE={id:"search.menu.replace",category:A,label:"%search.replace.title%"},b.MENU_REPLACE_ALL={id:"search.menu.replaceAll",category:A,label:"%search.replaceAll.label%"},b.MENU_HIDE={id:"search.menu.hide",category:A,label:"%search.result.hide%"},b.MENU_COPY={id:"search.menu.copy",category:A,label:"%file.copy.file%"},b.MENU_COPY_ALL={id:"search.menu.copyAll",category:A,label:"%search.menu.copyAll%"},b.MENU_COPY_PATH={id:"search.menu.copyPath",category:A,label:"%file.copy.path%"},b.REPLACE={id:"search.replace",category:A},b.CLOSE={id:"search.close",category:A}})(p||(t.SEARCH_COMMANDS=p={}));var s;(function(b){const A="outline";b.OUTLINE_COLLAPSE_ALL={id:"outline.collapse.all",category:A},b.OUTLINE_FOLLOW_CURSOR={id:"outline.follow.cursor",category:A},b.OUTLINE_SORT_KIND={id:"outline.sort.kind",category:A},b.OUTLINE_SORT_NAME={id:"outline.sort.name",category:A},b.OUTLINE_SORT_POSITION={id:"outline.sort.position",category:A}})(s||(t.OUTLINE_COMMANDS=s={}));var h;(function(b){const A="workspace";b.ADD_WORKSPACE_FOLDER={id:"workspace.addFolderToWorkspace",label:"%workspace.addFolderToWorkspace%",category:A},b.REMOVE_WORKSPACE_FOLDER={id:"workspace.removeFolderFromWorkspace",label:"%workspace.removeFolderFromWorkspace%",category:A},b.SAVE_WORKSPACE_AS_FILE={id:"workspace.saveWorkspaceAsFile",label:"%workspace.saveWorkspaceAsFile%",category:A}})(h||(t.WORKSPACE_COMMANDS=h={}));var a;(function(b){const A="keyboard";b.CHOOSE_KEYBOARD_LAYOUT={id:"keyboard.chooseKeyboardLayout",label:"%keyboard.chooseKeyboardLayout%",category:A}})(a||(t.KEYBOARD_COMMANDS=a={}));var g;(function(b){const A="dialog";b.ENSURE={id:"dialog.ensure",category:A}})(g||(t.DIALOG_COMMANDS=g={}));var d;(function(b){b.CATEGORY="%terminal.name%",b.FOCUS_NEXT_TERMINAL={id:"workbench.action.terminal.focusNextPane",label:"%terminal.focusNext.inTerminalGroup%",category:b.CATEGORY},b.FOCUS_PREVIOUS_TERMINAL={id:"workbench.action.terminal.focusPreviousPane",label:"%terminal.focusPrevious.inTerminalGroup%",category:b.CATEGORY},b.SPLIT={id:"terminal.split",label:"%terminal.split%",category:b.CATEGORY},b.ADD={id:"terminal.add",label:"%terminal.new%",category:b.CATEGORY},b.REMOVE={id:"terminal.remove",label:"%terminal.remove%",category:b.CATEGORY},b.CLEAR={id:"terminal.clear",label:"%terminal.clear%",category:b.CATEGORY},b.OPEN_SEARCH={id:"terminal.search",label:"%terminal.search%",category:b.CATEGORY},b.SEARCH_NEXT={id:"terminal.search.next",label:"%terminal.search.next%",category:b.CATEGORY},b.OPEN_WITH_PATH={id:"terminal.openWithPath",category:b.CATEGORY},b.CLEAR_CONTENT={id:"terminal.clearContent",label:"%terminal.menu.clearCurrentContent%",category:b.CATEGORY},b.CLEAR_ALL_CONTENT={id:"terminal.clearAllContent",label:"%terminal.menu.clearAllContents%",category:b.CATEGORY},b.TAB_RENAME={id:"terminal.tabRename",category:b.CATEGORY},b.SELECT_ALL_CONTENT={id:"terminal.selectAllContent",label:"%terminal.menu.selectAllContent%",category:b.CATEGORY},b.MORE_SETTINGS={id:"terminal.moreSettings",label:"%terminal.menu.moreSettings%",category:b.CATEGORY},b.SELECT_TYPE={id:"terminal.selectType",category:b.CATEGORY},b.SELECT_ZSH={id:"terminal.selectTypeZsh",label:"zsh",category:b.CATEGORY},b.SELECT_BASH={id:"terminal.selectTypeBash",label:"bash",category:b.CATEGORY},b.SELECT_SH={id:"terminal.selectTypeSh",label:"sh",category:b.CATEGORY},b.SELECT_CMD={id:"terminal.selectTypeCMD",label:"cmd",category:b.CATEGORY},b.SELECT_POWERSHELL={id:"terminal.selectTypePowerShell",label:"powershell",category:b.CATEGORY},b.COPY={id:"terminal.copy",label:"%edit.copy%",category:b.CATEGORY},b.PASTE={id:"terminal.paste",label:"%edit.paste%",category:b.CATEGORY},b.SELECT_ALL={id:"terminal.selectAll",label:"%terminal.menu.selectCurrentContent%",category:b.CATEGORY},b.RE_LAUNCH={id:"terminal.relaunch",category:b.CATEGORY},b.TOGGLE_TERMINAL={id:"terminal.toggleTerminal",label:"%terminal.toggleTerminal%",category:b.CATEGORY},b.KILL_PROCESS={id:"terminal.killProcess",label:"%terminal.killProcess%",category:b.CATEGORY}})(d||(t.TERMINAL_COMMANDS=d={}));var u;(function(b){const A="view";b.QUICK_OPEN_VIEW={id:"layout.action.quickOpenView",category:A},b.OPEN_VIEW={id:"layout.action.openView",label:"%layout.action.openView%",category:A},b.MAXIMIZE_EDITOR={id:"layout.action.Maximizeeditor",category:A},b.TOGGLE_SIDEBAR_VISIBILITY={id:"main-layout.view.toggle",category:A}})(u||(t.LAYOUT_COMMANDS=u={}));var E;(function(b){const A="marker";b.SHOW_ERRORS_WARNINGS={id:"marker.action.showErrorsWarnings",category:A},b.TOGGLE_SHOW_ERRORS_WARNINGS={id:"marker.action.toggleShowErrorsWarnings",category:A}})(E||(t.MARKER_COMMANDS=E={}));var f;(function(b){b.OPEN={id:"editor.action.quickCommand"},b.OPEN_OUTLINE={id:"editor.action.quickOutline"},b.OPEN_VIEW={id:"editor.action.quickView"},b.OPEN_WITH_COMMAND={id:"editor.action.quickCommand.withCommand"}})(f||(t.QUICK_OPEN_COMMANDS=f={}));var c;(function(b){const A="SCM";b.GetSCMResource={id:"scm.getResource",category:A},b._GIT_OPEN_MERGE_EDITOR={id:"_git.openMergeEditor"},b.GIT_OPEN_MERGE_EDITOR={id:"git.openMergeEditor"}})(c||(t.SCM_COMMANDS=c={}));var y;(function(b){const A="MergeConflict";b.AI_ACCEPT={id:"merge-conflict.ai.accept",category:A},b.ALL_RESET={id:"merge-conflict.ai.all-reset",category:A},b.AI_ALL_ACCEPT={id:"merge-conflict.ai.all-accept",category:A},b.AI_ALL_ACCEPT_STOP={id:"merge-conflict.ai.all-accept-stop",category:A}})(y||(t.MERGE_CONFLICT_COMMANDS=y={}))},22780:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonContribution=t.locationProtocolContextKey=t.inputFocusedContextKey=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(43718),v=e(53736),_=e(18193),m=e(22366),p=e(41118),s=e(1149),h=e(64102),a=e(39496),g=e(78132),d=e(11050),u=e(14109),E=e(66549);t.inputFocusedContextKey="inputFocus",t.locationProtocolContextKey="locationProtocol";let f=class{constructor(){this.schema=_.corePreferenceSchema;const y={"application.supportsOpenFolder":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"application.supportsOpenWorkspace":!!this.appConfig.isElectronRenderer&&!this.appConfig.isRemote,"debug.toolbar.top":this.appConfig.isElectronRenderer?0:this.layoutViewSize.menubarHeight},b=Object.keys(this.schema.properties);for(const A of b)this.schema.properties[A].default=y[A]||this.schema.properties[A].default}onStart(){this.contextKeyService.createKey(t.locationProtocolContextKey,window.location.protocol.split(":")[0]),this.inputFocusedContext=this.contextKeyService.createKey(t.inputFocusedContextKey,!1),window.addEventListener("focusin",this.updateInputContextKeys.bind(this))}onStop(){window.removeEventListener("focusin",this.updateInputContextKeys.bind(this))}activeElementIsInput(){return!!document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.tagName==="TEXTAREA")}updateInputContextKeys(){const y=this.activeElementIsInput();if(this.inputFocusedContext.set(y),y){const b=(0,m.trackFocus)(document.activeElement);l.Event.once(b.onDidBlur)(()=>{this.inputFocusedContext.set(this.activeElementIsInput()),b.dispose()})}}registerCommands(y){y.registerCommand(u.EDITOR_COMMANDS.UNDO),y.registerCommand(u.EDITOR_COMMANDS.REDO),y.registerCommand(u.EDITOR_COMMANDS.SELECT_ALL),y.registerCommand(u.COMMON_COMMANDS.ABOUT_COMMAND,{execute:()=>{alert((0,l.replaceLocalizePlaceholder)(this.appConfig.appName))}})}registerMenus(y){y.registerMenubarItem(a.MenuId.MenubarFileMenu,{label:(0,l.localize)("menu-bar.title.file"),order:1,iconClass:(0,o.getIcon)("menubar-file")}),y.registerMenubarItem(a.MenuId.MenubarEditMenu,{label:(0,l.localize)("menu-bar.title.edit"),order:2,iconClass:(0,o.getIcon)("menubar-edit")}),y.registerMenubarItem(a.MenuId.MenubarSelectionMenu,{label:(0,l.localize)("menu-bar.title.selection"),order:3,iconClass:(0,o.getIcon)("menubar-selection")}),y.registerMenubarItem(a.MenuId.MenubarViewMenu,{label:(0,l.localize)("menu-bar.title.view"),order:4,iconClass:(0,o.getIcon)("menubar-view")}),y.registerMenubarItem(a.MenuId.MenubarGoMenu,{label:(0,l.localize)("menu-bar.title.go"),order:5,iconClass:(0,o.getIcon)("menubar-go")}),y.registerMenubarItem(a.MenuId.MenubarTerminalMenu,{label:(0,l.localize)("menu-bar.title.terminal"),order:5,iconClass:(0,o.getIcon)("terminal")}),y.registerMenubarItem(a.MenuId.MenubarHelpMenu,{label:(0,l.localize)("menu-bar.title.help"),order:999,iconClass:(0,o.getIcon)("question-circle")}),y.registerMenuItems(a.MenuId.MenubarFileMenu,[{command:u.FILE_COMMANDS.OPEN_FOLDER.id,group:"1_open",when:"config.application.supportsOpenFolder"},{command:u.FILE_COMMANDS.OPEN_WORKSPACE.id,group:"1_open",when:"config.application.supportsOpenWorkspace"},{command:u.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:u.WORKSPACE_COMMANDS.SAVE_WORKSPACE_AS_FILE.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:u.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,group:"2_new"},{command:{id:u.EDITOR_COMMANDS.SAVE_CURRENT.id,label:(0,l.localize)("file.save")},group:"3_save"},{command:{id:u.EDITOR_COMMANDS.SAVE_ALL.id,label:(0,l.localize)("file.saveAll")},group:"3_save"},{command:{id:u.EDITOR_COMMANDS.AUTO_SAVE.id,label:(0,l.localize)("file.autoSave")},toggledWhen:"config.editor.autoSave != off",group:"4_autosave"}]),y.registerMenuItems(a.MenuId.MenubarGoMenu,[{command:{id:u.EDITOR_COMMANDS.GO_BACK.id,label:(0,l.localize)("editor.goBack")},group:"1_go"},{command:{id:u.EDITOR_COMMANDS.GO_FORWARD.id,label:(0,l.localize)("editor.goForward")},group:"1_go"},{command:{id:u.EDITOR_COMMANDS.QUICK_OPEN.id,label:(0,l.localize)("editor.quickOpen")},group:"2_go_file"},{command:{id:u.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,label:(0,l.localize)("editor.workspaceSymbol.quickopen")},group:"2_go_file"},{command:{id:u.EDITOR_COMMANDS.GO_TO_LINE.id,label:(0,l.localize)("editor.goToLine")},group:"3_go_infile"},{command:{id:"editor.action.jumpToBracket",label:(0,l.localize)("menu-bar.go.jumpToBracket")},group:"3_go_infile"},{command:{id:"editor.action.marker.nextInFiles",label:(0,l.localize)("menu-bar.go.nextProblemInFiles")},group:"6_go_problem"},{command:{id:"editor.action.marker.prevInFiles",label:(0,l.localize)("menu-bar.go.prevProblemInFiles")},group:"6_go_problem"}]),y.registerMenuItems(a.MenuId.MenubarTerminalMenu,[{command:{id:u.TERMINAL_COMMANDS.ADD.id,label:u.TERMINAL_COMMANDS.ADD.label},group:"1_terminal"},{command:{id:u.TERMINAL_COMMANDS.SPLIT.id,label:u.TERMINAL_COMMANDS.SPLIT.label},group:"1_terminal"}])}registerKeybindings(y){y.registerKeybinding({command:u.EDITOR_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:"editorFocus"}),y.registerKeybinding({command:u.EDITOR_COMMANDS.UNDO.id,keybinding:"ctrlcmd+z",when:"editorFocus"}),y.registerKeybinding({command:u.EDITOR_COMMANDS.REDO.id,keybinding:"ctrlcmd+shift+z",when:"editorFocus"})}};t.ClientCommonContribution=f,n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],f.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(v.IContextKeyService),n.__metadata("design:type",Object)],f.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(d.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(s.LayoutViewSizeConfig),n.__metadata("design:type",s.LayoutViewSizeConfig)],f.prototype,"layoutViewSize",void 0),t.ClientCommonContribution=f=n.__decorate([(0,l.Domain)(l.CommandContribution,E.ClientAppContribution,g.PreferenceContribution,h.MenuContribution,p.KeybindingContribution),n.__metadata("design:paramtypes",[])],f)},66549:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContribution=void 0,t.ClientAppContribution=Symbol("ClientAppContribution")},34505:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonModule=void 0;const n=e(85608),r=e(76003),o=e(16908),l=e(43718),v=e(37638),_=e(36206),m=e(136),p=e(90697),s=e(45829),h=e(44867),a=e(22780),g=e(10797),d=e(17821);let u=class extends _.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[p.OpenerContribution],this.providers=[a.ClientCommonContribution,h.DefaultOpenerContribution,h.OpenerContributionClient,v.AuthenticationContribution,m.HashCalculateContribution],this.electronProviders=[g.ClientElectronCommonContribution,s.ElectronOpenerContributionClient],this.webProviders=[d.ClientWebCommonContribution],this.backServices=[{servicePath:l.CommonServerPath,protocol:o.CommonServerProtocol},{servicePath:l.KeytarServicePath},{servicePath:l.CryptoServicePath}]}};t.ClientCommonModule=u,t.ClientCommonModule=u=n.__decorate([(0,r.Injectable)()],u)},98881:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecentStorage=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class{async getScopeStorage(){return this.recentStorage=this.recentStorage||await this.getStorage(o.STORAGE_NAMESPACE.RECENT_DATA),this.recentStorage}async getGlobalStorage(){return this.recentGlobalStorage=this.recentGlobalStorage||await this.getStorage(o.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA),this.recentGlobalStorage}};t.RecentStorage=l,n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],l.prototype,"getStorage",void 0),t.RecentStorage=l=n.__decorate([(0,r.Injectable)()],l)},30144:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_CONTAINER_ID=t.SCM_CONTAINER_ID=t.SEARCH_CONTAINER_ID=t.EXPLORER_CONTAINER_ID=t.DEBUG_CONTAINER_ID=t.TEST_RESULT_CONTAINER_ID=t.DEBUG_CONSOLE_CONTAINER_ID=t.TERMINAL_CONTAINER_ID=t.OUTPUT_CONTAINER_ID=t.MARKER_CONTAINER_ID=void 0,t.MARKER_CONTAINER_ID="markers",t.OUTPUT_CONTAINER_ID="output",t.TERMINAL_CONTAINER_ID="terminal",t.DEBUG_CONSOLE_CONTAINER_ID="debug-console",t.TEST_RESULT_CONTAINER_ID="test-result",t.DEBUG_CONTAINER_ID="debug",t.EXPLORER_CONTAINER_ID="explorer",t.SEARCH_CONTAINER_ID="search",t.SCM_CONTAINER_ID="scm",t.EXTENSION_CONTAINER_ID="extension"},10797:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientElectronCommonContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(64102),v=e(39496),_=e(11050);let m=class{registerMenus(s){s.registerMenubarItem(v.MenuId.MenubarAppMenu,{label:(0,o.localize)("app.name",this.appConfig.appName),order:0}),s.registerMenuItems(v.MenuId.MenubarEditMenu,[{command:{id:"electron.undo",label:(0,o.localize)("editor.undo")},nativeRole:"undo",group:"1_undo"},{command:{id:"electron.redo",label:(0,o.localize)("editor.redo")},group:"1_undo",nativeRole:"redo"},{command:{label:(0,o.localize)("edit.cut"),id:"electron.cut"},nativeRole:"cut",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.copy"),id:"electron.copy"},nativeRole:"copy",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.paste"),id:"electron.paste"},nativeRole:"paste",group:"2_clipboard"},{command:{label:(0,o.localize)("edit.selectAll"),id:"electron.selectAll"},nativeRole:"selectAll",group:"2_clipboard"}]),s.registerMenuItems(v.MenuId.MenubarAppMenu,[{command:{id:"electron.quit",label:(0,o.localize)("app.quit")},nativeRole:"quit",group:"4_quit"}])}};t.ClientElectronCommonContribution=m,n.__decorate([(0,r.Autowired)(_.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.ClientElectronCommonContribution=m=n.__decorate([(0,o.Domain)(l.MenuContribution)],m)},66963:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(14109),t),n.__exportStar(e(34505),t),n.__exportStar(e(66549),t),n.__exportStar(e(98881),t)},17821:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientWebCommonContribution=void 0;const n=e(85608),r=e(43718),o=e(64102),l=e(39496),v=e(14109);let _=class{registerMenus(p){p.registerMenuItems(l.MenuId.MenubarEditMenu,[{command:v.EDITOR_COMMANDS.REDO.id,group:"1_undo"},{command:v.EDITOR_COMMANDS.UNDO.id,group:"1_undo"}]),p.registerMenuItem(l.MenuId.MenubarHelpMenu,{command:{id:v.COMMON_COMMANDS.ABOUT_COMMAND.id,label:v.COMMON_COMMANDS.ABOUT_COMMAND.label},nativeRole:"about",group:"0_about"})}};t.ClientWebCommonContribution=_,t.ClientWebCommonContribution=_=n.__decorate([(0,r.Domain)(o.MenuContribution)],_)},25918:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleActionList=t.InlineActionWidget=t.MenuActionList=void 0,t.InlineActionBar=c,t.InlineMenuBar=y;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),v=e(45803),_=e(43718),m=e(93899),p=e(48560),s=e(79951),h=e(55693),a=n.__importDefault(e(17647)),g=n.__importDefault(e(54859)),d=({data:b,hasSubmenu:A,disabled:S,iconService:w,hasChecked:I})=>o.default.createElement("div",{className:(0,r.default)(g.default.menuAction,{[g.default.disabled]:S,[g.default.checked]:b.checked})},o.default.createElement("div",{className:(0,r.default)({[g.default.icon]:I})},b.checked?o.default.createElement(l.Icon,{icon:"check"}):null),o.default.createElement("div",{className:g.default.label},b.label?(0,s.transformLabelWithCodicon)(_.strings.mnemonicButtonLabel(b.label,!0),{margin:"0 3px"},w?.fromString.bind(w)):""),o.default.createElement("div",{className:g.default.tip},b.keybinding?o.default.createElement("div",{className:g.default.shortcut},b.keybinding):null,A?o.default.createElement("div",{className:g.default.submenuIcon},o.default.createElement(l.Icon,{icon:"right"})):null,!b.keybinding&&!A&&b.extraDesc&&o.default.createElement("div",{className:g.default.extraDesc},b.extraDesc))),u=({data:b=[],context:A=[],afterClick:S,style:w,iconService:I,renderSubMenuTitle:D,renderMenuItem:T})=>{if(!b.length)return null;const R=o.default.useCallback(k=>{const{key:F,item:L}=k;if([m.SeparatorMenuItemNode.ID,m.SubmenuItemNode.ID].includes(F))return;const U=(Array.isArray(L.props.children)?L.props.children[0]:L.props.children).props.data;U&&(typeof U.execute=="function"&&U.execute(A),typeof S=="function"&&S(U))},[b,A]),M=o.default.useCallback((k,F)=>{if(D){const L=D(k,{hasSubmenu:!0,disabled:!1});if(L)return L}return o.default.createElement(d,{hasChecked:F,hasSubmenu:!0,data:k,iconService:I})},[D]),O=o.default.useCallback((k,F)=>{if(T){const L=T(k,{hasSubmenu:!1,disabled:k.disabled});if(L)return L}return o.default.createElement(d,{hasChecked:F,data:k,disabled:k.disabled,iconService:I})},[T]),x=o.default.useCallback(k=>{const F=k.some(L=>L.checked);return k.map((L,N)=>{if(L.id===m.SeparatorMenuItemNode.ID)return null;const U=k[N+1]&&k[N+1].id===m.SeparatorMenuItemNode.ID;return L.id===m.SubmenuItemNode.ID?!Array.isArray(L.children)||!L.children.length?null:o.default.createElement(o.default.Fragment,{key:`${L.id}-${L.submenuId}-${N}`},o.default.createElement(v.Menu.SubMenu,{key:`${L.id}-${L.submenuId}-${N}`,className:g.default.submenuItem,popupClassName:"kt-menu",title:M(L,F)},x(L.children)),U?o.default.createElement(v.Menu.Divider,{key:`divider-${N}`,className:g.default.menuItemDivider}):null):o.default.createElement(o.default.Fragment,{key:`${L.id}-${N}`},o.default.createElement(v.Menu.Item,{id:`${L.id}-${N}`,key:`${L.id}-${N}`,className:g.default.menuItem,disabled:L.disabled},O(L,F)),U?o.default.createElement(v.Menu.Divider,{key:`divider-${N}`,className:g.default.menuItemDivider}):null)})},[]);return o.default.createElement(v.Menu,{className:"kt-menu",selectable:!1,motion:{motionLeave:!1,motionEnter:!1},builtinPlacements:a.default,onClick:R,style:w},x(b))};t.MenuActionList=u;const E=({type:b,icon:A,disabled:S,onClick:w,title:I})=>{const D=(0,h.useDesignStyles)(g.default.btnAction,"btnAction");if(b==="icon")return o.default.createElement(l.Button,{size:"small",type:b,className:D,onClick:w,title:I,icon:A||"ellipsis"});const T={};return(0,_.isBoolean)(S)&&(T.disabled=S),o.default.createElement(l.Button,{size:"small",type:"secondary",className:D,onClick:w,...T,title:I},o.default.createElement(l.Icon,{icon:A||"ellipsis"}))};E.displayName="EllipsisWidget",t.InlineActionWidget=o.default.memo(({iconService:b,type:A="icon",data:S,context:w=[],className:I,afterClick:D,...T})=>{const R=(0,h.useDesignStyles)(g.default.iconAction,"iconAction"),M=(0,h.useDesignStyles)(g.default.btnAction,"btnAction"),[O,x]=(0,o.useState)(!1),k=o.default.useCallback(async(U,...W)=>{if(U&&(U.preventDefault(),U.stopPropagation()),!O){if(x(!0),S.id===m.SubmenuItemNode.ID&&U){const j={x:U.clientX,y:U.clientY};await S.execute([j,...w])}else typeof S.execute=="function"&&await S.execute([...w,...W]);x(!1),typeof D=="function"&&D()}},[S,w]),[F,L]=o.default.useMemo(()=>{let U=S.tooltip||S.label;const W=S.label;return S.keybinding&&(U=`${U} (${S.keybinding})`),[U,W]},[S]),N=S.id===m.SubmenuItemNode.ID;return A==="icon"&&!S.type?o.default.createElement(l.Button,{type:S.icon?"icon":"link",className:(0,r.default)(R,I,{[g.default.disabled]:S.disabled,[g.default.submenuIconAction]:N}),title:F,iconClass:S.icon,onClick:k,...T},!S.icon&&L):S.type==="checkbox"?o.default.createElement(l.CheckBox,{className:(0,r.default)(I,M),disabled:S.disabled,label:S.label,title:F,checked:S.checked,onChange:U=>k(void 0,U.target.checked),...T}):o.default.createElement(l.Button,{loading:O,showLoadingIcon:!1,className:(0,r.default)(I,M),disabled:S.disabled,onClick:k,size:"small",type:S.type,title:F,...T},(0,s.transformLabelWithCodicon)(L,{margin:"0 3px"},b?.fromString.bind(b)),N&&o.default.createElement(l.Icon,{icon:"down",className:"kt-button-secondary-more"}))}),t.InlineActionWidget.displayName="InlineAction";const f=({data:b,context:A})=>{const S=o.default.useCallback(()=>b.getExecuteArgs(A),[b,A]);return o.default.createElement(b.component,{getExecuteArgs:S})};f.displayName="CustomAction",t.TitleActionList=o.default.memo(({type:b="icon",nav:A=[],more:S=[],moreIcon:w,moreTitle:I,context:D=[],extraNavActions:T=[],moreAtFirst:R=!1,className:M,afterClick:O,menuId:x,iconService:k,regroup:F=(...L)=>L})=>{const L=(0,p.useInjectable)(m.ICtxMenuRenderer),N=(0,p.useInjectable)(m.AbstractMenuService),U=(0,h.useDesignStyles)(g.default.titleActions,"titleActions"),[W,j]=F(A,S),Q=o.default.useCallback(X=>{X.preventDefault(),X.stopPropagation(),j&&L.show({anchor:{x:X.clientX,y:X.clientY},menuNodes:j,args:D,onHide:O})},[j,D]);if(W.length===0&&j.length===0&&T.length===0)return null;const G=j.length>0?o.default.createElement(E,{disabled:j[0].disabled,icon:w,type:b,onClick:Q,title:I}):null;return o.default.createElement("div",{className:(0,r.default)([U,M]),"data-menu-id":x},R&&G,W.map(X=>{if(X.id===m.ComponentMenuItemNode.ID)return o.default.createElement(f,{context:D,data:X,key:X.nodeId});if(X.id===m.SubmenuItemNode.ID){const V=N.createMenu(X.submenuId);if(!((0,m.generateMergedCtxMenu)({menus:V}).length>0))return}if(X.id===m.SeparatorMenuItemNode.ID)return o.default.createElement("span",{key:`vertical-divider-${X.id}`,className:g.default.verticalDivider});const $=X.id===m.SubmenuItemNode.ID?X.submenuId:X.id;return o.default.createElement(t.InlineActionWidget,{id:$,key:$,className:(0,r.default)({[g.default.selected]:X.checked}),type:b,data:X,afterClick:O,context:D,iconService:k})}),Array.isArray(T)&&T.length?o.default.createElement(o.default.Fragment,null,W.length&&o.default.createElement("span",{className:g.default.divider}),T):null,!R&&G)}),t.TitleActionList.displayName="TitleActionList";function c(b){const{menus:A,context:S,separator:w="navigation",debounce:I,isFlattenMenu:D=!1,...T}=b,[R,M]=(0,h.useMenus)(A,w,S,I),O=(0,o.useMemo)(()=>D?[...R,...M]:R,[R,M,D]);return o.default.createElement(t.TitleActionList,{menuId:A.menuId,nav:O,more:w==="inline"||D?[]:M,...T})}function y(b){const{iconService:A,menus:S,context:w,moreIcon:I,moreTitle:D,separator:T="navigation",...R}=b,[M,O]=(0,h.useContextMenus)(S);return o.default.createElement(t.TitleActionList,{menuId:S.menuId,nav:M,more:T==="inline"?[]:O,moreIcon:I,moreTitle:D,context:w,iconService:A,...R})}y.displayName="InlineMenuBar"},17647:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placements=void 0;const e={adjustX:1,adjustY:1},n=[0,0];t.placements={topLeft:{points:["bl","tl"],overflow:e,offset:[0,-4],targetOffset:n},topCenter:{points:["bc","tc"],overflow:e,offset:[0,-4],targetOffset:n},topRight:{points:["br","tr"],overflow:e,offset:[0,-4],targetOffset:n},bottomLeft:{points:["tl","bl"],overflow:e,offset:[0,4],targetOffset:n},bottomCenter:{points:["tc","bc"],overflow:e,offset:[0,4],targetOffset:n},bottomRight:{points:["tr","br"],overflow:e,offset:[0,4],targetOffset:n}},t.default=t.placements},89847:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIAction=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(43718),v=e(70650),_=e(22689),m=e(48560),p=e(57995),s=e(24951),h=e(49716),a=e(52141),g=n.__importDefault(e(27410)),d=(0,_.createLayoutEventType)(l.AIInlineChatContentWidgetId),u=new CustomEvent(d,{bubbles:!0}),E=f=>{const{operationList:c,moreOperation:y,showClose:b=!0,onClickItem:A,onClose:S,customOperationRender:w,loading:I,loadingShowOperation:D=!1}=f,T=o.default.useRef(null),[R,M]=(0,m.useHover)(),O=(0,m.useInjectable)(v.AINativeConfigService),x=(0,o.useCallback)(()=>{S?.()},[S]);(0,m.useChange)(M,()=>{var N;(N=T.current)===null||N===void 0||N.dispatchEvent(u)});const k=(0,o.useMemo)(()=>{const N=O?.inlineChat.logo;return typeof N=="string"?o.default.createElement("img",{src:N,className:g.default.ai_action_icon}):o.default.isValidElement(N)?N:typeof N=="function"?o.default.createElement(N,null):null},[O?.inlineChat.logo]),F=(0,o.useCallback)(()=>I&&D?o.default.createElement("div",{className:g.default.loading_mask}):null,[I,D]),L=(0,o.useCallback)(()=>{if(I&&!D)return null;const N=o.default.createElement(o.default.Fragment,null,c?.map(({name:U,title:W,id:j},Q)=>W?o.default.createElement(a.EnhancePopover,{id:j,title:W,key:`popover_${Q}`},o.default.createElement(p.EnhanceIcon,{wrapperClassName:g.default.operate_item,onClick:()=>A?.(j)},o.default.createElement("span",{key:Q},U))):o.default.createElement(p.EnhanceIcon,{wrapperClassName:g.default.operate_item,onClick:()=>A?.(j),key:Q},o.default.createElement("span",null,U))),y?.length?o.default.createElement(p.EnhanceIconWithCtxMenu,{icon:"more",menuNodes:y,wrapperClassName:g.default.operate_btn,skew:{x:-83,y:5}}):null);return o.default.createElement("div",{ref:R,className:g.default.operate_container},F(),k&&o.default.createElement(s.LineVertical,{height:"100%",margin:"0 8px",maxHeight:14,minHeight:14}),w?o.default.createElement("div",{className:g.default.custom_operation_wrapper},w):o.default.createElement("div",{className:g.default.default_operation_wrapper},N))},[w,c,y,I,D,k]);return o.default.createElement("div",{ref:T,className:(0,r.default)(g.default.ai_action_wrapper,I&&g.default.loading,D&&g.default.loading_show_operation)},o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:g.default.stable_container},I?o.default.createElement(a.EnhancePopover,{id:"inline_chat_loading",title:(0,l.localize)("aiNative.inline.chat.operate.loading.cancel")},o.default.createElement(h.Loading,{className:g.default.loading_icon})):k?o.default.createElement("div",{className:g.default.logo_container},k):null),L(),b&&o.default.createElement("div",{className:g.default.close_container},o.default.createElement(s.LineVertical,{height:"100%",margin:"0px 8px",maxHeight:14,minHeight:14}),o.default.createElement(p.EnhanceIcon,{wrapperClassName:g.default.operate_btn,icon:"window-close",onClick:x}))))};t.AIAction=E},66205:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContentWidgetContainerPanel=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(41771)),l=v=>r.default.createElement("div",{className:o.default.inline_chat_container_panel,style:v.style},v.children);t.ContentWidgetContainerPanel=l},57995:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AILogoAvatar=t.EnhanceIconWithCtxMenu=t.EnhanceIcon=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(43718),v=e(81878),_=e(97222),m=e(48560),p=n.__importDefault(e(42798));t.EnhanceIcon=o.default.forwardRef((a,g)=>o.default.createElement("div",{className:(0,r.default)(a.wrapperClassName,p.default.ai_enhance_icon),style:a.wrapperStyle,onClick:a.onClick,ref:g,tabIndex:a.tabIndex,role:a.role,"aria-label":a.ariaLabel,"aria-pressed":a.ariaPressed},o.default.createElement(v.Icon,{className:(0,r.default)(a.className,p.default.icon),children:null,onClick:()=>null,style:(a.icon||a.iconClass)&&a.children?{marginRight:5}:{},icon:a.icon,iconClass:a.iconClass}),a.children&&o.default.createElement("span",{className:p.default.children_wrap},a.children)));const s=a=>{const{children:g,menuNodes:d,skew:u,id:E,...f}=a,c=(0,m.useInjectable)(l.CommandService),y=(0,m.useInjectable)(_.IBrowserCtxMenu),[b,A]=o.default.useState(void 0),S=o.default.useRef(null);o.default.useEffect(()=>{w()},[S.current,u]);const w=(0,o.useCallback)(D=>{requestAnimationFrame(()=>{if(S.current){const T=S.current.getBoundingClientRect(),{x:R,y:M,width:O,height:x}=T,k={x:R+O,y:M+x};u&&(k.x+=u.x,k.y+=u.y),A(k),D&&D(k)}})},[S.current,u]),I=o.default.useCallback(()=>{b&&(d?w(D=>{y.show({anchor:D,menuNodes:d})}):E&&c.executeCommand(E))},[S.current,d,b,E]);return o.default.createElement(t.EnhanceIcon,{ref:S,onClick:I,...f},g)};t.EnhanceIconWithCtxMenu=s;const h=a=>o.default.createElement("div",{className:(0,r.default)(p.default.ai_logo_avatar_container,a.className)},o.default.createElement(v.Icon,{icon:"magic-wand",className:(0,r.default)(a.iconClassName,p.default.avatar_icon)}));t.AILogoAvatar=h},89195:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(89847),t),n.__exportStar(e(57995),t),n.__exportStar(e(28229),t),n.__exportStar(e(24951),t),n.__exportStar(e(52141),t),n.__exportStar(e(75777),t),n.__exportStar(e(49716),t),n.__exportStar(e(83913),t)},28229:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIInlineResult=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(57995),v=e(24951),_=e(75777),m=n.__importDefault(e(5011)),p=s=>{const{iconItems:h,isRenderThumbs:a=!0,isRenderClose:g=!1,closeClick:d}=s;return o.default.createElement("div",{className:m.default.ai_inline_result_panel},o.default.createElement("div",{className:m.default.side},h.map(({icon:u,text:E,onClick:f,btnType:c},y)=>o.default.createElement(l.EnhanceIcon,{wrapperClassName:(0,r.default)(m.default.operate_btn,c==="default"?m.default.default:""),icon:u,onClick:f,key:y},o.default.createElement("span",null,E)))),a&&o.default.createElement(o.default.Fragment,null,o.default.createElement(v.LineVertical,{height:"60%",margin:"0px 6px 0 6px"}),o.default.createElement("div",{className:m.default.side},o.default.createElement(_.Thumbs,{wrapperClassName:m.default.operate_icon}))),g&&o.default.createElement(o.default.Fragment,null,o.default.createElement(l.EnhanceIcon,{wrapperClassName:m.default.operate_btn,icon:"close",onClick:d})))};t.AIInlineResult=p},83913:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InteractiveInput=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),v=e(43718),_=e(37015),m=e(48560),p=e(7369),s=e(89195),h=n.__importDefault(e(42348)),a=160,g=32,d="ai-native-chat-input-history",u=10;t.InteractiveInput=o.default.forwardRef((E,f)=>{const{placeholder:c,onKeyDown:y,onBlur:b,onValueChange:A,onHeightChange:S,onFocus:w,onSend:I,onStop:D,disabled:T=!1,className:R,height:M,width:O,sendBtnClassName:x,popoverPosition:k,autoFocus:F,defaultValue:L}=E,N=(0,o.useRef)(null),U=(0,m.useInjectable)(p.GlobalBrowserStorageService),W=(0,o.useRef)(),j=(0,o.useRef)(0),[Q,G]=(0,o.useState)(L||E.value||""),[X,$]=(0,o.useState)(M||g),[V,H]=(0,o.useState)(!1),K=o.default.useRef(!1);(0,o.useImperativeHandle)(f,()=>N.current),(0,o.useEffect)(()=>{const fe=U.getData(d);fe&&(W.current=fe)},[]),(0,o.useEffect)(()=>{N&&N.current&&F&&N.current.focus()},[N]),(0,o.useEffect)(()=>{var fe;const te=E.value;(0,v.isUndefined)(te)||te!==((fe=N.current)===null||fe===void 0?void 0:fe.value)&&G(te||"")},[E.value,Q,N]),(0,o.useEffect)(()=>{(0,v.isUndefined)(M)||M!==X&&$(M)},[M,X,S]),(0,o.useEffect)(()=>{if(!Q){$(g);return}if(N&&N.current&&X<=a){N.current.style.height="0px";const fe=N.current.scrollHeight;N.current.style.height=Math.min(fe,a)+"px";const te=Math.min(fe+12,a);$(te)}},[N,Q,S,X]),(0,o.useEffect)(()=>{S?.(X)},[X]);const Y=(0,o.useCallback)(fe=>{K.current=!0,G(fe),A?.(fe)},[A]),Z=(0,o.useCallback)(fe=>{H(!0),w?.(fe)},[w]),oe=(0,o.useCallback)(fe=>{H(!1),b?.(fe)},[b]),ie=(0,o.useCallback)(()=>{D&&D()},[]),he=(0,o.useCallback)(()=>{T||Q.trim()&&(W.current=W.current||[],W.current.push(Q),j.current=0,U.setData(d,W.current.slice(-u)),K.current=!1,I?.(Q))},[I,Q,T]),me=(0,o.useCallback)(fe=>{var te,ge,Re;if(fe.key===_.Key.ENTER.code&&!fe.nativeEvent.isComposing){if(fe.shiftKey)return;fe.preventDefault(),he();return}else if((fe.key===_.Key.ARROW_UP.code||fe.key===_.Key.ARROW_DOWN.code)&&(!Q||!K.current)){if(fe.preventDefault(),fe.key===_.Key.ARROW_UP.code){const Oe=(te=W.current)===null||te===void 0?void 0:te[W.current.length-1-j.current];Oe&&(G(Oe),A?.(Oe),j.current=Math.min(j.current+1,((ge=W.current)===null||ge===void 0?void 0:ge.length)||0))}else if(fe.key===_.Key.ARROW_DOWN.code){fe.preventDefault();const Oe=(Re=W.current)===null||Re===void 0?void 0:Re[W.current.length-1-j.current];Oe&&(G(Oe),A?.(Oe),j.current=Math.max(j.current-1,0))}}y?.(fe)},[y,he,Q]),q=(0,o.useMemo)(()=>o.default.createElement("div",{className:h.default.input_icon_container},o.default.createElement("div",{className:(0,r.default)(h.default.send_chat_btn,V&&h.default.active,T&&h.default.disabled,x)},T?D?o.default.createElement(l.Popover,{id:`ai_chat_input_send_${(0,v.uuid)(4)}`,content:(0,v.localize)("aiNative.chat.enter.send"),delay:1500,position:k??l.PopoverPosition.top,disable:T},o.default.createElement(s.EnhanceIcon,{wrapperClassName:h.default.stop_icon,className:"codicon codicon-debug-stop",onClick:ie,tabIndex:0,role:"button",ariaLabel:(0,v.localize)("aiNative.chat.enter.send")})):o.default.createElement("div",{className:h.default.ai_loading},o.default.createElement("div",{className:h.default.loader}),o.default.createElement("div",{className:h.default.loader}),o.default.createElement("div",{className:h.default.loader})):o.default.createElement(l.Popover,{id:`ai_chat_input_send_${(0,v.uuid)(4)}`,content:(0,v.localize)("aiNative.chat.enter.send"),delay:1500,position:k??l.PopoverPosition.top,disable:T},o.default.createElement(s.EnhanceIcon,{wrapperClassName:h.default.send_icon,className:(0,l.getIcon)("send-solid"),onClick:he,tabIndex:0,role:"button",ariaLabel:(0,v.localize)("aiNative.chat.enter.send")})))),[V,T,x,Q,k]),be=(0,o.useMemo)(()=>(0,v.isUndefined)(O)?"100%":O+"px",[O]);return o.default.createElement(l.TextArea,{ref:N,placeholder:c,wrapperStyle:{height:X+"px",width:be},style:{height:X-10+"px"},value:Q,onKeyDown:me,onFocus:Z,onBlur:oe,onValueChange:Y,disabled:T,className:(0,r.default)(h.default.interactive_input_container,V?h.default.active:null,R),addonAfter:q})}),t.InteractiveInput.displayName="interactiveInput"},24951:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HorizontalVertical=t.LineVertical=void 0;const r=e(85608).__importDefault(e(14041)),o={backgroundColor:"var(--editorGroup-border)",height:"100%",width:"1px",minWidth:"1px"},l={backgroundColor:"var(--editorGroup-border)",width:"100%",height:"1px",minHeight:"1px"},v=m=>r.default.createElement("span",{style:{...o,...m}});t.LineVertical=v;const _=m=>r.default.createElement("span",{style:{...l,...m}});t.HorizontalVertical=_},49716:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=n.__importDefault(e(43135));t.Loading=o.default.memo(_=>o.default.createElement(l.Icon,{className:(0,r.default)(_.className,v.default.loading_indicator),iconClass:(0,l.getIcon)("loading")})),t.Loading.displayName="Loading"},52141:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnhancePopover=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),l=e(43718),v=_=>{const{children:m,id:p,title:s,onClick:h}=_,[a,g]=r.default.useState(!1),d=(0,r.useMemo)(()=>p+(0,l.uuid)(6),[p]),u=(0,r.useCallback)(f=>{g(!1),h&&h(f)},[h]),E=(0,r.useCallback)(f=>{g(f)},[]);return r.default.createElement(o.Popover,{id:d,title:s,onClick:u,display:a,onDisplayChange:E},m)};t.EnhancePopover=v},75777:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Thumbs=void 0;const r=e(85608).__importStar(e(14041)),o=e(43718),l=e(95040),v=e(81878),_=e(48560),m=e(67304),p=e(57995),s=h=>{const a=(0,_.useInjectable)(l.IAIInlineChatService),{relationId:g,onClick:d,wrapperClassName:u}=h,[E,f]=(0,r.useState)("thumbs"),[c,y]=(0,r.useState)("thumbsdown"),b=(0,r.useCallback)(w=>{d&&d(w),a&&a.fireThumbsEvent(w)},[g,a]),A=(0,r.useCallback)(w=>{w==="up"&&E==="thumbs"&&(f("thumbs-fill"),y(!1),b(!0)),w==="up"&&E==="thumbs-fill"&&(f("thumbs"),y("thumbsdown")),w==="down"&&c==="thumbsdown"&&(y("thumbsdown-fill"),f(!1),b(!1)),w==="down"&&c==="thumbsdown-fill"&&(y("thumbsdown"),f("thumbs"))},[E,c]),S=(0,_.useUUID)();return r.default.createElement(r.default.Fragment,null,typeof E=="string"&&r.default.createElement(v.Popover,{id:`ai-chat-thumbsup-${S}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title")},r.default.createElement(p.EnhanceIcon,{wrapperClassName:u,onClick:()=>A("up"),className:(0,m.getExternalIcon)(E,m.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title"),ariaPressed:E==="thumbs-fill"?"true":"false"})),typeof c=="string"&&r.default.createElement(v.Popover,{id:`ai-chat-thumbsdown-${S}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title")},r.default.createElement(p.EnhanceIcon,{wrapperClassName:u,onClick:()=>A("down"),className:(0,m.getExternalIcon)(c,m.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title"),ariaPressed:c==="thumbsdown-fill"?"true":"false"})))};t.Thumbs=s},81878:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scroll=t.Scrollbars=t.NativeSelect=void 0;const n=e(85608);n.__exportStar(e(97885),t),n.__exportStar(e(73215),t),n.__exportStar(e(32293),t);var r=e(77331);Object.defineProperty(t,"NativeSelect",{enumerable:!0,get:function(){return r.Select}}),n.__exportStar(e(48412),t),n.__exportStar(e(79383),t),n.__exportStar(e(50708),t),n.__exportStar(e(7273),t),n.__exportStar(e(14640),t),n.__exportStar(e(54076),t),n.__exportStar(e(79024),t),n.__exportStar(e(89832),t),n.__exportStar(e(54713),t),n.__exportStar(e(18875),t),n.__exportStar(e(91397),t),n.__exportStar(e(31059),t),n.__exportStar(e(72871),t),n.__exportStar(e(34128),t);var o=e(77011);Object.defineProperty(t,"Scrollbars",{enumerable:!0,get:function(){return o.Scrollbars}}),Object.defineProperty(t,"Scroll",{enumerable:!0,get:function(){return o.Scrollbars}})},57327:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoxPanel=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(48560),v=e(38578),_=e(55693),m=e(25719),p=n.__importDefault(e(91290)),s=({className:h,children:a=[],direction:g="left-to-right",...d})=>{const u=o.default.Children.toArray(a),E=(0,l.useInjectable)(v.AppConfig),f=(0,_.useDesignStyles)(p.default["box-panel"],"box-panel");(0,o.useEffect)(()=>{E.didRendered&&E.didRendered()},[]);const c=m.Layout.getStyleProperties(g);return o.default.createElement("div",{...d,className:(0,r.default)(f,h),style:{flexDirection:c.direction,zIndex:d.zIndex||d["z-index"]}},u.map((y,b)=>{const A=y.props||{};return o.default.createElement("div",{key:b,id:A["data-wrapper-id"],className:(0,r.default)(p.default.wrapper,A["data-wrapper-class"]),style:{flex:A.flex,overflow:A.overflow,zIndex:A.zIndex||A["z-index"],[c.minSize]:A.defaultSize,backgroundColor:A.backgroundColor}},y)}))};t.BoxPanel=s},28003:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLayout=t.getStorageValue=void 0,t.ToolbarActionBasedLayout=m,t.fixLayout=p;const r=e(85608).__importDefault(e(14041)),o=e(52564),l=e(57327),v=e(99333),_=()=>{let s={},h={};try{const a=localStorage.getItem("layout");a&&(s=JSON.parse(a));const g=localStorage.getItem("theme");g&&(h=JSON.parse(g))}catch{}return{layout:p(s),colors:h}};t.getStorageValue=_,t.DefaultLayout=m;function m(s={}){var h,a,g,d,u,E;const{layout:f}=(0,t.getStorageValue)();return r.default.createElement(l.BoxPanel,{direction:"top-to-bottom"},r.default.createElement(o.SlotRenderer,{id:"top",defaultSize:s.topSlotDefaultSize||0,slot:"top",zIndex:s.topSlotZIndex}),r.default.createElement(v.SplitPanel,{id:"main-horizontal",flex:1},r.default.createElement(o.SlotRenderer,{slot:o.SlotLocation.view,isTabbar:!0,defaultSize:!((h=f.left)===null||h===void 0)&&h.currentId?((a=f.left)===null||a===void 0?void 0:a.size)||310:49,minResize:280,maxResize:480,minSize:49}),r.default.createElement(v.SplitPanel,{id:"main-vertical",minResize:300,flexGrow:1,direction:"top-to-bottom"},r.default.createElement(o.SlotRenderer,{flex:2,flexGrow:1,minResize:200,slot:"main"}),r.default.createElement(o.SlotRenderer,{flex:1,defaultSize:!((g=f.bottom)===null||g===void 0)&&g.currentId?(d=f.bottom)===null||d===void 0?void 0:d.size:24,minResize:160,slot:o.SlotLocation.panel,isTabbar:!0})),r.default.createElement(o.SlotRenderer,{slot:o.SlotLocation.extendView,isTabbar:!0,defaultSize:!((u=f.right)===null||u===void 0)&&u.currentId?((E=f.right)===null||E===void 0?void 0:E.size)||310:0,minResize:280,maxResize:480,minSize:0})),r.default.createElement(o.SlotRenderer,{id:"statusBar",defaultSize:24,slot:"statusBar"}))}function p(s){const h={...s};for(const a in s)!s[a]||a==="containerLocations"||!s[a].size&&s[a].currentId&&(h[a].currentId="");return h}},32293:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(25719),t),n.__exportStar(e(99333),t),n.__exportStar(e(57327),t),n.__exportStar(e(28003),t)},25719:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Layout=void 0;const n=e(73215),r={"left-to-right":{direction:"row",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"right-to-left":{direction:"row-reverse",size:"width",domSize:"clientHeight",minSize:"minWidth",maxSize:"maxWidth"},"top-to-bottom":{direction:"column",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"},"bottom-to-top":{direction:"column-reverse",size:"height",domSize:"clientWidth",minSize:"minHeight",maxSize:"maxHeight"}};var o;(function(l){function v(d){return r[d]}l.getStyleProperties=v;function _(d){return r[d].direction}l.getFlexDirection=_;function m(d){return r[d].size}l.getSizeProperty=m;function p(d){return r[d].domSize}l.getDomSizeProperty=p;function s(d){return r[d].minSize}l.getMinSizeProperty=s;function h(d){return r[d].maxSize}l.getMaxSizeProperty=h;function a(d){return d==="bottom-to-top"||d==="top-to-bottom"?n.ResizeHandleVertical:n.ResizeHandleHorizontal}l.getResizeHandle=a;function g(d){return d==="bottom-to-top"||d==="top-to-bottom"?"row":"column"}l.getTabbarDirection=g})(o||(t.Layout=o={}))},99333:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPanel=t.PanelContext=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(43718),v=e(68456),_=e(48560),m=e(73215),p=e(25719),s=e(71707),h=n.__importDefault(e(91290));t.PanelContext=o.default.createContext({setSize:(u,E)=>{},setRelativeSize:(u,E,f)=>{},getSize:u=>0,getRelativeSize:u=>[0,0],lockSize:(u,E)=>{},setMaxSize:(u,E)=>{},hidePanel:u=>{}});const a=(u,E,f)=>{var c,y;return(y=u&&u.props&&((c=u.props[E])!==null&&c!==void 0?c:u.props[`data-sp-${E}`]))!==null&&y!==void 0?y:f};function g(u,E){return a(u,"savedSize")?a(u,"savedSize")+"px":a(u,"defaultSize")!==void 0?a(u,"defaultSize")+"px":a(u,"flex")?a(u,"flex")/E*100+"%":1/E*100+"%"}const d=u=>{const E=(0,_.useInjectable)(s.SplitPanelManager).getService(u.id),{id:f,className:c,headerSize:y,resizeHandleClassName:b,style:A,children:S=[],direction:w="left-to-right",resizeKeep:I=!0,dynamicTarget:D}=o.default.useMemo(()=>E.interceptProps(u),[E,E.interceptProps,u]),T=p.Layout.getResizeHandle(w),R=p.Layout.getStyleProperties(w),M=o.default.useMemo(()=>o.default.Children.toArray(S),[S]),O=o.default.useMemo(()=>M.find(fe=>a(fe,"flexGrow")),[M]),x=o.default.useMemo(()=>M.reduce((fe,te)=>fe+a(te,"flex",1),0),[M]),k=o.default.useRef([]),F=(0,_.useInjectable)(l.IEventBus),L=o.default.useRef(),N=o.default.useRef(M.map(()=>!1)),U=o.default.useRef(M.map(()=>!1)),W=o.default.useRef(N.current.slice(0,M.length-1)),[j,Q]=o.default.useState(W.current),[G,X]=o.default.useState(U.current),[$,V]=o.default.useState(N.current);E.panels=[];const H=o.default.useCallback(fe=>(te,ge)=>{const Re=ge?fe-1:fe,Oe=k.current[Re];Oe&&Oe.setAbsoluteSize(te!==void 0?te:a(M[fe],"defaultSize"),ge,I)},[k.current]),K=o.default.useCallback(fe=>(te,ge,Re)=>{const Oe=Re?fe-1:fe,Le=k.current[Oe];Le&&Le.setRelativeSize(te,ge)},[k.current]),Y=o.default.useCallback(fe=>te=>{const ge=te?fe-1:fe,Re=k.current[ge];return Re?Re.getAbsoluteSize(te):0},[k.current]),Z=o.default.useCallback(fe=>te=>{const ge=te?fe-1:fe,Re=k.current[ge];return Re?Re.getRelativeSize():[0,0]},[k.current]),oe=o.default.useCallback(fe=>(te,ge)=>{const Re=ge?fe-1:fe,Oe=W.current.map((Le,Ne)=>Ne===Re?te!==void 0?te:!Le:Le);W.current=Oe,Q(Oe)},[k.current]),ie=o.default.useCallback(fe=>te=>{const ge=N.current.map((Re,Oe)=>Oe===fe?te!==void 0?te:!Re:Re);N.current=ge,V(ge)},[k.current]),he=o.default.useCallback(fe=>te=>{const ge=U.current.map((Oe,Le)=>Le===fe?te!==void 0?!te:!Oe:Oe);U.current=ge;const Re=a(M[fe],"slot")||a(M[fe],"id");Re&&me(Re),X(ge)},[M,U.current]),me=o.default.useCallback(fe=>{fe&&(F.fire(new v.ResizeEvent({slotLocation:fe})),F.fireDirective(v.ResizeEvent.createDirective(fe)))},[F]),q=o.default.useMemo(()=>M.map((fe,te)=>{const ge=[],Re=a(fe,"minSize"),Oe=a(fe,"maxSize"),Le=a(fe,"flexGrow");if(te!==0){const Ne=te===1?M[te-1]:M[te];let De;Le?De=m.ResizeFlexMode.Prev:a(M[te-1],"flexGrow")&&(De=m.ResizeFlexMode.Next),a(Ne,"noResize")||j[te-1]||ge.push(o.default.createElement(T,{className:b,onResize:()=>{const ke=a(M[te-1],"slot")||a(M[te-1],"id"),Te=a(M[te],"slot")||a(M[te],"id");me(ke),me(Te)},noColor:!0,findNextElement:D?ke=>E.getFirstResizablePanel(te-1,ke):void 0,findPrevElement:D?ke=>E.getFirstResizablePanel(te-1,ke,!0):void 0,key:`split-handle-${te}`,delegate:ke=>{k.current.push(ke)},flexMode:De}))}return ge.push(o.default.createElement(t.PanelContext.Provider,{key:te,value:{setSize:H(te),getSize:Y(te),setRelativeSize:K(te),getRelativeSize:Z(te),lockSize:oe(te),setMaxSize:ie(te),hidePanel:he(te)}},o.default.createElement("div",{"data-min-resize":a(fe,"minResize"),"data-max-resize":a(fe,"maxResize"),ref:Ne=>{Ne&&E.panels.indexOf(Ne)===-1&&E.panels.push(Ne)},className:g(fe,x)===`${y}px`?m.RESIZE_LOCK:"",id:a(fe,"id"),style:{...a(fe,"flex")&&!a(fe,"savedSize")&&!O?{flex:a(fe,"flex")}:{[R.size]:g(fe,x)},[R.minSize]:Re?Re+"px":"-1px",[R.maxSize]:$[te]&&Oe?Oe+"px":"unset",...Le!==void 0?{flexGrow:Le}:{},display:G[te]?"none":"block"}},fe))),ge}).filter(Boolean),[S,M,b,D,k.current,G,j]);return o.default.useEffect(()=>{L.current&&E.setRootNode(L.current);const fe=F.onDirective(v.ResizeEvent.createDirective(f),()=>{M.forEach(te=>{me(a(te,"slot")||a(te,"id"))})});return()=>{fe.dispose()}},[]),o.default.useMemo(()=>{const{minResize:fe,flexGrow:te,minSize:ge,maxSize:Re,savedSize:Oe,defaultSize:Le,flex:Ne,noResize:De,slot:Ce,headerSize:ke,...Te}=u;return delete Te.resizeHandleClassName,delete Te.dynamicTarget,delete Te.resizeKeep,delete Te.direction,E.renderSplitPanel(o.default.createElement("div",{...Te,ref:We=>L.current=We,className:(0,r.default)(h.default["split-panel"],c),style:{flexDirection:R.direction,...A},"data-min-resize":fe,"data-max-resize":Re,"data-min-size":ge,"data-max-size":Re,"data-saved-size":Oe,"data-default-size":Le,"data-header-size":ke,"data-flex":Ne,"data-flex-grow":te,"data-no-resize":De,"data-slot":Ce}),q,Te)},[E,E.renderSplitPanel,q,L,A,u])};t.SplitPanel=d},71707:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPanelManager=t.SplitPanelService=t.ISplitPanelService=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),l=e(43718),v=e(38578),_=e(73215);t.ISplitPanelService=Symbol("ISplitPanelService");let m=class extends l.Disposable{constructor(h){super(),this.panelId=h,this._whenReadyDeferred=new l.Deferred,this.panels=[]}get isVisible(){return this.rootNode&&this.rootNode.clientHeight>0||!1}get whenReady(){return this._whenReadyDeferred.promise}setRootNode(h){this.rootNode=h,this._whenReadyDeferred.resolve()}getFirstResizablePanel(h,a,g){if(g){if(a){for(let d=h;d>=0;d--)if(!this.panels[d].classList.contains(_.RESIZE_LOCK))return this.panels[d]}else for(let d=h;d>=0;d--)if(!this.panels[d].classList.contains(_.RESIZE_LOCK))return this.panels[d]}else if(a){for(let d=h+1;d<this.panels.length;d++)if(!this.panels[d].classList.contains(_.RESIZE_LOCK))return this.panels[d]}else for(let d=h+1;d<this.panels.length;d++)if(!this.panels[d].classList.contains(_.RESIZE_LOCK))return this.panels[d]}checkChildNoResize(h){var a,g;if(h&&h.type===v.SlotRenderer){const d=(g=this.appConfig.layoutConfig[(a=h.props)===null||a===void 0?void 0:a.slot])===null||g===void 0?void 0:g.modules;if(!d||d.length===0)return!0}return!1}renderSplitPanel(h,a,g){return r.default.cloneElement(h,{...g,...h.props},a)}interceptProps(h){return h}};t.SplitPanelService=m,n.__decorate([(0,o.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.SplitPanelService=m=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],m);let p=class{constructor(){this.services=new Map}getService(h){let a=this.services.get(h);return a||(a=this.injector.get(t.ISplitPanelService,[h]),this.services.set(h,a)),a}};t.SplitPanelManager=p,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],p.prototype,"injector",void 0),t.SplitPanelManager=p=n.__decorate([(0,o.Injectable)()],p)},89897:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(85266),t)},85266:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loading=void 0;const r=e(85608).__importDefault(e(14041));e(18182);const o=()=>r.default.createElement("div",{className:"loading_indicator "});t.Loading=o,t.Loading.displayName="Loading"},97885:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=e(85608).__importDefault(e(43144)),o=e(48560),l=({id:v,className:_,children:m})=>{const p=(0,o.usePortal)(v,_);return r.default.createPortal(m,p)};t.default=l},73215:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResizeHandleVertical=t.ResizeHandleHorizontal=t.ResizeFlexMode=t.RESIZE_LOCK=void 0,t.preventWebviewCatchMouseEvents=m,t.allowWebviewCatchMouseEvents=p;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(22366),v=n.__importDefault(e(57482));t.RESIZE_LOCK="resize-lock";var _;(function(a){a.Prev="prev",a.Next="next",a.Percentage="Percentage"})(_||(t.ResizeFlexMode=_={}));function m(){const a=document.getElementsByTagName("iframe"),g=document.getElementsByTagName("webview"),d=document.getElementsByClassName("shadow-root-host");for(const u of g)u.classList.add("none-pointer-event");for(const u of a)u.classList.add("none-pointer-event");for(const u of d)u?.classList.add("none-pointer-event")}function p(){const a=document.getElementsByTagName("iframe"),g=document.getElementsByTagName("webview"),d=document.getElementsByClassName("shadow-root-host");for(const u of g)u.classList.remove("none-pointer-event");for(const u of a)u.classList.remove("none-pointer-event");for(const u of d)u?.classList.remove("none-pointer-event")}const s=a=>{const g=o.default.useRef(),d=o.default.useRef(!1),u=o.default.useRef(0),E=o.default.useRef(0),f=o.default.useRef(0),c=o.default.useRef(),y=o.default.useRef(),b=o.default.useRef(),A=(L,N)=>{const U=a.findPrevElement?a.findPrevElement():c.current,W=a.findNextElement?a.findNextElement():y.current;if(U&&U.classList.contains(t.RESIZE_LOCK)||W&&W.classList.contains(t.RESIZE_LOCK))return;const j=g.current.parentElement.offsetWidth,Q=Number(U?.dataset.minResize||0),G=Number(W?.dataset.minResize||0),X=Number(U?.dataset.maxResize||0),$=Number(W?.dataset.maxResize||0);(Q||G)&&(L*j<=Q||N*j<=G)||(X||$)&&(L*j>=X||N*j>=$)||(W&&(W.style.width=N*100+"%"),U&&(U.style.width=L*100+"%"),a.onResize&&W&&U&&a.onResize(U,W))},S=(L,N,U,W)=>{var j,Q;const G=a.findPrevElement?a.findPrevElement(W):c.current,X=a.findNextElement?a.findNextElement(W):y.current,$=Number((j=G?.dataset.minResize)!==null&&j!==void 0?j:0),V=Number((Q=X?.dataset.minResize)!==null&&Q!==void 0?Q:0),H=G?.dataset.maxResize?Number(G?.dataset.maxResize):null,K=X?.dataset.maxResize?Number(X?.dataset.maxResize):null,Y=a.flexMode===_.Prev,Z=Y?G:X,oe=Y?X:G;let ie=Y?L:N;U||(($||V)&&(Y?$>L?ie=$:V>N&&(ie=L+N-V):V>N?ie=V:$>L&&(ie=L+N-$)),(H||K)&&(Y?H&&H<=L?ie=H:K&&K>N&&(ie=L+N-K):K&&K<=N?ie=K:H&&H>N&&(ie=L+N-H))),Z.style.width=ie+"px",Z.style.flexGrow="0",Z.style.flexShrink="1",oe.style.width="0",oe.style.flexGrow="1",oe.style.flexShrink="0",a.onResize&&X&&G&&a.onResize(G,X)},w=(L,N)=>{const U=c.current,W=y.current;let j;a.flexMode?j=(U.offsetWidth+W.offsetWidth)/U.parentElement.offsetWidth*100:j=+y.current.style.width.replace("%","")+ +c.current.style.width.replace("%",""),W&&(W.style.width=N/(L+N)*j+"%"),U&&(U.style.width=L/(L+N)*j+"%"),I(L,N),a.onResize&&W&&U&&a.onResize(U,W)},I=(L,N)=>{const U=c.current,W=y.current;let j=!1;U&&(L===0?(U.classList.add("kt_display_none"),j=!0):U.classList.remove("kt_display_none")),W&&(N===0?(W.classList.add("kt_display_none"),j=!0):W.classList.remove("kt_display_none")),g.current&&(j?g.current.classList.add("none-pointer-event"):g.current.classList.remove("none-pointer-event"))},D=()=>{const L=c.current.clientWidth,N=y.current.clientWidth,U=L+N,W=[];return W.push(L/U),W.push(N/U),W},T=(L,N)=>{l.fastdom.mutate(()=>{const U=c.current.clientWidth,W=y.current.clientWidth,j=U+W;if(a.flexMode){const Q=a.flexMode===_.Prev?L:j-L,G=a.flexMode===_.Next?L:j-L;S(Q,G,!0)}else{const Q=+y.current.style.width.replace("%",""),G=+c.current.style.width.replace("%",""),X=Q+G;N?(y.current.style.width=X*(L/j)+"%",c.current.style.width=X*(1-L/j)+"%"):(c.current.style.width=X*(L/j)+"%",y.current.style.width=X*(1-L/j)+"%")}N?I(j-L,L):I(L,j-L),a.onResize&&a.onResize(c.current,y.current)})},R=L=>L?y.current.clientWidth:c.current.clientWidth,M=L=>{const N=L.classList,U=v.default["resize-overflow-hidden"];N?.contains(U)||N.add(U)},O=L=>{const N=L.classList,U=v.default["resize-overflow-hidden"];N?.contains(U)&&N.remove(U)},x=L=>{if(L.preventDefault(),g.current&&g.current.classList.contains("no-resize"))return;const N=E.current+L.pageX-u.current,U=f.current-(L.pageX-u.current);b.current&&b.current.dispose(),b.current=l.fastdom.mutate(()=>{if(a.flexMode)S(N,U);else{const W=g.current.parentElement.offsetWidth;A(N/W,U/W)}})},k=()=>{d.current=!1,document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k),a.onFinished&&a.onFinished(),l.fastdom.mutate(()=>{var L;(L=g.current)===null||L===void 0||L.classList.remove(v.default.active),O(c.current),O(y.current),p()})},F=L=>{d.current=!0,document.addEventListener("mousemove",x),document.addEventListener("mouseup",k),u.current=L.pageX,l.fastdom.measure(()=>{E.current=c.current.offsetWidth,f.current=y.current.offsetWidth,l.fastdom.mutate(()=>{var N;(N=g.current)===null||N===void 0||N.classList.add(v.default.active),M(c.current),M(y.current),m()})})};return o.default.useEffect(()=>(g.current&&(g.current.addEventListener("mousedown",F),c.current=g.current.previousSibling,y.current=g.current.nextSibling),()=>{g.current&&(g.current.removeEventListener("mousedown",F),g.current.removeEventListener("mousemove",x),g.current.removeEventListener("mouseup",k))}),[]),a.delegate&&a.delegate({setSize:A,setAbsoluteSize:T,getAbsoluteSize:R,setRelativeSize:w,getRelativeSize:D}),o.default.createElement("div",{ref:L=>{g.current=L},className:(0,r.default)({[v.default["resize-handle-horizontal"]]:!0,[v.default["with-color"]]:!a.noColor,[a.className||""]:!0})})};t.ResizeHandleHorizontal=s;const h=a=>{const g=o.default.useRef(),d=o.default.useRef(!1),u=o.default.useRef(0),E=o.default.useRef(0),f=o.default.useRef(0),c=o.default.useRef(),y=o.default.useRef(),b=o.default.useRef(),A=o.default.useRef(),S=(L,N,U)=>{const W=a.findPrevElement?a.findPrevElement(U):c.current,j=a.findNextElement?a.findNextElement(U):y.current;!j||!W||W.classList.contains(t.RESIZE_LOCK)||j.classList.contains(t.RESIZE_LOCK)||(j.style.height=N*100+"%",W.style.height=L*100+"%",a.onResize&&a.onResize(W,j))},w=(L,N,U,W)=>{var j,Q;const G=a.findPrevElement?a.findPrevElement(W):c.current,X=a.findNextElement?a.findNextElement(W):y.current;let $,V,H=0;const K=Number(((j=G?.dataset)===null||j===void 0?void 0:j.minResize)||0),Y=Number(((Q=X?.dataset)===null||Q===void 0?void 0:Q.minResize)||0);a.flexMode===_.Prev?($=G,V=X,H=L,U||(K>L?H=K:Y>N&&(H=L+N-Y))):($=X,V=G,H=N,U||(Y>N?H=Y:K>L&&(H=L+N-K))),$.style.height=H+"px",$.style.flexGrow="0",$.style.flexShrink="1",V.style.height="0",V.style.flexGrow="1",V.style.flexShrink="0",a.onResize&&X&&G&&a.onResize(G,X)},I=(L,N)=>{const U=c.current,W=y.current;let j;a.flexMode?j=(U.offsetHeight+W.offsetHeight)/U.parentElement.offsetHeight*100:j=+W.style.height.replace("%","")+ +U.style.height.replace("%",""),W&&(W.style.height=N/(L+N)*j+"%"),U&&(U.style.height=L/(L+N)*j+"%"),D(L,N),a.onResize&&W&&U&&a.onResize(U,W)},D=(L,N)=>{const U=c.current,W=y.current;let j=!1;U&&(L===0?(U.classList.add("kt_display_none"),j=!0):U.classList.remove("kt_display_none")),W&&(N===0?(W.classList.add("kt_display_none"),j=!0):W.classList.remove("kt_display_none")),g.current&&(j?g.current.classList.add("none-pointer-event"):g.current.classList.remove("none-pointer-event"))},T=()=>{const L=c.current.clientHeight,N=y.current.clientHeight,U=L+N,W=[];return W.push(L/U),W.push(N/U),W},R=(L,N,U,W)=>{U.classList.contains(t.RESIZE_LOCK)||W.classList.contains(t.RESIZE_LOCK)||(W.style.height=N+"px",U.style.height=L+"px",W.style.flex="unset",U.style.flex="unset",a.onResize&&W&&U&&a.onResize(U,W))},M=(L,N,U)=>{if(!c.current||!y.current)return;const W=c.current.clientHeight,j=y.current.clientHeight,Q=W+j;if(a.flexMode){const G=a.flexMode===_.Prev?L:Q-L,X=a.flexMode===_.Next?L:Q-L;w(G,X,!0)}else{const G=+y.current.style.height.replace(/\%|px/,""),X=+c.current.style.height.replace(/\%|px/,""),$=G+X;if(N){U&&(c.current.style.height=$*(1-L/Q)+"%");const V=$*(L/Q);y.current.style.height=V===0?V+"px":V+"%"}else c.current.style.height=$*(L/Q)+"%",U&&(y.current.style.height=$*(1-L/Q)+"%")}N?D(Q-L,L):D(L,Q-L),a.onResize&&a.onResize(c.current,y.current)},O=L=>L?y.current.clientHeight:c.current.clientHeight,x=L=>{d.current=!0,document.addEventListener("mousemove",k),document.addEventListener("mouseup",F),u.current=L.pageY,A.current=y.current,b.current=c.current,l.fastdom.measure(()=>{E.current=c.current.offsetHeight,f.current=y.current.offsetHeight,l.fastdom.mutate(()=>{var N;(N=g.current)===null||N===void 0||N.classList.add(v.default.active),m()})})},k=L=>{L.preventDefault(),!(g.current&&g.current.classList.contains("no-resize"))&&l.fastdom.measure(()=>{const N=L.pageY>u.current,U=a.findNextElement?a.findNextElement(N):null,W=a.findPrevElement?a.findPrevElement(N):null;if(U!==null&&A.current!==U||W!==null&&b.current!==W){if(!U||!W)return;A.current=U,b.current=W,u.current=L.pageY,E.current=b.current.offsetHeight,f.current=A.current.offsetHeight}const j=E.current+L.pageY-u.current,Q=f.current-(L.pageY-u.current),G=Number(b.current.dataset.minResize||0),X=Number(A.current.dataset.minResize||0);(G||X)&&(j<=G||Q<=X)||l.fastdom.mutate(()=>{if(a.flexMode===_.Prev||a.flexMode===_.Next)w(j,Q);else if(a.flexMode===_.Percentage){const $=g.current.parentElement.offsetHeight;S(j/$,Q/$)}else R(j,Q,b.current,A.current)})})},F=L=>{d.current=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",F),l.fastdom.mutate(()=>{var N;(N=g.current)===null||N===void 0||N.classList.remove(v.default.active),a.onFinished&&a.onFinished(),p()})};return o.default.useEffect(()=>(g.current.addEventListener("mousedown",x),c.current=g.current.previousSibling,y.current=g.current.nextSibling,()=>{g.current.removeEventListener("mousedown",x),document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",F)}),[]),a.delegate&&a.delegate({setSize:S,setAbsoluteSize:M,getAbsoluteSize:O,setRelativeSize:I,getRelativeSize:T}),o.default.createElement("div",{ref:L=>L&&(g.current=L),className:(0,r.default)({[v.default["resize-handle-vertical"]]:!0,[a.className||""]:!0,[v.default["with-color"]]:!a.noColor})})};t.ResizeHandleVertical=h},77331:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Select=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041));n.__exportStar(e(88706),t);const l=v=>(v={...v,className:(0,r.default)("kt_select",v.className)},o.default.createElement("select",{...v}));t.Select=l},53736:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextKeyChangeEvent=t.IContextKeyService=void 0;const n=e(43718);t.IContextKeyService=Symbol("IContextKeyService");class r extends n.BasicEvent{}t.ContextKeyChangeEvent=r},50394:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineInputWidgetIsStreaming=t.InlineInputWidgetIsVisible=t.CodeEditsIsVisible=t.InlineDiffPartialEditsIsVisible=t.InlineHintWidgetIsVisible=t.InlineCompletionIsTrigger=t.InlineChatIsVisible=void 0;const n=e(40191);t.InlineChatIsVisible=new n.RawContextKey("ai.native.inlineChatIsVisible",!1),t.InlineCompletionIsTrigger=new n.RawContextKey("ai.native.inlineCompletionIsTrigger",!1),t.InlineHintWidgetIsVisible=new n.RawContextKey("ai.native.inlineHintWidgetIsVisible",!1),t.InlineDiffPartialEditsIsVisible=new n.RawContextKey("ai.native.inlineDiffPartialEditsIsVisible",!1),t.CodeEditsIsVisible=new n.RawContextKey("ai.native.codeEditsIsVisible",!1),t.InlineInputWidgetIsVisible=new n.RawContextKey("ai.native.inlineInputWidgetIsVisible",!1),t.InlineInputWidgetIsStreaming=new n.RawContextKey("ai.native.inlineInputWidgetIsStreaming",!1)},20162:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialogViewVisibleContext=t.DialogViewVisibleContext=void 0;const n=e(40191);t.DialogViewVisibleContext=new n.RawContextKey("dialogViewVisible",!1),t.FileDialogViewVisibleContext=new n.RawContextKey("fileDialogViewVisible",!1)},16413:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerCompressedLastFocusContext=t.ExplorerCompressedFirstFocusContext=t.ExplorerCompressedFocusContext=t.FilesExplorerFilteredContext=t.FilesExplorerInputFocusedContext=t.FilesExplorerFocusedContext=t.ExplorerFilteredContext=t.ExplorerFocusedContext=t.ExplorerResourceCut=t.ExplorerViewletVisibleContext=t.ExplorerResourceIsFolderContext=void 0;const n=e(40191);t.ExplorerResourceIsFolderContext=new n.RawContextKey("explorerResourceIsFolder",!1),t.ExplorerViewletVisibleContext=new n.RawContextKey("explorerViewletVisible",!0),t.ExplorerResourceCut=new n.RawContextKey("explorerResourceCut",!1),t.ExplorerFocusedContext=new n.RawContextKey("explorerViewletFocus",!1),t.ExplorerFilteredContext=new n.RawContextKey("explorerViewletFilter",!1),t.FilesExplorerFocusedContext=new n.RawContextKey("filesExplorerFocus",!1),t.FilesExplorerInputFocusedContext=new n.RawContextKey("filesExplorerInputFocus",!1),t.FilesExplorerFilteredContext=new n.RawContextKey("filesExplorerFilteredContext",!1),t.ExplorerCompressedFocusContext=new n.RawContextKey("explorerViewletCompressedFocus",!1),t.ExplorerCompressedFirstFocusContext=new n.RawContextKey("explorerViewletCompressedFirstFocus",!1),t.ExplorerCompressedLastFocusContext=new n.RawContextKey("explorerViewletCompressedLastFocus",!1)},66e3:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(16413),t),n.__exportStar(e(91830),t),n.__exportStar(e(29906),t),n.__exportStar(e(96774),t),n.__exportStar(e(73537),t),n.__exportStar(e(20162),t)},379:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowExcludedFilesFilterContextKey=t.ShowActiveFileFilterContextKey=t.ShowInfoFilterContextKey=t.ShowWarningsFilterContextKey=t.ShowErrorsFilterContextKey=t.RelatedInformationFocusContextKey=t.MarkerViewFilterFocusContextKey=t.MarkerFocusContextKey=t.MarkersTreeVisibilityContextKey=void 0;const n=e(40191);t.MarkersTreeVisibilityContextKey=new n.RawContextKey("problemsVisibility",!1),t.MarkerFocusContextKey=new n.RawContextKey("problemFocus",!1),t.MarkerViewFilterFocusContextKey=new n.RawContextKey("problemsFilterFocus",!1),t.RelatedInformationFocusContextKey=new n.RawContextKey("relatedInformationFocus",!1),t.ShowErrorsFilterContextKey=new n.RawContextKey("problems.filter.errors",!0),t.ShowWarningsFilterContextKey=new n.RawContextKey("problems.filter.warnings",!0),t.ShowInfoFilterContextKey=new n.RawContextKey("problems.filter.info",!0),t.ShowActiveFileFilterContextKey=new n.RawContextKey("problems.filter.activeFile",!1),t.ShowExcludedFilesFilterContextKey=new n.RawContextKey("problems.filter.excludedFiles",!0)},96774:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutlineFollowCursorContext=t.OutlineSortTypeContext=void 0;const n=e(40191);t.OutlineSortTypeContext=new n.RawContextKey("outlineSortType",0),t.OutlineFollowCursorContext=new n.RawContextKey("outlineFollowCursor",!1)},91830:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceContextKey=void 0;const n=e(43718),r=e(63214);class o{constructor(v,_=r.getLanguageIdFromMonaco,m="resource"){if(this.contextKeyService=v,this.languageResolver=_,!m)throw new Error("resource key prefix cannot be empty!");this.resourceScheme=this.contextKeyService.createKey(m+"Scheme",""),this.resourceFilename=this.contextKeyService.createKey(m+"Filename",""),this.resourceExtname=this.contextKeyService.createKey(m+"Extname",""),this.resourceLangId=this.contextKeyService.createKey(m+"LangId",""),this.resourceKey=this.contextKeyService.createKey(m,""),this.isFileSystemResource=this.contextKeyService.createKey("isFileSystem"+m.substr(0,1).toUpperCase()+m.substr(1),!1)}set(v){if(!v){this.reset();return}const _=this.resourceKey.get();v.isEqual(new n.URI(_))||(this.resourceScheme.set(v.scheme),this.resourceFilename.set(v.path.name+v.path.ext),this.resourceExtname.set(v.path.ext),this.resourceLangId.set(this.languageResolver(v)),this.resourceKey.set(v.toString()),this.isFileSystemResource.set(v.scheme===n.Schemes.file))}reset(){this.resourceScheme.set(""),this.resourceFilename.set(""),this.resourceExtname.set(""),this.resourceLangId.set(""),this.resourceKey.set(""),this.isFileSystemResource.set(!1)}}t.ResourceContextKey=o},67386:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InTreeViewKey=t.ViewHasSomeCollapsibleKey=t.ViewHasFilePatternKey=t.ViewHasReplacePatternKey=t.ViewHasSearchPatternKey=t.MatchFocusKey=t.ResourceFolderFocusKey=t.FolderFocusKey=t.FileFocusKey=t.FileMatchOrFolderMatchWithResourceFocusKey=t.FileMatchOrFolderMatchFocusKey=t.FileMatchOrMatchFocusKey=t.FirstMatchFocusKey=t.ReplaceActiveKey=t.PatternExcludesFocusedKey=t.PatternIncludesFocusedKey=t.InputBoxFocusedKey=t.SearchViewVisibleKey=t.HasSearchResults=t.ReplaceInputBoxFocusedKey=t.SearchInputBoxFocusedKey=t.SearchViewFocusedKey=void 0;const n=e(40191);t.SearchViewFocusedKey=new n.RawContextKey("searchViewletFocus",!1),t.SearchInputBoxFocusedKey=new n.RawContextKey("searchInputBoxFocus",!1),t.ReplaceInputBoxFocusedKey=new n.RawContextKey("replaceInputBoxFocus",!1),t.HasSearchResults=new n.RawContextKey("hasSearchResult",!1),t.SearchViewVisibleKey=new n.RawContextKey("searchViewletVisible",!0),t.InputBoxFocusedKey=new n.RawContextKey("inputBoxFocus",!1),t.PatternIncludesFocusedKey=new n.RawContextKey("patternIncludesInputBoxFocus",!1),t.PatternExcludesFocusedKey=new n.RawContextKey("patternExcludesInputBoxFocus",!1),t.ReplaceActiveKey=new n.RawContextKey("replaceActive",!1),t.FirstMatchFocusKey=new n.RawContextKey("firstMatchFocus",!1),t.FileMatchOrMatchFocusKey=new n.RawContextKey("fileMatchOrMatchFocus",!1),t.FileMatchOrFolderMatchFocusKey=new n.RawContextKey("fileMatchOrFolderMatchFocus",!1),t.FileMatchOrFolderMatchWithResourceFocusKey=new n.RawContextKey("fileMatchOrFolderMatchWithResourceFocus",!1),t.FileFocusKey=new n.RawContextKey("fileMatchFocus",!1),t.FolderFocusKey=new n.RawContextKey("folderMatchFocus",!1),t.ResourceFolderFocusKey=new n.RawContextKey("folderMatchWithResourceFocus",!1),t.MatchFocusKey=new n.RawContextKey("matchFocus",!1),t.ViewHasSearchPatternKey=new n.RawContextKey("viewHasSearchPattern",!1),t.ViewHasReplacePatternKey=new n.RawContextKey("viewHasReplacePattern",!1),t.ViewHasFilePatternKey=new n.RawContextKey("viewHasFilePattern",!1),t.ViewHasSomeCollapsibleKey=new n.RawContextKey("viewHasSomeCollapsibleResult",!1),t.InTreeViewKey=new n.RawContextKey("inTreeView",!1)},29906:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShellExecutionSupported=t.IsTerminalFocused=t.IsTerminalViewInitialized=void 0;const n=e(40191);t.IsTerminalViewInitialized=new n.RawContextKey("isTerminalViewInitialized",!1),t.IsTerminalFocused=new n.RawContextKey("isTerminalFocused",!1),t.ShellExecutionSupported=new n.RawContextKey("shellExecutionSupported",!0)},12288:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingCanRefreshTests=t.TestingIsPeekVisible=t.TestingIsInPeek=t.TestingIsRunning=t.TestingHasAnyResults=t.TestingServiceHasDebuggableContextKey=t.TestingServiceProviderCount=void 0;const n=e(40191);t.TestingServiceProviderCount=new n.RawContextKey("service.testing.providerCount",0),t.TestingServiceHasDebuggableContextKey=new n.RawContextKey("service.testing.hasDebuggableContext",!1),t.TestingHasAnyResults=new n.RawContextKey("testing.hasAnyResults",!1),t.TestingIsRunning=new n.RawContextKey("testing.isRunning",!1),t.TestingIsInPeek=new n.RawContextKey("testing.isInPeek",!0),t.TestingIsPeekVisible=new n.RawContextKey("testing.isPeekVisible",!1),t.TestingCanRefreshTests=new n.RawContextKey("testing.canRefresh",!1)},73537:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualWorkspace=t.WorkspaceTrusted=t.WorkspaceFolderCount=t.WorkbenchState=void 0;const n=e(40191);t.WorkbenchState=new n.RawContextKey("workbenchState","empty"),t.WorkspaceFolderCount=new n.RawContextKey("workspaceFolderCount",0),t.WorkspaceTrusted=new n.RawContextKey("isWorkspaceTrusted",!0),t.VirtualWorkspace=new n.RawContextKey("virtualWorkspace",!1)},18193:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorePreferences=t.corePreferenceSchema=t.FILE_TREE_DEFAULTS=t.FILES_DEFAULTS=void 0,t.injectCorePreferences=_;const n=e(43718),r=e(69734),o=e(87863),l=e(78132),v={confirmDelete:!0,confirmMove:!0};t.FILES_DEFAULTS={filesWatcherExclude:o.defaultFilesWatcherExcludes,filesExclude:{"**/.git":!0,"**/.svn":!0,"**/.hg":!0,"**/CVS":!0,"**/.DS_Store":!0}},t.FILE_TREE_DEFAULTS={baseIndent:10,indent:8},t.corePreferenceSchema={type:"object",properties:{[n.GeneralSettingsId.Language]:{type:"string",enum:(0,n.getAvailableLanguages)().map(m=>m.languageId),default:r.LOCALE_TYPES.EN_US},[n.GeneralSettingsId.Theme]:{type:"string",default:"vs-dark",enum:[]},"general.askReloadOnLanguageChange":{type:"boolean",default:!0,description:"%preference.description.general.askReloadOnLanguageChange%"},[n.GeneralSettingsId.Icon]:{type:"string",default:"vs-minimal",enum:[]},[n.GeneralSettingsId.ProductIconTheme]:{type:"string",default:"opensumi-icons",enum:["opensumi-icons"]},"workbench.colorCustomizations":{type:"object",description:"%preference.workbench.colorCustomizations%",default:{}},"application.supportsOpenFolder":{type:"boolean",default:!1,description:"Whether default open folder behavior is supported"},"application.supportsOpenWorkspace":{type:"boolean",default:!1,description:"Whether default open workspace behavior is supported"},"application.confirmExit":{type:"string",enum:["never","ifRequired","always"],default:"always",description:"When to confirm before closing the application window."},"application.preferMarkdownPreview":{type:"boolean",default:!1,description:"Use markdown preview first"},"application.invalidExthostReload":{type:"string",enum:["ifRequired","always"],default:"ifRequired",description:"Reload strategy when exthost process became invalid."},"workbench.list.openMode":{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:"%preference.workbench.list.openMode%"},"workbench.commandPalette.history":{type:"number",default:50,minimum:0,description:"Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history."},"workbench.refactoringChanges.showPreviewStrategy":{type:"string",default:"askMe",enum:["show","hide","askMe"],description:"%preference.workbench.refactoringChanges.showPreviewStrategy%"},"workbench.quickOpen.preserveInput":{type:"boolean",default:!0,description:"%workbench.quickOpen.preserveInput%"},"workbench.hideSlotTabBarWhenHidePanel":{type:"boolean",default:!1,description:"%workbench.hideSlotTabBarWhenHidePanel%"},"explorer.confirmMove":{type:"boolean",default:v.confirmDelete,description:"%preference.explorer.confirm.move%"},"explorer.confirmDelete":{type:"boolean",default:v.confirmMove,description:"%preference.explorer.confirm.delete%"},"explorer.fileTree.baseIndent":{type:"number",default:t.FILE_TREE_DEFAULTS.baseIndent},"explorer.fileTree.indent":{type:"number",default:t.FILE_TREE_DEFAULTS.indent},"explorer.compactFolders":{type:"boolean",description:"%preference.explorer.compactFolders%",default:!0},"explorer.autoReveal":{type:"boolean",default:!0},"debug.toolbar.float":{type:"boolean",default:!0},"debug.breakpoint.editorHint":{type:"boolean",default:!0,description:"%preference.debug.breakpoint.editorHint%"},"debug.breakpoint.showBreakpointsInOverviewRuler":{type:"boolean",default:!1,description:"%preference.debug.breakpoint.showBreakpointsInOverviewRuler%"},"debug.toolbar.top":{type:"number",default:0,description:"%preference.debug.toolbar.top%"},"debug.toolbar.height":{type:"number",default:30,description:"%preference.debug.toolbar.height%"},"debug.console.filter.mode":{type:"string",enum:["filter","matcher"],default:"filter"},"files.exclude":{type:"object",description:"%preference.files.exclude%",default:t.FILES_DEFAULTS.filesExclude,additionalProperties:{anyOf:[{type:"boolean",description:(0,n.localize)("files.exclude.boolean","The glob pattern to match file paths against. Set to true or false to enable or disable the pattern.")}]}},"files.watcherExclude":{type:"object",default:t.FILES_DEFAULTS.filesWatcherExclude,description:"%preference.files.watcherExclude%"},"files.associations":{type:"object",markdownDescription:"%preference.files.associations%"},"files.encoding":{type:"string",description:"%preference.files.encoding%",default:"utf8",enum:Object.keys(n.SUPPORTED_ENCODINGS)},"files.eol":{type:"string",enum:[`
33878
33878
  `,`\r
33879
33879
  `,"auto"],default:"auto"},"files.trimFinalNewlines":{type:"boolean",default:!1},"files.trimTrailingWhitespace":{type:"boolean",default:!1},"files.insertFinalNewline":{type:"boolean",default:!1},"files.autoGuessEncoding":{type:"boolean",default:!1,description:"%preference.files.autoGuessEncoding%",included:Object.keys(n.SUPPORTED_ENCODINGS).length>1},"settings.userBeforeWorkspace":{type:"boolean",default:!1,description:"%settings.configuration.userBeforeWorkspace%"},"output.maxChannelLine":{type:"number",default:5e4,description:"%output.maxChannelLineDesc%"},"output.enableLogHighlight":{type:"boolean",default:!0,description:"%output.enableLogHighlightDesc%"},"output.enableSmartScroll":{type:"boolean",default:!0,description:"%output.enableSmartScrollDesc%"},"debug.inline.values":{type:"boolean",default:!1},"debug.console.wordWrap":{type:"boolean",default:!0},"toolbar.ignoreActions":{type:"object",patternProperties:{".*":{type:"array",items:[{type:"string"}]}},description:"%preference.toolbar.ignoreActions%"},"toolbar.buttonDisplay":{type:"string",enum:["icon","iconAndText"],default:"iconAndText",description:"%preference.toolbar.buttonDisplay%"},"toolbar.buttonTitleStyle":{type:"string",enum:["vertical","horizontal"],default:"horizontal"},"view.saveLayoutWithWorkspace":{type:"boolean",default:!1},"menubar.compactMode":{type:"boolean",default:!1},"editor.codeActionWidget.showHeaders":{type:"boolean",default:!0},"mergeEditor.autoApplyNonConflictChanges":{type:"boolean",default:!1}}},t.CorePreferences=Symbol("CorePreferences");function _(m){m.addProviders({token:t.CorePreferences,useFactory:p=>{const s=p.get(l.PreferenceService);return(0,l.createPreferenceProxy)(s,t.corePreferenceSchema)}})}},2758:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignStyleService=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=e(76003),l="design-";let v=class{get styles(){return this._styles}setStyles(m){this._styles=m}wrapStyles(m,p){return this._styles?m?(0,r.default)(m,this._styles[l+p]):"":m||""}};t.DesignStyleService=v,t.DesignStyleService=v=n.__decorate([(0,o.Injectable)()],v)},80832:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(2758),t),n.__exportStar(e(66597),t),n.__exportStar(e(68576),t)},68576:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StackingLevelStr=t.StackingLevel=void 0,t.StackingLevel=Object.freeze({Background:0,Workbench:1,Toolbar:2,XtermDecoration:8,ToolbarDropdown:10,EditorTabbarCurrent:11,ResizeHandle:12,EditorTabbarOverlay:15,EditorFloatingContainer:20,FindWidget:25,Popup:100,Overlay:800,PopoverComponent:999,PopoverComponentArrow:1e3,OverlayTop:1e3}),t.StackingLevelStr=Object.fromEntries(Object.entries(t.StackingLevel).map(([e,n])=>[e,n.toString()]))},66597:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDesignStyleService=void 0,t.IDesignStyleService=Symbol("IDesignStyleService")},4246:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withPrevented=e;function e(n){return r=>{r.preventDefault(),r.stopPropagation(),n&&n(r)}}},19636:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(70392);class r{constructor(y,b){this._runner=y,this.priority=b,this._disposed=!1}run(){if(!this._disposed)try{this._runner()}catch(y){(0,n.onUnexpectedError)(y)}}dispose(){this._disposed=!0}}const o=new n.Heap({comparator:(c,y)=>y.priority-c.priority}),l=new n.Heap({comparator:(c,y)=>y.priority-c.priority});let v=o,_=l;function m(){v===o?(v=l,_=o):(v=o,_=l)}let p,s=!1;function h(){for(p=void 0,s=!0,m();v.size>0;)v.pop().run();s=!1}function a(){p||(p=requestAnimationFrame(h))}function g(c){s?v.add(c):_.add(c)}function d(c){const y=new r(c,1e4);return g(y),a(),y}function u(c){const y=new r(c,-1e4);return g(y),a(),y}function E(c){const y=new r(c,1e4);return _.add(y),a(),y}const f={measure:d,measureAtNextFrame:E,mutate:u};t.default=f},22366:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MouseEventButton=t.fastdom=t.FocusTracker=t.DomListener=t.EventType=void 0,t.isAncestor=v,t.addDisposableListener=m,t.trackFocus=s,t.createClassNameTokens=h,t.addClassName=a;const n=e(85608),r=e(43718),o=e(77714),l=n.__importDefault(e(19636));t.fastdom=l.default,n.__exportStar(e(4246),t),t.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:r.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:r.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:r.isWebKit?"webkitAnimationIteration":"animationiteration"};function v(g,d){for(;g;){if(g===d)return!0;g=g.parentNode}return!1}class _{constructor(d,u,E,f){this._node=d,this._type=u,this._handler=E,this._useCapture=f||!1,this._node.addEventListener(this._type,this._handler,this._useCapture)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._useCapture),this._node=null,this._handler=null)}}t.DomListener=_;function m(g,d,u,E){return new _(g,d,u,E)}class p extends r.Disposable{constructor(d){super(),this.didFocus=new r.Emitter,this.onDidFocus=this.didFocus.event,this.didBlur=new r.Emitter,this.onDidBlur=this.didBlur.event;let u=v(document.activeElement,d),E=!1;const f=()=>{E=!1,u||(u=!0,this.didFocus.fire())},c=()=>{u&&(E=!0,window.setTimeout(()=>{E&&(E=!1,u=!1,this.didBlur.fire())},0))};this.addDispose(this.didBlur),this.addDispose(this.didFocus),this.addDispose(new _(d,t.EventType.FOCUS,f,!0)),this.addDispose(new _(d,t.EventType.BLUR,c,!0))}}t.FocusTracker=p;function s(g){return new p(g)}t.MouseEventButton={Left:0,Middle:1,Right:2,Back:3,Forward:4};function h(g){return g.split(o.space).filter(Boolean)}function a(g,d){const u=h(d);g.classList.add(...u)}},5910:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncodingRegistry=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(78132),v=e(63214);let _=class{constructor(){this.encodingOverrides=[]}registerOverride(p){return this.encodingOverrides.push(p),o.Disposable.create(()=>{const s=this.encodingOverrides.indexOf(p);s!==-1&&this.encodingOverrides.splice(s,1)})}getEncodingForResource(p,s){let h;const a=this.getEncodingOverride(p);return a?h=a:s?h=s:h=this.preferenceService.get("files.encoding",void 0,p.toString(),(0,v.getLanguageIdFromMonaco)(p)||void 0)||"",!h||!(0,o.encodingExists)(h)?o.UTF8:h}getEncodingOverride(p){if(this.encodingOverrides&&this.encodingOverrides.length){for(const s of this.encodingOverrides)if(s.parent&&p.isEqualOrParent(s.parent)||s.extension&&p.path.ext===`.${s.extension}`||s.scheme&&s.scheme===p.scheme)return s.encoding}}};t.EncodingRegistry=_,n.__decorate([(0,r.Autowired)(l.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),t.EncodingRegistry=_=n.__decorate([(0,r.Injectable)()],_)},35018:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionsPointServiceImpl=t.OPENSUMI_EXTENSION_JSON_URI=t.EXTENSION_JSON_URI=void 0;const n=e(85608),r=n.__importDefault(e(56757)),o=n.__importDefault(e(46123)),l=n.__importDefault(e(52103)),v=n.__importDefault(e(41263)),_=e(76003),m=e(22689),p=e(14790),s=e(96702);t.EXTENSION_JSON_URI="vscode://schemas/vscode-extensions",t.OPENSUMI_EXTENSION_JSON_URI="vscode://schemas/opensumi-extensions";let h=class{registerSchema(){this.schemaRegistry.registerSchema(t.OPENSUMI_EXTENSION_JSON_URI,p.OpenSumiExtensionPackageSchema,["package.json"]),this.schemaRegistry.registerSchema(t.EXTENSION_JSON_URI,s.VSCodeExtensionPackageSchema,["package.json"])}appendPropertiesFactory(g){const d=g==="opensumi"?p.OpenSumiExtensionPackageSchema.properties.sumiContributes.properties:s.VSCodeExtensionPackageSchema.properties.contributes.properties;return(u,E)=>{const{extensionPoint:f,jsonSchema:c}=E,y=u.concat(f).filter(Boolean);if((0,l.default)(d,y)){const b=(0,o.default)(d,y.concat("properties"));(0,r.default)(c.properties,b)}(0,v.default)(d,y,c)}}appendOpenSumiProperties(g,d){this.appendPropertiesFactory("opensumi")(g,d)}appendVScodeProperties(g,d){this.appendPropertiesFactory("vscode")(g,d)}appendExtensionPoint(g,d){if(!d)return;const{frameworkKind:u=["vscode"]}=d;u.includes("opensumi")&&this.appendOpenSumiProperties(g,d),u.includes("vscode")&&this.appendVScodeProperties(g,d),this.registerSchema()}registerExtensionPoint(g){g&&this.appendExtensionPoint([],g)}};t.ExtensionsPointServiceImpl=h,n.__decorate([(0,_.Autowired)(m.IJSONSchemaRegistry),n.__metadata("design:type",Object)],h.prototype,"schemaRegistry",void 0),t.ExtensionsPointServiceImpl=h=n.__decorate([(0,_.Injectable)()],h)},23396:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(35018),t),n.__exportStar(e(96702),t),n.__exportStar(e(14790),t)},21634:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserViews=void 0;const n=e(43718);var r;(function(o){o.properties={type:"object",required:["type","view"],defaultSnippets:[{label:"type",bodyText:JSON.stringify({type:"${1:add}",view:[{id:"${2}"}]},null," ")}],properties:{type:{type:"string",enum:["add","replace"]},view:{type:"array",items:{type:"object",required:["id"],defaultSnippets:[{label:'{"id":""}',description:"",bodyText:JSON.stringify({id:"${3}"},null," ")}],properties:{id:{type:"string",description:(0,n.localize)("sumiContributes.browserViews.view.id")},icon:{type:"string",markdownDescription:(0,n.localize)("sumiContributes.browserViews.view.icon")},iconPath:{type:"string",description:(0,n.localize)("sumiContributes.browserViews.view.iconPath")},title:{type:"string",description:(0,n.localize)("sumiContributes.browserViews.view.title")},titleComponentId:{type:"string",description:(0,n.localize)("sumiContributes.browserViews.view.titleComponentId")},expanded:{type:"boolean",description:(0,n.localize)("sumiContributes.browserViews.view.expanded")}}}}}},o.schema={description:(0,n.localize)("sumiContributes.browserViews"),type:"object",properties:{left:{...o.properties,description:(0,n.localize)("sumiContributes.browserViews.left")},right:{...o.properties,description:(0,n.localize)("sumiContributes.browserViews.right")},bottom:{...o.properties,description:(0,n.localize)("sumiContributes.browserViews.bottom")}}}})(r||(t.browserViews=r={}))},57559:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.menus=void 0;const n=e(43718),r=e(93899),o={type:"object",required:["command"],defaultSnippets:[{body:{command:"${1}"}}],properties:{command:{description:(0,n.localize)("sumiContributes.common.command"),type:"string"},when:{description:(0,n.localize)("sumiContributes.common.when"),type:"string"},group:{description:(0,n.localize)("sumiContributes.common.group"),type:"string"}}},l={type:"object",required:["id","title"],properties:{id:{description:(0,n.localize)("sumiContributes.submenus.id"),type:"string"},title:{description:(0,n.localize)("sumiContributes.submenus.title"),type:"string"},group:{description:(0,n.localize)("sumiContributes.common.group"),type:"string"},when:{type:"string",description:(0,n.localize)("sumiContributes.common.when")},icon:{description:(0,n.localize)("sumiContributes.submenus.icon"),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,n.localize)("sumiContributes.submenus.icon.light"),type:"string"},dark:{description:(0,n.localize)("sumiContributes.submenus.dark"),type:"string"}}}]}}},v=[{id:r.MenuId.CommandPalette,description:(0,n.localize)("sumiContributes.menu.api.CommandPalette")},{id:r.MenuId.ActivityBarExtra,description:(0,n.localize)("sumiContributes.menu.api.ActivityBarExtra")},{id:r.MenuId.ActivityBarTopExtra,description:(0,n.localize)("sumiContributes.menu.api.ActivityBarTopExtra")},{id:r.MenuId.DebugBreakpointsContext,description:(0,n.localize)("sumiContributes.menu.api.DebugBreakpointsContext")},{id:r.MenuId.DebugCallStackContext,description:(0,n.localize)("sumiContributes.menu.api.DebugCallStackContext")},{id:r.MenuId.DebugConsoleContext,description:(0,n.localize)("sumiContributes.menu.api.DebugConsoleContext")},{id:r.MenuId.DebugVariablesContext,description:(0,n.localize)("sumiContributes.menu.api.DebugVariablesContext")},{id:r.MenuId.DebugWatchContext,description:(0,n.localize)("sumiContributes.menu.api.DebugWatchContext")},{id:r.MenuId.DebugToolBar,description:(0,n.localize)("sumiContributes.menu.api.DebugToolBar")},{id:r.MenuId.EditorContext,description:(0,n.localize)("sumiContributes.menu.api.EditorContext")},{id:r.MenuId.EditorTitle,description:(0,n.localize)("sumiContributes.menu.api.EditorTitle")},{id:r.MenuId.EditorTitleContext,description:(0,n.localize)("sumiContributes.menu.api.EditorTitleContext")},{id:r.MenuId.ExplorerContext,description:(0,n.localize)("sumiContributes.menu.api.ExplorerContext")},{id:r.MenuId.MenubarAppMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarAppMenu")},{id:r.MenuId.MenubarEditMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarEditMenu")},{id:r.MenuId.MenubarFileMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarFileMenu")},{id:r.MenuId.MenubarGoMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarGoMenu")},{id:r.MenuId.MenubarHelpMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarHelpMenu")},{id:r.MenuId.MenubarViewMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarViewMenu")},{id:r.MenuId.MenubarSelectionMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarSelectionMenu")},{id:r.MenuId.MenubarTerminalMenu,description:(0,n.localize)("sumiContributes.menu.api.MenubarTerminalMenu")},{id:r.MenuId.TerminalInstanceContext,description:(0,n.localize)("sumiContributes.menu.api.TerminalInstanceContext")},{id:r.MenuId.TerminalNewDropdownContext,description:(0,n.localize)("sumiContributes.menu.api.TerminalNewDropdownContext")},{id:r.MenuId.TerminalTabContext,description:(0,n.localize)("sumiContributes.menu.api.TerminalTabContext")},{id:r.MenuId.OpenEditorsContext,description:(0,n.localize)("sumiContributes.menu.api.OpenEditorsContext")},{id:r.MenuId.SCMResourceContext,description:(0,n.localize)("sumiContributes.menu.api.SCMResourceContext")},{id:r.MenuId.SCMResourceGroupContext,description:(0,n.localize)("sumiContributes.menu.api.SCMResourceGroupContext")},{id:r.MenuId.SCMResourceFolderContext,description:(0,n.localize)("sumiContributes.menu.api.SCMResourceFolderContext")},{id:r.MenuId.SCMTitle,description:(0,n.localize)("sumiContributes.menu.api.SCMTitle")},{id:r.MenuId.SCMInput,description:(0,n.localize)("sumiContributes.menu.api.SCMInput")},{id:r.MenuId.SearchContext,description:(0,n.localize)("sumiContributes.menu.api.SearchContext")},{id:r.MenuId.StatusBarContext,description:(0,n.localize)("sumiContributes.menu.api.StatusBarContext")},{id:r.MenuId.ViewItemContext,description:(0,n.localize)("sumiContributes.menu.api.ViewItemContext")},{id:r.MenuId.ViewTitle,description:(0,n.localize)("sumiContributes.menu.api.ViewTitle")},{id:r.MenuId.SettingsIconMenu,description:(0,n.localize)("sumiContributes.menu.api.SettingsIconMenu")}],_=(p,s,h)=>p.reduce((a,g)=>(a[s(g)]=h?h(g):g,a),Object.create(null));var m;(function(p){p.schema={description:(0,n.localize)("sumiContributes.menu"),type:"object",properties:_(v,s=>s.id,s=>({type:"array",description:s.description,items:o}))},p.subMenusSchema={description:(0,n.localize)("sumiContributes.submenus"),type:"object",additionalProperties:l}})(m||(t.menus=m={}))},14790:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenSumiExtensionPackageSchema=void 0;const n=e(43718);t.OpenSumiExtensionPackageSchema={properties:{sumiContributes:{description:(0,n.localize)("sumiContributes.contributes"),type:"object",properties:{},default:{}}}}},9905:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toolbar=void 0;const n=e(43718),r=(_,m)=>`${JSON.stringify(_)}: ${m}`,o={type:"object",properties:{title:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.title")},iconPath:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.iconPath")},iconMaskMode:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.iconMaskMode")},width:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.width")},height:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.height")},showTitle:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.showTitle")},iconForeground:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.iconForeground")},iconBackground:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.iconBackground")},titleForeground:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.titleForeground")},titleBackground:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.titleBackground")},titleSize:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.titleSize")},iconSize:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.iconSize")},background:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.background")},btnStyle:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.btnStyle"),enum:["inline","button"]},btnTitleStyle:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states.btnTitleStyle"),enum:["vertical","horizontal"],enumDescriptions:[(0,n.localize)("sumiContributes.toolbar.actions.button.states.btnTitleStyle.vertical"),(0,n.localize)("sumiContributes.toolbar.actions.button.states.btnTitleStyle.horizontal")]}}},l={type:"object",properties:{backgroundColor:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.backgroundColor")},labelForegroundColor:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.labelForegroundColor")},iconForegroundColor:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.iconForegroundColor")},width:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.width")},minWidth:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states.minWidth")}}};var v;(function(_){_.schema={type:"object",description:(0,n.localize)("sumiContributes.toolbar"),properties:{actions:{type:"array",markdownDescription:(0,n.localize)("sumiContributes.toolbar.actions"),items:{type:"object",required:["id","description"],defaultSnippets:[{label:r({type:"button"},(0,n.localize)("sumiContributes.toolbar.actions.type.button")),body:{id:"${2}",type:"button",description:"${3}",title:"${4}",iconPath:"${5}"}},{label:r({type:"select"},(0,n.localize)("sumiContributes.toolbar.actions.type.select")),body:{id:"${2}",type:"select",description:"${3}",options:["${4}"],defaultValue:"${5}"}}],properties:{id:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.id")},weight:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.weight")},preferredPosition:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition"),properties:{location:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition.location")},group:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition.group")}}},strictPosition:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.strictPosition"),required:["location","group"],defaultSnippets:[{body:{location:"${1}",group:"${2}"}}],properties:{location:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition.location")},group:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.preferredPosition.group")}}},description:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.description")},command:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.command")},defaultState:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.defaultState")}},oneOf:[{required:["type","title","iconPath"],properties:{type:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.type"),enum:["button"],enumDescriptions:[(0,n.localize)("sumiContributes.toolbar.actions.type.button")],default:"button"},title:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.title")},iconPath:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.iconPath")},iconMaskMode:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.iconMaskMode")},states:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.button.states"),additionalProperties:o,properties:{default:o}},popoverComponent:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverComponent")},popoverStyle:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle"),properties:{position:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.position"),enum:["top","bottom"],enumDescriptions:[(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.position.top"),(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.position.bottom")]},horizontalOffset:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.horizontalOffset")},hideOnClickOutside:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.hideOnClickOutside")},noContainerStyle:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.noContainerStyle")},minWidth:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.minWidth")},minHeight:{type:"number",description:(0,n.localize)("sumiContributes.toolbar.actions.popoverStyle.minHeight")}}},when:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.when")}}},{required:["type","options","defaultValue"],properties:{type:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.type"),enum:["select"],enumDescriptions:[(0,n.localize)("sumiContributes.toolbar.actions.type.select")],default:"select"},options:{type:"array",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options"),required:["value"],items:{type:"object",defaultSnippets:[{label:r({value:""},(0,n.localize)("sumiContributes.toolbar.actions.select.options.value")),body:{value:"${1}"}}],properties:{iconPath:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options.iconPath")},iconMaskMode:{type:"boolean",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options.iconMaskMode")},label:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options.label")},value:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.options.value")}}}},defaultValue:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.defaultValue")},optionEqualityKey:{type:"string",description:(0,n.localize)("sumiContributes.toolbar.actions.select.optionEqualityKey")},states:{type:"object",description:(0,n.localize)("sumiContributes.toolbar.actions.select.states"),additionalProperties:l}}}]}}}}})(v||(t.toolbar=v={}))},96702:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSCodeExtensionPackageSchema=t.EXTENSION_IDENTIFIER_PATTERN=void 0;const n=e(43718);t.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",t.VSCodeExtensionPackageSchema={properties:{engines:{type:"object",description:(0,n.localize)("vscode.extension.engines","Engine compatibility."),properties:{vscode:{type:"string",description:(0,n.localize)("vscode.extension.engines.vscode","For VS Code extensions, specifies the VS Code version that the extension is compatible with. Cannot be *. For example: ^0.10.5 indicates compatibility with a minimum VS Code version of 0.10.5."),default:"^1.22.0"}}},publisher:{description:(0,n.localize)("vscode.extension.publisher","The publisher of the VS Code extension."),type:"string"},displayName:{description:(0,n.localize)("vscode.extension.displayName","The display name for the extension used in the VS Code gallery."),type:"string"},categories:{description:(0,n.localize)("vscode.extension.categories","The categories used by the VS Code gallery to categorize the extension."),type:"array",uniqueItems:!0,items:{oneOf:[{type:"string",enum:["Programming Languages","Snippets","Linters","Themes","Debuggers","Other","Keymaps","Formatters","Extension Packs","SCM Providers","Azure","Language Packs"]},{type:"string",const:"Languages",deprecationMessage:(0,n.localize)("vscode.extension.category.languages.deprecated","Use 'Programming Languages' instead")}]}},galleryBanner:{type:"object",description:(0,n.localize)("vscode.extension.galleryBanner","Banner used in the VS Code marketplace."),properties:{color:{description:(0,n.localize)("vscode.extension.galleryBanner.color","The banner color on the VS Code marketplace page header."),type:"string"},theme:{description:(0,n.localize)("vscode.extension.galleryBanner.theme","The color theme for the font used in the banner."),type:"string",enum:["dark","light"]}}},contributes:{description:(0,n.localize)("vscode.extension.contributes","All contributions of the VS Code extension represented by this package."),type:"object",properties:{},default:{}},preview:{type:"boolean",description:(0,n.localize)("vscode.extension.preview","Sets the extension to be flagged as a Preview in the Marketplace.")},activationEvents:{description:(0,n.localize)("vscode.extension.activationEvents","Activation events for the VS Code extension."),type:"array",items:{type:"string",defaultSnippets:[{label:"onLanguage",description:(0,n.localize)("vscode.extension.activationEvents.onLanguage","An activation event emitted whenever a file that resolves to the specified language gets opened."),body:"onLanguage:${1:languageId}"},{label:"onCommand",description:(0,n.localize)("vscode.extension.activationEvents.onCommand","An activation event emitted whenever the specified command gets invoked."),body:"onCommand:${2:commandId}"},{label:"onDebug",description:(0,n.localize)("vscode.extension.activationEvents.onDebug","An activation event emitted whenever a user is about to start debugging or about to setup debug configurations."),body:"onDebug"},{label:"onDebugInitialConfigurations",description:(0,n.localize)("vscode.extension.activationEvents.onDebugInitialConfigurations",'An activation event emitted whenever a "launch.json" needs to be created (and all provideDebugConfigurations methods need to be called).'),body:"onDebugInitialConfigurations"},{label:"onDebugResolve",description:(0,n.localize)("vscode.extension.activationEvents.onDebugResolve","An activation event emitted whenever a debug session with the specific type is about to be launched (and a corresponding resolveDebugConfiguration method needs to be called)."),body:"onDebugResolve:${6:type}"},{label:"onDebugAdapterProtocolTracker",description:(0,n.localize)("vscode.extension.activationEvents.onDebugAdapterProtocolTracker","An activation event emitted whenever a debug session with the specific type is about to be launched and a debug protocol tracker might be needed."),body:"onDebugAdapterProtocolTracker:${6:type}"},{label:"workspaceContains",description:(0,n.localize)("vscode.extension.activationEvents.workspaceContains","An activation event emitted whenever a folder is opened that contains at least a file matching the specified glob pattern."),body:"workspaceContains:${4:filePattern}"},{label:"onFileSystem",description:(0,n.localize)("vscode.extension.activationEvents.onFileSystem","An activation event emitted whenever a file or folder is accessed with the given scheme."),body:"onFileSystem:${1:scheme}"},{label:"onSearch",description:(0,n.localize)("vscode.extension.activationEvents.onSearch","An activation event emitted whenever a search is started in the folder with the given scheme."),body:"onSearch:${7:scheme}"},{label:"onView",body:"onView:${5:viewId}",description:(0,n.localize)("vscode.extension.activationEvents.onView","An activation event emitted whenever the specified view is expanded.")},{label:"onUri",body:"onUri",description:(0,n.localize)("vscode.extension.activationEvents.onUri","An activation event emitted whenever a system-wide Uri directed towards this extension is open.")},{label:"*",description:(0,n.localize)("vscode.extension.activationEvents.star","An activation event emitted on VS Code startup. To ensure a great end user experience, please use this activation event in your extension only when no other activation events combination works in your use-case."),body:"*"}]}},badges:{type:"array",description:(0,n.localize)("vscode.extension.badges","Array of badges to display in the sidebar of the Marketplace's extension page."),items:{type:"object",required:["url","href","description"],properties:{url:{type:"string",description:(0,n.localize)("vscode.extension.badges.url","Badge image URL.")},href:{type:"string",description:(0,n.localize)("vscode.extension.badges.href","Badge link.")},description:{type:"string",description:(0,n.localize)("vscode.extension.badges.description","Badge description.")}}}},markdown:{type:"string",description:(0,n.localize)("vscode.extension.markdown","Controls the Markdown rendering engine used in the Marketplace. Either github (default) or standard."),enum:["github","standard"],default:"github"},qna:{default:"marketplace",description:(0,n.localize)("vscode.extension.qna","Controls the Q&A link in the Marketplace. Set to marketplace to enable the default Marketplace Q & A site. Set to a string to provide the URL of a custom Q & A site. Set to false to disable Q & A altogether."),anyOf:[{type:["string","boolean"],enum:["marketplace",!1]},{type:"string"}]},extensionDependencies:{description:(0,n.localize)("vscode.extension.extensionDependencies","Dependencies to other extensions. The identifier of an extension is always ${publisher}.${name}. For example: vscode.csharp."),type:"array",uniqueItems:!0,items:{type:"string",pattern:t.EXTENSION_IDENTIFIER_PATTERN}},extensionPack:{description:(0,n.localize)("vscode.extension.contributes.extensionPack","A set of extensions that can be installed together. The identifier of an extension is always ${publisher}.${name}. For example: vscode.csharp."),type:"array",uniqueItems:!0,items:{type:"string",pattern:t.EXTENSION_IDENTIFIER_PATTERN}},extensionKind:{description:(0,n.localize)("extensionKind","Define the kind of an extension. `ui` extensions are installed and run on the local machine while `workspace` extensions are run on the remote."),type:"string",enum:["ui","workspace"],enumDescriptions:[(0,n.localize)("ui","UI extension kind. In a remote window, such extensions are enabled only when available on the local machine."),(0,n.localize)("workspace","Workspace extension kind. In a remote window, such extensions are enabled only when available on the remote.")],default:"workspace"},scripts:{type:"object",properties:{"vscode:prepublish":{description:(0,n.localize)("vscode.extension.scripts.prepublish","Script executed before the package is published as a VS Code extension."),type:"string"},"vscode:uninstall":{description:(0,n.localize)("vscode.extension.scripts.uninstall","Uninstall hook for VS Code extension. Script that gets executed when the extension is completely uninstalled from VS Code which is when VS Code is restarted (shutdown and start) after the extension is uninstalled. Only Node scripts are supported."),type:"string"}}},icon:{type:"string",description:(0,n.localize)("vscode.extension.icon","The path to a 128x128 pixel icon.")}}}},53746:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},77273:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FsProviderContribution=t.FileWatcherFailureEvent=t.FileWatcherOverflowEvent=t.FilesChangeEvent=void 0;const n=e(43718);class r extends n.BasicEvent{}t.FilesChangeEvent=r;class o extends n.BasicEvent{}t.FileWatcherOverflowEvent=o;class l extends n.BasicEvent{}t.FileWatcherFailureEvent=l,t.FsProviderContribution=Symbol("FsProviderContribution")},136:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashCalculateContribution=void 0;const n=e(85608),r=e(76003),o=e(98295),l=e(96405),v=e(66549);let _=class{async initialize(){try{await this.hashCalculateService.initialize()}catch(p){throw new Error(`hashCalculateService init fail:
33880
33880
  ${p.message}`)}}};t.HashCalculateContribution=_,n.__decorate([(0,r.Autowired)(l.IHashCalculateService),n.__metadata("design:type",Object)],_.prototype,"hashCalculateService",void 0),t.HashCalculateContribution=_=n.__decorate([(0,o.Domain)(v.ClientAppContribution)],_)},41869:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(43718),t),n.__exportStar(e(48560),t),n.__exportStar(e(38578),t),n.__exportStar(e(36206),t),n.__exportStar(e(32796),t),n.__exportStar(e(78132),t),n.__exportStar(e(41118),t),n.__exportStar(e(37015),t),n.__exportStar(e(16884),t),n.__exportStar(e(68456),t),n.__exportStar(e(77273),t),n.__exportStar(e(42637),t),n.__exportStar(e(89378),t),n.__exportStar(e(53746),t),n.__exportStar(e(95040),t),n.__exportStar(e(80832),t),n.__exportStar(e(75694),t),n.__exportStar(e(79951),t),n.__exportStar(e(17544),t),n.__exportStar(e(53736),t),n.__exportStar(e(66963),t),n.__exportStar(e(22689),t),n.__exportStar(e(74404),t),n.__exportStar(e(45670),t),n.__exportStar(e(22366),t),n.__exportStar(e(18193),t),n.__exportStar(e(67304),t),n.__exportStar(e(66894),t),n.__exportStar(e(90697),t),n.__exportStar(e(26542),t),n.__exportStar(e(5910),t),n.__exportStar(e(61943),t),n.__exportStar(e(23396),t),n.__exportStar(e(40827),t),n.__exportStar(e(53736),t)},41118:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(95376),t)},95376:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.NO_KEYBINDING_NAME=t.KeybindingRegistryImpl=t.KeybindingService=t.keybindingServicePath=t.KeybindingRegistry=t.KeybindingContribution=t.KeybindingsResultCollection=t.Keybinding=t.KeybindingWeight=t.KeybindingScope=void 0;const r=e(85608),o=e(76003),l=e(43718),v=e(23268),_=e(53736),m=e(81331),p=e(7967),s=e(26542);var h;(function(E){E[E.DEFAULT=0]="DEFAULT",E[E.USER=1]="USER",E[E.WORKSPACE=2]="WORKSPACE",E[E.END=3]="END"})(h||(t.KeybindingScope=h={}));var a;(function(E){E[E.Default=0]="Default",E[E.EditorCore=1]="EditorCore",E[E.EditorContrib=100]="EditorContrib",E[E.WorkbenchContrib=200]="WorkbenchContrib",E[E.BuiltinExtension=300]="BuiltinExtension",E[E.ExternalExtension=400]="ExternalExtension"})(a||(t.KeybindingWeight=a={})),function(E){E.length=E.END-E.DEFAULT}(h||(t.KeybindingScope=h={}));var g;(function(E){function f(y){const b={command:y.command,keybinding:y.keybinding};return JSON.stringify(b)}E.stringify=f;function c(y){return!!y&&y===Object(y)&&"command"in y&&"keybinding"in y}E.is=c})(g||(t.Keybinding=g={}));var d;(function(E){class f{constructor(){this.full=[],this.partial=[],this.shadow=[]}merge(y){return this.full.push(...y.full),this.partial.push(...y.partial),this.shadow.push(...y.shadow),this}filter(y){const b=new f;return b.full=this.full.filter(y),b.partial=this.partial.filter(y),b.shadow=this.shadow.filter(y),b}}E.KeybindingsResult=f})(d||(t.KeybindingsResultCollection=d={})),t.KeybindingContribution=Symbol("KeybindingContribution"),t.KeybindingRegistry=Symbol("KeybindingRegistry"),t.keybindingServicePath="/services/keybindings",t.KeybindingService=Symbol("KeybindingService");let u=n=class{constructor(){this.keymaps=[...Array(h.length)].map(()=>[]),this.keySequence=[],this.convertKeySequence=[],this.modifierKeySequence=[],this._inComposition=!1,this.keybindingsChanged=new l.Emitter,this.handleCompositionStart=()=>{this._inComposition=!0},this.handleCompositionEnd=()=>{this._inComposition=!1}}async initialize(){await this.keyboardLayoutService.initialize(),this.keyboardLayoutService.onKeyboardLayoutChanged(()=>{this.clearResolvedKeybindings()});for(const f of this.keybindingContributionProvider.getContributions())f.registerKeybindings(this)}get onKeybindingsChanged(){return this.keybindingsChanged.event}registerKeybinding(f,c=h.DEFAULT){return this.doRegisterKeybinding(f,c)}registerKeybindings(f,c=h.DEFAULT){return this.doRegisterKeybindings(f,c)}convertMonacoWhen(f){return f?typeof f=="string"?f:f.serialize():""}unregisterKeybinding(f,c=h.DEFAULT){const y=g.is(f)?f.keybinding:f,b=this.keymaps[c];let A;g.is(f)&&f.when?A=b.filter(S=>this.isKeybindingEqual(S.keybinding,f.keybinding)&&this.isKeybindingWhenEqual(S.when,f.when)):A=b.filter(S=>this.isKeybindingEqual(S.keybinding,y)),A.forEach(S=>{const w=b.indexOf(S);w>=0&&b.splice(w,1)})}isKeybindingWhenEqual(f,c){return this.convertMonacoWhen(f)===this.convertMonacoWhen(c)}isKeybindingEqual(f,c){return this.acceleratorForSequenceKeyString(f)===this.acceleratorForSequenceKeyString(c)}acceleratorForSequenceKeyString(f){const y=f.split(" ").map(b=>p.KeyCode.parse(b));return this.acceleratorForSequence(y,"+").join(" ")}doRegisterKeybindings(f,c=h.DEFAULT){const y=new l.Disposable;for(const b of f)y.addDispose(this.doRegisterKeybinding(b,c));return y}doRegisterKeybinding(f,c=h.DEFAULT){try{this.resolveKeybinding(f,!0),this.keymaps[c].unshift(f)}catch(y){this.logger.warn(`Could not register keybinding:
@@ -33895,14 +33895,14 @@ ${y}`)}return this.keybindingsChanged.fire({affectsCommands:[f.command]}),{dispo
33895
33895
  }
33896
33896
  `}async selectDebugType(){const b=this.workbenchEditorService.currentEditor;if(!b)return;const A=b.currentDocumentModel;if(!A)return;const S=await this.debug.getDebuggersForLanguage(A.languageId);return this.quickPick.show(S.map(({label:w,type:I})=>({label:w,value:I}),{placeholder:"Select Environment"}))}async load(){await this.whenReady;const b=this.debugConfigurationStorage.get("configurations");b&&b.current&&(this.current=this.find(b.current.name,b.current.workspaceFolderUri,b.current.index))}async save(){const b={},{current:A}=this;A&&(b.current={name:A.configuration.name,workspaceFolderUri:A.workspaceFolderUri,index:A.index}),await this.debugConfigurationStorage.set("configurations",b)}canSetBreakpointsIn(b){if(!b)return!1;const A=b.getLanguageId();return!A||A==="jsonc"||A==="log"?!1:this.debugPreferences["preference.debug.allowBreakpointsEverywhere"]?!0:this.breakpointModeIdsSet.has(A)}addSupportBreakpoints(b){this.breakpointModeIdsSet.add(b)}removeSupportBreakpoints(b){this.breakpointModeIdsSet.delete(b)}registerDebugger(b){if(b.type!=="*"){if(this.getDebugger(b.type))return;this.debuggers.push(b)}}getDebugger(b){return this.debuggers.filter(A=>A.type===b).pop()}getDebuggers(){return this.debuggers.filter(b=>!!b)}getDebuggerLabel(b){const A=this.internalDebugConfigurationOverride.get(b);if(A)return A.label||b;const S=this.internalDebugConfigurationProviders.get(b);if(S)return S.label||b;const w=this.getDebugger(b);if(w)return w.label||b}getDebuggerExtraPopupHint(b){const A=this.internalDebugConfigurationOverride.get(b);if(A)return A.popupHint||void 0;const S=this.internalDebugConfigurationProviders.get(b);if(S)return S.popupHint||void 0}};t.DebugConfigurationManager=c,c.DEFAULT_UPDATE_MODEL_TIMEOUT=500,r.__decorate([(0,l.Autowired)(h.IWorkspaceService),r.__metadata("design:type",Object)],c.prototype,"workspaceService",void 0),r.__decorate([(0,l.Autowired)(_.WorkbenchEditorService),r.__metadata("design:type",_.WorkbenchEditorService)],c.prototype,"workbenchEditorService",void 0),r.__decorate([(0,l.Autowired)(d.IDebugServer),r.__metadata("design:type",Object)],c.prototype,"debug",void 0),r.__decorate([(0,l.Autowired)(s.QuickPickService),r.__metadata("design:type",Object)],c.prototype,"quickPick",void 0),r.__decorate([(0,l.Autowired)(v.IContextKeyService),r.__metadata("design:type",Object)],c.prototype,"contextKeyService",void 0),r.__decorate([(0,l.Autowired)(p.IFileServiceClient),r.__metadata("design:type",Object)],c.prototype,"filesystem",void 0),r.__decorate([(0,l.Autowired)(v.PreferenceService),r.__metadata("design:type",Object)],c.prototype,"preferences",void 0),r.__decorate([(0,l.Autowired)(v.PreferenceConfigurations),r.__metadata("design:type",v.PreferenceConfigurations)],c.prototype,"preferenceConfigurations",void 0),r.__decorate([(0,l.Autowired)(a.WorkspaceVariableContribution),r.__metadata("design:type",a.WorkspaceVariableContribution)],c.prototype,"workspaceVariables",void 0),r.__decorate([(0,l.Autowired)(v.StorageProvider),r.__metadata("design:type",Function)],c.prototype,"storageProvider",void 0),r.__decorate([(0,l.Autowired)(v.CommandService),r.__metadata("design:type",Object)],c.prototype,"commandService",void 0),r.__decorate([(0,l.Autowired)(f.DebugPreferences),r.__metadata("design:type",Object)],c.prototype,"debugPreferences",void 0),r.__decorate([(0,l.Autowired)(m.IEditorDocumentModelService),r.__metadata("design:type",Object)],c.prototype,"documentService",void 0),r.__decorate([(0,l.Autowired)(m.EditorCollectionService),r.__metadata("design:type",m.EditorCollectionService)],c.prototype,"editorCollectionService",void 0),r.__decorate([(0,l.Autowired)(v.ILoggerManagerClient),r.__metadata("design:type",Object)],c.prototype,"loggerManagerClient",void 0),t.DebugConfigurationManager=c=n=r.__decorate([(0,l.Injectable)(),r.__metadata("design:paramtypes",[])],c)},11357:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConfigurationModel=void 0;const n=e(41869),r=e(64582);class o{constructor(v,_){this.workspaceFolderUri=v,this.preferences=_,this.onDidChangeEmitter=new n.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.toDispose=new n.DisposableCollection(this.onDidChangeEmitter),this.reconcile(),this.toDispose.push(this.preferences.onPreferenceChanged(m=>{m.preferenceName==="launch"&&m.affects(v)&&this.reconcile()}))}get uri(){return this.json.uri}dispose(){this.toDispose.dispose()}get onDispose(){return this.toDispose.onDispose}get configurations(){return this.json.configurations}async reconcile(){this.json=this.parseConfigurations(),this.onDidChangeEmitter.fire(void 0)}parseConfigurations(){const v=[],{configUri:_,value:m}=this.preferences.resolve("launch",void 0,this.workspaceFolderUri);if((0,n.isDefined)(m)&&"configurations"in m&&Array.isArray(m.configurations))for(const p of m.configurations)r.DebugConfiguration.is(p)&&v.push(p);return{uri:_,configurations:v}}}t.DebugConfigurationModel=o},59053:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugContribution=t.DebugBreakpointWidgetCommands=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(21634),v=e(68456),_=e(93899),m=e(43718),p=e(57517),s=e(14951),h=e(2156),a=e(63067),g=e(24429),d=n.__importStar(e(20868)),u=e(64582),E=e(4983),f=e(99797),c=e(85815),y=e(17280),b=e(37499),A=e(31141),S=e(40453),w=e(69946),I=e(38029),D=e(52943),T=e(78606),R=n.__importDefault(e(96547)),M=e(97319),O=e(85347),x=e(16067),k=e(20676),F=e(96090),L=e(35199),N=e(32756),U=e(18028),W=e(28875),j=e(64611),Q=/launch\.json$/;var G;(function(V){V[V.json=0]="json",V[V.editor=1]="editor"})(G||(G={}));var X;(function(V){V.ACCEPT={id:"debug.breakpointWidget.accept"},V.CLOSE={id:"debug.breakpointWidget.close"}})(X||(t.DebugBreakpointWidgetCommands=X={}));let $=class{constructor(){this.schema=A.debugPreferencesSchema,this.firstSessionStart=!0,this.openedViewSessions=new Set}get selectedBreakpoint(){const{selectedBreakpoint:H}=this.breakpointManager;return H}registerEditorComponent(H){H.registerEditorSideWidget({id:u.DEBUG_FLOATING_CLICK_WIDGET,component:c.FloatingClickWidget,displaysOnResource:K=>{const{configUri:Y}=this.preferences.resolve("launch");return Y?Y.isEqual(K.uri)&&Q.test(K.uri.toString()):!1}})}registerComponent(H){H.register("@opensumi/ide-debug",[{component:j.DebugWatchView,id:u.DEBUG_WATCH_ID,name:(0,o.localize)("debug.watch.title"),when:`${E.CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(!0)} || ${E.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,collapsed:!1},{component:U.DebugCallStackView,id:u.DEBUG_STACK_ID,name:(0,o.localize)("debug.callStack.title"),when:`${E.CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(!0)} || ${E.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,collapsed:!1},{component:W.DebugVariableView,id:u.DEBUG_VARIABLES_ID,name:(0,o.localize)("debug.variables.title"),when:`${E.CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(!0)} || ${E.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,collapsed:!1},{component:O.DebugBreakpointView,id:u.DEBUG_BREAKPOINTS_ID,name:(0,o.localize)("debug.breakpoints.title"),when:`${E.CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(!0)} || ${E.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,collapsed:!1},{component:g.WelcomeView,id:u.DEBUG_WELCOME_ID,name:"Debug Welcome",when:`${E.CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(!1)} && ${E.CONTEXT_IN_DEBUG_MODE.equalsTo(!1)}`,initialProps:{viewId:u.DEBUG_WELCOME_ID}}],{iconClass:(0,o.getIcon)("debug"),priority:7,title:(0,o.localize)("debug.container.title"),containerId:u.DEBUG_CONTAINER_ID,titleComponent:k.DebugConfigurationContainerView,activateKeyBinding:"ctrlcmd+shift+d"})}async initialize(){this.fileSystem.registerProvider(u.DEBUG_SCHEME,this.shadowFileServiceProvider),this.debugEditorController.init(),this.debugProgressService.run(this.sessionManager)}onStart(){this.viewsRegistry.registerViewWelcomeContent(u.DEBUG_WELCOME_ID,{content:(0,o.formatLocalize)("welcome-view.noLaunchJson",o.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION.id,u.DEBUG_COMMANDS.SHOW_ALL_AUTOMATIC_DEBUG_CONFIGURATIONS.id),when:"default"}),this.sessionManager.onDidCreateDebugSession(H=>{this.debugModel.init(H)}),this.sessionManager.onDidStartDebugSession(H=>{const{internalConsoleOptions:K}=H.configuration,Y=H.configuration.openDebug||this.debugPreferences["debug.openDebug"];if(Y==="openOnSessionStart"||Y==="openOnFirstSessionStart")this.firstSessionStart&&this.openDebugView();else if(Y!=="neverOpen"){const Z=H.parentSession,oe=Z?.id||H.id;this.openedViewSessions.has(oe)||(this.openedViewSessions.add(oe),this.openDebugView())}(K==="openOnSessionStart"||K==="openOnFirstSessionStart"&&this.firstSessionStart)&&this.openDebugConsoleView(),this.firstSessionStart=!1,this.commandService.tryExecuteCommand("statusbar.changeBackgroundColor","var(--statusBar-debuggingBackground)"),this.commandService.tryExecuteCommand("statusbar.changeColor","var(--statusBar-debuggingForeground)")}),this.sessionManager.onDidStopDebugSession(H=>{const{openDebug:K}=H.configuration;K==="openOnDebugBreak"&&this.openDebugView()}),this.sessionManager.onDidDestroyDebugSession(()=>{this.sessionManager.sessions.length===0&&(this.commandService.tryExecuteCommand("statusbar.changeBackgroundColor","var(--statusBar-background)"),this.commandService.tryExecuteCommand("statusbar.changeColor"))}),this.configurations.whenReady.then(()=>{this.configurations.load(),this.configurations.onDidChange(()=>this.configurations.save())}),this.breakpointManager.load().then(()=>{this.breakpointManager.onDidChangeBreakpoints(()=>this.breakpointManager.save()),this.breakpointManager.onDidChangeExceptionsBreakpoints(()=>this.breakpointManager.save()),this.breakpointManager.onDidChangeMarkers(()=>this.breakpointManager.save())}),this.extensionsPointService.appendExtensionPoint(["browserViews","properties"],{extensionPoint:u.DEBUG_CONTAINER_ID,frameworkKind:["opensumi"],jsonSchema:{...l.browserViews.properties,description:(0,o.formatLocalize)("sumiContributes.browserViews.location.custom",(0,o.localize)("menu-bar.title.debug"))}})}openDebugView(){const H=this.mainlayoutService.getTabbarHandler(u.DEBUG_CONTAINER_ID);H&&!H.isVisible&&H.activate()}openDebugConsoleView(){this.debugConsole.isVisible||this.debugConsole.activate()}onDidRender(){const H=this.mainlayoutService.getTabbarHandler(u.DEBUG_CONTAINER_ID);H&&H.setTitleComponent(k.DebugConfigurationContainerView)}registerCommands(H){H.registerCommand(o.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION,{execute:(K=G.json)=>{if(K===G.editor)return this.debugConfigurationService.openLaunchEditor();this.debugConfigurationService.openConfiguration()}}),H.registerCommand(u.DEBUG_COMMANDS.REMOVE_ALL_BREAKPOINTS,{execute:()=>{this.debugBreakpointsService.removeAllBreakpoints()}}),H.registerCommand(u.DEBUG_COMMANDS.START,{execute:()=>{this.debugConfigurationService.start()}}),H.registerCommand(u.DEBUG_COMMANDS.STOP,{execute:()=>{this.debugToolbarService.doStop()}}),H.registerCommand(u.DEBUG_COMMANDS.NEXT,{execute:()=>{this.debugToolbarService.doStepIn()}}),H.registerCommand(u.DEBUG_COMMANDS.PREV,{execute:()=>{this.debugToolbarService.doStepOut()}}),H.registerCommand(u.DEBUG_COMMANDS.CONTINUE,{execute:()=>{this.debugToolbarService.doContinue()}}),H.registerCommand(u.DEBUG_COMMANDS.PAUSE,{execute:()=>{this.debugToolbarService.doPause()}}),H.registerCommand(u.DEBUG_COMMANDS.OVER,{execute:()=>{this.debugToolbarService.doStepOver()}}),H.registerCommand(u.DEBUG_COMMANDS.RESTART,{execute:()=>{this.debugToolbarService.doRestart()}}),H.registerCommand(u.DEBUG_COMMANDS.TOGGLE_BREAKPOINTS,{execute:()=>{this.debugBreakpointsService.toggleBreakpoints()}}),H.registerCommand(u.DEBUG_COMMANDS.ACTIVE_BREAKPOINTS,{execute:()=>{const{enable:K}=this.debugBreakpointsService;K.get()||this.debugBreakpointsService.toggleBreakpoints()}}),H.registerCommand(u.DEBUG_COMMANDS.DEACTIVE_BREAKPOINTS,{execute:()=>{const{enable:K}=this.debugBreakpointsService;K.get()&&this.debugBreakpointsService.toggleBreakpoints()}}),H.registerCommand(u.DEBUG_COMMANDS.EDIT_BREAKPOINT,{execute:async K=>{this.reporterService.point(u.DEBUG_REPORT_NAME===null||u.DEBUG_REPORT_NAME===void 0?void 0:u.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,"edit");const Y=this.debugEditorController.model;if(!Y)return;const{uri:Z}=Y,oe=this.breakpointManager.getBreakpoint(Z,K.lineNumber);oe&&(this.breakpointManager.selectedBreakpoint={breakpoint:oe,model:Y});const{selectedBreakpoint:ie}=this;if(ie){const{openBreakpointView:he}=ie.model;let me="condition";if(ie.breakpoint){const q=ie.breakpoint.raw;q.condition?me="condition":q.hitCondition?me="hitCondition":q.logMessage&&(me="logMessage")}he(K,ie.breakpoint&&ie.breakpoint.raw,me)}},isVisible:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint}),H.registerCommand(u.DEBUG_COMMANDS.DISABLE_BREAKPOINT,{execute:async K=>{const{selectedBreakpoint:Y}=this;if(Y){const{uri:Z}=Y.model,oe=this.breakpointManager.getBreakpoint(Z,K.lineNumber);oe&&(oe.enabled=!1,this.breakpointManager.updateBreakpoint(oe))}},isVisible:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint&&this.selectedBreakpoint.breakpoint.enabled,isEnabled:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint&&this.selectedBreakpoint.breakpoint.enabled}),H.registerCommand(u.DEBUG_COMMANDS.ENABLE_BREAKPOINT,{execute:async K=>{const{selectedBreakpoint:Y}=this;if(Y){const{uri:Z}=Y.model,oe=this.breakpointManager.getBreakpoint(Z,K.lineNumber);oe&&(oe.enabled=!0,this.breakpointManager.updateBreakpoint(oe))}},isVisible:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint&&!this.selectedBreakpoint.breakpoint.enabled,isEnabled:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint&&!this.selectedBreakpoint.breakpoint.enabled}),H.registerCommand(u.DEBUG_COMMANDS.DELETE_BREAKPOINT,{execute:async K=>{const{selectedBreakpoint:Y}=this;if(Y){const{uri:Z}=Y.model,oe=this.breakpointManager.getBreakpoint(Z,K.lineNumber);oe&&this.breakpointManager.delBreakpoint(oe)}},isVisible:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint}),H.registerCommand(u.DEBUG_COMMANDS.ADD_CONDITIONAL_BREAKPOINT,{execute:async K=>{const{selectedBreakpoint:Y}=this;if(Y){const{uri:Z,openBreakpointView:oe,toggleBreakpoint:ie}=Y.model;ie(K);const he=this.breakpointManager.getBreakpoint(Z,K.lineNumber);he&&(this.breakpointManager.selectedBreakpoint={breakpoint:he,model:Y.model}),oe(K,Y.breakpoint&&Y.breakpoint.raw,"condition")}},isVisible:()=>!!this.selectedBreakpoint&&!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!this.selectedBreakpoint.breakpoint}),H.registerCommand(u.DEBUG_COMMANDS.ADD_LOGPOINT,{execute:async K=>{const{selectedBreakpoint:Y}=this;if(Y){const{openBreakpointView:Z,toggleBreakpoint:oe,uri:ie}=Y.model;oe(K);const he=this.breakpointManager.getBreakpoint(ie,K.lineNumber);he&&(this.breakpointManager.selectedBreakpoint={breakpoint:he,model:Y.model}),Z(K,Y.breakpoint&&Y.breakpoint.raw,"logMessage")}},isVisible:()=>!!this.selectedBreakpoint&&!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!this.selectedBreakpoint.breakpoint}),H.registerCommand(u.DEBUG_COMMANDS.ADD_BREAKPOINT,{execute:async K=>{const{selectedBreakpoint:Y}=this;if(Y){const{toggleBreakpoint:Z}=Y.model;Z(K)}},isVisible:()=>!!this.selectedBreakpoint&&!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!this.selectedBreakpoint.breakpoint}),H.registerCommand(X.ACCEPT,{execute:()=>{const{selectedBreakpoint:K}=this;if(K){const{acceptBreakpoint:Y}=K.model;Y()}},isVisible:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint}),H.registerCommand(X.CLOSE,{execute:()=>{const{selectedBreakpoint:K}=this;if(K){const{closeBreakpointView:Y}=K.model;Y()}},isVisible:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint,isEnabled:()=>!!this.selectedBreakpoint&&!!this.selectedBreakpoint.breakpoint}),H.registerCommand(u.DEBUG_COMMANDS.RUN_TO_CURSOR,{execute:K=>{this.debugRunToCursorService.run(K)},isEnabled:()=>this.debugContextKey.contextDebugState.get()==="Stopped"}),H.registerCommand(u.DEBUG_COMMANDS.FORCE_RUN_TO_CURSOR,{execute:K=>{this.debugRunToCursorService.run(K,!0)},isEnabled:()=>this.debugContextKey.contextDebugState.get()==="Stopped"}),H.registerCommand(u.DEBUG_COMMANDS.SHOW_ALL_AUTOMATIC_DEBUG_CONFIGURATIONS,{execute:async()=>{const K=await this.configurations.showDynamicConfigurationsTypesQuickPick();if(K)return await this.debugConfigurationService.showDynamicQuickPick(K)},isEnabled:()=>!0})}registerToolbarItems(H){H.registerItem({id:u.DEBUG_COMMANDS.REMOVE_ALL_BREAKPOINTS.id,command:u.DEBUG_COMMANDS.REMOVE_ALL_BREAKPOINTS.id,iconClass:(0,o.getIcon)("close-all"),viewId:u.DEBUG_BREAKPOINTS_ID,tooltip:(0,o.localize)("debug.breakpoint.removeAll")}),H.registerItem({id:u.DEBUG_COMMANDS.DEACTIVE_BREAKPOINTS.id,command:u.DEBUG_COMMANDS.DEACTIVE_BREAKPOINTS.id,iconClass:(0,o.getIcon)("deactivate-breakpoints"),viewId:u.DEBUG_BREAKPOINTS_ID,tooltip:(0,o.localize)("debug.breakpoint.deactive"),when:E.CONTEXT_ACTIVE_BREAKPOINTS.equalsTo(!0)}),H.registerItem({id:u.DEBUG_COMMANDS.ACTIVE_BREAKPOINTS.id,command:u.DEBUG_COMMANDS.ACTIVE_BREAKPOINTS.id,iconClass:`${(0,o.getIcon)("activate-breakpoints")} ${R.default.debug_activate_breakpoints_icon}`,viewId:u.DEBUG_BREAKPOINTS_ID,tooltip:(0,o.localize)("debug.breakpoint.active"),when:E.CONTEXT_ACTIVE_BREAKPOINTS.equalsTo(!1)})}registerSchema(H){H.registerSchema(u.launchDefaultSchemaUri,w.launchSchema,["launch.json"])}registerKeybindings(H){H.registerKeybinding({command:u.DEBUG_COMMANDS.START.id,keybinding:"f5",when:`!${E.CONTEXT_IN_DEBUG_MODE.raw}`}),H.registerKeybinding({command:u.DEBUG_COMMANDS.CONTINUE.id,keybinding:"f5",when:E.CONTEXT_IN_DEBUG_MODE.raw}),H.registerKeybinding({command:u.DEBUG_COMMANDS.STOP.id,keybinding:"shift+f5",when:E.CONTEXT_IN_DEBUG_MODE.raw}),H.registerKeybinding({command:u.DEBUG_COMMANDS.NEXT.id,keybinding:"f11",when:E.CONTEXT_IN_DEBUG_MODE.raw}),H.registerKeybinding({command:u.DEBUG_COMMANDS.PREV.id,keybinding:"shift+f11",when:E.CONTEXT_IN_DEBUG_MODE.raw}),H.registerKeybinding({command:u.DEBUG_COMMANDS.OVER.id,keybinding:"f10",when:E.CONTEXT_IN_DEBUG_MODE.raw}),H.registerKeybinding({command:u.DEBUG_COMMANDS.RESTART.id,keybinding:"shift+ctrlcmd+f5",when:E.CONTEXT_IN_DEBUG_MODE.raw}),H.registerKeybinding({command:X.ACCEPT.id,keybinding:"enter",when:E.CONTEXT_BREAKPOINT_INPUT_FOCUSED.raw}),H.registerKeybinding({command:X.CLOSE.id,keybinding:"esc",when:E.CONTEXT_BREAKPOINT_INPUT_FOCUSED.raw}),H.registerKeybinding({command:u.DEBUG_COMMANDS.EXCEPTION_WIDGET_CLOSE.id,keybinding:"esc",when:E.CONTEXT_EXCEPTION_WIDGET_VISIBLE.raw})}registerMenus(H){H.registerMenuItem(_.MenuId.DebugBreakpointsContext,{command:u.DEBUG_COMMANDS.DELETE_BREAKPOINT.id,group:"1_has_breakpoint",order:1}),H.registerMenuItem(_.MenuId.DebugBreakpointsContext,{command:u.DEBUG_COMMANDS.EDIT_BREAKPOINT.id,group:"1_has_breakpoint",order:2}),H.registerMenuItem(_.MenuId.DebugBreakpointsContext,{command:u.DEBUG_COMMANDS.DISABLE_BREAKPOINT.id,group:"1_has_breakpoint",order:3}),H.registerMenuItem(_.MenuId.DebugBreakpointsContext,{command:u.DEBUG_COMMANDS.ENABLE_BREAKPOINT.id,group:"1_has_breakpoint",order:4}),H.registerMenuItem(_.MenuId.DebugBreakpointsContext,{command:u.DEBUG_COMMANDS.ADD_BREAKPOINT.id,group:"2_has_not_breakpoint"}),H.registerMenuItem(_.MenuId.DebugBreakpointsContext,{command:u.DEBUG_COMMANDS.ADD_CONDITIONAL_BREAKPOINT.id,group:"2_has_not_breakpoint"}),H.registerMenuItem(_.MenuId.DebugBreakpointsContext,{command:u.DEBUG_COMMANDS.ADD_LOGPOINT.id,group:"2_has_not_breakpoint"}),H.registerMenuItem(_.MenuId.EditorContext,{command:{id:u.DEBUG_COMMANDS.RUN_TO_CURSOR.id,label:u.DEBUG_COMMANDS.RUN_TO_CURSOR.label||""},when:`${E.CONTEXT_IN_DEBUG_MODE.raw}`,group:"debug",order:2}),H.registerMenuItem(_.MenuId.EditorContext,{command:{id:u.DEBUG_COMMANDS.FORCE_RUN_TO_CURSOR.id,label:u.DEBUG_COMMANDS.FORCE_RUN_TO_CURSOR.label||""},when:`${E.CONTEXT_IN_DEBUG_MODE.raw}`,group:"debug",order:2}),H.registerMenuItem(_.MenuId.EditorTitle,{submenu:_.MenuId.EditorTitleRun,label:(0,o.localize)("debug.menu.title.run"),iconClass:(0,o.getIcon)("start"),group:"navigation",order:-1})}isPosition(H){return H instanceof d.Position}registerEditorFeature(H){let K;H.registerEditorFeatureContribution({contribute:Y=>(K=this.injector.get(D.DebugEditorContribution,[Y]),K.contribute(Y))}),(0,m.runWhenIdle)(()=>{K?.registerDecorationType()}),this.preferenceSettings.setEnumLabels("debug.console.filter.mode",{filter:(0,o.localize)("preference.debug.console.filter.mode.filter"),matcher:(0,o.localize)("preference.debug.console.filter.mode.matcher")})}};t.DebugContribution=$,n.__decorate([(0,r.Autowired)(a.IMainLayoutService),n.__metadata("design:type",Object)],$.prototype,"mainlayoutService",void 0),n.__decorate([(0,r.Autowired)(f.BreakpointManager),n.__metadata("design:type",f.BreakpointManager)],$.prototype,"breakpointManager",void 0),n.__decorate([(0,r.Autowired)(b.DebugConfigurationManager),n.__metadata("design:type",b.DebugConfigurationManager)],$.prototype,"configurations",void 0),n.__decorate([(0,r.Autowired)(u.IDebugModelManager),n.__metadata("design:type",Object)],$.prototype,"debugEditorController",void 0),n.__decorate([(0,r.Autowired)(M.DebugBreakpointsService),n.__metadata("design:type",M.DebugBreakpointsService)],$.prototype,"debugBreakpointsService",void 0),n.__decorate([(0,r.Autowired)(N.DebugViewModel),n.__metadata("design:type",N.DebugViewModel)],$.prototype,"debugModel",void 0),n.__decorate([(0,r.Autowired)(A.DebugPreferences),n.__metadata("design:type",Object)],$.prototype,"debugPreferences",void 0),n.__decorate([(0,r.Autowired)(L.DebugConsoleService),n.__metadata("design:type",L.DebugConsoleService)],$.prototype,"debugConsole",void 0),n.__decorate([(0,r.Autowired)(x.DebugConfigurationService),n.__metadata("design:type",x.DebugConfigurationService)],$.prototype,"debugConfigurationService",void 0),n.__decorate([(0,r.Autowired)(u.IDebugSessionManager),n.__metadata("design:type",I.DebugSessionManager)],$.prototype,"sessionManager",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],$.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(F.DebugToolbarService),n.__metadata("design:type",F.DebugToolbarService)],$.prototype,"debugToolbarService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],$.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],$.prototype,"preferences",void 0),n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],$.prototype,"reporterService",void 0),n.__decorate([(0,r.Autowired)(a.IViewsRegistry),n.__metadata("design:type",Object)],$.prototype,"viewsRegistry",void 0),n.__decorate([(0,r.Autowired)(s.IShadowFileProvider),n.__metadata("design:type",Object)],$.prototype,"shadowFileServiceProvider",void 0),n.__decorate([(0,r.Autowired)(s.IFileServiceClient),n.__metadata("design:type",h.FileServiceClient)],$.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],$.prototype,"preferenceSettings",void 0),n.__decorate([(0,r.Autowired)(S.DebugProgressService),n.__metadata("design:type",S.DebugProgressService)],$.prototype,"debugProgressService",void 0),n.__decorate([(0,r.Autowired)(T.DebugRunToCursorService),n.__metadata("design:type",T.DebugRunToCursorService)],$.prototype,"debugRunToCursorService",void 0),n.__decorate([(0,r.Autowired)(y.DebugContextKey),n.__metadata("design:type",y.DebugContextKey)],$.prototype,"debugContextKey",void 0),n.__decorate([(0,r.Autowired)(m.IExtensionsSchemaService),n.__metadata("design:type",Object)],$.prototype,"extensionsPointService",void 0),t.DebugContribution=$=n.__decorate([(0,o.Domain)(o.ClientAppContribution,o.ComponentContribution,v.TabBarToolbarContribution,o.CommandContribution,o.KeybindingContribution,o.JsonSchemaContribution,o.PreferenceContribution,_.MenuContribution,p.BrowserEditorContribution)],$)},84303:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugExceptionWidget=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=n.__importDefault(e(25873)),l=e(76003),v=e(41869),_=e(43718),m=e(20303),p=e(31324),s=e(58542);e(39889);function h({info:g,layout:d}){var u;const E=(0,v.useInjectable)(s.LinkDetector),f=(0,r.useRef)(null);return r.default.useEffect(()=>{var c;f.current&&f.current.appendChild(E.linkify(((c=g.details)===null||c===void 0?void 0:c.stackTrace)||"",!0)),d()},[g.details,(u=g.details)===null||u===void 0?void 0:u.stackTrace,f]),r.default.createElement("div",{className:"exception_widget"},r.default.createElement("div",{className:"title"},r.default.createElement("div",{className:"label"},g.id?(0,_.formatLocalize)("debug.widget.exception.thrownWithId",g.id):(0,_.localize)("debug.widget.exception.thrown"))),g.description?r.default.createElement("div",{className:"description"},g.description):null,g.details&&g.details.stackTrace?r.default.createElement("div",{className:"stack_trace",ref:f}):null)}let a=class extends m.ZoneWidget{constructor(d,u){super(d),this.exceptionInfo=u,this.create()}applyClass(){}applyStyle(){}_fillContainer(d){this.setCssClass("exception_widget_container");const u=this.editor.getOption(p.EditorOption.fontInfo);d.style.fontSize=`${u.fontSize}px`,d.style.lineHeight=`${u.lineHeight}px`,d.tabIndex=0,o.default.createRoot(d).render(r.default.createElement(v.ConfigProvider,{value:this.configContext},r.default.createElement(h,{info:this.exceptionInfo,layout:()=>this.layout(void 0)})))}layout(d){this._container.style.height="initial";const u=this.editor.getOption(p.EditorOption.lineHeight),E=Math.round(u/3),f=Math.ceil((this._container.offsetHeight+E)/u);this._relayout(f)}focus(){this._container.focus()}};t.DebugExceptionWidget=a,n.__decorate([(0,l.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],a.prototype,"configContext",void 0),t.DebugExceptionWidget=a=n.__decorate([(0,l.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],a)},58542:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkDetector=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),v=e(54414),_=e(42933),m=n.__importDefault(e(80315)),p="\\u0000-\\u0020\\u007f-\\u009f",s=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s"+p+'"]{2,}[^\\s'+p+`"')}\\],:;.!?]`,"ug"),h=/(?:[a-zA-Z]:(?:(?:\\|\/)[\w\.-]*)+)/,a=/(?:(?:\~|\.)(?:(?:\\|\/)[\w\.-]*)+)/,g=new RegExp(`(${h.source}|${a.source})`),d=/((?:\~|\.)?(?:\/[\w\.-]*)+)/,u=/(?:\:([\d]+))?(?:\:([\d]+))?/,E=new RegExp(`${l.isWindows?g.source:d.source}${u.source}`,"g"),f=2e3;let c=class{linkify(b,A,S){if(A){const I=b.split(`
33897
33897
  `);for(let R=0;R<I.length-1;R++)I[R]=I[R]+`
33898
- `;I[I.length-1]||I.pop();const D=I.map(R=>this.linkify(R,!1,S));if(D.length===1)return D[0];const T=document.createElement("span");return D.forEach(R=>T.appendChild(R)),T}const w=document.createElement("span");for(const I of this.detectLinks(b))try{switch(I.kind){case"text":w.appendChild(document.createTextNode(I.value));break;case"web":w.appendChild(this.createWebLink(I.value));break;case"path":{const D=I.captures[0],T=I.captures[1]?Number(I.captures[1]):0,R=I.captures[2]?Number(I.captures[2]):0;w.appendChild(this.createPathLink(I.value,D,T,R,S));break}}}catch{w.appendChild(document.createTextNode(I.value))}return w}createWebLink(b){const A=this.createLink(b),S=l.URI.parse(b);return this.decorateLink(A,async()=>{if(S.scheme===o.Schemes.file){const w=S.toString(),I=o.OS.type()===l.OperatingSystem.Windows?l.path.win32:l.path.posix,D=l.path.normalize(I.sep===l.path.posix.sep&&l.isWindows?w.replace(/\\/g,l.path.posix.sep):w);await this.workbenchEditorService.open(l.URI.parse(D));return}this.openerService.open(b)}),A}createPathLink(b,A,S,w,I){if(A[0]==="/"&&A[1]==="/")return document.createTextNode(b);if(A[0]==="."){if(!I)return document.createTextNode(b);const R=I.toResource(A),M=this.createLink(b);return this.decorateLink(M,()=>{this.workbenchEditorService.open(l.URI.parse(R.toString()))}),M}const D=this.createLink(b);D.tabIndex=0;const T=l.URI.file(l.path.normalize(A));return this.fileServiceClient.getFileStat(T.toString()).then(R=>{!R||R&&R.isDirectory||this.decorateLink(D,()=>{this.workbenchEditorService.open(l.URI.parse(T.toString()),{range:{startColumn:w,startLineNumber:S,endLineNumber:S,endColumn:w}})})}),D}createLink(b){const A=document.createElement("a");return A.textContent=b,A}decorateLink(b,A){b.classList.add(m.default.link),b.title=(0,o.formatLocalize)("debug.console.followLink",l.isMacintosh?"Cmd":"Ctrl"),b.onmousemove=S=>{b.classList.toggle(m.default.pointer,l.isMacintosh?S.metaKey:S.ctrlKey)},b.onmouseleave=()=>b.classList.remove(m.default.pointer),b.onclick=S=>{const w=window.getSelection();!w||w.type==="Range"||(l.isMacintosh?S.metaKey:S.ctrlKey)&&(S.preventDefault(),S.stopImmediatePropagation(),A(!1))}}detectLinks(b){if(!b)return[];if(b.length>f)return[{kind:"text",value:b,captures:[]}];const A=[s,E],S=["web","path"],w=[],I=(D,T)=>{if(T>=A.length){w.push({value:D,kind:"text",captures:[]});return}const R=A[T];let M=0,O;for(R.lastIndex=0;(O=R.exec(D))!==null;){const k=D.substring(M,O.index);k&&I(k,T+1);const F=O[0];w.push({value:F,kind:S[T],captures:O.slice(1)}),M=O.index+F.length}const x=D.substring(M);x&&I(x,T+1)};return I(b,0),w}};t.LinkDetector=c,n.__decorate([(0,r.Autowired)(v.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorService)],c.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],c.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.IOpenerService),n.__metadata("design:type",Object)],c.prototype,"openerService",void 0),t.LinkDetector=c=n.__decorate([(0,r.Injectable)({multiple:!0})],c)},61752:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugMemoryFileSystemProvider=void 0;const n=e(85608),r=n.__importDefault(e(17228)),o=e(76003),l=e(43718),v=e(64582),_=e(38029),{Path:m}=l.path;let p=class{constructor(){this.memoryFdCounter=0,this.changeEmitter=new l.Emitter,this.fdMemory=new Map,this.capabilities=1028,this.onDidChangeCapabilities=l.Event.None,this.onDidChangeFile=this.changeEmitter.event,this.emptyBuffer=this.toBuffer("")}stat(a){return Promise.resolve({type:l.FileType.File,uri:a.toString(),mtime:0,ctime:0,size:0,lastModification:0,isDirectory:!1})}async readFile(a){const g=this.parseUri(a);if(!g)return this.emptyBuffer;if(!g.offset)return this.emptyBuffer;const{session:d,memoryReference:u,offset:E}=g,f=new Uint8Array(E.toOffset-E.fromOffset),c=this.memoryFdCounter++;let y=d.getMemory(u);return E&&(y=new s(y,E)),this.fdMemory.set(c,{session:d,region:y}),await this.read(c,E.fromOffset,f,0,f.length),f}async read(a,g,d,u,E){const f=this.fdMemory.get(a);if(!f)return;const c=await f.region.read(g,E);let y=0;for(const b of c)switch(b.type){case 1:return y;case 2:return y>0?y:this.logger.error(b.error);case 0:{const A=Math.max(0,g-b.offset),S=b.data.slice(A,Math.min(b.data.byteLength,A+(E-y)));d.set(S.buffer,u+y),y+=S.byteLength;break}default:this.logger.log(b)}return y}toBuffer(a){return l.BinaryBuffer.fromString(a).buffer}parseUri(a){if(a.scheme!==v.DEBUG_MEMORY_SCHEME)return;const g=this.debugSessionManager.sessions.find(f=>f.id.toLowerCase()===a.authority.toLowerCase());if(!g)return;let d;const u=/range=([0-9]+):([0-9]+)/.exec(a.query);u&&(d={fromOffset:Number(u[1]),toOffset:Number(u[2])});const[,E]=a.path.split(m.separator);return{session:g,offset:d,readOnly:!g.capabilities.supportsWriteMemoryRequest,sessionId:a.authority,memoryReference:decodeURIComponent(E)}}readDirectory(){throw new Error("Not allowed")}createDirectory(){throw new Error("Not allowed")}rename(){throw new Error("Not allowed")}delete(){throw new Error("Not allowed")}watch(){throw new Error("Not allowed")}writeFile(){throw new Error("Method not implemented.")}};t.DebugMemoryFileSystemProvider=p,n.__decorate([(0,o.Autowired)(v.IDebugSessionManager),n.__metadata("design:type",_.DebugSessionManager)],p.prototype,"debugSessionManager",void 0),n.__decorate([(0,o.Autowired)(l.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),t.DebugMemoryFileSystemProvider=p=n.__decorate([(0,o.Injectable)()],p);class s extends l.Disposable{constructor(a,g){super(),this.parent=a,this.range=g,this.invalidateEmitter=new l.Emitter,this.onDidInvalidate=this.invalidateEmitter.event,this.width=this.range.toOffset-this.range.fromOffset,this.writable=a.writable,this.registerDispose(a),this.registerDispose(a.onDidInvalidate(d=>{const u=(0,r.default)(d.fromOffset-g.fromOffset,0,this.width),E=(0,r.default)(d.toOffset-g.fromOffset,0,this.width);E>u&&this.invalidateEmitter.fire({fromOffset:u,toOffset:E})}))}read(a,g){if(a<0)throw new RangeError(`Invalid fromOffset: ${a}`);return this.parent.read(this.range.fromOffset+a,this.range.fromOffset+Math.min(g,this.width))}write(a,g){return this.parent.write(this.range.fromOffset+a,g)}}},31141:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugPreferences=t.IDebugConfiguration=t.debugPreferencesSchema=void 0,t.createDebugPreferences=o,t.injectDebugPreferences=l;const n=e(41869);t.debugPreferencesSchema={type:"object",properties:{"debug.trace":{type:"boolean",default:!1,description:(0,n.localize)("preference.debug.trace")},"debug.debugViewLocation":{enum:["default","left","right","bottom"],default:"default",description:(0,n.localize)("preference.debug.debugViewLocation")},"debug.openDebug":{enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart","openOnDebugBreak"],default:"openOnDebugBreak",description:(0,n.localize)("preference.debug.openDebug")},"debug.internalConsoleOptions":{enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart"],default:"openOnFirstSessionStart",description:(0,n.localize)("preference.debug.internalConsoleOptions")},"debug.allowBreakpointsEverywhere":{type:"boolean",description:(0,n.localize)("preference.debug.allowBreakpointsEverywhere"),default:!1}}};class r{}t.IDebugConfiguration=r,t.DebugPreferences=Symbol("DebugPreferences");function o(v){return(0,n.createPreferenceProxy)(v,t.debugPreferencesSchema)}function l(v){v.addProviders({token:t.DebugPreferences,useFactory:_=>{const m=_.get(n.PreferenceService);return o(m)}}),v.addProviders({token:n.PreferenceContribution,useValue:{schema:t.debugPreferencesSchema}})}},40453:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProgressService=void 0;const r=e(85608),o=e(76003),l=e(41869),v=e(68969),_=e(43718),m=e(26296);let p=n=class{constructor(){this.toDispose=[]}async onDebugServiceStateChange(h){this.progressResolve&&(this.progressResolve(),this.progressResolve=void 0),h===m.DebugState.Initializing&&this.progressService.getIndicator(n.DEBUG_PANEL_PROGRESS_ID)&&this.progressService.withProgress({location:n.DEBUG_PANEL_PROGRESS_ID},a=>new Promise(g=>this.progressResolve=g))}run(h){let a;const g=d=>{a=new _.DisposableCollection,d&&(a?.push(d.onDidChangeState(u=>this.onDebugServiceStateChange(u))),a?.push(d.onDidProgressStart(async u=>{const E=new Promise(f=>{const c=l.Event.any(l.Event.filter(d.onDidProgressEnd,y=>y.body.progressId===u.body.progressId),d.onDidExitAdapter)(()=>{c.dispose(),f()})});this.progressService.getIndicator(n.DEBUG_PANEL_PROGRESS_ID)&&this.progressService.withProgress({location:n.DEBUG_PANEL_PROGRESS_ID},()=>E),this.progressService.withProgress({location:_.ProgressLocation.Notification,title:u.body.title,cancellable:u.body.cancellable,silent:!0,delay:500},f=>{let c=0;const y=A=>{let S;typeof A.percentage=="number"&&(S=A.percentage-c,c+=S),f.report({message:A.message,increment:S,total:typeof S=="number"?100:void 0})};u.body.message&&y(u.body);const b=d.onDidProgressUpdate(A=>{A.body.progressId===u.body.progressId&&y(A.body)});return E.then(()=>b.dispose())},()=>d.cancel(u.body.progressId))})))};this.toDispose.push(h.onDidChangeActiveDebugSession(({current:d})=>{a&&a.dispose(),g(d)})),g(h.currentSession)}};t.DebugProgressService=p,p.DEBUG_PANEL_PROGRESS_ID="debug",r.__decorate([(0,o.Autowired)(v.IProgressService),r.__metadata("design:type",Object)],p.prototype,"progressService",void 0),t.DebugProgressService=p=n=r.__decorate([(0,o.Injectable)()],p)},69946:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.launchSchema=t.DebugSchemaManager=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(64582),v=e(70159),_=e(37499),{deepClone:m}=o.objects;let p=class{async update(){const h=this.config.getDebuggers(),a={...m(t.launchSchema)},g=a.properties.configurations.items,d=h.map(u=>({attributes:Object.keys(u.configurationAttributes||{}).map(E=>u.configurationAttributes[E]),configurationSnippets:u.configurationSnippets}));for(const{attributes:u,configurationSnippets:E}of d)u&&g.oneOf&&g.oneOf.push(...u),E&&g.defaultSnippets&&g.defaultSnippets.push(...E);this.schemaRegistry.registerSchema(l.launchExtensionSchemaUri,a,["launch.json"])}};t.DebugSchemaManager=p,n.__decorate([(0,r.Autowired)(v.IDebugServer),n.__metadata("design:type",Object)],p.prototype,"debug",void 0),n.__decorate([(0,r.Autowired)(o.IJSONSchemaRegistry),n.__metadata("design:type",Object)],p.prototype,"schemaRegistry",void 0),n.__decorate([(0,r.Autowired)(_.DebugConfigurationManager),n.__metadata("design:type",_.DebugConfigurationManager)],p.prototype,"config",void 0),t.DebugSchemaManager=p=n.__decorate([(0,r.Injectable)()],p),t.launchSchema={$id:l.launchSchemaUri,type:"object",title:"Launch",required:[],default:{version:"0.2.0",configurations:[]},properties:{version:{type:"string",description:"Version of this file format.",default:"0.2.0"},configurations:{type:"array",description:"List of configurations. Add new configurations or edit existing ones by using IntelliSense.",items:{defaultSnippets:[],type:"object",oneOf:[]}}}}},90408:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugService=void 0;const n=e(85608),r=e(76003),o=e(41869);let l=class{constructor(){this.onDidDebugContributionPointChangeEmitter=new o.Emitter,this.debugContributionPointsMap=new Map}registerDebugContributionPoints(_,m){this.debugContributionPointsMap.has(_)||(this.debugContributionPointsMap.set(_,m),this.onDidDebugContributionPointChangeEmitter.fire({path:_,contributions:m}))}unregisterDebugContributionPoints(_){const m=this.debugContributionPointsMap.get(_);m&&(this.debugContributionPointsMap.delete(_),this.onDidDebugContributionPointChangeEmitter.fire({path:_,contributions:m,removed:!0}))}get debugContributionPoints(){return this.debugContributionPointsMap}get onDidDebugContributionPointChange(){return this.onDidDebugContributionPointChangeEmitter.event}};t.DebugService=l,t.DebugService=l=n.__decorate([(0,r.Injectable)()],l)},3520:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSessionConnection=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(64582),v=e(38029),_=new Set(["breakpoint","capabilities","continued","exited","initialized","loadedSource","module","output","process","stopped","terminated","thread","progressStart","progressUpdate","progressEnd","invalidated"]);let m=class{constructor(s,h,a){this.sessionId=s,this.connectionFactory=h,this.traceOutputChannel=a,this.pendingRequests=new Map,this.requestHandlers=new Map,this.onDidCustomEventEmitter=new o.Emitter,this.onDidCustomEvent=this.onDidCustomEventEmitter.event,this.toDispose=new o.DisposableCollection(this.onDidCustomEventEmitter,o.Disposable.create(()=>this.pendingRequests.clear()),o.Disposable.create(()=>this.emitters.clear())),this.allThreadsContinued=!0,this.emitters=new Map,this.connection=this.createConnection()}get disposed(){return this.toDispose.disposed}dispose(){this.toDispose.dispose()}async createConnection(){if(this.disposed)throw new Error("Connection has been already disposed.");{const s=await this.connectionFactory(this.sessionId);return s.onceClose((h,a)=>{this.fire("exited",{code:h,reason:a})}),s.onMessage(h=>this.handleMessage(h)),this.toDispose.push(o.Disposable.create(()=>{s.dispose()})),s}}async sendRequest(s,h,a,g){var d;s==="initialize"&&(this.sessionAdapterID=h.adapterID);const u=this.manager.reportTime(l.DEBUG_REPORT_NAME.DEBUG_ADAPTER_PROTOCOL_TIME,{sessionId:this.sessionId,threadId:h&&h.threadId||((d=this.manager.currentThread)===null||d===void 0?void 0:d.raw.id)}),E=await this.doSendRequest(s,h,g),f={adapterID:this.sessionAdapterID,request:a.request};if(s==="threads"&&(f.amount=E.body.threads.length),u(s,f),(s==="next"||s==="stepIn"||s==="stepOut"||s==="stepBack"||s==="reverseContinue"||s==="restartFrame")&&this.fireContinuedEvent(h.threadId),s==="continue"){const c=E;return(c&&c.body&&c.body.allThreadsContinued)!==void 0&&(this.allThreadsContinued=E.body.allThreadsContinued),this.fireContinuedEvent(h.threadId,this.allThreadsContinued),E}return E}async sendCustomRequest(s,h){var a;return(a=await this.doSendRequest(s,h))===null||a===void 0?void 0:a.body}async doSendRequest(s,h=null,a){const g=new o.Deferred,d={seq:(0,l.getSequenceId)(),type:"request",command:s};let u;return h&&(d.arguments=h),this.pendingRequests.set(d.seq,E=>{u&&u.dispose(),E.success?g.resolve(E):g.reject(E)}),a&&(u=a.onCancellationRequested(async()=>{u.dispose();const E=this.manager.getSession(this.sessionId);E&&E.capabilities.supportsCancelRequest&&E.sendRequest("cancel",{requestId:d.seq})})),await this.send(d),g.promise}async send(s){const h=await this.connection,a=JSON.stringify(s);this.traceOutputChannel&&this.traceOutputChannel.appendLine(`${this.sessionId.substring(0,8)} [UI -> adapter]: ${a}`),h.send(a)}handleMessage(s){this.traceOutputChannel&&this.traceOutputChannel.appendLine(`${this.sessionId.substring(0,8)} [adapter -> UI ]: ${s}`);const h=JSON.parse(s);h.type==="request"?this.handleRequest(h):h.type==="response"?this.handleResponse(h):h.type==="event"&&this.handleEvent(h)}handleResponse(s){const h=this.pendingRequests.get(s.request_seq);h&&(this.pendingRequests.delete(s.request_seq),h(s))}onRequest(s,h){this.requestHandlers.set(s,h)}async handleRequest(s){const h={type:"response",seq:(0,l.getSequenceId)(),command:s.command,request_seq:s.seq,success:!0},a=this.requestHandlers.get(s.command);if(a)try{h.body=await a(s)}catch(g){h.success=!1,h.message=g.message}else(0,o.getDebugLogger)().error("Unhandled request",s);await this.send(h)}handleEvent(s){"event"in s?(s.event==="continued"&&(this.allThreadsContinued=s.body.allThreadsContinued!==!1),_.has(s.event)?this.doFire(s.event,s):this.onDidCustomEventEmitter.fire(s)):this.fire("exited",s)}on(s,h){return this.disposed?o.Disposable.create(()=>{}):this.getEmitter(s).event(h)}fire(s,h){this.doFire(s,h)}doFire(s,h){this.disposed||this.getEmitter(s).fire(h)}getEmitter(s){const h=this.emitters.get(s)||this.newEmitter();return this.emitters.set(s,h),h}newEmitter(){const s=new o.Emitter;return this.toDispose.push(s),s}fireContinuedEvent(s,h=!1){this.fire("continued",{type:"event",event:"continued",body:{threadId:s,allThreadsContinued:h},seq:(0,l.getSequenceId)()})}};t.DebugSessionConnection=m,n.__decorate([(0,r.Autowired)(l.IDebugSessionManager),n.__metadata("design:type",v.DebugSessionManager)],m.prototype,"manager",void 0),t.DebugSessionConnection=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__param(1,(0,r.Optional)()),n.__param(2,(0,r.Optional)()),n.__metadata("design:paramtypes",[String,Function,Object])],m)},97186:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSessionFactory=t.DebugSessionContributionRegistryImpl=t.DebugSessionContributionRegistry=t.DebugSessionContribution=void 0;const n=e(85608),r=e(76003),o=e(41869);t.DebugSessionContribution=Symbol("DebugSessionContribution"),t.DebugSessionContributionRegistry=Symbol("DebugSessionContributionRegistry");let l=class{constructor(){this.contribs=new Map,this.init()}init(){for(const _ of this.contributions.getContributions())this.contribs.set(_.debugType,_)}get(_){return this.contribs.get(_)}};t.DebugSessionContributionRegistryImpl=l,n.__decorate([(0,r.Autowired)(t.DebugSessionContribution),n.__metadata("design:type",Object)],l.prototype,"contributions",void 0),t.DebugSessionContributionRegistryImpl=l=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],l),t.DebugSessionFactory=Symbol("DebugSessionFactory")},38029:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSessionManager=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),v=e(54414),_=e(72665),m=e(93950),p=e(80907),s=e(64582),h=e(79845),a=e(80712),g=e(17280),d=e(97186),u=e(5905);let E=class{fireDidChange(c){this.inDebugModeKey.set(this.inDebugMode),this.onDidChangeEmitter.fire(c)}constructor(){this._uid=(0,o.uuid)(),this._sessions=new Map,this._extraMap=new Map,this._actionIndex=0,this.onWillStartDebugSessionEmitter=new o.Emitter,this.onWillStartDebugSession=this.onWillStartDebugSessionEmitter.event,this.onWillResolveDebugConfigurationEmitter=new o.Emitter,this.onWillResolveDebugConfiguration=this.onWillResolveDebugConfigurationEmitter.event,this.onDidCreateDebugSessionEmitter=new o.Emitter,this.onDidCreateDebugSession=this.onDidCreateDebugSessionEmitter.event,this.onDidStartDebugSessionEmitter=new o.Emitter,this.onDidStartDebugSession=this.onDidStartDebugSessionEmitter.event,this.onDidStopDebugSessionEmitter=new o.Emitter,this.onDidStopDebugSession=this.onDidStopDebugSessionEmitter.event,this.onDidChangeActiveDebugSessionEmitter=new o.Emitter,this.onDidChangeActiveDebugSession=this.onDidChangeActiveDebugSessionEmitter.event,this.onDidDestroyDebugSessionEmitter=new o.Emitter,this.onDidDestroyDebugSession=this.onDidDestroyDebugSessionEmitter.event,this.onDidReceiveDebugSessionCustomEventEmitter=new o.Emitter,this.onDidReceiveDebugSessionCustomEvent=this.onDidReceiveDebugSessionCustomEventEmitter.event,this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.configurationIds=new Map,this.toDisposeOnCurrentSession=new o.DisposableCollection,this.init()}init(){this.debugTypeKey=this.contextKeyService.createKey(s.CONTEXT_DEBUG_TYPE_KEY,void 0),this.inDebugModeKey=this.contextKeyService.createKey(s.CONTEXT_IN_DEBUG_MODE_KEY,this.inDebugMode),this.debugStopped=this.contextKeyService.createKey(s.CONTEXT_DEBUG_STOPPED_KEY,!1),this.modelManager.onModelChanged(c=>{const{newModelUrl:y}=c;if(y){const b=o.URI.parse(y.toString()),A=this.modelManager.model;if(this.currentSession&&this.currentThread&&A){const S=this.currentThread.frames.find(w=>{var I;return((I=w.source)===null||I===void 0?void 0:I.uri.toString())===b.toString()});S&&S!==this.currentFrame&&(this.currentThread.currentFrame=S,setTimeout(()=>{this.workbenchEditorService.currentEditor&&this.workbenchEditorService.currentEditor.monacoEditor.revealLineInCenter(S.raw.line)},0))}}})}_getExtra(c,y){if(c==null)return;const b=this._extraMap.get(c);if(b)return{traceId:b.traceId,remote:b.remote,adapterID:b.adapterID,request:b.request,...y&&b.threads.get(`${y}`)}}getExtra(c,y){return this._getExtra(c,y)}_setExtra(c,y,b){const A=this._extraMap.get(c);A&&(b?A.threads.set(y,b):A.threads.delete(y))}setExtra(c,y,b){return this._setExtra(c,y,b)}report(c,y,b){return b={traceId:this._uid,...this._getExtra(b?.sessionId,b?.threadId),...b},this.reporterService.point(c,y,b)}reportTime(c,y){const b=this.reporterService.time(c);return(A,S)=>(S={...y,...S},S={traceId:this._uid,...this._getExtra(S?.sessionId,S?.threadId),...S},b.timeEnd(A,S))}reportAction(c,y,b){var A,S,w;let I=this._getExtra(c,y);I&&(y&&!I.threadId&&(I={...I}),this._actionIndex+=1,I.action=`${b}-${this._actionIndex}`,I.filePath=(S=(A=this.currentFrame)===null||A===void 0?void 0:A.raw.source)===null||S===void 0?void 0:S.path,I.fileLineNumber=(w=this.currentFrame)===null||w===void 0?void 0:w.raw.line,this._setExtra(c,`${y??""}`,I))}async start(c){const{configuration:y}=c,b={adapterID:y.type,request:y.request==="launch"?"launch":"attach",traceId:this._uid,remote:0,threads:new Map};if((0,u.isRemoteAttach)(y)&&(b.remote=1),this.report(s.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,"number",{count:this.breakpoints.getBreakpoints().length,...b}),!c.configuration.__restart&&this.isExistedDebugSession(c)){this.messageService.error((0,o.formatLocalize)("debug.launch.existed",c.configuration.name));return}try{const A=this.reportTime(s.DEBUG_REPORT_NAME.DEBUG_SESSION_START_TIME,b);await this.fireWillStartDebugSession();const S=await this.resolveConfiguration(c);if(S){if(S.configuration.preLaunchTask){this.debugProgressService.onDebugServiceStateChange(s.DebugState.Initializing);const I=o.Uri.parse(S.workspaceFolderUri),D=await this.taskService.getTask(I,S.configuration.preLaunchTask);if(D){const T=this.reportTime(s.DEBUG_REPORT_NAME.DEBUG_PRE_LAUNCH_TASK_TIME,b),R=await this.taskService.run(D);R.exitCode!==0&&this.messageService.error(`The preLaunchTask ${S.configuration.preLaunchTask} exitCode is ${R.exitCode}`),T(I.toString(),{exitCode:R.exitCode})}this.debugProgressService.onDebugServiceStateChange(s.DebugState.Running)}}else{c.configuration.type?this.messageService.error((0,o.formatLocalize)("debug.notSupported.type",c.configuration.type)):this.messageService.error((0,o.localize)("debug.notSupported.any"));return}const w=await this.debug.createDebugSession(S);if(A(S.configuration.type,{adapterID:S.configuration.type,request:S.configuration.request,sessionId:w}),!w){this.messageService.error((0,o.formatLocalize)("debug.launch.typeNotSupported",S.configuration.type));return}return this.doStart(w,S,b)}catch(A){throw this.messageService.error((0,o.localize)("debug.launch.catchError")),A}}async fireWillStartDebugSession(){await o.WaitUntilEvent.fire(this.onWillStartDebugSessionEmitter,{})}async resolveConfiguration(c){if(s.IDebugSessionDTO.is(c))return c;const{workspaceFolderUri:y,index:b,noDebug:A,parentSession:S,repl:w,compact:I,lifecycleManagedByParent:D}=c,T=await this.resolveDebugConfiguration(c.configuration,y);T&&!("cwd"in T)&&(T.cwd="${workspaceFolder}");let R=await this.variableResolver.resolve(T,{});if(!R){R===null&&this.commandService.executeCommand(o.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION.id);return}if(R=await this.resolveDebugConfigurationWithSubstitutedVariables(R,y),!R){R===null&&this.commandService.executeCommand(o.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION.id);return}const M=R.name+y,O=this.configurationIds.has(M)?this.configurationIds.get(M)+1:0;return this.configurationIds.set(M,O),{id:O,configuration:R,workspaceFolderUri:y,index:b,noDebug:A,parentSession:S,repl:w,compact:I,lifecycleManagedByParent:D}}async resolveDebugConfiguration(c,y){return await this.fireWillResolveDebugConfiguration(c.type),this.debug.resolveDebugConfiguration(c,y)}async resolveDebugConfigurationWithSubstitutedVariables(c,y){return this.debug.resolveDebugConfigurationWithSubstitutedVariables(c,y)}async fireWillResolveDebugConfiguration(c){await o.WaitUntilEvent.fire(this.onWillResolveDebugConfigurationEmitter,{debugType:c})}async doStart(c,y,b){const A=this.sessionContributionRegistry.get(y.configuration.type);if(!A)return;const w=A.debugSessionFactory().get(c,y);this._sessions.set(c,w),this._extraMap.set(c,b),y.lifecycleManagedByParent||this.updateCurrentSession(w),this.debugTypeKey.set(w.configuration.type),this.onDidCreateDebugSessionEmitter.fire(w);let I=s.DebugState.Inactive;return w.onDidChange(()=>{var D,T;I!==w.state&&(I=w.state,I===s.DebugState.Stopped?(this.onDidStopDebugSessionEmitter.fire(w),this.debugStopped.set(!0)):this.debugStopped.set(!1)),this.debugContextKey.contextSetVariableSupported.set((D=w.capabilities.supportsSetVariable)!==null&&D!==void 0?D:!1),this.debugContextKey.contextRestartFrameSupported.set((T=w.capabilities.supportsRestartFrame)!==null&&T!==void 0?T:!1),this.debugContextKey.contextDebugState.set(s.DebugState[w.state]),this.debugContextKey.contextInDebugMode.set(I!==s.DebugState.Inactive)}),w.on("terminated",D=>{const T=D.body&&D.body.restart;T?this.doRestart(w,T):this.destroy(w.id)}),w.on("exited",()=>this.destroy(w.id)),w.start().then(()=>this.onDidStartDebugSessionEmitter.fire(w)).catch(()=>{this.destroy(w.id)}),w.onDidCustomEvent(({event:D,body:T})=>this.onDidReceiveDebugSessionCustomEventEmitter.fire({event:D,body:T,session:w})),w}isExistedDebugSession(c){const{name:y}=c.configuration;for(const[,b]of this._sessions)if(b.configuration.name===y&&!b.terminated)return!0;return!1}async restart(c=this.currentSession){return c&&this.doRestart(c)}async doRestart(c,y){const{options:b,configuration:A}=c;return await c.restart({arguments:A})?c:(await c.terminate(!0),A.__restart=y,this.start(b))}updateCurrentSession(c){this.currentSession=c||this.sessions[this.sessions.length-1]}get inDebugMode(){return this.state>s.DebugState.Inactive}get currentThread(){const c=this.currentSession;return c&&c.currentThread}get state(){const c=this.currentSession;return c?c.state:s.DebugState.Inactive}get currentFrame(){const{currentThread:c}=this;return c&&c.currentFrame}get topFrame(){const{currentThread:c}=this;return c&&c.topFrame}getSession(c){if(c)return this._sessions.get(c)}get sessions(){return Array.from(this._sessions.values()).filter(c=>c.state>s.DebugState.Inactive)}get currentSession(){return this._currentSession}set currentSession(c){if(this._currentSession===c)return;this.toDisposeOnCurrentSession.dispose();const y=this._currentSession;this._currentSession=c,this.onDidChangeActiveDebugSessionEmitter.fire({previous:y,current:c}),c&&(this.toDisposeOnCurrentSession.push(c.onDidChange(()=>{this.currentFrame===this.topFrame&&this.open(),this.fireDidChange(c)})),this.toDisposeOnCurrentSession.push(c.onCurrentThreadChange(()=>{this.fireDidChange(c)}))),this.open(),this.fireDidChange(c)}open(){const{currentFrame:c}=this;c&&c.open()}async stopSession(c,y=!1){return c?y?c.disconnect():c.terminate():Promise.all(this.sessions.map(b=>y?b.disconnect():b.terminate()))}destroy(c){if(c){const y=this._sessions.get(c);y&&this.doDestroy(y)}else this._sessions.forEach(y=>this.doDestroy(y))}doDestroy(c){this.debug.terminateDebugSession(c.id),this.remove(c.id),c.dispose(),this.onDidDestroyDebugSessionEmitter.fire(c)}remove(c){this._sessions.delete(c);const{currentSession:y}=this;y&&y.id===c&&this.updateCurrentSession(void 0),setTimeout(()=>{this._extraMap.delete(c)})}};t.DebugSessionManager=E,n.__decorate([(0,r.Autowired)(l.LabelService),n.__metadata("design:type",l.LabelService)],E.prototype,"labelProvider",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(d.DebugSessionContributionRegistry),n.__metadata("design:type",Object)],E.prototype,"sessionContributionRegistry",void 0),n.__decorate([(0,r.Autowired)(s.IDebugServer),n.__metadata("design:type",Object)],E.prototype,"debug",void 0),n.__decorate([(0,r.Autowired)(v.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorService)],E.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(_.IMessageService),n.__metadata("design:type",Object)],E.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(p.IVariableResolverService),n.__metadata("design:type",Object)],E.prototype,"variableResolver",void 0),n.__decorate([(0,r.Autowired)(a.BreakpointManager),n.__metadata("design:type",a.BreakpointManager)],E.prototype,"breakpoints",void 0),n.__decorate([(0,r.Autowired)(s.IDebugModelManager),n.__metadata("design:type",Object)],E.prototype,"modelManager",void 0),n.__decorate([(0,r.Autowired)(m.ITaskService),n.__metadata("design:type",Object)],E.prototype,"taskService",void 0),n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],E.prototype,"reporterService",void 0),n.__decorate([(0,r.Autowired)(h.IDebugProgress),n.__metadata("design:type",Object)],E.prototype,"debugProgressService",void 0),n.__decorate([(0,r.Autowired)(g.DebugContextKey),n.__metadata("design:type",g.DebugContextKey)],E.prototype,"debugContextKey",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],E.prototype,"commandService",void 0),t.DebugSessionManager=E=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],E)},29539:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSession=void 0;const r=e(85608).__importDefault(e(12784)),o=e(41869),l=e(43718),v=e(64582),_=e(32385),m=e(99797),p=e(88776),s=e(7885);class h{fireDidChange(){this.onDidChangeEmitter.fire(void 0),this.onStateChange()}get capabilities(){return this._capabilities}get supportsThreadIdCorrespond(){return!!this.capabilities.supportsThreadIdCorrespond}constructor(g,d,u,E,f,c,y,b,A,S,w){this.id=g,this.options=d,this.connection=u,this.terminalService=E,this.workbenchEditorService=f,this.breakpointManager=c,this.modelManager=y,this.labelProvider=b,this.messages=A,this.fileSystem=S,this.sessionManager=w,this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this._onDidChangeCallStack=new o.Emitter,this.onDidChangeCallStack=this._onDidChangeCallStack.event,this._onVariableChange=new o.Emitter,this.onVariableChange=this._onVariableChange.event,this._onCurrentThreadChange=new o.Emitter,this.onCurrentThreadChange=this._onCurrentThreadChange.event,this._onDidStop=new o.Emitter,this.onDidStop=this._onDidStop.event,this._onDidContinued=new o.Emitter,this.onDidContinued=this._onDidContinued.event,this._onDidThread=new o.Emitter,this.onDidThread=this._onDidThread.event,this._onRequest=new o.Emitter,this.onRequest=this._onRequest.event,this._onDidExitAdapter=new o.Emitter,this.onDidExitAdapter=this._onDidExitAdapter.event,this._onDidProgressStart=new o.Emitter,this.onDidProgressStart=this._onDidProgressStart.event,this._onDidProgressUpdate=new o.Emitter,this.onDidProgressUpdate=this._onDidProgressUpdate.event,this._onDidProgressEnd=new o.Emitter,this.onDidProgressEnd=this._onDidProgressEnd.event,this._onDidInvalidated=new o.Emitter,this.onDidInvalidated=this._onDidInvalidated.event,this._onDidChangeState=new o.Emitter,this.onDidChangeState=this._onDidChangeState.event,this._onDidInvalidMemory=new o.Emitter,this.onDidInvalidateMemory=this._onDidInvalidMemory.event,this.toDispose=new o.DisposableCollection,this._capabilities={},this.updateDeffered=null,this.exitDeferred=new o.Deferred,this.cancellationMap=new Map,this.toDisposeOnCurrentThread=new o.DisposableCollection,this.initialized=!1,this.id2Breakpoint=new Map,this.settingBreakpoints=null,this._multipleThreadPaused=new Map,this.sources=new Map,this._threads=new Map,this.scheduleUpdateThreads=(0,r.default)(()=>this.updateThreads(void 0),100),this.pendingThreads=Promise.resolve(),this.terminated=!1,this.connection.onRequest("runInTerminal",async I=>await this.runInTerminal(I)),this.toDispose.pushAll([this.onDidChangeEmitter,this.connection,this.on("initialized",()=>{this.configure()}),this.on("breakpoint",({body:I})=>this.onUpdateBreakpoint(I)),this.on("continued",async I=>{const{body:{allThreadsContinued:D,threadId:T}}=I;if(this.handleCancellation(T),this.supportsThreadIdCorrespond){T?this._multipleThreadPaused.delete(T):D!==!1&&this._multipleThreadPaused.clear(),await this.updateCurrentThread(),this._onDidContinued.fire(I);return}if(D!==!1){this.clearThreads(),this._onDidContinued.fire(I);return}(0,l.isDefined)(T)&&this.clearThread(T),this.onStateChange(),this._onDidContinued.fire(I)}),this.on("stopped",async I=>{const{body:D}=I;this.stoppedDetails=D;const{threadId:T}=D,R=this.sessionManager.reportTime(v.DEBUG_REPORT_NAME.DEBUG_STOPPED,{sessionId:this.id,threadId:T});if(this.supportsThreadIdCorrespond===!0){if(await this.collectPausedThread(D),D.threadId&&this._multipleThreadPaused.has(D.threadId)){const O=this._multipleThreadPaused.get(D.threadId);await this.updateCurrentThread(O),await this.updateCurrentThreadFramesOnFocus()}}else this.updateDeffered=new o.Deferred,await this.updateThreads(D),await this.updateCurrentThreadFramesOnFocus(),this.updateDeffered.resolve();R("stopped");const M=this.sessionManager.getExtra(this.id,T);T&&M&&M.action&&(M.action=void 0,this.sessionManager.setExtra(this.id,`${T??""}`,M)),this.onStateChange(),this.sessionManager.currentSession=this,this._onDidStop.fire(I)}),this.on("thread",I=>{const{body:{reason:D,threadId:T}}=I;if(this.supportsThreadIdCorrespond){this.state===v.DebugState.Stopped&&this._onDidThread.fire(I);return}D==="started"?this.scheduleUpdateThreads():D==="exited"&&this.clearThread(T),this._onDidThread.fire(I)}),this.on("terminated",()=>{this.terminated=!0}),this.on("exited",I=>{this.exitDeferred.resolve(I)}),this.on("progressStart",I=>{this._onDidProgressStart.fire(I)}),this.on("progressUpdate",I=>{this._onDidProgressUpdate.fire(I)}),this.on("progressEnd",I=>{this._onDidProgressEnd.fire(I)}),this.on("memory",I=>{this._onDidInvalidMemory.fire(I)}),this.on("invalidated",async I=>{this._onDidInvalidated.fire(I),I.body.areas&&I.body.areas.length===1&&(I.body.areas[0]==="variables"||I.body.areas[0]==="watch")||(this.cancelAllRequests(),this.clearThreads(),await this.updateThreads(this.stoppedDetails)),this.fireDidChange()}),this.on("capabilities",I=>this.updateCapabilities(I.body.capabilities)),this.breakpointManager.onDidChangeBreakpoints(I=>this.runtimeUpdateBreakpoint(I)),this.breakpointManager.onDidChangeExceptionsBreakpoints(I=>{this.breakpointManager.breakpointsEnabled&&this.setExceptionBreakpoints(I)}),l.Disposable.create(()=>{this.breakpointManager.clearAllStatus(this.id)})])}getMemory(g){return new _.MemoryRegion(g,this)}get configuration(){return this.options.configuration}get parentSession(){return this.options.parentSession}get lifecycleManagedByParent(){return this.options.lifecycleManagedByParent}get compact(){return!!this.options.compact}async start(){await this.workbenchEditorService.saveAll(),await this.initialize(),await this.launchOrAttach()}async runInTerminal({arguments:{title:g,cwd:d,args:u,env:E}}){return this.doRunInTerminal({name:g,cwd:d,env:E,args:u})}async getValidTerminalProcessId(g,d=!1){try{const u=await this.terminalService.getProcessId(g);if(u&&u>0)return u;d&&this.terminalService.removeTerm(g);return}catch{d&&this.terminalService.removeTerm(g);return}}async doRunInTerminal(g){var d;let u=this.terminalService.terminals.find(y=>y.name===g.name&&y.isActive),E;const f=await this.terminalService.getDefaultShellPath(),c=(0,v.prepareCommand)(f,g.args,!1,(d=g.cwd)===null||d===void 0?void 0:d.toString(),g.env);if(u&&(E=await this.getValidTerminalProcessId(u.id,!0),E||(u=void 0)),u)c&&this.terminalService.sendText(u.id,c);else{let y;try{const b=await this.terminalService.createTerminal(g);y=b.id,b.show(),c&&this.terminalService.sendText(b.id,c),E=await this.getValidTerminalProcessId(b.id,!0)}catch(b){throw y&&await this.getValidTerminalProcessId(y,!0),b}}return{processId:E}}async initialize(){const g=await this.connection.sendRequest("initialize",{clientID:"OpenSumi",clientName:"OpenSumi IDE",adapterID:this.configuration.type,locale:(0,l.getLanguageId)(),linesStartAt1:!0,columnsStartAt1:!0,pathFormat:"path",supportsVariableType:!1,supportsVariablePaging:!1,supportsRunInTerminalRequest:!0,supportsProgressReporting:!0,supportsInvalidatedEvent:!0,supportsMemoryEvent:!0,supportsMemoryReferences:!0},this.configuration);this.updateCapabilities(g.body||{}),this.onStateChange()}async launchOrAttach(){var g;if(this.parentSession&&this.parentSession.state===v.DebugState.Inactive)throw(0,o.canceled)();try{this.configuration.request==="attach"?await this.sendRequest("attach",this.configuration):await this.sendRequest("launch",this.configuration)}catch(d){throw this.fireExited(d),this.messages.error(d.message||((g=d.body)===null||g===void 0?void 0:g.error.format)||(0,o.localize)("debug.console.errorMessage")),d&&d.message}}async configure(){await this.initBreakpoints(),this.breakpointManager.setExceptionBreakpoints(this.capabilities.exceptionBreakpointFilters||[]),this.initialized=!0,this.capabilities.supportsConfigurationDoneRequest&&this.sendRequest("configurationDone",{}),this.supportsThreadIdCorrespond||await this.updateThreads(void 0)}async setExceptionBreakpoints(g){return this.sendRequest("setExceptionBreakpoints",g)}onStateChange(){const g=this.state;this.previousState!==g&&(this.previousState=g,this._onDidChangeState.fire(g))}async onUpdateBreakpoint(g){let d;this.settingBreakpoints&&await this.settingBreakpoints.promise;try{const u=g.breakpoint;switch(g.reason){case"new":if(u.source&&typeof u.line=="number"&&u.id&&!this.id2Breakpoint.has(u.id)){const E=p.DebugSource.toUri(u.source),f=m.DebugBreakpoint.create(E,{line:u.line,column:u.column});f.status.set(this.id,u),this.addBreakpoint(f)}break;case"removed":u.id&&(d=this.id2Breakpoint.get(u.id),d&&this.delBreakpoint(d));break;case"changed":u.id&&(d=this.id2Breakpoint.get(u.id),d&&(d.status.set(this.id,u),this.breakpointManager.updateBreakpoint(d,!0)));break;default:break}}finally{}}async setBreakpoints(g){const d=[];for(const u of g){const E=await this.toSource(u),f=this.breakpointManager.getBreakpoints(u).filter(c=>this.breakpointManager.breakpointsEnabled&&c.enabled);d.push(this.sendRequest("setBreakpoints",{source:E.raw,sourceModified:!1,lines:f.map(c=>c.raw.line),breakpoints:f.map(c=>c.raw)}).then(c=>(c.body.breakpoints.forEach((y,b)=>{var A,S;y.id&&this.id2Breakpoint.set(y.id,f[b]);const w=f[b];w.raw.line=(A=y.line)!==null&&A!==void 0?A:w.raw.line,w.raw.column=(S=y.column)!==null&&S!==void 0?S:w.raw.column,w.status.set(this.id,y)}),this.breakpointManager.updateBreakpoints(f,!0),this.breakpointManager.resolveBpDeffered(),Promise.resolve())).catch(c=>{if(!(c instanceof Error)){const b=c.message?`${c.message}`:"Breakpoint not valid for current debug session";f.forEach(A=>{A.status.set(this.id,{verified:!1,message:b}),this.breakpointManager.updateBreakpoint(A,!0)})}}))}return await Promise.all(d)}delBreakpoint(g){return this.breakpointManager.delBreakpoint(g)}async addBreakpoint(g,d){return d&&this.breakpointManager.setBpDeffered(),this.breakpointManager.addBreakpoint(g),this.breakpointManager.promiseBpDeffered()}async runtimeUpdateBreakpoint(g){const{affected:d,statusUpdated:u}=g;if(!u)return await this.setBreakpoints(d)}async initBreakpoints(){this.settingBreakpoints=new o.Deferred,this.id2Breakpoint.clear(),this.configuration.noDebug||await this.setBreakpoints(this.breakpointManager.affected.map(g=>o.URI.parse(g))),this.settingBreakpoints.resolve(),this.settingBreakpoints=null}get currentThread(){return this._currentThread}set currentThread(g){this.toDisposeOnCurrentThread.dispose(),this._currentThread=g,g&&this.toDisposeOnCurrentThread.push(g.onDidChanged(()=>this.fireDidChange()))}get multipleThreadPaused(){return this._multipleThreadPaused}hasInMultipleThreadPaused(g){return this._multipleThreadPaused.has(g)}clearThreads(){var g;const d=this.sessionManager.reportTime(v.DEBUG_REPORT_NAME.DEBUG_UI_FRONTEND_TIME,{sessionId:this.id,threadId:(g=this.currentThread)===null||g===void 0?void 0:g.id,threadAmount:this.threadCount});this._threads.forEach(u=>{u.clear()}),this._onDidChangeCallStack.fire(),this.collocationThread(),d("clearThreads")}clearThread(g){const d=this.sessionManager.reportTime(v.DEBUG_REPORT_NAME.DEBUG_UI_FRONTEND_TIME,{sessionId:this.id,threadId:g,threadAmount:this.threadCount}),u=this._threads.get(g);u&&(u.clear(),this._onDidChangeCallStack.fire()),this.collocationThread(),d("clearThread")}get state(){if(this.connection.disposed)return v.DebugState.Inactive;if(!this.initialized)return v.DebugState.Initializing;const g=this.currentThread;return g?g.stopped?v.DebugState.Stopped:v.DebugState.Running:this.supportsThreadIdCorrespond?v.DebugState.Running:this.stoppedThreads.next().value?v.DebugState.Stopped:v.DebugState.Running}get currentFrame(){return this.currentThread&&this.currentThread.currentFrame}async getScopes(g){const{currentFrame:d}=this;return d?d.getScopes(g):[]}get label(){return v.IDebugSessionDTO.is(this.options)&&this.options.id?this.configuration.name+" ("+(this.options.id+1)+")":this.configuration.name}get visible(){return this.state>v.DebugState.Inactive}getSource(g){const d=p.DebugSource.toUri(g).toString(),u=this.sources.get(d)||new p.DebugSource(this,this.labelProvider,this.modelManager,this.workbenchEditorService,this.fileSystem);return u.update({raw:g}),this.sources.set(d,u),u}getSourceForUri(g){return this.sources.get(g.toString())}async toSource(g){const d=this.getSourceForUri(g);return d||this.getSource(await this.toDebugSource(g))}async toDebugSource(g){if(g.scheme===p.DebugSource.SCHEME)return{name:g.path.toString(),sourceReference:Number(g.query)};const d=g.displayName;let u=g.toString();return g.scheme===l.Schemes.file&&(u=await this.fileSystem.getFsPath(u)),{name:d,path:u,adapterData:void 0,sourceReference:void 0}}get threads(){return Array.from(this._threads.values())}get threadCount(){return this._threads.size}*getThreads(g){for(const d of this.threads)g(d)&&(yield d)}get runningThreads(){return this.getThreads(g=>!g.stopped)}get stoppedThreads(){return this.getThreads(g=>g.stopped)}async rawFetchThreads(g){const d=typeof g>"u"?null:{threadId:g},u=await this.sendRequest("threads",d);return u&&u.body&&u.body.threads&&Array.isArray(u.body.threads)?Promise.resolve(u.body.threads):Promise.resolve([])}async fetchThreads(){const g=await this.rawFetchThreads(),d=this._threads,u=[];for(const E of g){const f=E.id,c=d.get(f)||new s.DebugThread(this);u.push(c),c.update({raw:E})}return Promise.resolve(u)}updateThreads(g){return this.pendingThreads=this.pendingThreads.then(async()=>{try{const d=await this.rawFetchThreads();this.doUpdateThreads(d,g)}catch{}})}doUpdateThreads(g,d){const u=this.sessionManager.reportTime(v.DEBUG_REPORT_NAME.DEBUG_UI_FRONTEND_TIME,{sessionId:this.id,threadId:d?.threadId,threadAmount:g.length}),E=[];g.forEach(f=>{if(E.push(f.id),this._threads.has(f.id)){if(f.name){const c=this._threads.get(f.id);c&&(c.raw.name=f.name)}}else{const c=new s.DebugThread(this),y={raw:f};c.update(y),this._threads.set(f.id,c)}}),this._threads.forEach(f=>{var c;const{raw:{id:y}}=f;E.indexOf(y)===-1&&this._threads.delete(y),d&&(d.allThreadsStopped||d.threadId===y)&&((c=this._threads.get(y))===null||c===void 0||c.update({stoppedDetails:d}))}),this.collocationThread(d),u("doUpdateThreads")}collocationThread(g){var d;const{currentThread:u}=this;let E=u&&u.raw.id;g&&!g.preserveFocusHint&&g.threadId&&(E=g.threadId),this.currentThread=typeof E=="number"&&this._threads.get(E)||this._threads.values().next().value,((d=this.currentThread)===null||d===void 0?void 0:d.raw.id)!==E&&this.fireDidChange()}async updateCurrentThread(g){g?(this.currentThread=g,this._onCurrentThreadChange.fire(this.currentThread)):(this.currentThread=void 0,this._onCurrentThreadChange.fire(void 0))}async collectPausedThread(g){const d=await this.rawFetchThreads(g?.threadId);if(d.length===0)return new Map;const u=g.threadId&&this._multipleThreadPaused.has(g.threadId)?this._multipleThreadPaused.get(g.threadId):new s.DebugThread(this),E={raw:d[0]};return g&&(g.allThreadsStopped||g.threadId===d[0].id)&&(E.stoppedDetails=g),u&&(u.update(E),await this.rawFetchFrames(u),this._multipleThreadPaused.set(u.raw.id,u)),this._multipleThreadPaused}async updateCurrentThreadFramesOnFocus(){await this.rawFetchFrames(this.currentThread),this._onDidChangeCallStack.fire();const g=this.workbenchEditorService.currentEditor,d=u=>{this.stoppedDetails&&!this.stoppedDetails.preserveFocusHint&&(this.currentThread.currentFrame=u)};if(this.currentThread&&!this.currentFrame){const u=this.currentThread.frames.filter(E=>E&&E.source&&E.source.raw.presentationHint!=="deemphasize");if(u.length===0)return;if(g){const E=g.monacoEditor.getModel();if(E){const f=o.URI.parse(E.uri.toString()),c=u.filter(y=>y.source.uri.toString()===f.toString());c.length>0?d(c[0]):d(u[0])}}else d(u[0])}}async rawFetchFrames(g){!g||g.frameCount||(this.capabilities.supportsDelayedStackTraceLoading?(await g.rawFetchFrames(1),await g.rawFetchFrames(19)):await g.rawFetchFrames())}async terminate(g){if(this.initialized=!0,this.cancelAllRequests(),this.lifecycleManagedByParent&&this.parentSession){await this.parentSession.terminate(g);return}!this.terminated&&this.capabilities.supportsTerminateRequest&&this.configuration.request==="launch"?(this.terminated=!0,this.sendRequest("terminate",{restart:g}),await this.exited(1e3)||await this.disconnect(g)):await this.disconnect(g)}async disconnect(g){try{this.lifecycleManagedByParent&&this.parentSession?this.parentSession.disconnect(g):this.sendRequest("disconnect",{restart:g})}catch(u){this.fireExited(u);return}finally{this._onDidExitAdapter.fire(),this.onStateChange()}const d=500;await this.exited(d)||this.fireExited(new Error(`timeout after ${d} ms`))}updateCapabilities(g){Object.assign(this._capabilities,g)}fireExited(g){this.connection.fire("exited",{reason:g})}exited(g){return Promise.race([this.exitDeferred.promise.then(()=>!0,()=>!1),new Promise(d=>{setTimeout(d,g,!1)})])}async restart(g){return this.cancelAllRequests(),this.capabilities.supportsRestartRequest?(this.terminated=!1,this.lifecycleManagedByParent&&this.parentSession?await this.parentSession.restart({arguments:this.parentSession.configuration}):await this.sendRequest("restart",g),!0):!1}dispose(){this.toDispose.dispose()}async evaluate(g,d){var u;this.updateDeffered&&await((u=this.updateDeffered)===null||u===void 0?void 0:u.promise);const E=this.currentFrame&&this.currentFrame.raw.id;return(await this.sendRequest("evaluate",{expression:g,frameId:E,context:d})).body}async variables(g,d="named"){return(await this.sendRequest("variables",{variablesReference:g,filter:d})).body}async goto(g){if(this.capabilities.supportsGotoTargetsRequest)return await this.sendRequest("goto",g)}async exceptionInfo(g){return this.capabilities.supportsExceptionInfoRequest?this.sendRequest("exceptionInfo",g):Promise.reject(new Error("exceptionInfo not supported"))}async cancel(g){return this.sendRequest("cancel",{progressId:g})}async setVariableValue(g){if(this.capabilities.supportsSetVariable){const d=await this.sendRequest("setVariable",g);return this._onVariableChange.fire(),d}}async breakpointLocations(g,d){var u;const E=await this.toSource(g),c=(((u=(await this.sendRequest("breakpointLocations",{source:E.raw,line:d})).body)===null||u===void 0?void 0:u.breakpoints)||[]).map(y=>({lineNumber:y.line,column:y.column||1}));return Object.values(c.reduce((y,b)=>({...y,[`${b.lineNumber}:${b.column}`]:b}),{}))}async sendRequest(g,d,u){var E,f,c;if(!this._capabilities.supportsTerminateRequest&&g==="terminate"||!this._capabilities.supportsCompletionsRequest&&g==="completions"||!this._capabilities.supportsTerminateThreadsRequest&&g==="terminateThreads")throw new Error(`debug: ${g} not supported`);let y;["continue","next","stepIn","stepOut","threads"].some(b=>g===b)&&this.handleCancellation((E=this.currentThread)===null||E===void 0?void 0:E.raw.id),["stackTrace","scopes","variables","completions","threads"].some(b=>g===b)&&(y=!((f=this.currentThread)===null||f===void 0)&&f.raw.id?this.getNewCancellationToken((c=this.currentThread)===null||c===void 0?void 0:c.raw.id,u):void 0);try{return await this.connection.sendRequest(g,d,this.configuration,y)}finally{this._onRequest.fire(g)}}async takeCommand(g){return new Promise(d=>{const u=this.onRequest(E=>{E===g&&(u.dispose(),d())})})}sendCustomRequest(g,d){return this.connection.sendCustomRequest(g,d)}on(g,d){return this.connection.on(g,d)}get onDidCustomEvent(){return this.connection.onDidCustomEvent}hasSeparateRepl(){return!this.parentSession||this.options.repl!=="mergeWithParent"}reportTime(g,d){return this.sessionManager.reportTime(g,d)}getNewCancellationToken(g,d){const u=new l.CancellationTokenSource(d),E=this.cancellationMap.get(g)||[];return E.push(u),this.cancellationMap.set(g,E),u.token}cancelAllRequests(){this.cancellationMap.forEach(g=>g.forEach(d=>d.cancel())),this.cancellationMap.clear()}handleCancellation(g){if(g){const d=this.cancellationMap.get(g);this.cancellationMap.delete(g),d&&d.forEach(u=>u.cancel())}else this.cancelAllRequests()}getDebugProtocolBreakpoint(g){const d=this.breakpointManager.getBreakpoints().find(u=>u.id===g);if(d){const u=d.status.get(this.id);return{id:u?.id,verified:!!u?.verified,message:u?.message,source:u?.source,line:u?.line,column:u?.column,endLine:u?.endLine,endColumn:u?.endColumn,instructionReference:u?.instructionReference,offset:u?.offset}}}currentEditor(){var g;return(g=this.getModel())===null||g===void 0?void 0:g.getEditor()}getModel(){return this.modelManager.model}async readMemory(g,d,u){return this.capabilities.supportsReadMemoryRequest?await this.sendRequest("readMemory",{count:u,memoryReference:g,offset:d}):Promise.resolve(void 0)}async writeMemory(g,d,u,E){return this.capabilities.supportsWriteMemoryRequest?await this.sendRequest("writeMemory",{memoryReference:g,offset:d,allowPartial:E,data:u}):Promise.resolve(void 0)}}t.DebugSession=h},5905:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseSnippet=t.CharWidthReader=t.DEFAULT_WORD_REGEXP=t.USUAL_WORD_SEPARATORS=void 0,t.isExtensionHostDebugging=l,t.matchAll=v,t.isRemoteAttach=_;const n=e(41869),r=e(57711),{equalsIgnoreCase:o}=n.strings;function l(h){return h.type&&o(h.type==="vslsShare"?h.adapterProxy.configuration.type:h.type,"extensionhost")}function v(h,a){let g;const d=[];for(;(g=a.exec(h))!==null;)d.push(g);return d}function _(h){if(h.request==="attach"){const a={node:"address",java:"hostName",go:"host",cppdbg:"miDebuggerServerAddress",python:"host"},{type:g}=h,d=h[a[g]];return d?!["localhost","0.0.0.0","127.0.0.1","::1"].includes(d):!0}return!1}t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function m(h=""){let a="(-?\\d*\\.\\d\\w*)|([^";for(const g of t.USUAL_WORD_SEPARATORS)h.indexOf(g)>=0||(a+="\\"+g);return a+="\\s]+)",new RegExp(a,"g")}t.DEFAULT_WORD_REGEXP=m();class p{static getInstance(){return p._INSTANCE||(p._INSTANCE=new p),p._INSTANCE}constructor(){this._cache=new Map,this._canvas=document.createElement("canvas")}getCharWidth(a,g){const d=a+g;if(this._cache.has(d))return this._cache.get(d);const u=this._canvas.getContext("2d");u.font=g;const f=u.measureText(a).width;return this._cache.set(d,f),f}}t.CharWidthReader=p,p._INSTANCE=null;const s=h=>{const a=new RegExp(/^\^\"(.*)\"/gm),g=new r.SnippetParser;return new RegExp(/\${\d+:(.*)/).test(h)||a.test(h)?g.parse(h).toString().replace(a,"$1"):h};t.parseSnippet=s},17475:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugBreakpointWidget=t.TopStackType=void 0;const r=e(85608),o=e(76003),l=e(41869),v=e(43718),_=r.__importStar(e(20868)),m=e(64582),p=e(97319),s=e(4983),h=e(27562);var a;(function(d){d[d.exception=0]="exception",d[d.debugger=1]="debugger"})(a||(t.TopStackType=a={}));let g=n=class extends v.Disposable{constructor(){super(),this.breakpointWidgetInputFocus=s.CONTEXT_BREAKPOINT_INPUT_FOCUSED.bind(this.contextKeyService)}get position(){return this._position}get values(){var u;return(u=this.zone)===null||u===void 0?void 0:u.values}get breakpointType(){var u;return(u=this.zone)===null||u===void 0?void 0:u.breakpointType}show(u,E,f="condition"){this.dispose(),this._position=u,this.addDispose(this.zone=this.injector.get(h.DebugBreakpointZoneWidget,[this.editor,{...E},f])),this.addDispose(this.zone.onDidChangeBreakpoint(({context:c,value:y})=>{E&&(E[c]=y)})),this.addDispose(this.zone.onFocus(()=>{this.breakpointWidgetInputFocus.set(!0)})),this.addDispose(this.zone.onBlur(()=>{this.breakpointWidgetInputFocus.set(!1)})),this.addDispose(this.zone.onDispose(()=>{this._position=void 0,this.breakpointWidgetInputFocus.set(!1)})),this.zone.show(_.positionToRange(u),n.LINE_HEIGHT_NUMBER)}hide(){var u;(u=this.zone)===null||u===void 0||u.hide()}};t.DebugBreakpointWidget=g,g.LINE_HEIGHT_NUMBER=2,r.__decorate([(0,o.Autowired)(m.DebugEditor),r.__metadata("design:type",Object)],g.prototype,"editor",void 0),r.__decorate([(0,o.Autowired)(p.DebugBreakpointsService),r.__metadata("design:type",p.DebugBreakpointsService)],g.prototype,"debugBreakpointsService",void 0),r.__decorate([(0,o.Autowired)(l.IContextKeyService),r.__metadata("design:type",Object)],g.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],g.prototype,"injector",void 0),t.DebugBreakpointWidget=g=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],g)},27562:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugBreakpointZoneWidget=void 0;const r=e(85608),o=r.__importDefault(e(14041)),l=r.__importDefault(e(25873)),v=e(76003),_=e(97267),m=e(41869),p=e(43718),s=e(20303),h=e(52416),a=e(31324),g=e(64582),d=e(97319),u=r.__importDefault(e(55797));let E=n=class extends s.ZoneWidget{_fillContainer(c){}get values(){return{...this.contexts,[this.context]:this.input&&this.input.monacoEditor.getValue()||void 0}}get breakpointType(){return this.context}constructor(c,y={},b="condition"){super(c),this.editor=c,this.contexts=y,this.context=b,this._onDidChangeBreakpoint=new p.Emitter,this.onDidChangeBreakpoint=this._onDidChangeBreakpoint.event,this._onFocus=new p.Emitter,this.onFocus=this._onFocus.event,this._onBlur=new p.Emitter,this.onBlur=this._onBlur.event,this.inputFocusHandler=()=>{this._onFocus.fire()},this.inputBlurHandler=()=>{this._onBlur.fire()},this.selectContextHandler=A=>{this.input&&(this.contexts[this.context]=this.input.monacoEditor.getValue()||void 0),this.context=A,this.setInputMode(),this.render()},this._wrapper=document.createElement("div"),this._selection=document.createElement("div"),this._input=document.createElement("div"),this._container.appendChild(this._wrapper),this._wrapper.appendChild(this._selection),this._wrapper.appendChild(this._input),l.default.createRoot(this._input).render(o.default.createElement(o.default.Fragment,null))}hide(){this.input&&(this.input.dispose(),this.input=void 0),super.dispose()}show(c,y){super.show(c,y),this.debugBreakpointsService.createBreakpointInput(this._input).then(b=>{this.input=b;const{monacoEditor:A}=this.input;this.setInputMode(),this.addDispose(A.onDidBlurEditorWidget(()=>{this.inputBlurHandler()})),this.addDispose(A.onDidFocusEditorWidget(()=>{this.inputFocusHandler()})),this.addDispose(A.onDidChangeModelContent(S=>{if(!this.input)return;A.getValue().length===0?this.ensureRenderPlaceholder():this.clearPlaceholder();const I=A.getModel().getLineCount();this._relayout(I+1)})),this.syncPreContent()})}createDecorations(){this.input&&this.input.monacoEditor.getValue().length===0&&this.input.monacoEditor.deltaDecorations([],[{range:{startLineNumber:1,endLineNumber:0,startColumn:0,endColumn:1},options:{description:"debug-breakpoint-zone-widget",afterContentClassName:u.default.input_placeholder}}])}renderOption(c,y){return o.default.createElement(_.Option,{value:c},y)}setInputMode(){var c,y;const b=(c=this.editor.getModel())===null||c===void 0?void 0:c.getLanguageId(),A=(y=this.input)===null||y===void 0?void 0:y.monacoEditor.getModel();A&&b&&A.setLanguage(this.context==="logMessage"?"plaintext":b)}renderPlaceholder(){if(!this.input)return;this.clearPlaceholder();const c=`'${this.placeholder}' !important`;this.cssRenderDisposable=this.cssManager.addClass(n.INPUT_PLACEHOLDER_AFTER,{content:c})}ensureRenderPlaceholder(){this.input&&(this.createDecorations(),this.renderPlaceholder())}syncPreContent(){if(this.input){this.input.focus();const c=this.contexts[this.context]||"";this.input.monacoEditor.setValue(c)}}clearPlaceholder(){this.cssRenderDisposable&&(this.cssRenderDisposable.dispose(),this.cssRenderDisposable=void 0)}applyClass(){if(this._wrapper.className=u.default.debug_breakpoint_wrapper,this._selection.className=u.default.debug_breakpoint_selected,this._input.className=u.default.debug_breakpoint_input,!this.editor.getModel())return;const y=this.editor.getOption(a.EditorOption.lineHeight),b=this.editor.getOption(a.EditorOption.fontSize),A=y-b;this._input.style.marginTop=A+"px"}applyStyle(){this.syncPreContent(),l.default.createRoot(this._selection).render(o.default.createElement(_.Select,{value:this.context,selectedRenderer:()=>o.default.createElement("span",{className:"kt-select-option"},this.getContextToLocalize(this.context)),onChange:this.selectContextHandler},this.renderOption("condition",this.getContextToLocalize("condition")),this.renderOption("hitCondition",this.getContextToLocalize("hitCondition")),this.renderOption("logMessage",this.getContextToLocalize("logMessage"))))}getContextToLocalize(c){switch(c){case"logMessage":return(0,p.localize)("debug.expression.logMessage");case"hitCondition":return(0,p.localize)("debug.expression.hitCondition");default:return(0,p.localize)("debug.expression.condition")}}get placeholder(){switch(this.context){case"logMessage":return(0,p.localize)("debug.expression.log.placeholder");case"hitCondition":return(0,p.localize)("debug.expression.hit.placeholder");default:return(0,p.localize)("debug.expression.condition.placeholder")}}};t.DebugBreakpointZoneWidget=E,E.INPUT_PLACEHOLDER_AFTER=u.default.input_placeholder+"::after",r.__decorate([(0,v.Autowired)(d.DebugBreakpointsService),r.__metadata("design:type",d.DebugBreakpointsService)],E.prototype,"debugBreakpointsService",void 0),r.__decorate([(0,v.Autowired)(m.PreferenceService),r.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),r.__decorate([(0,v.Autowired)(h.ICSSStyleService),r.__metadata("design:type",Object)],E.prototype,"cssManager",void 0),t.DebugBreakpointZoneWidget=E=n=r.__decorate([(0,v.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object,Object,String])],E)},52943:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugEditorContribution=void 0;const r=e(85608),o=e(76003),l=e(41869),v=e(54414),_=e(51553),m=r.__importStar(e(20868)),p=e(79865),s=e(44781),h=e(38390),a=e(17280),g=e(84303),d=e(38029),u=e(16170),E=e(64582),f=e(5905),c="inlinevaluedecoration",y=100,b=150,A=500,{flatten:S}=l.arrays;class w{constructor(O,x){this.column=O,this.text=x}}function I(M,O,x=1073741824){return O.length>b&&(O=O.substr(0,b)+"..."),{range:{startLineNumber:M,endLineNumber:M,startColumn:x,endColumn:x},renderOptions:{after:{contentText:O,backgroundColor:"rgba(255, 200, 0, 0.2)",margin:"10px"},dark:{after:{color:"rgba(255, 255, 255, 0.5)"}},light:{after:{color:"rgba(0, 0, 0, 0.5)"}}}}}function D(M,O,x,k){const F=new Map;for(const U of M)if(F.set(U.name,U.value),F.size>=y)break;const L=new Map;F.forEach((U,W)=>{const j=k.get(W);if(j)for(const Q of j)O.containsPosition(new l.Position(Q,0))&&(L.has(Q)||L.set(Q,[]),L.get(Q).indexOf(W)===-1&&L.get(Q).push(W))});const N=[];return L.forEach((U,W)=>{const j=U.sort((Q,G)=>{const X=x.getLineContent(W);return X.indexOf(Q)-X.indexOf(G)}).map(Q=>`${Q} = ${F.get(Q)}`).join(", ");N.push(I(W,j))}),N}function T(M){const O=new Map;if(!M)return O;for(let x=1,k=M.getLineCount();x<=k;++x){const F=M.getLineContent(x);if(F.length>A)continue;M.tokenization.forceTokenization(x);const L=M.tokenization.getLineTokens(x);for(let N=0,U=L.getCount();N<U;N++)if(L.getStandardTokenType(N)===h.StandardTokenType.Other){f.DEFAULT_WORD_REGEXP.lastIndex=0;const j=L.getStartOffset(N),Q=L.getEndOffset(N),G=F.substring(j,Q),X=f.DEFAULT_WORD_REGEXP.exec(G);if(X){const $=X[0];O.has($)||O.set($,[]),O.get($).push(x)}}}return O}let R=n=class{constructor(O){this.editor=O,this.disposer=new l.Disposable,this.editorDisposer=new l.Disposable}contribute(O){return this.disposer.addDispose(this.debugSessionManager.onDidChangeActiveDebugSession(()=>{const x=this.debugSessionManager.currentSession;x&&(this.editorDisposer.addDispose(x.onDidChange(async()=>{var k,F;this.setHoverEnabled(O,x.state===E.DebugState.Running);const L=(k=x.currentThread)===null||k===void 0?void 0:k.currentFrame;L&&O.currentUri&&!((F=L.source)===null||F===void 0)&&F.uri.isEqual(O.currentUri)&&await this.toggleExceptionWidget()})),this.editorDisposer.addDispose(x.onDidExitAdapter(()=>{this.setHoverEnabled(O,!0)})),this.editorDisposer.addDispose(this.editorService.onActiveResourceChange(k=>{var F;k?.uri.toString()===((F=x.getModel())===null||F===void 0?void 0:F.uri.toString())?this.setHoverEnabled(O):this.setHoverEnabled(O,!0)})),this.disposer.addDispose([l.Event.any(x.onDidChangeCallStack,x.onDidStop)(async()=>{await this.directRunUpdateInlineValueDecorations(O)}),x.onDidExitAdapter(()=>{this.removeInlineValuesScheduler(O).schedule(),this.editorDisposer.dispose()})]),this.disposer.addDispose(x.onDidChangeState(k=>{k!==E.DebugState.Stopped&&this.toggleExceptionWidget()})),this.disposer.addDispose(x),this.registerEditorListener(O))})),this.disposer.addDispose(this.debugSessionManager.onDidDestroyDebugSession(()=>{this.closeExceptionWidget()})),this.disposer.addDispose(this.editorDisposer),this.toggleExceptionWidget(),this.disposer}registerEditorListener(O){this.editorDisposer.addDispose(O.monacoEditor.onKeyDown(async x=>{var k,F,L,N,U;if(((L=(F=(k=this.debugSessionManager.currentSession)===null||k===void 0?void 0:k.currentFrame)===null||F===void 0?void 0:F.source)===null||L===void 0?void 0:L.uri.toString())===((N=O.currentUri)===null||N===void 0?void 0:N.toString())&&x.keyCode===m.KeyCode.Alt){this.setHoverEnabled(O,!0),(U=this.debugModelManager.model)===null||U===void 0||U.getDebugHoverWidget().hide();const W=O.monacoEditor.onKeyUp(async j=>{var Q;j.keyCode===m.KeyCode.Alt&&(this.setHoverEnabled(O,!1),(Q=this.debugModelManager.model)===null||Q===void 0||Q.getDebugHoverWidget().show(),W.dispose())})}})),this.editorDisposer.addDispose(O.monacoEditor.onDidChangeModelContent(async()=>{n.MEMOIZER.clear(),await this.directRunUpdateInlineValueDecorations(O)})),this.editorDisposer.addDispose(O.monacoEditor.onDidChangeModel(async()=>{this.toggleExceptionWidget(),await this.directRunUpdateInlineValueDecorations(O)}))}registerDecorationType(){this.overrideServicesRegistry.getRegisteredService(l.ServiceNames.CODE_EDITOR_SERVICE).registerDecorationType("inline-value-decoration",c,{})}setHoverEnabled(O,x=!this.debugContextKey.contextInDebugMode.get()){O.monacoEditor.updateOptions({hover:{enabled:x}})}async directRunUpdateInlineValueDecorations(O){var x;const k=(x=this.debugSessionManager.currentSession)===null||x===void 0?void 0:x.currentFrame;k&&(n.MEMOIZER.clear(),await this.updateInlineValueDecorations(k,O))}removeInlineValuesScheduler(O){return new l.RunOnceScheduler(()=>O.monacoEditor.removeDecorationsByType(c),100)}async updateInlineValueDecorations(O,x){var k;if(!x)return;const F="{0} = {1}",L=", ",N=x.monacoEditor.getModel();if(!this.preferenceService.get("debug.inline.values")||!N||!O||N.uri.toString()!==((k=O.source)===null||k===void 0?void 0:k.uri.toString())){this.removeInlineValuesScheduler(x).isScheduled()||this.removeInlineValuesScheduler(x).schedule();return}this.removeInlineValuesScheduler(x).cancel();let U;if(p.languageFeaturesService.inlineValuesProvider.has(N)){const W=async(H,K)=>{const Y=await O.getMostSpecificScopes(O.range()),Z=K?H:H.toLowerCase();for(const oe of Y){await oe.ensureLoaded();const he=(oe.children||[]).find(me=>K?me.name===Z:me.name.toLowerCase()===Z);if(he)return he.value}},j={frameId:O.raw.id,stoppedLocation:(()=>{const H=O.range();return new s.Range(H.startLineNumber,H.startColumn+1,H.endLineNumber,H.endColumn+1)})()},Q=new l.CancellationTokenSource().token,G=x.monacoEditor.getVisibleRanges(),X=p.languageFeaturesService.inlineValuesProvider.ordered(N).reverse();U=[];const $=new Map,V=S(X.map(H=>G.map(K=>Promise.resolve(H.provideInlineValues(N,K,j,Q)).then(async Y=>{if(Y)for(const Z of Y){let oe;switch(Z.type){case"text":oe=Z.text;break;case"variable":{let ie=Z.variableName;ie||(ie=N.getLineContent(Z.range.startLineNumber).substring(Z.range.startColumn-1,Z.range.endColumn-1));const he=await W(ie,Z.caseSensitiveLookup);he&&(oe=l.strings.format(F,ie,he));break}case"expression":{let ie=Z.expression;if(ie||(ie=N.getLineContent(Z.range.startLineNumber).substring(Z.range.startColumn-1,Z.range.endColumn-1)),ie){const he=new u.DebugWatchRoot(O.thread.session),me=new u.DebugWatchNode(O.thread.session,ie,he);await me.evaluate(ie),me.available&&(oe=l.strings.format(F,ie,me.description))}break}}if(oe){const ie=Z.range.startLineNumber;let he=$.get(ie);he||(he=[],$.set(ie,he)),he.some(me=>me.text===oe)||he.push(new w(Z.range.startColumn,oe))}}},Y=>{(0,l.onUnexpectedExternalError)(Y)}))));await Promise.all(V),$.forEach((H,K)=>{if(H.length>0){H=H.sort((Z,oe)=>Z.column-oe.column);const Y=H.map(Z=>Z.text).join(L);U.push(I(K,Y))}})}else{const W=await O.getMostSpecificScopes(O.range());U=(await Promise.all(W.map(async Q=>{await Q.ensureLoaded();const G=Q.children||[],X=O.range(),$=Q.range();let V=new s.Range(0,0,X.startLineNumber,X.startColumn);return $&&(V=V.setStartPosition($.startLineNumber,$.startColumn)),D(G,V,N,T(x?.monacoEditor.getModel()))}))).reduce((Q,G)=>Q.concat(G),[])}x.monacoEditor.setDecorationsByType("inline-value-decoration",c,U)}async toggleExceptionWidget(){var O,x;const k=this.debugSessionManager.currentSession;if(!k){this.closeExceptionWidget();return}const{currentThread:F}=k;if(!F){this.closeExceptionWidget();return}const L=F.frames.find(U=>!!(U&&U.source&&U.source.available&&U.source.presentationHint!=="deemphasize"));if(!L){this.closeExceptionWidget();return}const N=(O=this.editor.currentUri)===null||O===void 0?void 0:O.isEqual((x=L.source)===null||x===void 0?void 0:x.uri);if(this.debugExceptionWidget&&!N)this.closeExceptionWidget();else if(N){const U=await F?.fetchExceptionInfo();U&&this.showExceptionWidget(U,k,L.range().startLineNumber,L.range().startColumn)}}showExceptionWidget(O,x,k,F){this.debugExceptionWidget&&this.debugExceptionWidget.dispose();const L=x?.currentEditor();this.debugExceptionWidget=this.injector.get(g.DebugExceptionWidget,[L,O]),this.debugExceptionWidget.show(m.positionToRange({lineNumber:k,column:F}),10),this.debugExceptionWidget.focus(),L?.revealRangeInCenter({startLineNumber:k,startColumn:F,endLineNumber:k,endColumn:F}),this.debugContextKey.contextExceptionWidgetVisible.set(!0)}closeExceptionWidget(){this.debugExceptionWidget&&(this.debugContextKey.contextExceptionWidgetVisible.set(!1),this.debugExceptionWidget.dispose(),this.debugExceptionWidget=void 0)}};t.DebugEditorContribution=R,R.MEMOIZER=(0,l.createMemoizer)(),r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],R.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(l.IContextKeyService),r.__metadata("design:type",Object)],R.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(E.IDebugModelManager),r.__metadata("design:type",Object)],R.prototype,"debugModelManager",void 0),r.__decorate([(0,o.Autowired)(E.IDebugSessionManager),r.__metadata("design:type",d.DebugSessionManager)],R.prototype,"debugSessionManager",void 0),r.__decorate([(0,o.Autowired)(l.PreferenceService),r.__metadata("design:type",Object)],R.prototype,"preferenceService",void 0),r.__decorate([(0,o.Autowired)(l.MonacoOverrideServiceRegistry),r.__metadata("design:type",l.MonacoOverrideServiceRegistry)],R.prototype,"overrideServicesRegistry",void 0),r.__decorate([(0,o.Autowired)(v.WorkbenchEditorService),r.__metadata("design:type",_.WorkbenchEditorServiceImpl)],R.prototype,"editorService",void 0),r.__decorate([(0,o.Autowired)(a.DebugContextKey),r.__metadata("design:type",a.DebugContextKey)],R.prototype,"debugContextKey",void 0),t.DebugEditorContribution=R=n=r.__decorate([(0,o.Injectable)(),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[Object])],R)},74257:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugExpressionProvider=void 0;const n=e(85608),r=e(76003),o=e(43718),l=n.__importStar(e(20868)),v=e(16885),{coalesce:_}=o.arrays;let m=class{async get(s,h){var a,g;let d,u;if(this.evaluatableExpressionService.hasEvaluatableExpressProvider(s)){const E=new o.CancellationTokenSource,f=this.evaluatableExpressionService.getSupportedEvaluatableExpressionProvider(s),c=new l.Position(h.startLineNumber,h.startColumn),y=f.map(A=>Promise.resolve(A.provideEvaluatableExpression(s,c,E.token)).then(S=>S,()=>{})),b=await Promise.all(y).then(_);b.length>0&&(d=(a=b[0])===null||a===void 0?void 0:a.expression,u=(g=b[0])===null||g===void 0?void 0:g.range,!d&&u&&(d=s.getLineContent(c.lineNumber).substring(u.startColumn-1,u.endColumn-1)))}else{const E=s.getLineContent(h.startLineNumber),{start:f,end:c}=this.getExactExpressionStartAndEnd(E,h.startColumn,h.endColumn);d=E.substring(f-1,c)}return d}getExactExpressionStartAndEnd(s,h,a){let g,d=0;const u=/([^()[\]{}<>\s+\-/%~#^;=|,`!]|->)+/g;let E=null;for(;E=u.exec(s);){const f=E.index+1,c=f+E[0].length;if(f<=h&&c>=a){g=E[0],d=f;break}}if(g){const f=/\w+/g;let c=null;for(;(c=f.exec(g))&&!(c.index+1+d+c[0].length>=a););c&&(g=g.substring(0,f.lastIndex))}return g?{start:d,end:d+g.length-1}:{start:0,end:0}}};t.DebugExpressionProvider=m,n.__decorate([(0,r.Autowired)(v.IEvaluatableExpressionService),n.__metadata("design:type",Object)],m.prototype,"evaluatableExpressionService",void 0),t.DebugExpressionProvider=m=n.__decorate([(0,r.Injectable)()],m)},3367:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverModel=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(98650);let m=n=class extends l.TreeModel{constructor(s){super(),this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(s)}init(s){this.root=s,this.root.watcher.on(l.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};t.DebugHoverModel=m,m.DEFAULT_FLUSH_DELAY=100,t.DebugHoverModel=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[_.ExpressionContainer])],m)},23217:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverSource=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(64582),v=e(38029),_=e(98650);let m=class{constructor(){this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event}dispose(){this._expression=void 0}get expression(){return this._expression}clearEvaluate(){this.onDidChangeEmitter.fire(void 0)}async evaluate(s){const h=await this.doEvaluate(s);return this._expression=h,this.onDidChangeEmitter.fire(h),h}async doEvaluate(s){const{currentSession:h}=this.sessions;if(h){if(h.capabilities.supportsEvaluateForHovers){const a=new _.DebugHoverVariableRoot(s,h);return await a.evaluate("hover"),a.available&&a||void 0}return this.findVariable(s.split(".").map(a=>a.trim()).filter(a=>!!a))}}async findVariable(s){const{currentFrame:h}=this.sessions;if(!h)return;let a;const g=await h.getScopes();for(const d of g){const u=await this.doFindVariable(d,s);if(!a)a=u;else if(u&&u.value!==a.value)return}return a}async doFindVariable(s,h){await s.ensureLoaded();const a=s.children,g=[];if(a){for(const d of a)(d instanceof _.DebugVariableContainer||d instanceof _.DebugVariable)&&d.name===h[0]&&g.push(d);if(g.length===1)return h.length===1?g[0]:this.doFindVariable(g[0],h.slice(1))}}};t.DebugHoverSource=m,n.__decorate([(0,r.Autowired)(l.IDebugSessionManager),n.__metadata("design:type",v.DebugSessionManager)],m.prototype,"sessions",void 0),t.DebugHoverSource=m=n.__decorate([(0,r.Injectable)()],m)},85322:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverTreeModelService=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(98650),m=r.__importDefault(e(57259)),p=e(3367),s=e(23217),{Path:h}=v.path;let a=n=class{constructor(){this._changeEventDispatchQueue=[],this.selectedDecoration=new l.Decoration(m.default.mod_selected),this.focusedDecoration=new l.Decoration(m.default.mod_focused),this.loadingDecoration=new l.Decoration(m.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new v.Emitter,this.onDidUpdateTreeModelOrVariableEmitter=new v.Emitter,this.disposableCollection=new v.DisposableCollection,this.activeNodeDecoration=(d,u=!0)=>{if(this.preContextMenuFocusedNode&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedNode),this.selectedDecoration.removeTarget(this.preContextMenuFocusedNode),this.preContextMenuFocusedNode=null),d){if(this.selectedNodes.length>0)for(const E of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(E);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(d),this.focusedDecoration.addTarget(d),this._focusedNode=d,this._selectedNodes=[d],u&&this.treeModel.dispatchChange()}},this.activeNodeFocusedDecoration=(d,u=!1)=>{this.focusedNode!==d&&(u?(this.preContextMenuFocusedNode?(this.focusedDecoration.removeTarget(this.preContextMenuFocusedNode),this.selectedDecoration.removeTarget(this.preContextMenuFocusedNode)):this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.preContextMenuFocusedNode=d):this.focusedNode&&(this.preContextMenuFocusedNode=null,this.focusedDecoration.removeTarget(this.focusedNode)),d&&(this.selectedDecoration.addTarget(d),this.focusedDecoration.addTarget(d),this._focusedNode=d,this._selectedNodes.push(d))),this.treeModel.dispatchChange()},this.enactiveNodeDecoration=()=>{this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this.treeModel.dispatchChange()),this._focusedNode=void 0},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleTwistierClick=d=>{_.ExpressionContainer.is(d)?(this.activeNodeDecoration(d,!1),this.toggleDirectory(d)):this.activeNodeDecoration(d)},this.toggleDirectory=async d=>{d.expanded?this.treeHandle.collapseNode(d):this.treeHandle.expandNode(d)},this.flushEventQueue=()=>{let d;if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((E,f)=>{const c=h.pathDepth(E),y=h.pathDepth(f);return c-y});const u=[this._changeEventDispatchQueue[0]];for(const E of this._changeEventDispatchQueue)u.some(f=>E.indexOf(f)===0)||u.push(E);return d=(0,v.pSeries)(u.map(E=>async()=>{var f;const c=(f=this.treeModel.root)===null||f===void 0?void 0:f.watchEvents.get(E);return c&&typeof c.callback=="function"&&await c.callback({type:l.WatchEvent.Changed,path:E}),null})),this._changeEventDispatchQueue=[],d},this.debugHoverSource.onDidChange(async d=>{if(!d){this.onDidUpdateTreeModelOrVariableEmitter.fire({treeModel:void 0,variable:void 0});return}d instanceof _.DebugVariable?(this.dispose(),this.onDidUpdateTreeModelOrVariableEmitter.fire({variable:d})):(await this.initTreeModel(d),this.onDidUpdateTreeModelOrVariableEmitter.fire({treeModel:this.treeModel}))})}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}get onDidUpdateTreeModelOrVariable(){return this.onDidUpdateTreeModelOrVariableEmitter.event}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get treeHandle(){return this._debugHoverTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get whenReady(){return this._whenReady}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}listenTreeViewChange(){var d,u;this.dispose(),this.disposableCollection.push((d=this.treeModel)===null||d===void 0?void 0:d.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,E=>{this.loadingDecoration.addTarget(E)})),this.disposableCollection.push((u=this.treeModel)===null||u===void 0?void 0:u.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,E=>{this.loadingDecoration.removeTarget(E)}))}async initTreeModel(d){if(d)return this._treeModel=this.injector.get(p.DebugHoverModel,[d]),this.initDecorations(d),this.listenTreeViewChange(),this._treeModel}initDecorations(d){this._decorations=new l.DecorationsManager(d),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration))}handleTreeHandler(d){this._debugHoverTreeHandle=d}async refresh(d=this.treeModel.root){!_.ExpressionContainer.is(d)&&d.parent&&(d=d.parent),this.queueChangeEvent(d.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(d,u){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new v.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var E;await this.flushEventQueue(),(E=this.flushEventQueueDeferred)===null||E===void 0||E.resolve(),this.flushEventQueueDeferred=null,u()},n.DEFAULT_FLUSH_FILE_EVENT_DELAY)),this._changeEventDispatchQueue.indexOf(d)===-1&&this._changeEventDispatchQueue.push(d)}};t.DebugHoverTreeModelService=a,a.DEFAULT_FLUSH_FILE_EVENT_DELAY=100,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],a.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(s.DebugHoverSource),r.__metadata("design:type",s.DebugHoverSource)],a.prototype,"debugHoverSource",void 0),t.DebugHoverTreeModelService=a=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],a)},65960:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverWidget=void 0;const r=e(85608),o=r.__importDefault(e(12784)),l=r.__importDefault(e(14041)),v=r.__importDefault(e(25873)),_=e(76003),m=e(41869),p=r.__importStar(e(20868)),s=e(62663),h=e(64582),a=e(38029),g=e(74257),d=e(23217),u=e(63940);let E=n=class{constructor(){this.toDispose=new m.DisposableCollection,this.allowEditorOverflow=!0,this.doSchedule=(0,o.default)(c=>c(),300),this.init()}init(){this.toDispose.pushAll([m.Disposable.create(()=>this.editor.removeContentWidget(this)),m.Disposable.create(()=>this.hide()),this.sessions.onDidChange(()=>{this.isEditorFrame()||this.hide()})]),this.renderView()}handleWindowWheel(c){c.stopPropagation()}getId(){return n.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.classList.add(n.ID)),this.domNode}getPosition(){var c;const y=this.options&&this.options.selection.getStartPosition(),b=y&&((c=this.editor.getModel())===null||c===void 0?void 0:c.getWordAtPosition(y));return y&&b?{position:new p.Position(y.lineNumber,b.startColumn),preference:[s.monacoBrowser.editor.ContentWidgetPositionPreference.BELOW,s.monacoBrowser.editor.ContentWidgetPositionPreference.ABOVE]}:null}dispose(){this.toDispose.dispose()}show(c){this.schedule(()=>this.doShow(c),c&&c.immediate)}hide(c){this.schedule(()=>this.doHide(),c&&c.immediate)}schedule(c,y=!0){y?(this.doSchedule.cancel(),c()):this.doSchedule(c)}isEditorFrame(){const{currentFrame:c}=this.sessions;return!!c&&!!c.source&&!!this.editor.getModel()&&this.editor.getModel().uri.toString()===c.source.uri.toString()}doHide(){window.removeEventListener("mousewheel",this.handleWindowWheel,!0),this.getDomNode().contains(document.activeElement)&&this.editor.focus(),this.hoverSource.dispose(),this.hoverSource.clearEvaluate(),this.options=void 0,this.editor.removeContentWidget(this)}layoutContentWidget(){this.editor.layoutContentWidget(this)}renderView(){v.default.createRoot(this.getDomNode()).render(l.default.createElement(m.ConfigProvider,{value:this.configContext},l.default.createElement(u.DebugHoverView,null))),this.layoutContentWidget()}async doShow(c=this.options){if(!this.isEditorFrame()||!c||this.options&&this.options.selection.equalsRange(c.selection))return;this.options=c;const y=await this.expressionProvider.get(this.editor.getModel(),c.selection);y&&(this.hoverSource.clearEvaluate(),await this.hoverSource.evaluate(y)&&(this.reporterService.point(h.DEBUG_REPORT_NAME===null||h.DEBUG_REPORT_NAME===void 0?void 0:h.DEBUG_REPORT_NAME.DEBUG_VARIABLES,"hover",y),this.editor.addContentWidget(this),window.addEventListener("mousewheel",this.handleWindowWheel,!0)))}};t.DebugHoverWidget=E,E.ID="debug-hover-widget",r.__decorate([(0,_.Autowired)(h.DebugEditor),r.__metadata("design:type",Object)],E.prototype,"editor",void 0),r.__decorate([(0,_.Autowired)(h.IDebugSessionManager),r.__metadata("design:type",a.DebugSessionManager)],E.prototype,"sessions",void 0),r.__decorate([(0,_.Autowired)(g.DebugExpressionProvider),r.__metadata("design:type",g.DebugExpressionProvider)],E.prototype,"expressionProvider",void 0),r.__decorate([(0,_.Autowired)(d.DebugHoverSource),r.__metadata("design:type",d.DebugHoverSource)],E.prototype,"hoverSource",void 0),r.__decorate([(0,_.Autowired)(m.AppConfig),r.__metadata("design:type",Object)],E.prototype,"configContext",void 0),r.__decorate([(0,_.Autowired)(m.IReporterService),r.__metadata("design:type",Object)],E.prototype,"reporterService",void 0),t.DebugHoverWidget=E=n=r.__decorate([(0,_.Injectable)(),r.__metadata("design:paramtypes",[])],E)},63940:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=e(41869),_=e(1149),m=e(28875),p=e(85322),s=n.__importDefault(e(94084)),h=()=>{const a=(0,v.useInjectable)(p.DebugHoverTreeModelService),g=(0,v.useInjectable)(_.LayoutViewSizeConfig),d=250,u=420,E=4,[f,c]=o.default.useState({}),[y,b]=o.default.useState(d),A=o.default.useRef(null);o.default.useEffect(()=>(a.onDidUpdateTreeModelOrVariable(async M=>{const{treeModel:O,variable:x}=M;O&&await O.ensureReady,c({treeModel:O,variable:x})}),S(),()=>{a.removeNodeDecoration()}),[]),o.default.useEffect(()=>{let M;return b(d),f.treeModel&&(M=f.treeModel.root.watcher.on(l.TreeNodeEvent.DidChangeExpansionState,()=>{var O,x;const k=Math.max(d,(((O=f.treeModel)===null||O===void 0?void 0:O.root.branchSize)||0)*22),F=(x=A.current)===null||x===void 0?void 0:x.getBoundingClientRect();if(F){const L=F.top,N=window.innerHeight-L-g.statusBarHeight-E;b(Math.min(N,k,u))}else b(Math.min(u,k))})),()=>{M?.dispose()}},[f.treeModel]);const S=async()=>{a.treeModel&&(await a.treeModel.ensureReady,c({treeModel:a.treeModel}))},w=M=>{a.handleTreeHandler({...M,getModel:()=>f?.treeModel,hasDirectFocus:()=>A.current===document.activeElement})},I=(M,O)=>{M.stopPropagation();const{handleTwistierClick:x}=a;O&&x(O)},D=!!f.treeModel&&!!f.treeModel.root.variablesReference,T=o.default.useCallback(M=>{const O=a.decorations.getDecorations(M.item);return o.default.createElement(m.DebugVariableRenderedNode,{item:M.item,itemType:M.itemType,decorations:O,onClick:I,onTwistierClick:I,defaultLeftPadding:0,leftPadding:4})},[f.treeModel]),R=()=>D?o.default.createElement("div",{className:s.default.debug_hover_content,tabIndex:-1,ref:A},o.default.createElement(l.RecycleTree,{height:y,itemHeight:m.DEBUG_VARIABLE_TREE_NODE_HEIGHT,onReady:w,model:f.treeModel,placeholder:()=>o.default.createElement("span",null),overflow:"auto"},T)):null;return o.default.createElement("div",{className:s.default.debug_hover},f.treeModel?o.default.createElement("div",{className:(0,r.default)(s.default.debug_hover_title,D&&s.default.has_complex_value),title:f.treeModel.root.name},f.treeModel.root.name):f.variable&&o.default.createElement("div",{className:(0,r.default)(s.default.debug_hover_title,D&&s.default.has_complex_value),title:f.variable.name},f.variable.value),R())};t.DebugHoverView=h},71569:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugModelManager=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(54414),v=e(64582),_=e(99797),m=e(37499);let p=class extends o.Disposable{constructor(){super(),this.toDispose=new o.DisposableCollection,this._onMouseDown=new o.Emitter,this._onMouseMove=new o.Emitter,this._onMouseLeave=new o.Emitter,this._onMouseUp=new o.Emitter,this.onMouseDown=this._onMouseDown,this.onMouseMove=this._onMouseMove,this.onMouseLeave=this._onMouseLeave,this.onMouseUp=this._onMouseUp,this._onModelChanged=new o.Emitter,this.onModelChanged=this._onModelChanged.event,this.models=new Map}dispose(){for(const h of this.models.values())this.toDispose.pushAll(h);this.toDispose.dispose(),this.models.clear()}init(){this.editorCollection.onCodeEditorCreate(h=>this.push(h)),this.breakpointManager.onDidChangeBreakpoints(h=>{const{currentEditor:a}=this.editorService,g=a&&a.currentUri;g&&this.render(g),this.closeBreakpointIfAffected(h)})}get model(){const{currentEditor:h}=this.editorService,a=h&&h.currentUri;if(a){const g=this.models.get(a.toString());return g&&g[0]}}closeBreakpointIfAffected({affected:h,removed:a}){h.forEach(g=>{const d=this.models.get(g.toString());if(d)for(const u of d){const E=u.getBreakpointWidget(),f=E.position;if(!f)return;for(const c of a)c.raw.line===f.lineNumber&&E.dispose()}})}render(h){const a=this.models.get(h.toString());if(a)for(const g of a)g.render()}push(h){const a=h.monacoEditor;h.onRefOpen(d=>{const u=d.instance.uri.toString(),E=this.models.get(u)||[];let f=!1;if(E.length>0){for(const c of E)if(c.getEditor()._id===a._id){c.render(),f=!0;break}}if(!f){const c=d.instance.getMonacoModel(),y=this.debugModelFactory(a);E.push(y),this.models.set(u,E),c.onWillDispose(()=>{y.dispose(),this.models.delete(u)})}});const g=(d,u)=>{const E=a.getModel();if(!E)throw new Error("Not find model");this.handleMouseEvent(new o.URI(E.uri.toString()),d,u,a)};this.toDispose.push(a.onMouseMove(d=>g(v.DebugModelSupportedEventType.move,d))),this.toDispose.push(a.onMouseDown(d=>g(v.DebugModelSupportedEventType.down,d))),this.toDispose.push(a.onMouseLeave(d=>g(v.DebugModelSupportedEventType.leave,d))),this.toDispose.push(a.onContextMenu(d=>g(v.DebugModelSupportedEventType.contextMenu,d))),this.toDispose.push(a.onDidChangeModel(d=>this._onModelChanged.fire(d)))}resolve(h){const a=this.models.get(h.toString());if(a)return a}handleMouseEvent(h,a,g,d){const u=this.models.get(h.toString());if(!(!u||!this.debugConfigurationManager.canSetBreakpointsIn(u[0].getEditor().getModel()))){for(const f of u)if(f.getEditor().getId()===d.getId()){switch(a){case v.DebugModelSupportedEventType.contextMenu:f.onContextMenu(g);break;case v.DebugModelSupportedEventType.down:f.onMouseDown(g);break;case v.DebugModelSupportedEventType.leave:f.onMouseLeave(g);break;case v.DebugModelSupportedEventType.move:f.onMouseMove(g);break;default:break}break}}}};t.DebugModelManager=p,n.__decorate([(0,r.Autowired)(l.WorkbenchEditorService),n.__metadata("design:type",l.WorkbenchEditorService)],p.prototype,"editorService",void 0),n.__decorate([(0,r.Autowired)(l.EditorCollectionService),n.__metadata("design:type",l.EditorCollectionService)],p.prototype,"editorCollection",void 0),n.__decorate([(0,r.Autowired)(v.DebugModelFactory),n.__metadata("design:type",Function)],p.prototype,"debugModelFactory",void 0),n.__decorate([(0,r.Autowired)(_.BreakpointManager),n.__metadata("design:type",_.BreakpointManager)],p.prototype,"breakpointManager",void 0),n.__decorate([(0,r.Autowired)(m.DebugConfigurationManager),n.__metadata("design:type",m.DebugConfigurationManager)],p.prototype,"debugConfigurationManager",void 0),t.DebugModelManager=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},91260:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugModel=void 0;const r=e(85608),o=r.__importDefault(e(12784)),l=e(76003),v=e(41869),_=e(93899),m=e(43718),p=r.__importStar(e(20868)),s=e(62663),h=e(52416),a=e(64582),g=e(24395),d=e(26296),u=e(99797),E=e(38949),f=e(38029),c=e(97319),y=e(17475),b=e(65960),A=r.__importStar(e(26571));let S=n=class{static createContainer(D,T){return D.createChild([{token:g.DebugEditor,useValue:T},{token:b.DebugHoverWidget,useClass:b.DebugHoverWidget},{token:y.DebugBreakpointWidget,useClass:y.DebugBreakpointWidget},{token:a.IDebugModel,useClass:n}])}static createModel(D,T){return n.createContainer(D,T).get(a.IDebugModel)}get uri(){return this._uri}constructor(){this.toDispose=new m.DisposableCollection,this.frameDecorations=[],this.updatingDecorations=!1,this.breakpointDecorations=[],this.breakpointRanges=new Map,this.currentBreakpointDecorations=[],this.candidateDecorations=[],this.renderFrames=(0,o.default)((D=[])=>{var T;if(this.toDispose.disposed||((T=this.editor.getModel())===null||T===void 0?void 0:T.uri.toString())!==this._uri.toString())return;const R=this.createFrameDecorations().concat(D);this.frameDecorations=this.deltaDecorations(this.frameDecorations,R)},100),this.toggleBreakpoint=(D=this.position)=>{this.doToggleBreakpoint(D)},this.openBreakpointView=(D,T,R)=>{this.breakpointWidget.show(D,T,R)},this.closeBreakpointView=()=>{this.breakpointWidget.hide()},this.acceptBreakpoint=()=>{const{position:D,values:T}=this.breakpointWidget;if(this.reporterService.point(a.DEBUG_REPORT_NAME===null||a.DEBUG_REPORT_NAME===void 0?void 0:a.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,this.breakpointWidget.breakpointType),D&&T){const R=this.getBreakpoint(D);R?(R.raw.condition=T.condition,R.raw.hitCondition=T.hitCondition,R.raw.logMessage=T.logMessage,this.breakpointManager.updateBreakpoint(R)):this.breakpointManager.addBreakpoint(u.DebugBreakpoint.create(this._uri,{line:D.lineNumber,...T})),this.breakpointWidget.hide()}},this.hintDecorations=[],this.init()}async init(){const D=this.editor.getModel();let T;this._uri=new m.URI(D.uri.toString()),this.decorator=new E.DebugDecorator,this.toDispose.pushAll([this.breakpointWidget,this.editor.onKeyDown(R=>{R.code==="Escape"&&!R.altKey&&!R.shiftKey&&!R.metaKey?this.debugHoverWidget.hide({immediate:!0}):this.debugHoverWidget.hide({immediate:!1})}),this.editor.onDidChangeModelContent(()=>this.renderFrames()),this.debugSessionManager.onDidChange(()=>this.renderFrames()),this.debugBreakpointsService.onDidFocusedBreakpoints(({range:R})=>{this.preferenceService.getValid("debug.breakpoint.editorHint",!0)&&(this.renderFrames([{options:A.FOCUS_BREAKPOINTS_STACK_FRAME_DECORATION,range:R}]),T&&clearTimeout(T),T=window.setTimeout(()=>{this.renderFrames(),clearTimeout(T)},300))}),this.editor.getModel().onDidChangeContent(()=>this.updateBreakpoints()),this.editor.onDidChangeModel(()=>{this.closeBreakpointView()})]),this.renderFrames(),this.render()}dispose(){this.toDispose.dispose()}get position(){return this._position||this.editor.getPosition()}get breakpoint(){return this.getBreakpoint()}getBreakpoint(D){return this.breakpointManager.getBreakpoint(this._uri,D?D.lineNumber:void 0)}createFrameDecorations(){var D;const T=[],{currentFrame:R,topFrame:M}=this.debugSessionManager;if(!R||!R.source||R.source.uri.toString()!==((D=this.editor.getModel())===null||D===void 0?void 0:D.uri.toString()))return T;const O=new p.Range(R.raw.line,R.raw.column,R.raw.line,1<<30),x=new p.Range(R.raw.line,R.raw.column,R.raw.line,R.raw.column+1);if(M===R)if(T.push({options:A.TOP_STACK_FRAME_MARGIN,range:x}),R.thread.stoppedDetails&&R.thread.stoppedDetails.reason==="exception")T.push({options:A.TOP_STACK_FRAME_EXCEPTION_DECORATION,range:O});else{T.push({options:A.TOP_STACK_FRAME_DECORATION,range:O});const{topFrameRange:k}=this;k&&k.startLineNumber===R.raw.line&&k.startColumn!==R.raw.column&&T.push({options:A.TOP_STACK_FRAME_INLINE_DECORATION,range:O}),this.topFrameRange=O}else T.push({options:A.FOCUSED_STACK_FRAME_MARGIN,range:x}),T.push({options:A.FOCUSED_STACK_FRAME_DECORATION,range:O});return T}deltaDecorations(D,T){this.updatingDecorations=!0;try{return this.editor.deltaDecorations(D,T)}finally{this.updatingDecorations=!1}}focusStackFrame(){this.renderFrames()}async render(){await this.renderBreakpoints(),this.renderFrames()}async renderBreakpoints(){await this.breakpointManager.whenReady,this.renderNormalBreakpoints(),this.renderCurrentBreakpoints()}renderNormalBreakpoints(){const D=this.createBreakpointDecorations();this.breakpointDecorations=this.deltaDecorations(this.breakpointDecorations,D),this.updateBreakpointRanges()}updateBreakpoints(){if(this.areBreakpointsAffected()){const D=this.createBreakpoints();this.breakpointManager.setBreakpoints(this._uri,D)}}areBreakpointsAffected(){if(this.updatingDecorations||!this.editor.getModel())return!1;for(const D of this.breakpointDecorations){const T=this.editor.getModel().getDecorationRange(D),R=this.breakpointRanges.get(D);if(!T||!T.equalsRange(R))return!0}return!1}createBreakpoints(){const{_uri:D}=this,T=new Set,R=[];for(const M of this.breakpointDecorations){const O=this.editor.getModel().getDecorationRange(M);if(O&&!T.has(O.startLineNumber)){const x=O.startLineNumber,k=this.breakpointRanges.get(M),F=k&&this.breakpointManager.getBreakpoint(D,k.startLineNumber)||{},L=u.DebugBreakpoint.create(D,{...F.raw||{},line:x},F.enabled);R.push(L),T.add(x)}}return R}createBreakpointDecorations(){return this.breakpointManager.getBreakpoints(this._uri).map(T=>this.createBreakpointDecoration(T))}createBreakpointDecoration(D){const T=D.raw.line,R=D.raw.column||0;return{range:new p.Range(T,R,T,R+1),options:{description:"breakpoint-decoration",stickiness:A.STICKINESS}}}async renderCurrentBreakpoints(){const D=this.breakpointManager.getBreakpoints(this._uri),T=this.createCurrentBreakpointDecorations(),R=this.deltaDecorations(this.currentBreakpointDecorations.map(({decorationId:x})=>x),T);this.currentBreakpointDecorations.forEach(x=>{x.inlineWidget&&x.inlineWidget.dispose()}),this.currentBreakpointDecorations=R.map((x,k)=>{const F=T[k],L=D[k],N=(L.enabled?A.BREAKPOINT_DECORATION:A.BREAKPOINT_DECORATION_DISABLED).glyphMarginClassName,U=F.options.beforeContentClassName?new w(this.editor,x,N,L,this.breakpointManager):void 0;return{breakpoint:L,decorationId:x,inlineWidget:U}});const M=await this.getCandidateBreakpoints(D),O=this.deltaDecorations(this.candidateDecorations.map(({decorationId:x})=>x),M);this.candidateDecorations.forEach(x=>{x.inlineWidget.dispose()}),this.candidateDecorations=O.map((x,k)=>{const{breakpoint:F}=M[k],L=(F?A.BREAKPOINT_DECORATION:A.BREAKPOINT_DECORATION_DISABLED).glyphMarginClassName,N=new w(this.editor,x,L,F,this.breakpointManager);return{decorationId:x,inlineWidget:N}})}async getCandidateBreakpoints(D){const T=this.editor.getModel(),R=this.debugSessionManager.currentSession;if(!T||!R?.capabilities.supportsBreakpointLocationsRequest)return[];const M=Array.from(new Set(D.map(x=>x.raw.line))),O=[];return await Promise.all(M.map(async x=>{const k=await R.breakpointLocations(this._uri,x);if(k.length<=1)return;const F=T.getLineCount();if(x>F)return;const L=T.getLineFirstNonWhitespaceColumn(x),N=T.getLineLastNonWhitespaceColumn(x);k.forEach(U=>{const W=new p.Range(U.lineNumber,U.column,U.lineNumber,U.column+1);if(U.column<=L||U.column>N)return;const j=this.currentBreakpointDecorations.find(({breakpoint:Q})=>Q.raw.line===W.startLineNumber&&Q.raw.column===W.startColumn);j?.inlineWidget||O.push({range:W,options:{description:"debug-breakpoint-placeholder",stickiness:p.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,beforeContentClassName:j?void 0:"debug-breakpoint-placeholder"},breakpoint:j?.breakpoint})})})),O}createCurrentBreakpointDecorations(){return this.breakpointManager.getBreakpoints(this._uri).filter(T=>(0,u.isDebugBreakpoint)(T)).map(T=>this.createCurrentBreakpointDecoration(T))}createCurrentBreakpointDecoration(D){const T=this.debugSessionManager.currentSession,R=D.status.get(T&&T.id||""),M=R&&R.line?R.line:D.raw.line,O=D.raw.column||0,x=this.editor.getModel(),k=x.getLineCount(),F=M>k?!1:O>x.getLineFirstNonWhitespaceColumn(M),L=new p.Range(M,O,M,O+1),{className:N,message:U}=this.decorator.getDecoration(D,!!T,this.breakpointManager.breakpointsEnabled),W=this.preferenceService.getValid("debug.breakpoint.showBreakpointsInOverviewRuler",!1);let j=null;return W&&(j={color:this.themeService.getColor({id:h.debugIconBreakpointForeground}),position:p.editor.OverviewRulerLane.Left}),{range:L,options:{description:"debug-breakpoint-placeholder",glyphMarginClassName:N,glyphMarginHoverMessage:U.map(Q=>({value:Q})),stickiness:A.STICKINESS,beforeContentClassName:F?"debug-breakpoint-placeholder":void 0,overviewRuler:j}}}updateBreakpointRanges(){this.breakpointRanges.clear();for(const D of this.breakpointDecorations){const T=this.editor.getModel().getDecorationRange(D);this.breakpointRanges.set(D,T)}}showHover(D){const T=D.target.type,R=m.isOSX?"metaKey":"ctrlKey";D.event.altKey||T===s.monacoBrowser.editor.MouseTargetType.CONTENT_WIDGET&&D.target.detail===this.debugHoverWidget.getId()&&!D.event[R]||(T===s.monacoBrowser.editor.MouseTargetType.CONTENT_TEXT?this.debugHoverWidget.show({selection:D.target.range,immediate:!1}):this.debugHoverWidget.hide({immediate:!1}))}hideHover({event:D}){const T=this.debugHoverWidget.getDomNode().getBoundingClientRect();(D.posx<T.left||D.posx>T.right||D.posy<T.top||D.posy>T.bottom)&&this.debugHoverWidget.hide({immediate:!1})}doToggleBreakpoint(D=this.position){const T=this.breakpointManager.getBreakpoints(this._uri,{lineNumber:D.lineNumber});if(T.length)for(const R of T)this.breakpointManager.delBreakpoint(R);else this.breakpointManager.addBreakpoint(u.DebugBreakpoint.create(this._uri,{line:D.lineNumber}))}get contributedContextMenu(){return this.menuService.createMenu(_.MenuId.DebugBreakpointsContext,this.contextKeyService)}onContextMenu(D){var T;if(this.marginFreeFromNonDebugDecorations((T=D.target.position)===null||T===void 0?void 0:T.lineNumber)&&D.target&&D.target.type===s.monacoBrowser.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const R=this.breakpointManager.getBreakpoint(this._uri,D.target.position.lineNumber);this.breakpointManager.selectedBreakpoint={breakpoint:R,model:this};const M=this.contributedContextMenu,O=(0,_.generateMergedCtxMenu)({menus:M});this.ctxMenuRenderer.show({anchor:D.event.browserEvent,menuNodes:O,args:[D.target.position]})}}marginFreeFromNonDebugDecorations(D){const T=this.editor.getLineDecorations(D);if(Array.isArray(T))for(const{options:R}of T){const M=R.glyphMarginClassName;if(M&&(M.includes("testing-run-glyph")||M.includes("interface-navigation-glyph")))return!1}return!0}onMouseDown(D){var T;this.marginFreeFromNonDebugDecorations((T=D.target.position)===null||T===void 0?void 0:T.lineNumber)&&(D.target&&D.target.type===s.monacoBrowser.editor.MouseTargetType.GUTTER_GLYPH_MARGIN&&(D.event.rightButton||(this.editor.focus(),this.toggleBreakpoint(D.target.position))),this.hintBreakpoint(D))}onMouseMove(D){var T;if(!this.marginFreeFromNonDebugDecorations((T=D.target.position)===null||T===void 0?void 0:T.lineNumber)){this.onMouseLeave(D);return}this.showHover(D),this.hintBreakpoint(D)}onMouseLeave(D){this.hideHover(D),this.deltaHintDecorations([])}hintBreakpoint(D){const T=this.createHintDecorations(D);this.deltaHintDecorations(T)}deltaHintDecorations(D){this.hintDecorations=this.deltaDecorations(this.hintDecorations,D)}createHintDecorations(D){if(D.target&&D.target.type===s.monacoBrowser.editor.MouseTargetType.GUTTER_GLYPH_MARGIN||D.target.type===s.monacoBrowser.editor.MouseTargetType.GUTTER_LINE_NUMBERS){const T=D.target.position.lineNumber;return this.breakpointManager.getBreakpoint(this._uri,T)?[]:[{range:new p.Range(T,1,T,1),options:A.BREAKPOINT_HINT_DECORATION}]}return[]}getBreakpoints(D,T){return this.breakpointManager.getBreakpoints(D,T)}getEditor(){return this.editor}getBreakpointWidget(){return this.breakpointWidget}getDebugHoverWidget(){return this.debugHoverWidget}};t.DebugModel=S,r.__decorate([(0,l.Autowired)(g.DebugEditor),r.__metadata("design:type",Object)],S.prototype,"editor",void 0),r.__decorate([(0,l.Autowired)(y.DebugBreakpointWidget),r.__metadata("design:type",y.DebugBreakpointWidget)],S.prototype,"breakpointWidget",void 0),r.__decorate([(0,l.Autowired)(b.DebugHoverWidget),r.__metadata("design:type",b.DebugHoverWidget)],S.prototype,"debugHoverWidget",void 0),r.__decorate([(0,l.Autowired)(d.IDebugSessionManager),r.__metadata("design:type",f.DebugSessionManager)],S.prototype,"debugSessionManager",void 0),r.__decorate([(0,l.Autowired)(c.DebugBreakpointsService),r.__metadata("design:type",c.DebugBreakpointsService)],S.prototype,"debugBreakpointsService",void 0),r.__decorate([(0,l.Autowired)(u.BreakpointManager),r.__metadata("design:type",u.BreakpointManager)],S.prototype,"breakpointManager",void 0),r.__decorate([(0,l.Autowired)(_.AbstractMenuService),r.__metadata("design:type",_.AbstractMenuService)],S.prototype,"menuService",void 0),r.__decorate([(0,l.Autowired)(v.IContextKeyService),r.__metadata("design:type",Object)],S.prototype,"contextKeyService",void 0),r.__decorate([(0,l.Autowired)(_.ICtxMenuRenderer),r.__metadata("design:type",_.ICtxMenuRenderer)],S.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,l.Autowired)(v.IReporterService),r.__metadata("design:type",Object)],S.prototype,"reporterService",void 0),r.__decorate([(0,l.Autowired)(v.PreferenceService),r.__metadata("design:type",Object)],S.prototype,"preferenceService",void 0),r.__decorate([(0,l.Autowired)(h.IThemeService),r.__metadata("design:type",Object)],S.prototype,"themeService",void 0),r.__decorate([m.memoize,r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[])],S.prototype,"contributedContextMenu",null),t.DebugModel=S=n=r.__decorate([(0,l.Injectable)(),r.__metadata("design:paramtypes",[])],S);class w extends m.Disposable{constructor(D,T,R,M,O){super(),this.editor=D,this.decorationId=T,this.breakpoint=M,this.breakpointManager=O,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.range=this.editor.getModel().getDecorationRange(T),this.addDispose(this.editor.onDidChangeModelDecorations(()=>{const k=this.editor.getModel().getDecorationRange(this.decorationId);this.range&&!this.range.equalsRange(k)&&(this.range=k,this.editor.layoutContentWidget(this))})),this.addDispose(m.Disposable.create(()=>{this.editor.removeContentWidget(this)})),this.create(R),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(D){const T=document.createElement("div");T.className="inline-breakpoint-widget",D&&(0,v.addClassName)(T,D),this.domNode=T;const{EditorOption:R}=p.editor,M=()=>{const O=this.editor.getOption(R.lineHeight);T.style.height=`${O}px`,T.style.width=`${Math.ceil(.8*O)}px`,T.style.marginLeft="4px"};M(),this.addDispose(new v.DomListener(T,"click",async()=>{this.breakpoint?this.breakpointManager.delBreakpoint(this.breakpoint):this.breakpointManager.addBreakpoint(u.DebugBreakpoint.create(this.editor.getModel().uri,{line:this.range.startLineNumber,column:this.range.startColumn}))})),this.addDispose(this.editor.onDidChangeConfiguration(O=>{(O.hasChanged(R.fontSize)||O.hasChanged(R.lineHeight))&&M()}))}getId(){return(0,m.uuid)()}getDomNode(){return this.domNode}getPosition(){return this.range?(this.domNode.classList.toggle("line-start",this.range.startColumn===1),{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn-1},preference:[s.monacoBrowser.editor.ContentWidgetPositionPreference.EXACT]}):null}}r.__decorate([m.memoize,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],w.prototype,"getId",null)},78606:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugRunToCursorService=void 0;const n=e(85608),r=e(76003),o=e(54414),l=e(26296),v=e(66089),_=e(38029),m=e(97319);let p=class{constructor(){}async run(h,a=!1){const g=this.sessionManager.currentSession;if(!g||g.state!==l.DebugState.Stopped)return;const d=this.workbenchEditorService.currentEditor;if(d){if(!d.monacoEditor)return}else return;const{monacoEditor:u}=d,E=u.getPosition();if(!(u.hasModel()&&E))return;const f=g.getModel();if(!f)return;const c=!!f.getBreakpoints(h,{column:E.column,lineNumber:E.lineNumber}).length;let y,b=g.currentThread,A=[];if(!c){a&&(A=f.getBreakpoints().filter(I=>I.enabled).filter(I=>I.raw.column!==E.column&&I.raw.line!==E.lineNumber),A.forEach(I=>{this.debugBreakpointsService.toggleBreakpointEnable(I)}));const w=await this.addBreakpoints(h,E);if(!w){this.recoverStatus(A);return}w.thread&&(b=w.thread),w.breakpoint&&(y=w.breakpoint)}if(!b){this.recoverStatus(A);return}const S=b.session.onDidChangeState(()=>{const w=g.state;(w===l.DebugState.Stopped||w===l.DebugState.Inactive)&&(y&&g.delBreakpoint(y),S.dispose())});await b.continue(),this.recoverStatus(A)}async addBreakpoints(h,a){const g=this.sessionManager.currentSession;if(!g)return;let d=1;const u=g.currentFrame;u&&u.range().startLineNumber===a.lineNumber&&(d=a.column||1);const E=v.DebugBreakpoint.create(h,{line:a.lineNumber,column:d});if(await g.addBreakpoint(E,!0),!E)return{breakpoint:void 0,thread:g.currentThread};let f=g.currentThread,c=0;const y=g.threads.filter(b=>b.stopped);if(c<3&&g.currentThread&&y.includes(g.currentThread)&&(f=g.currentThread,c=3),c<2){const b=y.find(A=>A.topFrame);b&&(f=b,c=2)}return c<1&&(f=y[0],c=2),{thread:f,breakpoint:E}}recoverStatus(h){h.forEach(a=>{this.debugBreakpointsService.toggleBreakpointEnable(a)})}};t.DebugRunToCursorService=p,n.__decorate([(0,r.Autowired)(l.IDebugSessionManager),n.__metadata("design:type",_.DebugSessionManager)],p.prototype,"sessionManager",void 0),n.__decorate([(0,r.Autowired)(o.WorkbenchEditorService),n.__metadata("design:type",o.WorkbenchEditorService)],p.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(m.DebugBreakpointsService),n.__metadata("design:type",m.DebugBreakpointsService)],p.prototype,"debugBreakpointsService",void 0),t.DebugRunToCursorService=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},26571:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BREAKPOINT_DECORATION_DISABLED=t.BREAKPOINT_DECORATION=t.BREAKPOINT_HINT_DECORATION=t.TOP_STACK_FRAME_INLINE_DECORATION=t.FOCUSED_STACK_FRAME_DECORATION=t.TOP_STACK_FRAME_EXCEPTION_DECORATION=t.FOCUS_BREAKPOINTS_STACK_FRAME_DECORATION=t.TOP_STACK_FRAME_DECORATION=t.FOCUSED_STACK_FRAME_MARGIN=t.TOP_STACK_FRAME_MARGIN=t.BREAK_PONINT_HOVER_MARGIN=t.STICKINESS=void 0;const r=e(85608).__importStar(e(20868));t.STICKINESS=r.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,t.BREAK_PONINT_HOVER_MARGIN={description:"debug-hover",glyphMarginClassName:"sumi-debug-hover",linesDecorationsClassName:"sumi-debug-hover",isWholeLine:!0},t.TOP_STACK_FRAME_MARGIN={description:"debug-top-stack-frame",glyphMarginClassName:"sumi-debug-top-stack-frame",stickiness:t.STICKINESS},t.FOCUSED_STACK_FRAME_MARGIN={description:"debug-focused-stack-frame",glyphMarginClassName:"sumi-debug-focused-stack-frame",stickiness:t.STICKINESS},t.TOP_STACK_FRAME_DECORATION={description:"debug-top-stack-frame-line",isWholeLine:!0,className:"sumi-debug-top-stack-frame-line",stickiness:t.STICKINESS},t.FOCUS_BREAKPOINTS_STACK_FRAME_DECORATION={description:"focus-breakpoints-stack-frame-line",isWholeLine:!0,className:"sumi-focus-breakpoints-stack-frame-line",stickiness:t.STICKINESS},t.TOP_STACK_FRAME_EXCEPTION_DECORATION={description:"debug-top-stack-frame-exception-line",isWholeLine:!0,className:"sumi-debug-top-stack-frame-exception-line",stickiness:t.STICKINESS},t.FOCUSED_STACK_FRAME_DECORATION={description:"debug-focused-stack-frame-line",isWholeLine:!0,className:"sumi-debug-focused-stack-frame-line",stickiness:t.STICKINESS},t.TOP_STACK_FRAME_INLINE_DECORATION={description:"debug-top-stack-frame-column",beforeContentClassName:"sumi-debug-top-stack-frame-column"},t.BREAKPOINT_HINT_DECORATION={description:"debug-breakpoint-hint",glyphMarginClassName:"sumi-debug-breakpoint-hint",stickiness:t.STICKINESS},t.BREAKPOINT_DECORATION={description:"debug-breakpoint",glyphMarginClassName:"sumi-debug-breakpoint",stickiness:t.STICKINESS},t.BREAKPOINT_DECORATION_DISABLED={description:"debug-breakpoint-disabled",glyphMarginClassName:"sumi-debug-breakpoint-disabled",stickiness:t.STICKINESS}},16885:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EvaluatableExpressionServiceImpl=t.IEvaluatableExpressionService=void 0;const n=e(85608),r=e(76003),o=e(40497),l=new o.LanguageFeatureRegistry;t.IEvaluatableExpressionService=Symbol("IEvaluatableExpressionService");let v=class{getSupportedEvaluatableExpressionProvider(m){return l.ordered(m)}registerEvaluatableExpressionProvider(m,p){return l.register(m,p)}hasEvaluatableExpressProvider(m){return l.has(m)}};t.EvaluatableExpressionServiceImpl=v,t.EvaluatableExpressionServiceImpl=v=n.__decorate([(0,r.Injectable)()],v)},75935:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(17475),t),n.__exportStar(e(65960),t),n.__exportStar(e(91260),t),n.__exportStar(e(71569),t),n.__exportStar(e(26571),t),n.__exportStar(e(74257),t)},33969:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(91825),v=e(64582),_=e(99797),m=e(3005),p=e(37499),s=e(59053),h=e(31141),a=e(40453),g=e(90408),d=e(97186),u=e(38029),E=e(75935),f=e(23217),c=e(16885),y=e(23434),b=e(52369),A=e(44888),S=e(84784),w=e(15153),I=e(11456),D=e(37243),T=e(86752),R=e(14600);e(51377);let M=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:f.DebugHoverSource,useClass:f.DebugHoverSource},{token:E.DebugExpressionProvider,useClass:E.DebugExpressionProvider},{token:v.IDebugModelManager,useClass:E.DebugModelManager},{token:v.IDebugSessionManager,useClass:u.DebugSessionManager},{token:_.BreakpointManager,useClass:_.BreakpointManager},{token:p.DebugConfigurationManager,useClass:p.DebugConfigurationManager},{token:c.IEvaluatableExpressionService,useClass:c.EvaluatableExpressionServiceImpl},{token:l.FolderFilePreferenceProvider,useClass:y.LaunchFolderPreferenceProvider,dropdownForTag:!0,tag:"launch"},{token:v.DebugModelFactory,useFactory:x=>k=>E.DebugModel.createModel(x,k)},{token:d.DebugSessionContributionRegistry,useClass:d.DebugSessionContributionRegistryImpl},{token:v.IDebugService,useClass:g.DebugService},{token:v.ILaunchService,useClass:A.LaunchService},{token:v.IDebugProgress,useClass:a.DebugProgressService},{token:v.IDebugConsoleModelService,useClass:w.DebugConsoleModelService},b.LaunchPreferencesContribution,s.DebugContribution,I.DebugConsoleContribution,T.VariablesPanelContribution,D.DebugCallStackContribution,R.WatchPanelContribution,{token:m.DebugCallStackItemTypeKey,useFactory:x=>x.get(o.IContextKeyService).createKey("callStackItemType")}],this.contributionProvider=d.DebugSessionContribution,this.preferences=h.injectDebugPreferences,this.isOverlay=!0,this.component=S.DebugToolbarOverlayWidget}};t.DebugModule=M,t.DebugModule=M=n.__decorate([(0,r.Injectable)()],M)},39553:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(35721),t),n.__exportStar(e(20391),t)},35721:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkerManager=t.MarkerCollection=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(14951);class v{constructor(p,s){this.uri=p,this.kind=s,this.owner2Markers=new Map}get empty(){return!this.owner2Markers.size}getOwners(){return Array.from(this.owner2Markers.keys())}getMarkers(p){return this.owner2Markers.get(p)||[]}setMarkers(p,s){const h=this.owner2Markers.get(p);return s.length>0?this.owner2Markers.set(p,s.map(a=>this.createMarker(p,a))):this.owner2Markers.delete(p),h||[]}createMarker(p,s){return Object.freeze({uri:this.uri.toString(),kind:this.kind,owner:p,data:s})}findMarkers(p){if(p.owner)return this.owner2Markers.has(p.owner)?this.filterMarkers(p,this.owner2Markers.get(p.owner)):[];{const s=[];for(const h of this.owner2Markers.values())s.push(...this.filterMarkers(p,h));return s}}filterMarkers(p,s){return s?p.dataFilter?s.filter(h=>p.dataFilter(h.data)):s:[]}}t.MarkerCollection=v;let _=class{constructor(){this.uri2MarkerCollection=new Map,this.onDidChangeMarkersEmitter=new o.Emitter,this.init()}init(){this.fileService.onFilesChanged(p=>{const s=p.filter(({type:h})=>h===l.FileChangeType.DELETED);s.length&&this.cleanMarkers(s)})}cleanMarkers(p){for(const s of this.uri2MarkerCollection.keys()){const h=new o.URI(s);l.FileChangeEvent.isDeleted(p,h)&&this.cleanAllMarkers(h)}}get onDidChangeMarkers(){return this.onDidChangeMarkersEmitter.event}fireOnDidChangeMarkers(p){this.onDidChangeMarkersEmitter.fire(p)}setMarkers(p,s,h){const a=p.toString(),g=this.uri2MarkerCollection.get(a)||new v(p,this.getKind()),d=g.setMarkers(s,h);return g.empty?this.uri2MarkerCollection.delete(p.toString()):this.uri2MarkerCollection.set(a,g),this.fireOnDidChangeMarkers(p),d}findMarkers(p={}){if(p.uri){const h=this.uri2MarkerCollection.get(p.uri.toString());return h?h.findMarkers(p):[]}const s=[];for(const h of this.getUris())s.push(...this.uri2MarkerCollection.get(h).findMarkers(p));return s}getUris(){return this.uri2MarkerCollection.keys()}cleanAllMarkers(p){if(p)this.doCleanAllMarkers(p);else for(const s of this.getUris())this.doCleanAllMarkers(new o.URI(s))}doCleanAllMarkers(p){const s=p.toString();this.uri2MarkerCollection.get(s)!==void 0&&(this.uri2MarkerCollection.delete(s),this.fireOnDidChangeMarkers(p))}};t.MarkerManager=_,n.__decorate([(0,r.Autowired)(l.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileService",void 0),t.MarkerManager=_=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],_)},20391:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},88776:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSource=t.DebugSourceData=void 0;const n=e(41869);class r{}t.DebugSourceData=r;class o extends r{constructor(v,_,m,p,s){super(),this.session=v,this.labelProvider=_,this.modelManager=m,this.workbenchEditorService=p,this.fileSystem=s}get uri(){return o.toUri(this.raw)}get available(){return!!this.raw}get presentationHint(){return this.raw.presentationHint}update(v){Object.assign(this,v)}async open(v,_){if(this.uri.scheme===o.SCHEME){const m=await this.load();await this.fileSystem.setContent({uri:this.uri.toString(),lastModification:0},m)}if(_&&_.raw){const{line:m,column:p}=_.raw,s={startLineNumber:m,startColumn:typeof p=="number"?p:0,endLineNumber:m,endColumn:1/0};await this.workbenchEditorService.open(this.uri,{...v,range:s}),_.thread.currentFrame=_;const h=this.modelManager.resolve(this.uri);if(h)for(const a of h)a.focusStackFrame()}else await this.workbenchEditorService.open(this.uri,v)}async load(){const v=this.raw,_=v.sourceReference;return(await this.session.sendRequest("source",{sourceReference:_,source:v})).body.content}get inMemory(){return this.uri.scheme===o.SCHEME}get reference(){return this.raw.sourceReference}get name(){return this.inMemory?this.raw.name||this.uri.path.base||this.uri.path.toString():this.labelProvider.getName(this.uri)}get longName(){return this.inMemory?this.name:this.labelProvider.getLongName(this.uri)}static toUri(v){if(v.sourceReference&&v.sourceReference>0)return new n.URI().withScheme(o.SCHEME).withPath(v.name).withQuery(String(v.sourceReference));if(!v.path)throw new Error("Unrecognized source type: "+JSON.stringify(v));return v.path.match(o.SCHEME_PATTERN)?new n.URI(v.path):new n.URI(n.Uri.file(v.path))}}t.DebugSource=o,o.SCHEME="debug",o.SCHEME_PATTERN=/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/},44485:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowMoreDebugStackFrame=t.DebugStackFrame=t.DebugStackFrameData=void 0;const n=e(41869),r=e(44781),o=e(98650);class l{}t.DebugStackFrameData=l;class v extends l{static is(p){return!!p&&"raw"in p}constructor(p,s){super(),this.thread=p,this.session=s}get id(){return this.session.id+":"+this.thread.id+":"+this.raw.id}get source(){return this._source}update(p){Object.assign(this,p),this._source=this.raw.source&&this.session.getSource(this.raw.source)}async restart(){return this.session.capabilities.supportsRestartFrame?await this.session.sendRequest("restartFrame",{frameId:this.raw.id}):Promise.reject(new Error("restartFrame not supported"))}get canRestart(){return!!this.session.capabilities.supportsRestartFrame&&this.raw.presentationHint!=="label"&&this.raw.presentationHint!=="subtle"&&!!this.raw.canRestart}async open(p){if(!this.source)return;const{line:s,column:h,endLine:a,endColumn:g}=this.raw;let d={startLineNumber:s,startColumn:h,endLineNumber:s,endColumn:1/0};typeof a=="number"&&(d={...d,endLineNumber:a,endColumn:typeof g=="number"?g:1/0}),this.source.open({...p,range:d})}toArgs(p){return Object.assign({},p,{frameId:this.raw.id})}getScopes(p){return this.doGetScopes(p)}async doGetScopes(p){try{return(await this.session.sendRequest("scopes",this.toArgs())).body.scopes.map(h=>new o.DebugScope(h,this.session,p))}catch{return[]}}range(){const p=this.raw;return new r.Range(p.line,p.column,p.endLine||p.line,p.endColumn||p.column)}async getMostSpecificScopes(p){const h=(await this.doGetScopes()).filter(d=>!d.getRawScope().expensive);if(!h.some(d=>!!d.range()))return h;const g=h.filter(d=>d.range()&&r.Range.containsRange(d.range(),p)).sort((d,u)=>d.range().endLineNumber-d.range().startLineNumber-(u.range().endLineNumber-u.range().startLineNumber));return g.length?g:h}}t.DebugStackFrame=v;class _{constructor(p,s,h,a,g){this.nextFrame=p,this.frames=s,this.session=h,this.origin=a,this._open=g,this.open=()=>{this._open(this)}}get name(){return(0,n.formatLocalize)("debug.stack.showMoreAndOrigin",this.frames.length,this.origin)}get id(){var p;return`${this.session.id}:showMore:${(p=this.nextFrame)===null||p===void 0?void 0:p.id}`}}t.ShowMoreDebugStackFrame=_},7885:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugThread=t.DebugThreadData=void 0;const n=e(41869),r=e(64582),o=e(44485);class l{}t.DebugThreadData=l;class v extends l{constructor(m){super(),this.session=m,this._onDidChanged=new n.Emitter,this.onDidChanged=this._onDidChanged.event,this._frames=new Map,this.pendingFetch=Promise.resolve([])}get id(){return this.session.id+":"+this.raw.id}get threadId(){return this.raw.id}get currentFrame(){return this._currentFrame}set currentFrame(m){this._currentFrame=m,this._onDidChanged.fire()}get stopped(){return!!this.stoppedDetails}update(m){Object.assign(this,m),"stoppedDetails"in m&&this.clearFrames()}clear(){this.update({raw:this.raw,stoppedDetails:void 0})}continue(){return this.session.sendRequest("continue",this.toArgs())}stepOver(){return this.session.sendRequest("next",this.toArgs())}stepIn(){return this.session.sendRequest("stepIn",this.toArgs())}stepOut(){return this.session.sendRequest("stepOut",this.toArgs())}pause(){return this.session.sendRequest("pause",this.toArgs())}terminate(){return this.session.sendRequest("terminateThreads",{threadIds:[this.raw.id]})}get frames(){return Array.from(this._frames.values())}get topFrame(){return this.frames[0]}get frameCount(){return this._frames.size}async rawFetchFrames(m=20){return this.pendingFetch=this.pendingFetch.then(async()=>{try{const p=this.frameCount,s=await this.doFetchFrames(p,m);return this.doUpdateFrames(s)}catch{return[]}})}async fetchExceptionInfo(){var m;try{if(((m=this.stoppedDetails)===null||m===void 0?void 0:m.reason)==="exception"&&this.session.capabilities.supportsExceptionInfoRequest){const p=await this.session.exceptionInfo(this.toArgs());if(p)return{id:p.body.exceptionId,description:p.body.description,breakMode:p.body.breakMode,details:p.body.details}}}catch{return}}async fetchFrames(m=20){const p=await this.rawFetchFrames(m);return this.updateCurrentFrame(),p}async doFetchFrames(m,p){try{const s=await this.session.sendRequest("stackTrace",this.toArgs({startFrame:m,levels:p}));return this.stoppedDetails&&(this.stoppedDetails.totalFrames=s.body.totalFrames),s.body.stackFrames}catch(s){return this.stoppedDetails&&(this.stoppedDetails.framesErrorMessage=s.message),[]}}doUpdateFrames(m){const p=this.session.reportTime(r.DEBUG_REPORT_NAME.DEBUG_UI_FRONTEND_TIME,{sessionId:this.session.id,threadId:this.raw.id,threadAmount:this.session.threadCount}),s=new Map(this._frames);for(const a of m){const g=a.id;if(!this._frames.has(g)){const d=new o.DebugStackFrame(this,this.session);this._frames.set(g,d),d.update({raw:a}),s.set(g,d)}}const h=[...s.values()];return p("doUpdateFrames"),h}clearFrames(){this._frames.clear(),this.updateCurrentFrame()}updateCurrentFrame(){const{currentFrame:m}=this,p=m&&m.raw.id;this.currentFrame=typeof p=="number"&&this._frames.get(p)||this._frames.values().next().value}toArgs(m){return Object.assign({},m,{threadId:this.raw.id})}}t.DebugThread=v},14190:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatch=t.IDebugWatchData=void 0;const r=e(85608).__importDefault(e(97331)),o=e(41869),l=e(64582),v=e(98650);t.IDebugWatchData=Symbol("IDebugWatchData");class _{constructor(p,s){this.manager=p,this.reporterService=s,this.toDispose=new o.DisposableCollection,this.fireDidChange=(0,r.default)(()=>this.onDidChangeEmitter.fire(),50),this.fireVariableChange=(0,r.default)(()=>this.onDidVariableChangeEmitter.fire(),50),this.fireExpressionChange=(0,r.default)(h=>this.onDidExExpressionChangeEmitter.fire(h),50),this._expressions=[],this.onDidChangeEmitter=new o.Emitter,this.onDidVariableChangeEmitter=new o.Emitter,this.onDidExExpressionChangeEmitter=new o.Emitter,this.whenReady=this.init()}get onDidChange(){return this.onDidChangeEmitter.event}get onDidVariableChange(){return this.onDidVariableChangeEmitter.event}get onDidExpressionChange(){return this.onDidExExpressionChangeEmitter.event}async getRoot(){const p=[],s=new v.DebugWatchRoot(this.manager.currentSession);for(const h of this._expressions){const a=new v.DebugWatchNode(this.manager.currentSession,h,s);await a.evaluate(),p.push(a)}return s.updatePresetChildren(p),this._root=s,this._root}async init(){this.toDispose.push(this.manager.onDidStopDebugSession(()=>{this.fireDidChange()})),this.toDispose.push(this.manager.onDidDestroyDebugSession(()=>{this.fireDidChange()})),this.toDispose.push(this.manager.onDidChangeActiveDebugSession(()=>{const p=this.manager.currentSession;p&&(p.onVariableChange(()=>{this.fireVariableChange()}),p.onDidChangeCallStack(()=>{this.fireVariableChange()}))}))}async clear(){this.updateWatchExpressions([]),this.fireExpressionChange([]),this.fireDidChange()}async updateWatchExpressions(p){this._expressions=p}addWatchExpression(p){this.reporterService.point(l.DEBUG_REPORT_NAME===null||l.DEBUG_REPORT_NAME===void 0?void 0:l.DEBUG_REPORT_NAME.DEBUG_WATCH,l.DEBUG_COMMANDS.ADD_WATCHER.id,{value:p}),this._expressions.indexOf(p)===-1&&(this._expressions.push(p),this.fireExpressionChange(this._expressions))}renameWatchExpression(p,s){const h=this._expressions.indexOf(p);h>=0&&this._expressions.splice(h,1,s),this.fireExpressionChange(this._expressions)}removeWatchExpression(p){const s=this._expressions.indexOf(p);s>=0&&this._expressions.splice(s,1),this.fireExpressionChange(this._expressions)}}t.DebugWatch=_},50755:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(88776),t),n.__exportStar(e(44485),t),n.__exportStar(e(7885),t),n.__exportStar(e(14190),t)},53741:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxWidget=void 0;const n=e(85608),r=e(51632),o=n.__importDefault(e(14041)),l=e(97267),v=n.__importDefault(e(93089)),_=m=>{var p,s;const{disabled:h,formContext:a,id:g,label:d,hideLabel:u,onBlur:E,onChange:f,onFocus:c,readonly:y,value:b,registry:A,options:S,schema:w,uiSchema:I}=m,{readonlyAsDisabled:D=!0}=a,T=(0,r.getTemplate)("DescriptionFieldTemplate",A,S),R=({target:F})=>f(F.checked),x={onBlur:y?void 0:({target:F})=>E(g,F.checked),onFocus:y?void 0:({target:F})=>c(g,F.checked)},k=(s=(p=S.description)!==null&&p!==void 0?p:w.description)!==null&&s!==void 0?s:w.markdownDescription;return o.default.createElement("div",{className:v.default.checkbox_widget_control},!u&&o.default.createElement("label",{title:d,className:v.default.field_label},d),o.default.createElement(l.CheckBox,{checked:typeof b>"u"?!1:b,disabled:h||D&&y,id:g,name:g,onChange:y?void 0:R,...x,"aria-describedby":(0,r.ariaDescribedByIds)(g),label:k,className:v.default.checkbox}))};t.CheckboxWidget=_},93306:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnyOfField=void 0;const n=e(85608),r=e(51632),o=n.__importDefault(e(14041)),l=e(97267),v=n.__importDefault(e(93089)),_=m=>{var p,s;const{disabled:h,formContext:a,idSchema:g,onBlur:d,id:u,onChange:E,onFocus:f,options:c,placeholder:y,readonly:b,registry:A,name:S,required:w,schema:I,uiOptions:D}=m,{readonlyAsDisabled:T=!0}=a,R=({target:L})=>E(L.value===""?c.emptyValue:L.value),M=({target:L})=>d(u,L.value),O=({target:L})=>f(u,L.value),x=(s=(p=c.description)!==null&&p!==void 0?p:I.description)!==null&&s!==void 0?s:I.markdownDescription,k=(0,r.getTemplate)("TitleFieldTemplate",A,D),F=(0,r.getTemplate)("DescriptionFieldTemplate",A,D);return o.default.createElement("div",{className:v.default.any_of_widget_control},S&&o.default.createElement("div",{className:v.default.object_title},o.default.createElement(k,{id:(0,r.titleId)(g),title:S,required:w,schema:I,registry:A})),x&&o.default.createElement("div",{className:v.default.object_description},o.default.createElement(F,{id:(0,r.descriptionId)(g),description:x,schema:I,registry:A})),o.default.createElement(l.Input,{disabled:h||T&&b,onBlur:b?void 0:M,onChange:b?void 0:R,onFocus:b?void 0:O,placeholder:y,autoComplete:"off"}))};t.AnyOfField=_},32475:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayField=void 0;const n=e(85608),r=e(67030),o=n.__importStar(e(14041)),l=e(43718),v=(0,r.getDefaultRegistry)().fields.ArrayField,_=m=>{const{onChange:p}=m,s=(0,o.useCallback)(h=>{Array.isArray(h)&&p(h.map(a=>(0,l.isUndefined)(a)?"":a))},[p]);return o.default.createElement(v,{...m,onChange:s})};t.ArrayField=_},59299:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectField=void 0;const n=e(85608),r=e(67030),o=n.__importStar(e(14041)),l=e(41869),v=e(43718),_=e(64582),m=(0,r.getDefaultRegistry)().fields.ObjectField,p=s=>{const h=(0,l.useInjectable)(_.ILaunchService),{idSchema:a,onChange:g}=s;return(0,o.useEffect)(()=>{const{$id:d}=a,u=new v.Disposable;return d==="root"&&u.addDispose(h.onChangeFormData(E=>g(E))),()=>u.dispose()},[a]),o.default.createElement(m,{...s})};t.ObjectField=p},66216:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleField=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(93089)),l=v=>{const{title:_}=v;return _?r.default.createElement("label",{title:_,className:o.default.field_label},_):null};t.TitleField=l},81638:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectWidget=void 0;const n=e(85608),r=e(51632),o=n.__importStar(e(14041)),l=e(97267),v=n.__importDefault(e(93089)),_=m=>{const{schema:p,value:s,id:h,registry:a,uiOptions:g,name:d,required:u,onChange:E}=m,f=p.description,c=(0,r.getTemplate)("TitleFieldTemplate",a,g),y=(0,r.getTemplate)("DescriptionFieldTemplate",a,g),b=(0,o.useMemo)(()=>p&&p.enum?p.enum:[],[p,p.enum]);return o.default.createElement("div",{className:v.default.select_widget_control},d&&o.default.createElement("div",{className:v.default.object_title},o.default.createElement(c,{id:(0,r.titleId)(h),title:d,required:u,schema:p,registry:a})),f&&o.default.createElement("div",{className:v.default.object_description},o.default.createElement(y,{id:(0,r.descriptionId)(h),description:f,schema:p,registry:a})),o.default.createElement(l.Select,{key:h,value:s,dropdownRenderType:"absolute",onChange:E},b.map(A=>o.default.createElement(l.Option,{value:A,label:A,key:A},A))))};t.SelectWidget=_},20023:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextWidget=void 0;const n=e(85608),r=e(51632),o=n.__importStar(e(14041)),l=e(97267),v=e(64582),_=e(5905),m=n.__importDefault(e(93089)),p=s=>{const{disabled:h,formContext:a,id:g,onBlur:d,onChange:u,onFocus:E,options:f,placeholder:c,readonly:y,schema:b,value:A,registry:S,label:w,hideLabel:I,required:D,uiSchema:T,uiOptions:R}=s,{readonlyAsDisabled:M=!0}=a,O=(0,r.getTemplate)("TitleFieldTemplate",S,R),x=(0,r.getTemplate)("DescriptionFieldTemplate",S,R),k=(0,o.useMemo)(()=>typeof A!="string"?A:(0,_.parseSnippet)(A),[A]),F=({target:W})=>{u(W.value===""?f.emptyValue:W.value),d(g,W.value)},L=({target:W})=>E(g,W.value),N=(0,o.useMemo)(()=>b.type!==v.JSON_SCHEMA_TYPE.STRING&&b.type!==v.JSON_SCHEMA_TYPE.NUMBER?v.JSON_SCHEMA_TYPE.STRING:b.type,[b,b.type]),U=(0,o.useMemo)(()=>b.description||"",[b,b.description]);return o.default.createElement("div",null,!I&&w&&o.default.createElement("div",{className:m.default.object_title},o.default.createElement(O,{id:(0,r.titleId)(g),title:w,required:D,schema:b,uiSchema:T,registry:S})),U&&o.default.createElement("div",{className:m.default.object_description},o.default.createElement(x,{id:(0,r.descriptionId)(g),description:U,schema:b,uiSchema:T,registry:S})),o.default.createElement(l.Input,{disabled:h||M&&y,id:g,name:g,onBlur:y?void 0:F,onFocus:y?void 0:L,placeholder:c,type:N,value:k,className:m.default.text_widget_control,autoComplete:"off"}))};t.TextWidget=p},23434:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchFolderPreferenceProvider=void 0;const n=e(85608),r=e(76003),o=e(91825);let l=class extends o.FolderFilePreferenceProvider{parse(_){const m=super.parse(_);if(m!==void 0)return{launch:{...m}}}getPath(_){if(_==="launch")return[];if(_.startsWith("launch."))return[_.substr(7)]}};t.LaunchFolderPreferenceProvider=l,t.LaunchFolderPreferenceProvider=l=n.__decorate([(0,r.Injectable)()],l)},52369:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchPreferencesContribution=t.LaunchResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(64102),v=e(39496),_=e(57517),m=e(4983),p=e(10938),s=e(67858);let h=class{constructor(){this.scheme=m.LAUNCH_VIEW_SCHEME}provideResource(d){return{supportsRevive:!0,name:(0,o.localize)("menu-bar.title.debug"),icon:(0,o.getIcon)("debug"),uri:d}}provideResourceSubname(){return null}async shouldCloseResource(){return!0}};t.LaunchResourceProvider=h,t.LaunchResourceProvider=h=n.__decorate([(0,r.Injectable)()],h);let a=class{constructor(){this.schema=p.launchPreferencesSchema,this.name="launch"}registerResource(d){d.registerResourceProvider(this.prefResourceProvider)}registerEditorComponent(d){d.registerEditorComponent({component:s.LaunchViewContainer,uid:m.LAUNCH_VIEW_COMPONENT_ID,scheme:m.LAUNCH_VIEW_SCHEME}),d.registerEditorComponentResolver(m.LAUNCH_VIEW_SCHEME,(u,E,f)=>{f([{type:_.EditorOpenType.component,componentId:m.LAUNCH_VIEW_COMPONENT_ID}])})}registerMenus(d){d.registerMenuItem(v.MenuId.EditorTitle,{command:o.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION.id,iconClass:(0,o.getIcon)("open"),group:"navigation",when:`resourceScheme == ${m.LAUNCH_VIEW_SCHEME}`})}};t.LaunchPreferencesContribution=a,n.__decorate([(0,r.Autowired)(h),n.__metadata("design:type",h)],a.prototype,"prefResourceProvider",void 0),t.LaunchPreferencesContribution=a=n.__decorate([(0,o.Domain)(o.PreferenceContribution,o.PreferenceConfiguration,_.BrowserEditorContribution,l.MenuContribution)],a)},10938:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.launchPreferencesSchema=void 0;const n=e(64582);t.launchPreferencesSchema={type:"object",scope:"resource",properties:{launch:{$ref:n.launchSchemaUri,description:"Global debug launch configuration. Should be used as an alternative to 'launch.json' that is shared across workspaces",defaultValue:{configurations:[],compounds:[]}}}}},44888:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchService=void 0;const n=e(85608),r=n.__importStar(e(23304)),o=n.__importDefault(e(41263)),l=e(76003),v=e(41869),_=e(43718),m=e(14951),p=e(64582),s="configurations";let h=class{constructor(){this._onRawSchemaProperties=new _.Emitter,this.onRawSchemaProperties=this._onRawSchemaProperties.event,this._onChangeSchema=new _.Emitter,this.onChangeSchema=this._onChangeSchema.event,this._onChangeFormData=new _.Emitter,this.onChangeFormData=this._onChangeFormData.event}get rawSchemaProperties(){return this._rawSchemaProperties}get schema(){return this._schema}get formData(){return this._formData}async openLaunchConfiguration(){await this.commandService.executeCommand(v.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION.id)}setRawSchemaProperties(g){this._rawSchemaProperties=g,this._onRawSchemaProperties.fire(g)}nextNewSchema(g){this._schema=g,this._onChangeSchema.fire(g)}nextNewFormData(g,d=!0){this._formData=g,d&&this._onChangeFormData.fire(g)}addNewItem(g){if(g==="")return;const{properties:d}=this.rawSchemaProperties,u={...this.formData},E=d[g],{default:f,type:c}=E;(0,o.default)(u,g,f||this.getDefaultValue(c)),(0,o.default)(this.schema.properties,g,E),this.nextNewSchema(this.schema),this.nextNewFormData(u)}delItem(g){if(g==="")return;const{properties:d}=this.schema,u={...this.formData};delete u[g],delete d[g],this.nextNewSchema(this.schema),this.nextNewFormData(u)}getDefaultValue(g){switch(g){case p.JSON_SCHEMA_TYPE.ARRAY:return[];case p.JSON_SCHEMA_TYPE.BOOLEAN:return!1;case p.JSON_SCHEMA_TYPE.NULL:return null;case p.JSON_SCHEMA_TYPE.NUMBER:return 0;case p.JSON_SCHEMA_TYPE.OBJECT:return{};case p.JSON_SCHEMA_TYPE.STRING:default:return""}}async readResourceContent(g){try{const{content:d}=await this.fileSystem.readFile(g.toString());return d.toString()}catch{return""}}async modifyConfigurationsInResource(g,d,u){const E=await this.fileSystem.getFileStat(g.toString());if(E&&E.type===_.FileType.File){const{formData:f}=d,c=await this.readResourceContent(g),b=r.parse(c)[s];if(!b)return;Array.isArray(b)&&b.length-1>=u&&b.splice(u,1,f);const A=r.modify(c,[s],b,{isArrayInsertion:!1,formattingOptions:{tabSize:2,insertSpaces:!0,eol:`
33898
+ `;I[I.length-1]||I.pop();const D=I.map(R=>this.linkify(R,!1,S));if(D.length===1)return D[0];const T=document.createElement("span");return D.forEach(R=>T.appendChild(R)),T}const w=document.createElement("span");for(const I of this.detectLinks(b))try{switch(I.kind){case"text":w.appendChild(document.createTextNode(I.value));break;case"web":w.appendChild(this.createWebLink(I.value));break;case"path":{const D=I.captures[0],T=I.captures[1]?Number(I.captures[1]):0,R=I.captures[2]?Number(I.captures[2]):0;w.appendChild(this.createPathLink(I.value,D,T,R,S));break}}}catch{w.appendChild(document.createTextNode(I.value))}return w}createWebLink(b){const A=this.createLink(b),S=l.URI.parse(b);return this.decorateLink(A,async()=>{if(S.scheme===o.Schemes.file){const w=S.toString(),I=o.OS.type()===l.OperatingSystem.Windows?l.path.win32:l.path.posix,D=l.path.normalize(I.sep===l.path.posix.sep&&l.isWindows?w.replace(/\\/g,l.path.posix.sep):w);await this.workbenchEditorService.open(l.URI.parse(D));return}this.openerService.open(b)}),A}createPathLink(b,A,S,w,I){if(A[0]==="/"&&A[1]==="/")return document.createTextNode(b);if(A[0]==="."){if(!I)return document.createTextNode(b);const R=I.toResource(A),M=this.createLink(b);return this.decorateLink(M,()=>{this.workbenchEditorService.open(l.URI.parse(R.toString()))}),M}const D=this.createLink(b);D.tabIndex=0;const T=l.URI.file(l.path.normalize(A));return this.fileServiceClient.getFileStat(T.toString()).then(R=>{!R||R&&R.isDirectory||this.decorateLink(D,()=>{this.workbenchEditorService.open(l.URI.parse(T.toString()),{range:{startColumn:w,startLineNumber:S,endLineNumber:S,endColumn:w}})})}),D}createLink(b){const A=document.createElement("a");return A.textContent=b,A}decorateLink(b,A){b.classList.add(m.default.link),b.title=(0,o.formatLocalize)("debug.console.followLink",l.isMacintosh?"Cmd":"Ctrl"),b.onmousemove=S=>{b.classList.toggle(m.default.pointer,l.isMacintosh?S.metaKey:S.ctrlKey)},b.onmouseleave=()=>b.classList.remove(m.default.pointer),b.onclick=S=>{const w=window.getSelection();!w||w.type==="Range"||(l.isMacintosh?S.metaKey:S.ctrlKey)&&(S.preventDefault(),S.stopImmediatePropagation(),A(!1))}}detectLinks(b){if(!b)return[];if(b.length>f)return[{kind:"text",value:b,captures:[]}];const A=[s,E],S=["web","path"],w=[],I=(D,T)=>{if(T>=A.length){w.push({value:D,kind:"text",captures:[]});return}const R=A[T];let M=0,O;for(R.lastIndex=0;(O=R.exec(D))!==null;){const k=D.substring(M,O.index);k&&I(k,T+1);const F=O[0];w.push({value:F,kind:S[T],captures:O.slice(1)}),M=O.index+F.length}const x=D.substring(M);x&&I(x,T+1)};return I(b,0),w}};t.LinkDetector=c,n.__decorate([(0,r.Autowired)(v.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorService)],c.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],c.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.IOpenerService),n.__metadata("design:type",Object)],c.prototype,"openerService",void 0),t.LinkDetector=c=n.__decorate([(0,r.Injectable)({multiple:!0})],c)},61752:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugMemoryFileSystemProvider=void 0;const n=e(85608),r=n.__importDefault(e(17228)),o=e(76003),l=e(43718),v=e(64582),_=e(38029),{Path:m}=l.path;let p=class{constructor(){this.memoryFdCounter=0,this.changeEmitter=new l.Emitter,this.fdMemory=new Map,this.capabilities=1028,this.onDidChangeCapabilities=l.Event.None,this.onDidChangeFile=this.changeEmitter.event,this.emptyBuffer=this.toBuffer("")}stat(a){return Promise.resolve({type:l.FileType.File,uri:a.toString(),mtime:0,ctime:0,size:0,lastModification:0,isDirectory:!1})}async readFile(a){const g=this.parseUri(a);if(!g)return this.emptyBuffer;if(!g.offset)return this.emptyBuffer;const{session:d,memoryReference:u,offset:E}=g,f=new Uint8Array(E.toOffset-E.fromOffset),c=this.memoryFdCounter++;let y=d.getMemory(u);return E&&(y=new s(y,E)),this.fdMemory.set(c,{session:d,region:y}),await this.read(c,E.fromOffset,f,0,f.length),f}async read(a,g,d,u,E){const f=this.fdMemory.get(a);if(!f)return;const c=await f.region.read(g,E);let y=0;for(const b of c)switch(b.type){case 1:return y;case 2:return y>0?y:this.logger.error(b.error);case 0:{const A=Math.max(0,g-b.offset),S=b.data.slice(A,Math.min(b.data.byteLength,A+(E-y)));d.set(S.buffer,u+y),y+=S.byteLength;break}default:this.logger.log(b)}return y}toBuffer(a){return l.BinaryBuffer.fromString(a).buffer}parseUri(a){if(a.scheme!==v.DEBUG_MEMORY_SCHEME)return;const g=this.debugSessionManager.sessions.find(f=>f.id.toLowerCase()===a.authority.toLowerCase());if(!g)return;let d;const u=/range=([0-9]+):([0-9]+)/.exec(a.query);u&&(d={fromOffset:Number(u[1]),toOffset:Number(u[2])});const[,E]=a.path.split(m.separator);return{session:g,offset:d,readOnly:!g.capabilities.supportsWriteMemoryRequest,sessionId:a.authority,memoryReference:decodeURIComponent(E)}}readDirectory(){throw new Error("Not allowed")}createDirectory(){throw new Error("Not allowed")}rename(){throw new Error("Not allowed")}delete(){throw new Error("Not allowed")}watch(){throw new Error("Not allowed")}writeFile(){throw new Error("Method not implemented.")}};t.DebugMemoryFileSystemProvider=p,n.__decorate([(0,o.Autowired)(v.IDebugSessionManager),n.__metadata("design:type",_.DebugSessionManager)],p.prototype,"debugSessionManager",void 0),n.__decorate([(0,o.Autowired)(l.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),t.DebugMemoryFileSystemProvider=p=n.__decorate([(0,o.Injectable)()],p);class s extends l.Disposable{constructor(a,g){super(),this.parent=a,this.range=g,this.invalidateEmitter=new l.Emitter,this.onDidInvalidate=this.invalidateEmitter.event,this.width=this.range.toOffset-this.range.fromOffset,this.writable=a.writable,this.registerDispose(a),this.registerDispose(a.onDidInvalidate(d=>{const u=(0,r.default)(d.fromOffset-g.fromOffset,0,this.width),E=(0,r.default)(d.toOffset-g.fromOffset,0,this.width);E>u&&this.invalidateEmitter.fire({fromOffset:u,toOffset:E})}))}read(a,g){if(a<0)throw new RangeError(`Invalid fromOffset: ${a}`);return this.parent.read(this.range.fromOffset+a,this.range.fromOffset+Math.min(g,this.width))}write(a,g){return this.parent.write(this.range.fromOffset+a,g)}}},31141:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugPreferences=t.IDebugConfiguration=t.debugPreferencesSchema=void 0,t.createDebugPreferences=o,t.injectDebugPreferences=l;const n=e(41869);t.debugPreferencesSchema={type:"object",properties:{"debug.trace":{type:"boolean",default:!1,description:(0,n.localize)("preference.debug.trace")},"debug.debugViewLocation":{enum:["default","left","right","bottom"],default:"default",description:(0,n.localize)("preference.debug.debugViewLocation")},"debug.openDebug":{enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart","openOnDebugBreak"],default:"openOnDebugBreak",description:(0,n.localize)("preference.debug.openDebug")},"debug.internalConsoleOptions":{enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart"],default:"openOnFirstSessionStart",description:(0,n.localize)("preference.debug.internalConsoleOptions")},"debug.allowBreakpointsEverywhere":{type:"boolean",description:(0,n.localize)("preference.debug.allowBreakpointsEverywhere"),default:!1}}};class r{}t.IDebugConfiguration=r,t.DebugPreferences=Symbol("DebugPreferences");function o(v){return(0,n.createPreferenceProxy)(v,t.debugPreferencesSchema)}function l(v){v.addProviders({token:t.DebugPreferences,useFactory:_=>{const m=_.get(n.PreferenceService);return o(m)}}),v.addProviders({token:n.PreferenceContribution,useValue:{schema:t.debugPreferencesSchema}})}},40453:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugProgressService=void 0;const r=e(85608),o=e(76003),l=e(41869),v=e(68969),_=e(43718),m=e(26296);let p=n=class{constructor(){this.toDispose=[]}async onDebugServiceStateChange(h){this.progressResolve&&(this.progressResolve(),this.progressResolve=void 0),h===m.DebugState.Initializing&&this.progressService.getIndicator(n.DEBUG_PANEL_PROGRESS_ID)&&this.progressService.withProgress({location:n.DEBUG_PANEL_PROGRESS_ID},a=>new Promise(g=>this.progressResolve=g))}run(h){let a;const g=d=>{a=new _.DisposableCollection,d&&(a?.push(d.onDidChangeState(u=>this.onDebugServiceStateChange(u))),a?.push(d.onDidProgressStart(async u=>{const E=new Promise(f=>{const c=l.Event.any(l.Event.filter(d.onDidProgressEnd,y=>y.body.progressId===u.body.progressId),d.onDidExitAdapter)(()=>{c.dispose(),f()})});this.progressService.getIndicator(n.DEBUG_PANEL_PROGRESS_ID)&&this.progressService.withProgress({location:n.DEBUG_PANEL_PROGRESS_ID},()=>E),this.progressService.withProgress({location:_.ProgressLocation.Notification,title:u.body.title,cancellable:u.body.cancellable,silent:!0,delay:500},f=>{let c=0;const y=A=>{let S;typeof A.percentage=="number"&&(S=A.percentage-c,c+=S),f.report({message:A.message,increment:S,total:typeof S=="number"?100:void 0})};u.body.message&&y(u.body);const b=d.onDidProgressUpdate(A=>{A.body.progressId===u.body.progressId&&y(A.body)});return E.then(()=>b.dispose())},()=>d.cancel(u.body.progressId))})))};this.toDispose.push(h.onDidChangeActiveDebugSession(({current:d})=>{a&&a.dispose(),g(d)})),g(h.currentSession)}};t.DebugProgressService=p,p.DEBUG_PANEL_PROGRESS_ID="debug",r.__decorate([(0,o.Autowired)(v.IProgressService),r.__metadata("design:type",Object)],p.prototype,"progressService",void 0),t.DebugProgressService=p=n=r.__decorate([(0,o.Injectable)()],p)},69946:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.launchSchema=t.DebugSchemaManager=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(64582),v=e(70159),_=e(37499),{deepClone:m}=o.objects;let p=class{async update(){const h=this.config.getDebuggers(),a={...m(t.launchSchema)},g=a.properties.configurations.items,d=h.map(u=>({attributes:Object.keys(u.configurationAttributes||{}).map(E=>u.configurationAttributes[E]),configurationSnippets:u.configurationSnippets}));for(const{attributes:u,configurationSnippets:E}of d)u&&g.oneOf&&g.oneOf.push(...u),E&&g.defaultSnippets&&g.defaultSnippets.push(...E);this.schemaRegistry.registerSchema(l.launchExtensionSchemaUri,a,["launch.json"])}};t.DebugSchemaManager=p,n.__decorate([(0,r.Autowired)(v.IDebugServer),n.__metadata("design:type",Object)],p.prototype,"debug",void 0),n.__decorate([(0,r.Autowired)(o.IJSONSchemaRegistry),n.__metadata("design:type",Object)],p.prototype,"schemaRegistry",void 0),n.__decorate([(0,r.Autowired)(_.DebugConfigurationManager),n.__metadata("design:type",_.DebugConfigurationManager)],p.prototype,"config",void 0),t.DebugSchemaManager=p=n.__decorate([(0,r.Injectable)()],p),t.launchSchema={$id:l.launchSchemaUri,type:"object",title:"Launch",required:[],default:{version:"0.2.0",configurations:[]},properties:{version:{type:"string",description:"Version of this file format.",default:"0.2.0"},configurations:{type:"array",description:"List of configurations. Add new configurations or edit existing ones by using IntelliSense.",items:{defaultSnippets:[],type:"object",oneOf:[]}}}}},90408:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugService=void 0;const n=e(85608),r=e(76003),o=e(41869);let l=class{constructor(){this.onDidDebugContributionPointChangeEmitter=new o.Emitter,this.debugContributionPointsMap=new Map}registerDebugContributionPoints(_,m){this.debugContributionPointsMap.has(_)||(this.debugContributionPointsMap.set(_,m),this.onDidDebugContributionPointChangeEmitter.fire({path:_,contributions:m}))}unregisterDebugContributionPoints(_){const m=this.debugContributionPointsMap.get(_);m&&(this.debugContributionPointsMap.delete(_),this.onDidDebugContributionPointChangeEmitter.fire({path:_,contributions:m,removed:!0}))}get debugContributionPoints(){return this.debugContributionPointsMap}get onDidDebugContributionPointChange(){return this.onDidDebugContributionPointChangeEmitter.event}};t.DebugService=l,t.DebugService=l=n.__decorate([(0,r.Injectable)()],l)},3520:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSessionConnection=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(64582),v=e(38029),_=new Set(["breakpoint","capabilities","continued","exited","initialized","loadedSource","module","output","process","stopped","terminated","thread","progressStart","progressUpdate","progressEnd","invalidated"]);let m=class{constructor(s,h,a){this.sessionId=s,this.connectionFactory=h,this.traceOutputChannel=a,this.pendingRequests=new Map,this.requestHandlers=new Map,this.onDidCustomEventEmitter=new o.Emitter,this.onDidCustomEvent=this.onDidCustomEventEmitter.event,this.toDispose=new o.DisposableCollection(this.onDidCustomEventEmitter,o.Disposable.create(()=>this.pendingRequests.clear()),o.Disposable.create(()=>this.emitters.clear())),this.allThreadsContinued=!0,this.emitters=new Map,this.connection=this.createConnection()}get disposed(){return this.toDispose.disposed}dispose(){this.toDispose.dispose()}async createConnection(){if(this.disposed)throw new Error("Connection has been already disposed.");{const s=await this.connectionFactory(this.sessionId);return s.onceClose((h,a)=>{this.fire("exited",{code:h,reason:a})}),s.onMessage(h=>this.handleMessage(h)),this.toDispose.push(o.Disposable.create(()=>{s.dispose()})),s}}async sendRequest(s,h,a,g){var d;s==="initialize"&&(this.sessionAdapterID=h.adapterID);const u=this.manager.reportTime(l.DEBUG_REPORT_NAME.DEBUG_ADAPTER_PROTOCOL_TIME,{sessionId:this.sessionId,threadId:h&&h.threadId||((d=this.manager.currentThread)===null||d===void 0?void 0:d.raw.id)}),E=await this.doSendRequest(s,h,g),f={adapterID:this.sessionAdapterID,request:a.request};if(s==="threads"&&(f.amount=E.body.threads.length),u(s,f),(s==="next"||s==="stepIn"||s==="stepOut"||s==="stepBack"||s==="reverseContinue"||s==="restartFrame")&&this.fireContinuedEvent(h.threadId),s==="continue"){const c=E;return(c&&c.body&&c.body.allThreadsContinued)!==void 0&&(this.allThreadsContinued=E.body.allThreadsContinued),this.fireContinuedEvent(h.threadId,this.allThreadsContinued),E}return E}async sendCustomRequest(s,h){var a;return(a=await this.doSendRequest(s,h))===null||a===void 0?void 0:a.body}async doSendRequest(s,h=null,a){const g=new o.Deferred,d={seq:(0,l.getSequenceId)(),type:"request",command:s};let u;return h&&(d.arguments=h),this.pendingRequests.set(d.seq,E=>{u&&u.dispose(),E.success?g.resolve(E):g.reject(E)}),a&&(u=a.onCancellationRequested(async()=>{u.dispose();const E=this.manager.getSession(this.sessionId);E&&E.capabilities.supportsCancelRequest&&E.sendRequest("cancel",{requestId:d.seq})})),await this.send(d),g.promise}async send(s){const h=await this.connection,a=JSON.stringify(s);this.traceOutputChannel&&this.traceOutputChannel.appendLine(`${this.sessionId.substring(0,8)} [UI -> adapter]: ${a}`),h.send(a)}handleMessage(s){this.traceOutputChannel&&this.traceOutputChannel.appendLine(`${this.sessionId.substring(0,8)} [adapter -> UI ]: ${s}`);const h=JSON.parse(s);h.type==="request"?this.handleRequest(h):h.type==="response"?this.handleResponse(h):h.type==="event"&&this.handleEvent(h)}handleResponse(s){const h=this.pendingRequests.get(s.request_seq);h&&(this.pendingRequests.delete(s.request_seq),h(s))}onRequest(s,h){this.requestHandlers.set(s,h)}async handleRequest(s){const h={type:"response",seq:(0,l.getSequenceId)(),command:s.command,request_seq:s.seq,success:!0},a=this.requestHandlers.get(s.command);if(a)try{h.body=await a(s)}catch(g){h.success=!1,h.message=g.message}else(0,o.getDebugLogger)().error("Unhandled request",s);await this.send(h)}handleEvent(s){"event"in s?(s.event==="continued"&&(this.allThreadsContinued=s.body.allThreadsContinued!==!1),_.has(s.event)?this.doFire(s.event,s):this.onDidCustomEventEmitter.fire(s)):this.fire("exited",s)}on(s,h){return this.disposed?o.Disposable.create(()=>{}):this.getEmitter(s).event(h)}fire(s,h){this.doFire(s,h)}doFire(s,h){this.disposed||this.getEmitter(s).fire(h)}getEmitter(s){const h=this.emitters.get(s)||this.newEmitter();return this.emitters.set(s,h),h}newEmitter(){const s=new o.Emitter;return this.toDispose.push(s),s}fireContinuedEvent(s,h=!1){this.fire("continued",{type:"event",event:"continued",body:{threadId:s,allThreadsContinued:h},seq:(0,l.getSequenceId)()})}};t.DebugSessionConnection=m,n.__decorate([(0,r.Autowired)(l.IDebugSessionManager),n.__metadata("design:type",v.DebugSessionManager)],m.prototype,"manager",void 0),t.DebugSessionConnection=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__param(1,(0,r.Optional)()),n.__param(2,(0,r.Optional)()),n.__metadata("design:paramtypes",[String,Function,Object])],m)},97186:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSessionFactory=t.DebugSessionContributionRegistryImpl=t.DebugSessionContributionRegistry=t.DebugSessionContribution=void 0;const n=e(85608),r=e(76003),o=e(41869);t.DebugSessionContribution=Symbol("DebugSessionContribution"),t.DebugSessionContributionRegistry=Symbol("DebugSessionContributionRegistry");let l=class{constructor(){this.contribs=new Map,this.init()}init(){for(const _ of this.contributions.getContributions())this.contribs.set(_.debugType,_)}get(_){return this.contribs.get(_)}};t.DebugSessionContributionRegistryImpl=l,n.__decorate([(0,r.Autowired)(t.DebugSessionContribution),n.__metadata("design:type",Object)],l.prototype,"contributions",void 0),t.DebugSessionContributionRegistryImpl=l=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],l),t.DebugSessionFactory=Symbol("DebugSessionFactory")},38029:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSessionManager=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),v=e(54414),_=e(72665),m=e(93950),p=e(80907),s=e(64582),h=e(79845),a=e(80712),g=e(17280),d=e(97186),u=e(5905);let E=class{fireDidChange(c){this.inDebugModeKey.set(this.inDebugMode),this.onDidChangeEmitter.fire(c)}constructor(){this._uid=(0,o.uuid)(),this._sessions=new Map,this._extraMap=new Map,this._actionIndex=0,this.onWillStartDebugSessionEmitter=new o.Emitter,this.onWillStartDebugSession=this.onWillStartDebugSessionEmitter.event,this.onWillResolveDebugConfigurationEmitter=new o.Emitter,this.onWillResolveDebugConfiguration=this.onWillResolveDebugConfigurationEmitter.event,this.onDidCreateDebugSessionEmitter=new o.Emitter,this.onDidCreateDebugSession=this.onDidCreateDebugSessionEmitter.event,this.onDidStartDebugSessionEmitter=new o.Emitter,this.onDidStartDebugSession=this.onDidStartDebugSessionEmitter.event,this.onDidStopDebugSessionEmitter=new o.Emitter,this.onDidStopDebugSession=this.onDidStopDebugSessionEmitter.event,this.onDidChangeActiveDebugSessionEmitter=new o.Emitter,this.onDidChangeActiveDebugSession=this.onDidChangeActiveDebugSessionEmitter.event,this.onDidDestroyDebugSessionEmitter=new o.Emitter,this.onDidDestroyDebugSession=this.onDidDestroyDebugSessionEmitter.event,this.onDidReceiveDebugSessionCustomEventEmitter=new o.Emitter,this.onDidReceiveDebugSessionCustomEvent=this.onDidReceiveDebugSessionCustomEventEmitter.event,this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.configurationIds=new Map,this.toDisposeOnCurrentSession=new o.DisposableCollection,this.init()}init(){this.debugTypeKey=this.contextKeyService.createKey(s.CONTEXT_DEBUG_TYPE_KEY,void 0),this.inDebugModeKey=this.contextKeyService.createKey(s.CONTEXT_IN_DEBUG_MODE_KEY,this.inDebugMode),this.debugStopped=this.contextKeyService.createKey(s.CONTEXT_DEBUG_STOPPED_KEY,!1),this.modelManager.onModelChanged(c=>{const{newModelUrl:y}=c;if(y){const b=o.URI.parse(y.toString()),A=this.modelManager.model;if(this.currentSession&&this.currentThread&&A){const S=this.currentThread.frames.find(w=>{var I;return((I=w.source)===null||I===void 0?void 0:I.uri.toString())===b.toString()});S&&S!==this.currentFrame&&(this.currentThread.currentFrame=S,setTimeout(()=>{this.workbenchEditorService.currentEditor&&this.workbenchEditorService.currentEditor.monacoEditor.revealLineInCenter(S.raw.line)},0))}}})}_getExtra(c,y){if(c==null)return;const b=this._extraMap.get(c);if(b)return{traceId:b.traceId,remote:b.remote,adapterID:b.adapterID,request:b.request,...y&&b.threads.get(`${y}`)}}getExtra(c,y){return this._getExtra(c,y)}_setExtra(c,y,b){const A=this._extraMap.get(c);A&&(b?A.threads.set(y,b):A.threads.delete(y))}setExtra(c,y,b){return this._setExtra(c,y,b)}report(c,y,b){return b={traceId:this._uid,...this._getExtra(b?.sessionId,b?.threadId),...b},this.reporterService.point(c,y,b)}reportTime(c,y){const b=this.reporterService.time(c);return(A,S)=>(S={...y,...S},S={traceId:this._uid,...this._getExtra(S?.sessionId,S?.threadId),...S},b.timeEnd(A,S))}reportAction(c,y,b){var A,S,w;let I=this._getExtra(c,y);I&&(y&&!I.threadId&&(I={...I}),this._actionIndex+=1,I.action=`${b}-${this._actionIndex}`,I.filePath=(S=(A=this.currentFrame)===null||A===void 0?void 0:A.raw.source)===null||S===void 0?void 0:S.path,I.fileLineNumber=(w=this.currentFrame)===null||w===void 0?void 0:w.raw.line,this._setExtra(c,`${y??""}`,I))}async start(c){const{configuration:y}=c,b={adapterID:y.type,request:y.request==="launch"?"launch":"attach",traceId:this._uid,remote:0,threads:new Map};if((0,u.isRemoteAttach)(y)&&(b.remote=1),this.report(s.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,"number",{count:this.breakpoints.getBreakpoints().length,...b}),!c.configuration.__restart&&this.isExistedDebugSession(c)){this.messageService.error((0,o.formatLocalize)("debug.launch.existed",c.configuration.name));return}try{const A=this.reportTime(s.DEBUG_REPORT_NAME.DEBUG_SESSION_START_TIME,b);await this.fireWillStartDebugSession();const S=await this.resolveConfiguration(c);if(S){if(S.configuration.preLaunchTask){this.debugProgressService.onDebugServiceStateChange(s.DebugState.Initializing);const I=o.Uri.parse(S.workspaceFolderUri),D=await this.taskService.getTask(I,S.configuration.preLaunchTask);if(D){const T=this.reportTime(s.DEBUG_REPORT_NAME.DEBUG_PRE_LAUNCH_TASK_TIME,b),R=await this.taskService.run(D);R.exitCode!==0&&this.messageService.error(`The preLaunchTask ${S.configuration.preLaunchTask} exitCode is ${R.exitCode}`),T(I.toString(),{exitCode:R.exitCode})}this.debugProgressService.onDebugServiceStateChange(s.DebugState.Running)}}else{c.configuration.type?this.messageService.error((0,o.formatLocalize)("debug.notSupported.type",c.configuration.type)):this.messageService.error((0,o.localize)("debug.notSupported.any"));return}const w=await this.debug.createDebugSession(S);if(A(S.configuration.type,{adapterID:S.configuration.type,request:S.configuration.request,sessionId:w}),!w){this.messageService.error((0,o.formatLocalize)("debug.launch.typeNotSupported",S.configuration.type));return}return this.doStart(w,S,b)}catch(A){throw this.messageService.error((0,o.localize)("debug.launch.catchError")),A}}async fireWillStartDebugSession(){await o.WaitUntilEvent.fire(this.onWillStartDebugSessionEmitter,{})}async resolveConfiguration(c){if(s.IDebugSessionDTO.is(c))return c;const{workspaceFolderUri:y,index:b,noDebug:A,parentSession:S,repl:w,compact:I,lifecycleManagedByParent:D}=c,T=await this.resolveDebugConfiguration(c.configuration,y);T&&!("cwd"in T)&&(T.cwd="${workspaceFolder}");let R=await this.variableResolver.resolve(T,{});if(!R){R===null&&this.commandService.executeCommand(o.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION.id);return}if(R=await this.resolveDebugConfigurationWithSubstitutedVariables(R,y),!R){R===null&&this.commandService.executeCommand(o.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION.id);return}const M=R.name+y,O=this.configurationIds.has(M)?this.configurationIds.get(M)+1:0;return this.configurationIds.set(M,O),{id:O,configuration:R,workspaceFolderUri:y,index:b,noDebug:A,parentSession:S,repl:w,compact:I,lifecycleManagedByParent:D}}async resolveDebugConfiguration(c,y){return await this.fireWillResolveDebugConfiguration(c.type),this.debug.resolveDebugConfiguration(c,y)}async resolveDebugConfigurationWithSubstitutedVariables(c,y){return this.debug.resolveDebugConfigurationWithSubstitutedVariables(c,y)}async fireWillResolveDebugConfiguration(c){await o.WaitUntilEvent.fire(this.onWillResolveDebugConfigurationEmitter,{debugType:c})}async doStart(c,y,b){const A=this.sessionContributionRegistry.get(y.configuration.type);if(!A)return;const w=A.debugSessionFactory().get(c,y);this._sessions.set(c,w),this._extraMap.set(c,b),y.lifecycleManagedByParent||this.updateCurrentSession(w),this.debugTypeKey.set(w.configuration.type),this.onDidCreateDebugSessionEmitter.fire(w);let I=s.DebugState.Inactive;return w.onDidChange(()=>{var D,T;I!==w.state&&(I=w.state,I===s.DebugState.Stopped?(this.onDidStopDebugSessionEmitter.fire(w),this.debugStopped.set(!0)):this.debugStopped.set(!1)),this.debugContextKey.contextSetVariableSupported.set((D=w.capabilities.supportsSetVariable)!==null&&D!==void 0?D:!1),this.debugContextKey.contextRestartFrameSupported.set((T=w.capabilities.supportsRestartFrame)!==null&&T!==void 0?T:!1),this.debugContextKey.contextDebugState.set(s.DebugState[w.state]),this.debugContextKey.contextInDebugMode.set(I!==s.DebugState.Inactive)}),w.on("terminated",D=>{const T=D.body&&D.body.restart;T?this.doRestart(w,T):this.destroy(w.id)}),w.on("exited",()=>this.destroy(w.id)),w.start().then(()=>this.onDidStartDebugSessionEmitter.fire(w)).catch(()=>{this.destroy(w.id)}),w.onDidCustomEvent(({event:D,body:T})=>this.onDidReceiveDebugSessionCustomEventEmitter.fire({event:D,body:T,session:w})),w}isExistedDebugSession(c){const{name:y}=c.configuration;for(const[,b]of this._sessions)if(b.configuration.name===y&&!b.terminated)return!0;return!1}async restart(c=this.currentSession){return c&&this.doRestart(c)}async doRestart(c,y){const{options:b,configuration:A}=c;return await c.restart({arguments:A})?c:(await c.terminate(!0),A.__restart=y,this.start(b))}updateCurrentSession(c){this.currentSession=c||this.sessions[this.sessions.length-1]}get inDebugMode(){return this.state>s.DebugState.Inactive}get currentThread(){const c=this.currentSession;return c&&c.currentThread}get state(){const c=this.currentSession;return c?c.state:s.DebugState.Inactive}get currentFrame(){const{currentThread:c}=this;return c&&c.currentFrame}get topFrame(){const{currentThread:c}=this;return c&&c.topFrame}getSession(c){if(c)return this._sessions.get(c)}get sessions(){return Array.from(this._sessions.values()).filter(c=>c.state>s.DebugState.Inactive)}get currentSession(){return this._currentSession}set currentSession(c){if(this._currentSession===c)return;this.toDisposeOnCurrentSession.dispose();const y=this._currentSession;this._currentSession=c,this.onDidChangeActiveDebugSessionEmitter.fire({previous:y,current:c}),c&&(this.toDisposeOnCurrentSession.push(c.onDidChange(()=>{this.currentFrame===this.topFrame&&this.open(),this.fireDidChange(c)})),this.toDisposeOnCurrentSession.push(c.onCurrentThreadChange(()=>{this.fireDidChange(c)}))),this.open(),this.fireDidChange(c)}open(){const{currentFrame:c}=this;c&&c.open()}async stopSession(c,y=!1){return c?y?c.disconnect():c.terminate():Promise.all(this.sessions.map(b=>y?b.disconnect():b.terminate()))}destroy(c){if(c){const y=this._sessions.get(c);y&&this.doDestroy(y)}else this._sessions.forEach(y=>this.doDestroy(y))}doDestroy(c){this.debug.terminateDebugSession(c.id),this.remove(c.id),c.dispose(),this.onDidDestroyDebugSessionEmitter.fire(c)}remove(c){this._sessions.delete(c);const{currentSession:y}=this;y&&y.id===c&&this.updateCurrentSession(void 0),setTimeout(()=>{this._extraMap.delete(c)})}};t.DebugSessionManager=E,n.__decorate([(0,r.Autowired)(l.LabelService),n.__metadata("design:type",l.LabelService)],E.prototype,"labelProvider",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(d.DebugSessionContributionRegistry),n.__metadata("design:type",Object)],E.prototype,"sessionContributionRegistry",void 0),n.__decorate([(0,r.Autowired)(s.IDebugServer),n.__metadata("design:type",Object)],E.prototype,"debug",void 0),n.__decorate([(0,r.Autowired)(v.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorService)],E.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(_.IMessageService),n.__metadata("design:type",Object)],E.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(p.IVariableResolverService),n.__metadata("design:type",Object)],E.prototype,"variableResolver",void 0),n.__decorate([(0,r.Autowired)(a.BreakpointManager),n.__metadata("design:type",a.BreakpointManager)],E.prototype,"breakpoints",void 0),n.__decorate([(0,r.Autowired)(s.IDebugModelManager),n.__metadata("design:type",Object)],E.prototype,"modelManager",void 0),n.__decorate([(0,r.Autowired)(m.ITaskService),n.__metadata("design:type",Object)],E.prototype,"taskService",void 0),n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],E.prototype,"reporterService",void 0),n.__decorate([(0,r.Autowired)(h.IDebugProgress),n.__metadata("design:type",Object)],E.prototype,"debugProgressService",void 0),n.__decorate([(0,r.Autowired)(g.DebugContextKey),n.__metadata("design:type",g.DebugContextKey)],E.prototype,"debugContextKey",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],E.prototype,"commandService",void 0),t.DebugSessionManager=E=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],E)},29539:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSession=void 0;const r=e(85608).__importDefault(e(12784)),o=e(41869),l=e(43718),v=e(64582),_=e(32385),m=e(99797),p=e(88776),s=e(7885);class h{fireDidChange(){this.onDidChangeEmitter.fire(void 0),this.onStateChange()}get capabilities(){return this._capabilities}get supportsThreadIdCorrespond(){return!!this.capabilities.supportsThreadIdCorrespond}constructor(g,d,u,E,f,c,y,b,A,S,w){this.id=g,this.options=d,this.connection=u,this.terminalService=E,this.workbenchEditorService=f,this.breakpointManager=c,this.modelManager=y,this.labelProvider=b,this.messages=A,this.fileSystem=S,this.sessionManager=w,this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this._onDidChangeCallStack=new o.Emitter,this.onDidChangeCallStack=this._onDidChangeCallStack.event,this._onVariableChange=new o.Emitter,this.onVariableChange=this._onVariableChange.event,this._onCurrentThreadChange=new o.Emitter,this.onCurrentThreadChange=this._onCurrentThreadChange.event,this._onDidStop=new o.Emitter,this.onDidStop=this._onDidStop.event,this._onDidContinued=new o.Emitter,this.onDidContinued=this._onDidContinued.event,this._onDidThread=new o.Emitter,this.onDidThread=this._onDidThread.event,this._onRequest=new o.Emitter,this.onRequest=this._onRequest.event,this._onDidExitAdapter=new o.Emitter,this.onDidExitAdapter=this._onDidExitAdapter.event,this._onDidProgressStart=new o.Emitter,this.onDidProgressStart=this._onDidProgressStart.event,this._onDidProgressUpdate=new o.Emitter,this.onDidProgressUpdate=this._onDidProgressUpdate.event,this._onDidProgressEnd=new o.Emitter,this.onDidProgressEnd=this._onDidProgressEnd.event,this._onDidInvalidated=new o.Emitter,this.onDidInvalidated=this._onDidInvalidated.event,this._onDidChangeState=new o.Emitter,this.onDidChangeState=this._onDidChangeState.event,this._onDidInvalidMemory=new o.Emitter,this.onDidInvalidateMemory=this._onDidInvalidMemory.event,this.toDispose=new o.DisposableCollection,this._capabilities={},this.updateDeffered=null,this.exitDeferred=new o.Deferred,this.cancellationMap=new Map,this.toDisposeOnCurrentThread=new o.DisposableCollection,this.initialized=!1,this.id2Breakpoint=new Map,this.settingBreakpoints=null,this._multipleThreadPaused=new Map,this.sources=new Map,this._threads=new Map,this.scheduleUpdateThreads=(0,r.default)(()=>this.updateThreads(void 0),100),this.pendingThreads=Promise.resolve(),this.terminated=!1,this.connection.onRequest("runInTerminal",async I=>await this.runInTerminal(I)),this.toDispose.pushAll([this.onDidChangeEmitter,this.connection,this.on("initialized",()=>{this.configure()}),this.on("breakpoint",({body:I})=>this.onUpdateBreakpoint(I)),this.on("continued",async I=>{const{body:{allThreadsContinued:D,threadId:T}}=I;if(this.handleCancellation(T),this.supportsThreadIdCorrespond){T?this._multipleThreadPaused.delete(T):D!==!1&&this._multipleThreadPaused.clear(),await this.updateCurrentThread(),this._onDidContinued.fire(I);return}if(D!==!1){this.clearThreads(),this._onDidContinued.fire(I);return}(0,l.isDefined)(T)&&this.clearThread(T),this.onStateChange(),this._onDidContinued.fire(I)}),this.on("stopped",async I=>{const{body:D}=I;this.stoppedDetails=D;const{threadId:T}=D,R=this.sessionManager.reportTime(v.DEBUG_REPORT_NAME.DEBUG_STOPPED,{sessionId:this.id,threadId:T});if(this.supportsThreadIdCorrespond===!0){if(await this.collectPausedThread(D),D.threadId&&this._multipleThreadPaused.has(D.threadId)){const O=this._multipleThreadPaused.get(D.threadId);await this.updateCurrentThread(O),await this.updateCurrentThreadFramesOnFocus()}}else this.updateDeffered=new o.Deferred,await this.updateThreads(D),await this.updateCurrentThreadFramesOnFocus(),this.updateDeffered.resolve();R("stopped");const M=this.sessionManager.getExtra(this.id,T);T&&M&&M.action&&(M.action=void 0,this.sessionManager.setExtra(this.id,`${T??""}`,M)),this.onStateChange(),this.sessionManager.currentSession=this,this._onDidStop.fire(I)}),this.on("thread",I=>{const{body:{reason:D,threadId:T}}=I;if(this.supportsThreadIdCorrespond){this.state===v.DebugState.Stopped&&this._onDidThread.fire(I);return}D==="started"?this.scheduleUpdateThreads():D==="exited"&&this.clearThread(T),this._onDidThread.fire(I)}),this.on("terminated",()=>{this.terminated=!0}),this.on("exited",I=>{this.exitDeferred.resolve(I)}),this.on("progressStart",I=>{this._onDidProgressStart.fire(I)}),this.on("progressUpdate",I=>{this._onDidProgressUpdate.fire(I)}),this.on("progressEnd",I=>{this._onDidProgressEnd.fire(I)}),this.on("memory",I=>{this._onDidInvalidMemory.fire(I)}),this.on("invalidated",async I=>{this._onDidInvalidated.fire(I),I.body.areas&&I.body.areas.length===1&&(I.body.areas[0]==="variables"||I.body.areas[0]==="watch")||(this.cancelAllRequests(),this.clearThreads(),await this.updateThreads(this.stoppedDetails)),this.fireDidChange()}),this.on("capabilities",I=>this.updateCapabilities(I.body.capabilities)),this.breakpointManager.onDidChangeBreakpoints(I=>this.runtimeUpdateBreakpoint(I)),this.breakpointManager.onDidChangeExceptionsBreakpoints(I=>{this.breakpointManager.breakpointsEnabled&&this.setExceptionBreakpoints(I)}),l.Disposable.create(()=>{this.breakpointManager.clearAllStatus(this.id)})])}getMemory(g){return new _.MemoryRegion(g,this)}get configuration(){return this.options.configuration}get parentSession(){return this.options.parentSession}get lifecycleManagedByParent(){return this.options.lifecycleManagedByParent}get compact(){return!!this.options.compact}async start(){await this.workbenchEditorService.saveAll(),await this.initialize(),await this.launchOrAttach()}async runInTerminal({arguments:{title:g,cwd:d,args:u,env:E}}){return this.doRunInTerminal({name:g,cwd:d,env:E,args:u})}async getValidTerminalProcessId(g,d=!1){try{const u=await this.terminalService.getProcessId(g);if(u&&u>0)return u;d&&this.terminalService.removeTerm(g);return}catch{d&&this.terminalService.removeTerm(g);return}}async doRunInTerminal(g){var d;let u=this.terminalService.terminals.find(y=>y.name===g.name&&y.isActive),E;const f=await this.terminalService.getDefaultShellPath(),c=(0,v.prepareCommand)(f,g.args,!1,(d=g.cwd)===null||d===void 0?void 0:d.toString(),g.env);if(u&&(E=await this.getValidTerminalProcessId(u.id,!0),E||(u=void 0)),u)c&&this.terminalService.sendText(u.id,c);else{let y;try{const b=await this.terminalService.createTerminal(g);y=b.id,b.show(),c&&this.terminalService.sendText(b.id,c),E=await this.getValidTerminalProcessId(b.id,!0)}catch(b){throw y&&await this.getValidTerminalProcessId(y,!0),b}}return{processId:E}}async initialize(){const g=await this.connection.sendRequest("initialize",{clientID:"OpenSumi",clientName:"OpenSumi IDE",adapterID:this.configuration.type,locale:(0,l.getLanguageId)(),linesStartAt1:!0,columnsStartAt1:!0,pathFormat:"path",supportsVariableType:!1,supportsVariablePaging:!1,supportsRunInTerminalRequest:!0,supportsProgressReporting:!0,supportsInvalidatedEvent:!0,supportsMemoryEvent:!0,supportsMemoryReferences:!0},this.configuration);this.updateCapabilities(g.body||{}),this.onStateChange()}async launchOrAttach(){var g;if(this.parentSession&&this.parentSession.state===v.DebugState.Inactive)throw(0,o.canceled)();try{this.configuration.request==="attach"?await this.sendRequest("attach",this.configuration):await this.sendRequest("launch",this.configuration)}catch(d){throw this.fireExited(d),this.messages.error(d.message||((g=d.body)===null||g===void 0?void 0:g.error.format)||(0,o.localize)("debug.console.errorMessage")),d&&d.message}}async configure(){await this.initBreakpoints(),this.breakpointManager.setExceptionBreakpoints(this.capabilities.exceptionBreakpointFilters||[]),this.initialized=!0,this.capabilities.supportsConfigurationDoneRequest&&this.sendRequest("configurationDone",{}),this.supportsThreadIdCorrespond||await this.updateThreads(void 0)}async setExceptionBreakpoints(g){return this.sendRequest("setExceptionBreakpoints",g)}onStateChange(){const g=this.state;this.previousState!==g&&(this.previousState=g,this._onDidChangeState.fire(g))}async onUpdateBreakpoint(g){let d;this.settingBreakpoints&&await this.settingBreakpoints.promise;try{const u=g.breakpoint;switch(g.reason){case"new":if(u.source&&typeof u.line=="number"&&u.id&&!this.id2Breakpoint.has(u.id)){const E=p.DebugSource.toUri(u.source),f=m.DebugBreakpoint.create(E,{line:u.line,column:u.column});f.status.set(this.id,u),this.addBreakpoint(f)}break;case"removed":u.id&&(d=this.id2Breakpoint.get(u.id),d&&this.delBreakpoint(d));break;case"changed":u.id&&(d=this.id2Breakpoint.get(u.id),d&&(d.status.set(this.id,u),this.breakpointManager.updateBreakpoint(d,!0)));break;default:break}}finally{}}async setBreakpoints(g){const d=[];for(const u of g){const E=await this.toSource(u),f=this.breakpointManager.getBreakpoints(u).filter(c=>this.breakpointManager.breakpointsEnabled&&c.enabled);d.push(this.sendRequest("setBreakpoints",{source:E.raw,sourceModified:!1,lines:f.map(c=>c.raw.line),breakpoints:f.map(c=>c.raw)}).then(c=>(c.body.breakpoints.forEach((y,b)=>{var A,S;y.id&&this.id2Breakpoint.set(y.id,f[b]);const w=f[b];w.raw.line=(A=y.line)!==null&&A!==void 0?A:w.raw.line,w.raw.column=(S=y.column)!==null&&S!==void 0?S:w.raw.column,w.status.set(this.id,y)}),this.breakpointManager.updateBreakpoints(f,!0),this.breakpointManager.resolveBpDeffered(),Promise.resolve())).catch(c=>{if(!(c instanceof Error)){const b=c.message?`${c.message}`:"Breakpoint not valid for current debug session";f.forEach(A=>{A.status.set(this.id,{verified:!1,message:b}),this.breakpointManager.updateBreakpoint(A,!0)})}}))}return await Promise.all(d)}delBreakpoint(g){return this.breakpointManager.delBreakpoint(g)}async addBreakpoint(g,d){return d&&this.breakpointManager.setBpDeffered(),this.breakpointManager.addBreakpoint(g),this.breakpointManager.promiseBpDeffered()}async runtimeUpdateBreakpoint(g){const{affected:d,statusUpdated:u}=g;if(!u)return await this.setBreakpoints(d)}async initBreakpoints(){this.settingBreakpoints=new o.Deferred,this.id2Breakpoint.clear(),this.configuration.noDebug||await this.setBreakpoints(this.breakpointManager.affected.map(g=>o.URI.parse(g))),this.settingBreakpoints.resolve(),this.settingBreakpoints=null}get currentThread(){return this._currentThread}set currentThread(g){this.toDisposeOnCurrentThread.dispose(),this._currentThread=g,g&&this.toDisposeOnCurrentThread.push(g.onDidChanged(()=>this.fireDidChange()))}get multipleThreadPaused(){return this._multipleThreadPaused}hasInMultipleThreadPaused(g){return this._multipleThreadPaused.has(g)}clearThreads(){var g;const d=this.sessionManager.reportTime(v.DEBUG_REPORT_NAME.DEBUG_UI_FRONTEND_TIME,{sessionId:this.id,threadId:(g=this.currentThread)===null||g===void 0?void 0:g.id,threadAmount:this.threadCount});this._threads.forEach(u=>{u.clear()}),this._onDidChangeCallStack.fire(),this.collocationThread(),d("clearThreads")}clearThread(g){const d=this.sessionManager.reportTime(v.DEBUG_REPORT_NAME.DEBUG_UI_FRONTEND_TIME,{sessionId:this.id,threadId:g,threadAmount:this.threadCount}),u=this._threads.get(g);u&&(u.clear(),this._onDidChangeCallStack.fire()),this.collocationThread(),d("clearThread")}get state(){if(this.connection.disposed)return v.DebugState.Inactive;if(!this.initialized)return v.DebugState.Initializing;const g=this.currentThread;return g?g.stopped?v.DebugState.Stopped:v.DebugState.Running:this.supportsThreadIdCorrespond?v.DebugState.Running:this.stoppedThreads.next().value?v.DebugState.Stopped:v.DebugState.Running}get currentFrame(){return this.currentThread&&this.currentThread.currentFrame}async getScopes(g){const{currentFrame:d}=this;return d?d.getScopes(g):[]}get label(){return v.IDebugSessionDTO.is(this.options)&&this.options.id?this.configuration.name+" ("+(this.options.id+1)+")":this.configuration.name}get visible(){return this.state>v.DebugState.Inactive}getSource(g){const d=p.DebugSource.toUri(g).toString(),u=this.sources.get(d)||new p.DebugSource(this,this.labelProvider,this.modelManager,this.workbenchEditorService,this.fileSystem);return u.update({raw:g}),this.sources.set(d,u),u}getSourceForUri(g){return this.sources.get(g.toString())}async toSource(g){const d=this.getSourceForUri(g);return d||this.getSource(await this.toDebugSource(g))}async toDebugSource(g){if(g.scheme===p.DebugSource.SCHEME)return{name:g.path.toString(),sourceReference:Number(g.query)};const d=g.displayName;let u=g.toString();return g.scheme===l.Schemes.file&&(u=await this.fileSystem.getFsPath(u)),{name:d,path:u,adapterData:void 0,sourceReference:void 0}}get threads(){return Array.from(this._threads.values())}get threadCount(){return this._threads.size}*getThreads(g){for(const d of this.threads)g(d)&&(yield d)}get runningThreads(){return this.getThreads(g=>!g.stopped)}get stoppedThreads(){return this.getThreads(g=>g.stopped)}async rawFetchThreads(g){const d=typeof g>"u"?null:{threadId:g},u=await this.sendRequest("threads",d);return u&&u.body&&u.body.threads&&Array.isArray(u.body.threads)?Promise.resolve(u.body.threads):Promise.resolve([])}async fetchThreads(){const g=await this.rawFetchThreads(),d=this._threads,u=[];for(const E of g){const f=E.id,c=d.get(f)||new s.DebugThread(this);u.push(c),c.update({raw:E})}return Promise.resolve(u)}updateThreads(g){return this.pendingThreads=this.pendingThreads.then(async()=>{try{const d=await this.rawFetchThreads();this.doUpdateThreads(d,g)}catch{}})}doUpdateThreads(g,d){const u=this.sessionManager.reportTime(v.DEBUG_REPORT_NAME.DEBUG_UI_FRONTEND_TIME,{sessionId:this.id,threadId:d?.threadId,threadAmount:g.length}),E=[];g.forEach(f=>{if(E.push(f.id),this._threads.has(f.id)){if(f.name){const c=this._threads.get(f.id);c&&(c.raw.name=f.name)}}else{const c=new s.DebugThread(this),y={raw:f};c.update(y),this._threads.set(f.id,c)}}),this._threads.forEach(f=>{var c;const{raw:{id:y}}=f;E.indexOf(y)===-1&&this._threads.delete(y),d&&(d.allThreadsStopped||d.threadId===y)&&((c=this._threads.get(y))===null||c===void 0||c.update({stoppedDetails:d}))}),this.collocationThread(d),u("doUpdateThreads")}collocationThread(g){var d;const{currentThread:u}=this;let E=u&&u.raw.id;g&&!g.preserveFocusHint&&g.threadId&&(E=g.threadId),this.currentThread=typeof E=="number"&&this._threads.get(E)||this._threads.values().next().value,((d=this.currentThread)===null||d===void 0?void 0:d.raw.id)!==E&&this.fireDidChange()}async updateCurrentThread(g){g?(this.currentThread=g,this._onCurrentThreadChange.fire(this.currentThread)):(this.currentThread=void 0,this._onCurrentThreadChange.fire(void 0))}async collectPausedThread(g){const d=await this.rawFetchThreads(g?.threadId);if(d.length===0)return new Map;const u=g.threadId&&this._multipleThreadPaused.has(g.threadId)?this._multipleThreadPaused.get(g.threadId):new s.DebugThread(this),E={raw:d[0]};return g&&(g.allThreadsStopped||g.threadId===d[0].id)&&(E.stoppedDetails=g),u&&(u.update(E),await this.rawFetchFrames(u),this._multipleThreadPaused.set(u.raw.id,u)),this._multipleThreadPaused}async updateCurrentThreadFramesOnFocus(){await this.rawFetchFrames(this.currentThread),this._onDidChangeCallStack.fire();const g=this.workbenchEditorService.currentEditor,d=u=>{this.stoppedDetails&&!this.stoppedDetails.preserveFocusHint&&(this.currentThread.currentFrame=u)};if(this.currentThread&&!this.currentFrame){const u=this.currentThread.frames.filter(E=>E&&E.source&&E.source.raw.presentationHint!=="deemphasize");if(u.length===0)return;if(g){const E=g.monacoEditor.getModel();if(E){const f=o.URI.parse(E.uri.toString()),c=u.filter(y=>y.source.uri.toString()===f.toString());c.length>0?d(c[0]):d(u[0])}}else d(u[0])}}async rawFetchFrames(g){!g||g.frameCount||(this.capabilities.supportsDelayedStackTraceLoading?(await g.rawFetchFrames(1),await g.rawFetchFrames(19)):await g.rawFetchFrames())}async terminate(g){if(this.initialized=!0,this.cancelAllRequests(),this.lifecycleManagedByParent&&this.parentSession){await this.parentSession.terminate(g);return}!this.terminated&&this.capabilities.supportsTerminateRequest&&this.configuration.request==="launch"?(this.terminated=!0,this.sendRequest("terminate",{restart:g}),await this.exited(1e3)||await this.disconnect(g)):await this.disconnect(g)}async disconnect(g){try{this.lifecycleManagedByParent&&this.parentSession?this.parentSession.disconnect(g):this.sendRequest("disconnect",{restart:g})}catch(u){this.fireExited(u);return}finally{this._onDidExitAdapter.fire(),this.onStateChange()}const d=500;await this.exited(d)||this.fireExited(new Error(`timeout after ${d} ms`))}updateCapabilities(g){Object.assign(this._capabilities,g)}fireExited(g){this.connection.fire("exited",{reason:g})}exited(g){return Promise.race([this.exitDeferred.promise.then(()=>!0,()=>!1),new Promise(d=>{setTimeout(d,g,!1)})])}async restart(g){return this.cancelAllRequests(),this.capabilities.supportsRestartRequest?(this.terminated=!1,this.lifecycleManagedByParent&&this.parentSession?await this.parentSession.restart({arguments:this.parentSession.configuration}):await this.sendRequest("restart",g),!0):!1}dispose(){this.toDispose.dispose()}async evaluate(g,d){var u;this.updateDeffered&&await((u=this.updateDeffered)===null||u===void 0?void 0:u.promise);const E=this.currentFrame&&this.currentFrame.raw.id,f=await this.sendRequest("evaluate",{expression:g,frameId:E,context:d});return d==="repl"&&this._onVariableChange.fire(),f.body}async variables(g,d="named"){return(await this.sendRequest("variables",{variablesReference:g,filter:d})).body}async goto(g){if(this.capabilities.supportsGotoTargetsRequest)return await this.sendRequest("goto",g)}async exceptionInfo(g){return this.capabilities.supportsExceptionInfoRequest?this.sendRequest("exceptionInfo",g):Promise.reject(new Error("exceptionInfo not supported"))}async cancel(g){return this.sendRequest("cancel",{progressId:g})}async setVariableValue(g){if(this.capabilities.supportsSetVariable){const d=await this.sendRequest("setVariable",g);return this._onVariableChange.fire(),d}}async breakpointLocations(g,d){var u;const E=await this.toSource(g),c=(((u=(await this.sendRequest("breakpointLocations",{source:E.raw,line:d})).body)===null||u===void 0?void 0:u.breakpoints)||[]).map(y=>({lineNumber:y.line,column:y.column||1}));return Object.values(c.reduce((y,b)=>({...y,[`${b.lineNumber}:${b.column}`]:b}),{}))}async sendRequest(g,d,u){var E,f,c;if(!this._capabilities.supportsTerminateRequest&&g==="terminate"||!this._capabilities.supportsCompletionsRequest&&g==="completions"||!this._capabilities.supportsTerminateThreadsRequest&&g==="terminateThreads")throw new Error(`debug: ${g} not supported`);let y;["continue","next","stepIn","stepOut","threads"].some(b=>g===b)&&this.handleCancellation((E=this.currentThread)===null||E===void 0?void 0:E.raw.id),["stackTrace","scopes","variables","completions","threads"].some(b=>g===b)&&(y=!((f=this.currentThread)===null||f===void 0)&&f.raw.id?this.getNewCancellationToken((c=this.currentThread)===null||c===void 0?void 0:c.raw.id,u):void 0);try{return await this.connection.sendRequest(g,d,this.configuration,y)}finally{this._onRequest.fire(g)}}async takeCommand(g){return new Promise(d=>{const u=this.onRequest(E=>{E===g&&(u.dispose(),d())})})}sendCustomRequest(g,d){return this.connection.sendCustomRequest(g,d)}on(g,d){return this.connection.on(g,d)}get onDidCustomEvent(){return this.connection.onDidCustomEvent}hasSeparateRepl(){return!this.parentSession||this.options.repl!=="mergeWithParent"}reportTime(g,d){return this.sessionManager.reportTime(g,d)}getNewCancellationToken(g,d){const u=new l.CancellationTokenSource(d),E=this.cancellationMap.get(g)||[];return E.push(u),this.cancellationMap.set(g,E),u.token}cancelAllRequests(){this.cancellationMap.forEach(g=>g.forEach(d=>d.cancel())),this.cancellationMap.clear()}handleCancellation(g){if(g){const d=this.cancellationMap.get(g);this.cancellationMap.delete(g),d&&d.forEach(u=>u.cancel())}else this.cancelAllRequests()}getDebugProtocolBreakpoint(g){const d=this.breakpointManager.getBreakpoints().find(u=>u.id===g);if(d){const u=d.status.get(this.id);return{id:u?.id,verified:!!u?.verified,message:u?.message,source:u?.source,line:u?.line,column:u?.column,endLine:u?.endLine,endColumn:u?.endColumn,instructionReference:u?.instructionReference,offset:u?.offset}}}currentEditor(){var g;return(g=this.getModel())===null||g===void 0?void 0:g.getEditor()}getModel(){return this.modelManager.model}async readMemory(g,d,u){return this.capabilities.supportsReadMemoryRequest?await this.sendRequest("readMemory",{count:u,memoryReference:g,offset:d}):Promise.resolve(void 0)}async writeMemory(g,d,u,E){return this.capabilities.supportsWriteMemoryRequest?await this.sendRequest("writeMemory",{memoryReference:g,offset:d,allowPartial:E,data:u}):Promise.resolve(void 0)}}t.DebugSession=h},5905:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseSnippet=t.CharWidthReader=t.DEFAULT_WORD_REGEXP=t.USUAL_WORD_SEPARATORS=void 0,t.isExtensionHostDebugging=l,t.matchAll=v,t.isRemoteAttach=_;const n=e(41869),r=e(57711),{equalsIgnoreCase:o}=n.strings;function l(h){return h.type&&o(h.type==="vslsShare"?h.adapterProxy.configuration.type:h.type,"extensionhost")}function v(h,a){let g;const d=[];for(;(g=a.exec(h))!==null;)d.push(g);return d}function _(h){if(h.request==="attach"){const a={node:"address",java:"hostName",go:"host",cppdbg:"miDebuggerServerAddress",python:"host"},{type:g}=h,d=h[a[g]];return d?!["localhost","0.0.0.0","127.0.0.1","::1"].includes(d):!0}return!1}t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function m(h=""){let a="(-?\\d*\\.\\d\\w*)|([^";for(const g of t.USUAL_WORD_SEPARATORS)h.indexOf(g)>=0||(a+="\\"+g);return a+="\\s]+)",new RegExp(a,"g")}t.DEFAULT_WORD_REGEXP=m();class p{static getInstance(){return p._INSTANCE||(p._INSTANCE=new p),p._INSTANCE}constructor(){this._cache=new Map,this._canvas=document.createElement("canvas")}getCharWidth(a,g){const d=a+g;if(this._cache.has(d))return this._cache.get(d);const u=this._canvas.getContext("2d");u.font=g;const f=u.measureText(a).width;return this._cache.set(d,f),f}}t.CharWidthReader=p,p._INSTANCE=null;const s=h=>{const a=new RegExp(/^\^\"(.*)\"/gm),g=new r.SnippetParser;return new RegExp(/\${\d+:(.*)/).test(h)||a.test(h)?g.parse(h).toString().replace(a,"$1"):h};t.parseSnippet=s},17475:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugBreakpointWidget=t.TopStackType=void 0;const r=e(85608),o=e(76003),l=e(41869),v=e(43718),_=r.__importStar(e(20868)),m=e(64582),p=e(97319),s=e(4983),h=e(27562);var a;(function(d){d[d.exception=0]="exception",d[d.debugger=1]="debugger"})(a||(t.TopStackType=a={}));let g=n=class extends v.Disposable{constructor(){super(),this.breakpointWidgetInputFocus=s.CONTEXT_BREAKPOINT_INPUT_FOCUSED.bind(this.contextKeyService)}get position(){return this._position}get values(){var u;return(u=this.zone)===null||u===void 0?void 0:u.values}get breakpointType(){var u;return(u=this.zone)===null||u===void 0?void 0:u.breakpointType}show(u,E,f="condition"){this.dispose(),this._position=u,this.addDispose(this.zone=this.injector.get(h.DebugBreakpointZoneWidget,[this.editor,{...E},f])),this.addDispose(this.zone.onDidChangeBreakpoint(({context:c,value:y})=>{E&&(E[c]=y)})),this.addDispose(this.zone.onFocus(()=>{this.breakpointWidgetInputFocus.set(!0)})),this.addDispose(this.zone.onBlur(()=>{this.breakpointWidgetInputFocus.set(!1)})),this.addDispose(this.zone.onDispose(()=>{this._position=void 0,this.breakpointWidgetInputFocus.set(!1)})),this.zone.show(_.positionToRange(u),n.LINE_HEIGHT_NUMBER)}hide(){var u;(u=this.zone)===null||u===void 0||u.hide()}};t.DebugBreakpointWidget=g,g.LINE_HEIGHT_NUMBER=2,r.__decorate([(0,o.Autowired)(m.DebugEditor),r.__metadata("design:type",Object)],g.prototype,"editor",void 0),r.__decorate([(0,o.Autowired)(p.DebugBreakpointsService),r.__metadata("design:type",p.DebugBreakpointsService)],g.prototype,"debugBreakpointsService",void 0),r.__decorate([(0,o.Autowired)(l.IContextKeyService),r.__metadata("design:type",Object)],g.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],g.prototype,"injector",void 0),t.DebugBreakpointWidget=g=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],g)},27562:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugBreakpointZoneWidget=void 0;const r=e(85608),o=r.__importDefault(e(14041)),l=r.__importDefault(e(25873)),v=e(76003),_=e(97267),m=e(41869),p=e(43718),s=e(20303),h=e(52416),a=e(31324),g=e(64582),d=e(97319),u=r.__importDefault(e(55797));let E=n=class extends s.ZoneWidget{_fillContainer(c){}get values(){return{...this.contexts,[this.context]:this.input&&this.input.monacoEditor.getValue()||void 0}}get breakpointType(){return this.context}constructor(c,y={},b="condition"){super(c),this.editor=c,this.contexts=y,this.context=b,this._onDidChangeBreakpoint=new p.Emitter,this.onDidChangeBreakpoint=this._onDidChangeBreakpoint.event,this._onFocus=new p.Emitter,this.onFocus=this._onFocus.event,this._onBlur=new p.Emitter,this.onBlur=this._onBlur.event,this.inputFocusHandler=()=>{this._onFocus.fire()},this.inputBlurHandler=()=>{this._onBlur.fire()},this.selectContextHandler=A=>{this.input&&(this.contexts[this.context]=this.input.monacoEditor.getValue()||void 0),this.context=A,this.setInputMode(),this.render()},this._wrapper=document.createElement("div"),this._selection=document.createElement("div"),this._input=document.createElement("div"),this._container.appendChild(this._wrapper),this._wrapper.appendChild(this._selection),this._wrapper.appendChild(this._input),l.default.createRoot(this._input).render(o.default.createElement(o.default.Fragment,null))}hide(){this.input&&(this.input.dispose(),this.input=void 0),super.dispose()}show(c,y){super.show(c,y),this.debugBreakpointsService.createBreakpointInput(this._input).then(b=>{this.input=b;const{monacoEditor:A}=this.input;this.setInputMode(),this.addDispose(A.onDidBlurEditorWidget(()=>{this.inputBlurHandler()})),this.addDispose(A.onDidFocusEditorWidget(()=>{this.inputFocusHandler()})),this.addDispose(A.onDidChangeModelContent(S=>{if(!this.input)return;A.getValue().length===0?this.ensureRenderPlaceholder():this.clearPlaceholder();const I=A.getModel().getLineCount();this._relayout(I+1)})),this.syncPreContent()})}createDecorations(){this.input&&this.input.monacoEditor.getValue().length===0&&this.input.monacoEditor.deltaDecorations([],[{range:{startLineNumber:1,endLineNumber:0,startColumn:0,endColumn:1},options:{description:"debug-breakpoint-zone-widget",afterContentClassName:u.default.input_placeholder}}])}renderOption(c,y){return o.default.createElement(_.Option,{value:c},y)}setInputMode(){var c,y;const b=(c=this.editor.getModel())===null||c===void 0?void 0:c.getLanguageId(),A=(y=this.input)===null||y===void 0?void 0:y.monacoEditor.getModel();A&&b&&A.setLanguage(this.context==="logMessage"?"plaintext":b)}renderPlaceholder(){if(!this.input)return;this.clearPlaceholder();const c=`'${this.placeholder}' !important`;this.cssRenderDisposable=this.cssManager.addClass(n.INPUT_PLACEHOLDER_AFTER,{content:c})}ensureRenderPlaceholder(){this.input&&(this.createDecorations(),this.renderPlaceholder())}syncPreContent(){if(this.input){this.input.focus();const c=this.contexts[this.context]||"";this.input.monacoEditor.setValue(c)}}clearPlaceholder(){this.cssRenderDisposable&&(this.cssRenderDisposable.dispose(),this.cssRenderDisposable=void 0)}applyClass(){if(this._wrapper.className=u.default.debug_breakpoint_wrapper,this._selection.className=u.default.debug_breakpoint_selected,this._input.className=u.default.debug_breakpoint_input,!this.editor.getModel())return;const y=this.editor.getOption(a.EditorOption.lineHeight),b=this.editor.getOption(a.EditorOption.fontSize),A=y-b;this._input.style.marginTop=A+"px"}applyStyle(){this.syncPreContent(),l.default.createRoot(this._selection).render(o.default.createElement(_.Select,{value:this.context,selectedRenderer:()=>o.default.createElement("span",{className:"kt-select-option"},this.getContextToLocalize(this.context)),onChange:this.selectContextHandler},this.renderOption("condition",this.getContextToLocalize("condition")),this.renderOption("hitCondition",this.getContextToLocalize("hitCondition")),this.renderOption("logMessage",this.getContextToLocalize("logMessage"))))}getContextToLocalize(c){switch(c){case"logMessage":return(0,p.localize)("debug.expression.logMessage");case"hitCondition":return(0,p.localize)("debug.expression.hitCondition");default:return(0,p.localize)("debug.expression.condition")}}get placeholder(){switch(this.context){case"logMessage":return(0,p.localize)("debug.expression.log.placeholder");case"hitCondition":return(0,p.localize)("debug.expression.hit.placeholder");default:return(0,p.localize)("debug.expression.condition.placeholder")}}};t.DebugBreakpointZoneWidget=E,E.INPUT_PLACEHOLDER_AFTER=u.default.input_placeholder+"::after",r.__decorate([(0,v.Autowired)(d.DebugBreakpointsService),r.__metadata("design:type",d.DebugBreakpointsService)],E.prototype,"debugBreakpointsService",void 0),r.__decorate([(0,v.Autowired)(m.PreferenceService),r.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),r.__decorate([(0,v.Autowired)(h.ICSSStyleService),r.__metadata("design:type",Object)],E.prototype,"cssManager",void 0),t.DebugBreakpointZoneWidget=E=n=r.__decorate([(0,v.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object,Object,String])],E)},52943:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugEditorContribution=void 0;const r=e(85608),o=e(76003),l=e(41869),v=e(54414),_=e(51553),m=r.__importStar(e(20868)),p=e(79865),s=e(44781),h=e(38390),a=e(17280),g=e(84303),d=e(38029),u=e(16170),E=e(64582),f=e(5905),c="inlinevaluedecoration",y=100,b=150,A=500,{flatten:S}=l.arrays;class w{constructor(O,x){this.column=O,this.text=x}}function I(M,O,x=1073741824){return O.length>b&&(O=O.substr(0,b)+"..."),{range:{startLineNumber:M,endLineNumber:M,startColumn:x,endColumn:x},renderOptions:{after:{contentText:O,backgroundColor:"rgba(255, 200, 0, 0.2)",margin:"10px"},dark:{after:{color:"rgba(255, 255, 255, 0.5)"}},light:{after:{color:"rgba(0, 0, 0, 0.5)"}}}}}function D(M,O,x,k){const F=new Map;for(const U of M)if(F.set(U.name,U.value),F.size>=y)break;const L=new Map;F.forEach((U,W)=>{const j=k.get(W);if(j)for(const Q of j)O.containsPosition(new l.Position(Q,0))&&(L.has(Q)||L.set(Q,[]),L.get(Q).indexOf(W)===-1&&L.get(Q).push(W))});const N=[];return L.forEach((U,W)=>{const j=U.sort((Q,G)=>{const X=x.getLineContent(W);return X.indexOf(Q)-X.indexOf(G)}).map(Q=>`${Q} = ${F.get(Q)}`).join(", ");N.push(I(W,j))}),N}function T(M){const O=new Map;if(!M)return O;for(let x=1,k=M.getLineCount();x<=k;++x){const F=M.getLineContent(x);if(F.length>A)continue;M.tokenization.forceTokenization(x);const L=M.tokenization.getLineTokens(x);for(let N=0,U=L.getCount();N<U;N++)if(L.getStandardTokenType(N)===h.StandardTokenType.Other){f.DEFAULT_WORD_REGEXP.lastIndex=0;const j=L.getStartOffset(N),Q=L.getEndOffset(N),G=F.substring(j,Q),X=f.DEFAULT_WORD_REGEXP.exec(G);if(X){const $=X[0];O.has($)||O.set($,[]),O.get($).push(x)}}}return O}let R=n=class{constructor(O){this.editor=O,this.disposer=new l.Disposable,this.editorDisposer=new l.Disposable}contribute(O){return this.disposer.addDispose(this.debugSessionManager.onDidChangeActiveDebugSession(()=>{const x=this.debugSessionManager.currentSession;x&&(this.editorDisposer.addDispose(x.onDidChange(async()=>{var k,F;this.setHoverEnabled(O,x.state===E.DebugState.Running);const L=(k=x.currentThread)===null||k===void 0?void 0:k.currentFrame;L&&O.currentUri&&!((F=L.source)===null||F===void 0)&&F.uri.isEqual(O.currentUri)&&await this.toggleExceptionWidget()})),this.editorDisposer.addDispose(x.onDidExitAdapter(()=>{this.setHoverEnabled(O,!0)})),this.editorDisposer.addDispose(this.editorService.onActiveResourceChange(k=>{var F;k?.uri.toString()===((F=x.getModel())===null||F===void 0?void 0:F.uri.toString())?this.setHoverEnabled(O):this.setHoverEnabled(O,!0)})),this.disposer.addDispose([l.Event.any(x.onDidChangeCallStack,x.onDidStop)(async()=>{await this.directRunUpdateInlineValueDecorations(O)}),x.onDidExitAdapter(()=>{this.removeInlineValuesScheduler(O).schedule(),this.editorDisposer.dispose()})]),this.disposer.addDispose(x.onDidChangeState(k=>{k!==E.DebugState.Stopped&&this.toggleExceptionWidget()})),this.disposer.addDispose(x),this.registerEditorListener(O))})),this.disposer.addDispose(this.debugSessionManager.onDidDestroyDebugSession(()=>{this.closeExceptionWidget()})),this.disposer.addDispose(this.editorDisposer),this.toggleExceptionWidget(),this.disposer}registerEditorListener(O){this.editorDisposer.addDispose(O.monacoEditor.onKeyDown(async x=>{var k,F,L,N,U;if(((L=(F=(k=this.debugSessionManager.currentSession)===null||k===void 0?void 0:k.currentFrame)===null||F===void 0?void 0:F.source)===null||L===void 0?void 0:L.uri.toString())===((N=O.currentUri)===null||N===void 0?void 0:N.toString())&&x.keyCode===m.KeyCode.Alt){this.setHoverEnabled(O,!0),(U=this.debugModelManager.model)===null||U===void 0||U.getDebugHoverWidget().hide();const W=O.monacoEditor.onKeyUp(async j=>{var Q;j.keyCode===m.KeyCode.Alt&&(this.setHoverEnabled(O,!1),(Q=this.debugModelManager.model)===null||Q===void 0||Q.getDebugHoverWidget().show(),W.dispose())})}})),this.editorDisposer.addDispose(O.monacoEditor.onDidChangeModelContent(async()=>{n.MEMOIZER.clear(),await this.directRunUpdateInlineValueDecorations(O)})),this.editorDisposer.addDispose(O.monacoEditor.onDidChangeModel(async()=>{this.toggleExceptionWidget(),await this.directRunUpdateInlineValueDecorations(O)}))}registerDecorationType(){this.overrideServicesRegistry.getRegisteredService(l.ServiceNames.CODE_EDITOR_SERVICE).registerDecorationType("inline-value-decoration",c,{})}setHoverEnabled(O,x=!this.debugContextKey.contextInDebugMode.get()){O.monacoEditor.updateOptions({hover:{enabled:x}})}async directRunUpdateInlineValueDecorations(O){var x;const k=(x=this.debugSessionManager.currentSession)===null||x===void 0?void 0:x.currentFrame;k&&(n.MEMOIZER.clear(),await this.updateInlineValueDecorations(k,O))}removeInlineValuesScheduler(O){return new l.RunOnceScheduler(()=>O.monacoEditor.removeDecorationsByType(c),100)}async updateInlineValueDecorations(O,x){var k;if(!x)return;const F="{0} = {1}",L=", ",N=x.monacoEditor.getModel();if(!this.preferenceService.get("debug.inline.values")||!N||!O||N.uri.toString()!==((k=O.source)===null||k===void 0?void 0:k.uri.toString())){this.removeInlineValuesScheduler(x).isScheduled()||this.removeInlineValuesScheduler(x).schedule();return}this.removeInlineValuesScheduler(x).cancel();let U;if(p.languageFeaturesService.inlineValuesProvider.has(N)){const W=async(H,K)=>{const Y=await O.getMostSpecificScopes(O.range()),Z=K?H:H.toLowerCase();for(const oe of Y){await oe.ensureLoaded();const he=(oe.children||[]).find(me=>K?me.name===Z:me.name.toLowerCase()===Z);if(he)return he.value}},j={frameId:O.raw.id,stoppedLocation:(()=>{const H=O.range();return new s.Range(H.startLineNumber,H.startColumn+1,H.endLineNumber,H.endColumn+1)})()},Q=new l.CancellationTokenSource().token,G=x.monacoEditor.getVisibleRanges(),X=p.languageFeaturesService.inlineValuesProvider.ordered(N).reverse();U=[];const $=new Map,V=S(X.map(H=>G.map(K=>Promise.resolve(H.provideInlineValues(N,K,j,Q)).then(async Y=>{if(Y)for(const Z of Y){let oe;switch(Z.type){case"text":oe=Z.text;break;case"variable":{let ie=Z.variableName;ie||(ie=N.getLineContent(Z.range.startLineNumber).substring(Z.range.startColumn-1,Z.range.endColumn-1));const he=await W(ie,Z.caseSensitiveLookup);he&&(oe=l.strings.format(F,ie,he));break}case"expression":{let ie=Z.expression;if(ie||(ie=N.getLineContent(Z.range.startLineNumber).substring(Z.range.startColumn-1,Z.range.endColumn-1)),ie){const he=new u.DebugWatchRoot(O.thread.session),me=new u.DebugWatchNode(O.thread.session,ie,he);await me.evaluate(ie),me.available&&(oe=l.strings.format(F,ie,me.description))}break}}if(oe){const ie=Z.range.startLineNumber;let he=$.get(ie);he||(he=[],$.set(ie,he)),he.some(me=>me.text===oe)||he.push(new w(Z.range.startColumn,oe))}}},Y=>{(0,l.onUnexpectedExternalError)(Y)}))));await Promise.all(V),$.forEach((H,K)=>{if(H.length>0){H=H.sort((Z,oe)=>Z.column-oe.column);const Y=H.map(Z=>Z.text).join(L);U.push(I(K,Y))}})}else{const W=await O.getMostSpecificScopes(O.range());U=(await Promise.all(W.map(async Q=>{await Q.ensureLoaded();const G=Q.children||[],X=O.range(),$=Q.range();let V=new s.Range(0,0,X.startLineNumber,X.startColumn);return $&&(V=V.setStartPosition($.startLineNumber,$.startColumn)),D(G,V,N,T(x?.monacoEditor.getModel()))}))).reduce((Q,G)=>Q.concat(G),[])}x.monacoEditor.setDecorationsByType("inline-value-decoration",c,U)}async toggleExceptionWidget(){var O,x;const k=this.debugSessionManager.currentSession;if(!k){this.closeExceptionWidget();return}const{currentThread:F}=k;if(!F){this.closeExceptionWidget();return}const L=F.frames.find(U=>!!(U&&U.source&&U.source.available&&U.source.presentationHint!=="deemphasize"));if(!L){this.closeExceptionWidget();return}const N=(O=this.editor.currentUri)===null||O===void 0?void 0:O.isEqual((x=L.source)===null||x===void 0?void 0:x.uri);if(this.debugExceptionWidget&&!N)this.closeExceptionWidget();else if(N){const U=await F?.fetchExceptionInfo();U&&this.showExceptionWidget(U,k,L.range().startLineNumber,L.range().startColumn)}}showExceptionWidget(O,x,k,F){this.debugExceptionWidget&&this.debugExceptionWidget.dispose();const L=x?.currentEditor();this.debugExceptionWidget=this.injector.get(g.DebugExceptionWidget,[L,O]),this.debugExceptionWidget.show(m.positionToRange({lineNumber:k,column:F}),10),this.debugExceptionWidget.focus(),L?.revealRangeInCenter({startLineNumber:k,startColumn:F,endLineNumber:k,endColumn:F}),this.debugContextKey.contextExceptionWidgetVisible.set(!0)}closeExceptionWidget(){this.debugExceptionWidget&&(this.debugContextKey.contextExceptionWidgetVisible.set(!1),this.debugExceptionWidget.dispose(),this.debugExceptionWidget=void 0)}};t.DebugEditorContribution=R,R.MEMOIZER=(0,l.createMemoizer)(),r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],R.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(l.IContextKeyService),r.__metadata("design:type",Object)],R.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(E.IDebugModelManager),r.__metadata("design:type",Object)],R.prototype,"debugModelManager",void 0),r.__decorate([(0,o.Autowired)(E.IDebugSessionManager),r.__metadata("design:type",d.DebugSessionManager)],R.prototype,"debugSessionManager",void 0),r.__decorate([(0,o.Autowired)(l.PreferenceService),r.__metadata("design:type",Object)],R.prototype,"preferenceService",void 0),r.__decorate([(0,o.Autowired)(l.MonacoOverrideServiceRegistry),r.__metadata("design:type",l.MonacoOverrideServiceRegistry)],R.prototype,"overrideServicesRegistry",void 0),r.__decorate([(0,o.Autowired)(v.WorkbenchEditorService),r.__metadata("design:type",_.WorkbenchEditorServiceImpl)],R.prototype,"editorService",void 0),r.__decorate([(0,o.Autowired)(a.DebugContextKey),r.__metadata("design:type",a.DebugContextKey)],R.prototype,"debugContextKey",void 0),t.DebugEditorContribution=R=n=r.__decorate([(0,o.Injectable)(),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[Object])],R)},74257:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugExpressionProvider=void 0;const n=e(85608),r=e(76003),o=e(43718),l=n.__importStar(e(20868)),v=e(16885),{coalesce:_}=o.arrays;let m=class{async get(s,h){var a,g;let d,u;if(this.evaluatableExpressionService.hasEvaluatableExpressProvider(s)){const E=new o.CancellationTokenSource,f=this.evaluatableExpressionService.getSupportedEvaluatableExpressionProvider(s),c=new l.Position(h.startLineNumber,h.startColumn),y=f.map(A=>Promise.resolve(A.provideEvaluatableExpression(s,c,E.token)).then(S=>S,()=>{})),b=await Promise.all(y).then(_);b.length>0&&(d=(a=b[0])===null||a===void 0?void 0:a.expression,u=(g=b[0])===null||g===void 0?void 0:g.range,!d&&u&&(d=s.getLineContent(c.lineNumber).substring(u.startColumn-1,u.endColumn-1)))}else{const E=s.getLineContent(h.startLineNumber),{start:f,end:c}=this.getExactExpressionStartAndEnd(E,h.startColumn,h.endColumn);d=E.substring(f-1,c)}return d}getExactExpressionStartAndEnd(s,h,a){let g,d=0;const u=/([^()[\]{}<>\s+\-/%~#^;=|,`!]|->)+/g;let E=null;for(;E=u.exec(s);){const f=E.index+1,c=f+E[0].length;if(f<=h&&c>=a){g=E[0],d=f;break}}if(g){const f=/\w+/g;let c=null;for(;(c=f.exec(g))&&!(c.index+1+d+c[0].length>=a););c&&(g=g.substring(0,f.lastIndex))}return g?{start:d,end:d+g.length-1}:{start:0,end:0}}};t.DebugExpressionProvider=m,n.__decorate([(0,r.Autowired)(v.IEvaluatableExpressionService),n.__metadata("design:type",Object)],m.prototype,"evaluatableExpressionService",void 0),t.DebugExpressionProvider=m=n.__decorate([(0,r.Injectable)()],m)},3367:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverModel=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(98650);let m=n=class extends l.TreeModel{constructor(s){super(),this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(s)}init(s){this.root=s,this.root.watcher.on(l.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};t.DebugHoverModel=m,m.DEFAULT_FLUSH_DELAY=100,t.DebugHoverModel=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[_.ExpressionContainer])],m)},23217:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverSource=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(64582),v=e(38029),_=e(98650);let m=class{constructor(){this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event}dispose(){this._expression=void 0}get expression(){return this._expression}clearEvaluate(){this.onDidChangeEmitter.fire(void 0)}async evaluate(s){const h=await this.doEvaluate(s);return this._expression=h,this.onDidChangeEmitter.fire(h),h}async doEvaluate(s){const{currentSession:h}=this.sessions;if(h){if(h.capabilities.supportsEvaluateForHovers){const a=new _.DebugHoverVariableRoot(s,h);return await a.evaluate("hover"),a.available&&a||void 0}return this.findVariable(s.split(".").map(a=>a.trim()).filter(a=>!!a))}}async findVariable(s){const{currentFrame:h}=this.sessions;if(!h)return;let a;const g=await h.getScopes();for(const d of g){const u=await this.doFindVariable(d,s);if(!a)a=u;else if(u&&u.value!==a.value)return}return a}async doFindVariable(s,h){await s.ensureLoaded();const a=s.children,g=[];if(a){for(const d of a)(d instanceof _.DebugVariableContainer||d instanceof _.DebugVariable)&&d.name===h[0]&&g.push(d);if(g.length===1)return h.length===1?g[0]:this.doFindVariable(g[0],h.slice(1))}}};t.DebugHoverSource=m,n.__decorate([(0,r.Autowired)(l.IDebugSessionManager),n.__metadata("design:type",v.DebugSessionManager)],m.prototype,"sessions",void 0),t.DebugHoverSource=m=n.__decorate([(0,r.Injectable)()],m)},85322:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverTreeModelService=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(98650),m=r.__importDefault(e(57259)),p=e(3367),s=e(23217),{Path:h}=v.path;let a=n=class{constructor(){this._changeEventDispatchQueue=[],this.selectedDecoration=new l.Decoration(m.default.mod_selected),this.focusedDecoration=new l.Decoration(m.default.mod_focused),this.loadingDecoration=new l.Decoration(m.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new v.Emitter,this.onDidUpdateTreeModelOrVariableEmitter=new v.Emitter,this.disposableCollection=new v.DisposableCollection,this.activeNodeDecoration=(d,u=!0)=>{if(this.preContextMenuFocusedNode&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedNode),this.selectedDecoration.removeTarget(this.preContextMenuFocusedNode),this.preContextMenuFocusedNode=null),d){if(this.selectedNodes.length>0)for(const E of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(E);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(d),this.focusedDecoration.addTarget(d),this._focusedNode=d,this._selectedNodes=[d],u&&this.treeModel.dispatchChange()}},this.activeNodeFocusedDecoration=(d,u=!1)=>{this.focusedNode!==d&&(u?(this.preContextMenuFocusedNode?(this.focusedDecoration.removeTarget(this.preContextMenuFocusedNode),this.selectedDecoration.removeTarget(this.preContextMenuFocusedNode)):this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.preContextMenuFocusedNode=d):this.focusedNode&&(this.preContextMenuFocusedNode=null,this.focusedDecoration.removeTarget(this.focusedNode)),d&&(this.selectedDecoration.addTarget(d),this.focusedDecoration.addTarget(d),this._focusedNode=d,this._selectedNodes.push(d))),this.treeModel.dispatchChange()},this.enactiveNodeDecoration=()=>{this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this.treeModel.dispatchChange()),this._focusedNode=void 0},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleTwistierClick=d=>{_.ExpressionContainer.is(d)?(this.activeNodeDecoration(d,!1),this.toggleDirectory(d)):this.activeNodeDecoration(d)},this.toggleDirectory=async d=>{d.expanded?this.treeHandle.collapseNode(d):this.treeHandle.expandNode(d)},this.flushEventQueue=()=>{let d;if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((E,f)=>{const c=h.pathDepth(E),y=h.pathDepth(f);return c-y});const u=[this._changeEventDispatchQueue[0]];for(const E of this._changeEventDispatchQueue)u.some(f=>E.indexOf(f)===0)||u.push(E);return d=(0,v.pSeries)(u.map(E=>async()=>{var f;const c=(f=this.treeModel.root)===null||f===void 0?void 0:f.watchEvents.get(E);return c&&typeof c.callback=="function"&&await c.callback({type:l.WatchEvent.Changed,path:E}),null})),this._changeEventDispatchQueue=[],d},this.debugHoverSource.onDidChange(async d=>{if(!d){this.onDidUpdateTreeModelOrVariableEmitter.fire({treeModel:void 0,variable:void 0});return}d instanceof _.DebugVariable?(this.dispose(),this.onDidUpdateTreeModelOrVariableEmitter.fire({variable:d})):(await this.initTreeModel(d),this.onDidUpdateTreeModelOrVariableEmitter.fire({treeModel:this.treeModel}))})}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}get onDidUpdateTreeModelOrVariable(){return this.onDidUpdateTreeModelOrVariableEmitter.event}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get treeHandle(){return this._debugHoverTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get whenReady(){return this._whenReady}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}listenTreeViewChange(){var d,u;this.dispose(),this.disposableCollection.push((d=this.treeModel)===null||d===void 0?void 0:d.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,E=>{this.loadingDecoration.addTarget(E)})),this.disposableCollection.push((u=this.treeModel)===null||u===void 0?void 0:u.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,E=>{this.loadingDecoration.removeTarget(E)}))}async initTreeModel(d){if(d)return this._treeModel=this.injector.get(p.DebugHoverModel,[d]),this.initDecorations(d),this.listenTreeViewChange(),this._treeModel}initDecorations(d){this._decorations=new l.DecorationsManager(d),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration))}handleTreeHandler(d){this._debugHoverTreeHandle=d}async refresh(d=this.treeModel.root){!_.ExpressionContainer.is(d)&&d.parent&&(d=d.parent),this.queueChangeEvent(d.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(d,u){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new v.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var E;await this.flushEventQueue(),(E=this.flushEventQueueDeferred)===null||E===void 0||E.resolve(),this.flushEventQueueDeferred=null,u()},n.DEFAULT_FLUSH_FILE_EVENT_DELAY)),this._changeEventDispatchQueue.indexOf(d)===-1&&this._changeEventDispatchQueue.push(d)}};t.DebugHoverTreeModelService=a,a.DEFAULT_FLUSH_FILE_EVENT_DELAY=100,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],a.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(s.DebugHoverSource),r.__metadata("design:type",s.DebugHoverSource)],a.prototype,"debugHoverSource",void 0),t.DebugHoverTreeModelService=a=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],a)},65960:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverWidget=void 0;const r=e(85608),o=r.__importDefault(e(12784)),l=r.__importDefault(e(14041)),v=r.__importDefault(e(25873)),_=e(76003),m=e(41869),p=r.__importStar(e(20868)),s=e(62663),h=e(64582),a=e(38029),g=e(74257),d=e(23217),u=e(63940);let E=n=class{constructor(){this.toDispose=new m.DisposableCollection,this.allowEditorOverflow=!0,this.doSchedule=(0,o.default)(c=>c(),300),this.init()}init(){this.toDispose.pushAll([m.Disposable.create(()=>this.editor.removeContentWidget(this)),m.Disposable.create(()=>this.hide()),this.sessions.onDidChange(()=>{this.isEditorFrame()||this.hide()})]),this.renderView()}handleWindowWheel(c){c.stopPropagation()}getId(){return n.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.classList.add(n.ID)),this.domNode}getPosition(){var c;const y=this.options&&this.options.selection.getStartPosition(),b=y&&((c=this.editor.getModel())===null||c===void 0?void 0:c.getWordAtPosition(y));return y&&b?{position:new p.Position(y.lineNumber,b.startColumn),preference:[s.monacoBrowser.editor.ContentWidgetPositionPreference.BELOW,s.monacoBrowser.editor.ContentWidgetPositionPreference.ABOVE]}:null}dispose(){this.toDispose.dispose()}show(c){this.schedule(()=>this.doShow(c),c&&c.immediate)}hide(c){this.schedule(()=>this.doHide(),c&&c.immediate)}schedule(c,y=!0){y?(this.doSchedule.cancel(),c()):this.doSchedule(c)}isEditorFrame(){const{currentFrame:c}=this.sessions;return!!c&&!!c.source&&!!this.editor.getModel()&&this.editor.getModel().uri.toString()===c.source.uri.toString()}doHide(){window.removeEventListener("mousewheel",this.handleWindowWheel,!0),this.getDomNode().contains(document.activeElement)&&this.editor.focus(),this.hoverSource.dispose(),this.hoverSource.clearEvaluate(),this.options=void 0,this.editor.removeContentWidget(this)}layoutContentWidget(){this.editor.layoutContentWidget(this)}renderView(){v.default.createRoot(this.getDomNode()).render(l.default.createElement(m.ConfigProvider,{value:this.configContext},l.default.createElement(u.DebugHoverView,null))),this.layoutContentWidget()}async doShow(c=this.options){if(!this.isEditorFrame()||!c||this.options&&this.options.selection.equalsRange(c.selection))return;this.options=c;const y=await this.expressionProvider.get(this.editor.getModel(),c.selection);y&&(this.hoverSource.clearEvaluate(),await this.hoverSource.evaluate(y)&&(this.reporterService.point(h.DEBUG_REPORT_NAME===null||h.DEBUG_REPORT_NAME===void 0?void 0:h.DEBUG_REPORT_NAME.DEBUG_VARIABLES,"hover",y),this.editor.addContentWidget(this),window.addEventListener("mousewheel",this.handleWindowWheel,!0)))}};t.DebugHoverWidget=E,E.ID="debug-hover-widget",r.__decorate([(0,_.Autowired)(h.DebugEditor),r.__metadata("design:type",Object)],E.prototype,"editor",void 0),r.__decorate([(0,_.Autowired)(h.IDebugSessionManager),r.__metadata("design:type",a.DebugSessionManager)],E.prototype,"sessions",void 0),r.__decorate([(0,_.Autowired)(g.DebugExpressionProvider),r.__metadata("design:type",g.DebugExpressionProvider)],E.prototype,"expressionProvider",void 0),r.__decorate([(0,_.Autowired)(d.DebugHoverSource),r.__metadata("design:type",d.DebugHoverSource)],E.prototype,"hoverSource",void 0),r.__decorate([(0,_.Autowired)(m.AppConfig),r.__metadata("design:type",Object)],E.prototype,"configContext",void 0),r.__decorate([(0,_.Autowired)(m.IReporterService),r.__metadata("design:type",Object)],E.prototype,"reporterService",void 0),t.DebugHoverWidget=E=n=r.__decorate([(0,_.Injectable)(),r.__metadata("design:paramtypes",[])],E)},63940:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=e(41869),_=e(1149),m=e(28875),p=e(85322),s=n.__importDefault(e(94084)),h=()=>{const a=(0,v.useInjectable)(p.DebugHoverTreeModelService),g=(0,v.useInjectable)(_.LayoutViewSizeConfig),d=250,u=420,E=4,[f,c]=o.default.useState({}),[y,b]=o.default.useState(d),A=o.default.useRef(null);o.default.useEffect(()=>(a.onDidUpdateTreeModelOrVariable(async M=>{const{treeModel:O,variable:x}=M;O&&await O.ensureReady,c({treeModel:O,variable:x})}),S(),()=>{a.removeNodeDecoration()}),[]),o.default.useEffect(()=>{let M;return b(d),f.treeModel&&(M=f.treeModel.root.watcher.on(l.TreeNodeEvent.DidChangeExpansionState,()=>{var O,x;const k=Math.max(d,(((O=f.treeModel)===null||O===void 0?void 0:O.root.branchSize)||0)*22),F=(x=A.current)===null||x===void 0?void 0:x.getBoundingClientRect();if(F){const L=F.top,N=window.innerHeight-L-g.statusBarHeight-E;b(Math.min(N,k,u))}else b(Math.min(u,k))})),()=>{M?.dispose()}},[f.treeModel]);const S=async()=>{a.treeModel&&(await a.treeModel.ensureReady,c({treeModel:a.treeModel}))},w=M=>{a.handleTreeHandler({...M,getModel:()=>f?.treeModel,hasDirectFocus:()=>A.current===document.activeElement})},I=(M,O)=>{M.stopPropagation();const{handleTwistierClick:x}=a;O&&x(O)},D=!!f.treeModel&&!!f.treeModel.root.variablesReference,T=o.default.useCallback(M=>{const O=a.decorations.getDecorations(M.item);return o.default.createElement(m.DebugVariableRenderedNode,{item:M.item,itemType:M.itemType,decorations:O,onClick:I,onTwistierClick:I,defaultLeftPadding:0,leftPadding:4})},[f.treeModel]),R=()=>D?o.default.createElement("div",{className:s.default.debug_hover_content,tabIndex:-1,ref:A},o.default.createElement(l.RecycleTree,{height:y,itemHeight:m.DEBUG_VARIABLE_TREE_NODE_HEIGHT,onReady:w,model:f.treeModel,placeholder:()=>o.default.createElement("span",null),overflow:"auto"},T)):null;return o.default.createElement("div",{className:s.default.debug_hover},f.treeModel?o.default.createElement("div",{className:(0,r.default)(s.default.debug_hover_title,D&&s.default.has_complex_value),title:f.treeModel.root.name},f.treeModel.root.name):f.variable&&o.default.createElement("div",{className:(0,r.default)(s.default.debug_hover_title,D&&s.default.has_complex_value),title:f.variable.name},f.variable.value),R())};t.DebugHoverView=h},71569:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugModelManager=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(54414),v=e(64582),_=e(99797),m=e(37499);let p=class extends o.Disposable{constructor(){super(),this.toDispose=new o.DisposableCollection,this._onMouseDown=new o.Emitter,this._onMouseMove=new o.Emitter,this._onMouseLeave=new o.Emitter,this._onMouseUp=new o.Emitter,this.onMouseDown=this._onMouseDown,this.onMouseMove=this._onMouseMove,this.onMouseLeave=this._onMouseLeave,this.onMouseUp=this._onMouseUp,this._onModelChanged=new o.Emitter,this.onModelChanged=this._onModelChanged.event,this.models=new Map}dispose(){for(const h of this.models.values())this.toDispose.pushAll(h);this.toDispose.dispose(),this.models.clear()}init(){this.editorCollection.onCodeEditorCreate(h=>this.push(h)),this.breakpointManager.onDidChangeBreakpoints(h=>{const{currentEditor:a}=this.editorService,g=a&&a.currentUri;g&&this.render(g),this.closeBreakpointIfAffected(h)})}get model(){const{currentEditor:h}=this.editorService,a=h&&h.currentUri;if(a){const g=this.models.get(a.toString());return g&&g[0]}}closeBreakpointIfAffected({affected:h,removed:a}){h.forEach(g=>{const d=this.models.get(g.toString());if(d)for(const u of d){const E=u.getBreakpointWidget(),f=E.position;if(!f)return;for(const c of a)c.raw.line===f.lineNumber&&E.dispose()}})}render(h){const a=this.models.get(h.toString());if(a)for(const g of a)g.render()}push(h){const a=h.monacoEditor;h.onRefOpen(d=>{const u=d.instance.uri.toString(),E=this.models.get(u)||[];let f=!1;if(E.length>0){for(const c of E)if(c.getEditor()._id===a._id){c.render(),f=!0;break}}if(!f){const c=d.instance.getMonacoModel(),y=this.debugModelFactory(a);E.push(y),this.models.set(u,E),c.onWillDispose(()=>{y.dispose(),this.models.delete(u)})}});const g=(d,u)=>{const E=a.getModel();if(!E)throw new Error("Not find model");this.handleMouseEvent(new o.URI(E.uri.toString()),d,u,a)};this.toDispose.push(a.onMouseMove(d=>g(v.DebugModelSupportedEventType.move,d))),this.toDispose.push(a.onMouseDown(d=>g(v.DebugModelSupportedEventType.down,d))),this.toDispose.push(a.onMouseLeave(d=>g(v.DebugModelSupportedEventType.leave,d))),this.toDispose.push(a.onContextMenu(d=>g(v.DebugModelSupportedEventType.contextMenu,d))),this.toDispose.push(a.onDidChangeModel(d=>this._onModelChanged.fire(d)))}resolve(h){const a=this.models.get(h.toString());if(a)return a}handleMouseEvent(h,a,g,d){const u=this.models.get(h.toString());if(!(!u||!this.debugConfigurationManager.canSetBreakpointsIn(u[0].getEditor().getModel()))){for(const f of u)if(f.getEditor().getId()===d.getId()){switch(a){case v.DebugModelSupportedEventType.contextMenu:f.onContextMenu(g);break;case v.DebugModelSupportedEventType.down:f.onMouseDown(g);break;case v.DebugModelSupportedEventType.leave:f.onMouseLeave(g);break;case v.DebugModelSupportedEventType.move:f.onMouseMove(g);break;default:break}break}}}};t.DebugModelManager=p,n.__decorate([(0,r.Autowired)(l.WorkbenchEditorService),n.__metadata("design:type",l.WorkbenchEditorService)],p.prototype,"editorService",void 0),n.__decorate([(0,r.Autowired)(l.EditorCollectionService),n.__metadata("design:type",l.EditorCollectionService)],p.prototype,"editorCollection",void 0),n.__decorate([(0,r.Autowired)(v.DebugModelFactory),n.__metadata("design:type",Function)],p.prototype,"debugModelFactory",void 0),n.__decorate([(0,r.Autowired)(_.BreakpointManager),n.__metadata("design:type",_.BreakpointManager)],p.prototype,"breakpointManager",void 0),n.__decorate([(0,r.Autowired)(m.DebugConfigurationManager),n.__metadata("design:type",m.DebugConfigurationManager)],p.prototype,"debugConfigurationManager",void 0),t.DebugModelManager=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},91260:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugModel=void 0;const r=e(85608),o=r.__importDefault(e(12784)),l=e(76003),v=e(41869),_=e(93899),m=e(43718),p=r.__importStar(e(20868)),s=e(62663),h=e(52416),a=e(64582),g=e(24395),d=e(26296),u=e(99797),E=e(38949),f=e(38029),c=e(97319),y=e(17475),b=e(65960),A=r.__importStar(e(26571));let S=n=class{static createContainer(D,T){return D.createChild([{token:g.DebugEditor,useValue:T},{token:b.DebugHoverWidget,useClass:b.DebugHoverWidget},{token:y.DebugBreakpointWidget,useClass:y.DebugBreakpointWidget},{token:a.IDebugModel,useClass:n}])}static createModel(D,T){return n.createContainer(D,T).get(a.IDebugModel)}get uri(){return this._uri}constructor(){this.toDispose=new m.DisposableCollection,this.frameDecorations=[],this.updatingDecorations=!1,this.breakpointDecorations=[],this.breakpointRanges=new Map,this.currentBreakpointDecorations=[],this.candidateDecorations=[],this.renderFrames=(0,o.default)((D=[])=>{var T;if(this.toDispose.disposed||((T=this.editor.getModel())===null||T===void 0?void 0:T.uri.toString())!==this._uri.toString())return;const R=this.createFrameDecorations().concat(D);this.frameDecorations=this.deltaDecorations(this.frameDecorations,R)},100),this.toggleBreakpoint=(D=this.position)=>{this.doToggleBreakpoint(D)},this.openBreakpointView=(D,T,R)=>{this.breakpointWidget.show(D,T,R)},this.closeBreakpointView=()=>{this.breakpointWidget.hide()},this.acceptBreakpoint=()=>{const{position:D,values:T}=this.breakpointWidget;if(this.reporterService.point(a.DEBUG_REPORT_NAME===null||a.DEBUG_REPORT_NAME===void 0?void 0:a.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,this.breakpointWidget.breakpointType),D&&T){const R=this.getBreakpoint(D);R?(R.raw.condition=T.condition,R.raw.hitCondition=T.hitCondition,R.raw.logMessage=T.logMessage,this.breakpointManager.updateBreakpoint(R)):this.breakpointManager.addBreakpoint(u.DebugBreakpoint.create(this._uri,{line:D.lineNumber,...T})),this.breakpointWidget.hide()}},this.hintDecorations=[],this.init()}async init(){const D=this.editor.getModel();let T;this._uri=new m.URI(D.uri.toString()),this.decorator=new E.DebugDecorator,this.toDispose.pushAll([this.breakpointWidget,this.editor.onKeyDown(R=>{R.code==="Escape"&&!R.altKey&&!R.shiftKey&&!R.metaKey?this.debugHoverWidget.hide({immediate:!0}):this.debugHoverWidget.hide({immediate:!1})}),this.editor.onDidChangeModelContent(()=>this.renderFrames()),this.debugSessionManager.onDidChange(()=>this.renderFrames()),this.debugBreakpointsService.onDidFocusedBreakpoints(({range:R})=>{this.preferenceService.getValid("debug.breakpoint.editorHint",!0)&&(this.renderFrames([{options:A.FOCUS_BREAKPOINTS_STACK_FRAME_DECORATION,range:R}]),T&&clearTimeout(T),T=window.setTimeout(()=>{this.renderFrames(),clearTimeout(T)},300))}),this.editor.getModel().onDidChangeContent(()=>this.updateBreakpoints()),this.editor.onDidChangeModel(()=>{this.closeBreakpointView()})]),this.renderFrames(),this.render()}dispose(){this.toDispose.dispose()}get position(){return this._position||this.editor.getPosition()}get breakpoint(){return this.getBreakpoint()}getBreakpoint(D){return this.breakpointManager.getBreakpoint(this._uri,D?D.lineNumber:void 0)}createFrameDecorations(){var D;const T=[],{currentFrame:R,topFrame:M}=this.debugSessionManager;if(!R||!R.source||R.source.uri.toString()!==((D=this.editor.getModel())===null||D===void 0?void 0:D.uri.toString()))return T;const O=new p.Range(R.raw.line,R.raw.column,R.raw.line,1<<30),x=new p.Range(R.raw.line,R.raw.column,R.raw.line,R.raw.column+1);if(M===R)if(T.push({options:A.TOP_STACK_FRAME_MARGIN,range:x}),R.thread.stoppedDetails&&R.thread.stoppedDetails.reason==="exception")T.push({options:A.TOP_STACK_FRAME_EXCEPTION_DECORATION,range:O});else{T.push({options:A.TOP_STACK_FRAME_DECORATION,range:O});const{topFrameRange:k}=this;k&&k.startLineNumber===R.raw.line&&k.startColumn!==R.raw.column&&T.push({options:A.TOP_STACK_FRAME_INLINE_DECORATION,range:O}),this.topFrameRange=O}else T.push({options:A.FOCUSED_STACK_FRAME_MARGIN,range:x}),T.push({options:A.FOCUSED_STACK_FRAME_DECORATION,range:O});return T}deltaDecorations(D,T){this.updatingDecorations=!0;try{return this.editor.deltaDecorations(D,T)}finally{this.updatingDecorations=!1}}focusStackFrame(){this.renderFrames()}async render(){await this.renderBreakpoints(),this.renderFrames()}async renderBreakpoints(){await this.breakpointManager.whenReady,this.renderNormalBreakpoints(),this.renderCurrentBreakpoints()}renderNormalBreakpoints(){const D=this.createBreakpointDecorations();this.breakpointDecorations=this.deltaDecorations(this.breakpointDecorations,D),this.updateBreakpointRanges()}updateBreakpoints(){if(this.areBreakpointsAffected()){const D=this.createBreakpoints();this.breakpointManager.setBreakpoints(this._uri,D)}}areBreakpointsAffected(){if(this.updatingDecorations||!this.editor.getModel())return!1;for(const D of this.breakpointDecorations){const T=this.editor.getModel().getDecorationRange(D),R=this.breakpointRanges.get(D);if(!T||!T.equalsRange(R))return!0}return!1}createBreakpoints(){const{_uri:D}=this,T=new Set,R=[];for(const M of this.breakpointDecorations){const O=this.editor.getModel().getDecorationRange(M);if(O&&!T.has(O.startLineNumber)){const x=O.startLineNumber,k=this.breakpointRanges.get(M),F=k&&this.breakpointManager.getBreakpoint(D,k.startLineNumber)||{},L=u.DebugBreakpoint.create(D,{...F.raw||{},line:x},F.enabled);R.push(L),T.add(x)}}return R}createBreakpointDecorations(){return this.breakpointManager.getBreakpoints(this._uri).map(T=>this.createBreakpointDecoration(T))}createBreakpointDecoration(D){const T=D.raw.line,R=D.raw.column||0;return{range:new p.Range(T,R,T,R+1),options:{description:"breakpoint-decoration",stickiness:A.STICKINESS}}}async renderCurrentBreakpoints(){const D=this.breakpointManager.getBreakpoints(this._uri),T=this.createCurrentBreakpointDecorations(),R=this.deltaDecorations(this.currentBreakpointDecorations.map(({decorationId:x})=>x),T);this.currentBreakpointDecorations.forEach(x=>{x.inlineWidget&&x.inlineWidget.dispose()}),this.currentBreakpointDecorations=R.map((x,k)=>{const F=T[k],L=D[k],N=(L.enabled?A.BREAKPOINT_DECORATION:A.BREAKPOINT_DECORATION_DISABLED).glyphMarginClassName,U=F.options.beforeContentClassName?new w(this.editor,x,N,L,this.breakpointManager):void 0;return{breakpoint:L,decorationId:x,inlineWidget:U}});const M=await this.getCandidateBreakpoints(D),O=this.deltaDecorations(this.candidateDecorations.map(({decorationId:x})=>x),M);this.candidateDecorations.forEach(x=>{x.inlineWidget.dispose()}),this.candidateDecorations=O.map((x,k)=>{const{breakpoint:F}=M[k],L=(F?A.BREAKPOINT_DECORATION:A.BREAKPOINT_DECORATION_DISABLED).glyphMarginClassName,N=new w(this.editor,x,L,F,this.breakpointManager);return{decorationId:x,inlineWidget:N}})}async getCandidateBreakpoints(D){const T=this.editor.getModel(),R=this.debugSessionManager.currentSession;if(!T||!R?.capabilities.supportsBreakpointLocationsRequest)return[];const M=Array.from(new Set(D.map(x=>x.raw.line))),O=[];return await Promise.all(M.map(async x=>{const k=await R.breakpointLocations(this._uri,x);if(k.length<=1)return;const F=T.getLineCount();if(x>F)return;const L=T.getLineFirstNonWhitespaceColumn(x),N=T.getLineLastNonWhitespaceColumn(x);k.forEach(U=>{const W=new p.Range(U.lineNumber,U.column,U.lineNumber,U.column+1);if(U.column<=L||U.column>N)return;const j=this.currentBreakpointDecorations.find(({breakpoint:Q})=>Q.raw.line===W.startLineNumber&&Q.raw.column===W.startColumn);j?.inlineWidget||O.push({range:W,options:{description:"debug-breakpoint-placeholder",stickiness:p.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,beforeContentClassName:j?void 0:"debug-breakpoint-placeholder"},breakpoint:j?.breakpoint})})})),O}createCurrentBreakpointDecorations(){return this.breakpointManager.getBreakpoints(this._uri).filter(T=>(0,u.isDebugBreakpoint)(T)).map(T=>this.createCurrentBreakpointDecoration(T))}createCurrentBreakpointDecoration(D){const T=this.debugSessionManager.currentSession,R=D.status.get(T&&T.id||""),M=R&&R.line?R.line:D.raw.line,O=D.raw.column||0,x=this.editor.getModel(),k=x.getLineCount(),F=M>k?!1:O>x.getLineFirstNonWhitespaceColumn(M),L=new p.Range(M,O,M,O+1),{className:N,message:U}=this.decorator.getDecoration(D,!!T,this.breakpointManager.breakpointsEnabled),W=this.preferenceService.getValid("debug.breakpoint.showBreakpointsInOverviewRuler",!1);let j=null;return W&&(j={color:this.themeService.getColor({id:h.debugIconBreakpointForeground}),position:p.editor.OverviewRulerLane.Left}),{range:L,options:{description:"debug-breakpoint-placeholder",glyphMarginClassName:N,glyphMarginHoverMessage:U.map(Q=>({value:Q})),stickiness:A.STICKINESS,beforeContentClassName:F?"debug-breakpoint-placeholder":void 0,overviewRuler:j}}}updateBreakpointRanges(){this.breakpointRanges.clear();for(const D of this.breakpointDecorations){const T=this.editor.getModel().getDecorationRange(D);this.breakpointRanges.set(D,T)}}showHover(D){const T=D.target.type,R=m.isOSX?"metaKey":"ctrlKey";D.event.altKey||T===s.monacoBrowser.editor.MouseTargetType.CONTENT_WIDGET&&D.target.detail===this.debugHoverWidget.getId()&&!D.event[R]||(T===s.monacoBrowser.editor.MouseTargetType.CONTENT_TEXT?this.debugHoverWidget.show({selection:D.target.range,immediate:!1}):this.debugHoverWidget.hide({immediate:!1}))}hideHover({event:D}){const T=this.debugHoverWidget.getDomNode().getBoundingClientRect();(D.posx<T.left||D.posx>T.right||D.posy<T.top||D.posy>T.bottom)&&this.debugHoverWidget.hide({immediate:!1})}doToggleBreakpoint(D=this.position){const T=this.breakpointManager.getBreakpoints(this._uri,{lineNumber:D.lineNumber});if(T.length)for(const R of T)this.breakpointManager.delBreakpoint(R);else this.breakpointManager.addBreakpoint(u.DebugBreakpoint.create(this._uri,{line:D.lineNumber}))}get contributedContextMenu(){return this.menuService.createMenu(_.MenuId.DebugBreakpointsContext,this.contextKeyService)}onContextMenu(D){var T;if(this.marginFreeFromNonDebugDecorations((T=D.target.position)===null||T===void 0?void 0:T.lineNumber)&&D.target&&D.target.type===s.monacoBrowser.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const R=this.breakpointManager.getBreakpoint(this._uri,D.target.position.lineNumber);this.breakpointManager.selectedBreakpoint={breakpoint:R,model:this};const M=this.contributedContextMenu,O=(0,_.generateMergedCtxMenu)({menus:M});this.ctxMenuRenderer.show({anchor:D.event.browserEvent,menuNodes:O,args:[D.target.position]})}}marginFreeFromNonDebugDecorations(D){const T=this.editor.getLineDecorations(D);if(Array.isArray(T))for(const{options:R}of T){const M=R.glyphMarginClassName;if(M&&(M.includes("testing-run-glyph")||M.includes("interface-navigation-glyph")))return!1}return!0}onMouseDown(D){var T;this.marginFreeFromNonDebugDecorations((T=D.target.position)===null||T===void 0?void 0:T.lineNumber)&&(D.target&&D.target.type===s.monacoBrowser.editor.MouseTargetType.GUTTER_GLYPH_MARGIN&&(D.event.rightButton||(this.editor.focus(),this.toggleBreakpoint(D.target.position))),this.hintBreakpoint(D))}onMouseMove(D){var T;if(!this.marginFreeFromNonDebugDecorations((T=D.target.position)===null||T===void 0?void 0:T.lineNumber)){this.onMouseLeave(D);return}this.showHover(D),this.hintBreakpoint(D)}onMouseLeave(D){this.hideHover(D),this.deltaHintDecorations([])}hintBreakpoint(D){const T=this.createHintDecorations(D);this.deltaHintDecorations(T)}deltaHintDecorations(D){this.hintDecorations=this.deltaDecorations(this.hintDecorations,D)}createHintDecorations(D){if(D.target&&D.target.type===s.monacoBrowser.editor.MouseTargetType.GUTTER_GLYPH_MARGIN||D.target.type===s.monacoBrowser.editor.MouseTargetType.GUTTER_LINE_NUMBERS){const T=D.target.position.lineNumber;return this.breakpointManager.getBreakpoint(this._uri,T)?[]:[{range:new p.Range(T,1,T,1),options:A.BREAKPOINT_HINT_DECORATION}]}return[]}getBreakpoints(D,T){return this.breakpointManager.getBreakpoints(D,T)}getEditor(){return this.editor}getBreakpointWidget(){return this.breakpointWidget}getDebugHoverWidget(){return this.debugHoverWidget}};t.DebugModel=S,r.__decorate([(0,l.Autowired)(g.DebugEditor),r.__metadata("design:type",Object)],S.prototype,"editor",void 0),r.__decorate([(0,l.Autowired)(y.DebugBreakpointWidget),r.__metadata("design:type",y.DebugBreakpointWidget)],S.prototype,"breakpointWidget",void 0),r.__decorate([(0,l.Autowired)(b.DebugHoverWidget),r.__metadata("design:type",b.DebugHoverWidget)],S.prototype,"debugHoverWidget",void 0),r.__decorate([(0,l.Autowired)(d.IDebugSessionManager),r.__metadata("design:type",f.DebugSessionManager)],S.prototype,"debugSessionManager",void 0),r.__decorate([(0,l.Autowired)(c.DebugBreakpointsService),r.__metadata("design:type",c.DebugBreakpointsService)],S.prototype,"debugBreakpointsService",void 0),r.__decorate([(0,l.Autowired)(u.BreakpointManager),r.__metadata("design:type",u.BreakpointManager)],S.prototype,"breakpointManager",void 0),r.__decorate([(0,l.Autowired)(_.AbstractMenuService),r.__metadata("design:type",_.AbstractMenuService)],S.prototype,"menuService",void 0),r.__decorate([(0,l.Autowired)(v.IContextKeyService),r.__metadata("design:type",Object)],S.prototype,"contextKeyService",void 0),r.__decorate([(0,l.Autowired)(_.ICtxMenuRenderer),r.__metadata("design:type",_.ICtxMenuRenderer)],S.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,l.Autowired)(v.IReporterService),r.__metadata("design:type",Object)],S.prototype,"reporterService",void 0),r.__decorate([(0,l.Autowired)(v.PreferenceService),r.__metadata("design:type",Object)],S.prototype,"preferenceService",void 0),r.__decorate([(0,l.Autowired)(h.IThemeService),r.__metadata("design:type",Object)],S.prototype,"themeService",void 0),r.__decorate([m.memoize,r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[])],S.prototype,"contributedContextMenu",null),t.DebugModel=S=n=r.__decorate([(0,l.Injectable)(),r.__metadata("design:paramtypes",[])],S);class w extends m.Disposable{constructor(D,T,R,M,O){super(),this.editor=D,this.decorationId=T,this.breakpoint=M,this.breakpointManager=O,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.range=this.editor.getModel().getDecorationRange(T),this.addDispose(this.editor.onDidChangeModelDecorations(()=>{const k=this.editor.getModel().getDecorationRange(this.decorationId);this.range&&!this.range.equalsRange(k)&&(this.range=k,this.editor.layoutContentWidget(this))})),this.addDispose(m.Disposable.create(()=>{this.editor.removeContentWidget(this)})),this.create(R),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(D){const T=document.createElement("div");T.className="inline-breakpoint-widget",D&&(0,v.addClassName)(T,D),this.domNode=T;const{EditorOption:R}=p.editor,M=()=>{const O=this.editor.getOption(R.lineHeight);T.style.height=`${O}px`,T.style.width=`${Math.ceil(.8*O)}px`,T.style.marginLeft="4px"};M(),this.addDispose(new v.DomListener(T,"click",async()=>{this.breakpoint?this.breakpointManager.delBreakpoint(this.breakpoint):this.breakpointManager.addBreakpoint(u.DebugBreakpoint.create(this.editor.getModel().uri,{line:this.range.startLineNumber,column:this.range.startColumn}))})),this.addDispose(this.editor.onDidChangeConfiguration(O=>{(O.hasChanged(R.fontSize)||O.hasChanged(R.lineHeight))&&M()}))}getId(){return(0,m.uuid)()}getDomNode(){return this.domNode}getPosition(){return this.range?(this.domNode.classList.toggle("line-start",this.range.startColumn===1),{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn-1},preference:[s.monacoBrowser.editor.ContentWidgetPositionPreference.EXACT]}):null}}r.__decorate([m.memoize,r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],w.prototype,"getId",null)},78606:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugRunToCursorService=void 0;const n=e(85608),r=e(76003),o=e(54414),l=e(26296),v=e(66089),_=e(38029),m=e(97319);let p=class{constructor(){}async run(h,a=!1){const g=this.sessionManager.currentSession;if(!g||g.state!==l.DebugState.Stopped)return;const d=this.workbenchEditorService.currentEditor;if(d){if(!d.monacoEditor)return}else return;const{monacoEditor:u}=d,E=u.getPosition();if(!(u.hasModel()&&E))return;const f=g.getModel();if(!f)return;const c=!!f.getBreakpoints(h,{column:E.column,lineNumber:E.lineNumber}).length;let y,b=g.currentThread,A=[];if(!c){a&&(A=f.getBreakpoints().filter(I=>I.enabled).filter(I=>I.raw.column!==E.column&&I.raw.line!==E.lineNumber),A.forEach(I=>{this.debugBreakpointsService.toggleBreakpointEnable(I)}));const w=await this.addBreakpoints(h,E);if(!w){this.recoverStatus(A);return}w.thread&&(b=w.thread),w.breakpoint&&(y=w.breakpoint)}if(!b){this.recoverStatus(A);return}const S=b.session.onDidChangeState(()=>{const w=g.state;(w===l.DebugState.Stopped||w===l.DebugState.Inactive)&&(y&&g.delBreakpoint(y),S.dispose())});await b.continue(),this.recoverStatus(A)}async addBreakpoints(h,a){const g=this.sessionManager.currentSession;if(!g)return;let d=1;const u=g.currentFrame;u&&u.range().startLineNumber===a.lineNumber&&(d=a.column||1);const E=v.DebugBreakpoint.create(h,{line:a.lineNumber,column:d});if(await g.addBreakpoint(E,!0),!E)return{breakpoint:void 0,thread:g.currentThread};let f=g.currentThread,c=0;const y=g.threads.filter(b=>b.stopped);if(c<3&&g.currentThread&&y.includes(g.currentThread)&&(f=g.currentThread,c=3),c<2){const b=y.find(A=>A.topFrame);b&&(f=b,c=2)}return c<1&&(f=y[0],c=2),{thread:f,breakpoint:E}}recoverStatus(h){h.forEach(a=>{this.debugBreakpointsService.toggleBreakpointEnable(a)})}};t.DebugRunToCursorService=p,n.__decorate([(0,r.Autowired)(l.IDebugSessionManager),n.__metadata("design:type",_.DebugSessionManager)],p.prototype,"sessionManager",void 0),n.__decorate([(0,r.Autowired)(o.WorkbenchEditorService),n.__metadata("design:type",o.WorkbenchEditorService)],p.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(m.DebugBreakpointsService),n.__metadata("design:type",m.DebugBreakpointsService)],p.prototype,"debugBreakpointsService",void 0),t.DebugRunToCursorService=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},26571:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BREAKPOINT_DECORATION_DISABLED=t.BREAKPOINT_DECORATION=t.BREAKPOINT_HINT_DECORATION=t.TOP_STACK_FRAME_INLINE_DECORATION=t.FOCUSED_STACK_FRAME_DECORATION=t.TOP_STACK_FRAME_EXCEPTION_DECORATION=t.FOCUS_BREAKPOINTS_STACK_FRAME_DECORATION=t.TOP_STACK_FRAME_DECORATION=t.FOCUSED_STACK_FRAME_MARGIN=t.TOP_STACK_FRAME_MARGIN=t.BREAK_PONINT_HOVER_MARGIN=t.STICKINESS=void 0;const r=e(85608).__importStar(e(20868));t.STICKINESS=r.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,t.BREAK_PONINT_HOVER_MARGIN={description:"debug-hover",glyphMarginClassName:"sumi-debug-hover",linesDecorationsClassName:"sumi-debug-hover",isWholeLine:!0},t.TOP_STACK_FRAME_MARGIN={description:"debug-top-stack-frame",glyphMarginClassName:"sumi-debug-top-stack-frame",stickiness:t.STICKINESS},t.FOCUSED_STACK_FRAME_MARGIN={description:"debug-focused-stack-frame",glyphMarginClassName:"sumi-debug-focused-stack-frame",stickiness:t.STICKINESS},t.TOP_STACK_FRAME_DECORATION={description:"debug-top-stack-frame-line",isWholeLine:!0,className:"sumi-debug-top-stack-frame-line",stickiness:t.STICKINESS},t.FOCUS_BREAKPOINTS_STACK_FRAME_DECORATION={description:"focus-breakpoints-stack-frame-line",isWholeLine:!0,className:"sumi-focus-breakpoints-stack-frame-line",stickiness:t.STICKINESS},t.TOP_STACK_FRAME_EXCEPTION_DECORATION={description:"debug-top-stack-frame-exception-line",isWholeLine:!0,className:"sumi-debug-top-stack-frame-exception-line",stickiness:t.STICKINESS},t.FOCUSED_STACK_FRAME_DECORATION={description:"debug-focused-stack-frame-line",isWholeLine:!0,className:"sumi-debug-focused-stack-frame-line",stickiness:t.STICKINESS},t.TOP_STACK_FRAME_INLINE_DECORATION={description:"debug-top-stack-frame-column",beforeContentClassName:"sumi-debug-top-stack-frame-column"},t.BREAKPOINT_HINT_DECORATION={description:"debug-breakpoint-hint",glyphMarginClassName:"sumi-debug-breakpoint-hint",stickiness:t.STICKINESS},t.BREAKPOINT_DECORATION={description:"debug-breakpoint",glyphMarginClassName:"sumi-debug-breakpoint",stickiness:t.STICKINESS},t.BREAKPOINT_DECORATION_DISABLED={description:"debug-breakpoint-disabled",glyphMarginClassName:"sumi-debug-breakpoint-disabled",stickiness:t.STICKINESS}},16885:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EvaluatableExpressionServiceImpl=t.IEvaluatableExpressionService=void 0;const n=e(85608),r=e(76003),o=e(40497),l=new o.LanguageFeatureRegistry;t.IEvaluatableExpressionService=Symbol("IEvaluatableExpressionService");let v=class{getSupportedEvaluatableExpressionProvider(m){return l.ordered(m)}registerEvaluatableExpressionProvider(m,p){return l.register(m,p)}hasEvaluatableExpressProvider(m){return l.has(m)}};t.EvaluatableExpressionServiceImpl=v,t.EvaluatableExpressionServiceImpl=v=n.__decorate([(0,r.Injectable)()],v)},75935:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(17475),t),n.__exportStar(e(65960),t),n.__exportStar(e(91260),t),n.__exportStar(e(71569),t),n.__exportStar(e(26571),t),n.__exportStar(e(74257),t)},33969:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(91825),v=e(64582),_=e(99797),m=e(3005),p=e(37499),s=e(59053),h=e(31141),a=e(40453),g=e(90408),d=e(97186),u=e(38029),E=e(75935),f=e(23217),c=e(16885),y=e(23434),b=e(52369),A=e(44888),S=e(84784),w=e(15153),I=e(11456),D=e(37243),T=e(86752),R=e(14600);e(51377);let M=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:f.DebugHoverSource,useClass:f.DebugHoverSource},{token:E.DebugExpressionProvider,useClass:E.DebugExpressionProvider},{token:v.IDebugModelManager,useClass:E.DebugModelManager},{token:v.IDebugSessionManager,useClass:u.DebugSessionManager},{token:_.BreakpointManager,useClass:_.BreakpointManager},{token:p.DebugConfigurationManager,useClass:p.DebugConfigurationManager},{token:c.IEvaluatableExpressionService,useClass:c.EvaluatableExpressionServiceImpl},{token:l.FolderFilePreferenceProvider,useClass:y.LaunchFolderPreferenceProvider,dropdownForTag:!0,tag:"launch"},{token:v.DebugModelFactory,useFactory:x=>k=>E.DebugModel.createModel(x,k)},{token:d.DebugSessionContributionRegistry,useClass:d.DebugSessionContributionRegistryImpl},{token:v.IDebugService,useClass:g.DebugService},{token:v.ILaunchService,useClass:A.LaunchService},{token:v.IDebugProgress,useClass:a.DebugProgressService},{token:v.IDebugConsoleModelService,useClass:w.DebugConsoleModelService},b.LaunchPreferencesContribution,s.DebugContribution,I.DebugConsoleContribution,T.VariablesPanelContribution,D.DebugCallStackContribution,R.WatchPanelContribution,{token:m.DebugCallStackItemTypeKey,useFactory:x=>x.get(o.IContextKeyService).createKey("callStackItemType")}],this.contributionProvider=d.DebugSessionContribution,this.preferences=h.injectDebugPreferences,this.isOverlay=!0,this.component=S.DebugToolbarOverlayWidget}};t.DebugModule=M,t.DebugModule=M=n.__decorate([(0,r.Injectable)()],M)},39553:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(35721),t),n.__exportStar(e(20391),t)},35721:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkerManager=t.MarkerCollection=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(14951);class v{constructor(p,s){this.uri=p,this.kind=s,this.owner2Markers=new Map}get empty(){return!this.owner2Markers.size}getOwners(){return Array.from(this.owner2Markers.keys())}getMarkers(p){return this.owner2Markers.get(p)||[]}setMarkers(p,s){const h=this.owner2Markers.get(p);return s.length>0?this.owner2Markers.set(p,s.map(a=>this.createMarker(p,a))):this.owner2Markers.delete(p),h||[]}createMarker(p,s){return Object.freeze({uri:this.uri.toString(),kind:this.kind,owner:p,data:s})}findMarkers(p){if(p.owner)return this.owner2Markers.has(p.owner)?this.filterMarkers(p,this.owner2Markers.get(p.owner)):[];{const s=[];for(const h of this.owner2Markers.values())s.push(...this.filterMarkers(p,h));return s}}filterMarkers(p,s){return s?p.dataFilter?s.filter(h=>p.dataFilter(h.data)):s:[]}}t.MarkerCollection=v;let _=class{constructor(){this.uri2MarkerCollection=new Map,this.onDidChangeMarkersEmitter=new o.Emitter,this.init()}init(){this.fileService.onFilesChanged(p=>{const s=p.filter(({type:h})=>h===l.FileChangeType.DELETED);s.length&&this.cleanMarkers(s)})}cleanMarkers(p){for(const s of this.uri2MarkerCollection.keys()){const h=new o.URI(s);l.FileChangeEvent.isDeleted(p,h)&&this.cleanAllMarkers(h)}}get onDidChangeMarkers(){return this.onDidChangeMarkersEmitter.event}fireOnDidChangeMarkers(p){this.onDidChangeMarkersEmitter.fire(p)}setMarkers(p,s,h){const a=p.toString(),g=this.uri2MarkerCollection.get(a)||new v(p,this.getKind()),d=g.setMarkers(s,h);return g.empty?this.uri2MarkerCollection.delete(p.toString()):this.uri2MarkerCollection.set(a,g),this.fireOnDidChangeMarkers(p),d}findMarkers(p={}){if(p.uri){const h=this.uri2MarkerCollection.get(p.uri.toString());return h?h.findMarkers(p):[]}const s=[];for(const h of this.getUris())s.push(...this.uri2MarkerCollection.get(h).findMarkers(p));return s}getUris(){return this.uri2MarkerCollection.keys()}cleanAllMarkers(p){if(p)this.doCleanAllMarkers(p);else for(const s of this.getUris())this.doCleanAllMarkers(new o.URI(s))}doCleanAllMarkers(p){const s=p.toString();this.uri2MarkerCollection.get(s)!==void 0&&(this.uri2MarkerCollection.delete(s),this.fireOnDidChangeMarkers(p))}};t.MarkerManager=_,n.__decorate([(0,r.Autowired)(l.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileService",void 0),t.MarkerManager=_=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],_)},20391:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},88776:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugSource=t.DebugSourceData=void 0;const n=e(41869);class r{}t.DebugSourceData=r;class o extends r{constructor(v,_,m,p,s){super(),this.session=v,this.labelProvider=_,this.modelManager=m,this.workbenchEditorService=p,this.fileSystem=s}get uri(){return o.toUri(this.raw)}get available(){return!!this.raw}get presentationHint(){return this.raw.presentationHint}update(v){Object.assign(this,v)}async open(v,_){if(this.uri.scheme===o.SCHEME){const m=await this.load();await this.fileSystem.setContent({uri:this.uri.toString(),lastModification:0},m)}if(_&&_.raw){const{line:m,column:p}=_.raw,s={startLineNumber:m,startColumn:typeof p=="number"?p:0,endLineNumber:m,endColumn:1/0};await this.workbenchEditorService.open(this.uri,{...v,range:s}),_.thread.currentFrame=_;const h=this.modelManager.resolve(this.uri);if(h)for(const a of h)a.focusStackFrame()}else await this.workbenchEditorService.open(this.uri,v)}async load(){const v=this.raw,_=v.sourceReference;return(await this.session.sendRequest("source",{sourceReference:_,source:v})).body.content}get inMemory(){return this.uri.scheme===o.SCHEME}get reference(){return this.raw.sourceReference}get name(){return this.inMemory?this.raw.name||this.uri.path.base||this.uri.path.toString():this.labelProvider.getName(this.uri)}get longName(){return this.inMemory?this.name:this.labelProvider.getLongName(this.uri)}static toUri(v){if(v.sourceReference&&v.sourceReference>0)return new n.URI().withScheme(o.SCHEME).withPath(v.name).withQuery(String(v.sourceReference));if(!v.path)throw new Error("Unrecognized source type: "+JSON.stringify(v));return v.path.match(o.SCHEME_PATTERN)?new n.URI(v.path):new n.URI(n.Uri.file(v.path))}}t.DebugSource=o,o.SCHEME="debug",o.SCHEME_PATTERN=/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/},44485:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowMoreDebugStackFrame=t.DebugStackFrame=t.DebugStackFrameData=void 0;const n=e(41869),r=e(44781),o=e(98650);class l{}t.DebugStackFrameData=l;class v extends l{static is(p){return!!p&&"raw"in p}constructor(p,s){super(),this.thread=p,this.session=s}get id(){return this.session.id+":"+this.thread.id+":"+this.raw.id}get source(){return this._source}update(p){Object.assign(this,p),this._source=this.raw.source&&this.session.getSource(this.raw.source)}async restart(){return this.session.capabilities.supportsRestartFrame?await this.session.sendRequest("restartFrame",{frameId:this.raw.id}):Promise.reject(new Error("restartFrame not supported"))}get canRestart(){return!!this.session.capabilities.supportsRestartFrame&&this.raw.presentationHint!=="label"&&this.raw.presentationHint!=="subtle"&&!!this.raw.canRestart}async open(p){if(!this.source)return;const{line:s,column:h,endLine:a,endColumn:g}=this.raw;let d={startLineNumber:s,startColumn:h,endLineNumber:s,endColumn:1/0};typeof a=="number"&&(d={...d,endLineNumber:a,endColumn:typeof g=="number"?g:1/0}),this.source.open({...p,range:d})}toArgs(p){return Object.assign({},p,{frameId:this.raw.id})}getScopes(p){return this.doGetScopes(p)}async doGetScopes(p){try{return(await this.session.sendRequest("scopes",this.toArgs())).body.scopes.map(h=>new o.DebugScope(h,this.session,p))}catch{return[]}}range(){const p=this.raw;return new r.Range(p.line,p.column,p.endLine||p.line,p.endColumn||p.column)}async getMostSpecificScopes(p){const h=(await this.doGetScopes()).filter(d=>!d.getRawScope().expensive);if(!h.some(d=>!!d.range()))return h;const g=h.filter(d=>d.range()&&r.Range.containsRange(d.range(),p)).sort((d,u)=>d.range().endLineNumber-d.range().startLineNumber-(u.range().endLineNumber-u.range().startLineNumber));return g.length?g:h}}t.DebugStackFrame=v;class _{constructor(p,s,h,a,g){this.nextFrame=p,this.frames=s,this.session=h,this.origin=a,this._open=g,this.open=()=>{this._open(this)}}get name(){return(0,n.formatLocalize)("debug.stack.showMoreAndOrigin",this.frames.length,this.origin)}get id(){var p;return`${this.session.id}:showMore:${(p=this.nextFrame)===null||p===void 0?void 0:p.id}`}}t.ShowMoreDebugStackFrame=_},7885:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugThread=t.DebugThreadData=void 0;const n=e(41869),r=e(64582),o=e(44485);class l{}t.DebugThreadData=l;class v extends l{constructor(m){super(),this.session=m,this._onDidChanged=new n.Emitter,this.onDidChanged=this._onDidChanged.event,this._frames=new Map,this.pendingFetch=Promise.resolve([])}get id(){return this.session.id+":"+this.raw.id}get threadId(){return this.raw.id}get currentFrame(){return this._currentFrame}set currentFrame(m){this._currentFrame=m,this._onDidChanged.fire()}get stopped(){return!!this.stoppedDetails}update(m){Object.assign(this,m),"stoppedDetails"in m&&this.clearFrames()}clear(){this.update({raw:this.raw,stoppedDetails:void 0})}continue(){return this.session.sendRequest("continue",this.toArgs())}stepOver(){return this.session.sendRequest("next",this.toArgs())}stepIn(){return this.session.sendRequest("stepIn",this.toArgs())}stepOut(){return this.session.sendRequest("stepOut",this.toArgs())}pause(){return this.session.sendRequest("pause",this.toArgs())}terminate(){return this.session.sendRequest("terminateThreads",{threadIds:[this.raw.id]})}get frames(){return Array.from(this._frames.values())}get topFrame(){return this.frames[0]}get frameCount(){return this._frames.size}async rawFetchFrames(m=20){return this.pendingFetch=this.pendingFetch.then(async()=>{try{const p=this.frameCount,s=await this.doFetchFrames(p,m);return this.doUpdateFrames(s)}catch{return[]}})}async fetchExceptionInfo(){var m;try{if(((m=this.stoppedDetails)===null||m===void 0?void 0:m.reason)==="exception"&&this.session.capabilities.supportsExceptionInfoRequest){const p=await this.session.exceptionInfo(this.toArgs());if(p)return{id:p.body.exceptionId,description:p.body.description,breakMode:p.body.breakMode,details:p.body.details}}}catch{return}}async fetchFrames(m=20){const p=await this.rawFetchFrames(m);return this.updateCurrentFrame(),p}async doFetchFrames(m,p){try{const s=await this.session.sendRequest("stackTrace",this.toArgs({startFrame:m,levels:p}));return this.stoppedDetails&&(this.stoppedDetails.totalFrames=s.body.totalFrames),s.body.stackFrames}catch(s){return this.stoppedDetails&&(this.stoppedDetails.framesErrorMessage=s.message),[]}}doUpdateFrames(m){const p=this.session.reportTime(r.DEBUG_REPORT_NAME.DEBUG_UI_FRONTEND_TIME,{sessionId:this.session.id,threadId:this.raw.id,threadAmount:this.session.threadCount}),s=new Map(this._frames);for(const a of m){const g=a.id;if(!this._frames.has(g)){const d=new o.DebugStackFrame(this,this.session);this._frames.set(g,d),d.update({raw:a}),s.set(g,d)}}const h=[...s.values()];return p("doUpdateFrames"),h}clearFrames(){this._frames.clear(),this.updateCurrentFrame()}updateCurrentFrame(){const{currentFrame:m}=this,p=m&&m.raw.id;this.currentFrame=typeof p=="number"&&this._frames.get(p)||this._frames.values().next().value}toArgs(m){return Object.assign({},m,{threadId:this.raw.id})}}t.DebugThread=v},14190:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatch=t.IDebugWatchData=void 0;const r=e(85608).__importDefault(e(97331)),o=e(41869),l=e(64582),v=e(98650);t.IDebugWatchData=Symbol("IDebugWatchData");class _{constructor(p,s){this.manager=p,this.reporterService=s,this.toDispose=new o.DisposableCollection,this.fireDidChange=(0,r.default)(()=>this.onDidChangeEmitter.fire(),50),this.fireVariableChange=(0,r.default)(()=>this.onDidVariableChangeEmitter.fire(),50),this.fireExpressionChange=(0,r.default)(h=>this.onDidExExpressionChangeEmitter.fire(h),50),this._expressions=[],this.onDidChangeEmitter=new o.Emitter,this.onDidVariableChangeEmitter=new o.Emitter,this.onDidExExpressionChangeEmitter=new o.Emitter,this.whenReady=this.init()}get onDidChange(){return this.onDidChangeEmitter.event}get onDidVariableChange(){return this.onDidVariableChangeEmitter.event}get onDidExpressionChange(){return this.onDidExExpressionChangeEmitter.event}async getRoot(){const p=[],s=new v.DebugWatchRoot(this.manager.currentSession);for(const h of this._expressions){const a=new v.DebugWatchNode(this.manager.currentSession,h,s);await a.evaluate(),p.push(a)}return s.updatePresetChildren(p),this._root=s,this._root}async init(){this.toDispose.push(this.manager.onDidStopDebugSession(()=>{this.fireDidChange()})),this.toDispose.push(this.manager.onDidDestroyDebugSession(()=>{this.fireDidChange()})),this.toDispose.push(this.manager.onDidChangeActiveDebugSession(()=>{const p=this.manager.currentSession;p&&(p.onVariableChange(()=>{this.fireVariableChange()}),p.onDidChangeCallStack(()=>{this.fireVariableChange()}))}))}async clear(){this.updateWatchExpressions([]),this.fireExpressionChange([]),this.fireDidChange()}async updateWatchExpressions(p){this._expressions=p}addWatchExpression(p){this.reporterService.point(l.DEBUG_REPORT_NAME===null||l.DEBUG_REPORT_NAME===void 0?void 0:l.DEBUG_REPORT_NAME.DEBUG_WATCH,l.DEBUG_COMMANDS.ADD_WATCHER.id,{value:p}),this._expressions.indexOf(p)===-1&&(this._expressions.push(p),this.fireExpressionChange(this._expressions))}renameWatchExpression(p,s){const h=this._expressions.indexOf(p);h>=0&&this._expressions.splice(h,1,s),this.fireExpressionChange(this._expressions)}removeWatchExpression(p){const s=this._expressions.indexOf(p);s>=0&&this._expressions.splice(s,1),this.fireExpressionChange(this._expressions)}}t.DebugWatch=_},50755:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(88776),t),n.__exportStar(e(44485),t),n.__exportStar(e(7885),t),n.__exportStar(e(14190),t)},53741:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxWidget=void 0;const n=e(85608),r=e(51632),o=n.__importDefault(e(14041)),l=e(97267),v=n.__importDefault(e(93089)),_=m=>{var p,s;const{disabled:h,formContext:a,id:g,label:d,hideLabel:u,onBlur:E,onChange:f,onFocus:c,readonly:y,value:b,registry:A,options:S,schema:w,uiSchema:I}=m,{readonlyAsDisabled:D=!0}=a,T=(0,r.getTemplate)("DescriptionFieldTemplate",A,S),R=({target:F})=>f(F.checked),x={onBlur:y?void 0:({target:F})=>E(g,F.checked),onFocus:y?void 0:({target:F})=>c(g,F.checked)},k=(s=(p=S.description)!==null&&p!==void 0?p:w.description)!==null&&s!==void 0?s:w.markdownDescription;return o.default.createElement("div",{className:v.default.checkbox_widget_control},!u&&o.default.createElement("label",{title:d,className:v.default.field_label},d),o.default.createElement(l.CheckBox,{checked:typeof b>"u"?!1:b,disabled:h||D&&y,id:g,name:g,onChange:y?void 0:R,...x,"aria-describedby":(0,r.ariaDescribedByIds)(g),label:k,className:v.default.checkbox}))};t.CheckboxWidget=_},93306:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnyOfField=void 0;const n=e(85608),r=e(51632),o=n.__importDefault(e(14041)),l=e(97267),v=n.__importDefault(e(93089)),_=m=>{var p,s;const{disabled:h,formContext:a,idSchema:g,onBlur:d,id:u,onChange:E,onFocus:f,options:c,placeholder:y,readonly:b,registry:A,name:S,required:w,schema:I,uiOptions:D}=m,{readonlyAsDisabled:T=!0}=a,R=({target:L})=>E(L.value===""?c.emptyValue:L.value),M=({target:L})=>d(u,L.value),O=({target:L})=>f(u,L.value),x=(s=(p=c.description)!==null&&p!==void 0?p:I.description)!==null&&s!==void 0?s:I.markdownDescription,k=(0,r.getTemplate)("TitleFieldTemplate",A,D),F=(0,r.getTemplate)("DescriptionFieldTemplate",A,D);return o.default.createElement("div",{className:v.default.any_of_widget_control},S&&o.default.createElement("div",{className:v.default.object_title},o.default.createElement(k,{id:(0,r.titleId)(g),title:S,required:w,schema:I,registry:A})),x&&o.default.createElement("div",{className:v.default.object_description},o.default.createElement(F,{id:(0,r.descriptionId)(g),description:x,schema:I,registry:A})),o.default.createElement(l.Input,{disabled:h||T&&b,onBlur:b?void 0:M,onChange:b?void 0:R,onFocus:b?void 0:O,placeholder:y,autoComplete:"off"}))};t.AnyOfField=_},32475:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayField=void 0;const n=e(85608),r=e(67030),o=n.__importStar(e(14041)),l=e(43718),v=(0,r.getDefaultRegistry)().fields.ArrayField,_=m=>{const{onChange:p}=m,s=(0,o.useCallback)(h=>{Array.isArray(h)&&p(h.map(a=>(0,l.isUndefined)(a)?"":a))},[p]);return o.default.createElement(v,{...m,onChange:s})};t.ArrayField=_},59299:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectField=void 0;const n=e(85608),r=e(67030),o=n.__importStar(e(14041)),l=e(41869),v=e(43718),_=e(64582),m=(0,r.getDefaultRegistry)().fields.ObjectField,p=s=>{const h=(0,l.useInjectable)(_.ILaunchService),{idSchema:a,onChange:g}=s;return(0,o.useEffect)(()=>{const{$id:d}=a,u=new v.Disposable;return d==="root"&&u.addDispose(h.onChangeFormData(E=>g(E))),()=>u.dispose()},[a]),o.default.createElement(m,{...s})};t.ObjectField=p},66216:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleField=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(93089)),l=v=>{const{title:_}=v;return _?r.default.createElement("label",{title:_,className:o.default.field_label},_):null};t.TitleField=l},81638:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectWidget=void 0;const n=e(85608),r=e(51632),o=n.__importStar(e(14041)),l=e(97267),v=n.__importDefault(e(93089)),_=m=>{const{schema:p,value:s,id:h,registry:a,uiOptions:g,name:d,required:u,onChange:E}=m,f=p.description,c=(0,r.getTemplate)("TitleFieldTemplate",a,g),y=(0,r.getTemplate)("DescriptionFieldTemplate",a,g),b=(0,o.useMemo)(()=>p&&p.enum?p.enum:[],[p,p.enum]);return o.default.createElement("div",{className:v.default.select_widget_control},d&&o.default.createElement("div",{className:v.default.object_title},o.default.createElement(c,{id:(0,r.titleId)(h),title:d,required:u,schema:p,registry:a})),f&&o.default.createElement("div",{className:v.default.object_description},o.default.createElement(y,{id:(0,r.descriptionId)(h),description:f,schema:p,registry:a})),o.default.createElement(l.Select,{key:h,value:s,dropdownRenderType:"absolute",onChange:E},b.map(A=>o.default.createElement(l.Option,{value:A,label:A,key:A},A))))};t.SelectWidget=_},20023:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextWidget=void 0;const n=e(85608),r=e(51632),o=n.__importStar(e(14041)),l=e(97267),v=e(64582),_=e(5905),m=n.__importDefault(e(93089)),p=s=>{const{disabled:h,formContext:a,id:g,onBlur:d,onChange:u,onFocus:E,options:f,placeholder:c,readonly:y,schema:b,value:A,registry:S,label:w,hideLabel:I,required:D,uiSchema:T,uiOptions:R}=s,{readonlyAsDisabled:M=!0}=a,O=(0,r.getTemplate)("TitleFieldTemplate",S,R),x=(0,r.getTemplate)("DescriptionFieldTemplate",S,R),k=(0,o.useMemo)(()=>typeof A!="string"?A:(0,_.parseSnippet)(A),[A]),F=({target:W})=>{u(W.value===""?f.emptyValue:W.value),d(g,W.value)},L=({target:W})=>E(g,W.value),N=(0,o.useMemo)(()=>b.type!==v.JSON_SCHEMA_TYPE.STRING&&b.type!==v.JSON_SCHEMA_TYPE.NUMBER?v.JSON_SCHEMA_TYPE.STRING:b.type,[b,b.type]),U=(0,o.useMemo)(()=>b.description||"",[b,b.description]);return o.default.createElement("div",null,!I&&w&&o.default.createElement("div",{className:m.default.object_title},o.default.createElement(O,{id:(0,r.titleId)(g),title:w,required:D,schema:b,uiSchema:T,registry:S})),U&&o.default.createElement("div",{className:m.default.object_description},o.default.createElement(x,{id:(0,r.descriptionId)(g),description:U,schema:b,uiSchema:T,registry:S})),o.default.createElement(l.Input,{disabled:h||M&&y,id:g,name:g,onBlur:y?void 0:F,onFocus:y?void 0:L,placeholder:c,type:N,value:k,className:m.default.text_widget_control,autoComplete:"off"}))};t.TextWidget=p},23434:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchFolderPreferenceProvider=void 0;const n=e(85608),r=e(76003),o=e(91825);let l=class extends o.FolderFilePreferenceProvider{parse(_){const m=super.parse(_);if(m!==void 0)return{launch:{...m}}}getPath(_){if(_==="launch")return[];if(_.startsWith("launch."))return[_.substr(7)]}};t.LaunchFolderPreferenceProvider=l,t.LaunchFolderPreferenceProvider=l=n.__decorate([(0,r.Injectable)()],l)},52369:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchPreferencesContribution=t.LaunchResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(64102),v=e(39496),_=e(57517),m=e(4983),p=e(10938),s=e(67858);let h=class{constructor(){this.scheme=m.LAUNCH_VIEW_SCHEME}provideResource(d){return{supportsRevive:!0,name:(0,o.localize)("menu-bar.title.debug"),icon:(0,o.getIcon)("debug"),uri:d}}provideResourceSubname(){return null}async shouldCloseResource(){return!0}};t.LaunchResourceProvider=h,t.LaunchResourceProvider=h=n.__decorate([(0,r.Injectable)()],h);let a=class{constructor(){this.schema=p.launchPreferencesSchema,this.name="launch"}registerResource(d){d.registerResourceProvider(this.prefResourceProvider)}registerEditorComponent(d){d.registerEditorComponent({component:s.LaunchViewContainer,uid:m.LAUNCH_VIEW_COMPONENT_ID,scheme:m.LAUNCH_VIEW_SCHEME}),d.registerEditorComponentResolver(m.LAUNCH_VIEW_SCHEME,(u,E,f)=>{f([{type:_.EditorOpenType.component,componentId:m.LAUNCH_VIEW_COMPONENT_ID}])})}registerMenus(d){d.registerMenuItem(v.MenuId.EditorTitle,{command:o.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION.id,iconClass:(0,o.getIcon)("open"),group:"navigation",when:`resourceScheme == ${m.LAUNCH_VIEW_SCHEME}`})}};t.LaunchPreferencesContribution=a,n.__decorate([(0,r.Autowired)(h),n.__metadata("design:type",h)],a.prototype,"prefResourceProvider",void 0),t.LaunchPreferencesContribution=a=n.__decorate([(0,o.Domain)(o.PreferenceContribution,o.PreferenceConfiguration,_.BrowserEditorContribution,l.MenuContribution)],a)},10938:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.launchPreferencesSchema=void 0;const n=e(64582);t.launchPreferencesSchema={type:"object",scope:"resource",properties:{launch:{$ref:n.launchSchemaUri,description:"Global debug launch configuration. Should be used as an alternative to 'launch.json' that is shared across workspaces",defaultValue:{configurations:[],compounds:[]}}}}},44888:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchService=void 0;const n=e(85608),r=n.__importStar(e(23304)),o=n.__importDefault(e(41263)),l=e(76003),v=e(41869),_=e(43718),m=e(14951),p=e(64582),s="configurations";let h=class{constructor(){this._onRawSchemaProperties=new _.Emitter,this.onRawSchemaProperties=this._onRawSchemaProperties.event,this._onChangeSchema=new _.Emitter,this.onChangeSchema=this._onChangeSchema.event,this._onChangeFormData=new _.Emitter,this.onChangeFormData=this._onChangeFormData.event}get rawSchemaProperties(){return this._rawSchemaProperties}get schema(){return this._schema}get formData(){return this._formData}async openLaunchConfiguration(){await this.commandService.executeCommand(v.COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION.id)}setRawSchemaProperties(g){this._rawSchemaProperties=g,this._onRawSchemaProperties.fire(g)}nextNewSchema(g){this._schema=g,this._onChangeSchema.fire(g)}nextNewFormData(g,d=!0){this._formData=g,d&&this._onChangeFormData.fire(g)}addNewItem(g){if(g==="")return;const{properties:d}=this.rawSchemaProperties,u={...this.formData},E=d[g],{default:f,type:c}=E;(0,o.default)(u,g,f||this.getDefaultValue(c)),(0,o.default)(this.schema.properties,g,E),this.nextNewSchema(this.schema),this.nextNewFormData(u)}delItem(g){if(g==="")return;const{properties:d}=this.schema,u={...this.formData};delete u[g],delete d[g],this.nextNewSchema(this.schema),this.nextNewFormData(u)}getDefaultValue(g){switch(g){case p.JSON_SCHEMA_TYPE.ARRAY:return[];case p.JSON_SCHEMA_TYPE.BOOLEAN:return!1;case p.JSON_SCHEMA_TYPE.NULL:return null;case p.JSON_SCHEMA_TYPE.NUMBER:return 0;case p.JSON_SCHEMA_TYPE.OBJECT:return{};case p.JSON_SCHEMA_TYPE.STRING:default:return""}}async readResourceContent(g){try{const{content:d}=await this.fileSystem.readFile(g.toString());return d.toString()}catch{return""}}async modifyConfigurationsInResource(g,d,u){const E=await this.fileSystem.getFileStat(g.toString());if(E&&E.type===_.FileType.File){const{formData:f}=d,c=await this.readResourceContent(g),b=r.parse(c)[s];if(!b)return;Array.isArray(b)&&b.length-1>=u&&b.splice(u,1,f);const A=r.modify(c,[s],b,{isArrayInsertion:!1,formattingOptions:{tabSize:2,insertSpaces:!0,eol:`
33899
33899
  `}}),S=r.applyEdits(c,A);await this.fileSystem.setContent(E,S)}}};t.LaunchService=h,n.__decorate([(0,l.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],h.prototype,"fileSystem",void 0),n.__decorate([(0,l.Autowired)(_.CommandService),n.__metadata("design:type",Object)],h.prototype,"commandService",void 0),t.LaunchService=h=n.__decorate([(0,l.Injectable)()],h)},67858:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaunchViewContainer=void 0;const n=e(85608),r=e(67030),o=n.__importDefault(e(17932)),l=n.__importDefault(e(53373)),v=n.__importDefault(e(46123)),_=n.__importDefault(e(97331)),m=n.__importStar(e(14041)),p=n.__importDefault(e(19686)),s=e(97267),h=e(41869),a=e(81878),g=e(25918),d=e(1237),u=e(85084),E=e(53670),f=e(60709),c=e(70159),y=e(37499),b=e(5905),A=e(53741),S=e(93306),w=e(32475),I=e(59299),D=e(66216),T=e(81638),R=e(20023),M=n.__importDefault(e(52402)),O=e(24650),x=e(77874),k=e(27953),F=e(44115),L=e(51773),N=e(67481),U=e(5062),W=e(74447),j=e(56551),Q=({resource:V})=>{const{uri:H}=V,K=(0,h.useInjectable)(h.IJSONSchemaRegistry),Y=(0,h.useInjectable)(y.DebugConfigurationManager),Z=(0,h.useInjectable)(c.ILaunchService),oe=(0,h.useInjectable)(h.CommandService),[ie,he]=(0,m.useState)(0),[me,q]=(0,m.useState)(),[be,fe]=(0,m.useState)([]);(0,m.useEffect)(()=>{const Te=new h.Disposable;return Te.addDispose(K.onDidChangeSchema(We=>{We===f.launchExtensionSchemaUri&&ge(K.getSchemaContributions())})),Te.addDispose(Y.onDidChange(async()=>{Re()})),ge(K.getSchemaContributions()),Re(),()=>Te.dispose()},[]);const te=(0,m.useMemo)(()=>H.withScheme(h.Schemes.file),[H]),ge=(0,m.useCallback)(Te=>{const We=Te.schemas[f.launchExtensionSchemaUri];We&&q(We)},[me]),Re=(0,m.useCallback)(()=>{const Te=Y.all;Array.isArray(Te)&&fe(Te.map(We=>new O.ConfigurationItemsModel(We.configuration.name,We.configuration)))},[]),Oe=(0,m.useMemo)(()=>me?(0,v.default)(me,["properties","configurations","items","defaultSnippets"])||[]:[],[me]),Le=(0,m.useCallback)((Te,We)=>{const{configuration:pe}=Te;pe&&he(We)},[]),Ne=(0,m.useMemo)(()=>{if(be&&!(0,h.isUndefined)(ie)){const Te=be[ie];if(!Te)return;const{configuration:We,description:pe,label:re}=Te;return We?{body:We,description:pe,label:re}:void 0}},[be,ie]),De=(0,m.useCallback)(async Te=>{const{configuration:We}=Te;await Y.insertConfiguration(te,We),oe.executeCommand(h.EDITOR_COMMANDS.SAVE_URI.id,te)},[Oe]),Ce=(0,_.default)(async(Te,We)=>await Z.modifyConfigurationsInResource(te,Te,We),100),ke=(0,m.useCallback)(async Te=>{const{formData:We}=Te;!We||(0,h.isUndefined)(ie)||Ce(Te,ie)},[ie,Ne]);return m.default.createElement(s.ComponentContextProvider,{value:{getIcon:h.getIcon,localize:h.localize}},m.default.createElement("div",{className:M.default.launch_container},m.default.createElement(a.SplitPanel,{id:"launch-container",resizeHandleClassName:M.default.devider,className:M.default.launch_panel,direction:"left-to-right"},m.default.createElement(G,{"data-sp-defaultSize":240,"data-sp-minSize":150,inputConfigurationItems:be,snippetItems:Oe,onSelectedConfiguration:Le,onAddConfigurationItems:De,currentConfigurationIndex:ie}),m.default.createElement($,{"data-sp-flex":1,snippetItem:Ne,schemaContributions:me,onChange:ke}))))};t.LaunchViewContainer=Q;const G=({snippetItems:V,onSelectedConfiguration:H,onAddConfigurationItems:K,inputConfigurationItems:Y,currentConfigurationIndex:Z})=>{const oe=(0,h.useInjectable)(c.ILaunchService),[ie,he]=m.default.useState(!1),[me,q]=(0,m.useState)(Y);(0,m.useEffect)(()=>{if(me.length===0&&(0,h.isUndefined)(Z))return;const Oe=me[Z];Oe&&Oe.configuration&&oe.nextNewFormData(Oe.configuration,!1)},[Z,me]),(0,m.useEffect)(()=>{q([...Y])},[Y]);const be=(0,m.useCallback)((Oe,Le)=>{H(Oe,Le)},[]),fe=({data:Oe,index:Le})=>m.default.createElement("div",{key:Le,className:(0,l.default)(M.default.configuration_item,Z===Le?M.default.selected:""),onClick:()=>be(Oe,Le)},m.default.createElement("div",{className:M.default.configuration_wrapper},m.default.createElement("span",{className:M.default.configuration_description},Oe.label))),te=(0,m.useCallback)(Oe=>{he(!1);const{label:Le}=Oe,Ne=V.find(Te=>Te.label===Le);if(!Ne)return;const{body:De}=Ne;if(!(0,h.isObject)(De))return;const Ce=Object.keys(De).reduce((Te,We)=>{const pe=De[We];return typeof pe=="string"?Te[We]=(0,b.parseSnippet)(pe):Array.isArray(pe)&&(Te[We]=pe.map(re=>typeof re=="string"?(0,b.parseSnippet)(re):re)),Te},De),ke=new O.ConfigurationItemsModel(Ne.label,Ce);ke.setDescription(Ne.description||""),K(ke)},[me,V]),ge=Oe=>{he(Oe)},Re=(0,m.useMemo)(()=>m.default.createElement(g.MenuActionList,{data:V.map(Oe=>new d.LabelMenuItemNode(Oe.label)),afterClick:Oe=>te(Oe)}),[V,me]);return m.default.createElement("div",{className:M.default.launch_indexes_container},m.default.createElement(p.default,{className:M.default.configuration_items_box},({width:Oe,height:Le})=>me.length===0?m.default.createElement("div",{style:{width:Oe},className:M.default.not_configuration_content},(0,h.localize)("debug.action.no.configuration")):m.default.createElement(s.RecycleList,{width:Oe,height:Le,data:me,template:fe})),m.default.createElement("div",{className:M.default.foot_box},m.default.createElement(s.Button,{className:M.default.button,placement:"topCenter",menu:Re,moreVisible:ie,onVisibleChange:ge},(0,h.localize)("debug.action.add.configuration"))))},X=(0,r.withTheme)({widgets:{TextWidget:R.TextWidget,SelectWidget:T.SelectWidget,CheckboxWidget:A.CheckboxWidget},fields:{ObjectField:I.ObjectField}}),$=({snippetItem:V,schemaContributions:H,onChange:K})=>{if(!V)return m.default.createElement("div",{className:M.default.no_onfiguration},(0,h.localize)("debug.action.no.configuration"));const Y=(0,h.useInjectable)(c.ILaunchService),Z=(0,m.useMemo)(()=>{const he=(0,u.acquireAjv)(),q=((0,v.default)(H,["properties","configurations","items","oneOf"])||[]).find(be=>{const{body:fe}=V;return he.validate(be,fe)});if(q)return Y.setRawSchemaProperties(q),q},[V,H]),oe=(0,m.useMemo)(()=>{if(!(Z&&Z.properties))return;const{label:he,body:me,description:q}=V,{properties:be,required:fe}=Z,te=Object.keys(me).reduce((Re,Oe)=>{const Le=be[Oe];return Le?.type===f.JSON_SCHEMA_TYPE.ARRAY&&(0,h.isUndefined)(Le?.items)&&(Le.items={type:f.JSON_SCHEMA_TYPE.STRING}),Array.isArray(Le?.type)&&(Le.type=Le.type[0]||f.JSON_SCHEMA_TYPE.STRING),Array.isArray(Le?.anyOf)&&(Le.anyOf=Le.anyOf.filter(Ne=>Object.keys(Ne).length>0)),Le?.type===f.JSON_SCHEMA_TYPE.OBJECT&&!(0,h.isUndefined)(Le?.additionalProperties)&&(Le.additionalProperties={type:f.JSON_SCHEMA_TYPE.STRING}),Le?.type===f.JSON_SCHEMA_TYPE.OBJECT&&!(0,h.isUndefined)(Le?.properties)&&Object.keys(Le.properties).length>6&&(Le.properties={},Le[E.MASSIVE_PROPERTY_FLAG]=!0),!Le?.description&&Le?.markdownDescription&&(Le.description=Le.markdownDescription),Re[Oe]=Le,Re},{}),ge={title:he,type:f.JSON_SCHEMA_TYPE.OBJECT,required:fe,description:q,properties:te};return Y.nextNewSchema(ge),ge},[V,Z]),ie=(0,m.useCallback)(he=>{if(!(Z&&Z.properties)||!(oe&&oe.properties))return;const{label:me}=he;Y.addNewItem(me)},[V,Z,oe]);return m.default.createElement("div",{className:M.default.launch_schema_body_container},oe&&Z&&m.default.createElement(X,{formData:V.body,schema:oe,validator:o.default,fields:{AnyOfField:S.AnyOfField,OneOfField:S.AnyOfField,ArrayField:w.ArrayField},onChange:K,templates:{ArrayFieldTemplate:F.ArrayFieldTemplate,ArrayFieldItemTemplate:k.ArrayFieldItemTemplate,DescriptionFieldTemplate:U.DescriptionFieldTemplate,FieldTemplate:W.FieldTemplate,ObjectFieldTemplate:j.ObjectFieldTemplate,WrapIfAdditionalTemplate:x.WrapIfAdditionalTemplate,BaseInputTemplate:L.BaseInputTemplate,TitleFieldTemplate:D.TitleField,ButtonTemplates:{MoveUpButton:N.MoveUpButton,MoveDownButton:N.MoveDownButton,RemoveButton:N.RemoveButton,SubmitButton:he=>m.default.createElement(N.AddItemButton,{...he,onAddClick:ie}),AddButton:N.AddButton,CopyButton:N.CopyButton}}}))}},24650:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationItemsModel=void 0;const n=e(43718);class r{get uniqueID(){return this._uniqueID}get description(){return this._description}constructor(l,v){this.label=l,this.configuration=v,this._uniqueID=(0,n.uuid)(6)}setDescription(l){this._description=l}}t.ConfigurationItemsModel=r},77874:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WrapIfAdditionalTemplate=void 0;const n=e(85608),r=e(51632),o=n.__importStar(e(14041)),l=e(97267),v=e(41869),_=e(43718),m=e(64582),p=e(44888),s=n.__importDefault(e(40043)),h=a=>{const{children:g,classNames:d,style:u,disabled:E,id:f,label:c,onKeyChange:y,onDropPropertyClick:b,readonly:A,registry:S,schema:w}=a,I=(0,v.useInjectable)(p.LaunchService),{readonlyAsDisabled:D=!0}=S.formContext,{templates:T}=S,{RemoveButton:R}=T.ButtonTemplates,M=r.ADDITIONAL_PROPERTY_FLAG in w,O=m.MASSIVE_PROPERTY_FLAG in w,x=(0,r.getTemplate)("TitleFieldTemplate",S),k=(0,r.getTemplate)("DescriptionFieldTemplate",S),F=(0,o.useMemo)(()=>w.description||w.markdownDescription,[w]),L=(0,o.useCallback)(async()=>{await I.openLaunchConfiguration()},[]);if(O)return o.default.createElement("div",{className:d,style:u},c&&o.default.createElement("div",{className:s.default.object_title},o.default.createElement(x,{id:(0,r.titleId)(f),title:c,schema:w,registry:S})),F&&o.default.createElement("div",{className:s.default.object_description},o.default.createElement(k,{id:(0,r.descriptionId)(f),description:F,schema:w,registry:S})),o.default.createElement("div",{className:s.default.control_wrap},o.default.createElement("a",{onClick:L},(0,_.localize)("debug.launch.view.edit.inLaunchJson"))));if(!M)return o.default.createElement("div",{className:d,style:u},g);const N=(0,o.useCallback)(({target:U})=>y(U.value),[y]);return o.default.createElement("div",{className:d,style:u},o.default.createElement("div",{className:s.default.additional_field_template},o.default.createElement("div",{className:s.default.form_additional_container},o.default.createElement("div",{className:s.default.form_additional},o.default.createElement(l.Input,{className:s.default.form_control,defaultValue:c,value:c,placeholder:(0,_.formatLocalize)("debug.launch.view.template.input.placeholder","Key"),disabled:E||D&&A,id:`${f}-key`,name:`${f}-key`,onBlur:A?void 0:N,type:"text"})),o.default.createElement("div",{className:s.default.form_additional_children},g),o.default.createElement(R,{disabled:E||A,onClick:b(c),registry:S}))))};t.WrapIfAdditionalTemplate=h},27953:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayFieldItemTemplate=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=n.__importDefault(e(40043)),v={width:"100%"},_={width:"calc(100% / 4)"},m=p=>{const{className:s,children:h,disabled:a,hasCopy:g,hasMoveDown:d,hasMoveUp:u,hasRemove:E,hasToolbar:f,index:c,onCopyIndexClick:y,onDropIndexClick:b,onReorderClick:A,readonly:S,registry:w}=p,{CopyButton:I,MoveDownButton:D,MoveUpButton:T,RemoveButton:R}=w.templates.ButtonTemplates,M=(0,o.useMemo)(()=>y(c),[c,y]),O=(0,o.useMemo)(()=>b(c),[c,b]),x=(0,o.useMemo)(()=>A(c,c-1),[c,A]),k=(0,o.useMemo)(()=>A(c,c+1),[c,A]);return o.default.createElement("div",{key:`array-item-${c}`,className:(0,r.default)(s,l.default.array_field_item_template)},o.default.createElement("div",{className:l.default.control_field},o.default.cloneElement(h,{name:""})),f&&o.default.createElement("div",{className:l.default.toolbar},o.default.createElement("div",{style:v},(u||d)&&o.default.createElement(T,{disabled:a||S||!u,onClick:x,style:_,registry:w}),(u||d)&&o.default.createElement(D,{disabled:a||S||!d,onClick:k,style:_,registry:w}),g&&o.default.createElement(I,{disabled:a||S,onClick:M,style:_,registry:w}),E&&o.default.createElement(R,{disabled:a||S,onClick:O,style:_,registry:w}))))};t.ArrayFieldItemTemplate=m},44115:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayFieldTemplate=void 0;const n=e(85608),r=e(51632),o=n.__importDefault(e(53373)),l=n.__importDefault(e(14041)),v=n.__importDefault(e(40043)),_=m=>{const{canAdd:p,className:s,disabled:h,formContext:a,idSchema:g,items:d,onAddClick:u,readonly:E,registry:f,required:c,schema:y,title:b,uiSchema:A}=m,S=(0,r.getUiOptions)(A),w=(0,r.getTemplate)("ArrayFieldDescriptionTemplate",f,S),I=(0,r.getTemplate)("ArrayFieldItemTemplate",f,S),D=(0,r.getTemplate)("ArrayFieldTitleTemplate",f,S),{ButtonTemplates:{AddButton:T}}=f.templates;return l.default.createElement("fieldset",{className:(0,o.default)(s),id:g.$id},l.default.createElement("div",{className:v.default.array_field_template},(S.title||b)&&l.default.createElement("div",{className:v.default.array_item_label},l.default.createElement(D,{idSchema:g,required:c,title:S.title||b,schema:y,uiSchema:A,registry:f})),(S.description||y.description)&&l.default.createElement("div",{className:v.default.array_item_description},l.default.createElement(w,{description:S.description||y.description,idSchema:g,schema:y,uiSchema:A,registry:f})),d&&d.map(({key:R,...M})=>l.default.createElement(I,{key:R,...M})),p&&l.default.createElement("div",{className:v.default.array_item_add},l.default.createElement(T,{disabled:h||E,onClick:u,registry:f}))))};t.ArrayFieldTemplate=_},51773:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseInputTemplate=void 0;const n=e(85608),r=e(51632),o=n.__importDefault(e(14041)),l=e(97267),v={width:"100%"},_=m=>{const{disabled:p,formContext:s,id:h,onBlur:a,onChange:g,onChangeOverride:d,onFocus:u,options:E,placeholder:f,readonly:c,schema:y,value:b,type:A}=m,S=(0,r.getInputProps)(y,A,E,!1),{readonlyAsDisabled:w=!0}=s,I=O=>g(O),D=d||(({target:O})=>g(O.value===""?E.emptyValue:O.value)),T=({target:O})=>a(h,O.value),R=({target:O})=>u(h,O.value),M=o.default.createElement(l.Input,{disabled:p||w&&c,id:h,name:h,onBlur:c?void 0:T,onChange:c?void 0:D,onFocus:c?void 0:R,placeholder:f,style:v,list:y.examples?(0,r.examplesId)(h):void 0,...S,value:b,"aria-describedby":(0,r.ariaDescribedByIds)(h,!!y.examples)});return o.default.createElement(o.default.Fragment,null,M,Array.isArray(y.examples)&&o.default.createElement("datalist",{id:(0,r.examplesId)(h)},y.examples.concat(y.default&&!y.examples.includes(y.default)?[y.default]:[]).map(O=>o.default.createElement("option",{key:O,value:O}))))};t.BaseInputTemplate=_},67481:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddItemButton=t.CopyButton=t.AddButton=t.RemoveButton=t.MoveDownButton=t.MoveUpButton=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(81139),v=e(41869),_=e(25918),m=e(1237),p=e(43718),s=e(64582),h=n.__importDefault(e(40043)),a=c=>r.default.createElement(o.Button,{...c,type:"primary",icon:l.defaultIconfont.arrowup},r.default.createElement("span",{className:(0,o.getIcon)(l.defaultIconfont.arrowup)}));t.MoveUpButton=a;const g=c=>r.default.createElement(o.Button,{...c,type:"primary",icon:l.defaultIconfont.arrowdown},r.default.createElement("span",{className:(0,o.getIcon)(l.defaultIconfont.arrowdown)}));t.MoveDownButton=g;const d=c=>r.default.createElement(o.Button,{...c,type:"danger",icon:l.defaultIconfont.delete},r.default.createElement("span",{className:(0,o.getIcon)(l.defaultIconfont.delete)}));t.RemoveButton=d;const u=c=>r.default.createElement(o.Button,{...c,type:"primary",icon:l.defaultIconfont.plus},r.default.createElement("span",{className:(0,o.getIcon)(l.defaultIconfont.plus)})," ",(0,p.localize)("debug.launch.view.template.button.addItem"));t.AddButton=u;const E=c=>r.default.createElement(o.Button,{...c,type:"primary",icon:l.defaultIconfont["file-copy"]},r.default.createElement("span",{className:(0,o.getIcon)(l.defaultIconfont["file-copy"])}));t.CopyButton=E;const f=c=>{const{registry:{rootSchema:y},onAddClick:b}=c,A=(0,v.useInjectable)(s.ILaunchService),[S,w]=r.default.useState(!1),[I,D]=r.default.useState([]),{rawSchemaProperties:T}=A,R=(0,r.useCallback)(x=>w(x),[]),M=(0,r.useCallback)(x=>{w(!1),b(x)},[]),O=(0,r.useCallback)(()=>{const{properties:x}=T,{properties:k}=y;if(!x||!k)return;const F=Object.keys(x).filter(L=>!Object.hasOwn(k,L)).map(L=>new m.LabelMenuItemNode(L));D(F)},[y,T]);return(0,r.useEffect)(()=>{const x=new p.Disposable;return x.addDispose(A.onChangeSchema(()=>{requestAnimationFrame(()=>{O()})})),O(),()=>x.dispose()},[T,y]),r.default.createElement(o.Button,{type:"secondary",icon:l.defaultIconfont.plus,className:h.default.add_new_field,menu:r.default.createElement(_.MenuActionList,{afterClick:M,data:I,style:{maxHeight:600}}),moreVisible:S,onVisibleChange:R},r.default.createElement("span",{className:(0,o.getIcon)(l.defaultIconfont.plus)})," ",(0,p.localize)("debug.launch.view.template.button.submit"))};t.AddItemButton=f},5062:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DescriptionFieldTemplate=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=n.__importDefault(e(40043)),l=v=>{const{id:_,schema:m}=v,p=(0,r.useMemo)(()=>{var s;return(s=m.description)!==null&&s!==void 0?s:m.markdownDescription},[m,m.description,m.markdownDescription]);return p?r.default.createElement("span",{id:_,className:o.default.description_field_template},p):null};t.DescriptionFieldTemplate=l},74447:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldTemplate=void 0;const n=e(85608),r=e(51632),o=n.__importDefault(e(53373)),l=n.__importDefault(e(14041)),v=_=>{const{classNames:m,style:p,children:s,id:h,schema:a,label:g,hidden:d,formContext:u,uiSchema:E,registry:f,disabled:c,onDropPropertyClick:y,onKeyChange:b,required:A,readonly:S}=_,{wrapperStyle:w}=u,I=(0,r.getUiOptions)(E),D=(0,r.getTemplate)("WrapIfAdditionalTemplate",f,I);return d?null:l.default.createElement(D,{classNames:m,style:p,disabled:c,id:h,label:g,onDropPropertyClick:y,onKeyChange:b,readonly:S,required:A,schema:a,uiSchema:E,registry:f},h==="root"?s:l.default.createElement("div",{className:(0,o.default)(m),style:w},s))};t.FieldTemplate=v},56551:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectFieldTemplate=void 0;const n=e(85608),r=e(51632),o=n.__importDefault(e(53373)),l=n.__importStar(e(14041)),v=e(97267),_=e(41869),m=e(70159),p=n.__importDefault(e(40043)),s=a=>{const{schema:g,uiSchema:d,formData:u}=a,{properties:E}=g;return E?Object.keys(E).length===0?!0:Object.values(E).some(f=>f[r.ADDITIONAL_PROPERTY_FLAG])?(0,r.canExpand)(g,d,u):!1:!1},h=a=>{const{schema:g,uiSchema:d,required:u,registry:E,idSchema:f,title:c,disabled:y,readonly:b,properties:A,onAddClick:S}=a,w=(0,_.useInjectable)(m.ILaunchService),I=(0,r.getUiOptions)(d),D=(0,r.getTemplate)("TitleFieldTemplate",E,I),T=(0,r.getTemplate)("DescriptionFieldTemplate",E,I),{ButtonTemplates:{AddButton:R}}=E.templates,M=(0,l.useMemo)(()=>{var L;return(L=a.description)!==null&&L!==void 0?L:g.markdownDescription},[a.description,g]),O=(0,l.useMemo)(()=>f.$id==="root"?(0,o.default)(p.default.object_field_container,p.default.root_object_field_container):p.default.object_field_container,[f]),x=(0,l.useMemo)(()=>f.$id==="root"?(0,o.default)(p.default.property_wrapper,p.default.root_property_wrapper):p.default.property_wrapper,[f]),k=(0,l.useCallback)(L=>{const{name:N}=L;w.delItem(N)},[]),F=(0,l.useCallback)(L=>{const{rawSchemaProperties:N}=w;if(!N)return null;const U=N.required||[];return l.default.createElement("div",{key:L.name,className:x,onKeyDown:W=>{W.key===_.Key.ENTER.code&&(W.preventDefault(),W.stopPropagation())}},L.content,U.includes(L.name)||f.$id!=="root"?null:l.default.createElement("div",{className:p.default.wrapper_delete,onClick:()=>k(L)},l.default.createElement("span",{className:(0,o.default)((0,v.getIcon)("close-circle"),p.default.close_icon)})))},[A,w.rawSchemaProperties,f]);return l.default.createElement("div",{className:p.default.object_field_template},l.default.createElement("fieldset",null,l.default.createElement("div",{className:O},c&&l.default.createElement("div",{className:p.default.object_title},l.default.createElement(D,{id:(0,r.titleId)(f),title:c,required:u,schema:g,uiSchema:d,registry:E})),M&&l.default.createElement("div",{className:p.default.object_description},l.default.createElement(T,{id:(0,r.descriptionId)(f),description:M,schema:g,uiSchema:d,registry:E})),A.filter(L=>!L.hidden).map(L=>F(L))),s(a)&&l.default.createElement(R,{onClick:S(g),disabled:y||b,registry:E})))};t.ObjectFieldTemplate=h},81450:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnsiConsoleNode=t.TreeWithLinkWrapper=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=n.__importDefault(e(43144)),v=e(97267),_=e(41869),m=n.__importDefault(e(80315)),p=a=>{if(typeof a>"u")return(0,r.default)(m.default.variable_repl_text,m.default.log);switch(a){case _.MessageType.Error:return(0,r.default)(m.default.variable_repl_text,m.default.error);case _.MessageType.Warning:return(0,r.default)(m.default.variable_repl_text,m.default.warn);case _.MessageType.Info:return(0,r.default)(m.default.variable_repl_text,m.default.info);default:return(0,r.default)(m.default.variable_repl_text,m.default.log)}};class s extends o.default.Component{componentDidMount(){if(this.props.html){const g=l.default.findDOMNode(this);g?.appendChild(this.props.html)}}render(){return o.default.createElement("code",{className:this.props.className})}}t.TreeWithLinkWrapper=s;class h extends v.TreeNode{get parent(){return this._compositeTreeNode}static is(g){return!!g&&!!g.template}constructor(g,d,u,E,f,c,y){var b;super({},d),this.description=g,this._compositeTreeNode=d,this.linkDetector=u,this.ansiNode=E,this.severity=f,this.source=c,this.line=y,this.linkDetectorHTML=(b=this.ansiNode)!==null&&b!==void 0?b:this.linkDetector.linkify(this.description)}get name(){return`log_${this.id}`}get el(){return this.linkDetectorHTML}get template(){return()=>o.default.createElement(s,{className:p(this.severity),html:this.linkDetectorHTML})}}t.AnsiConsoleNode=h},98650:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugHoverVariableRoot=t.DebugVariableRoot=t.DebugWatchRoot=t.DebugConsoleRoot=t.DebugConsoleNode=t.DebugConsoleVariableContainer=t.DebugWatchNode=t.DebugScope=t.DebugVariableContainer=t.DebugVariable=t.DebugVirtualVariable=t.ExpressionContainer=t.ExpressionNode=t.DebugConsoleTreeService=t.ExpressionTreeService=void 0;const n=e(97267),r=e(41869),o=e(55121),l=e(44781),v="undefined";class _{constructor(w,I,D){this.session=w,this.source=I,this.line=D}async resolveChildren(w){var I;return b.is(w)&&!w.variablesReference&&!w.presetChildren?await((I=this.session)===null||I===void 0?void 0:I.getScopes(w))||[]:await this.doResolve(w)}async doResolve(w){const I=[];if(!w)return I;if(Array.isArray(w.presetChildren))return w.presetChildren;if(!this.session||this.session.terminated)return I;const{variablesReference:D,startOfVariables:T,indexedVariables:R,namedVariables:M}=w;if(M)return await this.fetch(I,D,"named",w),I;if(R){let O=s.BASE_CHUNK_SIZE;for(;R>O*s.BASE_CHUNK_SIZE;)O*=s.BASE_CHUNK_SIZE;if(R>O){const x=Math.ceil(R/O);for(let k=0;k<x;k++){const F=w.startOfVariables+k*O,L=Math.min(O,R-k*O);I.push(new h({session:this.session,variablesReference:w.variablesReference,namedVariables:0,indexedVariables:L,startOfVariables:F,name:`[${F}..${F+L-1}]`},w))}return I}}return await this.fetch(I,D,"indexed",w,T,R),I}async fetch(w,I,D,T,R,M){try{const O=await this.session.sendRequest("variables",{variablesReference:I,filter:D,start:R,count:M}),{variables:x}=O.body;for(const k of x)k.variablesReference?w.push(new g(this.session,k,T,this.source,this.line)):w.push(new a(this.session,k,T))}catch(O){w.push({severity:r.MessageType.Error,visible:!!O.message,message:O.message})}}sortComparator(w,I){return 0}}t.ExpressionTreeService=_;class m extends _{sortComparator(w,I){return 0}}t.DebugConsoleTreeService=m;class p extends n.TreeNode{constructor(w,I){var D;super(new _(w.session,w.source,w.line),I,void 0,{name:String((D=w.session)===null||D===void 0?void 0:D.id)}),this.variablesReference=w.variablesReference||0,this.namedVariables=w.namedVariables,this.indexedVariables=w.indexedVariables,this.memoryReference=w.memoryReference,this.source=w.source,this.line=w.line}get badge(){return this.source?`${this.source.name}:${this.line}`:""}get displayName(){return this.name}}t.ExpressionNode=p;class s extends n.CompositeTreeNode{constructor(w,I,D,T){var R;super(D||new _(w.session,w.source,w.line),I,void 0,{name:T||((R=w.session)===null||R===void 0?void 0:R.id)}),this.session=w.session,this.variablesReference=w.variablesReference||0,this.namedVariables=w.namedVariables,this.indexedVariables=w.indexedVariables,this.startOfVariables=w.startOfVariables||0,this.memoryReference=w.memoryReference,this.source=w.source,this.line=w.line}get badge(){return this.source?`${this.source.name}:${this.line}`:""}get displayName(){return this.name}get path(){return this.parent?new o.Path(this.parent.path).join(String(this.id)).toString():String(this.id)}}t.ExpressionContainer=s,s.BASE_CHUNK_SIZE=100;class h extends s{constructor(w,I){super(w,I,void 0,w.name),this._name=w.name}}t.DebugVirtualVariable=h;class a extends p{constructor(w,I,D){super({session:w,variablesReference:I.variablesReference,namedVariables:I.namedVariables,indexedVariables:I.indexedVariables,memoryReference:I.memoryReference},D),this.session=w,this.variable=I}get variableMenuContext(){return this.variable.__vscodeVariableMenuContext||""}toDebugProtocolObject(){return{name:this.name,variablesReference:this.variable.variablesReference||0,value:this.value,evaluateName:this.evaluateName,memoryReference:this.memoryReference}}get name(){if(this.variable){if(this.variable.name)return this.variable.name;if(this.variable.evaluateName){const w=/\["(.+)"]/.exec(this.variable.evaluateName);if(w)return w[1];{const I=this.variable.evaluateName.split(".");return I[I.length-1]}}}return String(this.id)}get evaluateName(){var w;return((w=this.variable)===null||w===void 0?void 0:w.evaluateName)||""}get description(){return this.value||v}get value(){return this._value||this.variable.value}get variableType(){return this._type||this.variable.type}get supportSetVariable(){return!!this.session&&!!this.session.capabilities.supportsSetVariable}async setValue(w){if(!this.session||this.session.terminated)return;const{name:I,parent:D}=this,T=D.variablesReference;try{const R=await this.session.sendRequest("setVariable",{variablesReference:T,name:I,value:w});this._value=R.body.value,this._type=R.body.type,this.variablesReference=R.body.variablesReference||0,this.namedVariables=R.body.namedVariables,this.indexedVariables=R.body.indexedVariables}catch(R){throw R}}getRawScope(){let w=this.parent;for(;w!==void 0&&!(w instanceof d);)w=w?.parent;return w.getRawScope()}}t.DebugVariable=a;class g extends s{constructor(w,I,D,T,R){super({session:w,variablesReference:I.variablesReference,namedVariables:I.namedVariables,indexedVariables:I.indexedVariables,memoryReference:I.memoryReference,source:T,line:R},D,void 0,I?.name||(I.evaluateName?/\["(.+)"]/.exec(I.evaluateName)?/\["(.+)"]/.exec(I.evaluateName)[1]:I.evaluateName.split(".")[I.evaluateName.split(".").length-1]:"")),this.session=w,this.variable=I}get variableMenuContext(){return this.variable.__vscodeVariableMenuContext||""}toDebugProtocolObject(){return{name:this.name,variablesReference:this.variable.variablesReference||0,value:this.value,evaluateName:this.evaluateName,memoryReference:this.memoryReference}}get name(){if(this.variable){if(this.variable.name)return this.variable.name;if(this.variable.evaluateName){const w=/\["(.+)"]/.exec(this.variable.evaluateName);if(w)return w[1];{const I=this.variable.evaluateName.split(".");return I[I.length-1]}}}return this.variable.type||String(this.id)}get evaluateName(){var w;return((w=this.variable)===null||w===void 0?void 0:w.evaluateName)||""}get description(){return this._value||this.variable.value||v}get tooltip(){return this.variableType||this.description}get variableType(){return this._variableType||this.variable.type}get value(){return this._value||this.variable.value}get supportSetVariable(){return!!this.session&&!!this.session.capabilities.supportsSetVariable}async setValue(w){if(!this.session||this.session.terminated)return;const{name:I,parent:D}=this;if(!D)return;const T=D.variablesReference,R=await this.session.sendRequest("setVariable",{variablesReference:T,name:I,value:w});this._value=R.body.value,this._variableType=R.body.type,this.variablesReference=R.body.variablesReference||0,this.namedVariables=R.body.namedVariables,this.indexedVariables=R.body.indexedVariables}getRawScope(){let w=this.parent;for(;w!==void 0&&!(w instanceof d);)w=w?.parent;return w.getRawScope()}}t.DebugVariableContainer=g,g.BOOLEAN_REGEX=/^true|false$/i,g.STRING_REGEX=/^(['"]).*\1$/;class d extends s{constructor(w,I,D){super({session:I,variablesReference:w.variablesReference,namedVariables:w.namedVariables,indexedVariables:w.indexedVariables},D,void 0,w.name),this.raw=w,this.session=I}getRawScope(){return this.raw}range(){const w=this.getRawScope();return w.line&&w.column&&w.endLine&&w.endColumn?new l.Range(w.line,w.column,w.endLine,w.endColumn):void 0}}t.DebugScope=d;class u extends s{static is(w){return!!w&&!!w.expression}constructor(w,I,D){super({session:w},D,void 0,I),this.session=w,this.expression=I}get description(){return this._available?this._description||v:u.notAvailable}get available(){return this._available}getRawWatch(){return this.raw}async evaluate(w="watch"){if(this.session)try{this._available=!0;const{expression:I}=this,D=await this.session.evaluate(I,w);D&&(this.name=this.expression,this._description=D.result,this.variablesReference=D.variablesReference,this.namedVariables=D.namedVariables,this.indexedVariables=D.indexedVariables,this.memoryReference=D.memoryReference,this.raw=D)}catch(I){this.name=this.expression,this._description=I.message}else this.name=this.expression,this._available=!1}async getClipboardValue(){if(this.session&&this.session.capabilities.supportsValueFormattingOptions)try{const{expression:w}=this,I=await this.session.evaluate(w,"clipboard");if(I)return I.result}catch{return""}else return this._description}}t.DebugWatchNode=u,u.notAvailable=(0,r.localize)("debug.watch.notAvailable");class E extends g{static is(w){return!!w&&w.uniqueID===E.uniqueID}get uniqueID(){return E.uniqueID}get description(){return this.variable?this.variable.value:v}get tooltip(){return this.variable?this.variable.value:""}}t.DebugConsoleVariableContainer=E,E.uniqueID="DebugConsoleVariable";class f extends s{static is(w){return!!w&&!!w.expression}get available(){return this._available}constructor(w,I,D){super(w,D,void 0,I),this.options=w,this.expression=I,this._description=v}get description(){return this._description}async evaluate(w="repl"){const{expression:I}=this;if(this.session)try{if(typeof I=="string"&&I){const D=await this.session.evaluate(I,w);D&&(this.name=I,this._description=D.result,this.variablesReference=D.variablesReference,this.namedVariables=D.namedVariables,this.indexedVariables=D.indexedVariables,this.memoryReference=D.memoryReference,this._available=!0)}else if(this.options.variablesReference){const D=await this.session.variables(this.options.variablesReference);D.variables.length&&(this.name=D.variables.map(T=>T.value).join(`
33900
33900
  `),this._description="",this._available=!0)}}catch(D){this._available=!1,this.name=I,this._description=D.message}else this._available=!1,this.name=I}}t.DebugConsoleNode=f;class c extends s{static is(w){return!!w&&!w.parent}constructor(w,I=[]){super({session:w},void 0,new m(w)),this.session=w,this.presetChildren=I}get expanded(){return!0}updatePresetChildren(w){this.presetChildren=w}}t.DebugConsoleRoot=c;class y extends s{static is(w){return!!w&&!w.parent}constructor(w,I=[]){super({session:w},void 0),this.session=w,this.presetChildren=I}get expanded(){return!0}updatePresetChildren(w){this.presetChildren=w}}t.DebugWatchRoot=y;class b extends g{static is(w){return!!w&&!w.parent}constructor(w){super(w,{},void 0),this.session=w}get expanded(){return!0}}t.DebugVariableRoot=b;class A extends s{constructor(w,I){super({session:I}),this.expression=w,this.session=I,this._value="",this._available=!1}get name(){return this._value}get available(){return this._available}async evaluate(w="repl"){if(this.session)try{const{expression:I}=this,D=await this.session.evaluate(I,w);D&&(this._value=D.result,this._available=!0,this.variablesReference=D.variablesReference,this.namedVariables=D.namedVariables,this.indexedVariables=D.indexedVariables,this.memoryReference=D.memoryReference)}catch(I){this._value=I.message,this._available=!1}else this._value="Please start a debug session to evaluate",this._available=!1}}t.DebugHoverVariableRoot=A},16170:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(98650),t),n.__exportStar(e(81450),t)},57332:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointsTreeNode=void 0;const n=e(43718),r=e(99797);class o{constructor(v,_){this.label="",this._onDescriptionChange=new n.Emitter;const{breakpoint:m}=_;this._uri=v,this.label=(0,r.isDebugBreakpoint)(m)?v.displayName:"",this.rawData=_,this.rawData.onDescriptionChange=this._onDescriptionChange.event}get breakpoint(){return this.rawData.breakpoint}get uri(){return this._uri}fireDescriptionChange(v){this.rawData.description=v,this._onDescriptionChange.fire(v)}}t.BreakpointsTreeNode=o},97319:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugBreakpointsService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),v=e(54414),_=e(57517),m=e(28423),p=e(51500),s=e(26199),h=e(64582),a=e(26296),g=e(99797),d=e(38029),u=e(32756),E=e(57332);let f=class extends o.WithEventBus{get inputEditor(){return this._inputEditor}constructor(){super(),this._onDidChangeBreakpointsTreeNode=new o.Emitter,this.onDidChangeBreakpointsTreeNode=this._onDidChangeBreakpointsTreeNode.event,this._onDidFocusedBreakpoints=new o.Emitter,this.onDidFocusedBreakpoints=this._onDidFocusedBreakpoints.event,this.treeNodeMap=new Map,this.enable=(0,m.observableValue)(this,!1),this.inDebugMode=(0,m.observableValue)(this,!1),this.toggleBreakpointEnable=y=>{if((0,g.isDebugBreakpoint)(y)){const b=this.breakpoints.getBreakpoint(o.URI.parse(y.uri),{lineNumber:y.raw.line,column:y.raw.column});b&&(b.enabled=!b.enabled,this.breakpoints.updateBreakpoint(b))}(0,g.isDebugExceptionBreakpoint)(y)&&this.breakpoints.updateExceptionBreakpoints(y.filter,!y.default)},this.init()}launchFocusedBreakpoints(y){this._onDidFocusedBreakpoints.fire(y)}async init(){await this.updateRoots(),this.workspaceService.onWorkspaceChanged(async()=>{this.updateRoots(),this.updateBreakpoints()}),this.breakpoints.onDidChangeBreakpoints(()=>{this.updateBreakpoints()}),this.breakpoints.onDidChangeExceptionsBreakpoints(()=>{this.updateBreakpoints()}),this.breakpoints.whenReady.then(()=>{this.updateBreakpoints()}),this.contextKeyService.onDidChangeContext(y=>{y.payload.affectsSome(new Set([h.CONTEXT_IN_DEBUG_MODE_KEY]))&&(0,m.transaction)(b=>{this.inDebugMode.set(this.contextKeyService.getContextKeyValue(h.CONTEXT_IN_DEBUG_MODE_KEY)||!1,b)})})}getBreakpointDecoration(y,b=!1,A=!0){return new g.DebugDecorator().getDecoration(y,b,A)}onRenameFile(y){this.removeBreakpoints(y.payload.oldUri)}onDeleteFile(y){this.removeBreakpoints(y.payload.oldUri)}removeBreakpoints(y){this.breakpoints.cleanAllMarkers(y),this.updateBreakpoints()}async updateRoots(){(0,m.transaction)(b=>{this.enable.set(this.breakpoints.breakpointsEnabled,b),this.inDebugMode.set(this.contextKeyService.getContextKeyValue(h.CONTEXT_IN_DEBUG_MODE_KEY)||!1,b)});const y=await this.workspaceService.roots;this.roots=y.map(b=>new o.URI(b.uri))}extractNodes(y){if((0,g.isDebugBreakpoint)(y))return{id:y.id,name:"",description:"",onDescriptionChange:o.Event.None,breakpoint:y};if((0,g.isDebugExceptionBreakpoint)(y))return{id:y.filter,name:y.label,onDescriptionChange:o.Event.None,description:"",breakpoint:y}}async updateBreakpoints(){await this.breakpoints.whenReady,this.treeNodeMap.clear(),[...this.breakpoints.getExceptionBreakpoints(),...this.breakpoints.getBreakpoints()].forEach(b=>{const A=this.extractNodes(b);if(A){const S=(0,g.isDebugBreakpoint)(b)?o.URI.parse(b.uri):g.EXCEPTION_BREAKPOINT_URI,w=this.treeNodeMap.get(S.toString())||[];w.push(new E.BreakpointsTreeNode(S,A)),this.treeNodeMap.set(S.toString(),w)}}),this._onDidChangeBreakpointsTreeNode.fire(this.treeNodeMap)}async getDocumentModelRef(y){const b=this.documentService.getModelReference(y);return b||this.documentService.createModelReference(y)}async refreshBreakpointsInfo(){const y=this.treeNodeMap.values(),b=Array.from(y).reduce((A,S)=>A.concat(S),[]);for await(const A of b){const{rawData:S,uri:w}=A;if((0,g.isDebugBreakpoint)(S.breakpoint)){const I=S.breakpoint.raw.line,D=await this.getDocumentModelRef(w);if(!D)return;const T=D.instance.getMonacoModel(),R=T.getLineCount();if(I>R)return;const M=T.getLineContent(I);A.fireDescriptionChange(M.trim()),D.dispose()}}}removeAllBreakpoints(){this.breakpoints.clearBreakpoints()}delBreakpoint(y){this.breakpoints.delBreakpoint(y)}toggleBreakpoints(){this.breakpoints.breakpointsEnabled=!this.breakpoints.breakpointsEnabled,(0,m.transaction)(y=>{this.enable.set(this.breakpoints.breakpointsEnabled,y)}),this.enable.get()?this.reporterService.point(h.DEBUG_REPORT_NAME===null||h.DEBUG_REPORT_NAME===void 0?void 0:h.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,"enabled"):this.reporterService.point(h.DEBUG_REPORT_NAME===null||h.DEBUG_REPORT_NAME===void 0?void 0:h.DEBUG_REPORT_NAME.DEBUG_BREAKPOINT,"unenabled")}async createBreakpointInput(y){this._inputEditor=await this.editorService.createCodeEditor(y,{...(0,v.getSimpleEditorOptions)(),lineHeight:21,scrollbar:{horizontal:"hidden",vertical:"hidden",handleMouseWheel:!1},acceptSuggestionOnEnter:"on",renderIndentGuides:!1});const A=(await this.documentService.createModelReference(new o.URI("debug/breakpoint/expression/input").withScheme(o.Schemes.walkThroughSnippet))).instance.getMonacoModel();return A.updateOptions({tabSize:2}),this._inputEditor.monacoEditor.setModel(A),Promise.resolve(this.inputEditor)}};t.DebugBreakpointsService=f,n.__decorate([(0,r.Autowired)(u.DebugViewModel),n.__metadata("design:type",u.DebugViewModel)],f.prototype,"model",void 0),n.__decorate([(0,r.Autowired)(p.IWorkspaceService),n.__metadata("design:type",Object)],f.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(g.BreakpointManager),n.__metadata("design:type",g.BreakpointManager)],f.prototype,"breakpoints",void 0),n.__decorate([(0,r.Autowired)(a.IDebugSessionManager),n.__metadata("design:type",d.DebugSessionManager)],f.prototype,"sessions",void 0),n.__decorate([(0,r.Autowired)(l.LabelService),n.__metadata("design:type",l.LabelService)],f.prototype,"labelProvider",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],f.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],f.prototype,"reporterService",void 0),n.__decorate([(0,r.Autowired)(v.EditorCollectionService),n.__metadata("design:type",v.EditorCollectionService)],f.prototype,"editorService",void 0),n.__decorate([(0,r.Autowired)(_.IEditorDocumentModelService),n.__metadata("design:type",Object)],f.prototype,"documentService",void 0),n.__decorate([(0,o.OnEvent)(s.WorkspaceEditDidRenameFileEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.WorkspaceEditDidRenameFileEvent]),n.__metadata("design:returntype",void 0)],f.prototype,"onRenameFile",null),n.__decorate([(0,o.OnEvent)(s.WorkspaceEditDidDeleteFileEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.WorkspaceEditDidDeleteFileEvent]),n.__metadata("design:returntype",void 0)],f.prototype,"onDeleteFile",null),t.DebugBreakpointsService=f=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],f)},85347:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointItem=t.BreakpointFileItem=t.DebugBreakpointView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),v=e(41869),_=n.__importStar(e(20868)),m=e(64582),p=e(99797),s=n.__importDefault(e(96547)),h=e(97319),a=({viewState:u})=>{const E=(0,v.useInjectable)(h.DebugBreakpointsService),f=(0,o.useRef)(!1),[c,y]=(0,o.useState)([]),{enable:b,inDebugMode:A,toggleBreakpointEnable:S}=E,w=(0,v.useAutorun)(b),I=(0,v.useAutorun)(A),D=R=>{const{data:M,inDebugMode:O,breakpointEnabled:x}=R;if((0,p.isDebugBreakpoint)(M.breakpoint)){if(!(O?(0,p.isDebugBreakpoint)(M.breakpoint)&&(0,p.isRuntimeBreakpoint)(M.breakpoint):!0))return"sumi-debug-breakpoint-unverified";const{className:F}=E.getBreakpointDecoration(M.breakpoint,O,x);return F}return""},T=(0,o.useCallback)(R=>{const{roots:M}=E,O=[];R.forEach(([x,k],F)=>{var L;if(p.EXCEPTION_BREAKPOINT_URI.toString()===x)k.forEach((U,W)=>{O.push({label:"",order:F*100+W,expandable:!1,twisterPlaceholderClassName:s.default.tree_item_twister_placeholder_fill,children:[],description:o.default.createElement(t.BreakpointItem,{toggle:()=>S(U.breakpoint),data:U.rawData})})});else{const U=v.URI.parse(x),W=M.filter(G=>G.isEqualOrParent(U))[0],j=W?((L=W.relative(U))===null||L===void 0?void 0:L.toString())||"":v.URI.parse(x).displayName,Q=k.map(G=>G.breakpoint);O.push({label:j,order:F,twisterClassName:s.default.tree_item_twister,renderLabel:o.default.createElement(t.BreakpointFileItem,{label:j,breakpointItems:Q,title:U.toString()}),expandable:!0,expanded:!0,children:k.map(G=>({...G,label:"",expandable:!1,twisterClassName:s.default.tree_item_twister,twisterPlaceholderClassName:s.default.tree_item_twister_placeholder,breakpoint:G.breakpoint,iconClassName:(0,r.default)(D({data:G.rawData,inDebugMode:I,breakpointEnabled:w}),s.default.debug_breakpoints_icon),description:o.default.createElement(t.BreakpointItem,{toggle:()=>S(G.breakpoint),data:G.rawData})}))})}}),f.current||y(O)},[c]);return(0,o.useEffect)(()=>{const R=new v.Disposable;return T(Array.from(E.treeNodeMap.entries())),R.addDispose(E.onDidChangeBreakpointsTreeNode(M=>{T(Array.from(M.entries()))})),()=>{f.current=!0,R.dispose()}},[]),(0,o.useEffect)(()=>{c.length>0&&requestAnimationFrame(()=>{E.refreshBreakpointsInfo()})},[c]),o.default.createElement("div",{className:(0,r.default)(s.default.debug_breakpoints,!w&&s.default.debug_breakpoints_disabled)},o.default.createElement(l.BasicRecycleTree,{onIconClick:(R,M)=>{M.raw.breakpoint&&S(M.raw.breakpoint)},sortComparator:(R,M)=>{if(typeof R.order<"u"&&typeof M.order<"u")return R.order>M.order?1:R.order<M.order?-1:0},indent:18,baseIndent:8,treeData:c,height:u.height}))};t.DebugBreakpointView=a;const g=({label:u,title:E,breakpointItems:f})=>{const c=(0,v.useInjectable)(h.DebugBreakpointsService),y=(0,o.useMemo)(()=>f.some(I=>I.enabled),[f]),[b,A]=o.default.useState(y),S=(0,o.useCallback)(I=>{f.filter(T=>T.enabled===I).forEach(T=>{c.toggleBreakpointEnable(T)}),A(!b)},[b]),w=(0,o.useCallback)(I=>{I.stopPropagation(),f.forEach(D=>{c.delBreakpoint(D)})},[]);return o.default.createElement("div",{className:s.default.debug_breakpoints_file_item},o.default.createElement("div",{className:s.default.file_item_control},o.default.createElement(l.CheckBox,{className:(0,r.default)(s.default.debug_breakpoints_icon,s.default.file_item_checkbox),onChange:()=>S(b),checked:b}),o.default.createElement("i",{className:(0,r.default)((0,v.getIcon)("file-text"),s.default.file_item_icon,s.default.debug_breakpoints_icon)}),o.default.createElement("span",{title:E},u)),o.default.createElement("div",{className:s.default.file_item_control_right},o.default.createElement("i",{className:(0,r.default)((0,v.getIcon)("close"),s.default.close_icon),onClick:I=>w(I)})))};t.BreakpointFileItem=g;const d=({data:u,toggle:E})=>{const f=(0,p.isDebugBreakpoint)(u.breakpoint)?u.breakpoint.enabled:!!u.breakpoint.default,c=(0,v.useInjectable)(m.IDebugSessionManager),y=(0,v.useInjectable)(v.CommandService),b=(0,v.useInjectable)(h.DebugBreakpointsService),[A,S]=o.default.useState(f),[w,I]=o.default.useState(void 0),[D,T]=o.default.useState(u.description),R=(0,o.useMemo)(()=>{const L={preview:!0,focus:!0};if(!(0,p.isDebugBreakpoint)(u.breakpoint))return L;if(w)L.range={startColumn:w.column||0,endColumn:w.column||0,startLineNumber:w.line,endLineNumber:w.line};else{const{raw:N}=u.breakpoint;L.range={startColumn:N.column||0,endColumn:N.column||0,startLineNumber:N.line,endLineNumber:N.line}}return L},[w,u.breakpoint]),M=()=>{E(),S(!A)},O=async()=>{u.breakpoint.uri&&(await y.executeCommand(v.EDITOR_COMMANDS.OPEN_RESOURCE.id,new v.URI(u.breakpoint.uri),R),b.launchFocusedBreakpoints({uri:new v.URI(u.breakpoint.uri),range:R.range}))};o.default.useEffect(()=>{const L=new v.Disposable,N=()=>{if((0,p.isDebugBreakpoint)(u.breakpoint)&&(0,p.isRuntimeBreakpoint)(u.breakpoint)){const U=(0,p.getStatus)(u.breakpoint);I(U)}};return L.addDispose(c.onDidChangeActiveDebugSession(()=>N())),N(),L.addDispose(u.onDescriptionChange(T)),()=>{I(void 0),L.dispose()}},[]);const x=L=>{L.stopPropagation(),b.delBreakpoint(u.breakpoint)},k=async L=>{L.stopPropagation(),await y.executeCommand(v.EDITOR_COMMANDS.OPEN_RESOURCE.id,new v.URI(u.breakpoint.uri),R);const{range:N}=R,U=new _.Position(N?.startLineNumber||1,N?.startColumn||1);await y.executeCommand(m.DEBUG_COMMANDS.EDIT_BREAKPOINT.id,U)},F=(0,o.useMemo)(()=>D?o.default.createElement("span",{className:s.default.debug_breakpoints_description},D):(0,p.isDebugBreakpoint)(u.breakpoint)?o.default.createElement("span",{className:(0,r.default)(s.default.debug_breakpoints_description,s.default.blank)},`< ${(0,v.localize)("debug.breakpoint.blank")} >`):null,[D,u.breakpoint]);return o.default.createElement("div",{className:(0,r.default)(s.default.debug_breakpoints_item)},o.default.createElement(l.CheckBox,{className:s.default.debug_breakpoints_icon,id:u.id,onChange:M,checked:A}),o.default.createElement("div",{className:s.default.debug_breakpoints_wrapper,onClick:O},u.name&&o.default.createElement("span",{className:s.default.debug_breakpoints_name},u.name),F),(0,p.isDebugBreakpoint)(u.breakpoint)?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:s.default.debug_breakpoints_item_control},R.range&&o.default.createElement("i",{title:(0,v.localize)("debug.menu.edit.breakpoint"),onClick:L=>k(L),className:(0,r.default)(s.default.debug_edit_breakpoints_icon,(0,v.getExternalIcon)("edit"))}),o.default.createElement("i",{title:(0,v.localize)("debug.menu.delete.breakpoint"),onClick:L=>x(L),className:(0,r.default)(s.default.debug_remove_breakpoints_icon,(0,v.getIcon)("close"))})),o.default.createElement(l.Badge,{className:s.default.debug_breakpoints_badge},u.breakpoint.raw.line,!!u.breakpoint.raw.column&&`:${u.breakpoint.raw.column}`)):null)};t.BreakpointItem=d},16067:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConfigurationService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(28423),v=e(51500),_=e(68810),m=e(64582),p=e(26296),s=e(37499),h=e(38029),a=e(35199),g=e(32756);let d=class{constructor(){this.currentValue=(0,l.observableValue)(this,m.DEFAULT_ADD_CONFIGURATION_KEY),this.float=(0,l.observableValue)(this,!1),this.configurationOptions=(0,l.observableValue)(this,[]),this.dynamicConfigurations=(0,l.observableValue)(this,[]),this.isMultiRootWorkspace=(0,l.observableValue)(this,!1),this.workspaceRoots=(0,l.observableValue)(this,[]),this.start=async()=>{const E=this.debugConfigurationManager.current;E?this.debugSessionManager.start(E):this.debugConfigurationManager.addConfiguration()},this.openConfiguration=()=>{const{current:E}=this.debugConfigurationManager,f=E?.workspaceFolderUri;this.debugConfigurationManager.openConfiguration(f)},this.openLaunchEditor=()=>{this.debugConfigurationManager.openLaunchEditor()},this.openDebugConsole=()=>{this.debugConsoleService.activate()},this.addConfiguration=E=>{this.debugConfigurationManager.addConfiguration(typeof E=="string"?E:void 0)},this.getLaunchUri=()=>{const E=this.workspaceVariables.getWorkspaceRootUri();return new o.URI(E.toString()).resolve(`${this.preferenceConfigurations.getPaths()[0]}/launch.json`)},this.insertConfiguration=E=>{this.debugConfigurationManager.insertConfiguration(this.getLaunchUri(),E)},this.showDynamicQuickPickToInsert=async()=>{const E=await this.debugConfigurationManager.showDynamicConfigurationsTypesQuickPick();if(E){const f=await this.debugConfigurationManager.showDynamicConfigurationsQuickPick(E);f&&this.insertConfiguration(f)}},this.getDynamicSupportTypes=async()=>await this.debugConfigurationManager.getDynamicConfigurationsSupportTypes(),this.updateConfiguration=(E,f,c)=>{this.debugConfigurationManager.current=this.debugConfigurationManager.find(E,f,c)},this.showDynamicQuickPick=async E=>{const f=await this.debugConfigurationManager.showDynamicConfigurationsQuickPick(E);f&&this.debugSessionManager.start({configuration:f,workspaceFolderUri:this.workspaceRoots.get()[0],index:-1})},this.toName=({configuration:E,workspaceFolderUri:f})=>!f||!this.workspaceService.isMultiRootWorkspaceEnabled?E.name:E.name+" ("+new o.URI(f).path.base+")",this._whenReady=this.init()}get whenReady(){return this._whenReady}async init(){await this.debugConfigurationManager.whenReady,await this.updateConfigurationOptions(),this.debugConfigurationManager.onDidChange(async()=>{this.updateConfigurationOptions()}),this.preferenceService.onPreferenceChanged(E=>{const{preferenceName:f,newValue:c}=E;f==="debug.toolbar.float"&&this.float.get()!==c&&this.updateFloat(c)}),this.eventBus.on(m.DebugConfigurationsReadyEvent,()=>{this.updateDynamicConfigurations()}),await this.updateWorkspaceState(),this.workspaceService.onWorkspaceChanged(async()=>{await this.updateWorkspaceState()}),this.updateFloat(!!this.preferenceService.get("debug.toolbar.float"))}async updateWorkspaceState(){const E=(await this.workspaceService.tryGetRoots()).map(f=>f.uri);(0,l.transaction)(f=>{this.isMultiRootWorkspace.set(this.workspaceService.isMultiRootWorkspaceOpened,f),this.workspaceRoots.set(E,f)})}async updateDynamicConfigurations(){const E=await this.debugConfigurationManager.getDynamicConfigurationsSupportTypes();(0,l.transaction)(f=>{this.dynamicConfigurations.set(E,f)})}updateFloat(E){this.float.set(E,void 0)}updateCurrentValue(E){(0,l.transaction)(f=>{this.currentValue.set(E,f)})}async updateConfigurationOptions(){(0,l.transaction)(f=>{this.configurationOptions.set(this.debugConfigurationManager.all,f)});const{current:E}=this.debugConfigurationManager;if(E){const f=this.toValue(E);this.updateCurrentValue(f)}else this.updateCurrentValue(m.DEFAULT_ADD_CONFIGURATION_KEY);this.updateDynamicConfigurations()}toValue({configuration:E,workspaceFolderUri:f,index:c}){if(!f)return E.name;if((0,o.isUndefined)(c)){const y=this.debugConfigurationManager.find(E.name,f);return y&&y.index?this.toValue(y):this.currentValue.get()}return E.name+m.DEFAULT_CONFIGURATION_NAME_SEPARATOR+f+m.DEFAULT_CONFIGURATION_INDEX_SEPARATOR+c}};t.DebugConfigurationService=d,n.__decorate([(0,r.Autowired)(v.IWorkspaceService),n.__metadata("design:type",Object)],d.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(s.DebugConfigurationManager),n.__metadata("design:type",s.DebugConfigurationManager)],d.prototype,"debugConfigurationManager",void 0),n.__decorate([(0,r.Autowired)(p.IDebugSessionManager),n.__metadata("design:type",h.DebugSessionManager)],d.prototype,"debugSessionManager",void 0),n.__decorate([(0,r.Autowired)(g.DebugViewModel),n.__metadata("design:type",g.DebugViewModel)],d.prototype,"debugViewModel",void 0),n.__decorate([(0,r.Autowired)(a.DebugConsoleService),n.__metadata("design:type",a.DebugConsoleService)],d.prototype,"debugConsoleService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],d.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(_.WorkspaceVariableContribution),n.__metadata("design:type",_.WorkspaceVariableContribution)],d.prototype,"workspaceVariables",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceConfigurations),n.__metadata("design:type",o.PreferenceConfigurations)],d.prototype,"preferenceConfigurations",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],d.prototype,"eventBus",void 0),t.DebugConfigurationService=d=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],d)},20676:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugControllerView=t.DebugConfigurationContainerView=t.DebugActionBar=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=e(41869),_=e(77331),m=e(64582),p=e(66498),s=n.__importDefault(e(90463)),h=e(16067),a=e(84784),g=o.default.memo(({currentValue:E,options:f,dynamicOptions:c,onChangeConfiguration:y,isMultiRootWorkspace:b,addConfigurationLabel:A,editConfigurationLabel:S,toValue:w,workspaceRoots:I,isElectronRenderer:D})=>{const T=o.default.useCallback(O=>O&&O.length?O.map((x,k)=>{const F=b?`${x.configuration.name} (${new v.URI(x.workspaceFolderUri).displayName})`:x.configuration.name;return D?o.default.createElement("option",{key:k,value:w(x),label:F},F):o.default.createElement(l.Option,{key:k,value:w(x),label:F},F)}):D?[o.default.createElement("option",{value:m.DEFAULT_NO_CONFIGURATION_KEY,key:m.DEFAULT_NO_CONFIGURATION_KEY,label:(0,v.localize)("debug.action.no.configuration")},(0,v.localize)("debug.action.no.configuration"))]:[o.default.createElement(l.Option,{value:m.DEFAULT_NO_CONFIGURATION_KEY,key:m.DEFAULT_NO_CONFIGURATION_KEY,label:(0,v.localize)("debug.action.no.configuration")},(0,v.localize)("debug.action.no.configuration"))],[b]),R=o.default.useCallback(()=>{if(b){let O=A;const x=I.map((F,L)=>{const N=`${A} (${new v.URI(F).displayName})`;return O.length<N.length&&(O=N),D?o.default.createElement("option",{value:`${m.DEFAULT_ADD_CONFIGURATION_KEY}${L}`,key:`${m.DEFAULT_ADD_CONFIGURATION_KEY}${L}`,label:N},N):o.default.createElement(l.Option,{value:`${m.DEFAULT_ADD_CONFIGURATION_KEY}${L}`,key:`${m.DEFAULT_ADD_CONFIGURATION_KEY}${L}`,label:N},N)});return(D?[o.default.createElement("option",{disabled:!0,key:"--",value:O.replace(/./g,"-")},O.replace(/./g,"-"))]:[o.default.createElement(l.Option,{disabled:!0,key:"--",value:"",className:s.default.select_divider_container})]).concat(x)}else{const O=A;return D?[o.default.createElement("option",{disabled:!0,key:"--",value:O.replace(/./g,"-")},O.replace(/./g,"-")),o.default.createElement("option",{value:m.DEFAULT_ADD_CONFIGURATION_KEY,key:m.DEFAULT_ADD_CONFIGURATION_KEY,label:O},O),o.default.createElement("option",{value:m.DEFAULT_EDIT_CONFIGURATION_KEY,key:m.DEFAULT_EDIT_CONFIGURATION_KEY,label:S},S)]:[o.default.createElement(l.Option,{disabled:!0,key:"--",value:O.replace(/./g,"-"),className:s.default.select_divider_container}),o.default.createElement(l.Option,{value:m.DEFAULT_ADD_CONFIGURATION_KEY,key:m.DEFAULT_ADD_CONFIGURATION_KEY,label:O},O),o.default.createElement(l.Option,{value:m.DEFAULT_EDIT_CONFIGURATION_KEY,key:m.DEFAULT_EDIT_CONFIGURATION_KEY,label:S},S)]}},[b,A]),M=o.default.useCallback(O=>{if(!b&&O&&O.length)return O.map(k=>{const F=k.label||k.type,L=`${m.DEFAULT_DYNAMIC_CONFIGURATION_KEY}${k.type}`,{popupHint:N}=k;return D?o.default.createElement("option",{key:L,value:L,label:F},F):o.default.createElement(l.Option,{key:L,value:L,label:F},N?o.default.createElement(l.Popover,{id:`debug_configuration_pop_${L}`,title:N,overlayClassName:s.default.config_popover_insert},F):F)})},[b,c]);return D?o.default.createElement(_.Select,{value:E,onChange:y,className:(0,r.default)(s.default.debug_selection,s.default.special_radius)},T(f),R(),c&&M(c)):o.default.createElement(l.Select,{value:E,onChange:y,className:(0,r.default)(s.default.debug_selection,s.default.special_radius),allowOptionsOverflow:!0},T(f),R(),c&&M(c))});t.DebugActionBar=o.default.memo(({runDebug:E,openConfiguration:f,openDebugConsole:c})=>o.default.createElement("div",{className:s.default.debug_actions},o.default.createElement(p.DebugAction,{id:"debug.action.start",icon:"start",label:(0,v.localize)("debug.action.start"),run:E}),o.default.createElement(p.DebugAction,{id:"debug.action.open.configuration",icon:"setting",label:(0,v.localize)("debug.action.open.configuration"),run:f}),o.default.createElement(p.DebugAction,{id:"debug.action.debug.console",icon:"terminal",label:(0,v.localize)("debug.action.debug.console"),run:c})));const d=()=>{const E=(0,v.useInjectable)(h.DebugConfigurationService),f=(0,v.useAutorun)(E.float);return o.default.createElement(o.default.Fragment,null,o.default.createElement(t.DebugControllerView,{className:s.default.debug_configuration_container}),!f&&o.default.createElement(a.DebugToolbarView,{float:!1,className:s.default.debug_action_bar_internal}))};t.DebugConfigurationContainerView=d;const u=E=>{const{toValue:f,openConfiguration:c,addConfiguration:y,openDebugConsole:b,updateConfiguration:A,start:S,showDynamicQuickPick:w,currentValue:I,configurationOptions:D,dynamicConfigurations:T,isMultiRootWorkspace:R,workspaceRoots:M}=(0,v.useInjectable)(h.DebugConfigurationService),O=(0,v.useAutorun)(T),x=(0,v.useAutorun)(I),k=(0,v.useAutorun)(D),F=(0,v.useAutorun)(R),L=(0,v.useAutorun)(M),N=(0,v.useInjectable)(v.AppConfig),U=(0,v.localize)("debug.action.add.configuration"),W=(0,v.localize)("debug.action.edit.configuration"),{CustomActionBar:j}=E,Q=o.default.useCallback(G=>{let X;if(typeof G=="object"?X=G.target.value:X=G,X.startsWith(m.DEFAULT_ADD_CONFIGURATION_KEY)||X===m.DEFAULT_NO_CONFIGURATION_KEY){const $=X.slice(m.DEFAULT_ADD_CONFIGURATION_KEY.length);y($?M[$]:M[0])}else if(X===m.DEFAULT_EDIT_CONFIGURATION_KEY)c();else if(X.startsWith(m.DEFAULT_DYNAMIC_CONFIGURATION_KEY)){const $=X.slice(m.DEFAULT_DYNAMIC_CONFIGURATION_KEY.length);w($)}else{const[$,V]=X.split(m.DEFAULT_CONFIGURATION_NAME_SEPARATOR),[H,K]=V.split(m.DEFAULT_CONFIGURATION_INDEX_SEPARATOR);A($,H,+K)}},[]);return o.default.createElement("div",{className:(0,r.default)(s.default.debug_configuration_toolbar,E.className||"")},o.default.createElement(g,{currentValue:x,options:k,dynamicOptions:O,workspaceRoots:L,isMultiRootWorkspace:F,onChangeConfiguration:Q,addConfigurationLabel:U,editConfigurationLabel:W,toValue:f,isElectronRenderer:N.isElectronRenderer}),j?o.default.createElement(j,null):o.default.createElement(t.DebugActionBar,{runDebug:S,openConfiguration:c,openDebugConsole:b}))};t.DebugControllerView=u},96090:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugToolbarService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),v=e(37406),_=e(28423),m=e(64582),p=e(32756);let s=class{constructor(){this.state=(0,_.observableValue)(this,m.DebugState.Inactive),this.currentSession=(0,_.observableValue)(this,void 0),this.sessions=(0,_.observableValue)(this,[]),this.toolBarMenuMap=new Map,this.doStart=async()=>await this.model.start(),this.doRestart=async()=>{const a=this.instrumentReporter("restart"),g=await this.model.restart();return a(),g},this.doStop=async()=>{if(!this.model.currentSession)return;const a=this.instrumentReporter("stop"),g=await this.model.currentSession.terminate();return a(),g},this.doContinue=async()=>{if(!this.model.currentThread)return;const a=this.instrumentReporter("continue"),g=await this.model.currentThread.continue();return a(),g},this.doPause=async()=>{if(!this.model.currentThread)return;const a=this.instrumentReporter("pause"),g=await this.model.currentThread.pause();return a(),g},this.doStepOver=async()=>{if(!this.model.currentThread)return;const a=this.instrumentReporter("stepOver"),g=await this.model.currentThread.stepOver();return a(),g},this.doStepIn=async()=>{if(!this.model.currentThread)return;const a=this.instrumentReporter("stepIn"),g=await this.model.currentThread.stepIn();return a(),g},this.doStepOut=async()=>{if(!this.model.currentThread)return;const a=this.instrumentReporter("stepOut"),g=await this.model.currentThread.stepOut();return a(),g},this.updateCurrentSession=a=>{this.model.currentSession=a},this.model.onDidChange(()=>{this.updateToolBarMenu(),this.updateModel()})}get mainUIService(){return this.injector.get(v.IElectronMainUIService)}updateModel(){(0,_.transaction)(a=>{this.state.set(this.model.state,a),this.currentSession.set(this.model.currentSession,a),this.sessions.set(Array.from(this.model.sessions).filter(g=>g&&g.state>m.DebugState.Inactive),a)})}updateToolBarMenu(){const a=this.currentSession.get();if(a&&a.id&&!this.toolBarMenuMap.has(a.id)){const g=this.contextMenuService.createMenu({id:l.MenuId.DebugToolBar,contextKeyService:this.contextKeyService.createScoped()});a.on("terminated",()=>{this.toolBarMenuMap.delete(a.id)}),this.toolBarMenuMap.set(a.id,g)}}instrumentReporter(a){var g,d,u,E;const f=this.model.currentSession,c=(g=f.configuration)===null||g===void 0?void 0:g.type,y=this.model.currentThread,b=(d=y?.raw)===null||d===void 0?void 0:d.id;this.model.reportAction(f.id,b,a);const A={type:c,request:(E=(u=this.currentSession.get())===null||u===void 0?void 0:u.configuration)===null||E===void 0?void 0:E.request,sessionId:f.id,threadId:b};this.model.report(m.DEBUG_REPORT_NAME.DEBUG_TOOLBAR_OPERATION,a,A);const S=this.model.reportTime(m.DEBUG_REPORT_NAME.DEBUG_TOOLBAR_OPERATION_TIME,A);return()=>{S(a)}}};t.DebugToolbarService=s,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],s.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(l.AbstractContextMenuService),n.__metadata("design:type",l.AbstractContextMenuService)],s.prototype,"contextMenuService",void 0),n.__decorate([(0,r.Autowired)(p.DebugViewModel),n.__metadata("design:type",p.DebugViewModel)],s.prototype,"model",void 0),n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],s.prototype,"reporterService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],s.prototype,"injector",void 0),n.__decorate([o.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],s.prototype,"mainUIService",null),t.DebugToolbarService=s=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],s)},84784:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugToolbarOverlayWidget=t.DebugToolbarView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(76003),v=e(97267),_=e(41869),m=e(25918),p=e(77331),s=e(1149),h=e(28423),a=e(64582),g=e(66498),d=e(5905),u=n.__importDefault(e(90463)),E=e(16067),f=e(96090);let c=class{constructor(){this._x=(0,h.observableValue)(this,0),this._line=(0,h.observableValue)(this,0),this._enable=(0,h.observableValue)(this,!1),this.y=0,this.last=0,this.origin=0,this.state=(0,h.derived)(this,D=>({enable:this._enable.read(D),x:this._x.read(D),line:this._line.read(D)}))}setEnable(D){(0,h.transaction)(T=>{this._enable.set(D,T)})}onMouseDown(D){this.setEnable(!0),this.y=D.clientY,this.origin=D.clientX}onMouseMove(D){D.stopPropagation(),(0,h.transaction)(T=>{this._enable.get()&&(this._x.set(D.clientX-this.origin+this.last,T),this._line.set(D.clientY-this.y>10?1:0,T))})}onMouseUp(){this.setEnable(!1),this.last=this._x.get()}};c=n.__decorate([(0,l.Injectable)()],c);const y=I=>{var D;const{state:T,toolBarMenuMap:R,doStop:M,doStepIn:O,doStepOut:x,doStepOver:k,doContinue:F,doRestart:L,doPause:N,currentSession:U,sessions:W,updateCurrentSession:j}=(0,_.useInjectable)(f.DebugToolbarService),Q=(0,_.useAutorun)(T),G=(0,_.useAutorun)(U),X=(0,_.useAutorun)(W),{isElectronRenderer:$}=(0,_.useInjectable)(_.AppConfig),V=!!G&&((D=G.configuration)===null||D===void 0?void 0:D.request)==="attach"&&!(0,d.isExtensionHostDebugging)(G.configuration),H=G&&G.id,K=(0,o.useCallback)(me=>{if(me&&me.id){const q=R.get(me.id);if(q)return o.default.createElement(m.InlineMenuBar,{menus:q})}return null},[R]),Y=(0,o.useCallback)(me=>V?o.default.createElement(g.DebugAction,{run:M,enabled:me!==a.DebugState.Inactive,icon:"disconnect",label:(0,_.localize)("debug.action.disattach")}):o.default.createElement(g.DebugAction,{run:M,enabled:me!==a.DebugState.Inactive,icon:"stop",label:(0,_.localize)("debug.action.stop")}),[M]),Z=(0,o.useCallback)(me=>me===a.DebugState.Stopped?o.default.createElement(g.DebugAction,{run:F,icon:"continue",label:(0,_.localize)("debug.action.continue")}):o.default.createElement(g.DebugAction,{run:N,enabled:Q===a.DebugState.Running,icon:"pause",label:(0,_.localize)("debug.action.pause")}),[N,F]),oe=(0,o.useCallback)(me=>me.map(q=>$?o.default.createElement("option",{key:q.id,value:q.id},q.label):o.default.createElement(v.Option,{key:q.id,label:q.label,value:q.id},q.label)),[]),ie=(0,o.useCallback)(me=>{if(me.length>1)return o.default.createElement("div",{className:(0,r.default)(u.default.debug_selection)},$?o.default.createElement(p.Select,{value:H,onChange:he},oe(me)):o.default.createElement(v.Select,{className:(0,r.default)(u.default.debug_selection,u.default.special_radius),size:I.float?"small":"default",value:H,options:me.map(q=>({label:q.label,value:q.id})),onChange:he},oe(me)))},[H]),he=(0,o.useCallback)(me=>{let q=me;if($&&(q=me.target.value),!!X)for(const be of X)be.id===q&&j(be)},[X,j]);return o.default.createElement("div",{className:(0,r.default)(u.default.debug_action_bar,I.className||"")},ie(X.filter(me=>!me.parentSession)),o.default.createElement("div",{className:u.default.debug_actions},Z(Q),o.default.createElement(g.DebugAction,{run:k,enabled:Q===a.DebugState.Stopped,icon:"step",label:(0,_.localize)("debug.action.step-over")}),o.default.createElement(g.DebugAction,{run:O,enabled:Q===a.DebugState.Stopped,icon:"step-in",label:(0,_.localize)("debug.action.step-into")}),o.default.createElement(g.DebugAction,{run:x,enabled:Q===a.DebugState.Stopped,icon:"step-out",label:(0,_.localize)("debug.action.step-out")}),o.default.createElement(g.DebugAction,{run:L,enabled:Q!==a.DebugState.Inactive,icon:"reload",label:(0,_.localize)("debug.action.restart")}),Y(Q),K(G)))};t.DebugToolbarView=y;const b="debug.toolbar.top",A="debug.toolbar.height",S=()=>{const I=(0,_.useInjectable)(_.PreferenceService),{isElectronRenderer:D}=(0,_.useInjectable)(_.AppConfig),T=(0,_.useInjectable)(s.LayoutViewSizeConfig),R=(0,_.useDesignStyles)(u.default.debug_toolbar_wrapper,"debug_toolbar_wrapper"),[M,O]=(0,o.useState)(0),x=(0,_.useInjectable)(c),k=(0,_.useAutorun)(x.state),F=(0,_.useInjectable)(f.DebugToolbarService),L=(0,_.useAutorun)(F.state);(0,o.useEffect)(()=>{const W=new _.DisposableCollection,j=I.get(b)||0;if(D){const Q=F.mainUIService;Q.isFullScreen(_.electronEnv.currentWindowId).then(G=>{O(G?j:j+T.calcOnlyTitleBarHeight())}),W.push(Q.on("fullScreenStatusChange",(G,X)=>{G===_.electronEnv.currentWindowId&&O(X?j:j+T.calcOnlyTitleBarHeight())}))}else O(j);return()=>{W.dispose()}},[]);const N=I.get(A)||0,U=(0,r.default)({[R]:!0,[u.default.debug_toolbar_wrapper_electron]:D});return L?o.default.createElement("div",{style:{pointerEvents:k.enable?"all":"none"},className:u.default.debug_toolbar_container,onMouseMove:W=>x.onMouseMove(W),onMouseUp:W=>x.onMouseUp()},o.default.createElement("div",{style:{transform:`translateX(${k.x}px) translateY(${M+k.line*N}px)`,height:`${N}px`},className:U},o.default.createElement("div",{className:(0,r.default)(u.default.debug_toolbar_drag_wrapper)},o.default.createElement("div",{className:(0,r.default)((0,_.getIcon)("drag"),u.default.debug_toolbar_drag),onMouseDown:W=>x.onMouseDown(W),onMouseMove:W=>x.onMouseMove(W)})),o.default.createElement(t.DebugToolbarView,{float:!0}))):(x.setEnable(!1),null)},w=()=>{const I=(0,_.useInjectable)(E.DebugConfigurationService);return(0,_.useAutorun)(I.float)?o.default.createElement(S,null):null};t.DebugToolbarOverlayWidget=w},53378:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleFilterModel=void 0;const r=e(85608),o=e(76003),l=e(41869);let v=n=class{constructor(){this._parsedQueries=[]}set filterQuery(m){if(this._parsedQueries=[],m=m.trim(),m&&m!==""){const p=(0,l.splitGlobAware)(m,",").map(s=>s.trim()).filter(s=>!!s.length);for(const s of p)s.startsWith("!")?this._parsedQueries.push({type:"exclude",query:s.slice(1)}):this._parsedQueries.push({type:"include",query:s})}}filter(m){let p=!1,s=!1;for(const{type:h,query:a}of this._parsedQueries){if(h==="exclude"&&n.matchQuery(a,m))return!1;h==="include"&&(p=!0,n.matchQuery(a,m)&&(s=!0))}return p&&s}};t.DebugConsoleFilterModel=v,v.matchQuery=l.matchesFuzzy,t.DebugConsoleFilterModel=v=n=r.__decorate([(0,o.Injectable)({multiple:!0})],v)},1276:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleFilterService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(5905),v=e(53378),_=e(62665),{convertSimple2RegExpPattern:m}=o.strings;let p=class{constructor(){this._onDidValueChange=new o.Emitter,this._onDidFocus=new o.Emitter,this._filterText="",this.filterModel=new v.DebugConsoleFilterModel}get onDidValueChange(){return this._onDidValueChange.event}get onDidFocus(){return this._onDidFocus.event}focusInput(){this._onDidFocus.fire()}get filterText(){return this._filterText}setFilterText(h){return this._filterText!==h&&(this._filterText=h,this.filterModel.filterQuery=this._filterText,this._onDidValueChange.fire(this._filterText)),this}filter(h){const a=_.ansiToText(h);return this._filterText===""||this.filterModel.filter(a)}findMatches(h){const a=new RegExp(m(this._filterText.toLowerCase()),"g");if(this._filterText.trim()==="")return[];const g=(0,l.matchAll)(h.toLowerCase(),a),d=this._filterText.length;return d===0?[]:g.map(E=>({startIndex:E.index!==void 0?E.index:-1,count:d})).filter(E=>E.startIndex>=0)}};t.DebugConsoleFilterService=p,t.DebugConsoleFilterService=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},4161:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleFilterView=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importDefault(e(14041)),l=e(15857),v=e(41869),_=e(1276),m=n.__importDefault(e(80315)),p=()=>{const s=(0,v.useInjectable)(_.DebugConsoleFilterService),[h,a]=o.default.useState(""),[g,d]=o.default.useState(),u=(0,v.useDesignStyles)(m.default.debug_console_filter,"debug_console_filter"),E=(0,v.useDesignStyles)(m.default.filter_input,"filter_input"),f=(0,r.default)(b=>{a(b),s.setFilterText(b),g&&g.addToHistory(b)},400);o.default.useEffect(()=>{const b=s.onDidValueChange(A=>{a(A)});return()=>{b.dispose()}},[]);const c=b=>{d(b)},y=b=>{g&&(b.keyCode===v.Key.ARROW_UP.keyCode?g.showPreviousValue():b.keyCode===v.Key.ARROW_DOWN.keyCode&&g.showNextValue())};return o.default.useEffect(()=>{const b=s.onDidFocus(()=>{g&&g.focus()});return()=>{b.dispose()}},[g]),o.default.createElement("div",{className:u},o.default.createElement(l.HistoryInputBox,{hasClear:!0,className:E,value:h,placeholder:(0,v.localize)("debug.console.filter.placeholder"),onValueChange:f,onReady:c,onKeyDown:y}))};t.DebugConsoleFilterView=p},80390:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleTreeModel=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(98650);let m=n=class extends l.TreeModel{constructor(s){super(),this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this._tempScrollOffset=0,this.init(s)}get isScrollBottom(){return this._tempScrollOffset=Math.max(this.state.scrollOffset,this._tempScrollOffset),this._tempScrollOffset===this.state.scrollOffset}init(s){this.root=s,this.root.watcher.on(l.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};t.DebugConsoleTreeModel=m,m.DEFAULT_FLUSH_DELAY=100,t.DebugConsoleTreeModel=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[_.ExpressionContainer])],m)},75563:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleSession=void 0;const n=e(85608),r=n.__importDefault(e(97331)),o=e(76003),l=e(43718),v=e(52416),_=e(92679),m=e(58542),p=e(29539),s=e(16170),h=e(80390);let a=class{constructor(d,u){this.session=d,this.treeModel=u,this.toDispose=new l.DisposableCollection,this.fireDidChange=(0,r.default)(()=>this.onDidChangeEmitter.fire(),50),this.onDidChangeEmitter=new l.Emitter,this.init()}resolveChildren(){return(this.treeModel.root.flattenedBranch||[]).map(u=>this.treeModel.root.getTreeNodeById(u))}getLastItem(){const{flattenedBranch:d}=this.treeModel.root,u=d?.length?d[d.length-1]:void 0;return u?this.treeModel.root.getTreeNodeById(u):void 0}init(){this.toDispose.push(this.session.on("output",d=>this.logOutput(this.session,d)))}addChildSession(d){this.toDispose.push(d.on("output",u=>this.logOutput(d,u)))}get onDidChange(){return this.onDidChangeEmitter.event}clear(){this.fireDidChange()}async logOutput(d,u){var E;const f="\x1B[2J",c=u.body,{category:y,variablesReference:b,source:A,line:S}=c;if(!this.treeModel)return;const w=y==="stderr"?l.MessageType.Error:y==="stdout"?l.MessageType.Info:y==="console"?l.MessageType.Warning:l.MessageType.Info;if(y==="telemetry"){this.logger.debug(`telemetry/${u.body.output}`,u.body.data);return}if(b){const I=new s.DebugConsoleNode({session:d,variablesReference:b,source:A,line:S},"",(E=this.treeModel)===null||E===void 0?void 0:E.root);await I.evaluate(),this.treeModel.root.insertItem(I)}else if(typeof c.output=="string"){let I=c.output;I.indexOf(f)>=0&&(this.clearConsole(),await this.insertItemWithAnsi((0,l.localize)("debug.console.consoleCleared"),l.MessageType.Info),I=I.substring(I.lastIndexOf(f)+f.length));const D=this.getLastItem();D&&!D.description.endsWith(`
33901
33901
  `)&&!D.description.endsWith(`\r
33902
33902
  `)&&D.severity===w?(this.treeModel.root.unlinkItem(D),await this.insertItemWithAnsi(D.description+c.output,w,A,S)):await this.insertItemWithAnsi(c.output,w,A,S)}this.fireDidChange()}async clearConsole(){var d;const u=(d=this.treeModel.root.flattenedBranch)===null||d===void 0?void 0:d.map(E=>this.treeModel.root.getTreeNodeById(E));if(u)for(const E of u)this.treeModel.root.unlinkItem(E)}async insertItemWithAnsi(d,u,E,f){var c;const y=await(0,_.handleANSIOutput)(d,this.linkDetector,this.themeService,void 0);this.treeModel.root.insertItem(new s.AnsiConsoleNode(d,(c=this.treeModel)===null||c===void 0?void 0:c.root,this.linkDetector,y,u,E,f))}async execute(d){var u;this.treeModel.root.insertItem(new s.AnsiConsoleNode(d,this.treeModel.root,this.linkDetector,void 0,l.MessageType.Info));const E=new s.DebugConsoleNode({session:this.session},d,(u=this.treeModel)===null||u===void 0?void 0:u.root);await E.evaluate(),this.treeModel.root.insertItem(E),this.fireDidChange()}append(d){var u;if(!d)return;const E=this.resolveChildren().slice(-1)[0];E instanceof s.AnsiConsoleNode&&E.description===this.uncompletedItemContent?(this.resolveChildren().pop(),this.uncompletedItemContent+=d):this.uncompletedItemContent=d,this.treeModel.root.insertItem(new s.AnsiConsoleNode(this.uncompletedItemContent,(u=this.treeModel)===null||u===void 0?void 0:u.root,this.linkDetector,void 0,l.MessageType.Info)),this.fireDidChange()}appendLine(d){var u;this.treeModel.root.insertItem(new s.AnsiConsoleNode(d,(u=this.treeModel)===null||u===void 0?void 0:u.root,this.linkDetector,void 0,l.MessageType.Info)),this.fireDidChange()}};t.DebugConsoleSession=a,n.__decorate([(0,o.Autowired)(l.ILogger),n.__metadata("design:type",Object)],a.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(m.LinkDetector),n.__metadata("design:type",m.LinkDetector)],a.prototype,"linkDetector",void 0),n.__decorate([(0,o.Autowired)(v.IThemeService),n.__metadata("design:type",Object)],a.prototype,"themeService",void 0),t.DebugConsoleSession=a=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__param(0,(0,o.Optional)()),n.__param(1,(0,o.Optional)()),n.__metadata("design:paramtypes",[p.DebugSession,h.DebugConsoleTreeModel])],a)},15153:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleModelService=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(93899),m=e(64582),p=e(58542),s=e(16170),h=e(98650),a=e(32756),g=e(17280),d=e(80390),u=e(75563),E=r.__importDefault(e(80315)),{Path:f}=v.path;let c=n=class{constructor(){this.debugSessionModelMap=new Map,this._changeEventDispatchQueue=[],this.selectedDecoration=new l.Decoration(E.default.mod_selected),this.contextMenuDecoration=new l.Decoration(E.default.mod_actived),this.loadingDecoration=new l.Decoration(E.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new v.Emitter,this.onDidUpdateTreeModelEmitter=new v.Emitter,this.treeModelDisposableCollection=new v.DisposableCollection,this.debugConsoleDisposableCollection=new v.DisposableCollection,this.activeNodeDecoration=(b,A=!0)=>{var S;if(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),b){if(this.selectedNodes.length>0)for(const w of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(w);this.focusedNode,this.selectedDecoration.addTarget(b),this._focusedNode=b,this._selectedNodes=[b],A&&((S=this.treeModel)===null||S===void 0||S.dispatchChange())}},this.activeNodeActivedDecoration=b=>{var A;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this._focusedNode=void 0),this.contextMenuDecoration.addTarget(b),this._contextMenuNode=b,(A=this.treeModel)===null||A===void 0||A.dispatchChange()},this.enactiveNodeDecoration=()=>{var b;this.focusedNode&&(this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(b=this.treeModel)===null||b===void 0||b.dispatchChange()},this.handleContextMenu=(b,A)=>{var S;b.stopPropagation(),b.preventDefault();const{x:w,y:I}=b.nativeEvent;this.debugContextKey.contextInDebugConsole.set(!0),A?this.activeNodeActivedDecoration(A):this.enactiveNodeDecoration();let D;A?D=A:D=(S=this.treeModel)===null||S===void 0?void 0:S.root;const T=this.contextMenuService.createMenu({id:_.MenuId.DebugConsoleContext,contextKeyService:this.debugContextKey.contextKeyScoped}),R=T.getMergedMenuNodes();T.dispose(),this.ctxMenuRenderer.show({anchor:{x:w,y:I},menuNodes:R,args:[D],onHide:()=>{window.requestAnimationFrame(()=>{this.debugContextKey.contextInDebugConsole.set(!1)})}})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=b=>{this.activeNodeDecoration(b)},this.handleTwistierClick=(b,A)=>{if(A===l.TreeNodeType.CompositeTreeNode){if(h.DebugConsoleNode.is(b)&&b.available){this.activeNodeDecoration(b,!1),this.toggleDirectory(b);return}else if(b.variablesReference){this.activeNodeDecoration(b,!1),this.toggleDirectory(b);return}}this.activeNodeDecoration(b)},this.toggleDirectory=async b=>{b.expanded?this.treeHandle.collapseNode(b):this.treeHandle.expandNode(b)},this.flushEventQueue=()=>{let b;if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((S,w)=>{const I=f.pathDepth(S),D=f.pathDepth(w);return I-D});const A=[this._changeEventDispatchQueue[0]];for(const S of this._changeEventDispatchQueue)A.some(w=>S.indexOf(w)===0)||A.push(S);return b=(0,v.pSeries)(A.map(S=>async()=>{var w,I;const D=(I=(w=this.treeModel)===null||w===void 0?void 0:w.root)===null||I===void 0?void 0:I.getTreeNodeByPath(S);return D&&l.CompositeTreeNode.is(D)&&await D.refresh(),null})),this._changeEventDispatchQueue=[],b},this.init()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get treeHandle(){return this._debugWatchTreeHandle}get decorations(){return this._decorations}get treeModel(){var b;return(b=this._activeDebugSessionModel)===null||b===void 0?void 0:b.treeModel}get debugConsoleSession(){var b;return(b=this._activeDebugSessionModel)===null||b===void 0?void 0:b.debugConsoleSession}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}clear(){this.initTreeModel(this.manager.currentSession,!0)}collapseAll(){var b;(b=this.treeModel)===null||b===void 0||b.root.collapsedAll()}copyAll(){var b;let A="";if(!(!(!((b=this.treeModel)===null||b===void 0)&&b.root)||!this.treeModel.root.children)){for(const S of this.treeModel.root.children)A+=this.getValidText(S)+`
33903
33903
  `;this.clipboardService.writeText(A.slice(0,-1))}}copy(b){b&&this.clipboardService.writeText(this.getValidText(b))}getValidText(b){return b.description.endsWith(`
33904
33904
  `)?b.description.slice(0,-1):b.description}getConsoleModel(b){return this.debugSessionModelMap.get(b)}dispose(){this.disposeTreeModel(),this.disposeDebugConsole()}disposeTreeModel(){this.treeModelDisposableCollection.disposed||this.treeModelDisposableCollection.dispose()}disposeDebugConsole(){this.debugConsoleDisposableCollection.disposed||this.debugConsoleDisposableCollection.dispose()}async init(){this.debugConsoleDisposableCollection.push(this.manager.onDidDestroyDebugSession(b=>{this.debugSessionModelMap.delete(b.id),this.debugSessionModelMap.size>0&&this.initTreeModel(this.manager.currentSession)})),this.debugConsoleDisposableCollection.push(this.manager.onDidChangeActiveDebugSession(b=>{b.current&&this.initTreeModel(b.current)}))}listenTreeViewChange(){this.disposeTreeModel(),this.treeModel&&(this.treeModelDisposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,b=>{this.loadingDecoration.addTarget(b)})),this.treeModelDisposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,b=>{this.loadingDecoration.removeTarget(b)})))}async initTreeModel(b,A){if(!b){this._activeDebugSessionModel=void 0,this.onDidUpdateTreeModelEmitter.fire(this._activeDebugSessionModel);return}const S=b.hasSeparateRepl()?b.id:b.parentSession.id;if(this.debugSessionModelMap.has(S)&&!A){const w=this.debugSessionModelMap.get(S);w?.debugConsoleSession.addChildSession(b),this._activeDebugSessionModel=w}else{const w=new h.DebugConsoleRoot({});if(!w)return;const I=this.injector.get(d.DebugConsoleTreeModel,[w]),D=this.injector.get(u.DebugConsoleSession,[b,I]);this._activeDebugSessionModel={treeModel:I,debugConsoleSession:D},D.onDidChange(async()=>{if(!I)return;const T=I.root.branchSize,R=D.resolveChildren();I.root.updatePresetChildren(R),T!==R.length&&(this.refresh(),I.isScrollBottom&&await this.treeHandle.ensureVisible(R[R.length-1]),I?.dispatchChange())}),this.debugSessionModelMap.set(S,this._activeDebugSessionModel),this.initDecorations(w),this.listenTreeViewChange()}return this.onDidUpdateTreeModelEmitter.fire(this._activeDebugSessionModel),this._activeDebugSessionModel}initDecorations(b){this._decorations=new l.DecorationsManager(b),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(b){this._debugWatchTreeHandle=b}dispatchWatchEvent(b,A,S){const w=b.watchEvents.get(A);w&&w.callback&&w.callback(S)}collapsedAll(){var b;(b=this.treeModel)===null||b===void 0||b.root.collapsedAll()}async refresh(b){if(!b)if(this.treeModel)b=this.treeModel.root;else return;!h.ExpressionContainer.is(b)&&b.parent&&(b=b.parent),this.queueChangeEvent(b.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(b,A){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new v.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var S;await this.flushEventQueue(),(S=this.flushEventQueueDeferred)===null||S===void 0||S.resolve(),this.flushEventQueueDeferred=null,A()},n.DEFAULT_REFRESH_DELAY)),this._changeEventDispatchQueue.indexOf(b)===-1&&this._changeEventDispatchQueue.push(b)}async execute(b){if(!this.treeModel)return;const A=this.treeModel.root,S=new s.AnsiConsoleNode(b,A,this.linkDetector);this.dispatchWatchEvent(A,A.path,{type:l.WatchEvent.Added,node:S,id:A.id});const w=new h.DebugConsoleNode({session:this.manager.currentSession},b,A);await w.evaluate(),this.dispatchWatchEvent(A,A.path,{type:l.WatchEvent.Added,node:w,id:A.id}),this.treeHandle.ensureVisible(w,"end",!0)}};t.DebugConsoleModelService=c,c.DEFAULT_REFRESH_DELAY=200,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],c.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(_.ICtxMenuRenderer),r.__metadata("design:type",_.ICtxMenuRenderer)],c.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,o.Autowired)(_.AbstractContextMenuService),r.__metadata("design:type",_.AbstractContextMenuService)],c.prototype,"contextMenuService",void 0),r.__decorate([(0,o.Autowired)(a.DebugViewModel),r.__metadata("design:type",a.DebugViewModel)],c.prototype,"viewModel",void 0),r.__decorate([(0,o.Autowired)(v.IContextKeyService),r.__metadata("design:type",Object)],c.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(m.IDebugSessionManager),r.__metadata("design:type",Object)],c.prototype,"manager",void 0),r.__decorate([(0,o.Autowired)(v.IClipboardService),r.__metadata("design:type",Object)],c.prototype,"clipboardService",void 0),r.__decorate([(0,o.Autowired)(p.LinkDetector),r.__metadata("design:type",p.LinkDetector)],c.prototype,"linkDetector",void 0),r.__decorate([(0,o.Autowired)(g.DebugContextKey),r.__metadata("design:type",g.DebugContextKey)],c.prototype,"debugContextKey",void 0),t.DebugConsoleModelService=c=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],c)},11456:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleContribution=t.DEBUG_CONSOLE_VIEW_ID=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),v=e(98295),_=e(64582),m=e(17280),p=e(4983),s=e(1276),h=e(4161),a=e(35199),g=e(5131);t.DEBUG_CONSOLE_VIEW_ID="debug-console-view";let d=class{registerComponent(E){E.register("debug-console",{id:t.DEBUG_CONSOLE_VIEW_ID,component:g.DebugConsoleView},{title:(0,o.localize)("debug.console.panel.title"),priority:8,containerId:_.DEBUG_CONSOLE_CONTAINER_ID,iconClass:(0,o.getIcon)("debug"),titleComponent:h.DebugConsoleFilterView})}registerToolbarItems(E){E.registerItem({id:_.DEBUG_COMMANDS.CLEAR_CONSOLE.id,command:_.DEBUG_COMMANDS.CLEAR_CONSOLE.id,iconClass:(0,o.getIcon)("clear"),viewId:_.DEBUG_CONSOLE_CONTAINER_ID,tooltip:_.DEBUG_COMMANDS.CLEAR_CONSOLE.label})}registerCommands(E){E.registerCommand(_.DEBUG_COMMANDS.CLEAR_CONSOLE,{execute:()=>{this.debugConsoleModelService.clear()}}),E.registerCommand(_.DEBUG_COMMANDS.COPY_CONSOLE_ITEM,{execute:f=>{this.debugConsoleModelService.copy(f)}}),E.registerCommand(_.DEBUG_COMMANDS.COPY_CONSOLE_ALL,{execute:()=>{this.debugConsoleModelService.copyAll()}}),E.registerCommand(_.DEBUG_COMMANDS.COLLAPSE_ALL_CONSOLE_ITEM,{execute:()=>{this.debugConsoleModelService.collapseAll()},isEnabled:()=>this.debugContextKey.contextInDebugConsole.get()===!0}),E.registerCommand(_.DEBUG_COMMANDS.CONSOLE_ENTER_EVALUATE,{execute:()=>{this.debugConsoleService.runExecute()}}),E.registerCommand(_.DEBUG_COMMANDS.CONSOLE_INPUT_DOWN_ARROW,{execute:()=>{this.debugConsoleService.showNextValue()}}),E.registerCommand(_.DEBUG_COMMANDS.CONSOLE_INPUT_UP_ARROW,{execute:()=>{this.debugConsoleService.showPreviousValue()}}),E.registerCommand(_.DEBUG_COMMANDS.CONSOLE_FILTER_FOCUS,{execute:()=>{this.debugConsoleFilterService.focusInput()}})}registerMenus(E){E.registerMenuItem(l.MenuId.DebugConsoleContext,{command:{id:_.DEBUG_COMMANDS.COPY_CONSOLE_ITEM.id,label:(0,o.localize)("debug.console.copy")},group:"copy"}),E.registerMenuItem(l.MenuId.DebugConsoleContext,{command:{id:_.DEBUG_COMMANDS.COPY_CONSOLE_ALL.id,label:(0,o.localize)("debug.console.copyAll")},group:"copy"}),E.registerMenuItem(l.MenuId.DebugConsoleContext,{command:{id:_.DEBUG_COMMANDS.CLEAR_CONSOLE.id,label:(0,o.localize)("debug.console.clear")},group:"other"}),E.registerMenuItem(l.MenuId.DebugConsoleContext,{command:{id:_.DEBUG_COMMANDS.COLLAPSE_ALL_CONSOLE_ITEM.id,label:(0,o.localize)("debug.console.collapseAll")},group:"other"})}registerKeybindings(E){E.registerKeybinding({command:_.DEBUG_COMMANDS.CONSOLE_ENTER_EVALUATE.id,keybinding:"enter",when:`${p.CONTEXT_IN_DEBUG_REPL.raw} && ${p.CONTEXT_IN_DEBUG_MODE.raw}`}),E.registerKeybinding({command:_.DEBUG_COMMANDS.CONSOLE_INPUT_DOWN_ARROW.id,keybinding:"down",when:`${p.CONTEXT_IN_DEBUG_REPL.raw} && ${p.CONTEXT_IN_DEBUG_MODE.raw}`}),E.registerKeybinding({command:_.DEBUG_COMMANDS.CONSOLE_INPUT_UP_ARROW.id,keybinding:"up",when:`${p.CONTEXT_IN_DEBUG_REPL.raw} && ${p.CONTEXT_IN_DEBUG_MODE.raw}`}),E.registerKeybinding({command:_.DEBUG_COMMANDS.CONSOLE_FILTER_FOCUS.id,keybinding:"ctrlcmd+f",when:`${p.CONTEXT_IN_DEBUG_REPL.raw}`})}};t.DebugConsoleContribution=d,n.__decorate([(0,r.Autowired)(_.IDebugConsoleModelService),n.__metadata("design:type",Object)],d.prototype,"debugConsoleModelService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],d.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(a.DebugConsoleService),n.__metadata("design:type",a.DebugConsoleService)],d.prototype,"debugConsoleService",void 0),n.__decorate([(0,r.Autowired)(s.DebugConsoleFilterService),n.__metadata("design:type",s.DebugConsoleFilterService)],d.prototype,"debugConsoleFilterService",void 0),n.__decorate([(0,r.Autowired)(m.DebugContextKey),n.__metadata("design:type",m.DebugContextKey)],d.prototype,"debugContextKey",void 0),t.DebugConsoleContribution=d=n.__decorate([(0,v.Domain)(o.ComponentContribution,o.TabBarToolbarContribution,o.CommandContribution,l.MenuContribution,o.KeybindingContribution)],d)},35199:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConsoleService=void 0;const r=e(85608),o=e(76003),l=e(41869),v=e(43718),_=e(54414),m=e(57517),p=e(63067),s=r.__importStar(e(20868)),h=e(52902),a=e(52416),g=e(54114),d=e(64582),u=e(38029),E=e(17280),f=e(15153),c="consoleinputdecoration",y="debug.console.history",b=18,A=I=>I.replace(/^\S/,D=>D.toUpperCase()),S={...(0,m.getSimpleEditorOptions)(),scrollbar:{horizontal:"visible",vertical:"hidden",handleMouseWheel:!0},acceptSuggestionOnEnter:"on"};let w=n=class{constructor(){this._consoleInputElement=null,this._updateDisposable=null,this._onConsoleInputValueChange=new v.Emitter,this.onConsoleInputValueChange=this._onConsoleInputValueChange.event,this._onInputHeightChange=new v.Emitter,this.onInputHeightChange=this._onInputHeightChange.event}get _isReadonly(){const D=this.manager.currentSession;return!(D&&D.state!==d.DebugState.Inactive)}get isVisible(){const D=this.mainLayoutService.getTabbarHandler(d.DEBUG_CONSOLE_CONTAINER_ID);return D&&D.isVisible}get consoleModel(){return this.debugConsoleModelService}activate(){const D=this.mainLayoutService.getTabbarHandler(d.DEBUG_CONSOLE_CONTAINER_ID);D&&!D.isVisible&&D.activate()}focusInput(){this.inputEditor&&this.inputEditor.monacoEditor.focus()}async init(D){var T;if(!D)return;const R=await this.storageProvider(v.STORAGE_NAMESPACE.DEBUG);if(this.history=new g.HistoryNavigator(new Set(R.get(y,[])),50),!((T=this.inputEditor)===null||T===void 0)&&T.monacoEditor)return;this._consoleInputElement=D,this.inputEditor=this.editorService.createCodeEditor(this._consoleInputElement,{...S,readOnly:!this.contextKeyService.getContextKeyValue(d.CONTEXT_IN_DEBUG_MODE_KEY)}),this.debugContextKey=this.injector.get(E.DebugContextKey,[this.inputEditor.monacoEditor.contextKeyService]),this.contextKeyService.match(d.CONTEXT_IN_DEBUG_MODE_KEY)?this.debugContextKey.contextInDebugMode.set(!0):this.debugContextKey.contextInDebugMode.set(!1),this.contextKeyService.onDidChangeContext(O=>{O.payload.affectsSome(n.keySet)&&(this.contextKeyService.match(d.CONTEXT_IN_DEBUG_MODE_KEY)?(this.updateReadOnly(!1),this.updateInputDecoration(),this.debugContextKey.contextInDebugMode.set(!0)):(this.updateReadOnly(!0),this.debugContextKey&&this.debugContextKey.contextInDebugMode.set(!1)))}),this.registerDecorationType(),await this.createConsoleInput(),this.setMode()}get contextInDebugRepl(){return this.debugContextKey.contextInDebugRepl}get consoleInputValue(){return this._consoleModel&&this._consoleModel.getValue()||""}showPreviousValue(){this._isReadonly||this.navigateHistory(!0)}showNextValue(){this._isReadonly||this.navigateHistory(!1)}async runExecute(){if(!this.inputEditor)return;const D=this.inputEditor.monacoEditor,T=D.getValue();await this.consoleModel.execute(T),this.history.add(T),D.setValue("")}navigateHistory(D){const T=D?this.history.previous():this.history.next();if(T&&this.inputEditor&&this.inputEditor.monacoEditor){const{monacoEditor:R}=this.inputEditor;R.setValue(T),R.setPosition({lineNumber:1,column:T.length+1})}}get consoleInputUri(){return new v.URI("debug/console/input").withScheme(v.Schemes.walkThroughSnippet)}async createConsoleInput(){var D;if(!(!((D=this.inputEditor)===null||D===void 0)&&D.monacoEditor))return;const{monacoEditor:T}=this.inputEditor,M=(await this.documentService.createModelReference(this.consoleInputUri)).instance.getMonacoModel();M.updateOptions({tabSize:2}),this._consoleModel=M,T.setModel(M),setTimeout(()=>{this.layoutBody()},0),T.onDidFocusEditorText(()=>{this.contextInDebugRepl.set(!0),this.updateInputDecoration()}),T.onDidBlurEditorText(()=>{this.contextInDebugRepl.set(!1),this.updateInputDecoration()}),T.onDidChangeModelContent(()=>{const O=T.getModel().getLineCount();this.layoutBody(O*18)}),this.manager.onDidChangeActiveDebugSession(()=>{this.registerCompletion(),this.setMode()}),await this.updateInputDecoration()}layoutBody(D,T){var R;if(!this.inputEditor)return;const{monacoEditor:M}=this.inputEditor,O=Math.max(D||b,M.getContentHeight());M.layout({width:T||((R=this._consoleInputElement)===null||R===void 0?void 0:R.offsetWidth),height:O}),this._onInputHeightChange.fire(O)}updateReadOnly(D){this.inputEditor&&this.inputEditor.monacoEditor.updateOptions({readOnly:D})}async updateInputDecoration(){if(!this.inputEditor)return;const D=[];if(this._isReadonly&&this.inputEditor.monacoEditor.hasTextFocus()&&!this.inputEditor.monacoEditor.getValue()){const T=(0,a.transparent)(a.editorForeground,.4)(await this.themeService.getCurrentTheme());D.push({range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:(0,l.localize)("debug.console.input.placeholder"),color:T?T.toString():void 0}}})}this.inputEditor.monacoEditor.setDecorationsByType("debug-console-input",c,D)}setMode(){var D;if(!this.inputEditor)return;const T=this.manager.currentSession;if(!T)return;const R=T.currentEditor();R&&this.inputEditor.monacoEditor.getModel().setLanguage((D=R.getModel())===null||D===void 0?void 0:D.getLanguageId())}registerDecorationType(){this.overrideServicesRegistry.getRegisteredService(l.ServiceNames.CODE_EDITOR_SERVICE).registerDecorationType("console-input-decoration",c,{})}registerCompletion(){var D;this._updateDisposable&&(this._updateDisposable.dispose(),this._updateDisposable=null);const T=this.manager.currentSession;if(!T)return;const R=T.currentEditor();R&&(this._updateDisposable=h.monaco.languages.registerCompletionItemProvider((D=R.getModel())===null||D===void 0?void 0:D.getLanguageId(),{_debugDisplayName:"DebugConsoleCompletionProvider",triggerCharacters:["."],provideCompletionItems:async(M,O,x)=>{var k;if(!(!((k=this.manager.currentSession)===null||k===void 0)&&k.capabilities.supportsCompletionsRequest))return;if(M.uri.toString()!==this.consoleInputUri.toString())return null;const F=this.manager.currentSession,{triggerCharacter:L}=x;let N=M.getWordAtPosition(O);if(N&&F){const{word:U,startColumn:W,endColumn:j}=N;return{suggestions:(await F.sendRequest("completions",{text:U,column:j,frameId:F.currentFrame&&F.currentFrame.raw.id})).body.targets.map(G=>({label:G.label,insertText:G.text||G.label,sortText:G.sortText,kind:s.languages.CompletionItemKind[A(G.type||"property")],range:{startLineNumber:O.lineNumber,endLineNumber:O.lineNumber,startColumn:W,endColumn:j}}))}}if(N=M.getWordAtPosition({lineNumber:O.lineNumber,column:O.column-1}),N&&F&&L){const{word:U,endColumn:W}=N;return{suggestions:(await F.sendRequest("completions",{text:U+L,column:W+1,frameId:F.currentFrame&&F.currentFrame.raw.id})).body.targets.map(Q=>({label:Q.label,insertText:Q.text||Q.label,sortText:Q.sortText,kind:s.languages.CompletionItemKind[A(Q.type||"property")],range:{startLineNumber:O.lineNumber,endLineNumber:O.lineNumber,startColumn:W+1,endColumn:W+1}}))}}return null}}))}disable(){var D,T;this._updateDisposable&&(this._updateDisposable.dispose(),this._updateDisposable=null),(D=this.inputEditor)===null||D===void 0||D.monacoEditor.setValue(""),(T=this.inputEditor)===null||T===void 0||T.monacoEditor.setModel(null)}};t.DebugConsoleService=w,w.keySet=new Set([d.CONTEXT_IN_DEBUG_MODE_KEY]),r.__decorate([(0,o.Autowired)(d.IDebugConsoleModelService),r.__metadata("design:type",f.DebugConsoleModelService)],w.prototype,"debugConsoleModelService",void 0),r.__decorate([(0,o.Autowired)(p.IMainLayoutService),r.__metadata("design:type",Object)],w.prototype,"mainLayoutService",void 0),r.__decorate([(0,o.Autowired)(m.IEditorDocumentModelService),r.__metadata("design:type",Object)],w.prototype,"documentService",void 0),r.__decorate([(0,o.Autowired)(_.EditorCollectionService),r.__metadata("design:type",_.EditorCollectionService)],w.prototype,"editorService",void 0),r.__decorate([(0,o.Autowired)(v.CommandRegistry),r.__metadata("design:type",Object)],w.prototype,"commands",void 0),r.__decorate([(0,o.Autowired)(l.IContextKeyService),r.__metadata("design:type",Object)],w.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(d.IDebugSessionManager),r.__metadata("design:type",u.DebugSessionManager)],w.prototype,"manager",void 0),r.__decorate([(0,o.Autowired)(a.IThemeService),r.__metadata("design:type",Object)],w.prototype,"themeService",void 0),r.__decorate([(0,o.Autowired)(l.MonacoOverrideServiceRegistry),r.__metadata("design:type",l.MonacoOverrideServiceRegistry)],w.prototype,"overrideServicesRegistry",void 0),r.__decorate([(0,o.Autowired)(l.StorageProvider),r.__metadata("design:type",Function)],w.prototype,"storageProvider",void 0),r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],w.prototype,"injector",void 0),t.DebugConsoleService=w=n=r.__decorate([(0,o.Injectable)()],w)},5131:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_CONSOLE_TREE_FIELD_NAME=t.DEBUG_CONSOLE_TREE_NODE_HEIGHT=t.DebugConsoleRenderedNode=t.DebugConsoleView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=e(41869),_=e(43718),m=e(72260),p=e(64582),s=e(58542),h=e(5905),a=e(16170),g=e(1276),d=n.__importDefault(e(80315)),u=e(35199),E=({viewState:c})=>{const y=(0,v.useInjectable)(u.DebugConsoleService),b=(0,v.useInjectable)(g.DebugConsoleFilterService),A=(0,v.useInjectable)(v.PreferenceService),{consoleModel:S}=y,{height:w,width:I}=c,[D,T]=o.default.useState(),[R,M]=o.default.useState(26),[O,x]=o.default.useState(""),[k,F]=o.default.useState(!0),L=o.default.useRef(null),N=o.default.useRef(null),U=(0,v.useInjectable)(m.IMainLayoutService),W=(0,v.useDesignStyles)(d.default.debug_console_output,"debug_console_output"),j=(0,v.useDesignStyles)(d.default.variable_repl_bar,"variable_repl_bar");o.default.useEffect(()=>{if(L&&L.current){const ie=U.getTabbarHandler(p.DEBUG_CONSOLE_CONTAINER_ID);if(ie?.isActivated())y.init(L.current);else{const he=ie?.onActivate(()=>{y.init(L.current),he?.dispose()})}}},[L.current]),o.default.useEffect(()=>{const ie=new _.Disposable;return ie.addDispose(S.onDidUpdateTreeModel(async he=>{he&&await he.treeModel.ensureReady,T(he)})),ie.addDispose(b.onDidValueChange(he=>{x(he)})),ie.addDispose(y.onInputHeightChange(he=>{M(he)})),ie.addDispose(A.onSpecificPreferenceChange("debug.console.wordWrap",he=>{const{newValue:me}=he;F(me)})),F(!!A.get("debug.console.wordWrap",k)),()=>{S.removeNodeDecoration(),ie.dispose()}},[]);const Q=ie=>{S.handleTreeHandler({...ie,getModel:()=>D?.treeModel,hasDirectFocus:()=>N.current===document.activeElement})},G=(ie,he,me)=>{const q=window.getSelection();q&&q.type==="Range"&&q.rangeCount>0&&ie.stopPropagation();const{handleTwistierClick:be}=S;he&&be(he,me)},X=(ie,he)=>{const{handleContextMenu:me}=S;me(ie,he)},$=ie=>{const{handleContextMenu:he}=S;he(ie)},V=ie=>{const{enactiveNodeDecoration:he}=S;he(),y.focusInput()},H=ie=>{const{enactiveNodeDecoration:he}=S;he()},K=()=>"filter",Y=()=>({pre:"<match>",post:"</match>",extract:ie=>ie.description?ie.description:ie.name}),Z=o.default.useCallback(ie=>{const he=S.decorations.getDecorations(ie.item);return o.default.createElement(t.DebugConsoleRenderedNode,{item:ie.item,itemType:ie.itemType,decorations:he,filterValue:O,filterMode:K(),onClick:G,onTwistierClick:G,onContextMenu:X,defaultLeftPadding:14,isWordWrap:k,leftPadding:8})},[D,O,k]),oe=()=>D?o.default.createElement(l.RecycleTree,{height:Math.max(w-R,26),width:I,itemHeight:t.DEBUG_CONSOLE_TREE_NODE_HEIGHT,onReady:Q,overScanCount:10,filter:K()==="filter"?O:"",filterProvider:{fuzzyOptions:Y,filterAlways:!0},model:D.treeModel,overflow:"auto",supportDynamicHeights:k},Z):null;return o.default.createElement("div",{className:d.default.debug_console,onContextMenu:$,onClick:V},o.default.createElement("div",{className:W,tabIndex:-1,onBlur:H,ref:N,"data-name":t.DEBUG_CONSOLE_TREE_FIELD_NAME},oe()),o.default.createElement("div",{className:j,style:{maxHeight:w-26+"px"}},o.default.createElement("div",{className:d.default.variable_repl_bar_icon},o.default.createElement("span",{className:(0,v.getIcon)("right")})),o.default.createElement("div",{className:d.default.variable_repl_editor,ref:L})))};t.DebugConsoleView=E;const f=({item:c,decorations:y,defaultLeftPadding:b,leftPadding:A,filterMode:S,filterValue:w,onClick:I,onTwistierClick:D,onContextMenu:T,isWordWrap:R,itemType:M})=>{const O=(0,v.useInjectable)(g.DebugConsoleFilterService),x=(0,v.useInjectable)(s.LinkDetector),[k,F]=o.default.useState(),L=(0,v.useDesignStyles)(d.default.expansion_toggle,"expansion_toggle");o.default.useEffect(()=>{const Z=window.getComputedStyle(a.AnsiConsoleNode.is(c)?c.el:x.linkify(c.description),null),oe=`${Z.fontStyle} ${Z.fontWeight} ${Z.fontSize}/${Z.lineHeight} ${Z.fontFamily}`;F(oe)},[c]);const N=Z=>{I(Z,c,l.CompositeTreeNode.is(c)?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode)},U=Z=>{Z.nativeEvent.which!==0&&(M===l.TreeNodeType.TreeNode||M===l.TreeNodeType.CompositeTreeNode)&&T&&T(Z,c,M)},W=()=>a.AnsiConsoleNode.is(c)?"":(a.DebugConsoleNode.is(c)?"":c.name)+(c.description&&!a.DebugConsoleNode.is(c)?": ":""),j=(Z,oe)=>h.CharWidthReader.getInstance().getCharWidth(Z,oe),Q=o.default.useCallback(()=>{if(!k)return;const Z=W()+c.description,oe=O.findMatches(Z||""),ie=fe=>Number(fe.toFixed(4)),he=(fe,te)=>Array.from({length:te},(ge,Re)=>Re).reduce((ge,Re)=>ge+ie(j(Z.charAt(fe+Re),k)),0),me=new Map,q=(fe,te)=>{if(fe>0){const ge=(Oe,Le,Ne)=>Array.from({length:Oe-Le},(De,Ce)=>Le+Ce).reduce((De,Ce)=>ie(De+j(Z.charAt(Ce),k)),Ne);let Re;if(te!==0&&me.has(oe[te].startIndex)){const Oe=me.get(oe[te].startIndex);Re=ge(fe,Oe.startIndex,Oe.left)}else Re=ge(fe,0,0);return me.set(fe,{startIndex:fe,left:Re}),Re}return 0};return oe.map((fe,te)=>({height:16,top:3,width:he(fe.startIndex,fe.count),left:q(fe.startIndex,Math.max(0,te-1))})).map(fe=>o.default.createElement("div",{key:fe.left,className:d.default.block,style:fe}))},[w,k]),G=Z=>a.AnsiConsoleNode.is(Z)||Z instanceof a.DebugConsoleNode&&Z.variablesReference===0?null:o.default.createElement("div",{className:(0,r.default)(d.default.debug_console_node_segment,!a.DebugConsoleNode.is(Z)&&d.default.debug_console_node_displayname,d.default.debug_console_variable,c.description?d.default.name:d.default.info)},o.default.createElement(a.TreeWithLinkWrapper,{html:x.linkify(W())})),X=Z=>{const oe=/^true|false$/i,ie=/^(['"]).*\1$/,he=Z.description||"",me=[d.default.debug_console_variable];return a.AnsiConsoleNode.is(Z)?o.default.createElement("div",{className:(0,r.default)(d.default.debug_console_node_segment,d.default.debug_console_node_displayname)},Z.template()):(c.variableType==="number"||c.variableType==="boolean"||c.variableType==="string"?me.push(d.default[c.variableType]):isNaN(+he)?oe.test(he)?me.push(d.default.boolean):ie.test(he)&&me.push(d.default.string):me.push(d.default.number),o.default.createElement("div",{className:(0,r.default)(d.default.debug_console_node_segment_grow,d.default.debug_console_node_description,...me)},o.default.createElement(a.TreeWithLinkWrapper,{html:x.linkify(he)})))},$=()=>o.default.createElement("div",{className:(0,r.default)(d.default.debug_console_node_segment,d.default.debug_console_node_tail)},V()),V=()=>{var Z,oe,ie;return a.AnsiConsoleNode.is(c)?o.default.createElement("div",{className:d.default.debug_console_node_status,title:(Z=c.source)===null||Z===void 0?void 0:Z.path},!((oe=c.source)===null||oe===void 0)&&oe.name?`${(ie=c.source)===null||ie===void 0?void 0:ie.name}:${c.line}`:""):o.default.createElement("div",{className:d.default.debug_console_node_status},c.badge)},H=()=>c.tooltip,K=(Z,oe)=>{const ie=he=>{oe(he,Z,M)};return y&&y?.classlist.indexOf(d.default.mod_loading)>-1?o.default.createElement("div",{className:(0,r.default)(d.default.debug_console_node_segment,L)},o.default.createElement(l.Loading,null)):Z instanceof a.DebugConsoleNode&&Z.variablesReference===0?null:o.default.createElement("div",{onClick:ie,className:(0,r.default)(d.default.debug_console_node_segment,L,(0,v.getIcon)("right"),{[`${d.default.mod_collapsed}`]:!Z.expanded})})},Y=Z=>{if(l.CompositeTreeNode.is(Z))return K(Z,D)};return o.default.createElement("div",{key:c.id,onClick:N,onContextMenu:U,title:H(),className:(0,r.default)(d.default.debug_console_node,y?y.classlist:null),style:{paddingLeft:`${(b||8)+(c.depth||0)*(A||0)}px`},"data-id":c.id},o.default.createElement("div",{className:(0,r.default)(d.default.debug_console_node_content)},Y(c),o.default.createElement("div",{className:d.default.debug_console_node_overflow_wrap,style:{whiteSpace:R?"pre-wrap":"nowrap",cursor:c instanceof a.DebugVariableContainer?"pointer":"initial"}},G(c),X(c)),$()),o.default.createElement("div",{className:d.default.debug_console_selection},S==="matcher"&&Q()))};t.DebugConsoleRenderedNode=f,t.DEBUG_CONSOLE_TREE_NODE_HEIGHT=22,t.DEBUG_CONSOLE_TREE_FIELD_NAME="DEBUG_CONSOLE_TREE_FIELD"},32756:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugViewModel=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26296),v=e(38029);let _=class{constructor(){this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.onDidChangeBreakpointsEmitter=new o.Emitter,this.onDidChangeBreakpoints=this.onDidChangeBreakpointsEmitter.event,this.toDispose=new o.DisposableCollection(this.onDidChangeEmitter,this.onDidChangeBreakpointsEmitter),this._sessions=new Set}fireDidChange(){this.onDidChangeEmitter.fire(void 0)}fireDidChangeBreakpoints(p){this.onDidChangeBreakpointsEmitter.fire(p)}get sessions(){return this._sessions.values()}get sessionCount(){return this._sessions.size}push(p){this._sessions.has(p)||(this._sessions.add(p),this.fireDidChange())}delete(p){return this._sessions.delete(p)?(this.fireDidChange(),!0):!1}get session(){return this.sessions.next().value}get id(){return this.session&&this.session.id||"-1"}get label(){return this.session&&this.session.label||"Unknown Session"}has(p){return!!p&&this._sessions.has(p)}init(p){p&&this.push(p),this.toDispose.push(this.manager.onDidChangeActiveDebugSession(({previous:s,current:h})=>{this.has(s)&&!this.has(h)&&this.fireDidChange()})),this.toDispose.push(this.manager.onDidChange(s=>{this.has(s)&&this.fireDidChange()})),this.toDispose.push(this.manager.onDidDestroyDebugSession(s=>{this.has(s)&&this.fireDidChange()}))}dispose(){this.toDispose.dispose()}get threads(){if(this.manager.currentSession)return this.manager.currentSession.getThreads(()=>!0)}get currentSession(){const{currentSession:p}=this.manager;return this.has(p)&&p||this.session}set currentSession(p){this.manager.updateCurrentSession(p)}get state(){const{currentSession:p}=this;return p&&p.state||l.DebugState.Inactive}get currentThread(){const{currentSession:p}=this;return p&&p.currentThread}get currentFrame(){const{currentThread:p}=this;return p&&p.currentFrame}async start(){const{session:p}=this;if(!p)return;const s=await this.manager.start(p.options);s&&(this._sessions.delete(p),this._sessions.add(s),this.fireDidChange())}async restart(){const{currentSession:p}=this;if(!p)return;const s=await this.manager.restart(p);s!==p&&(this._sessions.delete(p),this._sessions.add(s)),this.fireDidChange()}report(p,s,h){return this.manager.report(p,s,h)}reportTime(p,s){return this.manager.reportTime(p,s)}reportAction(p,s,h){return this.manager.reportAction(p,s,h)}};t.DebugViewModel=_,n.__decorate([(0,r.Autowired)(l.IDebugSessionManager),n.__metadata("design:type",v.DebugSessionManager)],_.prototype,"manager",void 0),t.DebugViewModel=_=n.__decorate([(0,r.Injectable)()],_)},36120:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackFramesView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),v=e(41869),_=e(64582),m=e(91797),p=e(50755),s=n.__importDefault(e(12920)),h=e(85294),a=g=>{const{viewState:d,frames:u,thread:E,indent:f=0,session:c,isBottom:y}=g,[b,A]=(0,o.useState)(),[S,w]=(0,o.useState)(!1),[I,D]=(0,o.useState)([]),[T,R]=(0,o.useState)(""),[M,O]=(0,o.useState)(!1),x=(0,v.useInjectable)(_.IDebugSessionManager),k=(0,o.useRef)([]),F=(0,v.useInjectable)(h.DebugCallStackService),L=(0,o.useCallback)(async()=>{var K,Y;if(!E)return;const Z=typeof((K=E.stoppedDetails)===null||K===void 0?void 0:K.totalFrames)=="number"?((Y=E.stoppedDetails)===null||Y===void 0?void 0:Y.totalFrames)-E.frameCount:void 0,oe=await E.fetchFrames(Z);j(oe)},[I]),N=K=>{K&&K.source&&K.source.open({},K)},U=(0,o.useCallback)(K=>{const Y=k.current.slice(0);let Z=-1;K.nextFrame?Z=Y.findIndex(oe=>{var ie;return p.DebugStackFrame.is(oe)&&oe.id===((ie=K.nextFrame)===null||ie===void 0?void 0:ie.id)}):Z=Y.length,Z>-1&&(Y.splice(Z-1,1,...K.frames),k.current=Y,D(Y))},[k.current,I]),W=(0,o.useCallback)((K,Y)=>{var Z,oe,ie,he;const me=Y.length;let q=-1,be=K.length>0?K[K.length+q]:void 0;for(;be&&!p.DebugStackFrame.is(be);)q-=1,be=K[K.length+q];const fe=K.slice(0,K.length+q+1),te=be?Y.findIndex(Le=>Le.id===be?.id)+1:0;let ge=[],Re,Oe=!1;for(let Le=te;Le<me;Le++)if(!((Z=Y[Le].source)===null||Z===void 0)&&Z.raw.origin)if(Oe)if(Re===((oe=Y[Le].source)===null||oe===void 0?void 0:oe.raw.origin)){ge.push(Y[Le]);continue}else ge.length>1?(fe.push(new p.ShowMoreDebugStackFrame(Y[Le],ge,c,Re,U)),q-=ge.length-1):fe.push(ge[0]),ge=[],Oe=!1,Re=(ie=Y[Le].source)===null||ie===void 0?void 0:ie.raw.origin,ge.push(Y[Le]);else Oe=!0,ge.push(Y[Le]),Re=(he=Y[Le].source)===null||he===void 0?void 0:he.raw.origin;else Oe&&ge.length>0&&(ge.length>1?(fe.push(new p.ShowMoreDebugStackFrame(Y[Le],ge,c,Re,U)),q-=ge.length-1):fe.push(ge[0]),ge=[],Oe=!1),fe.push(Y[Le]);return Oe&&ge.length>0&&(ge.length>1?fe.push(new p.ShowMoreDebugStackFrame(void 0,ge,c,Re,U)):fe.push(ge[0])),fe},[]),j=(0,o.useCallback)(K=>{k.current=W(k.current,K),D(k.current)},[I,W]),Q=(0,o.useCallback)(K=>{A(K)},[b]);(0,o.useEffect)(()=>{j([...u]);const K=new v.DisposableCollection;return K.push(x.onDidChangeActiveDebugSession(({previous:Y})=>{Y&&Y!==E.session&&Q(void 0)})),()=>{K.dispose()}},[]),(0,o.useEffect)(()=>{if(E){const K=E.frames.find(Y=>!!Y.source);K&&(Q(K.raw.id),N(K))}},[E.frameCount]),(0,o.useEffect)(()=>{if(E)if(E.stoppedDetails){const{framesErrorMessage:K,totalFrames:Y}=E.stoppedDetails;R(K||""),Y&&Y>E.frameCount?O(!0):O(!1)}else O(!1);else O(!1)},[I]);const G=({data:K})=>{const Y=K,Z=p.DebugStackFrame.is(Y)&&Y.raw.presentationHint==="label",oe=p.DebugStackFrame.is(Y)&&(0,m.isFrameDeemphasized)(Y.raw),ie=(0,o.useCallback)(()=>{if(!Z){if(!p.DebugStackFrame.is(Y)){Y.open();return}x.updateCurrentSession(Y.session),Y.session.currentThread=Y.thread,Q(Y.raw.id),N(Y)}},[K]),he=be=>{be.preventDefault(),be.stopPropagation(),p.DebugStackFrame.is(Y)&&Y.canRestart&&Y.restart()},me={paddingLeft:`${f}px`};p.DebugStackFrame.is(Y)&&oe&&(me.color="var(--list-deemphasizedForeground)");const q=(0,o.useCallback)(be=>p.DebugStackFrame.is(be)?o.default.createElement(o.default.Fragment,null,o.default.createElement("span",{className:(0,r.default)(s.default.debug_stack_frames_item_label,Z&&s.default.label,(!be.source||!be.source.available||oe)&&s.default.disabled,be.canRestart&&s.default.debug_stack_frames_can_restart)},be.raw&&be.raw.name),!Z&&o.default.createElement("span",{className:s.default.debug_stack_frames_item_description},be.raw&&be.raw.source&&(be.raw.source.name||be.raw.source.path)||(0,v.localize)("debug.stack.frame.noSource")),o.default.createElement(o.default.Fragment,null,be.canRestart&&o.default.createElement("a",{title:"",onClick:fe=>he(fe),className:(0,r.default)(s.default.debug_restart_frame_icon,(0,v.getIcon)("debug-restart-frame"))}),!Z&&!oe&&o.default.createElement("div",{className:(0,r.default)(!(0,v.isUndefined)(be.raw.line)&&s.default.debug_stack_frames_item_badge)},be.raw&&be.raw.line,!(0,v.isUndefined)(be.raw.line)&&":",be.raw&&be.raw.column))):o.default.createElement("span",{className:s.default.debug_stack_frames_load_more},be.name),[]);return o.default.createElement("div",{style:me,className:(0,r.default)(s.default.debug_stack_frames_item,Z&&s.default.is_label,p.DebugStackFrame.is(Y)&&b===Y.raw.id&&s.default.selected,p.DebugStackFrame.is(Y)&&!(Y.raw&&Y.raw.source&&Y.raw.source.name)&&s.default.debug_stack_frames_item_hidden),onClick:ie,onContextMenu:be=>F.handleContextMenu(be,K)},q(Y))},X=(0,o.useCallback)(()=>{const K=async()=>{w(!0),await L(),w(!1)};return o.default.createElement("div",{className:s.default.debug_stack_frames_item,onClick:K},o.default.createElement("span",{className:s.default.debug_stack_frames_load_more},(0,v.localize)("debug.stack.loadMore")))},[S,L]),$=(0,o.useCallback)(()=>o.default.createElement("div",{className:s.default.debug_stack_frames_item},o.default.createElement("span",{className:s.default.debug_stack_frames_load_more},(0,v.localize)("debug.stack.loading"))),[]),V=(0,o.useCallback)(K=>o.default.createElement("div",{className:s.default.debug_stack_frames_item},o.default.createElement("span",{className:s.default.debug_stack_frames_error_message,title:K},K)),[]);if(T)return o.default.createElement("div",{className:s.default.debug_stack_frames},V(T));const H=(0,o.useCallback)(()=>S?$():M?X():null,[S,M]);return o.default.createElement(l.RecycleList,{data:I,template:G,itemHeight:22,width:d.width,height:(S||M?(I.length+1)*22:I.length*22)+(y?10:0),footer:S||M?H:void 0})};t.DebugStackFramesView=a},75651:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackSessionView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(41869),v=e(64582),_=e(8701),m=n.__importDefault(e(12920)),p=e(61520),s=e(85294),h=a=>{const{session:g,viewState:d}=a,u=(0,l.useInjectable)(v.IDebugSessionManager),E=(0,l.useInjectable)(s.DebugCallStackService),[f,c]=(0,o.useState)([]),[y,b]=(0,o.useState)([]),[A,S]=(0,o.useState)([]),[w,I]=(0,o.useState)([]),[D,T]=(0,o.useState)(!0),[R,M]=(0,o.useState)(!1),[O,x]=(0,o.useState)(!0),k=u.sessions.length>1,F=g.supportsThreadIdCorrespond,L=(0,o.useRef)(!1),N=()=>{var X,$;const V=u.sessions.filter(K=>K.parentSession),H=[];for(;V[0];)(($=u.getSession((X=V[0].parentSession)===null||X===void 0?void 0:X.id))===null||$===void 0?void 0:$.id)===g.id&&H.push(V[0]),V.shift();return H},U=async()=>{x(!0);const X=await g.fetchThreads();x(!1),b(X)};(0,o.useEffect)(()=>{const X=new l.DisposableCollection;return X.push(u.onDidCreateDebugSession(()=>{if(L.current)return;const $=N();I($)})),X.push(u.onDidDestroyDebugSession(()=>{if(L.current)return;const $=N();I($)})),()=>{L.current=!0,X.dispose()}},[]);const W=(0,o.useCallback)(X=>{c(X)},[f]),j=(0,o.useCallback)(X=>{S(X)},[A]);(0,o.useEffect)(()=>{W(Array.from(g.threads));const X=new l.DisposableCollection;return X.push(g.onDidChange(()=>{W([...g.threads])})),X.push(g.onDidThread(async({body:{reason:$}})=>{g.supportsThreadIdCorrespond&&g.state===v.DebugState.Stopped&&$==="started"&&await U()})),X.push(g.onDidStop(async()=>{if(!g.supportsThreadIdCorrespond)return;const $=Array.from(g.multipleThreadPaused.values());j($),await U()})),X.push(g.onDidContinued(async()=>{if(!g.supportsThreadIdCorrespond)return;const $=Array.from(g.multipleThreadPaused.values());j($)})),()=>{X.dispose()}},[]);const Q=()=>{if(g.state!==v.DebugState.Stopped)return null;if(F&&D)return O?o.default.createElement("div",{className:m.default.debug_stack_item_loading},o.default.createElement("span",null,(0,l.localize)("debug.stack.loading"))):y.map((X,$)=>!g.hasInMultipleThreadPaused(X.raw.id)&&o.default.createElement(_.DebugStackThreadView,{key:X.id,indent:k?16:0,viewState:d,thread:X,session:g,isBottom:$===y.length-1}))};if((X=>{if(X.threads.some(V=>V.frameCount>0))return!1;const $=N();return!($.length!==1||!$[0].compact)})(g)){const X=N();return o.default.createElement("div",{className:m.default.debug_stack_item},X.map($=>o.default.createElement(t.DebugStackSessionView,{key:$.id,viewState:d,session:$,indent:1})))}return o.default.createElement("div",{className:m.default.debug_stack_item,onContextMenu:X=>E.handleContextMenu(X,g)},k&&o.default.createElement("div",{className:m.default.debug_stack_item_label,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1)},F||f.length>0?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:D?(0,l.getIcon)("arrow-down"):(0,l.getIcon)("arrow-right"),onClick:()=>T(!D)}),o.default.createElement("div",{className:(0,r.default)([(0,l.getIcon)("debug"),m.default.debug_session_icon])})):o.default.createElement("div",{style:{width:30}}),o.default.createElement("div",{className:m.default.debug_stack_item_label_title},g.label),R&&o.default.createElement(p.DebugStackOperationView,{session:g})),F&&D?A.map((X,$)=>o.default.createElement(_.DebugStackThreadView,{key:X.id,indent:k?16:0,viewState:d,thread:X,session:g,isBottom:$===A.length-1})):null,!F&&(!k||D)&&f.map((X,$)=>o.default.createElement(_.DebugStackThreadView,{key:X.id,indent:k?16:0,viewState:d,thread:X,session:g,isBottom:$===f.length-1})),w.length>0&&w.map(X=>D&&o.default.createElement(t.DebugStackSessionView,{key:X.id,viewState:d,session:X,indent:1})),Q())};t.DebugStackSessionView=h},8701:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackThreadView=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(41869),v=e(64582),_=e(36120),m=n.__importDefault(e(12920)),p=e(61520),s=e(85294),h=a=>{var g;const{thread:d,viewState:u,indent:E,session:f,isBottom:c}=a,y=(0,l.useInjectable)(v.IDebugSessionManager),b=(0,l.useInjectable)(s.DebugCallStackService),[A,S]=(0,r.useState)(!0),[w,I]=(0,r.useState)(d.frames),D=y.sessions.length>1,T=!((g=y.currentSession)===null||g===void 0)&&g.supportsThreadIdCorrespond?!0:y.sessions.length>1||y.sessions[0]&&y.sessions[0].threadCount>1,R=(0,r.useCallback)(O=>{S(O)},[A]);(0,r.useEffect)(()=>{const O=new l.DisposableCollection;return O.push(f.onDidChangeCallStack(()=>{I(d.frames),d.stopped&&y.currentThread&&y.currentThread.id===d.id?R(!0):R(!1)})),()=>{O.dispose()}},[]);const M=d.stopped&&d.stoppedDetails?d.raw.id===d.stoppedDetails.threadId?`${(0,l.localize)("debug.stack.frame.because")} ${d.stoppedDetails.reason} ${(0,l.localize)("debug.stack.frame.stopped")}`:(0,l.localize)("debug.stack.frame.stopped"):(0,l.localize)("debug.stack.frame.running");return r.default.createElement("div",{className:m.default.debug_stack_item,onContextMenu:O=>b.handleContextMenu(O,d)},T&&r.default.createElement("div",{style:{paddingLeft:`${E}px`},className:m.default.debug_stack_item_label},d.frames.length>0?r.default.createElement("div",{className:A?(0,l.getIcon)("arrow-down"):(0,l.getIcon)("arrow-right"),onClick:()=>S(!A)}):r.default.createElement("div",{style:{width:14}}),r.default.createElement("div",{className:m.default.debug_threads_item},d.raw.name),r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:m.default.debug_threads_operation},r.default.createElement(p.DebugStackOperationView,{thread:d})),r.default.createElement("span",{className:m.default.debug_threads_description},r.default.createElement(o.Badge,null,M.toUpperCase())))),(!T||A)&&d.frames.length>0&&r.default.createElement(_.DebugStackFramesView,{indent:T?D?38:30:8,isBottom:c,viewState:u,thread:d,frames:w,session:f}))};t.DebugStackThreadView=h},37243:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),v=e(64582),_=e(4983),m=e(26296),p=e(38029);function s(g){return g&&typeof g.sessionId=="string"&&typeof g.threadId=="string"&&typeof g.frameId=="string"}function h(g,d){if(s(d)){const u=g.getSession(d.sessionId);if(u){const E=[u.currentThread,...u.threads].find(f=>f.id===d.threadId);if(E)return E.frames.find(f=>f.id===d.frameId)}}}let a=class{registerCommands(d){d.registerCommand(v.DEBUG_COMMANDS.RESTART_FRAME,{execute:async(u,E)=>{const f=h(this.debugSessionManager,E);f&&await f.restart()}}),d.registerCommand(v.DEBUG_COMMANDS.COPY_STACK_TRACE,{execute:async(u,E)=>{const f=h(this.debugSessionManager,E);if(f){const c=f.thread.frames.map(y=>`${y.raw&&y.raw.name} (${y.raw&&y.raw.source&&y.raw.source.path}:${y.raw&&y.raw.line})`);this.clipboardService.writeText(c.join(`
33905
- `))}}})}registerMenus(d){d.registerMenuItem(l.MenuId.DebugCallStackContext,{command:{id:v.DEBUG_COMMANDS.RESTART_FRAME.id,label:(0,o.localize)("debugger.menu.restartFrame")},when:`${_.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame")} && ${_.CONTEXT_RESTART_FRAME_SUPPORTED.raw}`,enabledWhen:_.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.raw,order:10}),d.registerMenuItem(l.MenuId.DebugCallStackContext,{command:{id:v.DEBUG_COMMANDS.COPY_STACK_TRACE.id,label:(0,o.localize)("debugger.menu.copyCallstack")},when:_.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame"),order:20})}};t.DebugCallStackContribution=a,n.__decorate([(0,r.Autowired)(m.IDebugSessionManager),n.__metadata("design:type",p.DebugSessionManager)],a.prototype,"debugSessionManager",void 0),n.__decorate([(0,r.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],a.prototype,"clipboardService",void 0),t.DebugCallStackContribution=a=n.__decorate([(0,o.Domain)(l.MenuContribution,o.CommandContribution)],a)},61520:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackOperationView=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),l=e(66498),v=e(96090),_=n.__importDefault(e(12920)),m=p=>{const{session:s,thread:h}=p,{doStop:a,doStepIn:g,doStepOut:d,doStepOver:u,doContinue:E,doRestart:f,doPause:c,updateCurrentSession:y}=(0,o.useInjectable)(v.DebugToolbarService);if(s&&!h){const b=A=>{y(s),A()};return r.default.createElement("div",{className:_.default.debug_stack_session_operations},r.default.createElement(l.DebugAction,{run:()=>b(f),icon:"reload",label:(0,o.localize)("debug.action.restart")}),r.default.createElement(l.DebugAction,{run:()=>b(a),icon:"stop",label:(0,o.localize)("debug.action.stop")}))}if(!s&&h){const{stopped:b}=h,A=w=>{h.session.currentThread=h,w()},S=w=>w?r.default.createElement(l.DebugAction,{run:()=>A(E),icon:"continue",label:(0,o.localize)("debug.action.continue")}):r.default.createElement(l.DebugAction,{run:()=>A(c),enabled:!0,icon:"pause",label:(0,o.localize)("debug.action.pause")});return r.default.createElement("div",{className:_.default.debug_stack_thread_operations},S(b),r.default.createElement(l.DebugAction,{run:()=>A(u),enabled:b,icon:"step",label:(0,o.localize)("debug.action.step-over")}),r.default.createElement(l.DebugAction,{run:()=>A(g),enabled:b,icon:"step-in",label:(0,o.localize)("debug.action.step-into")}),r.default.createElement(l.DebugAction,{run:()=>A(d),enabled:b,icon:"step-out",label:(0,o.localize)("debug.action.step-out")}))}return null};t.DebugStackOperationView=m},85294:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackService=void 0;const n=e(85608),r=e(76003),o=e(93899),l=e(50755),v=e(4983),_=e(17280),m=e(29539);let p=class{constructor(){this.handleContextMenu=(h,a)=>{this.stackFrameSupportsRestart.reset(),h.stopPropagation(),h.preventDefault(),a instanceof m.DebugSession?this.callStackItemType.set("session"):a instanceof l.DebugThread?this.callStackItemType.set("thread"):a instanceof l.DebugStackFrame?(this.callStackItemType.set("stackFrame"),this.stackFrameSupportsRestart.set(a.canRestart)):this.callStackItemType.reset();const{x:g,y:d}=h.nativeEvent,u=this.contextMenuService.createMenu({id:o.MenuId.DebugCallStackContext,contextKeyService:this.debugContextKey.contextKeyScoped}),E=u.getMergedMenuNodes();u.dispose();const f=()=>{var y;return a instanceof l.DebugStackFrame?!((y=a.source)===null||y===void 0)&&y.inMemory?a.source.raw.path||a.source.reference||a.source.name:a.source?a.source.uri.toString():"":a instanceof l.DebugThread||a instanceof m.DebugSession?a.id:""},c=()=>a instanceof l.DebugStackFrame?{sessionId:a.session.id,threadId:a.thread.id,frameId:a.id}:a instanceof l.DebugThread?{sessionId:a.session.id,threadId:a.id}:a instanceof m.DebugSession?{sessionId:a.id}:void 0;this.ctxMenuRenderer.show({anchor:{x:g,y:d},menuNodes:E,args:[f(),c()],contextKeyService:this.debugContextKey.contextKeyScoped})},this.stackFrameSupportsRestart||(this.stackFrameSupportsRestart=v.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.bind(this.debugContextKey.contextKeyScoped)),this.callStackItemType||(this.callStackItemType=v.CONTEXT_CALLSTACK_ITEM_TYPE.bind(this.debugContextKey.contextKeyScoped))}};t.DebugCallStackService=p,n.__decorate([(0,r.Autowired)(o.AbstractContextMenuService),n.__metadata("design:type",o.AbstractContextMenuService)],p.prototype,"contextMenuService",void 0),n.__decorate([(0,r.Autowired)(o.ICtxMenuRenderer),n.__metadata("design:type",o.ICtxMenuRenderer)],p.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,r.Autowired)(_.DebugContextKey),n.__metadata("design:type",_.DebugContextKey)],p.prototype,"debugContextKey",void 0),t.DebugCallStackService=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},18028:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackView=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),l=e(64582),v=e(75651),_=n.__importDefault(e(12920)),m=({viewState:p})=>{const s=(0,o.useInjectable)(l.IDebugSessionManager),[h,a]=r.default.useState([]);return r.default.useEffect(()=>{const g=s.onDidStartDebugSession(u=>{h.push(u),a([...h])}),d=s.onDidDestroyDebugSession(u=>{const E=h.findIndex(f=>f.id===u.id);h.splice(E,1),a([...h])});return()=>{g.dispose(),d.dispose()}},[]),r.default.createElement("div",{className:_.default.call_stack_wrapper},h.filter(g=>!g.parentSession).map(g=>r.default.createElement(v.DebugStackSessionView,{key:g.id,viewState:p,session:g,indent:0})))};t.DebugCallStackView=m},59334:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugVariablesModel=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(98650);let m=n=class extends l.TreeModel{constructor(s){super(),this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(s)}init(s){this.root=s,this.root.watcher.on(l.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};t.DebugVariablesModel=m,m.DEFAULT_FLUSH_DELAY=100,t.DebugVariablesModel=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[_.ExpressionContainer])],m)},30865:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugVariablesModelService=void 0;const r=e(85608),o=r.__importDefault(e(46343)),l=e(76003),v=e(97267),_=e(41869),m=e(93899),p=e(98650),s=e(32756),h=e(17280),a=e(59334),g=r.__importDefault(e(57259));class d{constructor(){this._keepExpandedScopesMap=new Map}getMirrorScope(f){return Array.from(this._keepExpandedScopesMap.keys()).find(c=>(0,o.default)(c,f.getRawScope()))}set(f){const c=f.getRawScope();if(c){const y=this.getMirrorScope(f);if(y){const b=this._keepExpandedScopesMap.get(y);let A;f.expanded?A=Array.from(new Set([...b,f.variablesReference])):A=b.filter(S=>S!==f.variablesReference),this._keepExpandedScopesMap.set(y,A)}else this._keepExpandedScopesMap.set(c,f.expanded?[f.variablesReference]:[])}}get(f){const c=this.getMirrorScope(f);return c?this._keepExpandedScopesMap.get(c)||[]:[]}clear(){this._keepExpandedScopesMap.clear()}}let u=n=class{constructor(){this.selectedDecoration=new v.Decoration(g.default.mod_selected),this.focusedDecoration=new v.Decoration(g.default.mod_focused),this.contextMenuDecoration=new v.Decoration(g.default.mod_actived),this.loadingDecoration=new v.Decoration(g.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new _.Emitter,this.onDidUpdateTreeModelEmitter=new _.Emitter,this.flushDispatchChangeDelayer=new _.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new _.DisposableCollection,this.keepExpandedScopesModel=new d,this.activeNodeDecoration=(f,c=!0)=>{var y;if(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),f){if(this.selectedNodes.length>0)for(const b of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(b);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(f),this.focusedDecoration.addTarget(f),this._focusedNode=f,this._selectedNodes=[f],c&&((y=this.treeModel)===null||y===void 0||y.dispatchChange())}},this.activeNodeActivedDecoration=f=>{var c;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(f),this._contextMenuNode=f,(c=this.treeModel)===null||c===void 0||c.dispatchChange()},this.enactiveNodeDecoration=()=>{var f;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(f=this.treeModel)===null||f===void 0||f.dispatchChange()},this.handleContextMenu=(f,c)=>{var y;if(f.stopPropagation(),f.preventDefault(),!c||c instanceof p.DebugScope){this.enactiveNodeDecoration(),this.debugContextKey.contextVariableEvaluateNamePresent.set(!1);return}this._currentVariableInternalContext=c;const{x:b,y:A}=f.nativeEvent;c&&(this.activeNodeActivedDecoration(c),this.debugContextKey.contextDebugProtocolVariableMenu.set(c.variableMenuContext),this.debugContextKey.contextVariableEvaluateNamePresent.set(!!c.evaluateName)),!((y=c.session)===null||y===void 0)&&y.capabilities.supportsReadMemoryRequest&&c.memoryReference!==void 0?this.debugContextKey.contextCanViewMemory.set(!0):this.debugContextKey.contextCanViewMemory.set(!1);const S=this.contextMenuService.createMenu({id:m.MenuId.DebugVariablesContext,contextKeyService:this.debugContextKey.contextKeyScoped}),w=S.getMergedMenuNodes();S.dispose(),this.ctxMenuRenderer.show({anchor:{x:b,y:A},menuNodes:w,args:[c.toDebugProtocolObject()]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=f=>{this.activeNodeDecoration(f)},this.handleTwistierClick=(f,c)=>{c===v.TreeNodeType.CompositeTreeNode?(this.activeNodeDecoration(f,!1),this.toggleDirectory(f)):this.activeNodeDecoration(f)},this.toggleDirectory=async f=>{f.expanded?f.setCollapsed():await f.setExpanded(!0),this.keepExpandedScopesModel.set(f)},this.listenViewModelChange()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get treeHandle(){return this._debugVariablesTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get currentVariableInternalContext(){return this._currentVariableInternalContext}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}listenViewModelChange(){this.viewModel.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{var f,c;if(this.viewModel&&this.viewModel.currentSession&&!this.viewModel.currentSession.terminated){const y=await this.initTreeModel(this.viewModel.currentSession);this._activeTreeModel=y,await((f=this._activeTreeModel)===null||f===void 0?void 0:f.ensureReady);const b=((c=this._activeTreeModel)===null||c===void 0?void 0:c.root.children)||[];if(b.length>0&&b.every(S=>!S.expanded))for(const S of b)S.getRawScope().expensive===!1&&!S.expanded&&await this.toggleDirectory(S);const A=async S=>{for(const w of S)this.keepExpandedScopesModel.get(w).includes(w.variablesReference)&&(await w.setExpanded(!0),Array.isArray(w.children)&&await A(w.children))};b.forEach(async S=>{Array.isArray(S.children)&&await A(S.children)})}else this._activeTreeModel=void 0,this.keepExpandedScopesModel.clear();this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel)})})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(v.TreeNodeEvent.WillResolveChildren,f=>{this.loadingDecoration.addTarget(f)})),this.disposableCollection.push(this.treeModel.root.watcher.on(v.TreeNodeEvent.DidResolveChildren,f=>{this.loadingDecoration.removeTarget(f)})))}async initTreeModel(f){const c=new p.DebugVariableRoot(f);if(c)return this._activeTreeModel=this.injector.get(a.DebugVariablesModel,[c]),this.initDecorations(c),this.listenTreeViewChange(),this._activeTreeModel}initDecorations(f){this._decorations=new v.DecorationsManager(f),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.loadingDecoration),this.decorations.removeDecoration(this.contextMenuDecoration))}handleTreeHandler(f){this._debugVariablesTreeHandle={...f,getModel:()=>this.treeModel}}async copyEvaluateName(f){f&&await this.clipboardService.writeText(f.evaluateName)}async copyValue(f){if(!f)return;const y=await(async()=>{if(f.session&&f.session.capabilities.supportsValueFormattingOptions)try{const{variable:{evaluateName:b}}=f;if(b){const A=await f.session.evaluate(b,"clipboard");if(A)return A.result}return""}catch{return""}else return f.value})();y&&await this.clipboardService.writeText(y)}};t.DebugVariablesModelService=u,u.DEFAULT_TRIGGER_DELAY=200,r.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),r.__metadata("design:type",l.Injector)],u.prototype,"injector",void 0),r.__decorate([(0,l.Autowired)(m.ICtxMenuRenderer),r.__metadata("design:type",m.ICtxMenuRenderer)],u.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,l.Autowired)(m.AbstractContextMenuService),r.__metadata("design:type",m.AbstractContextMenuService)],u.prototype,"contextMenuService",void 0),r.__decorate([(0,l.Autowired)(s.DebugViewModel),r.__metadata("design:type",s.DebugViewModel)],u.prototype,"viewModel",void 0),r.__decorate([(0,l.Autowired)(_.IClipboardService),r.__metadata("design:type",Object)],u.prototype,"clipboardService",void 0),r.__decorate([(0,l.Autowired)(h.DebugContextKey),r.__metadata("design:type",h.DebugContextKey)],u.prototype,"debugContextKey",void 0),t.DebugVariablesModelService=u=n=r.__decorate([(0,l.Injectable)(),r.__metadata("design:paramtypes",[])],u)},86752:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariablesPanelContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),v=e(43718),_=e(57517),m=e(14951),p=e(2156),s=e(72665),h=e(94170),a=e(23268),g=e(64582),d=e(61752),u=e(32756),E=e(4983),f=e(95033),c=e(30865);let y=class{registerCommands(A){A.registerCommand(g.DEBUG_COMMANDS.SET_VARIABLE_VALUE,{execute:async()=>{var I;this.reporterService.point(g.DEBUG_REPORT_NAME===null||g.DEBUG_REPORT_NAME===void 0?void 0:g.DEBUG_REPORT_NAME.DEBUG_VARIABLES,g.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id);const{currentVariableInternalContext:D}=this.debugVariablesModelService;if(!D)return;const T=await this.quickInputService.open({placeHolder:(0,o.localize)("debugger.menu.setValue.param"),value:D.description.replace(/^\"(.*)\"$/,"$1")});if(T!=null){try{await D.setValue(T)}catch(R){this.messageService.error(R.message)}(I=this.debugVariablesModelService.treeModel)===null||I===void 0||I.dispatchChange()}}}),A.registerCommand(g.DEBUG_COMMANDS.COPY_VARIABLE_VALUE,{execute:async()=>{const{currentVariableInternalContext:I}=this.debugVariablesModelService;this.debugVariablesModelService.copyValue(I)}}),A.registerCommand(g.DEBUG_COMMANDS.COPY_EVALUATE_PATH,{execute:async()=>{const{currentVariableInternalContext:I}=this.debugVariablesModelService;this.debugVariablesModelService.copyEvaluateName(I)}}),A.registerCommand(g.DEBUG_COMMANDS.ADD_TO_WATCH_ID,{execute:async I=>{const{currentVariableInternalContext:D}=this.debugVariablesModelService;if(I instanceof v.URI){const T=this.workbenchEditorService.currentEditor;if(!T?.monacoEditor||!T?.monacoEditor.hasModel())return;const R=T.monacoEditor,M=R.getModel().getValueInRange(R.getSelection());this.debugWatchModelService.addWatchExpression(M);return}else D&&this.debugWatchModelService.addWatchExpression(D.evaluateName)}});const S="ms-vscode.hexeditor",w=`${v.CUSTOM_EDITOR_SCHEME}-hexEditor.hexedit`;A.registerCommand(g.DEBUG_COMMANDS.VIEW_MEMORY_ID,{execute:async I=>{var D;const T=await this.commandService.executeCommand("extension.getDescription",S);if(T&&T.enabled){const R=(D=this.viewModel.currentSession)===null||D===void 0?void 0:D.id,M=I.memoryReference;this.workbenchEditorService.open(v.URI.from({scheme:E.DEBUG_MEMORY_SCHEME,authority:R,path:"/"+encodeURIComponent(M||"")+"/memory.bin"}),{disableNavigate:!0,preview:!0,forceOpenType:{type:_.EditorOpenType.component,componentId:w}})}else this.messageService.warning((0,o.localize)("debug.variables.view.memory.prompt.hexEditor.notInstalled"))}})}async initialize(){this.fileSystem.registerProvider(E.DEBUG_MEMORY_SCHEME,this.debugMemoryFileSystemProvider)}registerResource(A){A.registerResourceProvider({scheme:E.DEBUG_MEMORY_SCHEME,provideResource:async S=>({uri:S,icon:(0,o.getIcon)("hex"),name:S.displayName})})}registerMenus(A){var S;A.registerMenuItem(l.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.setValue")},order:10,when:E.CONTEXT_SET_VARIABLE_SUPPORTED.raw,group:"3_modification"}),A.registerMenuItem(l.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.COPY_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.copyValue")},order:10,group:"5_cutcopypaste"}),A.registerMenuItem(l.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.COPY_EVALUATE_PATH.id,label:(0,o.localize)("debugger.menu.copyEvaluatePath")},when:E.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:20,group:"5_cutcopypaste"}),A.registerMenuItem(l.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:E.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:100,group:"z_commands"}),A.registerMenuItem(l.MenuId.EditorContext,{command:{id:g.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:(S=a.ContextKeyExpr.and(h.EditorContextKeys.hasNonEmptySelection,h.EditorContextKeys.editorTextFocus))===null||S===void 0?void 0:S.keys().reduce((w,I)=>w+" && "+I,E.CONTEXT_IN_DEBUG_MODE.raw),group:"debug",order:1}),A.registerMenuItem(l.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.VIEW_MEMORY_ID.id,label:(0,o.localize)("debug.variables.view.memory")},iconClass:"",when:`${E.CONTEXT_CAN_VIEW_MEMORY.equalsTo(!0)} && ${E.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,type:"icon"})}};t.VariablesPanelContribution=y,n.__decorate([(0,r.Autowired)(o.IQuickInputService),n.__metadata("design:type",Object)],y.prototype,"quickInputService",void 0),n.__decorate([(0,r.Autowired)(c.DebugVariablesModelService),n.__metadata("design:type",c.DebugVariablesModelService)],y.prototype,"debugVariablesModelService",void 0),n.__decorate([(0,r.Autowired)(f.DebugWatchModelService),n.__metadata("design:type",f.DebugWatchModelService)],y.prototype,"debugWatchModelService",void 0),n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],y.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(s.IMessageService),n.__metadata("design:type",Object)],y.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],y.prototype,"reporterService",void 0),n.__decorate([(0,r.Autowired)(v.CommandService),n.__metadata("design:type",Object)],y.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(u.DebugViewModel),n.__metadata("design:type",u.DebugViewModel)],y.prototype,"viewModel",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",p.FileServiceClient)],y.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(d.DebugMemoryFileSystemProvider),n.__metadata("design:type",d.DebugMemoryFileSystemProvider)],y.prototype,"debugMemoryFileSystemProvider",void 0),t.VariablesPanelContribution=y=n.__decorate([(0,o.Domain)(o.ClientAppContribution,_.BrowserEditorContribution,l.MenuContribution,o.CommandContribution)],y)},28875:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_VARIABLE_TREE_NODE_HEIGHT=t.DebugVariableRenderedNode=t.DebugVariableView=t.DEBUG_VARIABLE_TREE_FIELD_NAME=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=e(41869),_=e(98650),m=e(30865),p=n.__importDefault(e(57259));t.DEBUG_VARIABLE_TREE_FIELD_NAME="DEBUG_VARIABLE_TREE_FIELD";const s=({viewState:a})=>{const g=(0,v.useInjectable)(m.DebugVariablesModelService),d=o.default.useRef(null),[u,E]=o.default.useState(),f=22,{width:c,height:y}=a;o.default.useEffect(()=>{const M=g.onDidUpdateTreeModel(async O=>{E(O)});return()=>{M.dispose(),g.removeNodeDecoration(),E(void 0)}},[]);const b=M=>{g.handleTreeHandler({...M,hasDirectFocus:()=>d.current===document.activeElement})},A=(M,O,x)=>{M.stopPropagation();const{handleTwistierClick:k}=g;O&&k(O,x)},S=(M,O)=>{const{handleContextMenu:x}=g;x(M,O)},w=M=>{const{handleContextMenu:O}=g;O(M)},I=M=>{const{enactiveNodeDecoration:O}=g;O()},D=M=>{const{enactiveNodeDecoration:O}=g;O()},T=o.default.useCallback(M=>{const O=g.decorations.getDecorations(M.item);return o.default.createElement(t.DebugVariableRenderedNode,{item:M.item,itemType:M.itemType,decorations:O,onClick:A,onTwistierClick:A,onContextMenu:S,defaultLeftPadding:0,leftPadding:8})},[u]),R=()=>u?o.default.createElement(l.RecycleTree,{height:y,width:c,itemHeight:f,onReady:b,model:u,placeholder:()=>o.default.createElement("span",null),overflow:"auto"},T):o.default.createElement("span",null);return o.default.createElement("div",{className:p.default.debug_variables_container,tabIndex:-1,ref:d,onContextMenu:w,onClick:I,onBlur:D,"data-name":t.DEBUG_VARIABLE_TREE_FIELD_NAME},R())};t.DebugVariableView=s;const h=({item:a,decorations:g,defaultLeftPadding:d,leftPadding:u,onClick:E,onTwistierClick:f,onContextMenu:c,itemType:y})=>{const b=(0,v.useDesignStyles)(p.default.expansion_toggle,"expansion_toggle"),A=k=>{E(k,a,l.CompositeTreeNode.is(a)?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode)},S=k=>{k.nativeEvent.which!==0&&(y===l.TreeNodeType.TreeNode||y===l.TreeNodeType.CompositeTreeNode)&&c&&c(k,a,y)},w=`${(d||8)+(a.depth||0)*(u||0)+(_.ExpressionContainer.is(a)?0:18)}px`,I={height:t.DEBUG_VARIABLE_TREE_NODE_HEIGHT,lineHeight:`${t.DEBUG_VARIABLE_TREE_NODE_HEIGHT}px`,paddingLeft:w},D=k=>o.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_segment,p.default.debug_variables_node_displayname,p.default.debug_variables_variable,k.description?p.default.name:"")},k.displayName,k.value?":":""),T=k=>{const F=/^true|false$/i,L=/^(['"]).*\1$/,{description:N=""}=k,U=N!=="undefined"?N.replace("function","\u0192 "):"",W=[p.default.debug_variables_variable];return a.variableType==="number"||a.variableType==="boolean"||a.variableType==="string"?W.push(p.default[a.variableType]):isNaN(+U)?F.test(U)?W.push(p.default.boolean):L.test(U)&&W.push(p.default.string):W.push(p.default.number),o.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_segment_grow,p.default.debug_variables_node_description,...W)},U)},R=()=>o.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_segment,p.default.debug_variables_node_tail)},M()),M=()=>o.default.createElement("div",{className:p.default.debug_variables_node_status},a.badge),O=(k,F)=>{const L=N=>{F(N,k,y)};return g&&g?.classlist.indexOf(p.default.mod_loading)>-1?o.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_segment,b)},o.default.createElement(l.Loading,null)):o.default.createElement("div",{onClick:L,className:(0,r.default)(p.default.debug_variables_node_segment,b,(0,v.getIcon)("right"),{[`${p.default.mod_collapsed}`]:!k.expanded})})},x=k=>{if(l.CompositeTreeNode.is(k))return O(k,f)};return o.default.createElement("div",{key:a.id,onClick:A,onContextMenu:S,title:a.description||"",className:(0,r.default)(p.default.debug_variables_node,g?g.classlist:null),style:I,"data-id":a.id},o.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_content)},x(a),o.default.createElement("div",{className:p.default.debug_variables_node_overflow_wrap},D(a),T(a)),R()))};t.DebugVariableRenderedNode=h,t.DEBUG_VARIABLE_TREE_NODE_HEIGHT=22},85454:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatchModel=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(98650);let m=n=class extends l.TreeModel{constructor(s){super(),this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(s)}init(s){this.root=s,this.root.watcher.on(l.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};t.DebugWatchModel=m,m.DEFAULT_FLUSH_DELAY=100,t.DebugWatchModel=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[_.ExpressionContainer])],m)},95033:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatchModelService=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(93899),m=e(38029),p=e(50755),s=e(98650),h=e(32756),a=e(4983),g=e(26296),d=e(85454),u=r.__importDefault(e(21315)),{Path:E}=v.path;let f=n=class{constructor(){this._changeEventDispatchQueue=[],this.selectedDecoration=new l.Decoration(u.default.mod_selected),this.focusedDecoration=new l.Decoration(u.default.mod_focused),this.contextMenuDecoration=new l.Decoration(u.default.mod_actived),this.loadingDecoration=new l.Decoration(u.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new v.Emitter,this.onDidUpdateTreeModelEmitter=new v.Emitter,this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new v.DisposableCollection,this.loadedDeferred=new v.Deferred,this.activeNodeDecoration=(y,b=!0)=>{var A;if(a.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService),this.contextMenuNode&&(this.focusedDecoration.removeTarget(this.contextMenuNode),this.selectedDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),y){if(this.selectedNodes.length>0)for(const S of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(S);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(y),this.focusedDecoration.addTarget(y),this._focusedNode=y,this._selectedNodes=[y],b&&((A=this.treeModel)===null||A===void 0||A.dispatchChange())}},this.activeNodeActivedDecoration=y=>{var b;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(y),this._contextMenuNode=y,(b=this.treeModel)===null||b===void 0||b.dispatchChange()},this.enactiveNodeDecoration=()=>{var y;a.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService).set(!1),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(y=this.treeModel)===null||y===void 0||y.dispatchChange()},this.handleContextMenu=(y,b)=>{var A;y.stopPropagation(),y.preventDefault();const{x:S,y:w}=y.nativeEvent;b?this.activeNodeActivedDecoration(b):this.enactiveNodeDecoration();let I;b?I=b:I=(A=this.treeModel)===null||A===void 0?void 0:A.root,this.watchItemType.set(I instanceof s.DebugWatchNode?"expression":I instanceof s.DebugVariable||I instanceof s.DebugVariableContainer?"variable":void 0);const D=this.contextMenuService.createMenu({id:_.MenuId.DebugWatchContext,contextKeyService:this.contextMenuContextKeyService}),T=D.getMergedMenuNodes();D.dispose(),this.ctxMenuRenderer.show({anchor:{x:S,y:w},menuNodes:T,args:[I]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=y=>{this.activeNodeDecoration(y)},this.handleTwistierClick=(y,b)=>{if(b===l.TreeNodeType.CompositeTreeNode){if(s.DebugWatchNode.is(y)&&y.available){this.activeNodeDecoration(y,!1),this.toggleDirectory(y);return}else if(y.variablesReference){this.activeNodeDecoration(y,!1),this.toggleDirectory(y);return}}this.activeNodeDecoration(y)},this.toggleDirectory=async y=>{y.expanded?this.treeHandle.collapseNode(y):this.treeHandle.expandNode(y)},this.proxyPrompt=y=>{let b=!1;const A=async S=>{if(!b){if(b=!0,S){if(y instanceof l.NewPromptHandle){const w=y.parent;if(y.addAddonAfter("loading_indicator"),w.session)this.addWatchExpression(S);else{const I=new s.DebugWatchNode(w.session,S,w);this.dispatchWatchEvent(w.path,{type:l.WatchEvent.Added,node:I,id:w.id}),this.debugWatch.addWatchExpression(S)}}else if(y instanceof l.RenamePromptHandle){const w=y.target,I=w.parent;if(y.addAddonAfter("loading_indicator"),I.session)this.debugWatch.renameWatchExpression(w.name,S),this.initTreeModel();else{const D=new E(w.path).dir.join(S).toString();this.dispatchWatchEvent(I.path,{type:l.WatchEvent.Moved,oldPath:w.path,newPath:D}),this.debugWatch.renameWatchExpression(w.name,S)}}}return!0}};y.destroyed||(y.onCommit(A),y.onBlur(A))},this.flushEventQueue=()=>{let y;if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((A,S)=>{const w=E.pathDepth(A),I=E.pathDepth(S);return w-I});const b=[this._changeEventDispatchQueue[0]];for(const A of this._changeEventDispatchQueue)b.some(S=>A.indexOf(S)===0)||b.push(A);return y=(0,v.pSeries)(b.map(A=>async()=>{var S,w;const I=(w=(S=this.treeModel)===null||S===void 0?void 0:S.root)===null||w===void 0?void 0:w.watchEvents.get(A);return I&&typeof I.callback=="function"&&await I.callback({type:l.WatchEvent.Changed,path:A}),null})),this._changeEventDispatchQueue=[],y},this.debugWatch=new p.DebugWatch(this.manager,this.reporterService),this.init(),this.watchItemType=a.CONTEXT_WATCH_ITEM_TYPE.bind(this.contextKeyService)}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get treeHandle(){return this._debugWatchTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}async save(y=[]){await(await this.storageProvider(v.STORAGE_NAMESPACE.DEBUG)).set(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,y)}async load(){const b=await(await this.storageProvider(v.STORAGE_NAMESPACE.DEBUG)).get(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,[]);await this.debugWatch.updateWatchExpressions(b),this.loadedDeferred.resolve()}async init(){await this.loadedDeferred.promise,this.initTreeModel(),this.listenDebugWatchChange()}listenDebugWatchChange(){this.debugWatch.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.initTreeModel()})}),this.debugWatch.onDidVariableChange(async()=>{this.refresh()}),this.debugWatch.onDidExpressionChange(y=>{this.save(y)})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,y=>{this.loadingDecoration.addTarget(y)})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,y=>{this.loadingDecoration.removeTarget(y)})))}async initTreeModel(){const y=await this.debugWatch.getRoot();if(y)return this._activeTreeModel=this.injector.get(d.DebugWatchModel,[y]),this.initDecorations(y),this.listenTreeViewChange(),this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel),this._activeTreeModel}initDecorations(y){this._decorations=new l.DecorationsManager(y),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(y){this._debugWatchTreeHandle=y}async newDebugWatchNodePrompt(){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptNewTreeNode(this.treeModel.root))}async renameDebugWatchNodePrompt(y){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptRename(y))}removeDebugWatchNode(y){this.debugWatch.removeWatchExpression(y.name),y.session?this.initTreeModel():this.dispatchWatchEvent(y.parent.path,{type:l.WatchEvent.Removed,path:y.path})}async copyValue(y){const b=await y.getClipboardValue();b&&await this.clipboardService.writeText(b)}async clearAllExpression(){this.debugWatch.updateWatchExpressions([]),await this.initTreeModel(),this.save()}addWatchExpression(y){this.debugWatch.addWatchExpression(y),this.initTreeModel()}dispatchWatchEvent(y,b){var A;const S=(A=this.treeModel)===null||A===void 0?void 0:A.root.watchEvents.get(y);S&&S.callback&&S.callback(b)}collapsedAll(){var y;(y=this.treeModel)===null||y===void 0||y.root.collapsedAll()}async refresh(y){if(!y)if(this.treeModel)y=this.treeModel.root;else return;!s.ExpressionContainer.is(y)&&y.parent&&(y=y.parent),this.queueChangeEvent(y.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(y,b){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new v.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var A;await this.flushEventQueue(),(A=this.flushEventQueueDeferred)===null||A===void 0||A.resolve(),this.flushEventQueueDeferred=null,b()},n.DEFAULT_REFRESH_DELAY)),this._changeEventDispatchQueue.indexOf(y)===-1&&this._changeEventDispatchQueue.push(y)}};t.DebugWatchModelService=f,f.DEFAULT_REFRESH_DELAY=100,f.DEFAULT_TRIGGER_DELAY=200,f.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY="watchers",r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],f.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(_.ICtxMenuRenderer),r.__metadata("design:type",_.ICtxMenuRenderer)],f.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,o.Autowired)(_.AbstractContextMenuService),r.__metadata("design:type",_.AbstractContextMenuService)],f.prototype,"contextMenuService",void 0),r.__decorate([(0,o.Autowired)(h.DebugViewModel),r.__metadata("design:type",h.DebugViewModel)],f.prototype,"viewModel",void 0),r.__decorate([(0,o.Autowired)(g.IDebugSessionManager),r.__metadata("design:type",m.DebugSessionManager)],f.prototype,"manager",void 0),r.__decorate([(0,o.Autowired)(v.IReporterService),r.__metadata("design:type",Object)],f.prototype,"reporterService",void 0),r.__decorate([(0,o.Autowired)(v.IContextKeyService),r.__metadata("design:type",Object)],f.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(v.StorageProvider),r.__metadata("design:type",Function)],f.prototype,"storageProvider",void 0),r.__decorate([(0,o.Autowired)(v.IClipboardService),r.__metadata("design:type",Object)],f.prototype,"clipboardService",void 0),t.DebugWatchModelService=f=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],f)},14600:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatchPanelContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),v=e(64582),_=e(98650),m=e(4983),p=e(95033);let s=class{registerCommands(a){a.registerCommand(v.DEBUG_COMMANDS.ADD_WATCHER,{execute:()=>{this.debugWatchModelService.newDebugWatchNodePrompt()}}),a.registerCommand(v.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.collapsedAll()}}),a.registerCommand(v.DEBUG_COMMANDS.REMOVE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.clearAllExpression()}}),a.registerCommand(v.DEBUG_COMMANDS.REMOVE_WATCHER,{execute:g=>{g instanceof _.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(g);const[d]=this.debugWatchModelService.selectedNodes;d instanceof _.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(d)}}),a.registerCommand(v.DEBUG_COMMANDS.EDIT_WATCHER,{execute:g=>{this.debugWatchModelService.renameDebugWatchNodePrompt(g)}}),a.registerCommand(v.DEBUG_COMMANDS.COPY_WATCHER_VALUE,{execute:g=>{this.debugWatchModelService.copyValue(g)}})}registerToolbarItems(a){a.registerItem({id:v.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,command:v.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("close-all"),viewId:v.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.removeAll")}),a.registerItem({id:v.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("collapse-all"),command:v.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,viewId:v.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.collapseAll"),when:m.CONTEXT_IN_DEBUG_MODE.raw}),a.registerItem({id:v.DEBUG_COMMANDS.ADD_WATCHER.id,iconClass:(0,o.getIcon)("plus"),command:v.DEBUG_COMMANDS.ADD_WATCHER.id,viewId:v.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.add"),when:m.CONTEXT_IN_DEBUG_MODE.raw})}registerMenus(a){a.registerMenuItem(l.MenuId.DebugWatchContext,{command:{id:v.DEBUG_COMMANDS.ADD_WATCHER.id,label:(0,o.localize)("debug.watch.add")},order:10,group:"3_modification"}),a.registerMenuItem(l.MenuId.DebugWatchContext,{command:{id:v.DEBUG_COMMANDS.EDIT_WATCHER.id,label:(0,o.localize)("debug.watch.edit")},when:m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:20,group:"3_modification"}),a.registerMenuItem(l.MenuId.DebugWatchContext,{command:{id:v.DEBUG_COMMANDS.COPY_WATCHER_VALUE.id,label:(0,o.localize)("debug.watch.copyValue")},when:`${m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression")} || ${m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("variable")} && ${m.CONTEXT_IN_DEBUG_MODE.raw}`,order:30,enabledWhen:m.CONTEXT_IN_DEBUG_MODE.raw,group:"3_modification"}),a.registerMenuItem(l.MenuId.DebugWatchContext,{command:{id:v.DEBUG_COMMANDS.REMOVE_WATCHER.id,label:(0,o.localize)("debug.watch.remove")},when:m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:10,group:"z_commands"}),a.registerMenuItem(l.MenuId.DebugWatchContext,{command:{id:v.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,label:(0,o.localize)("debug.watch.removeAll")},order:20,group:"z_commands"})}registerKeybindings(a){a.registerKeybinding({command:v.DEBUG_COMMANDS.REMOVE_WATCHER.id,keybinding:"ctrlcmd+backspace",when:m.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.raw})}onStart(){this.debugWatchModelService.load()}};t.WatchPanelContribution=s,n.__decorate([(0,r.Autowired)(p.DebugWatchModelService),n.__metadata("design:type",p.DebugWatchModelService)],s.prototype,"debugWatchModelService",void 0),t.WatchPanelContribution=s=n.__decorate([(0,o.Domain)(o.ClientAppContribution,l.MenuContribution,o.CommandContribution,o.TabBarToolbarContribution,o.KeybindingContribution)],s)},64611:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_WATCH_TREE_NODE_HEIGHT=t.DebugWatchRenderedNode=t.DebugWatchView=t.DEBUG_WATCH_TREE_FIELD_NAME=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=e(41869),_=e(98650),m=e(95033),p=n.__importDefault(e(21315));t.DEBUG_WATCH_TREE_FIELD_NAME="DEBUG_WATCH_TREE_FIELD";const s=({viewState:a})=>{const g=(0,v.useInjectable)(m.DebugWatchModelService),d=22,u=o.default.useRef(null),[E,f]=o.default.useState(),{height:c}=a;o.default.useEffect(()=>y(),[]);const y=()=>{const M=g.treeModel;let O=!0;const x=new v.DisposableCollection;return x.push(v.Disposable.create(()=>{O=!1})),M&&M.ensureReady.then(()=>{O&&f(M)}),x.push(g.onDidUpdateTreeModel(async k=>{k&&await k.ensureReady,O&&f(k)})),()=>{g.removeNodeDecoration(),x.dispose()}},b=M=>{g.handleTreeHandler({...M,getModel:()=>E,hasDirectFocus:()=>u.current===document.activeElement})},A=(M,O,x)=>{M.stopPropagation();const{handleTwistierClick:k}=g;O&&k(O,x)},S=(M,O)=>{const{handleContextMenu:x}=g;x(M,O)},w=M=>{const{handleContextMenu:O}=g;O(M)},I=M=>{const{enactiveNodeDecoration:O}=g;O()},D=M=>{const{enactiveNodeDecoration:O}=g;O()},T=o.default.useCallback(M=>{const O=g.decorations.getDecorations(M.item);return o.default.createElement(t.DebugWatchRenderedNode,{item:M.item,itemType:M.itemType,decorations:O,onClick:A,onTwistierClick:A,onContextMenu:S,defaultLeftPadding:12,leftPadding:8})},[E]),R=()=>E?o.default.createElement(l.RecycleTree,{height:c,itemHeight:d,onReady:b,model:E,placeholder:()=>o.default.createElement("span",null)},T):o.default.createElement("span",null);return o.default.createElement("div",{className:p.default.debug_watch_container,tabIndex:-1,ref:u,onContextMenu:w,onClick:I,onBlur:D,"data-name":t.DEBUG_WATCH_TREE_FIELD_NAME},R())};t.DebugWatchView=s;const h=({item:a,decorations:g,defaultLeftPadding:d,leftPadding:u,onClick:E,onTwistierClick:f,onContextMenu:c,itemType:y})=>{const b=(0,v.useDesignStyles)(p.default.expansion_toggle,"expansion_toggle"),A=y===l.TreeNodeType.RenamePrompt,S=y===l.TreeNodeType.NewPrompt,w=A||S,I=N=>{const U=a.getRawWatch();U&&E(N,a,U.variablesReference>0?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode)},D=N=>{N.nativeEvent.which!==0&&(y===l.TreeNodeType.TreeNode||y===l.TreeNodeType.CompositeTreeNode)&&c&&c(N,a,y)},T={height:t.DEBUG_WATCH_TREE_NODE_HEIGHT,lineHeight:`${t.DEBUG_WATCH_TREE_NODE_HEIGHT}px`,paddingLeft:`${(d||8)+(a.depth||0)*(u||0)}px`},R=N=>w&&N instanceof l.PromptHandle?o.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment,p.default.debug_watch_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",p.default.debug_watch_node_prompt_box)},o.default.createElement(N.ProxiedInput,{wrapperStyle:{height:t.DEBUG_WATCH_TREE_NODE_HEIGHT,padding:"0 5px"}}))):o.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment,p.default.debug_watch_node_displayname,p.default.debug_watch_variable,N.description?p.default.name:"")},N.name,N.description?":":""),M=N=>{const U=/^true|false$/i,W=/^(['"]).*\1$/,j=N.description?N.description.replace("function","\u0192 "):"",Q=[p.default.debug_watch_variable];return w?null:(a.variableType==="number"||a.variableType==="boolean"||a.variableType==="string"?Q.push(p.default[a.variableType]):isNaN(+j)?U.test(j)?Q.push(p.default.boolean):W.test(j)&&Q.push(p.default.string):Q.push(p.default.number),o.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment_grow,p.default.debug_watch_node_description,...Q)},j))},O=()=>o.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment,p.default.debug_watch_node_tail)},x()),x=()=>o.default.createElement("div",{className:p.default.debug_watch_node_status},a.badge),k=()=>a.tooltip,F=(N,U)=>{const W=j=>{U(j,N,y)};return g&&g?.classlist.indexOf(p.default.mod_loading)>-1?o.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment,b)},o.default.createElement(l.Loading,null)):o.default.createElement("div",{onClick:W,className:(0,r.default)(p.default.debug_watch_node_segment,b,(0,v.getIcon)("right"),{[`${p.default.mod_collapsed}`]:!N.expanded})})},L=N=>{if(_.DebugWatchNode.is(N)){if(N.available&&N.variablesReference)return F(N,f)}else if(_.ExpressionContainer.is(N)&&N.variablesReference)return F(N,f)};return o.default.createElement("div",{key:a.id,onClick:I,onContextMenu:D,title:k(),className:(0,r.default)(p.default.debug_watch_node,g?g.classlist:null),style:T,"data-id":a.id},o.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_content)},L(a),o.default.createElement("div",{style:{height:t.DEBUG_WATCH_TREE_NODE_HEIGHT},className:w?p.default.debug_watch_node_prompt_wrap:p.default.debug_watch_node_overflow_wrap},R(a),M(a)),O()))};t.DebugWatchRenderedNode=h,t.DEBUG_WATCH_TREE_NODE_HEIGHT=22},46118:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_COMMANDS=void 0;var e;(function(n){n.ADD_WATCHER={id:"debug.watch.add"},n.COLLAPSE_ALL_WATCHER={id:"debug.watch.collapseAll"},n.REMOVE_ALL_WATCHER={id:"debug.watch.removeAll"},n.REMOVE_WATCHER={id:"debug.watch.remove"},n.EDIT_WATCHER={id:"debug.watch.edit"},n.COPY_WATCHER_VALUE={id:"debug.watch.copyValue"},n.REMOVE_ALL_BREAKPOINTS={id:"debug.breakpoints.remove.all"},n.TOGGLE_BREAKPOINTS={id:"debug.breakpoints.toggle"},n.ACTIVE_BREAKPOINTS={id:"debug.breakpoints.active"},n.DEACTIVE_BREAKPOINTS={id:"debug.breakpoints.deactive"},n.START={id:"debug.start"},n.NEXT={id:"debug.next"},n.PREV={id:"debug.prev"},n.OVER={id:"debug.over"},n.STOP={id:"debug.stop"},n.CONTINUE={id:"debug.continue"},n.RESTART={id:"debug.restart"},n.PAUSE={id:"debug.pause"},n.DELETE_BREAKPOINT={id:"debug.delete.breakpoint",label:"%debug.menu.delete.breakpoint%"},n.EDIT_BREAKPOINT={id:"debug.edit.breakpoint",label:"%debug.menu.edit.breakpoint%"},n.DISABLE_BREAKPOINT={id:"debug.disable.breakpoint",label:"%debug.menu.disable.breakpoint%"},n.ENABLE_BREAKPOINT={id:"debug.enable.breakpoint",label:"%debug.menu.enable.breakpoint%"},n.ENABLE_LOGPOINT={id:"debug.enable.logpoint",label:"%debug.menu.enable.logpoint"},n.ADD_BREAKPOINT={id:"debug.add.breakpoint",label:"%debug.menu.add.breakpoint%"},n.ADD_LOGPOINT={id:"debug.add.logpoint",label:"%debug.menu.add.logpoint%"},n.ADD_CONDITIONAL_BREAKPOINT={id:"debug.add.conditional",label:"%debug.menu.add.conditional%"},n.RESTART_FRAME={id:"debug.callstack.restart.frame"},n.COPY_STACK_TRACE={id:"debug.callstack.copy"},n.SET_VARIABLE_VALUE={id:"debug.variables.setValue"},n.COPY_VARIABLE_VALUE={id:"debug.variables.copy"},n.COPY_EVALUATE_PATH={id:"debug.evaluate.copy"},n.ADD_TO_WATCH_ID={id:"debug.addToWatchExpressions"},n.VIEW_MEMORY_ID={id:"debug.variables.view.memory"},n.CLEAR_CONSOLE={id:"debug.console.clear",label:"%debug.console.clear%"},n.COPY_CONSOLE_ITEM={id:"debug.console.copy"},n.COPY_CONSOLE_ALL={id:"debug.console.copyALl"},n.COLLAPSE_ALL_CONSOLE_ITEM={id:"debug.console.collapseAll",label:"%debug.console.collapseAll%"},n.CONSOLE_ENTER_EVALUATE={id:"debug.console.keybing.enter.evaluate"},n.CONSOLE_INPUT_DOWN_ARROW={id:"debug.console.input.down.arrow"},n.CONSOLE_INPUT_UP_ARROW={id:"debug.console.input.up.arrow"},n.CONSOLE_FILTER_FOCUS={id:"debug.console.filter.input.focus"},n.RUN_TO_CURSOR={id:"debug.action.runToCursor",label:"%debug.action.runToCursor%"},n.FORCE_RUN_TO_CURSOR={id:"debug.action.forceRunToCursor",label:"%debug.action.forceRunToCursor%"},n.EXCEPTION_WIDGET_CLOSE={id:"debug.action.closeExceptionWidget"},n.SHOW_ALL_AUTOMATIC_DEBUG_CONFIGURATIONS={id:"debug.showAllAutomaticDebugConfigurations"}})(e||(t.DEBUG_COMMANDS=e={}))},4983:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_DEBUGGERS_AVAILABLE=t.CONTEXT_BREAKPOINTS_EXIST=t.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=t.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=t.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=t.CONTEXT_RESTART_FRAME_SUPPORTED=t.CONTEXT_STEP_BACK_SUPPORTED=t.CONTEXT_FOCUSED_SESSION_IS_ATTACH=t.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=t.CONTEXT_LOADED_SCRIPTS_SUPPORTED=t.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=t.CONTEXT_BREAKPOINT_ACCESS_TYPE=t.CONTEXT_BREAKPOINT_ITEM_TYPE=t.CONTEXT_WATCH_ITEM_TYPE=t.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=t.CONTEXT_CALLSTACK_ITEM_STOPPED=t.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=t.CONTEXT_CALLSTACK_ITEM_TYPE=t.CONTEXT_BREAKPOINT_INPUT_FOCUSED=t.CONTEXT_EXPRESSION_SELECTED=t.CONTEXT_VARIABLES_FOCUSED=t.CONTEXT_WATCH_EXPRESSIONS_EXIST=t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=t.CONTEXT_BREAKPOINTS_FOCUSED=t.CONTEXT_IN_BREAKPOINT_WIDGET=t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=t.CONTEXT_IN_DEBUG_CONSOLE=t.CONTEXT_IN_DEBUG_REPL=t.CONTEXT_IN_DEBUG_MODE=t.CONTEXT_DEBUG_UX=t.CONTEXT_DEBUG_UX_KEY=t.CONTEXT_DEBUG_STATE=t.CONTEXT_DEBUG_CONFIGURATION_TYPE=t.CONTEXT_DEBUG_TYPE=t.CONTEXT_DEBUG_TYPE_KEY=t.CONTEXT_IN_DEBUG_MODE_KEY=t.CONTEXT_DEBUG_STOPPED_KEY=t.DEBUG_SCHEME=t.DEBUG_FLOATING_CLICK_WIDGET=t.DEBUG_STACK_ID=t.DEBUG_WELCOME_ID=t.DEBUG_BREAKPOINTS_ID=t.DEBUG_VARIABLES_ID=t.DEBUG_THREAD_ID=t.DEBUG_WATCH_ID=t.DEBUG_MEMORY_SCHEME=t.LAUNCH_VIEW_COMPONENT_ID=t.LAUNCH_VIEW_SCHEME=t.DEBUG_CONTAINER_ID=t.DEBUG_CONSOLE_CONTAINER_ID=void 0,t.CONTEXT_ACTIVE_BREAKPOINTS=t.CONTEXT_CAN_VIEW_MEMORY=t.CONTEXT_MULTI_SESSION_DEBUG=t.CONTEXT_MULTI_SESSION_REPL=t.CONTEXT_EXCEPTION_WIDGET_VISIBLE=t.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=t.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=t.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=t.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=t.CONTEXT_SET_VARIABLE_SUPPORTED=t.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=void 0;const n=e(30144);Object.defineProperty(t,"DEBUG_CONSOLE_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONSOLE_CONTAINER_ID}}),Object.defineProperty(t,"DEBUG_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONTAINER_ID}});const r=e(40191);t.LAUNCH_VIEW_SCHEME="launch_view_scheme",t.LAUNCH_VIEW_COMPONENT_ID="launch-view",t.DEBUG_MEMORY_SCHEME="vscode-debug-memory",t.DEBUG_WATCH_ID="debug-watch",t.DEBUG_THREAD_ID="debug-thread",t.DEBUG_VARIABLES_ID="debug-variable",t.DEBUG_BREAKPOINTS_ID="debug-breakpoints",t.DEBUG_WELCOME_ID="debug-welcome",t.DEBUG_STACK_ID="debug-stack",t.DEBUG_FLOATING_CLICK_WIDGET="debug.overlayWidget.floatingClickWidget",t.DEBUG_SCHEME="debug",t.CONTEXT_DEBUG_STOPPED_KEY="debugStopped",t.CONTEXT_IN_DEBUG_MODE_KEY="inDebugMode",t.CONTEXT_DEBUG_TYPE_KEY="debugType",t.CONTEXT_DEBUG_TYPE=new r.RawContextKey("debugType",void 0),t.CONTEXT_DEBUG_CONFIGURATION_TYPE=new r.RawContextKey("debugConfigurationType",void 0),t.CONTEXT_DEBUG_STATE=new r.RawContextKey("debugState","Inactive"),t.CONTEXT_DEBUG_UX_KEY="debugUx",t.CONTEXT_DEBUG_UX=new r.RawContextKey(t.CONTEXT_DEBUG_UX_KEY,"default"),t.CONTEXT_IN_DEBUG_MODE=new r.RawContextKey("inDebugMode",!1),t.CONTEXT_IN_DEBUG_REPL=new r.RawContextKey("inDebugRepl",!1),t.CONTEXT_IN_DEBUG_CONSOLE=new r.RawContextKey("inDebugConsole",!1),t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new r.RawContextKey("breakpointWidgetVisible",!1),t.CONTEXT_IN_BREAKPOINT_WIDGET=new r.RawContextKey("inBreakpointWidget",!1),t.CONTEXT_BREAKPOINTS_FOCUSED=new r.RawContextKey("breakpointsFocused",!0),t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new r.RawContextKey("watchExpressionsFocused",!0),t.CONTEXT_WATCH_EXPRESSIONS_EXIST=new r.RawContextKey("watchExpressionsExist",!1),t.CONTEXT_VARIABLES_FOCUSED=new r.RawContextKey("variablesFocused",!0),t.CONTEXT_EXPRESSION_SELECTED=new r.RawContextKey("expressionSelected",!1),t.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new r.RawContextKey("breakpointInputFocused",!1),t.CONTEXT_CALLSTACK_ITEM_TYPE=new r.RawContextKey("callStackItemType",void 0),t.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new r.RawContextKey("callStackSessionIsAttach",!1),t.CONTEXT_CALLSTACK_ITEM_STOPPED=new r.RawContextKey("callStackItemStopped",!1),t.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new r.RawContextKey("callStackSessionHasOneThread",!1),t.CONTEXT_WATCH_ITEM_TYPE=new r.RawContextKey("watchItemType",void 0),t.CONTEXT_BREAKPOINT_ITEM_TYPE=new r.RawContextKey("breakpointItemType",void 0),t.CONTEXT_BREAKPOINT_ACCESS_TYPE=new r.RawContextKey("breakpointAccessType",void 0),t.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new r.RawContextKey("breakpointSupportsCondition",!1),t.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new r.RawContextKey("loadedScriptsSupported",!1),t.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new r.RawContextKey("loadedScriptsItemType",void 0),t.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new r.RawContextKey("focusedSessionIsAttach",!1),t.CONTEXT_STEP_BACK_SUPPORTED=new r.RawContextKey("stepBackSupported",!1),t.CONTEXT_RESTART_FRAME_SUPPORTED=new r.RawContextKey("restartFrameSupported",!1),t.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new r.RawContextKey("stackFrameSupportsRestart",!1),t.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new r.RawContextKey("jumpToCursorSupported",!1),t.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new r.RawContextKey("stepIntoTargetsSupported",!1),t.CONTEXT_BREAKPOINTS_EXIST=new r.RawContextKey("breakpointsExist",!1),t.CONTEXT_DEBUGGERS_AVAILABLE=new r.RawContextKey("debuggersAvailable",!1),t.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new r.RawContextKey("debugProtocolVariableMenuContext",void 0),t.CONTEXT_SET_VARIABLE_SUPPORTED=new r.RawContextKey("debugSetVariableSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new r.RawContextKey("breakWhenValueChangesSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new r.RawContextKey("breakWhenValueIsAccessedSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new r.RawContextKey("breakWhenValueIsReadSupported",!1),t.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new r.RawContextKey("variableEvaluateNamePresent",!1),t.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new r.RawContextKey("exceptionWidgetVisible",!1),t.CONTEXT_MULTI_SESSION_REPL=new r.RawContextKey("multiSessionRepl",!1),t.CONTEXT_MULTI_SESSION_DEBUG=new r.RawContextKey("multiSessionDebug",!1),t.CONTEXT_CAN_VIEW_MEMORY=new r.RawContextKey("canViewMemory",void 0),t.CONTEXT_ACTIVE_BREAKPOINTS=new r.RawContextKey("activateBreakpoints",!0)},95581:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},53670:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MASSIVE_PROPERTY_FLAG=t.DEFAULT_CONFIGURATION_INDEX_SEPARATOR=t.DEFAULT_CONFIGURATION_NAME_SEPARATOR=t.DEFAULT_NO_CONFIGURATION_KEY=t.DEFAULT_DYNAMIC_CONFIGURATION_KEY=t.DEFAULT_EDIT_CONFIGURATION_KEY=t.DEFAULT_ADD_CONFIGURATION_KEY=t.DebugConfiguration=void 0;var e;(function(n){function r(o){return!!o&&typeof o=="object"&&"type"in o&&"name"in o&&"request"in o}n.is=r})(e||(t.DebugConfiguration=e={})),t.DEFAULT_ADD_CONFIGURATION_KEY="__ADD_CONF__",t.DEFAULT_EDIT_CONFIGURATION_KEY="__EDIT_CONF__",t.DEFAULT_DYNAMIC_CONFIGURATION_KEY="__DYNAMIC_CONF__",t.DEFAULT_NO_CONFIGURATION_KEY="__NO_CONF__",t.DEFAULT_CONFIGURATION_NAME_SEPARATOR="__CONF__",t.DEFAULT_CONFIGURATION_INDEX_SEPARATOR="__INDEX__",t.MASSIVE_PROPERTY_FLAG="massive_property_flag"},70049:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugConsoleModelService=void 0,t.IDebugConsoleModelService=Symbol("IDebugConsoleModelService")},24395:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugEditor=void 0,t.DebugEditor=Symbol("DebugEditor")},91797:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFrameDeemphasized=e;function e(n){var r,o;const l=(r=n.presentationHint)!==null&&r!==void 0?r:(o=n.source)===null||o===void 0?void 0:o.presentationHint;return l==="deemphasize"||l==="subtle"}},2242:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},32385:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugModelManager=t.DebugModelSupportedEventType=t.MemoryRegion=t.IDebugModel=t.DebugModelFactory=t.DebugAdapterContribution=t.DebugAdapterFactory=t.DebugAdapterSessionFactory=t.DebugAdapterSession=void 0;const n=e(43718);t.DebugAdapterSession=Symbol("DebugAdapterSession"),t.DebugAdapterSessionFactory=Symbol("DebugAdapterSessionFactory"),t.DebugAdapterFactory=Symbol("DebugAdapterFactory"),t.DebugAdapterContribution=Symbol("DebugAdapterContribution"),t.DebugModelFactory=Symbol("DebugModelFactory"),t.IDebugModel=Symbol("IDebugModel");class r extends n.Disposable{constructor(v,_){super(),this.memoryReference=v,this.session=_,this.invalidateEmitter=this.registerDispose(new n.Emitter),this.onDidInvalidate=this.invalidateEmitter.event,this.writable=!!this.session.capabilities.supportsWriteMemoryRequest,this.registerDispose(_.onDidInvalidateMemory(m=>{m.body.memoryReference===v&&this.invalidate(m.body.offset,m.body.count-m.body.offset)}))}async read(v,_){var m;const p=_-v,s=v,h=await this.session.readMemory(this.memoryReference,s,p);if(h===void 0||!(!((m=h.body)===null||m===void 0)&&m.data))return[{type:1,offset:s,length:p}];let a;try{a=(0,n.decodeBase64)(h.body.data)}catch(u){return[{type:2,offset:s,length:p,error:u.message}]}const g=h.body.unreadableBytes||0,d=p-g;if(a.byteLength<d){const u=n.BinaryBuffer.alloc(d-a.byteLength);u.buffer.fill(0),a=n.BinaryBuffer.concat([a,u],d)}else a.byteLength>d&&(a=a.slice(0,d));return g?[{type:0,offset:s,length:d,data:a},{type:1,offset:s+d,length:g}]:[{type:0,offset:s,length:p,data:a}]}async write(v,_){var m,p;const s=await this.session.writeMemory(this.memoryReference,v,(0,n.encodeBase64)(_),!0),h=(p=(m=s?.body)===null||m===void 0?void 0:m.bytesWritten)!==null&&p!==void 0?p:_.byteLength;return this.invalidate(v,v+h),h}dispose(){super.dispose()}invalidate(v,_){this.invalidateEmitter.fire({fromOffset:v,toOffset:_})}}t.MemoryRegion=r;var o;(function(l){l.down="Down",l.move="Move",l.leave="Leave",l.contextMenu="contextMenu"})(o||(t.DebugModelSupportedEventType=o={})),t.IDebugModelManager=Symbol("DebugModelManager")},79845:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugProgress=void 0,t.IDebugProgress=Symbol("DebugProgress")},60709:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSON_SCHEMA_TYPE=t.launchDefaultSchemaUri=t.launchExtensionSchemaUri=t.launchSchemaUri=void 0,t.launchSchemaUri="vscode://schemas/launch",t.launchExtensionSchemaUri="vscode://schemas/launch/extension",t.launchDefaultSchemaUri="vscode://schemas/launch/user";var e;(function(n){n.ARRAY="array",n.BOOLEAN="boolean",n.NULL="null",n.NUMBER="number",n.OBJECT="object",n.STRING="string"})(e||(t.JSON_SCHEMA_TYPE=e={}))},70159:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILaunchService=t.IDebugService=t.IDebugServer=t.DebugAdapterPath=t.DebugConfigurationProviderTriggerKind=void 0;var e;(function(n){n[n.Initial=1]="Initial",n[n.Dynamic=2]="Dynamic"})(e||(t.DebugConfigurationProviderTriggerKind=e={})),t.DebugAdapterPath="DebugAdaptor",t.IDebugServer=Symbol("DebugServer"),t.IDebugService=Symbol("DebugService"),t.ILaunchService=Symbol("ILaunchService")},50883:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugSessionDTO=void 0;var e;(function(n){function r(o){return"id"in o}n.is=r})(e||(t.IDebugSessionDTO=e={}))},26296:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugSessionManager=t.IDebugSession=t.DebugState=void 0,t.getSequenceId=r;var e;(function(o){o[o.Inactive=0]="Inactive",o[o.Initializing=1]="Initializing",o[o.Running=2]="Running",o[o.Stopped=3]="Stopped"})(e||(t.DebugState=e={})),t.IDebugSession=Symbol("DebugSession"),t.IDebugSessionManager=Symbol("DebugSessionManager");let n=1;function r(){return n++}},64582:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(53670),t),n.__exportStar(e(70159),t),n.__exportStar(e(2242),t),n.__exportStar(e(95581),t),n.__exportStar(e(32385),t),n.__exportStar(e(26296),t),n.__exportStar(e(70049),t),n.__exportStar(e(50883),t),n.__exportStar(e(24395),t),n.__exportStar(e(79845),t),n.__exportStar(e(60709),t),n.__exportStar(e(7428),t),n.__exportStar(e(37723),t),n.__exportStar(e(4983),t),n.__exportStar(e(71120),t),n.__exportStar(e(46118),t)},7428:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},71120:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWindowsDriveLetter=r,t.hasDriveLetter=o,t.getDriveLetter=l,t.prepareCommand=v;const n=e(43718);function r(_){return _>=65&&_<=90||_>=97&&_<=122}function o(_,m=n.isWindows){return m?r(_.charCodeAt(0))&&_.charCodeAt(1)===58:!1}function l(_){return o(_)?_[0]:void 0}function v(_,m,p,s,h){_=_.trim().toLowerCase();let a;_.indexOf("powershell")>=0||_.indexOf("pwsh")>=0?a=1:_.indexOf("cmd.exe")>=0?a=0:_.indexOf("bash")>=0?a=2:n.isWindows?a=0:a=2;let g,d=" ";switch(a){case 1:if(g=u=>(u=u.replace(/'/g,"''"),u.length>0&&u.charAt(u.length-1)==="\\"?`'${u}\\'`:`'${u}'`),s){const u=l(s);u&&(d+=`${u}:; `),d+=`cd ${g(s)}; `}if(h)for(const u in h){const E=h[u];E===null?d+=`Remove-Item env:${u}; `:d+=`\${env:${u}}='${E}'; `}if(m.length>0){const u=m.shift(),E=p?u:g(u);d+=E[0]==="'"?`& ${E} `:`${E} `;for(const f of m)d+=f==="<"||f===">"||p?f:g(f),d+=" "}break;case 0:if(g=u=>(u=u.replace(/"/g,'""'),u=u.replace(/([><!^&|])/g,"^$1"),' "'.split("").some(E=>u.includes(E))||u.length===0?`"${u}"`:u),s){const u=l(s);u&&(d+=`${u}: && `),d+=`cd ${g(s)} && `}if(h){d+='cmd /C "';for(const u in h){let E=h[u];E===null?d+=`set "${u}=" && `:(E=E.replace(/[&^|<>]/g,f=>`^${f}`),d+=`set "${u}=${E}" && `)}}for(const u of m)d+=u==="<"||u===">"||p?u:g(u),d+=" ";h&&(d+='"');break;case 2:{g=E=>(E=E.replace(/(["'\\$!><#()[\]*&^| ;{}`])/g,"\\$1"),E.length===0?'""':E);const u=E=>/[^\w@%/+=,.:^-]/.test(E)?`'${E.replace(/'/g,"'\\''")}'`:E;if(s&&(d+=`cd ${g(s)} ; `),h){d+="/usr/bin/env";for(const E in h){const f=h[E];f===null?d+=` -u ${u(E)}`:d+=` ${u(`${E}=${f}`)}`}d+=" "}for(const E of m)d+=E==="<"||E===">"||p?E:g(E),d+=" ";break}}return d}},37723:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConfigurationsReadyEvent=t.DEBUG_REPORT_NAME=void 0;const n=e(43718);var r;(function(l){l.DEBUG_SESSION_START_TIME="debugSessionStartTime",l.DEBUG_PRE_LAUNCH_TASK_TIME="debugPreLaunchTaskTime",l.DEBUG_TOOLBAR_OPERATION_TIME="debugToolBarOperationTime",l.DEBUG_TOOLBAR_OPERATION="debugToolBarOperation",l.DEBUG_PANEL_OPERATION_FOLDEXPR="debugPanelOperationFoldexpr",l.DEBUG_WATCH="debugWatch",l.DEBUG_VARIABLES="debugVariables",l.DEBUG_BREAKPOINT="debugBreakpoint",l.DEBUG_ADAPTER_PROTOCOL_TIME="debugAdapterProtocolTime",l.DEBUG_STOPPED="debugStopped",l.DEBUG_UI_FRONTEND_TIME="debugFrontEndTime"})(r||(t.DEBUG_REPORT_NAME=r={}));class o extends n.BasicEvent{}t.DebugConfigurationsReadyEvent=o},66482:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(64582),t)},83670:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDecorationsService=void 0;const n=e(85608),r=e(76003),o=e(43718),{isFalsyOrWhitespace:l}=o.strings,{asArray:v}=o.arrays;class _{constructor(){this._data=o.TernarySearchTree.forPaths()}affectsResource(d){return this._data.get(d.toString())||this._data.findSuperstr(d.toString())!==void 0}static debouncer(d,u){if(d||(d=new _),Array.isArray(u))for(const E of u)d._data.set(E.toString(),!0);else d._data.set(u.toString(),!0);return d}}class m{constructor(d,u){this.source=d,this.thenable=u}}class p{constructor(d,u,E){this._provider=d,this._uriEmitter=u,this._flushEmitter=E,this.data=o.TernarySearchTree.forPaths(),this._dispoable=this._provider.onDidChange(f=>{if(!f)this.data.clear(),this._flushEmitter.fire({affectsResource(){return!0}});else for(const c of f)this._fetchData(c)})}dispose(){this._dispoable.dispose(),this.data.clear()}knowsAbout(d){return!!this.data.get(d.toString())||!!this.data.findSuperstr(d.toString())}getOrRetrieve(d,u,E){const f=d.toString();let c=this.data.get(f);if(c===void 0&&(c=this._fetchData(d)),c&&!(c instanceof m)&&E(c,!1),u){const y=this.data.findSuperstr(f);if(y)for(let b=y.next();!b.done;b=y.next())b.value&&!(b.value instanceof m)&&E(b.value,!0)}}_fetchData(d){const u=this.data.get(d.toString());u instanceof m&&(u.source.cancel(),this.data.delete(d.toString()));const E=new o.CancellationTokenSource,f=this._provider.provideDecorations(d,E.token);if((0,o.isThenable)(f)){const c=new m(E,Promise.resolve(f).then(y=>{this.data.get(d.toString())===c&&this._keepItem(d,y)}).catch(y=>{!(0,o.isPromiseCanceledError)(y)&&this.data.get(d.toString())===c&&this.data.delete(d.toString())}));return this.data.set(d.toString(),c),null}else return this._keepItem(d,f)}_keepItem(d,u){const E=u||null,f=this.data.set(d.toString(),E);return(E||f)&&this._uriEmitter.fire(d),E}}function s(g){return v(g).map(({color:u,letter:E})=>`${u}/${E}`).join(",")}function h(g){const d=v(g);if(d.length)return{key:s(g),color:d[0].color,badge:d.filter(u=>!l(u.letter)).map(u=>u.letter).join(","),tooltip:d.filter(u=>!l(u.tooltip)).map(u=>u.tooltip).join(" \u2022 ")}}let a=class extends o.Disposable{constructor(){super(...arguments),this.logger=(0,o.getDebugLogger)(),this._data=new o.LinkedList,this._onDidChangeDecorationsDelayed=new o.Emitter,this._onDidChangeDecorations=new o.Emitter,this.onDidChangeDecorations=o.Event.any(this._onDidChangeDecorations.event,o.Event.debounce(this._onDidChangeDecorationsDelayed.event,_.debouncer,void 0,void 0,500))}dispose(){(0,o.dispose)(this._onDidChangeDecorations),(0,o.dispose)(this._onDidChangeDecorationsDelayed)}registerDecorationsProvider(d){this.logger.log("DecorationService#registerDecorationsProvider",d);const u=new p(d,this._onDidChangeDecorationsDelayed,this._onDidChangeDecorations),E=this._data.push(u);return this._onDidChangeDecorations.fire({affectsResource(){return!0}}),(0,o.toDisposable)(()=>{E(),this._onDidChangeDecorations.fire({affectsResource:f=>u.knowsAbout(f)}),u.dispose()})}getDecoration(d,u){const E=[];let f=!1;for(let c=this._data.iterator(),y=c.next();!y.done;y=c.next())y.value.getOrRetrieve(d,u,(b,A)=>{(!A||b.bubble)&&(E.push(b),f=A||f)});if(E.length!==0)return this.asDecoration(E,f)}asDecoration(d,u){d.sort((f,c)=>(c.weight||0)-(f.weight||0));const E=h(d);return E&&u&&(E.badge="\u2022",E.tooltip=(0,o.localize)("bubbleTitle","Contains emphasized items")),E}};t.FileDecorationsService=a,t.FileDecorationsService=a=n.__decorate([(0,r.Injectable)()],a)},4958:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93364),v=e(83670);let _=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:l.IDecorationsService,useClass:v.FileDecorationsService}]}};t.DecorationModule=_,t.DecorationModule=_=n.__decorate([(0,r.Injectable)()],_)},93364:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationsService=void 0;const n=e(43718);class r extends n.Disposable{}t.IDecorationsService=r},87323:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(93364),t)},41893:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(87323),t)},67988:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignCoreContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(1149),v=e(43718),_=e(14951),m=e(2156),p=e(11090),s=e(37517);let h=class{initialize(){this.fileSystem.registerProvider(v.Schemes.design,this.designThemeFileSystemProvider),this.layoutViewSize.setEditorTabsHeight(36,l.ConfigPriority.ModuleDefined),this.layoutViewSize.setStatusBarHeight(36,l.ConfigPriority.ModuleDefined),this.layoutViewSize.setAccordionHeaderSizeHeight(36,l.ConfigPriority.ModuleDefined)}registerRenderer(g){g.registerSlotRenderer(o.SlotLocation.view,p.DesignLeftTabRenderer,{supportedActions:{accordion:!0}}),g.registerSlotRenderer(o.SlotLocation.panel,p.DesignBottomTabRenderer,{isLatter:!0,supportedActions:{expand:!0,toggle:!0}}),g.registerSlotRenderer(o.SlotLocation.extendView,p.DesignRightTabRenderer,{isLatter:!0,supportedActions:{accordion:!0}})}};t.DesignCoreContribution=h,n.__decorate([(0,r.Autowired)(_.IFileServiceClient),n.__metadata("design:type",m.FileServiceClient)],h.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.DesignThemeFileSystemProvider)],h.prototype,"designThemeFileSystemProvider",void 0),n.__decorate([(0,r.Autowired)(l.LayoutViewSizeConfig),n.__metadata("design:type",l.LayoutViewSizeConfig)],h.prototype,"layoutViewSize",void 0),t.DesignCoreContribution=h=n.__decorate([(0,r.Injectable)(),(0,o.Domain)(o.ClientAppContribution,o.SlotRendererContribution)],h)},17242:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(71707),v=e(80832),_=e(97222),m=e(43718),p=e(57517),s=e(52416),h=e(51706),a=e(9132),g=e(67988),d=e(3013),u=e(31385),E=e(72141),f=e(45365),c=n.__importDefault(e(49107)),y=n.__importDefault(e(13925)),b=n.__importDefault(e(63080)),A=e(98741);let S=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[d.DesignMenuBarContribution,g.DesignCoreContribution],this.preferences=I=>{e.e(454).then(e.bind(e,77454)),I.get(v.IDesignStyleService).setStyles(c.default),(0,A.overrideColorToken)(),(0,A.overrideMonacoColorToken)();const T=I.get(m.AppLifeCycleServiceToken);m.Event.once(m.Event.filter(T.onDidLifeCyclePhaseChange,R=>R===3))(()=>{const R=I.get(s.IThemeService);[y.default,b.default].forEach(M=>{R.registerThemes([{id:M.id,label:M.name,path:"",extensionId:M.id,uiTheme:M.base}],o.URI.parse(`${M.id}.json`).withQuery(M.id).withScheme(m.Schemes.design))})}),I.overrideProviders({token:s.IThemeStore,useClass:class extends h.ThemeStore{async getThemeData(R,M){const O=await super.getThemeData(R,M);return document.body.classList.remove(b.default.designThemeType),document.body.classList.remove(y.default.designThemeType),y.default.id===R?.id?document.body.classList.add(y.default.designThemeType):b.default.id===R?.id&&document.body.classList.add(b.default.designThemeType),O}},override:!0,isDefault:!0},{token:s.IThemeService,useClass:class extends a.WorkbenchThemeService{async ensureValidTheme(){return super.ensureValidTheme(y.default.id)}},override:!0,isDefault:!0},{token:p.IEditorTabService,useClass:u.DesignEditorTabService,override:!0,isDefault:!0},{token:l.ISplitPanelService,useClass:f.DesignSplitPanelService,override:!0,isDefault:!0},{token:_.IBrowserCtxMenu,useClass:E.DesignBrowserCtxMenuService})}}};t.DesignModule=S,t.DesignModule=S=n.__decorate([(0,r.Injectable)()],S)},11090:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignRightTabRenderer=t.DesignBottomTabRenderer=t.DesignLeftTabRenderer=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(19951),v=({className:p,components:s,tabbarView:h})=>o.default.createElement(l.LeftTabRenderer,{className:(0,r.default)(p,"design_left_slot"),components:s,tabbarView:h});t.DesignLeftTabRenderer=v;const _=({className:p,components:s})=>o.default.createElement(l.BottomTabRenderer,{className:(0,r.default)(p,"design_bottom_slot"),components:s});t.DesignBottomTabRenderer=_;const m=({className:p,components:s,tabbarView:h,tabpanelView:a})=>o.default.createElement(l.RightTabRenderer,{className:(0,r.default)("design_right_slot",p),components:s,tabbarView:h,tabpanelView:a});t.DesignRightTabRenderer=m},3013:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignMenuBarContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),v=e(64267),_=e(38879),m=e(12458);let p=class extends o.Disposable{constructor(){super(),this.menubarStore.unregisterMenusBarByCompact(l.MenuId.DesignMenuBarTopExtra);let h;this.addDispose(this.menubarStore.onDidMenuBarChange(a=>{h&&h.dispose(),h=this.menuRegistry.registerMenuItems(l.MenuId.DesignMenuBarTopExtra,a.map(g=>{var d;return{label:g.label,submenu:g.id,iconClass:g.iconClass,group:g.group||"1_navigation",order:(d=g.order)!==null&&d!==void 0?d:100}}))}))}registerComponent(h){h.register(_.DESIGN_MENUBAR_CONTAINER_VIEW_ID,{component:m.DesignMenuBarView,id:_.DESIGN_MENUBAR_CONTAINER_VIEW_ID})}};t.DesignMenuBarContribution=p,n.__decorate([(0,r.Autowired)(v.MenubarStore),n.__metadata("design:type",v.MenubarStore)],p.prototype,"menubarStore",void 0),n.__decorate([(0,r.Autowired)(l.IMenuRegistry),n.__metadata("design:type",l.IMenuRegistry)],p.prototype,"menuRegistry",void 0),t.DesignMenuBarContribution=p=n.__decorate([(0,o.Domain)(o.ComponentContribution),n.__metadata("design:paramtypes",[])],p)},12458:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignMenuBarView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(41869),v=e(81878),_=e(89195),m=e(1149),p=e(63373),s=e(93899),h=e(43718),a=e(63067),g=e(55039),d=e(38879),u=n.__importDefault(e(52151)),E=n.__importDefault(e(90946)),f=()=>{const y=(0,l.useInjectable)(s.AbstractContextMenuService),b=(0,l.useInjectable)(m.DesignLayoutConfig),A=(0,l.useInjectable)(s.ICtxMenuRenderer),S=o.useRef(null),[w,I]=o.useState(void 0);o.useEffect(()=>{D()},[]);const D=o.useCallback(O=>{requestAnimationFrame(()=>{if(S.current){const x=S.current.getBoundingClientRect(),{x:k,y:F,width:L,height:N}=x,U={x:k,y:F+N};I(U),O&&O(U)}})},[S.current]),T=o.useMemo(()=>y.createMenu({id:s.MenuId.DesignMenuBarTopExtra}),[y]),R=o.useCallback(()=>{if(!w)return;const O=T.getMergedMenuNodes();T.dispose(),D(x=>{A.show({anchor:x,menuNodes:O})})},[w,T]),M=o.useMemo(()=>b.menubarLogo||u.default,[b.menubarLogo]);return o.createElement(o.Fragment,null,o.createElement(_.EnhanceIcon,{wrapperClassName:E.default.ai_enhance_menu,ref:S,onClick:R},o.createElement("div",{className:E.default.logo_container},o.createElement("img",{className:E.default.extra_top_icon,src:M,alt:""}),o.createElement(v.Icon,{className:(0,r.default)((0,l.getIcon)("down"),E.default.caret_icon)}))))},c=()=>{const y=(0,l.useInjectable)(h.CommandService),b=(0,l.useInjectable)(a.IMainLayoutService),A=(0,l.useInjectable)(l.AINativeConfigService),[S,w]=o.useState(!1);o.useEffect(()=>{requestAnimationFrame(()=>{w(D())});const R=b.getTabbarService(l.SlotLocation.view).onCurrentChange(({previousId:M,currentId:O})=>{M&&!O?w(!1):!M&&O&&w(!0)});return()=>{R.dispose()}},[]);const I=o.useCallback(()=>{y.executeCommand("main-layout.left-panel.toggle"),requestAnimationFrame(()=>{w(D())})},[]),D=o.useCallback(()=>!!b.getTabbarService(l.SlotLocation.view).currentContainerId.get(),[b]);return o.createElement("div",{id:p.VIEW_CONTAINERS.MENUBAR,className:E.default.menu_bar_view,style:{height:A.layoutViewSize.menubarHeight}},o.createElement("div",{className:E.default.container},o.createElement("div",{className:E.default.left},o.createElement(_.EnhanceIcon,{wrapperClassName:E.default.enhance_menu,icon:S?"left-nav-open":"left-nav-close",onClick:I}),o.createElement("span",{className:E.default.dividing}),o.createElement("div",{className:E.default.top_menus_bar},o.createElement(f,null)),o.createElement(l.SlotRenderer,{id:"design-menubar-left",slot:d.DESIGN_MENU_BAR_LEFT,flex:1})),o.createElement("div",{className:E.default.right},o.createElement(g.ToolBar,null),o.createElement(l.SlotRenderer,{id:"design-menubar-right",slot:d.DESIGN_MENU_BAR_RIGHT,flex:1}))))};t.DesignMenuBarView=c},31385:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignEditorTabService=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(76003),v=e(81878),_=e(1149),m=e(43718),p=e(30612),s=n.__importDefault(e(49107)),h=g=>{const{children:d}=g,[u,E]=o.default.useState(!1),f=(0,o.useMemo)(()=>"editor-tab-close-"+(0,m.uuid)(6),[]),c=(0,o.useCallback)(()=>{E(!1)},[]),y=(0,o.useMemo)(()=>(0,m.formatLocalize)("editor.closeTab.title",m.isMacintosh?"\u2318W":"Ctrl+W"),[]);return o.default.createElement(v.Popover,{delay:1e3,position:v.PopoverPosition.bottom,id:f,title:y,onClickAction:c,display:u},o.default.createElement("span",{title:""},d))};let a=class extends p.EditorTabService{renderEditorTab(d,u){return o.default.createElement("div",{className:(0,r.default)({[s.default["design-editor_tab_block_container"]]:!0,[s.default.active]:u}),style:{height:this.layoutViewSize.editorTabsHeight}},d)}renderTabCloseComponent(d){return o.default.createElement(h,null,d)}};t.DesignEditorTabService=a,n.__decorate([(0,l.Autowired)(_.LayoutViewSizeConfig),n.__metadata("design:type",_.LayoutViewSizeConfig)],a.prototype,"layoutViewSize",void 0),t.DesignEditorTabService=a=n.__decorate([(0,l.Injectable)()],a)},72141:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignBrowserCtxMenuService=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(76003),v=e(97267),_=e(41869),m=e(31388),p=e(52416),s=n.__importDefault(e(49107)),h=g=>{const d=(0,_.useInjectable)(p.IIconService),{data:u,disabled:E,hasSubmenu:f}=g,c=(0,o.useMemo)(()=>u.checked?o.default.createElement(v.Icon,{icon:"check"}):u.icon?o.default.createElement(v.Icon,{iconClass:u.icon}):null,[u]);return o.default.createElement("div",{className:(0,r.default)(s.default.menuAction__sub_menu_action_container,{[s.default.disabled]:E,[s.default.checked]:u.checked},u.className)},o.default.createElement("div",{className:s.default.icon},c),o.default.createElement("div",{className:s.default.label},u.label?(0,_.transformLabelWithCodicon)(_.strings.mnemonicButtonLabel(u.label,!0),{margin:"0 3px"},d?.fromString.bind(d)):""),o.default.createElement("div",{className:s.default.tip},u.keybinding?o.default.createElement("div",{className:s.default.shortcut},u.keybinding):null,f?o.default.createElement("div",{className:s.default.submenuIcon},o.default.createElement(v.Icon,{icon:"right-arrow"})):null,!u.keybinding&&!f&&u.extraDesc&&o.default.createElement("div",{className:s.default.extraDesc},u.extraDesc)))};let a=class extends m.BrowserCtxMenuService{renderSubMenuTitle(d,u){return o.default.createElement(h,{data:d,...u})}renderMenuItem(d,u){return o.default.createElement(h,{data:d,...u})}};t.DesignBrowserCtxMenuService=a,t.DesignBrowserCtxMenuService=a=n.__decorate([(0,l.Injectable)()],a)},45365:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignSplitPanelService=void 0;const n=e(71707);class r extends n.SplitPanelService{renderSplitPanel(l,v,_){return super.renderSplitPanel(l,v,_)}interceptProps(l){return l}}t.DesignSplitPanelService=r},13925:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#D4D4D4"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#6A9955"}},{scope:"constant.language",settings:{foreground:"#569cd6"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#b5cea8"}},{scope:"constant.regexp",settings:{foreground:"#646695"}},{scope:"entity.name.tag",settings:{foreground:"#569cd6"}},{scope:"entity.name.tag.css",settings:{foreground:"#d7ba7d"}},{scope:"entity.other.attribute-name",settings:{foreground:"#9cdcfe"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#d7ba7d"}},{scope:"invalid",settings:{foreground:"#f44747"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#b5cea8"}},{scope:"markup.deleted",settings:{foreground:"#ce9178"}},{scope:"markup.changed",settings:{foreground:"#569cd6"}},{scope:"punctuation.definition.quote.begin.markdown",settings:{foreground:"#6A9955"}},{scope:"punctuation.definition.list.begin.markdown",settings:{foreground:"#6796e6"}},{scope:"markup.inline.raw",settings:{foreground:"#ce9178"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#808080"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#569cd6"}},{scope:"meta.preprocessor.string",settings:{foreground:"#ce9178"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#b5cea8"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#9cdcfe"}},{scope:"meta.diff.header",settings:{foreground:"#569cd6"}},{scope:"storage",settings:{foreground:"#569cd6"}},{scope:"storage.type",settings:{foreground:"#569cd6"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#569cd6"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#ce9178"}},{scope:"string.tag",settings:{foreground:"#ce9178"}},{scope:"string.value",settings:{foreground:"#ce9178"}},{scope:"string.regexp",settings:{foreground:"#d16969"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#569cd6"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#d4d4d4"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#9cdcfe"}},{scope:"keyword",settings:{foreground:"#569cd6"}},{scope:"keyword.control",settings:{foreground:"#569cd6"}},{scope:"keyword.operator",settings:{foreground:"#d4d4d4"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#569cd6"}},{scope:"keyword.other.unit",settings:{foreground:"#b5cea8"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#569cd6"}},{scope:"support.function.git-rebase",settings:{foreground:"#9cdcfe"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#b5cea8"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#d4d4d4"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#569cd6"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#DCDCAA"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#4EC9B0"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#4EC9B0"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#C586C0"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.nam1e.variable","constant.other.placeholder"],settings:{foreground:"#9CDCFE"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#4FC1FF"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#9CDCFE"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#CE9178"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#CE9178"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#d16969"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#DCDCAA"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#d7ba7d"}},{scope:"constant.character",settings:{foreground:"#569cd6"}},{scope:"constant.character.escape",settings:{foreground:"#d7ba7d"}},{scope:"entity.name.label",settings:{foreground:"#C8C8C8"}}],colors:{"activityBar.activeBorder":"#ffffff1f","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#fff","activityBar.inactiveForeground":"#ffffff73","activityBarBadge.background":"#167CDB","activityBarBadge.foreground":"#FFFFFF","badge.background":"#FFFFFF40","badge.foreground":"#D7DBDE","breadcrumb.background":"#222830","breadcrumb.foreground":"#ffffff73","checkbox.background":"#ffffff14","checkbox.border":"#ffffff1f",descriptionForeground:"#868C91","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#43484D","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#00000000","editorGroupHeader.tabsBackground":"#222830","editorSuggestWidget.selectedBackground":"#1A66AC",errorForeground:"#D21F28",focusBorder:"#ffffff1f",foreground:"#D7DBDE","editorCommentsWidget.unresolvedBorder":"#ffffff","gitDecoration.addedResourceForeground":"#8FD460","gitDecoration.conflictingResourceForeground":"#7F9EF3","gitDecoration.deletedResourceForeground":"#F3956A","gitDecoration.ignoredResourceForeground":"#BBC0C4","gitDecoration.modifiedResourceForeground":"#F3CC62","gitDecoration.submoduleResourceForeground":"#67ABEB","gitDecoration.untrackedResourceForeground":"#58D1C9","icon.foreground":"#D7DBDE","input.background":"#ffffff14","input.foreground":"#d7dbde","input.placeholderForeground":"#ffffff59","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#332510","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#d7dbde","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#D7DBDE","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#5F656B40","kt.button.disableBorder":"#5F656B80","kt.button.disableForeground":"#5F656B","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.defaultButton.background":"#ffffff14","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#ffffff14","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#ffffff14","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#ffffff40","kt.defaultButton.foreground":"#D7DBDE","kt.defaultButton.hoverBackground":"#ffffff29","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#ffffff29","kt.defaultButton.selectionForeground":"#fff","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#ffffff73","kt.icon.hoverBackground":"#ffffff14","kt.icon.hoverForeground":"#D7DBDE","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#00000000","kt.input.disableBackground":"#5F656B40","kt.input.disableForeground":"#ffffff40","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#222830","kt.modal.foreground":"#D7DBDE","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#868C91","kt.panelTab.activeBackground":"#151b21","kt.panelTab.activeForeground":"#FFFFFF","kt.panelTab.border":"#ffffff1f","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#D7DBDE","kt.panelTitle.background":"#222830","kt.popover.background":"#2b333d","kt.popover.border":"#363940","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dffa6","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#3c8dffa6","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#00000000","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#00000000","kt.secondaryButton.border":"#5F656B","kt.secondaryButton.clickBorder":"#167CDB","kt.secondaryButton.clickForeground":"#167CDB","kt.secondaryButton.foreground":"#D7DBDE","kt.secondaryButton.hoverBorder":"#3895EB","kt.secondaryButton.hoverForeground":"#3895EB","kt.secondaryButton.background":"#00000000","kt.select.background":"#ffffff14","kt.select.border":"#00000000","kt.select.disableBackground":"#5F656B40","kt.select.disableForeground":"#5F656B","kt.select.foreground":"#D7DBDE","kt.select.placeholderForeground":"#5F656B","kt.selectDropdown.background":"#222830","kt.selectDropdown.foreground":"#D7DBDE","kt.selectDropdown.hoverBackground":"#ffffff14","kt.selectDropdown.selectionBackground":"#ffffff14","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#FFFFFF","kt.tab.borderDown":"#5F656B40","kt.tab.inactiveForeground":"#D7DBDE","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#5F656B40","kt.tree.hoverForeground":"#D7DBDE","kt.tree.inactiveSelectionBackground":"#ffffff1f","kt.tree.inactiveSelectionForeground":"#fff","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#5F656B40","menu.background":"#222830d9","menu.foreground":"#D7DBDE","menu.selectionBackground":"#5F656B40","menu.selectionForeground":"#FFFFFF","menu.separatorBackground":"#43484D","menubar.selectionBackground":"#5f656b40","menubar.selectionForeground":"#FFFFFF","message.background":"#222830","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#222830","notifications.foreground":"#D7DBDE","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#151b21","panel.border":"#43484D","panel.foreground":"#D7DBDE","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#167CDB","panelTitle.activeForeground":"#FFFFFF","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#ffffff73","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#ffffff1f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#ffffffa6","sideBarTitle.foreground":"#FFFFFF","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#ffffff73","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#d2d2d2a6","statusBarItem.prominentBackground":"#2a2a2a80","tab.activeBackground":"#151b21","tab.activeForeground":"#FFFFFF","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#ffffff73","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#151b21","terminal.border":"#252729","terminal.foreground":"#D7DBDE","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#ffffff14","editor.background":"#181818","quickInput.background":"#222830","list.focusBackground":"#ffffff1f","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#151b21"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs-dark",designThemeType:"design-dark",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-dark-theme",name:"OpenSumi Design Dark+ (default dark)"}},37517:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignThemeFileSystemProvider=void 0;const n=e(85608),r=e(76003),o=e(43718),l=n.__importDefault(e(13925)),v=n.__importDefault(e(63080));let _=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.onDidChangeFile=o.Event.None}stat(p){return Promise.resolve({type:o.FileType.File,uri:p.toString(),lastModification:Date.now(),isDirectory:!1})}async readFile(p){const{query:s}=p;return l.default.id===s?this.toBuffer(JSON.stringify(l.default)):this.toBuffer(JSON.stringify(v.default))}toBuffer(p){return o.BinaryBuffer.fromString(p).buffer}readDirectory(){throw new Error("Not allowed")}createDirectory(){throw new Error("Not allowed")}rename(){throw new Error("Not allowed")}delete(){throw new Error("Not allowed")}watch(){throw new Error("Not allowed")}writeFile(){throw new Error("Not allowed")}};t.DesignThemeFileSystemProvider=_,t.DesignThemeFileSystemProvider=_=n.__decorate([(0,r.Injectable)()],_)},63080:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#000000ff"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"meta.diff.header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#008000"}},{scope:"constant.language",settings:{foreground:"#0000ff"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#098658"}},{scope:"constant.regexp",settings:{foreground:"#811f3f"}},{name:"css tags in selectors, xml tags",scope:"entity.name.tag",settings:{foreground:"#800000"}},{scope:"entity.name.selector",settings:{foreground:"#800000"}},{scope:"entity.other.attribute-name",settings:{foreground:"#ff0000"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#800000"}},{scope:"invalid",settings:{foreground:"#cd3131"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#000080"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#800000"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#098658"}},{scope:"markup.deleted",settings:{foreground:"#a31515"}},{scope:"markup.changed",settings:{foreground:"#0451a5"}},{scope:["punctuation.definition.quote.begin.markdown","punctuation.definition.list.begin.markdown"],settings:{foreground:"#0451a5"}},{scope:"markup.inline.raw",settings:{foreground:"#800000"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#800000"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#0000ff"}},{scope:"meta.preprocessor.string",settings:{foreground:"#a31515"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#098658"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#0451a5"}},{scope:"storage",settings:{foreground:"#0000ff"}},{scope:"storage.type",settings:{foreground:"#0000ff"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#0000ff"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#a31515"}},{scope:["string.comment.buffered.block.pug","string.quoted.pug","string.interpolated.pug","string.unquoted.plain.in.yaml","string.unquoted.plain.out.yaml","string.unquoted.block.yaml","string.quoted.single.yaml","string.quoted.double.xml","string.quoted.single.xml","string.unquoted.cdata.xml","string.quoted.double.html","string.quoted.single.html","string.unquoted.html","string.quoted.single.handlebars","string.quoted.double.handlebars"],settings:{foreground:"#0000ff"}},{scope:"string.regexp",settings:{foreground:"#811f3f"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#0000ff"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#000000"}},{scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#ff0000"}},{scope:["support.type.property-name.json"],settings:{foreground:"#0451a5"}},{scope:"keyword",settings:{foreground:"#0000ff"}},{scope:"keyword.control",settings:{foreground:"#0000ff"}},{scope:"keyword.operator",settings:{foreground:"#000000"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#0000ff"}},{scope:"keyword.other.unit",settings:{foreground:"#098658"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#800000"}},{scope:"support.function.git-rebase",settings:{foreground:"#0451a5"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#098658"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#000000"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#0000ff"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#795E26"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#267f99"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#267f99"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","source.cpp keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#AF00DB"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],settings:{foreground:"#001080"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#0070C1"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#001080"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#d16969"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#811f3f"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#000000"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#EE0000"}},{scope:"constant.character",settings:{foreground:"#0000ff"}},{scope:"constant.character.escape",settings:{foreground:"#EE0000"}},{scope:"entity.name.label",settings:{foreground:"#000000"}}],colors:{"activityBar.activeBorder":"#151b2114","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#151b21","activityBar.inactiveForeground":"#151b21a6","activityBarBadge.background":"#3C8DFF","activityBarBadge.foreground":"#FFFFFF","badge.background":"#151b5814","badge.foreground":"#151b21a6","breadcrumb.background":"#fff","breadcrumb.foreground":"#5d646c","checkbox.background":"#fff","checkbox.border":"#151b2129",descriptionForeground:"#151b21a6","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#151b2133","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#ffffff","editorGroupHeader.tabsBackground":"#DDE8F4","editorSuggestWidget.selectedBackground":"#6eb6fa40",errorForeground:"#D21F28",focusBorder:"#151b2129",foreground:"#151b21d9","editorCommentsWidget.unresolvedBorder":"#4d9ded","gitDecoration.addedResourceForeground":"#52c41a","gitDecoration.modifiedResourceForeground":"#faad14","gitDecoration.deletedResourceForeground":"#fa541c","gitDecoration.untrackedResourceForeground":"#13c2c2","gitDecoration.ignoredResourceForeground":"#666666","gitDecoration.conflictingResourceForeground":"#ff0000","gitDecoration.submoduleResourceForeground":"#1785eb","icon.foreground":"#151b21d9","input.background":"#fff","input.foreground":"#151b21","input.placeholderForeground":"#151b2173","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#fff","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#151b21","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#151b21a6","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#151b210a","kt.button.disableBorder":"#151b2114","kt.button.disableForeground":"#151b2159","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#151b21a6","kt.icon.hoverBackground":"#151b2114","kt.icon.hoverForeground":"#151b21d9","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#151b2129","kt.input.disableBackground":"#151b210a","kt.input.disableForeground":"#151b2159","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#fff","kt.modal.foreground":"#151b21d9","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#151b21a6","kt.panelTab.activeBackground":"#fff","kt.panelTab.activeForeground":"#151b21","kt.panelTab.border":"#151b2114","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#151b21d9","kt.panelTitle.background":"#fff","kt.popover.background":"#000000e3","kt.popover.border":"#000000e3","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.defaultButton.background":"#fafafb","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#fafafb","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#fff","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#151b2159","kt.defaultButton.foreground":"#000a1aff","kt.defaultButton.hoverBackground":"#F5F5F6","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#fff","kt.defaultButton.selectionForeground":"#151b21","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dff","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#5b9fff","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#fff","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#fff","kt.secondaryButton.border":"#00000026","kt.secondaryButton.clickBorder":"#00000026","kt.secondaryButton.clickForeground":"#151b21","kt.secondaryButton.foreground":"#151b21d9","kt.secondaryButton.background":"#fff","kt.secondaryButton.hoverBorder":"#00000026","kt.secondaryButton.hoverForeground":"#151b21","kt.select.background":"#fff","kt.select.border":"#151b2129","kt.select.disableBackground":"#151b2114","kt.select.disableForeground":"#151b2159","kt.select.foreground":"#151b21","kt.select.placeholderForeground":"#151b2173","kt.selectDropdown.background":"#fff","kt.selectDropdown.foreground":"#151b21","kt.selectDropdown.hoverBackground":"#151b2114","kt.selectDropdown.selectionBackground":"#151b2114","kt.selectDropdown.selectionForeground":"#151b21","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#151b21","kt.tab.borderDown":"#151b211f","kt.tab.inactiveForeground":"#151b21a6","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#151b5814","kt.tree.hoverForeground":"#151b21","kt.tree.inactiveSelectionBackground":"#151b5814","kt.tree.inactiveSelectionForeground":"#151b21","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#151b5814","menu.background":"#FFFFFF","menu.foreground":"#151b21","menu.selectionBackground":"#151b2114","menu.selectionForeground":"#151b21","menu.separatorBackground":"#151b211f","menubar.selectionBackground":"#151b2114","menubar.selectionForeground":"#151b21","message.background":"#151b21d9","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#fff","notifications.foreground":"#151b21d9","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#fff","panel.border":"#43484D","panel.foreground":"#151b21","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#3c8dff","panelTitle.activeForeground":"#151b21","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#151b21a6","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#151b211f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#151b21d9","sideBarTitle.foreground":"#151b21d9","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#151b21a6","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#151b21a6","statusBarItem.prominentBackground":"#f1f1f180","tab.activeBackground":"#ffffff","tab.activeForeground":"#151b21","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#151b21d9","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#FFFFFF","terminal.border":"#252729","terminal.foreground":"#151b21","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#151b211f","editor.background":"#F1F2F3","quickInput.background":"#fff","list.focusBackground":"#151b5814","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#fff","multiDiffEditor.background":"#fff","multiDiffEditor.border":"#151b211f","multiDiffEditor.headerBackground":"#fff"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs",designThemeType:"design-light",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-light-theme",name:"OpenSumi Design Light+ (default light)"}},98741:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.overrideMonacoColorToken=t.overrideColorToken=void 0;const n=e(85608),r=e(52416),o=n.__importDefault(e(13925)),l=n.__importDefault(e(63080)),v=()=>{const m=(0,r.getColorRegistry)();m.getColors().forEach(({id:p})=>{if(o.default.colors[p]&&l.default.colors[p]){const s=m.getColor(p);(0,r.registerColor)(p,{dark:o.default.colors[p],light:l.default.colors[p],hcDark:s.defaults.hcDark||null,hcLight:s.defaults.hcLight||null},s.description)}})};t.overrideColorToken=v;const _=()=>{(0,r.registerColor)("vscode.quickInputList.focusBackground",{light:"#151b2114",dark:"#5F656B40",hcDark:null,hcLight:null},"Quick picker background color for the focused item."),(0,r.registerColor)("quickInputList.focusForeground",{dark:"#ffffff",light:"#151b21",hcDark:null,hcLight:null},"Quick picker foreground color for the focused item.")};t.overrideMonacoColorToken=_},66338:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DESIGN_MENU_BAR_LEFT=t.DESIGN_MENU_BAR_RIGHT=t.DESIGN_MENUBAR_CONTAINER_VIEW_ID=void 0,t.DESIGN_MENUBAR_CONTAINER_VIEW_ID="design_menubar",t.DESIGN_MENU_BAR_RIGHT="design_menu_bar_right",t.DESIGN_MENU_BAR_LEFT="design_menu_bar_left"},38879:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(66338),t)},82353:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(38879),t)},30526:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffEditorPart=t.BaseMonacoEditorWrapper=void 0,t.insertSnippetWithMonacoEditor=h;const n=e(85608),r=e(76003),o=e(43718),l=n.__importStar(e(20868)),v=e(99721),_=e(23418),m=e(84677),p=e(6043),s=e(82196);function h(E,f,c,y){const b=E.getContribution("snippetController2"),A=c.map(S=>new l.Selection(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn));E.setSelections(A),E.focus(),b.insert(f,0,0,y.undoStopBefore,y.undoStopAfter)}const{removeUndefined:a}=o.objects;function g(E,f,c){E.updateOptions(f),E.getModel()&&E.getModel().updateOptions(c)}let d=class extends o.WithEventBus{get currentUri(){return this.currentDocumentModel?this.currentDocumentModel.uri:null}getId(){return this.monacoEditor.getId()}getSelections(){return this.monacoEditor.getSelections()||[]}disableSelectionEmitter(){this._disableSelectionEmitter=!0}enableSelectionEmitter(){this._disableSelectionEmitter=!1}constructor(f,c){super(),this.monacoEditor=f,this.type=c,this.onFocus=this.monacoEditor.onDidFocusEditorWidget,this.onBlur=this.monacoEditor.onDidBlurEditorWidget,this._specialEditorOptions={},this._specialModelOptions={},this._editorOptionsFromContribution={},this._disableSelectionEmitter=!1,this.monacoLargeFileOptions={folding:!1,codeLens:!1,wordWrap:"off",minimap:{enabled:!1},stickyScroll:{enabled:!1},matchBrackets:"never"},this.decorationApplier=this.injector.get(m.MonacoEditorDecorationApplier,[this.monacoEditor]),this.addDispose(this.monacoEditor.onDidChangeModel(this.onDidChangeModel.bind(this))),this.addDispose(this.monacoEditor.onDidChangeModelLanguage(()=>{this._doUpdateOptions()})),this.addDispose(this.configurationService.onDidChangeConfiguration(y=>{Array.from(y.affectedKeys.values()).filter(A=>(0,p.isEditorOption)(A)).length>0&&this._doUpdateOptions()}))}async onDidChangeModel(){this._editorOptionsFromContribution={};const f=this.currentUri;f&&Promise.resolve(this.editorFeatureRegistry.runProvideEditorOptionsForUri(f)).then(c=>{!this.currentUri||!f.isEqual(this.currentUri)||c&&Object.keys(c).length>0&&(this._editorOptionsFromContribution=c,(0,o.isEmptyObject)(this._editorOptionsFromContribution)||this._doUpdateOptions())})}getType(){return this.type}updateOptions(f={},c={}){this._specialEditorOptions=a({...this._specialEditorOptions,...f}),this._specialModelOptions=a({...this._specialModelOptions,...c}),this._doUpdateOptions()}_doUpdateOptions(){const{editorOptions:f,modelOptions:c}=this._calculateFinalOptions();g(this.monacoEditor,f,c)}_calculateFinalOptions(){var f;const c=this.currentUri?this.currentUri.toString():void 0,y=this.currentDocumentModel?this.currentDocumentModel.languageId:void 0,b=(0,p.getConvertedMonacoOptions)(this.configurationService,c,y,void 0);let S={...{readOnly:((f=this.currentDocumentModel)===null||f===void 0?void 0:f.readonly)||!1},...b.editorOptions,...this._editorOptionsFromContribution,...this._specialEditorOptions};return this.currentDocumentModel&&this.currentDocumentModel.isLargeFile&&Object.assign(S,this.monacoLargeFileOptions),this.type!==_.EditorType.CODE&&(S={...S,...b.diffOptions}),{editorOptions:S,modelOptions:{...b.modelOptions,...this._specialModelOptions}}}insertSnippet(f,c,y){h(this.monacoEditor,f,c,y)}applyDecoration(f,c){this.decorationApplier.applyDecoration(f,c)}onSelectionsChanged(f){return this.monacoEditor.onDidChangeCursorSelection(c=>{this._disableSelectionEmitter||f({selections:this.getSelections(),source:c.source})})}onVisibleRangesChanged(f){const c=new o.Disposable,y=this.monacoEditor;return c.addDispose(y.onDidScrollChange(b=>{f(this.monacoEditor.getVisibleRanges())})),c.addDispose(y.onDidLayoutChange(b=>{f(this.monacoEditor.getVisibleRanges())})),c}setSelections(f){return this.monacoEditor.setSelections(f)}setSelection(f){return this.monacoEditor.setSelection(f)}async save(){this.currentDocumentModel&&await this.currentDocumentModel.save()}onConfigurationChanged(f){return this.monacoEditor.onDidChangeConfiguration(y=>{f()})}};t.BaseMonacoEditorWrapper=d,n.__decorate([(0,r.Autowired)(s.IEditorFeatureRegistry),n.__metadata("design:type",Object)],d.prototype,"editorFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(v.IConfigurationService),n.__metadata("design:type",Object)],d.prototype,"configurationService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],d.prototype,"injector",void 0),t.BaseMonacoEditorWrapper=d=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],d);let u=class extends d{get currentDocumentModel(){return this._getDocumentModel()}updateDocumentModel(f){const c=this.documents.get();if(c!=="loading"){for(const y of c)y.object.modified&&o.URI.from(y.object.modified.uri).isEqual(f)&&(this._getDocumentModel=()=>y.object.modifiedInstance),y.object.original&&o.URI.from(y.object.original.uri).isEqual(f)&&(this._getDocumentModel=()=>y.object.originalInstance);this.decorationApplier.clearDecorations(),this.decorationApplier.applyDecorationFromProvider()}}constructor(f,c,y,b){super(f,y),this._getDocumentModel=c,this.documents=b}};t.DiffEditorPart=u,t.DiffEditorPart=u=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Function,Object,Object])],u)},87802:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultBreadCrumbProvider=void 0,t.findCurrentDocumentSymbol=g;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),l=e(41869),v=e(26542),_=e(79929),m=e(97408),p=e(82196),s=e(17459),{Path:h}=l.path;let a=class extends l.WithEventBus{constructor(){super(...arguments),this._onDidUpdateBreadCrumb=new l.Emitter,this.onDidUpdateBreadCrumb=this._onDidUpdateBreadCrumb.event,this.debouncedFireUriEvent=new Map,this.cachedBreadCrumb=new l.LRUMap(200,100)}handlesUri(c){return this.fileServiceClient.handlesScheme(c.scheme)}provideBreadCrumbForUri(c,y){return this.getFileParts(c).concat(this.getDocumentSymbolParts(c,y))}getFileParts(c){const y=this.workspaceService.workspace?new l.URI(this.workspaceService.workspace.uri):void 0;let b,A;y&&y.isEqualOrParent(c)?(b=y,A=y.relative(c)):(b=l.URI.from({scheme:c.scheme,authority:c.authority}),A=c.path);let S=b.path;const w=[];for(const I of A.toString().split(h.separator).filter(D=>!!D)){S=S.join(I);const D=b.withPath(S);w.push(this.createFilePartBreadCrumbUri(D,!D.isEqual(c)))}return w}createFilePartBreadCrumbUri(c,y){const b=c.toString();if(this.cachedBreadCrumb.has(b))return this.cachedBreadCrumb.get(b);const A={name:c.path.base,uri:c,icon:this.labelService.getIcon(c,{isDirectory:y}),getSiblings:async()=>{const S=l.URI.from({scheme:c.scheme}).withPath(c.path.dir),w=await this.fileServiceClient.getFileStat(S.toString()),I=[];let D=-1;return w&&w.children&&w.children.length>0&&d(w.children).forEach((T,R)=>{I.push(this.createFilePartBreadCrumbUri(new l.URI(T.uri),T.isDirectory)),D===-1&&c.toString()===T.uri&&(D=R)}),{parts:I,currentIndex:D}}};return y?A.getChildren=async()=>{const S=await this.fileServiceClient.getFileStat(c.toString()),w=[];return S&&S.children&&S.children.length>0&&d(S.children).forEach((I,D)=>{w.push(this.createFilePartBreadCrumbUri(new l.URI(I.uri),I.isDirectory))}),w}:A.onClick=()=>{this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,c)},this.cachedBreadCrumb.set(b,A),A}getDocumentSymbolParts(c,y){if(!y)return[];const b=this.documentSymbolStore.getDocumentSymbol(c);if(b&&b.length>0){const A=g(b,y.monacoEditor.getPosition());return A.length>0?A.map(S=>this.createFromDocumentSymbol(S,y)):[{name:"...",getSiblings:()=>({parts:b.sort((S,w)=>E(S.range,w.range)).map(S=>this.createFromDocumentSymbol(S,y)),currentIndex:-1})}]}else return[]}createFromDocumentSymbol(c,y){const b={name:c.name,icon:(0,l.getSymbolIcon)(c.kind),isSymbol:!0,onClick:()=>{y.setSelection({startColumn:c.range.startColumn,endColumn:c.range.startColumn,startLineNumber:c.range.startLineNumber,endLineNumber:c.range.startLineNumber}),y.monacoEditor.revealRangeInCenter(c.range),y.monacoEditor.focus()}};return c.parent&&(b.getSiblings=()=>({parts:c.parent.children.sort((A,S)=>E(A.range,S.range)).map(A=>this.createFromDocumentSymbol(A,y)),currentIndex:c.parent.children.indexOf(c)})),c.children&&c.children.length>0&&(b.getChildren=()=>c.children.sort((A,S)=>E(A.range,S.range)).map(A=>this.createFromDocumentSymbol(A,y))),b}onDocumentSymbolChangedEvent(c){this.notifyUpdate(c.payload)}onEditorSelectionChangeEvent(c){this.notifyUpdate(c.payload.editorUri)}notifyUpdate(c){this.debouncedFireUriEvent.has(c.toString())||this.debouncedFireUriEvent.set(c.toString(),(0,r.default)(()=>{this._onDidUpdateBreadCrumb.fire(c)},100,{maxWait:1e3})),this.debouncedFireUriEvent.get(c.toString())()}};t.DefaultBreadCrumbProvider=a,n.__decorate([(0,o.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],a.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(m.IWorkspaceService),n.__metadata("design:type",Object)],a.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(v.LabelService),n.__metadata("design:type",v.LabelService)],a.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(l.CommandService),n.__metadata("design:type",Object)],a.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",s.DocumentSymbolStore)],a.prototype,"documentSymbolStore",void 0),n.__decorate([(0,l.OnEvent)(s.DocumentSymbolChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.DocumentSymbolChangedEvent]),n.__metadata("design:returntype",void 0)],a.prototype,"onDocumentSymbolChangedEvent",null),n.__decorate([(0,l.OnEvent)(p.EditorSelectionChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.EditorSelectionChangeEvent]),n.__metadata("design:returntype",void 0)],a.prototype,"onEditorSelectionChangeEvent",null),t.DefaultBreadCrumbProvider=a=n.__decorate([(0,o.Injectable)()],a);function g(f,c){const y=[];if(!c)return y;let b=f;for(;b&&b.length>0;){let A=!1;for(const S of b)if(u(c,S.range)){y.push(S),b=S.children,A=!0;break}if(!A)break}return y}function d(f){return f.sort((c,y)=>{if(c.isDirectory&&y.isDirectory||!c.isDirectory&&!y.isDirectory){const b=new l.URI(c.uri).path.name,A=new l.URI(y.uri).path.name;return b.localeCompare(A,"kn",{numeric:!0})}else return c.isDirectory&&!y.isDirectory?-1:!c.isDirectory&&y.isDirectory?1:0})}function u(f,c){return f.lineNumber<c.startLineNumber?!1:f.lineNumber===c.startLineNumber?f.column>=c.startColumn:f.lineNumber<c.endLineNumber?!0:f.lineNumber===c.endLineNumber?f.column<=c.endColumn:!1}function E(f,c){return f.startLineNumber>c.startLineNumber?1:f.startLineNumber<c.startLineNumber?-1:f.startColumn===c.startColumn?0:f.startColumn>c.startColumn?1:-1}},17459:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymbolTag=t.DocumentSymbolChangedEvent=t.DocumentSymbolStore=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),l=e(41869),v=e(79865),_=e(40540);Object.defineProperty(t,"SymbolTag",{enumerable:!0,get:function(){return _.SymbolTag}});const m=e(23418),p=e(96689);let s=class extends l.WithEventBus{constructor(){super(),this.documentSymbols=new Map,this.pendingUpdate=new Set,this.debounced=new Map,this.symbolDeferred=new Map,this.addDispose(v.languageFeaturesService.documentSymbolProvider.onDidChange(()=>{Array.from(this.documentSymbols.keys()).forEach(u=>{this.markNeedUpdate(new l.URI(u))})}))}getDocumentSymbol(u){return this.documentSymbols.has(u.toString())||(this.documentSymbols.set(u.toString(),void 0),this.createDocumentSymbolCache(u)),this.pendingUpdate.has(u.toString())&&this.updateDocumentSymbolCache(u),this.documentSymbols.get(u.toString())}async getDocumentSymbolAsync(u,E){var f;const c=u.toString();return E&&E.onCancellationRequested(()=>{var y;(y=this.symbolDeferred.get(c))===null||y===void 0||y.resolve(),this.symbolDeferred.delete(c)}),(!this.documentSymbols.has(c)||this.pendingUpdate.has(c))&&!this.symbolDeferred.has(c)&&(this.symbolDeferred.set(c,new l.Deferred),this.updateDocumentSymbolCache(u)),await((f=this.symbolDeferred.get(c))===null||f===void 0?void 0:f.promise),this.documentSymbols.get(c)}async createDocumentSymbolCache(u){this.updateDocumentSymbolCache(u)}async doUpdateDocumentSymbolCache(u){var E,f;this.pendingUpdate.delete(u.toString());const c=await this.editorDocumentModelRegistry.createModelReference(u);if(!c){(E=this.symbolDeferred.get(u.toString()))===null||E===void 0||E.resolve();return}try{const y=v.languageFeaturesService.documentSymbolProvider.all(c.instance.getMonacoModel());let b;for(const A of y)if(b=await A.provideDocumentSymbols(c.instance.getMonacoModel(),new l.CancellationTokenSource().token),b)break;b&&a(b,{children:b},u),this.documentSymbols.set(u.toString(),b),this.eventBus.fire(new h(u))}finally{c.dispose()}(f=this.symbolDeferred.get(u.toString()))===null||f===void 0||f.resolve()}updateDocumentSymbolCache(u){this.debounced.has(u.toString())||this.debounced.set(u.toString(),(0,r.default)(()=>this.doUpdateDocumentSymbolCache(u),100,{maxWait:1e3})),this.debounced.get(u.toString())()}onEditorDocumentModelContentChangedEvent(u){u.payload.changes&&u.payload.changes.length>0&&this.markNeedUpdate(u.payload.uri)}markNeedUpdate(u){this.pendingUpdate.add(u.toString()),this.isWatching(u)&&this.updateDocumentSymbolCache(u)}isWatching(u){for(const E of this.editorService.editorGroups)if(E.currentResource&&E.currentResource.uri.isEqual(u))return!0;return!1}};t.DocumentSymbolStore=s,n.__decorate([(0,o.Autowired)(p.IEditorDocumentModelService),n.__metadata("design:type",Object)],s.prototype,"editorDocumentModelRegistry",void 0),n.__decorate([(0,o.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorService)],s.prototype,"editorService",void 0),n.__decorate([(0,l.OnEvent)(p.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],s.prototype,"onEditorDocumentModelContentChangedEvent",null),t.DocumentSymbolStore=s=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],s);class h extends l.BasicEvent{}t.DocumentSymbolChangedEvent=h;function a(d,u,E){return d.forEach((f,c)=>{const y=f;y.parent=u,y.id=g(E,y,c),f.children&&f.children.length>0&&a(f.children,f,E)}),d}function g(d,u,E){const f=[u.name];for(;u.parent;){const c=u.parent;if(!c.name)break;f.unshift(c.name),u=c}return`${d.toString()}__${f.join("-")}__${E}`}},88895:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreadCrumbServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(87802),{addElement:v}=o.arrays;let _=class{constructor(){this.providers=[],this._onDidUpdateBreadCrumbResults=new o.Emitter,this.onDidUpdateBreadCrumbResults=this._onDidUpdateBreadCrumbResults.event,this.crumbResults=new Map,this.registerBreadCrumbProvider(this.defaultBreadCrumbProvider)}registerBreadCrumbProvider(h){const a=v(this.providers,h);return h.onDidUpdateBreadCrumb(g=>{this.crumbResults.forEach((d,u)=>{d.has(g.toString())&&this.getBreadCrumbs(g,u)})}),a}getBreadCrumbs(h,a){const g=this.getEditorCrumbResults(a);for(const d of this.providers)if(d.handlesUri(h)){const u=g.get(h.toString()),E=d.provideBreadCrumbForUri(h,a);m(u,E)||(g.set(h.toString(),E),this._onDidUpdateBreadCrumbResults.fire({editor:a,uri:h}));break}return g.get(h.toString())}getEditorCrumbResults(h){return this.crumbResults.has(h)||(this.crumbResults.set(h,new Map),h&&h.monacoEditor.onDidDispose(()=>{this.crumbResults.delete(h)})),this.crumbResults.get(h)}disposeCrumb(h){}};t.BreadCrumbServiceImpl=_,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",l.DefaultBreadCrumbProvider)],_.prototype,"defaultBreadCrumbProvider",void 0),t.BreadCrumbServiceImpl=_=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],_);function m(s,h){if(!s&&!h)return!0;if(!s||!h)return!1;if(s.length!==h.length)return!1;for(let a=0;a<s.length;a++)if(!p(s[a],h[a]))return!1;return!0}function p(s,h){return s.name===h.name}},11673:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorComponentRegistryImpl=void 0;const n=e(85608),r=n.__importDefault(e(46343)),o=n.__importDefault(e(19106)),l=n.__importDefault(e(43144)),v=e(76003),_=e(43718),m=e(82196);let p=class{constructor(){this.components=new Map,this.sideWidgets={bottom:new Set,top:new Set},this.initialPropsMap=new Map,this.resolvers=new Map,this.normalizedResolvers=[],this.perWorkbenchComponents={}}registerEditorComponent(h,a){const g=h.uid;return h.renderMode||(h.renderMode=m.EditorComponentRenderMode.ONE_PER_GROUP),this.components.set(g,h),this.initialPropsMap.set(g,a),this.eventBus.fire(new _.ExtensionActivateEvent({topic:"onRegisterEditorComponent",data:g})),this.eventBus.fire(new m.RegisterEditorComponentEvent(g)),{dispose:()=>{this.components.get(g)===h&&(this.components.delete(g),this.eventBus.fire(new m.EditorComponentDisposeEvent(h)))}}}registerEditorComponentResolver(h,a){let g;return typeof h=="function"?g={handleScheme:h,resolver:a}:g={handleScheme:d=>d===h?10:-1,resolver:a},this.normalizedResolvers.push(g),this.resolvers.clear(),{dispose:()=>{for(const u of this.resolvers.values()){const E=u.indexOf(a);E!==-1&&u.splice(E,1)}const d=this.normalizedResolvers.indexOf(g);d!==-1&&this.normalizedResolvers.splice(d,1)}}}async resolveEditorComponent(h){let a=[];const g=this.getResolvers(h.uri.scheme).slice();let d=!1;const u=E=>{a=E,d=!0};for(const E of g)if(await E(h,a,u),d)break;return a.sort((E,f)=>{const c=E.weight||0;return(f.weight||0)-c}),(0,o.default)(a,r.default)}calculateSchemeResolver(h){const a=this.normalizedResolvers.slice(),g=[];return a.forEach((d,u)=>{const E=d.handleScheme(h);E>=0&&g.push({weight:E,index:u,resolver:d.resolver})}),g.sort((d,u)=>d.weight>u.weight?-1:d.weight<u.weight?1:u.index-d.index).map(d=>d.resolver)}getResolvers(h){return this.resolvers.has(h)||this.resolvers.set(h,this.calculateSchemeResolver(h)),this.resolvers.get(h)}getEditorComponent(h){return this.components.get(h)||null}getEditorInitialProps(h){return this.initialPropsMap.get(h)||null}clearPerWorkbenchComponentCache(h){l.default.unmountComponentAtNode(this.perWorkbenchComponents[h]),delete this.perWorkbenchComponents[h]}getSideWidgets(h,a){const g=[];return this.sideWidgets[h].forEach(d=>{d.displaysOnResource(a)&&g.push(d)}),g.sort((d,u)=>{const E=d.weight===void 0?10:d.weight;return(u.weight===void 0?10:u.weight)-E})}registerEditorSideWidget(h){const a=h.side||"bottom";return this.sideWidgets[a].add(h),this.eventBus.fire(new m.RegisterEditorSideComponentEvent),{dispose:()=>{this.sideWidgets[a].delete(h)}}}};t.EditorComponentRegistryImpl=p,n.__decorate([(0,v.Autowired)(_.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),t.EditorComponentRegistryImpl=p=n.__decorate([(0,v.Injectable)()],p)},84677:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoEditorDecorationApplier=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=e(76003),l=e(43718),v=e(52416),_=e(82196);let m=class extends l.Disposable{constructor(d){super(),this.editor=d,this.decorations=new Map,this.applyDecorationFromProvider(),this.addDispose(this.editor.onDidChangeModel(()=>{this.clearDecorations(),this.applyDecorationFromProvider()})),this.addDispose(this.editor.onDidDispose(()=>{this.dispose()})),this.addDispose(this.eventBus.on(_.EditorDecorationChangeEvent,u=>{const E=this.getEditorUri();E&&u.payload.uri.isEqual(E)&&this.applyDecorationFromProvider(u.payload.key)})),this.addDispose(this.eventBus.on(_.EditorDecorationTypeRemovedEvent,u=>{this.deltaDecoration(u.payload,[])}))}getEditorUri(){return this.editor.getModel()?new l.URI(this.editor.getModel().uri.toString()):null}async applyDecorationFromProvider(d){if(this.editor.getModel()){const u=new l.URI(this.editor.getModel().uri.toString()),E=await this.decorationService.getDecorationFromProvider(u,d);if(!this.editor.getModel()||this.editor.getModel().uri.toString()!==u.toString())return;for(const f of Object.keys(E))this.deltaDecoration(f,E[f]);this.eventBus.fire(new _.DidApplyEditorDecorationFromProvider({key:d,uri:u}))}}dispose(){super.dispose(),this.clearDecorations()}clearDecorations(){this.decorations.forEach(d=>{d.dispose(),this.editor.deltaDecorations(d.decorations,[])}),this.decorations.clear()}deltaDecoration(d,u){let E=[];if(this.decorations.has(d)&&(E=this.decorations.get(d).decorations,this.decorations.get(d).dispose(),this.decorations.delete(d)),E.length===0&&u.length===0)return;const f=this.editor.deltaDecorations(E,u);this.decorations.set(d,{decorations:f,dispose:()=>null})}applyDecoration(d,u){const E=this.decorations.get(d);E&&E.dispose();const f=E?E.decorations:[],c=[],y=new l.Disposable;if(f.length===0&&u.length===0)return;u.forEach(A=>{const S=this.resolveDecorationRenderer(d,A.renderOptions);c.push({range:A.range,options:{...S.options,hoverMessage:h(A.hoverMessage)}}),y.addDispose(S)});const b=this.editor.deltaDecorations(f,c);this.decorations.set(d,{decorations:b,dispose:()=>y.dispose()})}resolveDecorationRenderer(d,u){const E=this.decorationService.getTextEditorDecorationType(d),f={description:d},c=this.themeService.getCurrentThemeSync().type,y=new l.Disposable;if(E){const b=E.property;p(f,b,c)}if(u){const b=this.decorationService.createTextEditorDecorationType(u);p(f,b.property,c),y.addDispose(b)}return{options:f,dispose:()=>y.dispose()}}};t.MonacoEditorDecorationApplier=m,n.__decorate([(0,o.Autowired)(_.IEditorDecorationCollectionService),n.__metadata("design:type",Object)],m.prototype,"decorationService",void 0),n.__decorate([(0,o.Autowired)(v.IThemeService),n.__metadata("design:type",Object)],m.prototype,"themeService",void 0),n.__decorate([(0,o.Autowired)(l.IEventBus),n.__metadata("design:type",Object)],m.prototype,"eventBus",void 0),t.MonacoEditorDecorationApplier=m=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],m);function p(g,d,u){d.overviewRulerLane&&(g.overviewRuler?g.overviewRuler.position=d.overviewRulerLane:g.overviewRuler={color:null,position:d.overviewRulerLane}),d.default&&s(g,d.default),u==="dark"&&d.dark&&s(g,d.dark),u==="light"&&d.light&&s(g,d.light),d.isWholeLine!==void 0&&(g.isWholeLine=d.isWholeLine),d.rangeBehavior&&(g.stickiness=d.rangeBehavior),g.inlineClassNameAffectsLetterSpacing=!0}function s(g,d){d.className&&(g.className=(0,r.default)(g.className,d.className)),d.inlineClassName&&(g.inlineClassName=(0,r.default)(g.inlineClassName,d.inlineClassName)),d.afterContentClassName&&(g.afterContentClassName=(0,r.default)(g.afterContentClassName,d.afterContentClassName)),d.beforeContentClassName&&(g.beforeContentClassName=(0,r.default)(g.beforeContentClassName,d.beforeContentClassName)),d.glyphMarginClassName&&(g.glyphMarginClassName=(0,r.default)(g.glyphMarginClassName,d.glyphMarginClassName)),d.overviewRulerColor&&g.overviewRuler&&(g.overviewRuler.color=d.overviewRulerColor)}function h(g){if(g)return g instanceof Array?g.map(a):a(g)}function a(g){return typeof g=="string"?{value:g,isTrusted:!0}:g}},84158:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompareEditorContribution=t.CompareService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),v=e(82196);let _=class{constructor(){this.comparing=new Map}compare(s,h,a){const g=o.URI.from({scheme:v.DIFF_SCHEME,query:o.URI.stringifyQuery({name:a,original:s,modified:h,comparing:!0})});if(!this.comparing.has(g.toString())){const d=new o.Deferred;this.comparing.set(g.toString(),d),d.promise.then(()=>{this.comparing.delete(g.toString()),this.commandService.executeCommand(o.EDITOR_COMMANDS.CLOSE_ALL.id,g)})}return this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,g),this.comparing.get(g.toString()).promise}};t.CompareService=_,n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],_.prototype,"commandService",void 0),t.CompareService=_=n.__decorate([(0,r.Injectable)()],_);let m=class{registerMenus(s){s.registerMenuItems(l.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.ACCEPT.id,label:(0,o.localize)("editor.action.accept")},iconClass:(0,o.getIcon)("check"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),s.registerMenuItems(l.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.REVERT.id,label:(0,o.localize)("editor.action.revert")},iconClass:(0,o.getIcon)("rollback"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),s.registerMenuItems(l.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS.id,label:(0,o.localize)("diffEditor.action.toggleCollapseUnchangedRegions")},toggledWhen:"config.diffEditor.hideUnchangedRegions.enabled",iconClass:"codicon codicon-map",group:"navigation",when:"isInDiffEditor"}])}registerCommands(s){s.registerCommand(o.DIFF_EDITOR_COMMANDS.ACCEPT,{execute:h=>{h&&this.compareService.comparing.has(h.toString())&&this.compareService.comparing.get(h.toString()).resolve(v.CompareResult.accept)}}),s.registerCommand(o.DIFF_EDITOR_COMMANDS.REVERT,{execute:h=>{h&&this.compareService.comparing.has(h.toString())&&this.compareService.comparing.get(h.toString()).resolve(v.CompareResult.revert)}}),s.registerCommand(o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS,{execute:()=>{const h=this.preferenceService.get("diffEditor.hideUnchangedRegions.enabled");this.preferenceService.set("diffEditor.hideUnchangedRegions.enabled",!h,o.PreferenceScope.User)}})}};t.CompareEditorContribution=m,n.__decorate([(0,r.Autowired)(v.ICompareService),n.__metadata("design:type",_)],m.prototype,"compareService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],m.prototype,"preferenceService",void 0),t.CompareEditorContribution=m=n.__decorate([(0,o.Domain)(l.MenuContribution,o.CommandContribution)],m)},57581:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultDiffEditorContribution=t.DiffResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),v=e(14951),_=e(23418),m=e(82196);let p=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme=_.DIFF_SCHEME,this.modifiedToResource=new Map}onResourceDecorationChangeEvent(a){a.payload.uri&&this.modifiedToResource.has(a.payload.uri.toString())&&this.eventBus.fire(new _.ResourceDecorationNeedChangeEvent({uri:this.modifiedToResource.get(a.payload.uri.toString()),decoration:a.payload.decoration}))}async getCurrentUserHome(){if(!this.userhomePath)try{const a=await this.fileServiceClient.getCurrentUserHome();a&&(this.userhomePath=new o.URI(a.uri))}catch{}return this.userhomePath}async getReadableTooltip(a){const g=a.toString(),d=await this.getCurrentUserHome();if(!d)return decodeURIComponent(a.withScheme("").toString());if(d.isEqualOrParent(a)){const u=d&&d.toString();return decodeURIComponent(g.replace(u,"~"))}return decodeURIComponent(a.withScheme("").toString())}async provideResource(a){const{original:g,modified:d,name:u}=a.getParsedQuery(),E=new o.URI(g),f=new o.URI(d);return this.modifiedToResource.set(f.toString(),a),Promise.all([this.labelService.getIcon(E),this.getReadableTooltip(f)]).then(([c,y])=>{var b;return{name:u,icon:c,uri:a,supportsRevive:(b=this.appConfig.enableDiffRevive)!==null&&b!==void 0?b:!0,metadata:{original:E,modified:f},title:y}})}async shouldCloseResource(a,g){const{modified:d}=a.uri.getParsedQuery(),u=new o.URI(d),E=await this.resourceService.getResource(u);return E?await this.resourceService.shouldCloseResource(E,g):!0}};t.DiffResourceProvider=p,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",l.LabelService)],p.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(_.ResourceService),n.__metadata("design:type",_.ResourceService)],p.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],p.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),n.__decorate([(0,o.OnEvent)(_.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onResourceDecorationChangeEvent",null),t.DiffResourceProvider=p=n.__decorate([(0,r.Injectable)()],p);let s=class{registerResource(a){a.registerResourceProvider(this.diffResourceProvider)}registerEditorComponent(a){a.registerEditorComponentResolver(_.DIFF_SCHEME,(g,d)=>{d.push({type:m.EditorOpenType.diff})})}};t.DefaultDiffEditorContribution=s,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p)],s.prototype,"diffResourceProvider",void 0),t.DefaultDiffEditorContribution=s=n.__decorate([(0,o.Domain)(m.BrowserEditorContribution)],s)},21690:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyDocCacheImpl=void 0;const n=e(85608),r=e(76003);let o=class{hasCache(v){return!1}isFlushed(){return!0}getCache(v){return null}persistCache(v,_){}};t.EmptyDocCacheImpl=o,t.EmptyDocCacheImpl=o=n.__decorate([(0,r.Injectable)()],o)},80487:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(21690),t),n.__exportStar(e(7220),t)},7220:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStorageDocCacheImpl=void 0;const n=e(85608),r=e(76003),o=e(51500),l=e(93107);let v=class{hasCache(m){return!0}isFlushed(){return!0}async getCache(m){const p=this.parseKeyFrom(m);return await this.storageService.getData(p)||null}persistCache(m,p){const s=this.parseKeyFrom(m),h=this.parseCacheFrom(m,p);this.storageService.setData(s,h)}parseCacheFrom(m,p){if(!(!p.dirty||!p.changeMatrix.length))return{path:m.path.toString(),startMD5:p.startMD5,changeMatrix:p.changeMatrix.map(s=>s.map(h=>(0,l.parseCacheValueFrom)(h)))}}parseKeyFrom(m){return`LocalStorageDocCacheImpl_${m.toString()}`}};t.LocalStorageDocCacheImpl=v,n.__decorate([(0,r.Autowired)(o.IWorkspaceStorageService),n.__metadata("design:type",Object)],v.prototype,"storageService",void 0),t.LocalStorageDocCacheImpl=v=n.__decorate([(0,r.Injectable)()],v)},86942:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentError=void 0;var e;(function(n){n.READ_CACHE_ERROR="EditorDocumentError:READ_CACHE_ERROR",n.APPLY_CACHE_TO_DIRTY_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIRTY_DOCUMENT",n.APPLY_CACHE_TO_DIFFERENT_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIFFERENT_DOCUMENT",n.FORMAT_ERROR="EditorDocumentError:FORMAT_ERROR"})(e||(t.EditorDocumentError=e={}))},9519:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentModelServiceImpl=t.EDITOR_DOC_OPTIONS_PREF_KEY=t.EDITOR_DOCUMENT_MODEL_STORAGE=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(96405),v=e(14951),_=e(91249),m=e(96689);t.EDITOR_DOCUMENT_MODEL_STORAGE=new o.URI("editor-doc").withScheme(o.STORAGE_SCHEMA.SCOPE),t.EDITOR_DOC_OPTIONS_PREF_KEY="editor_doc_pref";let p=class extends o.WithEventBus{constructor(){super(),this.editorDocModels=new Map,this.creatingEditorModels=new Map,this._modelsToDispose=new Set,this.preferredModelOptions=new Map,this._ready=this.registerDispose(new o.ReadyEvent),this.modelCreationEventDispatcher=this.registerDispose(new o.Dispatcher),this._modelReferenceManager=new o.ReferenceManager(h=>(this._modelsToDispose.has(h)&&this._modelsToDispose.delete(h),this.getOrCreateModel(h))),this._modelReferenceManager.onReferenceAllDisposed(h=>{this._delete(h)}),this._modelReferenceManager.onInstanceCreated(h=>{this.modelCreationEventDispatcher.dispatch(h.uri.toString()),this.eventBus.fire(new m.EditorDocumentModelCreationEvent({uri:h.uri,languageId:h.languageId,eol:h.eol,encoding:h.encoding,content:h.getText(),readonly:h.readonly,versionId:h.getMonacoModel().getVersionId()}))}),this.addDispose(this.preferenceService.onPreferenceChanged(h=>{h.preferenceName==="editor.detectIndentation"&&this.editorDocModels.forEach(a=>{a.updateOptions({})})}))}onDocumentModelCreated(h,a){return this.modelCreationEventDispatcher.on(h)(a)}_delete(h){const a=this.preferenceService.get("editor.modelDisposeTime",3e3);this._modelsToDispose.add(h.toString());let g=null;const d=this.addDispose({dispose:()=>{g&&clearTimeout(g)}});g=window.setTimeout(()=>{d.dispose(),g=null,this._modelsToDispose.has(h.toString())&&this._doDelete(h.toString())},a)}_doDelete(h){const a=this.editorDocModels.get(h);if(a&&(!a.dirty||a.disposeEvenDirty))return a.dispose(),this.editorDocModels.delete(h),a;this._modelsToDispose.delete(h)}async changeModelOptions(h,a){return this.onceReady(()=>{this.preferredModelOptions.has(h.toString())&&(a={...this.preferredModelOptions.get(h.toString()),...a}),this.preferredModelOptions.set(h.toString(),a);const g=this.getModelReference(h);return g&&(a.encoding&&a.encoding!==g.instance.encoding&&g.instance.updateEncoding(a.encoding),a.languageId&&a.languageId!==g.instance.languageId&&(g.instance.languageId=a.languageId),a.eol&&a.eol!==g.instance.eol&&(g.instance.eol=a.eol),g.dispose()),this.persistOptionsPreference()})}persistOptionsPreference(){return this.storage.set(t.EDITOR_DOC_OPTIONS_PREF_KEY,JSON.stringify((0,o.mapToSerializable)(this.preferredModelOptions)))}async initialize(){if(this.storage=await this.getStorage(t.EDITOR_DOCUMENT_MODEL_STORAGE),this.storage.get(t.EDITOR_DOC_OPTIONS_PREF_KEY))try{this.preferredModelOptions=(0,o.serializableToMap)(JSON.parse(this.storage.get(t.EDITOR_DOC_OPTIONS_PREF_KEY)))}catch(h){this.logger.error(h)}this._ready.ready()}async acceptExternalChange(h){this.hashCalculateService.initialized||await this.hashCalculateService.initialize();const a=this.editorDocModels.get(h.payload.toString());if(a&&!a.dirty){const g=await this.contentRegistry.getProvider(a.uri);if(g)if(g.provideEditorDocumentModelContentMd5)await g.provideEditorDocumentModelContentMd5(a.uri,a.encoding)!==a.getBaseContentMd5()&&a.updateContent(await this.contentRegistry.getContentForUri(a.uri,a.encoding),void 0,!0);else{const d=await this.contentRegistry.getContentForUri(a.uri,a.encoding);this.hashCalculateService.calculate(d)!==a.getBaseContentMd5()&&a.updateContent(d,void 0,!0)}}}createModelReference(h,a){return this._modelReferenceManager.getReference(h.toString(),a)}getModelReference(h,a){return this._modelReferenceManager.getReferenceIfHasInstance(h.toString(),a)}getModelDescription(h,a){const g=this.getModelReference(h,a);if(!g)return null;const d=g.instance,u={alwaysDirty:d.alwaysDirty,closeAutoSave:d.closeAutoSave,disposeEvenDirty:d.disposeEvenDirty,eol:d.eol,encoding:d.encoding,dirty:d.dirty,languageId:d.languageId,readonly:d.readonly,uri:d.uri,id:d.id,savable:d.savable};return g.dispose(),u}getAllModels(){return Array.from(this.editorDocModels.values())}hasLanguage(h){return this.getAllModels().findIndex(a=>a.languageId===h)!==-1}async getOrCreateModel(h,a){return this.editorDocModels.has(h)?this.editorDocModels.get(h):this.createModel(h,a)}get onceReady(){return this.initialize(),this._ready.onceReady.bind(this._ready)}createModel(h,a){if(!this.creatingEditorModels.has(h)){const g=this.doCreateModel(h,a).then(d=>(this.creatingEditorModels.delete(h),d),d=>{throw this.creatingEditorModels.delete(h),d});this.creatingEditorModels.set(h,g)}return this.creatingEditorModels.get(h)}async doCreateModel(h,a){const g=new o.URI(h);let d=await this.contentRegistry.getProvider(g);if(d||await this.fileSystem.shouldWaitProvider(g.scheme)&&(d=await this.contentRegistry.getProvider(g)),!d)throw new Error(`No document provider found for ${g.toString()}`);const[u,E,f,c,y,b]=await Promise.all([d.provideEditorDocumentModelContent(g,a),d.isReadonly?d.isReadonly(g):void 0,d.preferLanguageForUri?d.preferLanguageForUri(g):void 0,d.isAlwaysDirty?d.isAlwaysDirty(g):!1,d.closeAutoSave?d.closeAutoSave(g):!1,d.disposeEvenDirty?d.disposeEvenDirty(g):!1]);let A;d.provideEditorDocumentModelContentSize&&(A=await d.provideEditorDocumentModelContentSize(g)),!a&&d.provideEncoding&&(a=await d.provideEncoding(g));const S=d.provideEOL?await d.provideEOL(g):`
33905
+ `))}}})}registerMenus(d){d.registerMenuItem(l.MenuId.DebugCallStackContext,{command:{id:v.DEBUG_COMMANDS.RESTART_FRAME.id,label:(0,o.localize)("debugger.menu.restartFrame")},when:`${_.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame")} && ${_.CONTEXT_RESTART_FRAME_SUPPORTED.raw}`,enabledWhen:_.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.raw,order:10}),d.registerMenuItem(l.MenuId.DebugCallStackContext,{command:{id:v.DEBUG_COMMANDS.COPY_STACK_TRACE.id,label:(0,o.localize)("debugger.menu.copyCallstack")},when:_.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame"),order:20})}};t.DebugCallStackContribution=a,n.__decorate([(0,r.Autowired)(m.IDebugSessionManager),n.__metadata("design:type",p.DebugSessionManager)],a.prototype,"debugSessionManager",void 0),n.__decorate([(0,r.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],a.prototype,"clipboardService",void 0),t.DebugCallStackContribution=a=n.__decorate([(0,o.Domain)(l.MenuContribution,o.CommandContribution)],a)},61520:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugStackOperationView=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),l=e(66498),v=e(96090),_=n.__importDefault(e(12920)),m=p=>{const{session:s,thread:h}=p,{doStop:a,doStepIn:g,doStepOut:d,doStepOver:u,doContinue:E,doRestart:f,doPause:c,updateCurrentSession:y}=(0,o.useInjectable)(v.DebugToolbarService);if(s&&!h){const b=A=>{y(s),A()};return r.default.createElement("div",{className:_.default.debug_stack_session_operations},r.default.createElement(l.DebugAction,{run:()=>b(f),icon:"reload",label:(0,o.localize)("debug.action.restart")}),r.default.createElement(l.DebugAction,{run:()=>b(a),icon:"stop",label:(0,o.localize)("debug.action.stop")}))}if(!s&&h){const{stopped:b}=h,A=w=>{h.session.currentThread=h,w()},S=w=>w?r.default.createElement(l.DebugAction,{run:()=>A(E),icon:"continue",label:(0,o.localize)("debug.action.continue")}):r.default.createElement(l.DebugAction,{run:()=>A(c),enabled:!0,icon:"pause",label:(0,o.localize)("debug.action.pause")});return r.default.createElement("div",{className:_.default.debug_stack_thread_operations},S(b),r.default.createElement(l.DebugAction,{run:()=>A(u),enabled:b,icon:"step",label:(0,o.localize)("debug.action.step-over")}),r.default.createElement(l.DebugAction,{run:()=>A(g),enabled:b,icon:"step-in",label:(0,o.localize)("debug.action.step-into")}),r.default.createElement(l.DebugAction,{run:()=>A(d),enabled:b,icon:"step-out",label:(0,o.localize)("debug.action.step-out")}))}return null};t.DebugStackOperationView=m},85294:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackService=void 0;const n=e(85608),r=e(76003),o=e(93899),l=e(50755),v=e(4983),_=e(17280),m=e(29539);let p=class{constructor(){this.handleContextMenu=(h,a)=>{this.stackFrameSupportsRestart.reset(),h.stopPropagation(),h.preventDefault(),a instanceof m.DebugSession?this.callStackItemType.set("session"):a instanceof l.DebugThread?this.callStackItemType.set("thread"):a instanceof l.DebugStackFrame?(this.callStackItemType.set("stackFrame"),this.stackFrameSupportsRestart.set(a.canRestart)):this.callStackItemType.reset();const{x:g,y:d}=h.nativeEvent,u=this.contextMenuService.createMenu({id:o.MenuId.DebugCallStackContext,contextKeyService:this.debugContextKey.contextKeyScoped}),E=u.getMergedMenuNodes();u.dispose();const f=()=>{var y;return a instanceof l.DebugStackFrame?!((y=a.source)===null||y===void 0)&&y.inMemory?a.source.raw.path||a.source.reference||a.source.name:a.source?a.source.uri.toString():"":a instanceof l.DebugThread||a instanceof m.DebugSession?a.id:""},c=()=>a instanceof l.DebugStackFrame?{sessionId:a.session.id,threadId:a.thread.id,frameId:a.id}:a instanceof l.DebugThread?{sessionId:a.session.id,threadId:a.id}:a instanceof m.DebugSession?{sessionId:a.id}:void 0;this.ctxMenuRenderer.show({anchor:{x:g,y:d},menuNodes:E,args:[f(),c()],contextKeyService:this.debugContextKey.contextKeyScoped})},this.stackFrameSupportsRestart||(this.stackFrameSupportsRestart=v.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.bind(this.debugContextKey.contextKeyScoped)),this.callStackItemType||(this.callStackItemType=v.CONTEXT_CALLSTACK_ITEM_TYPE.bind(this.debugContextKey.contextKeyScoped))}};t.DebugCallStackService=p,n.__decorate([(0,r.Autowired)(o.AbstractContextMenuService),n.__metadata("design:type",o.AbstractContextMenuService)],p.prototype,"contextMenuService",void 0),n.__decorate([(0,r.Autowired)(o.ICtxMenuRenderer),n.__metadata("design:type",o.ICtxMenuRenderer)],p.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,r.Autowired)(_.DebugContextKey),n.__metadata("design:type",_.DebugContextKey)],p.prototype,"debugContextKey",void 0),t.DebugCallStackService=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},18028:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugCallStackView=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),l=e(64582),v=e(75651),_=n.__importDefault(e(12920)),m=({viewState:p})=>{const s=(0,o.useInjectable)(l.IDebugSessionManager),[h,a]=r.default.useState([]);return r.default.useEffect(()=>{const g=s.onDidStartDebugSession(u=>{h.push(u),a([...h])}),d=s.onDidDestroyDebugSession(u=>{const E=h.findIndex(f=>f.id===u.id);h.splice(E,1),a([...h])});return()=>{g.dispose(),d.dispose()}},[]),r.default.createElement("div",{className:_.default.call_stack_wrapper},h.filter(g=>!g.parentSession).map(g=>r.default.createElement(v.DebugStackSessionView,{key:g.id,viewState:p,session:g,indent:0})))};t.DebugCallStackView=m},59334:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugVariablesModel=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(98650);let m=n=class extends l.TreeModel{constructor(s){super(),this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(s)}init(s){this.root=s,this.root.watcher.on(l.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};t.DebugVariablesModel=m,m.DEFAULT_FLUSH_DELAY=100,t.DebugVariablesModel=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[_.ExpressionContainer])],m)},30865:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugVariablesModelService=void 0;const r=e(85608),o=r.__importDefault(e(46343)),l=e(76003),v=e(97267),_=e(41869),m=e(93899),p=e(98650),s=e(32756),h=e(17280),a=e(59334),g=r.__importDefault(e(57259)),{Path:d}=_.path;class u{constructor(){this._keepExpandedScopesMap=new Map}getMirrorScope(c){return Array.from(this._keepExpandedScopesMap.keys()).find(y=>(0,o.default)(y,c.getRawScope()))}isTopLevelScope(c){return!c.parent||p.DebugVariableRoot.is(c.parent)}set(c){const y=c.getRawScope();if(y){const A=this.getMirrorScope(c)||y,S=this._keepExpandedScopesMap.get(A)||{expandedVariables:[],scopeExpanded:!1};this.isTopLevelScope(c)?S.scopeExpanded=c.expanded:S.expandedVariables=c.expanded?Array.from(new Set([...S.expandedVariables,c.variablesReference])):S.expandedVariables.filter(w=>w!==c.variablesReference),this._keepExpandedScopesMap.set(A,S)}}getExpandedVariables(c){var y;const b=this.getMirrorScope(c);return b?((y=this._keepExpandedScopesMap.get(b))===null||y===void 0?void 0:y.expandedVariables)||[]:[]}isScopeExpanded(c){var y;const b=this.getMirrorScope(c);return b?!!(!((y=this._keepExpandedScopesMap.get(b))===null||y===void 0)&&y.scopeExpanded):!1}clear(){this._keepExpandedScopesMap.clear()}}let E=n=class{constructor(){this._changeEventDispatchQueue=[],this._pendingFlushCallbacks=[],this._isFlushingEventQueue=!1,this._disposed=!1,this.selectedDecoration=new v.Decoration(g.default.mod_selected),this.focusedDecoration=new v.Decoration(g.default.mod_focused),this.contextMenuDecoration=new v.Decoration(g.default.mod_actived),this.loadingDecoration=new v.Decoration(g.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new _.Emitter,this.onDidUpdateTreeModelEmitter=new _.Emitter,this.flushDispatchChangeDelayer=new _.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new _.DisposableCollection,this.currentSessionDisposableCollection=new _.DisposableCollection,this.keepExpandedScopesModel=new u,this.flushEventQueue=()=>{if(!(this._disposed||this._isFlushingEventQueue))return this.flushQueuedEventBatch()},this.flushQueuedEventBatch=()=>{if(this._disposed||!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;const c=[...this._changeEventDispatchQueue];this._changeEventDispatchQueue=[],c.sort((b,A)=>{const S=d.pathDepth(b),w=d.pathDepth(A);return S-w});const y=[c[0]];for(const b of c)y.some(A=>this.isSameOrParentPath(A,b))||y.push(b);return(0,_.pSeries)(y.map(b=>async()=>{var A,S;const w=(S=(A=this.treeModel)===null||A===void 0?void 0:A.root)===null||S===void 0?void 0:S.watchEvents.get(b);return w&&typeof w.callback=="function"&&await w.callback({type:v.WatchEvent.Changed,path:b}),null}))},this.activeNodeDecoration=(c,y=!0)=>{var b;if(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),c){if(this.selectedNodes.length>0)for(const A of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(A);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(c),this.focusedDecoration.addTarget(c),this._focusedNode=c,this._selectedNodes=[c],y&&((b=this.treeModel)===null||b===void 0||b.dispatchChange())}},this.activeNodeActivedDecoration=c=>{var y;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(c),this._contextMenuNode=c,(y=this.treeModel)===null||y===void 0||y.dispatchChange()},this.enactiveNodeDecoration=()=>{var c;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(c=this.treeModel)===null||c===void 0||c.dispatchChange()},this.handleContextMenu=(c,y)=>{var b;if(c.stopPropagation(),c.preventDefault(),!y||y instanceof p.DebugScope){this.enactiveNodeDecoration(),this.debugContextKey.contextVariableEvaluateNamePresent.set(!1);return}this._currentVariableInternalContext=y;const{x:A,y:S}=c.nativeEvent;y&&(this.activeNodeActivedDecoration(y),this.debugContextKey.contextDebugProtocolVariableMenu.set(y.variableMenuContext),this.debugContextKey.contextVariableEvaluateNamePresent.set(!!y.evaluateName)),!((b=y.session)===null||b===void 0)&&b.capabilities.supportsReadMemoryRequest&&y.memoryReference!==void 0?this.debugContextKey.contextCanViewMemory.set(!0):this.debugContextKey.contextCanViewMemory.set(!1);const w=this.contextMenuService.createMenu({id:m.MenuId.DebugVariablesContext,contextKeyService:this.debugContextKey.contextKeyScoped}),I=w.getMergedMenuNodes();w.dispose(),this.ctxMenuRenderer.show({anchor:{x:A,y:S},menuNodes:I,args:[y.toDebugProtocolObject()]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=c=>{this.activeNodeDecoration(c)},this.handleTwistierClick=(c,y)=>{y===v.TreeNodeType.CompositeTreeNode?(this.activeNodeDecoration(c,!1),this.toggleDirectory(c)):this.activeNodeDecoration(c)},this.toggleDirectory=async c=>{c.expanded?c.setCollapsed():await c.setExpanded(!0),this.keepExpandedScopesModel.set(c)},this.listenCurrentSessionVariableChange(),this.listenViewModelChange()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get treeHandle(){return this._debugVariablesTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get currentVariableInternalContext(){return this._currentVariableInternalContext}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this._disposed=!0,this.disposeEventQueue(),this.disposeTreeListeners(),this.currentSessionDisposableCollection.disposed||this.currentSessionDisposableCollection.dispose()}disposeEventQueue(){clearTimeout(this._eventFlushTimeout),this._changeEventDispatchQueue=[],this._pendingFlushCallbacks=[],this._isFlushingEventQueue=!1;const c=this.flushEventQueueDeferred;this.flushEventQueueDeferred=null,c?.resolve()}disposeTreeListeners(){this.disposableCollection.disposed||this.disposableCollection.dispose(),this.disposableCollection=new _.DisposableCollection}listenViewModelChange(){this.viewModel.onDidChange(async()=>{this._disposed||(this.listenCurrentSessionVariableChange(),this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{var c,y;if(!this._disposed){if(this.viewModel&&this.viewModel.currentSession&&!this.viewModel.currentSession.terminated){const b=await this.initTreeModel(this.viewModel.currentSession);this._activeTreeModel=b,await((c=this._activeTreeModel)===null||c===void 0?void 0:c.ensureReady);const A=((y=this._activeTreeModel)===null||y===void 0?void 0:y.root.children)||[];if(A.length>0&&A.every(S=>!S.expanded))for(const S of A)S.getRawScope().expensive===!1&&!S.expanded&&await this.toggleDirectory(S);await this.restoreExpandedScopes(A)}else this._activeTreeModel=void 0,this.keepExpandedScopesModel.clear();this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel)}}))})}listenCurrentSessionVariableChange(){if(this.currentSession!==this.viewModel.currentSession&&(this.currentSession=this.viewModel.currentSession,this.currentSessionDisposableCollection.dispose(),this.currentSessionDisposableCollection=new _.DisposableCollection,this.currentSession)){const c=this.currentSession;this.currentSessionDisposableCollection.push(c.onVariableChange(()=>{c===this.currentSession&&c===this.viewModel.currentSession&&!c.terminated&&this.refresh()}))}}listenTreeViewChange(){this.disposeTreeListeners(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(v.TreeNodeEvent.WillResolveChildren,c=>{this.loadingDecoration.addTarget(c)})),this.disposableCollection.push(this.treeModel.root.watcher.on(v.TreeNodeEvent.DidResolveChildren,c=>{this.loadingDecoration.removeTarget(c)})))}async initTreeModel(c){const y=new p.DebugVariableRoot(c);if(y)return this._activeTreeModel=this.injector.get(a.DebugVariablesModel,[y]),this.initDecorations(y),this.listenTreeViewChange(),this._activeTreeModel}isPreservedRootScope(c){const y=c.getRawScope();return!!y&&(y.name==="Locals"||y.name==="Globals")&&(!c.parent||p.DebugVariableRoot.is(c.parent))}async restoreExpandedScopes(c){for(const y of c){this.isPreservedRootScope(y)&&this.keepExpandedScopesModel.isScopeExpanded(y)&&!y.expanded&&await y.setExpanded(!0);const b=this.keepExpandedScopesModel.getExpandedVariables(y),A=y.children||[];for(const S of A)b.includes(S.variablesReference)&&(await S.setExpanded(!0),Array.isArray(S.children)&&await this.restoreExpandedScopes(S.children))}}async refresh(c){if(!this._disposed&&this.isActiveTreeModelForCurrentSession()){if(!c)if(this.treeModel)c=this.treeModel.root;else return;return!p.ExpressionContainer.is(c)&&c.parent&&(c=c.parent),this.queueChangeEvent(c.path,async()=>{var y;const b=((y=this.treeModel)===null||y===void 0?void 0:y.root.children)||[];await this.restoreExpandedScopes(b),this.onDidRefreshedEmitter.fire()})}}isActiveTreeModelForCurrentSession(){var c,y;const b=(y=(c=this.treeModel)===null||c===void 0?void 0:c.root)===null||y===void 0?void 0:y.session;return b?b===this.currentSession&&b===this.viewModel.currentSession&&!b.terminated:!0}queueChangeEvent(c,y){return this._disposed?Promise.resolve():(this._changeEventDispatchQueue.indexOf(c)===-1&&this._changeEventDispatchQueue.push(c),this._pendingFlushCallbacks.push(y),this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new _.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var b,A;try{if(this._disposed)return;for(this._isFlushingEventQueue=!0;!this._disposed&&(this._changeEventDispatchQueue.length>0||this._pendingFlushCallbacks.length>0);){const S=[...this._pendingFlushCallbacks];if(this._pendingFlushCallbacks=[],await this.flushQueuedEventBatch(),this._disposed)return;await(0,_.pSeries)(S.map(w=>async()=>(this._disposed||await w(),null)))}(b=this.flushEventQueueDeferred)===null||b===void 0||b.resolve()}catch(S){this._disposed||(A=this.flushEventQueueDeferred)===null||A===void 0||A.reject(S)}finally{this._isFlushingEventQueue=!1,this.flushEventQueueDeferred=null}},n.DEFAULT_REFRESH_DELAY)),this.flushEventQueueDeferred.promise)}isSameOrParentPath(c,y){const b=new d(c),A=new d(y);return b.isEqual(A)||b.isEqualOrParent(A)}initDecorations(c){this._decorations=new v.DecorationsManager(c),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.loadingDecoration),this.decorations.removeDecoration(this.contextMenuDecoration))}handleTreeHandler(c){this._debugVariablesTreeHandle={...c,getModel:()=>this.treeModel}}async copyEvaluateName(c){c&&await this.clipboardService.writeText(c.evaluateName)}async copyValue(c){if(!c)return;const b=await(async()=>{if(c.session&&c.session.capabilities.supportsValueFormattingOptions)try{const{variable:{evaluateName:A}}=c;if(A){const S=await c.session.evaluate(A,"clipboard");if(S)return S.result}return""}catch{return""}else return c.value})();b&&await this.clipboardService.writeText(b)}};t.DebugVariablesModelService=E,E.DEFAULT_REFRESH_DELAY=100,E.DEFAULT_TRIGGER_DELAY=200,r.__decorate([(0,l.Autowired)(l.INJECTOR_TOKEN),r.__metadata("design:type",l.Injector)],E.prototype,"injector",void 0),r.__decorate([(0,l.Autowired)(m.ICtxMenuRenderer),r.__metadata("design:type",m.ICtxMenuRenderer)],E.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,l.Autowired)(m.AbstractContextMenuService),r.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"contextMenuService",void 0),r.__decorate([(0,l.Autowired)(s.DebugViewModel),r.__metadata("design:type",s.DebugViewModel)],E.prototype,"viewModel",void 0),r.__decorate([(0,l.Autowired)(_.IClipboardService),r.__metadata("design:type",Object)],E.prototype,"clipboardService",void 0),r.__decorate([(0,l.Autowired)(h.DebugContextKey),r.__metadata("design:type",h.DebugContextKey)],E.prototype,"debugContextKey",void 0),t.DebugVariablesModelService=E=n=r.__decorate([(0,l.Injectable)(),r.__metadata("design:paramtypes",[])],E)},86752:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariablesPanelContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),v=e(43718),_=e(57517),m=e(14951),p=e(2156),s=e(72665),h=e(94170),a=e(23268),g=e(64582),d=e(61752),u=e(32756),E=e(4983),f=e(95033),c=e(30865);let y=class{registerCommands(A){A.registerCommand(g.DEBUG_COMMANDS.SET_VARIABLE_VALUE,{execute:async()=>{var I;this.reporterService.point(g.DEBUG_REPORT_NAME===null||g.DEBUG_REPORT_NAME===void 0?void 0:g.DEBUG_REPORT_NAME.DEBUG_VARIABLES,g.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id);const{currentVariableInternalContext:D}=this.debugVariablesModelService;if(!D)return;const T=await this.quickInputService.open({placeHolder:(0,o.localize)("debugger.menu.setValue.param"),value:D.description.replace(/^\"(.*)\"$/,"$1")});if(T!=null){try{await D.setValue(T)}catch(R){this.messageService.error(R.message)}(I=this.debugVariablesModelService.treeModel)===null||I===void 0||I.dispatchChange()}}}),A.registerCommand(g.DEBUG_COMMANDS.COPY_VARIABLE_VALUE,{execute:async()=>{const{currentVariableInternalContext:I}=this.debugVariablesModelService;this.debugVariablesModelService.copyValue(I)}}),A.registerCommand(g.DEBUG_COMMANDS.COPY_EVALUATE_PATH,{execute:async()=>{const{currentVariableInternalContext:I}=this.debugVariablesModelService;this.debugVariablesModelService.copyEvaluateName(I)}}),A.registerCommand(g.DEBUG_COMMANDS.ADD_TO_WATCH_ID,{execute:async I=>{const{currentVariableInternalContext:D}=this.debugVariablesModelService;if(I instanceof v.URI){const T=this.workbenchEditorService.currentEditor;if(!T?.monacoEditor||!T?.monacoEditor.hasModel())return;const R=T.monacoEditor,M=R.getModel().getValueInRange(R.getSelection());this.debugWatchModelService.addWatchExpression(M);return}else D&&this.debugWatchModelService.addWatchExpression(D.evaluateName)}});const S="ms-vscode.hexeditor",w=`${v.CUSTOM_EDITOR_SCHEME}-hexEditor.hexedit`;A.registerCommand(g.DEBUG_COMMANDS.VIEW_MEMORY_ID,{execute:async I=>{var D;const T=await this.commandService.executeCommand("extension.getDescription",S);if(T&&T.enabled){const R=(D=this.viewModel.currentSession)===null||D===void 0?void 0:D.id,M=I.memoryReference;this.workbenchEditorService.open(v.URI.from({scheme:E.DEBUG_MEMORY_SCHEME,authority:R,path:"/"+encodeURIComponent(M||"")+"/memory.bin"}),{disableNavigate:!0,preview:!0,forceOpenType:{type:_.EditorOpenType.component,componentId:w}})}else this.messageService.warning((0,o.localize)("debug.variables.view.memory.prompt.hexEditor.notInstalled"))}})}async initialize(){this.fileSystem.registerProvider(E.DEBUG_MEMORY_SCHEME,this.debugMemoryFileSystemProvider)}registerResource(A){A.registerResourceProvider({scheme:E.DEBUG_MEMORY_SCHEME,provideResource:async S=>({uri:S,icon:(0,o.getIcon)("hex"),name:S.displayName})})}registerMenus(A){var S;A.registerMenuItem(l.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.setValue")},order:10,when:E.CONTEXT_SET_VARIABLE_SUPPORTED.raw,group:"3_modification"}),A.registerMenuItem(l.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.COPY_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.copyValue")},order:10,group:"5_cutcopypaste"}),A.registerMenuItem(l.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.COPY_EVALUATE_PATH.id,label:(0,o.localize)("debugger.menu.copyEvaluatePath")},when:E.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:20,group:"5_cutcopypaste"}),A.registerMenuItem(l.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:E.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:100,group:"z_commands"}),A.registerMenuItem(l.MenuId.EditorContext,{command:{id:g.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:(S=a.ContextKeyExpr.and(h.EditorContextKeys.hasNonEmptySelection,h.EditorContextKeys.editorTextFocus))===null||S===void 0?void 0:S.keys().reduce((w,I)=>w+" && "+I,E.CONTEXT_IN_DEBUG_MODE.raw),group:"debug",order:1}),A.registerMenuItem(l.MenuId.DebugVariablesContext,{command:{id:g.DEBUG_COMMANDS.VIEW_MEMORY_ID.id,label:(0,o.localize)("debug.variables.view.memory")},iconClass:"",when:`${E.CONTEXT_CAN_VIEW_MEMORY.equalsTo(!0)} && ${E.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,type:"icon"})}};t.VariablesPanelContribution=y,n.__decorate([(0,r.Autowired)(o.IQuickInputService),n.__metadata("design:type",Object)],y.prototype,"quickInputService",void 0),n.__decorate([(0,r.Autowired)(c.DebugVariablesModelService),n.__metadata("design:type",c.DebugVariablesModelService)],y.prototype,"debugVariablesModelService",void 0),n.__decorate([(0,r.Autowired)(f.DebugWatchModelService),n.__metadata("design:type",f.DebugWatchModelService)],y.prototype,"debugWatchModelService",void 0),n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],y.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(s.IMessageService),n.__metadata("design:type",Object)],y.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],y.prototype,"reporterService",void 0),n.__decorate([(0,r.Autowired)(v.CommandService),n.__metadata("design:type",Object)],y.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(u.DebugViewModel),n.__metadata("design:type",u.DebugViewModel)],y.prototype,"viewModel",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",p.FileServiceClient)],y.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(d.DebugMemoryFileSystemProvider),n.__metadata("design:type",d.DebugMemoryFileSystemProvider)],y.prototype,"debugMemoryFileSystemProvider",void 0),t.VariablesPanelContribution=y=n.__decorate([(0,o.Domain)(o.ClientAppContribution,_.BrowserEditorContribution,l.MenuContribution,o.CommandContribution)],y)},28875:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_VARIABLE_TREE_NODE_HEIGHT=t.DebugVariableRenderedNode=t.DebugVariableView=t.DEBUG_VARIABLE_TREE_FIELD_NAME=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=e(41869),_=e(98650),m=e(30865),p=n.__importDefault(e(57259));t.DEBUG_VARIABLE_TREE_FIELD_NAME="DEBUG_VARIABLE_TREE_FIELD";const s=({viewState:a})=>{const g=(0,v.useInjectable)(m.DebugVariablesModelService),d=o.default.useRef(null),[u,E]=o.default.useState(),f=22,{width:c,height:y}=a;o.default.useEffect(()=>{const M=g.onDidUpdateTreeModel(async O=>{E(O)});return()=>{M.dispose(),g.removeNodeDecoration(),E(void 0)}},[]);const b=M=>{g.handleTreeHandler({...M,hasDirectFocus:()=>d.current===document.activeElement})},A=(M,O,x)=>{M.stopPropagation();const{handleTwistierClick:k}=g;O&&k(O,x)},S=(M,O)=>{const{handleContextMenu:x}=g;x(M,O)},w=M=>{const{handleContextMenu:O}=g;O(M)},I=M=>{const{enactiveNodeDecoration:O}=g;O()},D=M=>{const{enactiveNodeDecoration:O}=g;O()},T=o.default.useCallback(M=>{const O=g.decorations.getDecorations(M.item);return o.default.createElement(t.DebugVariableRenderedNode,{item:M.item,itemType:M.itemType,decorations:O,onClick:A,onTwistierClick:A,onContextMenu:S,defaultLeftPadding:0,leftPadding:8})},[u]),R=()=>u?o.default.createElement(l.RecycleTree,{height:y,width:c,itemHeight:f,onReady:b,model:u,placeholder:()=>o.default.createElement("span",null),overflow:"auto"},T):o.default.createElement("span",null);return o.default.createElement("div",{className:p.default.debug_variables_container,tabIndex:-1,ref:d,onContextMenu:w,onClick:I,onBlur:D,"data-name":t.DEBUG_VARIABLE_TREE_FIELD_NAME},R())};t.DebugVariableView=s;const h=({item:a,decorations:g,defaultLeftPadding:d,leftPadding:u,onClick:E,onTwistierClick:f,onContextMenu:c,itemType:y})=>{const b=(0,v.useDesignStyles)(p.default.expansion_toggle,"expansion_toggle"),A=k=>{E(k,a,l.CompositeTreeNode.is(a)?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode)},S=k=>{k.nativeEvent.which!==0&&(y===l.TreeNodeType.TreeNode||y===l.TreeNodeType.CompositeTreeNode)&&c&&c(k,a,y)},w=`${(d||8)+(a.depth||0)*(u||0)+(_.ExpressionContainer.is(a)?0:18)}px`,I={height:t.DEBUG_VARIABLE_TREE_NODE_HEIGHT,lineHeight:`${t.DEBUG_VARIABLE_TREE_NODE_HEIGHT}px`,paddingLeft:w},D=k=>o.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_segment,p.default.debug_variables_node_displayname,p.default.debug_variables_variable,k.description?p.default.name:"")},k.displayName,k.value?":":""),T=k=>{const F=/^true|false$/i,L=/^(['"]).*\1$/,{description:N=""}=k,U=N!=="undefined"?N.replace("function","\u0192 "):"",W=[p.default.debug_variables_variable];return a.variableType==="number"||a.variableType==="boolean"||a.variableType==="string"?W.push(p.default[a.variableType]):isNaN(+U)?F.test(U)?W.push(p.default.boolean):L.test(U)&&W.push(p.default.string):W.push(p.default.number),o.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_segment_grow,p.default.debug_variables_node_description,...W)},U)},R=()=>o.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_segment,p.default.debug_variables_node_tail)},M()),M=()=>o.default.createElement("div",{className:p.default.debug_variables_node_status},a.badge),O=(k,F)=>{const L=N=>{F(N,k,y)};return g&&g?.classlist.indexOf(p.default.mod_loading)>-1?o.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_segment,b)},o.default.createElement(l.Loading,null)):o.default.createElement("div",{onClick:L,className:(0,r.default)(p.default.debug_variables_node_segment,b,(0,v.getIcon)("right"),{[`${p.default.mod_collapsed}`]:!k.expanded})})},x=k=>{if(l.CompositeTreeNode.is(k))return O(k,f)};return o.default.createElement("div",{key:a.id,onClick:A,onContextMenu:S,title:a.description||"",className:(0,r.default)(p.default.debug_variables_node,g?g.classlist:null),style:I,"data-id":a.id},o.default.createElement("div",{className:(0,r.default)(p.default.debug_variables_node_content)},x(a),o.default.createElement("div",{className:p.default.debug_variables_node_overflow_wrap},D(a),T(a)),R()))};t.DebugVariableRenderedNode=h,t.DEBUG_VARIABLE_TREE_NODE_HEIGHT=22},85454:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatchModel=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(98650);let m=n=class extends l.TreeModel{constructor(s){super(),this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(s)}init(s){this.root=s,this.root.watcher.on(l.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};t.DebugWatchModel=m,m.DEFAULT_FLUSH_DELAY=100,t.DebugWatchModel=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[_.ExpressionContainer])],m)},95033:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DebugWatchModelService=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(93899),m=e(38029),p=e(50755),s=e(98650),h=e(32756),a=e(4983),g=e(26296),d=e(85454),u=r.__importDefault(e(21315)),{Path:E}=v.path;let f=n=class{constructor(){this._changeEventDispatchQueue=[],this.selectedDecoration=new l.Decoration(u.default.mod_selected),this.focusedDecoration=new l.Decoration(u.default.mod_focused),this.contextMenuDecoration=new l.Decoration(u.default.mod_actived),this.loadingDecoration=new l.Decoration(u.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new v.Emitter,this.onDidUpdateTreeModelEmitter=new v.Emitter,this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new v.DisposableCollection,this.loadedDeferred=new v.Deferred,this.activeNodeDecoration=(y,b=!0)=>{var A;if(a.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService),this.contextMenuNode&&(this.focusedDecoration.removeTarget(this.contextMenuNode),this.selectedDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),y){if(this.selectedNodes.length>0)for(const S of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(S);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(y),this.focusedDecoration.addTarget(y),this._focusedNode=y,this._selectedNodes=[y],b&&((A=this.treeModel)===null||A===void 0||A.dispatchChange())}},this.activeNodeActivedDecoration=y=>{var b;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(y),this._contextMenuNode=y,(b=this.treeModel)===null||b===void 0||b.dispatchChange()},this.enactiveNodeDecoration=()=>{var y;a.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService).set(!1),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(y=this.treeModel)===null||y===void 0||y.dispatchChange()},this.handleContextMenu=(y,b)=>{var A;y.stopPropagation(),y.preventDefault();const{x:S,y:w}=y.nativeEvent;b?this.activeNodeActivedDecoration(b):this.enactiveNodeDecoration();let I;b?I=b:I=(A=this.treeModel)===null||A===void 0?void 0:A.root,this.watchItemType.set(I instanceof s.DebugWatchNode?"expression":I instanceof s.DebugVariable||I instanceof s.DebugVariableContainer?"variable":void 0);const D=this.contextMenuService.createMenu({id:_.MenuId.DebugWatchContext,contextKeyService:this.contextMenuContextKeyService}),T=D.getMergedMenuNodes();D.dispose(),this.ctxMenuRenderer.show({anchor:{x:S,y:w},menuNodes:T,args:[I]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=y=>{this.activeNodeDecoration(y)},this.handleTwistierClick=(y,b)=>{if(b===l.TreeNodeType.CompositeTreeNode){if(s.DebugWatchNode.is(y)&&y.available){this.activeNodeDecoration(y,!1),this.toggleDirectory(y);return}else if(y.variablesReference){this.activeNodeDecoration(y,!1),this.toggleDirectory(y);return}}this.activeNodeDecoration(y)},this.toggleDirectory=async y=>{y.expanded?this.treeHandle.collapseNode(y):this.treeHandle.expandNode(y)},this.proxyPrompt=y=>{let b=!1;const A=async S=>{if(!b){if(b=!0,S){if(y instanceof l.NewPromptHandle){const w=y.parent;if(y.addAddonAfter("loading_indicator"),w.session)this.addWatchExpression(S);else{const I=new s.DebugWatchNode(w.session,S,w);this.dispatchWatchEvent(w.path,{type:l.WatchEvent.Added,node:I,id:w.id}),this.debugWatch.addWatchExpression(S)}}else if(y instanceof l.RenamePromptHandle){const w=y.target,I=w.parent;if(y.addAddonAfter("loading_indicator"),I.session)this.debugWatch.renameWatchExpression(w.name,S),this.initTreeModel();else{const D=new E(w.path).dir.join(S).toString();this.dispatchWatchEvent(I.path,{type:l.WatchEvent.Moved,oldPath:w.path,newPath:D}),this.debugWatch.renameWatchExpression(w.name,S)}}}return!0}};y.destroyed||(y.onCommit(A),y.onBlur(A))},this.flushEventQueue=()=>{let y;if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((A,S)=>{const w=E.pathDepth(A),I=E.pathDepth(S);return w-I});const b=[this._changeEventDispatchQueue[0]];for(const A of this._changeEventDispatchQueue)b.some(S=>A.indexOf(S)===0)||b.push(A);return y=(0,v.pSeries)(b.map(A=>async()=>{var S,w;const I=(w=(S=this.treeModel)===null||S===void 0?void 0:S.root)===null||w===void 0?void 0:w.watchEvents.get(A);return I&&typeof I.callback=="function"&&await I.callback({type:l.WatchEvent.Changed,path:A}),null})),this._changeEventDispatchQueue=[],y},this.debugWatch=new p.DebugWatch(this.manager,this.reporterService),this.init(),this.watchItemType=a.CONTEXT_WATCH_ITEM_TYPE.bind(this.contextKeyService)}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get treeHandle(){return this._debugWatchTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}async save(y=[]){await(await this.storageProvider(v.STORAGE_NAMESPACE.DEBUG)).set(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,y)}async load(){const b=await(await this.storageProvider(v.STORAGE_NAMESPACE.DEBUG)).get(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,[]);await this.debugWatch.updateWatchExpressions(b),this.loadedDeferred.resolve()}async init(){await this.loadedDeferred.promise,this.initTreeModel(),this.listenDebugWatchChange()}listenDebugWatchChange(){this.debugWatch.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.initTreeModel()})}),this.debugWatch.onDidVariableChange(async()=>{this.refresh()}),this.debugWatch.onDidExpressionChange(y=>{this.save(y)})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,y=>{this.loadingDecoration.addTarget(y)})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,y=>{this.loadingDecoration.removeTarget(y)})))}async initTreeModel(){const y=await this.debugWatch.getRoot();if(y)return this._activeTreeModel=this.injector.get(d.DebugWatchModel,[y]),this.initDecorations(y),this.listenTreeViewChange(),this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel),this._activeTreeModel}initDecorations(y){this._decorations=new l.DecorationsManager(y),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(y){this._debugWatchTreeHandle=y}async newDebugWatchNodePrompt(){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptNewTreeNode(this.treeModel.root))}async renameDebugWatchNodePrompt(y){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptRename(y))}removeDebugWatchNode(y){this.debugWatch.removeWatchExpression(y.name),y.session?this.initTreeModel():this.dispatchWatchEvent(y.parent.path,{type:l.WatchEvent.Removed,path:y.path})}async copyValue(y){const b=await y.getClipboardValue();b&&await this.clipboardService.writeText(b)}async clearAllExpression(){this.debugWatch.updateWatchExpressions([]),await this.initTreeModel(),this.save()}addWatchExpression(y){this.debugWatch.addWatchExpression(y),this.initTreeModel()}dispatchWatchEvent(y,b){var A;const S=(A=this.treeModel)===null||A===void 0?void 0:A.root.watchEvents.get(y);S&&S.callback&&S.callback(b)}collapsedAll(){var y;(y=this.treeModel)===null||y===void 0||y.root.collapsedAll()}async refresh(y){if(!y)if(this.treeModel)y=this.treeModel.root;else return;!s.ExpressionContainer.is(y)&&y.parent&&(y=y.parent),this.queueChangeEvent(y.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(y,b){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new v.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var A;await this.flushEventQueue(),(A=this.flushEventQueueDeferred)===null||A===void 0||A.resolve(),this.flushEventQueueDeferred=null,b()},n.DEFAULT_REFRESH_DELAY)),this._changeEventDispatchQueue.indexOf(y)===-1&&this._changeEventDispatchQueue.push(y)}};t.DebugWatchModelService=f,f.DEFAULT_REFRESH_DELAY=100,f.DEFAULT_TRIGGER_DELAY=200,f.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY="watchers",r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],f.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(_.ICtxMenuRenderer),r.__metadata("design:type",_.ICtxMenuRenderer)],f.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,o.Autowired)(_.AbstractContextMenuService),r.__metadata("design:type",_.AbstractContextMenuService)],f.prototype,"contextMenuService",void 0),r.__decorate([(0,o.Autowired)(h.DebugViewModel),r.__metadata("design:type",h.DebugViewModel)],f.prototype,"viewModel",void 0),r.__decorate([(0,o.Autowired)(g.IDebugSessionManager),r.__metadata("design:type",m.DebugSessionManager)],f.prototype,"manager",void 0),r.__decorate([(0,o.Autowired)(v.IReporterService),r.__metadata("design:type",Object)],f.prototype,"reporterService",void 0),r.__decorate([(0,o.Autowired)(v.IContextKeyService),r.__metadata("design:type",Object)],f.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(v.StorageProvider),r.__metadata("design:type",Function)],f.prototype,"storageProvider",void 0),r.__decorate([(0,o.Autowired)(v.IClipboardService),r.__metadata("design:type",Object)],f.prototype,"clipboardService",void 0),t.DebugWatchModelService=f=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],f)},14600:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatchPanelContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),v=e(64582),_=e(98650),m=e(4983),p=e(95033);let s=class{registerCommands(a){a.registerCommand(v.DEBUG_COMMANDS.ADD_WATCHER,{execute:()=>{this.debugWatchModelService.newDebugWatchNodePrompt()}}),a.registerCommand(v.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.collapsedAll()}}),a.registerCommand(v.DEBUG_COMMANDS.REMOVE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.clearAllExpression()}}),a.registerCommand(v.DEBUG_COMMANDS.REMOVE_WATCHER,{execute:g=>{g instanceof _.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(g);const[d]=this.debugWatchModelService.selectedNodes;d instanceof _.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(d)}}),a.registerCommand(v.DEBUG_COMMANDS.EDIT_WATCHER,{execute:g=>{this.debugWatchModelService.renameDebugWatchNodePrompt(g)}}),a.registerCommand(v.DEBUG_COMMANDS.COPY_WATCHER_VALUE,{execute:g=>{this.debugWatchModelService.copyValue(g)}})}registerToolbarItems(a){a.registerItem({id:v.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,command:v.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("close-all"),viewId:v.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.removeAll")}),a.registerItem({id:v.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("collapse-all"),command:v.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,viewId:v.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.collapseAll"),when:m.CONTEXT_IN_DEBUG_MODE.raw}),a.registerItem({id:v.DEBUG_COMMANDS.ADD_WATCHER.id,iconClass:(0,o.getIcon)("plus"),command:v.DEBUG_COMMANDS.ADD_WATCHER.id,viewId:v.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.add"),when:m.CONTEXT_IN_DEBUG_MODE.raw})}registerMenus(a){a.registerMenuItem(l.MenuId.DebugWatchContext,{command:{id:v.DEBUG_COMMANDS.ADD_WATCHER.id,label:(0,o.localize)("debug.watch.add")},order:10,group:"3_modification"}),a.registerMenuItem(l.MenuId.DebugWatchContext,{command:{id:v.DEBUG_COMMANDS.EDIT_WATCHER.id,label:(0,o.localize)("debug.watch.edit")},when:m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:20,group:"3_modification"}),a.registerMenuItem(l.MenuId.DebugWatchContext,{command:{id:v.DEBUG_COMMANDS.COPY_WATCHER_VALUE.id,label:(0,o.localize)("debug.watch.copyValue")},when:`${m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression")} || ${m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("variable")} && ${m.CONTEXT_IN_DEBUG_MODE.raw}`,order:30,enabledWhen:m.CONTEXT_IN_DEBUG_MODE.raw,group:"3_modification"}),a.registerMenuItem(l.MenuId.DebugWatchContext,{command:{id:v.DEBUG_COMMANDS.REMOVE_WATCHER.id,label:(0,o.localize)("debug.watch.remove")},when:m.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:10,group:"z_commands"}),a.registerMenuItem(l.MenuId.DebugWatchContext,{command:{id:v.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,label:(0,o.localize)("debug.watch.removeAll")},order:20,group:"z_commands"})}registerKeybindings(a){a.registerKeybinding({command:v.DEBUG_COMMANDS.REMOVE_WATCHER.id,keybinding:"ctrlcmd+backspace",when:m.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.raw})}onStart(){this.debugWatchModelService.load()}};t.WatchPanelContribution=s,n.__decorate([(0,r.Autowired)(p.DebugWatchModelService),n.__metadata("design:type",p.DebugWatchModelService)],s.prototype,"debugWatchModelService",void 0),t.WatchPanelContribution=s=n.__decorate([(0,o.Domain)(o.ClientAppContribution,l.MenuContribution,o.CommandContribution,o.TabBarToolbarContribution,o.KeybindingContribution)],s)},64611:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_WATCH_TREE_NODE_HEIGHT=t.DebugWatchRenderedNode=t.DebugWatchView=t.DEBUG_WATCH_TREE_FIELD_NAME=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=e(41869),_=e(98650),m=e(95033),p=n.__importDefault(e(21315));t.DEBUG_WATCH_TREE_FIELD_NAME="DEBUG_WATCH_TREE_FIELD";const s=({viewState:a})=>{const g=(0,v.useInjectable)(m.DebugWatchModelService),d=22,u=o.default.useRef(null),[E,f]=o.default.useState(),{height:c}=a;o.default.useEffect(()=>y(),[]);const y=()=>{const M=g.treeModel;let O=!0;const x=new v.DisposableCollection;return x.push(v.Disposable.create(()=>{O=!1})),M&&M.ensureReady.then(()=>{O&&f(M)}),x.push(g.onDidUpdateTreeModel(async k=>{k&&await k.ensureReady,O&&f(k)})),()=>{g.removeNodeDecoration(),x.dispose()}},b=M=>{g.handleTreeHandler({...M,getModel:()=>E,hasDirectFocus:()=>u.current===document.activeElement})},A=(M,O,x)=>{M.stopPropagation();const{handleTwistierClick:k}=g;O&&k(O,x)},S=(M,O)=>{const{handleContextMenu:x}=g;x(M,O)},w=M=>{const{handleContextMenu:O}=g;O(M)},I=M=>{const{enactiveNodeDecoration:O}=g;O()},D=M=>{const{enactiveNodeDecoration:O}=g;O()},T=o.default.useCallback(M=>{const O=g.decorations.getDecorations(M.item);return o.default.createElement(t.DebugWatchRenderedNode,{item:M.item,itemType:M.itemType,decorations:O,onClick:A,onTwistierClick:A,onContextMenu:S,defaultLeftPadding:12,leftPadding:8})},[E]),R=()=>E?o.default.createElement(l.RecycleTree,{height:c,itemHeight:d,onReady:b,model:E,placeholder:()=>o.default.createElement("span",null)},T):o.default.createElement("span",null);return o.default.createElement("div",{className:p.default.debug_watch_container,tabIndex:-1,ref:u,onContextMenu:w,onClick:I,onBlur:D,"data-name":t.DEBUG_WATCH_TREE_FIELD_NAME},R())};t.DebugWatchView=s;const h=({item:a,decorations:g,defaultLeftPadding:d,leftPadding:u,onClick:E,onTwistierClick:f,onContextMenu:c,itemType:y})=>{const b=(0,v.useDesignStyles)(p.default.expansion_toggle,"expansion_toggle"),A=y===l.TreeNodeType.RenamePrompt,S=y===l.TreeNodeType.NewPrompt,w=A||S,I=N=>{const U=a.getRawWatch();U&&E(N,a,U.variablesReference>0?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode)},D=N=>{N.nativeEvent.which!==0&&(y===l.TreeNodeType.TreeNode||y===l.TreeNodeType.CompositeTreeNode)&&c&&c(N,a,y)},T={height:t.DEBUG_WATCH_TREE_NODE_HEIGHT,lineHeight:`${t.DEBUG_WATCH_TREE_NODE_HEIGHT}px`,paddingLeft:`${(d||8)+(a.depth||0)*(u||0)}px`},R=N=>w&&N instanceof l.PromptHandle?o.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment,p.default.debug_watch_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",p.default.debug_watch_node_prompt_box)},o.default.createElement(N.ProxiedInput,{wrapperStyle:{height:t.DEBUG_WATCH_TREE_NODE_HEIGHT,padding:"0 5px"}}))):o.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment,p.default.debug_watch_node_displayname,p.default.debug_watch_variable,N.description?p.default.name:"")},N.name,N.description?":":""),M=N=>{const U=/^true|false$/i,W=/^(['"]).*\1$/,j=N.description?N.description.replace("function","\u0192 "):"",Q=[p.default.debug_watch_variable];return w?null:(a.variableType==="number"||a.variableType==="boolean"||a.variableType==="string"?Q.push(p.default[a.variableType]):isNaN(+j)?U.test(j)?Q.push(p.default.boolean):W.test(j)&&Q.push(p.default.string):Q.push(p.default.number),o.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment_grow,p.default.debug_watch_node_description,...Q)},j))},O=()=>o.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment,p.default.debug_watch_node_tail)},x()),x=()=>o.default.createElement("div",{className:p.default.debug_watch_node_status},a.badge),k=()=>a.tooltip,F=(N,U)=>{const W=j=>{U(j,N,y)};return g&&g?.classlist.indexOf(p.default.mod_loading)>-1?o.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_segment,b)},o.default.createElement(l.Loading,null)):o.default.createElement("div",{onClick:W,className:(0,r.default)(p.default.debug_watch_node_segment,b,(0,v.getIcon)("right"),{[`${p.default.mod_collapsed}`]:!N.expanded})})},L=N=>{if(_.DebugWatchNode.is(N)){if(N.available&&N.variablesReference)return F(N,f)}else if(_.ExpressionContainer.is(N)&&N.variablesReference)return F(N,f)};return o.default.createElement("div",{key:a.id,onClick:I,onContextMenu:D,title:k(),className:(0,r.default)(p.default.debug_watch_node,g?g.classlist:null),style:T,"data-id":a.id},o.default.createElement("div",{className:(0,r.default)(p.default.debug_watch_node_content)},L(a),o.default.createElement("div",{style:{height:t.DEBUG_WATCH_TREE_NODE_HEIGHT},className:w?p.default.debug_watch_node_prompt_wrap:p.default.debug_watch_node_overflow_wrap},R(a),M(a)),O()))};t.DebugWatchRenderedNode=h,t.DEBUG_WATCH_TREE_NODE_HEIGHT=22},46118:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG_COMMANDS=void 0;var e;(function(n){n.ADD_WATCHER={id:"debug.watch.add"},n.COLLAPSE_ALL_WATCHER={id:"debug.watch.collapseAll"},n.REMOVE_ALL_WATCHER={id:"debug.watch.removeAll"},n.REMOVE_WATCHER={id:"debug.watch.remove"},n.EDIT_WATCHER={id:"debug.watch.edit"},n.COPY_WATCHER_VALUE={id:"debug.watch.copyValue"},n.REMOVE_ALL_BREAKPOINTS={id:"debug.breakpoints.remove.all"},n.TOGGLE_BREAKPOINTS={id:"debug.breakpoints.toggle"},n.ACTIVE_BREAKPOINTS={id:"debug.breakpoints.active"},n.DEACTIVE_BREAKPOINTS={id:"debug.breakpoints.deactive"},n.START={id:"debug.start"},n.NEXT={id:"debug.next"},n.PREV={id:"debug.prev"},n.OVER={id:"debug.over"},n.STOP={id:"debug.stop"},n.CONTINUE={id:"debug.continue"},n.RESTART={id:"debug.restart"},n.PAUSE={id:"debug.pause"},n.DELETE_BREAKPOINT={id:"debug.delete.breakpoint",label:"%debug.menu.delete.breakpoint%"},n.EDIT_BREAKPOINT={id:"debug.edit.breakpoint",label:"%debug.menu.edit.breakpoint%"},n.DISABLE_BREAKPOINT={id:"debug.disable.breakpoint",label:"%debug.menu.disable.breakpoint%"},n.ENABLE_BREAKPOINT={id:"debug.enable.breakpoint",label:"%debug.menu.enable.breakpoint%"},n.ENABLE_LOGPOINT={id:"debug.enable.logpoint",label:"%debug.menu.enable.logpoint"},n.ADD_BREAKPOINT={id:"debug.add.breakpoint",label:"%debug.menu.add.breakpoint%"},n.ADD_LOGPOINT={id:"debug.add.logpoint",label:"%debug.menu.add.logpoint%"},n.ADD_CONDITIONAL_BREAKPOINT={id:"debug.add.conditional",label:"%debug.menu.add.conditional%"},n.RESTART_FRAME={id:"debug.callstack.restart.frame"},n.COPY_STACK_TRACE={id:"debug.callstack.copy"},n.SET_VARIABLE_VALUE={id:"debug.variables.setValue"},n.COPY_VARIABLE_VALUE={id:"debug.variables.copy"},n.COPY_EVALUATE_PATH={id:"debug.evaluate.copy"},n.ADD_TO_WATCH_ID={id:"debug.addToWatchExpressions"},n.VIEW_MEMORY_ID={id:"debug.variables.view.memory"},n.CLEAR_CONSOLE={id:"debug.console.clear",label:"%debug.console.clear%"},n.COPY_CONSOLE_ITEM={id:"debug.console.copy"},n.COPY_CONSOLE_ALL={id:"debug.console.copyALl"},n.COLLAPSE_ALL_CONSOLE_ITEM={id:"debug.console.collapseAll",label:"%debug.console.collapseAll%"},n.CONSOLE_ENTER_EVALUATE={id:"debug.console.keybing.enter.evaluate"},n.CONSOLE_INPUT_DOWN_ARROW={id:"debug.console.input.down.arrow"},n.CONSOLE_INPUT_UP_ARROW={id:"debug.console.input.up.arrow"},n.CONSOLE_FILTER_FOCUS={id:"debug.console.filter.input.focus"},n.RUN_TO_CURSOR={id:"debug.action.runToCursor",label:"%debug.action.runToCursor%"},n.FORCE_RUN_TO_CURSOR={id:"debug.action.forceRunToCursor",label:"%debug.action.forceRunToCursor%"},n.EXCEPTION_WIDGET_CLOSE={id:"debug.action.closeExceptionWidget"},n.SHOW_ALL_AUTOMATIC_DEBUG_CONFIGURATIONS={id:"debug.showAllAutomaticDebugConfigurations"}})(e||(t.DEBUG_COMMANDS=e={}))},4983:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_DEBUGGERS_AVAILABLE=t.CONTEXT_BREAKPOINTS_EXIST=t.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=t.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=t.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=t.CONTEXT_RESTART_FRAME_SUPPORTED=t.CONTEXT_STEP_BACK_SUPPORTED=t.CONTEXT_FOCUSED_SESSION_IS_ATTACH=t.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=t.CONTEXT_LOADED_SCRIPTS_SUPPORTED=t.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=t.CONTEXT_BREAKPOINT_ACCESS_TYPE=t.CONTEXT_BREAKPOINT_ITEM_TYPE=t.CONTEXT_WATCH_ITEM_TYPE=t.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=t.CONTEXT_CALLSTACK_ITEM_STOPPED=t.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=t.CONTEXT_CALLSTACK_ITEM_TYPE=t.CONTEXT_BREAKPOINT_INPUT_FOCUSED=t.CONTEXT_EXPRESSION_SELECTED=t.CONTEXT_VARIABLES_FOCUSED=t.CONTEXT_WATCH_EXPRESSIONS_EXIST=t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=t.CONTEXT_BREAKPOINTS_FOCUSED=t.CONTEXT_IN_BREAKPOINT_WIDGET=t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=t.CONTEXT_IN_DEBUG_CONSOLE=t.CONTEXT_IN_DEBUG_REPL=t.CONTEXT_IN_DEBUG_MODE=t.CONTEXT_DEBUG_UX=t.CONTEXT_DEBUG_UX_KEY=t.CONTEXT_DEBUG_STATE=t.CONTEXT_DEBUG_CONFIGURATION_TYPE=t.CONTEXT_DEBUG_TYPE=t.CONTEXT_DEBUG_TYPE_KEY=t.CONTEXT_IN_DEBUG_MODE_KEY=t.CONTEXT_DEBUG_STOPPED_KEY=t.DEBUG_SCHEME=t.DEBUG_FLOATING_CLICK_WIDGET=t.DEBUG_STACK_ID=t.DEBUG_WELCOME_ID=t.DEBUG_BREAKPOINTS_ID=t.DEBUG_VARIABLES_ID=t.DEBUG_THREAD_ID=t.DEBUG_WATCH_ID=t.DEBUG_MEMORY_SCHEME=t.LAUNCH_VIEW_COMPONENT_ID=t.LAUNCH_VIEW_SCHEME=t.DEBUG_CONTAINER_ID=t.DEBUG_CONSOLE_CONTAINER_ID=void 0,t.CONTEXT_ACTIVE_BREAKPOINTS=t.CONTEXT_CAN_VIEW_MEMORY=t.CONTEXT_MULTI_SESSION_DEBUG=t.CONTEXT_MULTI_SESSION_REPL=t.CONTEXT_EXCEPTION_WIDGET_VISIBLE=t.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=t.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=t.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=t.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=t.CONTEXT_SET_VARIABLE_SUPPORTED=t.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=void 0;const n=e(30144);Object.defineProperty(t,"DEBUG_CONSOLE_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONSOLE_CONTAINER_ID}}),Object.defineProperty(t,"DEBUG_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONTAINER_ID}});const r=e(40191);t.LAUNCH_VIEW_SCHEME="launch_view_scheme",t.LAUNCH_VIEW_COMPONENT_ID="launch-view",t.DEBUG_MEMORY_SCHEME="vscode-debug-memory",t.DEBUG_WATCH_ID="debug-watch",t.DEBUG_THREAD_ID="debug-thread",t.DEBUG_VARIABLES_ID="debug-variable",t.DEBUG_BREAKPOINTS_ID="debug-breakpoints",t.DEBUG_WELCOME_ID="debug-welcome",t.DEBUG_STACK_ID="debug-stack",t.DEBUG_FLOATING_CLICK_WIDGET="debug.overlayWidget.floatingClickWidget",t.DEBUG_SCHEME="debug",t.CONTEXT_DEBUG_STOPPED_KEY="debugStopped",t.CONTEXT_IN_DEBUG_MODE_KEY="inDebugMode",t.CONTEXT_DEBUG_TYPE_KEY="debugType",t.CONTEXT_DEBUG_TYPE=new r.RawContextKey("debugType",void 0),t.CONTEXT_DEBUG_CONFIGURATION_TYPE=new r.RawContextKey("debugConfigurationType",void 0),t.CONTEXT_DEBUG_STATE=new r.RawContextKey("debugState","Inactive"),t.CONTEXT_DEBUG_UX_KEY="debugUx",t.CONTEXT_DEBUG_UX=new r.RawContextKey(t.CONTEXT_DEBUG_UX_KEY,"default"),t.CONTEXT_IN_DEBUG_MODE=new r.RawContextKey("inDebugMode",!1),t.CONTEXT_IN_DEBUG_REPL=new r.RawContextKey("inDebugRepl",!1),t.CONTEXT_IN_DEBUG_CONSOLE=new r.RawContextKey("inDebugConsole",!1),t.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new r.RawContextKey("breakpointWidgetVisible",!1),t.CONTEXT_IN_BREAKPOINT_WIDGET=new r.RawContextKey("inBreakpointWidget",!1),t.CONTEXT_BREAKPOINTS_FOCUSED=new r.RawContextKey("breakpointsFocused",!0),t.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new r.RawContextKey("watchExpressionsFocused",!0),t.CONTEXT_WATCH_EXPRESSIONS_EXIST=new r.RawContextKey("watchExpressionsExist",!1),t.CONTEXT_VARIABLES_FOCUSED=new r.RawContextKey("variablesFocused",!0),t.CONTEXT_EXPRESSION_SELECTED=new r.RawContextKey("expressionSelected",!1),t.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new r.RawContextKey("breakpointInputFocused",!1),t.CONTEXT_CALLSTACK_ITEM_TYPE=new r.RawContextKey("callStackItemType",void 0),t.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new r.RawContextKey("callStackSessionIsAttach",!1),t.CONTEXT_CALLSTACK_ITEM_STOPPED=new r.RawContextKey("callStackItemStopped",!1),t.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new r.RawContextKey("callStackSessionHasOneThread",!1),t.CONTEXT_WATCH_ITEM_TYPE=new r.RawContextKey("watchItemType",void 0),t.CONTEXT_BREAKPOINT_ITEM_TYPE=new r.RawContextKey("breakpointItemType",void 0),t.CONTEXT_BREAKPOINT_ACCESS_TYPE=new r.RawContextKey("breakpointAccessType",void 0),t.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new r.RawContextKey("breakpointSupportsCondition",!1),t.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new r.RawContextKey("loadedScriptsSupported",!1),t.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new r.RawContextKey("loadedScriptsItemType",void 0),t.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new r.RawContextKey("focusedSessionIsAttach",!1),t.CONTEXT_STEP_BACK_SUPPORTED=new r.RawContextKey("stepBackSupported",!1),t.CONTEXT_RESTART_FRAME_SUPPORTED=new r.RawContextKey("restartFrameSupported",!1),t.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new r.RawContextKey("stackFrameSupportsRestart",!1),t.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new r.RawContextKey("jumpToCursorSupported",!1),t.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new r.RawContextKey("stepIntoTargetsSupported",!1),t.CONTEXT_BREAKPOINTS_EXIST=new r.RawContextKey("breakpointsExist",!1),t.CONTEXT_DEBUGGERS_AVAILABLE=new r.RawContextKey("debuggersAvailable",!1),t.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new r.RawContextKey("debugProtocolVariableMenuContext",void 0),t.CONTEXT_SET_VARIABLE_SUPPORTED=new r.RawContextKey("debugSetVariableSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new r.RawContextKey("breakWhenValueChangesSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new r.RawContextKey("breakWhenValueIsAccessedSupported",!1),t.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new r.RawContextKey("breakWhenValueIsReadSupported",!1),t.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new r.RawContextKey("variableEvaluateNamePresent",!1),t.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new r.RawContextKey("exceptionWidgetVisible",!1),t.CONTEXT_MULTI_SESSION_REPL=new r.RawContextKey("multiSessionRepl",!1),t.CONTEXT_MULTI_SESSION_DEBUG=new r.RawContextKey("multiSessionDebug",!1),t.CONTEXT_CAN_VIEW_MEMORY=new r.RawContextKey("canViewMemory",void 0),t.CONTEXT_ACTIVE_BREAKPOINTS=new r.RawContextKey("activateBreakpoints",!0)},95581:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},53670:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MASSIVE_PROPERTY_FLAG=t.DEFAULT_CONFIGURATION_INDEX_SEPARATOR=t.DEFAULT_CONFIGURATION_NAME_SEPARATOR=t.DEFAULT_NO_CONFIGURATION_KEY=t.DEFAULT_DYNAMIC_CONFIGURATION_KEY=t.DEFAULT_EDIT_CONFIGURATION_KEY=t.DEFAULT_ADD_CONFIGURATION_KEY=t.DebugConfiguration=void 0;var e;(function(n){function r(o){return!!o&&typeof o=="object"&&"type"in o&&"name"in o&&"request"in o}n.is=r})(e||(t.DebugConfiguration=e={})),t.DEFAULT_ADD_CONFIGURATION_KEY="__ADD_CONF__",t.DEFAULT_EDIT_CONFIGURATION_KEY="__EDIT_CONF__",t.DEFAULT_DYNAMIC_CONFIGURATION_KEY="__DYNAMIC_CONF__",t.DEFAULT_NO_CONFIGURATION_KEY="__NO_CONF__",t.DEFAULT_CONFIGURATION_NAME_SEPARATOR="__CONF__",t.DEFAULT_CONFIGURATION_INDEX_SEPARATOR="__INDEX__",t.MASSIVE_PROPERTY_FLAG="massive_property_flag"},70049:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugConsoleModelService=void 0,t.IDebugConsoleModelService=Symbol("IDebugConsoleModelService")},24395:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugEditor=void 0,t.DebugEditor=Symbol("DebugEditor")},91797:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFrameDeemphasized=e;function e(n){var r,o;const l=(r=n.presentationHint)!==null&&r!==void 0?r:(o=n.source)===null||o===void 0?void 0:o.presentationHint;return l==="deemphasize"||l==="subtle"}},2242:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},32385:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugModelManager=t.DebugModelSupportedEventType=t.MemoryRegion=t.IDebugModel=t.DebugModelFactory=t.DebugAdapterContribution=t.DebugAdapterFactory=t.DebugAdapterSessionFactory=t.DebugAdapterSession=void 0;const n=e(43718);t.DebugAdapterSession=Symbol("DebugAdapterSession"),t.DebugAdapterSessionFactory=Symbol("DebugAdapterSessionFactory"),t.DebugAdapterFactory=Symbol("DebugAdapterFactory"),t.DebugAdapterContribution=Symbol("DebugAdapterContribution"),t.DebugModelFactory=Symbol("DebugModelFactory"),t.IDebugModel=Symbol("IDebugModel");class r extends n.Disposable{constructor(v,_){super(),this.memoryReference=v,this.session=_,this.invalidateEmitter=this.registerDispose(new n.Emitter),this.onDidInvalidate=this.invalidateEmitter.event,this.writable=!!this.session.capabilities.supportsWriteMemoryRequest,this.registerDispose(_.onDidInvalidateMemory(m=>{m.body.memoryReference===v&&this.invalidate(m.body.offset,m.body.count-m.body.offset)}))}async read(v,_){var m;const p=_-v,s=v,h=await this.session.readMemory(this.memoryReference,s,p);if(h===void 0||!(!((m=h.body)===null||m===void 0)&&m.data))return[{type:1,offset:s,length:p}];let a;try{a=(0,n.decodeBase64)(h.body.data)}catch(u){return[{type:2,offset:s,length:p,error:u.message}]}const g=h.body.unreadableBytes||0,d=p-g;if(a.byteLength<d){const u=n.BinaryBuffer.alloc(d-a.byteLength);u.buffer.fill(0),a=n.BinaryBuffer.concat([a,u],d)}else a.byteLength>d&&(a=a.slice(0,d));return g?[{type:0,offset:s,length:d,data:a},{type:1,offset:s+d,length:g}]:[{type:0,offset:s,length:p,data:a}]}async write(v,_){var m,p;const s=await this.session.writeMemory(this.memoryReference,v,(0,n.encodeBase64)(_),!0),h=(p=(m=s?.body)===null||m===void 0?void 0:m.bytesWritten)!==null&&p!==void 0?p:_.byteLength;return this.invalidate(v,v+h),h}dispose(){super.dispose()}invalidate(v,_){this.invalidateEmitter.fire({fromOffset:v,toOffset:_})}}t.MemoryRegion=r;var o;(function(l){l.down="Down",l.move="Move",l.leave="Leave",l.contextMenu="contextMenu"})(o||(t.DebugModelSupportedEventType=o={})),t.IDebugModelManager=Symbol("DebugModelManager")},79845:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugProgress=void 0,t.IDebugProgress=Symbol("DebugProgress")},60709:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSON_SCHEMA_TYPE=t.launchDefaultSchemaUri=t.launchExtensionSchemaUri=t.launchSchemaUri=void 0,t.launchSchemaUri="vscode://schemas/launch",t.launchExtensionSchemaUri="vscode://schemas/launch/extension",t.launchDefaultSchemaUri="vscode://schemas/launch/user";var e;(function(n){n.ARRAY="array",n.BOOLEAN="boolean",n.NULL="null",n.NUMBER="number",n.OBJECT="object",n.STRING="string"})(e||(t.JSON_SCHEMA_TYPE=e={}))},70159:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILaunchService=t.IDebugService=t.IDebugServer=t.DebugAdapterPath=t.DebugConfigurationProviderTriggerKind=void 0;var e;(function(n){n[n.Initial=1]="Initial",n[n.Dynamic=2]="Dynamic"})(e||(t.DebugConfigurationProviderTriggerKind=e={})),t.DebugAdapterPath="DebugAdaptor",t.IDebugServer=Symbol("DebugServer"),t.IDebugService=Symbol("DebugService"),t.ILaunchService=Symbol("ILaunchService")},50883:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugSessionDTO=void 0;var e;(function(n){function r(o){return"id"in o}n.is=r})(e||(t.IDebugSessionDTO=e={}))},26296:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDebugSessionManager=t.IDebugSession=t.DebugState=void 0,t.getSequenceId=r;var e;(function(o){o[o.Inactive=0]="Inactive",o[o.Initializing=1]="Initializing",o[o.Running=2]="Running",o[o.Stopped=3]="Stopped"})(e||(t.DebugState=e={})),t.IDebugSession=Symbol("DebugSession"),t.IDebugSessionManager=Symbol("DebugSessionManager");let n=1;function r(){return n++}},64582:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(53670),t),n.__exportStar(e(70159),t),n.__exportStar(e(2242),t),n.__exportStar(e(95581),t),n.__exportStar(e(32385),t),n.__exportStar(e(26296),t),n.__exportStar(e(70049),t),n.__exportStar(e(50883),t),n.__exportStar(e(24395),t),n.__exportStar(e(79845),t),n.__exportStar(e(60709),t),n.__exportStar(e(7428),t),n.__exportStar(e(37723),t),n.__exportStar(e(4983),t),n.__exportStar(e(71120),t),n.__exportStar(e(46118),t)},7428:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},71120:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWindowsDriveLetter=r,t.hasDriveLetter=o,t.getDriveLetter=l,t.prepareCommand=v;const n=e(43718);function r(_){return _>=65&&_<=90||_>=97&&_<=122}function o(_,m=n.isWindows){return m?r(_.charCodeAt(0))&&_.charCodeAt(1)===58:!1}function l(_){return o(_)?_[0]:void 0}function v(_,m,p,s,h){_=_.trim().toLowerCase();let a;_.indexOf("powershell")>=0||_.indexOf("pwsh")>=0?a=1:_.indexOf("cmd.exe")>=0?a=0:_.indexOf("bash")>=0?a=2:n.isWindows?a=0:a=2;let g,d=" ";switch(a){case 1:if(g=u=>(u=u.replace(/'/g,"''"),u.length>0&&u.charAt(u.length-1)==="\\"?`'${u}\\'`:`'${u}'`),s){const u=l(s);u&&(d+=`${u}:; `),d+=`cd ${g(s)}; `}if(h)for(const u in h){const E=h[u];E===null?d+=`Remove-Item env:${u}; `:d+=`\${env:${u}}='${E}'; `}if(m.length>0){const u=m.shift(),E=p?u:g(u);d+=E[0]==="'"?`& ${E} `:`${E} `;for(const f of m)d+=f==="<"||f===">"||p?f:g(f),d+=" "}break;case 0:if(g=u=>(u=u.replace(/"/g,'""'),u=u.replace(/([><!^&|])/g,"^$1"),' "'.split("").some(E=>u.includes(E))||u.length===0?`"${u}"`:u),s){const u=l(s);u&&(d+=`${u}: && `),d+=`cd ${g(s)} && `}if(h){d+='cmd /C "';for(const u in h){let E=h[u];E===null?d+=`set "${u}=" && `:(E=E.replace(/[&^|<>]/g,f=>`^${f}`),d+=`set "${u}=${E}" && `)}}for(const u of m)d+=u==="<"||u===">"||p?u:g(u),d+=" ";h&&(d+='"');break;case 2:{g=E=>(E=E.replace(/(["'\\$!><#()[\]*&^| ;{}`])/g,"\\$1"),E.length===0?'""':E);const u=E=>/[^\w@%/+=,.:^-]/.test(E)?`'${E.replace(/'/g,"'\\''")}'`:E;if(s&&(d+=`cd ${g(s)} ; `),h){d+="/usr/bin/env";for(const E in h){const f=h[E];f===null?d+=` -u ${u(E)}`:d+=` ${u(`${E}=${f}`)}`}d+=" "}for(const E of m)d+=E==="<"||E===">"||p?E:g(E),d+=" ";break}}return d}},37723:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugConfigurationsReadyEvent=t.DEBUG_REPORT_NAME=void 0;const n=e(43718);var r;(function(l){l.DEBUG_SESSION_START_TIME="debugSessionStartTime",l.DEBUG_PRE_LAUNCH_TASK_TIME="debugPreLaunchTaskTime",l.DEBUG_TOOLBAR_OPERATION_TIME="debugToolBarOperationTime",l.DEBUG_TOOLBAR_OPERATION="debugToolBarOperation",l.DEBUG_PANEL_OPERATION_FOLDEXPR="debugPanelOperationFoldexpr",l.DEBUG_WATCH="debugWatch",l.DEBUG_VARIABLES="debugVariables",l.DEBUG_BREAKPOINT="debugBreakpoint",l.DEBUG_ADAPTER_PROTOCOL_TIME="debugAdapterProtocolTime",l.DEBUG_STOPPED="debugStopped",l.DEBUG_UI_FRONTEND_TIME="debugFrontEndTime"})(r||(t.DEBUG_REPORT_NAME=r={}));class o extends n.BasicEvent{}t.DebugConfigurationsReadyEvent=o},66482:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(64582),t)},83670:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDecorationsService=void 0;const n=e(85608),r=e(76003),o=e(43718),{isFalsyOrWhitespace:l}=o.strings,{asArray:v}=o.arrays;class _{constructor(){this._data=o.TernarySearchTree.forPaths()}affectsResource(d){return this._data.get(d.toString())||this._data.findSuperstr(d.toString())!==void 0}static debouncer(d,u){if(d||(d=new _),Array.isArray(u))for(const E of u)d._data.set(E.toString(),!0);else d._data.set(u.toString(),!0);return d}}class m{constructor(d,u){this.source=d,this.thenable=u}}class p{constructor(d,u,E){this._provider=d,this._uriEmitter=u,this._flushEmitter=E,this.data=o.TernarySearchTree.forPaths(),this._dispoable=this._provider.onDidChange(f=>{if(!f)this.data.clear(),this._flushEmitter.fire({affectsResource(){return!0}});else for(const c of f)this._fetchData(c)})}dispose(){this._dispoable.dispose(),this.data.clear()}knowsAbout(d){return!!this.data.get(d.toString())||!!this.data.findSuperstr(d.toString())}getOrRetrieve(d,u,E){const f=d.toString();let c=this.data.get(f);if(c===void 0&&(c=this._fetchData(d)),c&&!(c instanceof m)&&E(c,!1),u){const y=this.data.findSuperstr(f);if(y)for(let b=y.next();!b.done;b=y.next())b.value&&!(b.value instanceof m)&&E(b.value,!0)}}_fetchData(d){const u=this.data.get(d.toString());u instanceof m&&(u.source.cancel(),this.data.delete(d.toString()));const E=new o.CancellationTokenSource,f=this._provider.provideDecorations(d,E.token);if((0,o.isThenable)(f)){const c=new m(E,Promise.resolve(f).then(y=>{this.data.get(d.toString())===c&&this._keepItem(d,y)}).catch(y=>{!(0,o.isPromiseCanceledError)(y)&&this.data.get(d.toString())===c&&this.data.delete(d.toString())}));return this.data.set(d.toString(),c),null}else return this._keepItem(d,f)}_keepItem(d,u){const E=u||null,f=this.data.set(d.toString(),E);return(E||f)&&this._uriEmitter.fire(d),E}}function s(g){return v(g).map(({color:u,letter:E})=>`${u}/${E}`).join(",")}function h(g){const d=v(g);if(d.length)return{key:s(g),color:d[0].color,badge:d.filter(u=>!l(u.letter)).map(u=>u.letter).join(","),tooltip:d.filter(u=>!l(u.tooltip)).map(u=>u.tooltip).join(" \u2022 ")}}let a=class extends o.Disposable{constructor(){super(...arguments),this.logger=(0,o.getDebugLogger)(),this._data=new o.LinkedList,this._onDidChangeDecorationsDelayed=new o.Emitter,this._onDidChangeDecorations=new o.Emitter,this.onDidChangeDecorations=o.Event.any(this._onDidChangeDecorations.event,o.Event.debounce(this._onDidChangeDecorationsDelayed.event,_.debouncer,void 0,void 0,500))}dispose(){(0,o.dispose)(this._onDidChangeDecorations),(0,o.dispose)(this._onDidChangeDecorationsDelayed)}registerDecorationsProvider(d){this.logger.log("DecorationService#registerDecorationsProvider",d);const u=new p(d,this._onDidChangeDecorationsDelayed,this._onDidChangeDecorations),E=this._data.push(u);return this._onDidChangeDecorations.fire({affectsResource(){return!0}}),(0,o.toDisposable)(()=>{E(),this._onDidChangeDecorations.fire({affectsResource:f=>u.knowsAbout(f)}),u.dispose()})}getDecoration(d,u){const E=[];let f=!1;for(let c=this._data.iterator(),y=c.next();!y.done;y=c.next())y.value.getOrRetrieve(d,u,(b,A)=>{(!A||b.bubble)&&(E.push(b),f=A||f)});if(E.length!==0)return this.asDecoration(E,f)}asDecoration(d,u){d.sort((f,c)=>(c.weight||0)-(f.weight||0));const E=h(d);return E&&u&&(E.badge="\u2022",E.tooltip=(0,o.localize)("bubbleTitle","Contains emphasized items")),E}};t.FileDecorationsService=a,t.FileDecorationsService=a=n.__decorate([(0,r.Injectable)()],a)},4958:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93364),v=e(83670);let _=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:l.IDecorationsService,useClass:v.FileDecorationsService}]}};t.DecorationModule=_,t.DecorationModule=_=n.__decorate([(0,r.Injectable)()],_)},93364:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationsService=void 0;const n=e(43718);class r extends n.Disposable{}t.IDecorationsService=r},87323:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(93364),t)},41893:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(87323),t)},67988:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignCoreContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(1149),v=e(43718),_=e(14951),m=e(2156),p=e(11090),s=e(37517);let h=class{initialize(){this.fileSystem.registerProvider(v.Schemes.design,this.designThemeFileSystemProvider),this.layoutViewSize.setEditorTabsHeight(36,l.ConfigPriority.ModuleDefined),this.layoutViewSize.setStatusBarHeight(36,l.ConfigPriority.ModuleDefined),this.layoutViewSize.setAccordionHeaderSizeHeight(36,l.ConfigPriority.ModuleDefined)}registerRenderer(g){g.registerSlotRenderer(o.SlotLocation.view,p.DesignLeftTabRenderer,{supportedActions:{accordion:!0}}),g.registerSlotRenderer(o.SlotLocation.panel,p.DesignBottomTabRenderer,{isLatter:!0,supportedActions:{expand:!0,toggle:!0}}),g.registerSlotRenderer(o.SlotLocation.extendView,p.DesignRightTabRenderer,{isLatter:!0,supportedActions:{accordion:!0}})}};t.DesignCoreContribution=h,n.__decorate([(0,r.Autowired)(_.IFileServiceClient),n.__metadata("design:type",m.FileServiceClient)],h.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.DesignThemeFileSystemProvider)],h.prototype,"designThemeFileSystemProvider",void 0),n.__decorate([(0,r.Autowired)(l.LayoutViewSizeConfig),n.__metadata("design:type",l.LayoutViewSizeConfig)],h.prototype,"layoutViewSize",void 0),t.DesignCoreContribution=h=n.__decorate([(0,r.Injectable)(),(0,o.Domain)(o.ClientAppContribution,o.SlotRendererContribution)],h)},17242:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(71707),v=e(80832),_=e(97222),m=e(43718),p=e(57517),s=e(52416),h=e(51706),a=e(9132),g=e(67988),d=e(3013),u=e(31385),E=e(72141),f=e(45365),c=n.__importDefault(e(49107)),y=n.__importDefault(e(13925)),b=n.__importDefault(e(63080)),A=e(98741);let S=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[d.DesignMenuBarContribution,g.DesignCoreContribution],this.preferences=I=>{e.e(454).then(e.bind(e,77454)),I.get(v.IDesignStyleService).setStyles(c.default),(0,A.overrideColorToken)(),(0,A.overrideMonacoColorToken)();const T=I.get(m.AppLifeCycleServiceToken);m.Event.once(m.Event.filter(T.onDidLifeCyclePhaseChange,R=>R===3))(()=>{const R=I.get(s.IThemeService);[y.default,b.default].forEach(M=>{R.registerThemes([{id:M.id,label:M.name,path:"",extensionId:M.id,uiTheme:M.base}],o.URI.parse(`${M.id}.json`).withQuery(M.id).withScheme(m.Schemes.design))})}),I.overrideProviders({token:s.IThemeStore,useClass:class extends h.ThemeStore{async getThemeData(R,M){const O=await super.getThemeData(R,M);return document.body.classList.remove(b.default.designThemeType),document.body.classList.remove(y.default.designThemeType),y.default.id===R?.id?document.body.classList.add(y.default.designThemeType):b.default.id===R?.id&&document.body.classList.add(b.default.designThemeType),O}},override:!0,isDefault:!0},{token:s.IThemeService,useClass:class extends a.WorkbenchThemeService{async ensureValidTheme(){return super.ensureValidTheme(y.default.id)}},override:!0,isDefault:!0},{token:p.IEditorTabService,useClass:u.DesignEditorTabService,override:!0,isDefault:!0},{token:l.ISplitPanelService,useClass:f.DesignSplitPanelService,override:!0,isDefault:!0},{token:_.IBrowserCtxMenu,useClass:E.DesignBrowserCtxMenuService})}}};t.DesignModule=S,t.DesignModule=S=n.__decorate([(0,r.Injectable)()],S)},11090:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignRightTabRenderer=t.DesignBottomTabRenderer=t.DesignLeftTabRenderer=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(19951),v=({className:p,components:s,tabbarView:h})=>o.default.createElement(l.LeftTabRenderer,{className:(0,r.default)(p,"design_left_slot"),components:s,tabbarView:h});t.DesignLeftTabRenderer=v;const _=({className:p,components:s})=>o.default.createElement(l.BottomTabRenderer,{className:(0,r.default)(p,"design_bottom_slot"),components:s});t.DesignBottomTabRenderer=_;const m=({className:p,components:s,tabbarView:h,tabpanelView:a})=>o.default.createElement(l.RightTabRenderer,{className:(0,r.default)("design_right_slot",p),components:s,tabbarView:h,tabpanelView:a});t.DesignRightTabRenderer=m},3013:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignMenuBarContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),v=e(64267),_=e(38879),m=e(12458);let p=class extends o.Disposable{constructor(){super(),this.menubarStore.unregisterMenusBarByCompact(l.MenuId.DesignMenuBarTopExtra);let h;this.addDispose(this.menubarStore.onDidMenuBarChange(a=>{h&&h.dispose(),h=this.menuRegistry.registerMenuItems(l.MenuId.DesignMenuBarTopExtra,a.map(g=>{var d;return{label:g.label,submenu:g.id,iconClass:g.iconClass,group:g.group||"1_navigation",order:(d=g.order)!==null&&d!==void 0?d:100}}))}))}registerComponent(h){h.register(_.DESIGN_MENUBAR_CONTAINER_VIEW_ID,{component:m.DesignMenuBarView,id:_.DESIGN_MENUBAR_CONTAINER_VIEW_ID})}};t.DesignMenuBarContribution=p,n.__decorate([(0,r.Autowired)(v.MenubarStore),n.__metadata("design:type",v.MenubarStore)],p.prototype,"menubarStore",void 0),n.__decorate([(0,r.Autowired)(l.IMenuRegistry),n.__metadata("design:type",l.IMenuRegistry)],p.prototype,"menuRegistry",void 0),t.DesignMenuBarContribution=p=n.__decorate([(0,o.Domain)(o.ComponentContribution),n.__metadata("design:paramtypes",[])],p)},12458:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignMenuBarView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(41869),v=e(81878),_=e(89195),m=e(1149),p=e(63373),s=e(93899),h=e(43718),a=e(63067),g=e(55039),d=e(38879),u=n.__importDefault(e(52151)),E=n.__importDefault(e(90946)),f=()=>{const y=(0,l.useInjectable)(s.AbstractContextMenuService),b=(0,l.useInjectable)(m.DesignLayoutConfig),A=(0,l.useInjectable)(s.ICtxMenuRenderer),S=o.useRef(null),[w,I]=o.useState(void 0);o.useEffect(()=>{D()},[]);const D=o.useCallback(O=>{requestAnimationFrame(()=>{if(S.current){const x=S.current.getBoundingClientRect(),{x:k,y:F,width:L,height:N}=x,U={x:k,y:F+N};I(U),O&&O(U)}})},[S.current]),T=o.useMemo(()=>y.createMenu({id:s.MenuId.DesignMenuBarTopExtra}),[y]),R=o.useCallback(()=>{if(!w)return;const O=T.getMergedMenuNodes();T.dispose(),D(x=>{A.show({anchor:x,menuNodes:O})})},[w,T]),M=o.useMemo(()=>b.menubarLogo||u.default,[b.menubarLogo]);return o.createElement(o.Fragment,null,o.createElement(_.EnhanceIcon,{wrapperClassName:E.default.ai_enhance_menu,ref:S,onClick:R},o.createElement("div",{className:E.default.logo_container},o.createElement("img",{className:E.default.extra_top_icon,src:M,alt:""}),o.createElement(v.Icon,{className:(0,r.default)((0,l.getIcon)("down"),E.default.caret_icon)}))))},c=()=>{const y=(0,l.useInjectable)(h.CommandService),b=(0,l.useInjectable)(a.IMainLayoutService),A=(0,l.useInjectable)(l.AINativeConfigService),[S,w]=o.useState(!1);o.useEffect(()=>{requestAnimationFrame(()=>{w(D())});const R=b.getTabbarService(l.SlotLocation.view).onCurrentChange(({previousId:M,currentId:O})=>{M&&!O?w(!1):!M&&O&&w(!0)});return()=>{R.dispose()}},[]);const I=o.useCallback(()=>{y.executeCommand("main-layout.left-panel.toggle"),requestAnimationFrame(()=>{w(D())})},[]),D=o.useCallback(()=>!!b.getTabbarService(l.SlotLocation.view).currentContainerId.get(),[b]);return o.createElement("div",{id:p.VIEW_CONTAINERS.MENUBAR,className:E.default.menu_bar_view,style:{height:A.layoutViewSize.menubarHeight}},o.createElement("div",{className:E.default.container},o.createElement("div",{className:E.default.left},o.createElement(_.EnhanceIcon,{wrapperClassName:E.default.enhance_menu,icon:S?"left-nav-open":"left-nav-close",onClick:I}),o.createElement("span",{className:E.default.dividing}),o.createElement("div",{className:E.default.top_menus_bar},o.createElement(f,null)),o.createElement(l.SlotRenderer,{id:"design-menubar-left",slot:d.DESIGN_MENU_BAR_LEFT,flex:1})),o.createElement("div",{className:E.default.right},o.createElement(g.ToolBar,null),o.createElement(l.SlotRenderer,{id:"design-menubar-right",slot:d.DESIGN_MENU_BAR_RIGHT,flex:1}))))};t.DesignMenuBarView=c},31385:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignEditorTabService=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(76003),v=e(81878),_=e(1149),m=e(43718),p=e(30612),s=n.__importDefault(e(49107)),h=g=>{const{children:d}=g,[u,E]=o.default.useState(!1),f=(0,o.useMemo)(()=>"editor-tab-close-"+(0,m.uuid)(6),[]),c=(0,o.useCallback)(()=>{E(!1)},[]),y=(0,o.useMemo)(()=>(0,m.formatLocalize)("editor.closeTab.title",m.isMacintosh?"\u2318W":"Ctrl+W"),[]);return o.default.createElement(v.Popover,{delay:1e3,position:v.PopoverPosition.bottom,id:f,title:y,onClickAction:c,display:u},o.default.createElement("span",{title:""},d))};let a=class extends p.EditorTabService{renderEditorTab(d,u){return o.default.createElement("div",{className:(0,r.default)({[s.default["design-editor_tab_block_container"]]:!0,[s.default.active]:u}),style:{height:this.layoutViewSize.editorTabsHeight}},d)}renderTabCloseComponent(d){return o.default.createElement(h,null,d)}};t.DesignEditorTabService=a,n.__decorate([(0,l.Autowired)(_.LayoutViewSizeConfig),n.__metadata("design:type",_.LayoutViewSizeConfig)],a.prototype,"layoutViewSize",void 0),t.DesignEditorTabService=a=n.__decorate([(0,l.Injectable)()],a)},72141:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignBrowserCtxMenuService=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(76003),v=e(97267),_=e(41869),m=e(31388),p=e(52416),s=n.__importDefault(e(49107)),h=g=>{const d=(0,_.useInjectable)(p.IIconService),{data:u,disabled:E,hasSubmenu:f}=g,c=(0,o.useMemo)(()=>u.checked?o.default.createElement(v.Icon,{icon:"check"}):u.icon?o.default.createElement(v.Icon,{iconClass:u.icon}):null,[u]);return o.default.createElement("div",{className:(0,r.default)(s.default.menuAction__sub_menu_action_container,{[s.default.disabled]:E,[s.default.checked]:u.checked},u.className)},o.default.createElement("div",{className:s.default.icon},c),o.default.createElement("div",{className:s.default.label},u.label?(0,_.transformLabelWithCodicon)(_.strings.mnemonicButtonLabel(u.label,!0),{margin:"0 3px"},d?.fromString.bind(d)):""),o.default.createElement("div",{className:s.default.tip},u.keybinding?o.default.createElement("div",{className:s.default.shortcut},u.keybinding):null,f?o.default.createElement("div",{className:s.default.submenuIcon},o.default.createElement(v.Icon,{icon:"right-arrow"})):null,!u.keybinding&&!f&&u.extraDesc&&o.default.createElement("div",{className:s.default.extraDesc},u.extraDesc)))};let a=class extends m.BrowserCtxMenuService{renderSubMenuTitle(d,u){return o.default.createElement(h,{data:d,...u})}renderMenuItem(d,u){return o.default.createElement(h,{data:d,...u})}};t.DesignBrowserCtxMenuService=a,t.DesignBrowserCtxMenuService=a=n.__decorate([(0,l.Injectable)()],a)},45365:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignSplitPanelService=void 0;const n=e(71707);class r extends n.SplitPanelService{renderSplitPanel(l,v,_){return super.renderSplitPanel(l,v,_)}interceptProps(l){return l}}t.DesignSplitPanelService=r},13925:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#D4D4D4"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#6A9955"}},{scope:"constant.language",settings:{foreground:"#569cd6"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#b5cea8"}},{scope:"constant.regexp",settings:{foreground:"#646695"}},{scope:"entity.name.tag",settings:{foreground:"#569cd6"}},{scope:"entity.name.tag.css",settings:{foreground:"#d7ba7d"}},{scope:"entity.other.attribute-name",settings:{foreground:"#9cdcfe"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#d7ba7d"}},{scope:"invalid",settings:{foreground:"#f44747"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#b5cea8"}},{scope:"markup.deleted",settings:{foreground:"#ce9178"}},{scope:"markup.changed",settings:{foreground:"#569cd6"}},{scope:"punctuation.definition.quote.begin.markdown",settings:{foreground:"#6A9955"}},{scope:"punctuation.definition.list.begin.markdown",settings:{foreground:"#6796e6"}},{scope:"markup.inline.raw",settings:{foreground:"#ce9178"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#808080"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#569cd6"}},{scope:"meta.preprocessor.string",settings:{foreground:"#ce9178"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#b5cea8"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#9cdcfe"}},{scope:"meta.diff.header",settings:{foreground:"#569cd6"}},{scope:"storage",settings:{foreground:"#569cd6"}},{scope:"storage.type",settings:{foreground:"#569cd6"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#569cd6"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#ce9178"}},{scope:"string.tag",settings:{foreground:"#ce9178"}},{scope:"string.value",settings:{foreground:"#ce9178"}},{scope:"string.regexp",settings:{foreground:"#d16969"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#569cd6"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#d4d4d4"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#9cdcfe"}},{scope:"keyword",settings:{foreground:"#569cd6"}},{scope:"keyword.control",settings:{foreground:"#569cd6"}},{scope:"keyword.operator",settings:{foreground:"#d4d4d4"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#569cd6"}},{scope:"keyword.other.unit",settings:{foreground:"#b5cea8"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#569cd6"}},{scope:"support.function.git-rebase",settings:{foreground:"#9cdcfe"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#b5cea8"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#d4d4d4"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#569cd6"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#DCDCAA"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#4EC9B0"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#4EC9B0"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#C586C0"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.nam1e.variable","constant.other.placeholder"],settings:{foreground:"#9CDCFE"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#4FC1FF"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#9CDCFE"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#CE9178"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#CE9178"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#d16969"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#DCDCAA"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#d7ba7d"}},{scope:"constant.character",settings:{foreground:"#569cd6"}},{scope:"constant.character.escape",settings:{foreground:"#d7ba7d"}},{scope:"entity.name.label",settings:{foreground:"#C8C8C8"}}],colors:{"activityBar.activeBorder":"#ffffff1f","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#fff","activityBar.inactiveForeground":"#ffffff73","activityBarBadge.background":"#167CDB","activityBarBadge.foreground":"#FFFFFF","badge.background":"#FFFFFF40","badge.foreground":"#D7DBDE","breadcrumb.background":"#222830","breadcrumb.foreground":"#ffffff73","checkbox.background":"#ffffff14","checkbox.border":"#ffffff1f",descriptionForeground:"#868C91","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#43484D","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#00000000","editorGroupHeader.tabsBackground":"#222830","editorSuggestWidget.selectedBackground":"#1A66AC",errorForeground:"#D21F28",focusBorder:"#ffffff1f",foreground:"#D7DBDE","editorCommentsWidget.unresolvedBorder":"#ffffff","gitDecoration.addedResourceForeground":"#8FD460","gitDecoration.conflictingResourceForeground":"#7F9EF3","gitDecoration.deletedResourceForeground":"#F3956A","gitDecoration.ignoredResourceForeground":"#BBC0C4","gitDecoration.modifiedResourceForeground":"#F3CC62","gitDecoration.submoduleResourceForeground":"#67ABEB","gitDecoration.untrackedResourceForeground":"#58D1C9","icon.foreground":"#D7DBDE","input.background":"#ffffff14","input.foreground":"#d7dbde","input.placeholderForeground":"#ffffff59","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#332510","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#d7dbde","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#D7DBDE","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#5F656B40","kt.button.disableBorder":"#5F656B80","kt.button.disableForeground":"#5F656B","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.defaultButton.background":"#ffffff14","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#ffffff14","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#ffffff14","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#ffffff40","kt.defaultButton.foreground":"#D7DBDE","kt.defaultButton.hoverBackground":"#ffffff29","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#ffffff29","kt.defaultButton.selectionForeground":"#fff","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#ffffff73","kt.icon.hoverBackground":"#ffffff14","kt.icon.hoverForeground":"#D7DBDE","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#00000000","kt.input.disableBackground":"#5F656B40","kt.input.disableForeground":"#ffffff40","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#222830","kt.modal.foreground":"#D7DBDE","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#868C91","kt.panelTab.activeBackground":"#151b21","kt.panelTab.activeForeground":"#FFFFFF","kt.panelTab.border":"#ffffff1f","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#D7DBDE","kt.panelTitle.background":"#222830","kt.popover.background":"#2b333d","kt.popover.border":"#363940","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dffa6","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#3c8dffa6","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#00000000","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#00000000","kt.secondaryButton.border":"#5F656B","kt.secondaryButton.clickBorder":"#167CDB","kt.secondaryButton.clickForeground":"#167CDB","kt.secondaryButton.foreground":"#D7DBDE","kt.secondaryButton.hoverBorder":"#3895EB","kt.secondaryButton.hoverForeground":"#3895EB","kt.secondaryButton.background":"#00000000","kt.select.background":"#ffffff14","kt.select.border":"#00000000","kt.select.disableBackground":"#5F656B40","kt.select.disableForeground":"#5F656B","kt.select.foreground":"#D7DBDE","kt.select.placeholderForeground":"#5F656B","kt.selectDropdown.background":"#222830","kt.selectDropdown.foreground":"#D7DBDE","kt.selectDropdown.hoverBackground":"#ffffff14","kt.selectDropdown.selectionBackground":"#ffffff14","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#FFFFFF","kt.tab.borderDown":"#5F656B40","kt.tab.inactiveForeground":"#D7DBDE","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#5F656B40","kt.tree.hoverForeground":"#D7DBDE","kt.tree.inactiveSelectionBackground":"#ffffff1f","kt.tree.inactiveSelectionForeground":"#fff","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#5F656B40","menu.background":"#222830d9","menu.foreground":"#D7DBDE","menu.selectionBackground":"#5F656B40","menu.selectionForeground":"#FFFFFF","menu.separatorBackground":"#43484D","menubar.selectionBackground":"#5f656b40","menubar.selectionForeground":"#FFFFFF","message.background":"#222830","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#222830","notifications.foreground":"#D7DBDE","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#151b21","panel.border":"#43484D","panel.foreground":"#D7DBDE","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#167CDB","panelTitle.activeForeground":"#FFFFFF","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#ffffff73","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#ffffff1f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#ffffffa6","sideBarTitle.foreground":"#FFFFFF","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#ffffff73","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#d2d2d2a6","statusBarItem.prominentBackground":"#2a2a2a80","tab.activeBackground":"#151b21","tab.activeForeground":"#FFFFFF","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#ffffff73","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#151b21","terminal.border":"#252729","terminal.foreground":"#D7DBDE","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#ffffff14","editor.background":"#181818","quickInput.background":"#222830","list.focusBackground":"#ffffff1f","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#151b21"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs-dark",designThemeType:"design-dark",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-dark-theme",name:"OpenSumi Design Dark+ (default dark)"}},37517:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DesignThemeFileSystemProvider=void 0;const n=e(85608),r=e(76003),o=e(43718),l=n.__importDefault(e(13925)),v=n.__importDefault(e(63080));let _=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.onDidChangeFile=o.Event.None}stat(p){return Promise.resolve({type:o.FileType.File,uri:p.toString(),lastModification:Date.now(),isDirectory:!1})}async readFile(p){const{query:s}=p;return l.default.id===s?this.toBuffer(JSON.stringify(l.default)):this.toBuffer(JSON.stringify(v.default))}toBuffer(p){return o.BinaryBuffer.fromString(p).buffer}readDirectory(){throw new Error("Not allowed")}createDirectory(){throw new Error("Not allowed")}rename(){throw new Error("Not allowed")}delete(){throw new Error("Not allowed")}watch(){throw new Error("Not allowed")}writeFile(){throw new Error("Not allowed")}};t.DesignThemeFileSystemProvider=_,t.DesignThemeFileSystemProvider=_=n.__decorate([(0,r.Injectable)()],_)},63080:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#000000ff"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"meta.diff.header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#008000"}},{scope:"constant.language",settings:{foreground:"#0000ff"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#098658"}},{scope:"constant.regexp",settings:{foreground:"#811f3f"}},{name:"css tags in selectors, xml tags",scope:"entity.name.tag",settings:{foreground:"#800000"}},{scope:"entity.name.selector",settings:{foreground:"#800000"}},{scope:"entity.other.attribute-name",settings:{foreground:"#ff0000"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#800000"}},{scope:"invalid",settings:{foreground:"#cd3131"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#000080"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#800000"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#098658"}},{scope:"markup.deleted",settings:{foreground:"#a31515"}},{scope:"markup.changed",settings:{foreground:"#0451a5"}},{scope:["punctuation.definition.quote.begin.markdown","punctuation.definition.list.begin.markdown"],settings:{foreground:"#0451a5"}},{scope:"markup.inline.raw",settings:{foreground:"#800000"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#800000"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#0000ff"}},{scope:"meta.preprocessor.string",settings:{foreground:"#a31515"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#098658"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#0451a5"}},{scope:"storage",settings:{foreground:"#0000ff"}},{scope:"storage.type",settings:{foreground:"#0000ff"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#0000ff"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#a31515"}},{scope:["string.comment.buffered.block.pug","string.quoted.pug","string.interpolated.pug","string.unquoted.plain.in.yaml","string.unquoted.plain.out.yaml","string.unquoted.block.yaml","string.quoted.single.yaml","string.quoted.double.xml","string.quoted.single.xml","string.unquoted.cdata.xml","string.quoted.double.html","string.quoted.single.html","string.unquoted.html","string.quoted.single.handlebars","string.quoted.double.handlebars"],settings:{foreground:"#0000ff"}},{scope:"string.regexp",settings:{foreground:"#811f3f"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#0000ff"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#000000"}},{scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#ff0000"}},{scope:["support.type.property-name.json"],settings:{foreground:"#0451a5"}},{scope:"keyword",settings:{foreground:"#0000ff"}},{scope:"keyword.control",settings:{foreground:"#0000ff"}},{scope:"keyword.operator",settings:{foreground:"#000000"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#0000ff"}},{scope:"keyword.other.unit",settings:{foreground:"#098658"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#800000"}},{scope:"support.function.git-rebase",settings:{foreground:"#0451a5"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#098658"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#000000"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#0000ff"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#795E26"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#267f99"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#267f99"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","source.cpp keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#AF00DB"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],settings:{foreground:"#001080"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#0070C1"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#001080"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#d16969"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#811f3f"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#000000"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#EE0000"}},{scope:"constant.character",settings:{foreground:"#0000ff"}},{scope:"constant.character.escape",settings:{foreground:"#EE0000"}},{scope:"entity.name.label",settings:{foreground:"#000000"}}],colors:{"activityBar.activeBorder":"#151b2114","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#151b21","activityBar.inactiveForeground":"#151b21a6","activityBarBadge.background":"#3C8DFF","activityBarBadge.foreground":"#FFFFFF","badge.background":"#151b5814","badge.foreground":"#151b21a6","breadcrumb.background":"#fff","breadcrumb.foreground":"#5d646c","checkbox.background":"#fff","checkbox.border":"#151b2129",descriptionForeground:"#151b21a6","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#151b2133","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#ffffff","editorGroupHeader.tabsBackground":"#DDE8F4","editorSuggestWidget.selectedBackground":"#6eb6fa40",errorForeground:"#D21F28",focusBorder:"#151b2129",foreground:"#151b21d9","editorCommentsWidget.unresolvedBorder":"#4d9ded","gitDecoration.addedResourceForeground":"#52c41a","gitDecoration.modifiedResourceForeground":"#faad14","gitDecoration.deletedResourceForeground":"#fa541c","gitDecoration.untrackedResourceForeground":"#13c2c2","gitDecoration.ignoredResourceForeground":"#666666","gitDecoration.conflictingResourceForeground":"#ff0000","gitDecoration.submoduleResourceForeground":"#1785eb","icon.foreground":"#151b21d9","input.background":"#fff","input.foreground":"#151b21","input.placeholderForeground":"#151b2173","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#fff","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#151b21","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#151b21a6","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#151b210a","kt.button.disableBorder":"#151b2114","kt.button.disableForeground":"#151b2159","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#151b21a6","kt.icon.hoverBackground":"#151b2114","kt.icon.hoverForeground":"#151b21d9","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#151b2129","kt.input.disableBackground":"#151b210a","kt.input.disableForeground":"#151b2159","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#fff","kt.modal.foreground":"#151b21d9","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#151b21a6","kt.panelTab.activeBackground":"#fff","kt.panelTab.activeForeground":"#151b21","kt.panelTab.border":"#151b2114","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#151b21d9","kt.panelTitle.background":"#fff","kt.popover.background":"#000000e3","kt.popover.border":"#000000e3","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.defaultButton.background":"#fafafb","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#fafafb","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#fff","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#151b2159","kt.defaultButton.foreground":"#000a1aff","kt.defaultButton.hoverBackground":"#F5F5F6","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#fff","kt.defaultButton.selectionForeground":"#151b21","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dff","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#5b9fff","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#fff","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#fff","kt.secondaryButton.border":"#00000026","kt.secondaryButton.clickBorder":"#00000026","kt.secondaryButton.clickForeground":"#151b21","kt.secondaryButton.foreground":"#151b21d9","kt.secondaryButton.background":"#fff","kt.secondaryButton.hoverBorder":"#00000026","kt.secondaryButton.hoverForeground":"#151b21","kt.select.background":"#fff","kt.select.border":"#151b2129","kt.select.disableBackground":"#151b2114","kt.select.disableForeground":"#151b2159","kt.select.foreground":"#151b21","kt.select.placeholderForeground":"#151b2173","kt.selectDropdown.background":"#fff","kt.selectDropdown.foreground":"#151b21","kt.selectDropdown.hoverBackground":"#151b2114","kt.selectDropdown.selectionBackground":"#151b2114","kt.selectDropdown.selectionForeground":"#151b21","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#151b21","kt.tab.borderDown":"#151b211f","kt.tab.inactiveForeground":"#151b21a6","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#151b5814","kt.tree.hoverForeground":"#151b21","kt.tree.inactiveSelectionBackground":"#151b5814","kt.tree.inactiveSelectionForeground":"#151b21","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#151b5814","menu.background":"#FFFFFF","menu.foreground":"#151b21","menu.selectionBackground":"#151b2114","menu.selectionForeground":"#151b21","menu.separatorBackground":"#151b211f","menubar.selectionBackground":"#151b2114","menubar.selectionForeground":"#151b21","message.background":"#151b21d9","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#fff","notifications.foreground":"#151b21d9","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#fff","panel.border":"#43484D","panel.foreground":"#151b21","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#3c8dff","panelTitle.activeForeground":"#151b21","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#151b21a6","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#151b211f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#151b21d9","sideBarTitle.foreground":"#151b21d9","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#151b21a6","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#151b21a6","statusBarItem.prominentBackground":"#f1f1f180","tab.activeBackground":"#ffffff","tab.activeForeground":"#151b21","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#151b21d9","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#FFFFFF","terminal.border":"#252729","terminal.foreground":"#151b21","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#151b211f","editor.background":"#F1F2F3","quickInput.background":"#fff","list.focusBackground":"#151b5814","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#fff","multiDiffEditor.background":"#fff","multiDiffEditor.border":"#151b211f","multiDiffEditor.headerBackground":"#fff"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs",designThemeType:"design-light",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-light-theme",name:"OpenSumi Design Light+ (default light)"}},98741:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.overrideMonacoColorToken=t.overrideColorToken=void 0;const n=e(85608),r=e(52416),o=n.__importDefault(e(13925)),l=n.__importDefault(e(63080)),v=()=>{const m=(0,r.getColorRegistry)();m.getColors().forEach(({id:p})=>{if(o.default.colors[p]&&l.default.colors[p]){const s=m.getColor(p);(0,r.registerColor)(p,{dark:o.default.colors[p],light:l.default.colors[p],hcDark:s.defaults.hcDark||null,hcLight:s.defaults.hcLight||null},s.description)}})};t.overrideColorToken=v;const _=()=>{(0,r.registerColor)("vscode.quickInputList.focusBackground",{light:"#151b2114",dark:"#5F656B40",hcDark:null,hcLight:null},"Quick picker background color for the focused item."),(0,r.registerColor)("quickInputList.focusForeground",{dark:"#ffffff",light:"#151b21",hcDark:null,hcLight:null},"Quick picker foreground color for the focused item.")};t.overrideMonacoColorToken=_},66338:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DESIGN_MENU_BAR_LEFT=t.DESIGN_MENU_BAR_RIGHT=t.DESIGN_MENUBAR_CONTAINER_VIEW_ID=void 0,t.DESIGN_MENUBAR_CONTAINER_VIEW_ID="design_menubar",t.DESIGN_MENU_BAR_RIGHT="design_menu_bar_right",t.DESIGN_MENU_BAR_LEFT="design_menu_bar_left"},38879:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(66338),t)},82353:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(38879),t)},30526:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffEditorPart=t.BaseMonacoEditorWrapper=void 0,t.insertSnippetWithMonacoEditor=h;const n=e(85608),r=e(76003),o=e(43718),l=n.__importStar(e(20868)),v=e(99721),_=e(23418),m=e(84677),p=e(6043),s=e(82196);function h(E,f,c,y){const b=E.getContribution("snippetController2"),A=c.map(S=>new l.Selection(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn));E.setSelections(A),E.focus(),b.insert(f,0,0,y.undoStopBefore,y.undoStopAfter)}const{removeUndefined:a}=o.objects;function g(E,f,c){E.updateOptions(f),E.getModel()&&E.getModel().updateOptions(c)}let d=class extends o.WithEventBus{get currentUri(){return this.currentDocumentModel?this.currentDocumentModel.uri:null}getId(){return this.monacoEditor.getId()}getSelections(){return this.monacoEditor.getSelections()||[]}disableSelectionEmitter(){this._disableSelectionEmitter=!0}enableSelectionEmitter(){this._disableSelectionEmitter=!1}constructor(f,c){super(),this.monacoEditor=f,this.type=c,this.onFocus=this.monacoEditor.onDidFocusEditorWidget,this.onBlur=this.monacoEditor.onDidBlurEditorWidget,this._specialEditorOptions={},this._specialModelOptions={},this._editorOptionsFromContribution={},this._disableSelectionEmitter=!1,this.monacoLargeFileOptions={folding:!1,codeLens:!1,wordWrap:"off",minimap:{enabled:!1},stickyScroll:{enabled:!1},matchBrackets:"never"},this.decorationApplier=this.injector.get(m.MonacoEditorDecorationApplier,[this.monacoEditor]),this.addDispose(this.monacoEditor.onDidChangeModel(this.onDidChangeModel.bind(this))),this.addDispose(this.monacoEditor.onDidChangeModelLanguage(()=>{this._doUpdateOptions()})),this.addDispose(this.configurationService.onDidChangeConfiguration(y=>{Array.from(y.affectedKeys.values()).filter(A=>(0,p.isEditorOption)(A)).length>0&&this._doUpdateOptions()}))}async onDidChangeModel(){this._editorOptionsFromContribution={};const f=this.currentUri;f&&Promise.resolve(this.editorFeatureRegistry.runProvideEditorOptionsForUri(f)).then(c=>{!this.currentUri||!f.isEqual(this.currentUri)||c&&Object.keys(c).length>0&&(this._editorOptionsFromContribution=c,(0,o.isEmptyObject)(this._editorOptionsFromContribution)||this._doUpdateOptions())})}getType(){return this.type}updateOptions(f={},c={}){this._specialEditorOptions=a({...this._specialEditorOptions,...f}),this._specialModelOptions=a({...this._specialModelOptions,...c}),this._doUpdateOptions()}_doUpdateOptions(){const{editorOptions:f,modelOptions:c}=this._calculateFinalOptions();g(this.monacoEditor,f,c)}_calculateFinalOptions(){var f;const c=this.currentUri?this.currentUri.toString():void 0,y=this.currentDocumentModel?this.currentDocumentModel.languageId:void 0,b=(0,p.getConvertedMonacoOptions)(this.configurationService,c,y,void 0);let S={...{readOnly:((f=this.currentDocumentModel)===null||f===void 0?void 0:f.readonly)||!1},...b.editorOptions,...this._editorOptionsFromContribution,...this._specialEditorOptions};return this.currentDocumentModel&&this.currentDocumentModel.isLargeFile&&Object.assign(S,this.monacoLargeFileOptions),this.type!==_.EditorType.CODE&&(S={...S,...b.diffOptions}),{editorOptions:S,modelOptions:{...b.modelOptions,...this._specialModelOptions}}}insertSnippet(f,c,y){h(this.monacoEditor,f,c,y)}applyDecoration(f,c){this.decorationApplier.applyDecoration(f,c)}onSelectionsChanged(f){return this.monacoEditor.onDidChangeCursorSelection(c=>{this._disableSelectionEmitter||f({selections:this.getSelections(),source:c.source})})}onVisibleRangesChanged(f){const c=new o.Disposable,y=this.monacoEditor;return c.addDispose(y.onDidScrollChange(b=>{f(this.monacoEditor.getVisibleRanges())})),c.addDispose(y.onDidLayoutChange(b=>{f(this.monacoEditor.getVisibleRanges())})),c}setSelections(f){return this.monacoEditor.setSelections(f)}setSelection(f){return this.monacoEditor.setSelection(f)}async save(){this.currentDocumentModel&&await this.currentDocumentModel.save()}onConfigurationChanged(f){return this.monacoEditor.onDidChangeConfiguration(y=>{f()})}};t.BaseMonacoEditorWrapper=d,n.__decorate([(0,r.Autowired)(s.IEditorFeatureRegistry),n.__metadata("design:type",Object)],d.prototype,"editorFeatureRegistry",void 0),n.__decorate([(0,r.Autowired)(v.IConfigurationService),n.__metadata("design:type",Object)],d.prototype,"configurationService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],d.prototype,"injector",void 0),t.BaseMonacoEditorWrapper=d=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],d);let u=class extends d{get currentDocumentModel(){return this._getDocumentModel()}updateDocumentModel(f){const c=this.documents.get();if(c!=="loading"){for(const y of c)y.object.modified&&o.URI.from(y.object.modified.uri).isEqual(f)&&(this._getDocumentModel=()=>y.object.modifiedInstance),y.object.original&&o.URI.from(y.object.original.uri).isEqual(f)&&(this._getDocumentModel=()=>y.object.originalInstance);this.decorationApplier.clearDecorations(),this.decorationApplier.applyDecorationFromProvider()}}constructor(f,c,y,b){super(f,y),this._getDocumentModel=c,this.documents=b}};t.DiffEditorPart=u,t.DiffEditorPart=u=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Function,Object,Object])],u)},87802:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultBreadCrumbProvider=void 0,t.findCurrentDocumentSymbol=g;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),l=e(41869),v=e(26542),_=e(79929),m=e(97408),p=e(82196),s=e(17459),{Path:h}=l.path;let a=class extends l.WithEventBus{constructor(){super(...arguments),this._onDidUpdateBreadCrumb=new l.Emitter,this.onDidUpdateBreadCrumb=this._onDidUpdateBreadCrumb.event,this.debouncedFireUriEvent=new Map,this.cachedBreadCrumb=new l.LRUMap(200,100)}handlesUri(c){return this.fileServiceClient.handlesScheme(c.scheme)}provideBreadCrumbForUri(c,y){return this.getFileParts(c).concat(this.getDocumentSymbolParts(c,y))}getFileParts(c){const y=this.workspaceService.workspace?new l.URI(this.workspaceService.workspace.uri):void 0;let b,A;y&&y.isEqualOrParent(c)?(b=y,A=y.relative(c)):(b=l.URI.from({scheme:c.scheme,authority:c.authority}),A=c.path);let S=b.path;const w=[];for(const I of A.toString().split(h.separator).filter(D=>!!D)){S=S.join(I);const D=b.withPath(S);w.push(this.createFilePartBreadCrumbUri(D,!D.isEqual(c)))}return w}createFilePartBreadCrumbUri(c,y){const b=c.toString();if(this.cachedBreadCrumb.has(b))return this.cachedBreadCrumb.get(b);const A={name:c.path.base,uri:c,icon:this.labelService.getIcon(c,{isDirectory:y}),getSiblings:async()=>{const S=l.URI.from({scheme:c.scheme}).withPath(c.path.dir),w=await this.fileServiceClient.getFileStat(S.toString()),I=[];let D=-1;return w&&w.children&&w.children.length>0&&d(w.children).forEach((T,R)=>{I.push(this.createFilePartBreadCrumbUri(new l.URI(T.uri),T.isDirectory)),D===-1&&c.toString()===T.uri&&(D=R)}),{parts:I,currentIndex:D}}};return y?A.getChildren=async()=>{const S=await this.fileServiceClient.getFileStat(c.toString()),w=[];return S&&S.children&&S.children.length>0&&d(S.children).forEach((I,D)=>{w.push(this.createFilePartBreadCrumbUri(new l.URI(I.uri),I.isDirectory))}),w}:A.onClick=()=>{this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,c)},this.cachedBreadCrumb.set(b,A),A}getDocumentSymbolParts(c,y){if(!y)return[];const b=this.documentSymbolStore.getDocumentSymbol(c);if(b&&b.length>0){const A=g(b,y.monacoEditor.getPosition());return A.length>0?A.map(S=>this.createFromDocumentSymbol(S,y)):[{name:"...",getSiblings:()=>({parts:b.sort((S,w)=>E(S.range,w.range)).map(S=>this.createFromDocumentSymbol(S,y)),currentIndex:-1})}]}else return[]}createFromDocumentSymbol(c,y){const b={name:c.name,icon:(0,l.getSymbolIcon)(c.kind),isSymbol:!0,onClick:()=>{y.setSelection({startColumn:c.range.startColumn,endColumn:c.range.startColumn,startLineNumber:c.range.startLineNumber,endLineNumber:c.range.startLineNumber}),y.monacoEditor.revealRangeInCenter(c.range),y.monacoEditor.focus()}};return c.parent&&(b.getSiblings=()=>({parts:c.parent.children.sort((A,S)=>E(A.range,S.range)).map(A=>this.createFromDocumentSymbol(A,y)),currentIndex:c.parent.children.indexOf(c)})),c.children&&c.children.length>0&&(b.getChildren=()=>c.children.sort((A,S)=>E(A.range,S.range)).map(A=>this.createFromDocumentSymbol(A,y))),b}onDocumentSymbolChangedEvent(c){this.notifyUpdate(c.payload)}onEditorSelectionChangeEvent(c){this.notifyUpdate(c.payload.editorUri)}notifyUpdate(c){this.debouncedFireUriEvent.has(c.toString())||this.debouncedFireUriEvent.set(c.toString(),(0,r.default)(()=>{this._onDidUpdateBreadCrumb.fire(c)},100,{maxWait:1e3})),this.debouncedFireUriEvent.get(c.toString())()}};t.DefaultBreadCrumbProvider=a,n.__decorate([(0,o.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],a.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(m.IWorkspaceService),n.__metadata("design:type",Object)],a.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(v.LabelService),n.__metadata("design:type",v.LabelService)],a.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(l.CommandService),n.__metadata("design:type",Object)],a.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",s.DocumentSymbolStore)],a.prototype,"documentSymbolStore",void 0),n.__decorate([(0,l.OnEvent)(s.DocumentSymbolChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.DocumentSymbolChangedEvent]),n.__metadata("design:returntype",void 0)],a.prototype,"onDocumentSymbolChangedEvent",null),n.__decorate([(0,l.OnEvent)(p.EditorSelectionChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.EditorSelectionChangeEvent]),n.__metadata("design:returntype",void 0)],a.prototype,"onEditorSelectionChangeEvent",null),t.DefaultBreadCrumbProvider=a=n.__decorate([(0,o.Injectable)()],a);function g(f,c){const y=[];if(!c)return y;let b=f;for(;b&&b.length>0;){let A=!1;for(const S of b)if(u(c,S.range)){y.push(S),b=S.children,A=!0;break}if(!A)break}return y}function d(f){return f.sort((c,y)=>{if(c.isDirectory&&y.isDirectory||!c.isDirectory&&!y.isDirectory){const b=new l.URI(c.uri).path.name,A=new l.URI(y.uri).path.name;return b.localeCompare(A,"kn",{numeric:!0})}else return c.isDirectory&&!y.isDirectory?-1:!c.isDirectory&&y.isDirectory?1:0})}function u(f,c){return f.lineNumber<c.startLineNumber?!1:f.lineNumber===c.startLineNumber?f.column>=c.startColumn:f.lineNumber<c.endLineNumber?!0:f.lineNumber===c.endLineNumber?f.column<=c.endColumn:!1}function E(f,c){return f.startLineNumber>c.startLineNumber?1:f.startLineNumber<c.startLineNumber?-1:f.startColumn===c.startColumn?0:f.startColumn>c.startColumn?1:-1}},17459:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymbolTag=t.DocumentSymbolChangedEvent=t.DocumentSymbolStore=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),l=e(41869),v=e(79865),_=e(40540);Object.defineProperty(t,"SymbolTag",{enumerable:!0,get:function(){return _.SymbolTag}});const m=e(23418),p=e(96689);let s=class extends l.WithEventBus{constructor(){super(),this.documentSymbols=new Map,this.pendingUpdate=new Set,this.debounced=new Map,this.symbolDeferred=new Map,this.addDispose(v.languageFeaturesService.documentSymbolProvider.onDidChange(()=>{Array.from(this.documentSymbols.keys()).forEach(u=>{this.markNeedUpdate(new l.URI(u))})}))}getDocumentSymbol(u){return this.documentSymbols.has(u.toString())||(this.documentSymbols.set(u.toString(),void 0),this.createDocumentSymbolCache(u)),this.pendingUpdate.has(u.toString())&&this.updateDocumentSymbolCache(u),this.documentSymbols.get(u.toString())}async getDocumentSymbolAsync(u,E){var f;const c=u.toString();return E&&E.onCancellationRequested(()=>{var y;(y=this.symbolDeferred.get(c))===null||y===void 0||y.resolve(),this.symbolDeferred.delete(c)}),(!this.documentSymbols.has(c)||this.pendingUpdate.has(c))&&!this.symbolDeferred.has(c)&&(this.symbolDeferred.set(c,new l.Deferred),this.updateDocumentSymbolCache(u)),await((f=this.symbolDeferred.get(c))===null||f===void 0?void 0:f.promise),this.documentSymbols.get(c)}async createDocumentSymbolCache(u){this.updateDocumentSymbolCache(u)}async doUpdateDocumentSymbolCache(u){var E,f;this.pendingUpdate.delete(u.toString());const c=await this.editorDocumentModelRegistry.createModelReference(u);if(!c){(E=this.symbolDeferred.get(u.toString()))===null||E===void 0||E.resolve();return}try{const y=v.languageFeaturesService.documentSymbolProvider.all(c.instance.getMonacoModel());let b;for(const A of y)if(b=await A.provideDocumentSymbols(c.instance.getMonacoModel(),new l.CancellationTokenSource().token),b)break;b&&a(b,{children:b},u),this.documentSymbols.set(u.toString(),b),this.eventBus.fire(new h(u))}finally{c.dispose()}(f=this.symbolDeferred.get(u.toString()))===null||f===void 0||f.resolve()}updateDocumentSymbolCache(u){this.debounced.has(u.toString())||this.debounced.set(u.toString(),(0,r.default)(()=>this.doUpdateDocumentSymbolCache(u),100,{maxWait:1e3})),this.debounced.get(u.toString())()}onEditorDocumentModelContentChangedEvent(u){u.payload.changes&&u.payload.changes.length>0&&this.markNeedUpdate(u.payload.uri)}markNeedUpdate(u){this.pendingUpdate.add(u.toString()),this.isWatching(u)&&this.updateDocumentSymbolCache(u)}isWatching(u){for(const E of this.editorService.editorGroups)if(E.currentResource&&E.currentResource.uri.isEqual(u))return!0;return!1}};t.DocumentSymbolStore=s,n.__decorate([(0,o.Autowired)(p.IEditorDocumentModelService),n.__metadata("design:type",Object)],s.prototype,"editorDocumentModelRegistry",void 0),n.__decorate([(0,o.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorService)],s.prototype,"editorService",void 0),n.__decorate([(0,l.OnEvent)(p.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],s.prototype,"onEditorDocumentModelContentChangedEvent",null),t.DocumentSymbolStore=s=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],s);class h extends l.BasicEvent{}t.DocumentSymbolChangedEvent=h;function a(d,u,E){return d.forEach((f,c)=>{const y=f;y.parent=u,y.id=g(E,y,c),f.children&&f.children.length>0&&a(f.children,f,E)}),d}function g(d,u,E){const f=[u.name];for(;u.parent;){const c=u.parent;if(!c.name)break;f.unshift(c.name),u=c}return`${d.toString()}__${f.join("-")}__${E}`}},88895:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreadCrumbServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(87802),{addElement:v}=o.arrays;let _=class{constructor(){this.providers=[],this._onDidUpdateBreadCrumbResults=new o.Emitter,this.onDidUpdateBreadCrumbResults=this._onDidUpdateBreadCrumbResults.event,this.crumbResults=new Map,this.registerBreadCrumbProvider(this.defaultBreadCrumbProvider)}registerBreadCrumbProvider(h){const a=v(this.providers,h);return h.onDidUpdateBreadCrumb(g=>{this.crumbResults.forEach((d,u)=>{d.has(g.toString())&&this.getBreadCrumbs(g,u)})}),a}getBreadCrumbs(h,a){const g=this.getEditorCrumbResults(a);for(const d of this.providers)if(d.handlesUri(h)){const u=g.get(h.toString()),E=d.provideBreadCrumbForUri(h,a);m(u,E)||(g.set(h.toString(),E),this._onDidUpdateBreadCrumbResults.fire({editor:a,uri:h}));break}return g.get(h.toString())}getEditorCrumbResults(h){return this.crumbResults.has(h)||(this.crumbResults.set(h,new Map),h&&h.monacoEditor.onDidDispose(()=>{this.crumbResults.delete(h)})),this.crumbResults.get(h)}disposeCrumb(h){}};t.BreadCrumbServiceImpl=_,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",l.DefaultBreadCrumbProvider)],_.prototype,"defaultBreadCrumbProvider",void 0),t.BreadCrumbServiceImpl=_=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],_);function m(s,h){if(!s&&!h)return!0;if(!s||!h)return!1;if(s.length!==h.length)return!1;for(let a=0;a<s.length;a++)if(!p(s[a],h[a]))return!1;return!0}function p(s,h){return s.name===h.name}},11673:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorComponentRegistryImpl=void 0;const n=e(85608),r=n.__importDefault(e(46343)),o=n.__importDefault(e(19106)),l=n.__importDefault(e(43144)),v=e(76003),_=e(43718),m=e(82196);let p=class{constructor(){this.components=new Map,this.sideWidgets={bottom:new Set,top:new Set},this.initialPropsMap=new Map,this.resolvers=new Map,this.normalizedResolvers=[],this.perWorkbenchComponents={}}registerEditorComponent(h,a){const g=h.uid;return h.renderMode||(h.renderMode=m.EditorComponentRenderMode.ONE_PER_GROUP),this.components.set(g,h),this.initialPropsMap.set(g,a),this.eventBus.fire(new _.ExtensionActivateEvent({topic:"onRegisterEditorComponent",data:g})),this.eventBus.fire(new m.RegisterEditorComponentEvent(g)),{dispose:()=>{this.components.get(g)===h&&(this.components.delete(g),this.eventBus.fire(new m.EditorComponentDisposeEvent(h)))}}}registerEditorComponentResolver(h,a){let g;return typeof h=="function"?g={handleScheme:h,resolver:a}:g={handleScheme:d=>d===h?10:-1,resolver:a},this.normalizedResolvers.push(g),this.resolvers.clear(),{dispose:()=>{for(const u of this.resolvers.values()){const E=u.indexOf(a);E!==-1&&u.splice(E,1)}const d=this.normalizedResolvers.indexOf(g);d!==-1&&this.normalizedResolvers.splice(d,1)}}}async resolveEditorComponent(h){let a=[];const g=this.getResolvers(h.uri.scheme).slice();let d=!1;const u=E=>{a=E,d=!0};for(const E of g)if(await E(h,a,u),d)break;return a.sort((E,f)=>{const c=E.weight||0;return(f.weight||0)-c}),(0,o.default)(a,r.default)}calculateSchemeResolver(h){const a=this.normalizedResolvers.slice(),g=[];return a.forEach((d,u)=>{const E=d.handleScheme(h);E>=0&&g.push({weight:E,index:u,resolver:d.resolver})}),g.sort((d,u)=>d.weight>u.weight?-1:d.weight<u.weight?1:u.index-d.index).map(d=>d.resolver)}getResolvers(h){return this.resolvers.has(h)||this.resolvers.set(h,this.calculateSchemeResolver(h)),this.resolvers.get(h)}getEditorComponent(h){return this.components.get(h)||null}getEditorInitialProps(h){return this.initialPropsMap.get(h)||null}clearPerWorkbenchComponentCache(h){l.default.unmountComponentAtNode(this.perWorkbenchComponents[h]),delete this.perWorkbenchComponents[h]}getSideWidgets(h,a){const g=[];return this.sideWidgets[h].forEach(d=>{d.displaysOnResource(a)&&g.push(d)}),g.sort((d,u)=>{const E=d.weight===void 0?10:d.weight;return(u.weight===void 0?10:u.weight)-E})}registerEditorSideWidget(h){const a=h.side||"bottom";return this.sideWidgets[a].add(h),this.eventBus.fire(new m.RegisterEditorSideComponentEvent),{dispose:()=>{this.sideWidgets[a].delete(h)}}}};t.EditorComponentRegistryImpl=p,n.__decorate([(0,v.Autowired)(_.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),t.EditorComponentRegistryImpl=p=n.__decorate([(0,v.Injectable)()],p)},84677:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoEditorDecorationApplier=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=e(76003),l=e(43718),v=e(52416),_=e(82196);let m=class extends l.Disposable{constructor(d){super(),this.editor=d,this.decorations=new Map,this.applyDecorationFromProvider(),this.addDispose(this.editor.onDidChangeModel(()=>{this.clearDecorations(),this.applyDecorationFromProvider()})),this.addDispose(this.editor.onDidDispose(()=>{this.dispose()})),this.addDispose(this.eventBus.on(_.EditorDecorationChangeEvent,u=>{const E=this.getEditorUri();E&&u.payload.uri.isEqual(E)&&this.applyDecorationFromProvider(u.payload.key)})),this.addDispose(this.eventBus.on(_.EditorDecorationTypeRemovedEvent,u=>{this.deltaDecoration(u.payload,[])}))}getEditorUri(){return this.editor.getModel()?new l.URI(this.editor.getModel().uri.toString()):null}async applyDecorationFromProvider(d){if(this.editor.getModel()){const u=new l.URI(this.editor.getModel().uri.toString()),E=await this.decorationService.getDecorationFromProvider(u,d);if(!this.editor.getModel()||this.editor.getModel().uri.toString()!==u.toString())return;for(const f of Object.keys(E))this.deltaDecoration(f,E[f]);this.eventBus.fire(new _.DidApplyEditorDecorationFromProvider({key:d,uri:u}))}}dispose(){super.dispose(),this.clearDecorations()}clearDecorations(){this.decorations.forEach(d=>{d.dispose(),this.editor.deltaDecorations(d.decorations,[])}),this.decorations.clear()}deltaDecoration(d,u){let E=[];if(this.decorations.has(d)&&(E=this.decorations.get(d).decorations,this.decorations.get(d).dispose(),this.decorations.delete(d)),E.length===0&&u.length===0)return;const f=this.editor.deltaDecorations(E,u);this.decorations.set(d,{decorations:f,dispose:()=>null})}applyDecoration(d,u){const E=this.decorations.get(d);E&&E.dispose();const f=E?E.decorations:[],c=[],y=new l.Disposable;if(f.length===0&&u.length===0)return;u.forEach(A=>{const S=this.resolveDecorationRenderer(d,A.renderOptions);c.push({range:A.range,options:{...S.options,hoverMessage:h(A.hoverMessage)}}),y.addDispose(S)});const b=this.editor.deltaDecorations(f,c);this.decorations.set(d,{decorations:b,dispose:()=>y.dispose()})}resolveDecorationRenderer(d,u){const E=this.decorationService.getTextEditorDecorationType(d),f={description:d},c=this.themeService.getCurrentThemeSync().type,y=new l.Disposable;if(E){const b=E.property;p(f,b,c)}if(u){const b=this.decorationService.createTextEditorDecorationType(u);p(f,b.property,c),y.addDispose(b)}return{options:f,dispose:()=>y.dispose()}}};t.MonacoEditorDecorationApplier=m,n.__decorate([(0,o.Autowired)(_.IEditorDecorationCollectionService),n.__metadata("design:type",Object)],m.prototype,"decorationService",void 0),n.__decorate([(0,o.Autowired)(v.IThemeService),n.__metadata("design:type",Object)],m.prototype,"themeService",void 0),n.__decorate([(0,o.Autowired)(l.IEventBus),n.__metadata("design:type",Object)],m.prototype,"eventBus",void 0),t.MonacoEditorDecorationApplier=m=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],m);function p(g,d,u){d.overviewRulerLane&&(g.overviewRuler?g.overviewRuler.position=d.overviewRulerLane:g.overviewRuler={color:null,position:d.overviewRulerLane}),d.default&&s(g,d.default),u==="dark"&&d.dark&&s(g,d.dark),u==="light"&&d.light&&s(g,d.light),d.isWholeLine!==void 0&&(g.isWholeLine=d.isWholeLine),d.rangeBehavior&&(g.stickiness=d.rangeBehavior),g.inlineClassNameAffectsLetterSpacing=!0}function s(g,d){d.className&&(g.className=(0,r.default)(g.className,d.className)),d.inlineClassName&&(g.inlineClassName=(0,r.default)(g.inlineClassName,d.inlineClassName)),d.afterContentClassName&&(g.afterContentClassName=(0,r.default)(g.afterContentClassName,d.afterContentClassName)),d.beforeContentClassName&&(g.beforeContentClassName=(0,r.default)(g.beforeContentClassName,d.beforeContentClassName)),d.glyphMarginClassName&&(g.glyphMarginClassName=(0,r.default)(g.glyphMarginClassName,d.glyphMarginClassName)),d.overviewRulerColor&&g.overviewRuler&&(g.overviewRuler.color=d.overviewRulerColor)}function h(g){if(g)return g instanceof Array?g.map(a):a(g)}function a(g){return typeof g=="string"?{value:g,isTrusted:!0}:g}},84158:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompareEditorContribution=t.CompareService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),v=e(82196);let _=class{constructor(){this.comparing=new Map}compare(s,h,a){const g=o.URI.from({scheme:v.DIFF_SCHEME,query:o.URI.stringifyQuery({name:a,original:s,modified:h,comparing:!0})});if(!this.comparing.has(g.toString())){const d=new o.Deferred;this.comparing.set(g.toString(),d),d.promise.then(()=>{this.comparing.delete(g.toString()),this.commandService.executeCommand(o.EDITOR_COMMANDS.CLOSE_ALL.id,g)})}return this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,g),this.comparing.get(g.toString()).promise}};t.CompareService=_,n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],_.prototype,"commandService",void 0),t.CompareService=_=n.__decorate([(0,r.Injectable)()],_);let m=class{registerMenus(s){s.registerMenuItems(l.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.ACCEPT.id,label:(0,o.localize)("editor.action.accept")},iconClass:(0,o.getIcon)("check"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),s.registerMenuItems(l.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.REVERT.id,label:(0,o.localize)("editor.action.revert")},iconClass:(0,o.getIcon)("rollback"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),s.registerMenuItems(l.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS.id,label:(0,o.localize)("diffEditor.action.toggleCollapseUnchangedRegions")},toggledWhen:"config.diffEditor.hideUnchangedRegions.enabled",iconClass:"codicon codicon-map",group:"navigation",when:"isInDiffEditor"}])}registerCommands(s){s.registerCommand(o.DIFF_EDITOR_COMMANDS.ACCEPT,{execute:h=>{h&&this.compareService.comparing.has(h.toString())&&this.compareService.comparing.get(h.toString()).resolve(v.CompareResult.accept)}}),s.registerCommand(o.DIFF_EDITOR_COMMANDS.REVERT,{execute:h=>{h&&this.compareService.comparing.has(h.toString())&&this.compareService.comparing.get(h.toString()).resolve(v.CompareResult.revert)}}),s.registerCommand(o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS,{execute:()=>{const h=this.preferenceService.get("diffEditor.hideUnchangedRegions.enabled");this.preferenceService.set("diffEditor.hideUnchangedRegions.enabled",!h,o.PreferenceScope.User)}})}};t.CompareEditorContribution=m,n.__decorate([(0,r.Autowired)(v.ICompareService),n.__metadata("design:type",_)],m.prototype,"compareService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],m.prototype,"preferenceService",void 0),t.CompareEditorContribution=m=n.__decorate([(0,o.Domain)(l.MenuContribution,o.CommandContribution)],m)},57581:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultDiffEditorContribution=t.DiffResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),v=e(14951),_=e(23418),m=e(82196);let p=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme=_.DIFF_SCHEME,this.modifiedToResource=new Map}onResourceDecorationChangeEvent(a){a.payload.uri&&this.modifiedToResource.has(a.payload.uri.toString())&&this.eventBus.fire(new _.ResourceDecorationNeedChangeEvent({uri:this.modifiedToResource.get(a.payload.uri.toString()),decoration:a.payload.decoration}))}async getCurrentUserHome(){if(!this.userhomePath)try{const a=await this.fileServiceClient.getCurrentUserHome();a&&(this.userhomePath=new o.URI(a.uri))}catch{}return this.userhomePath}async getReadableTooltip(a){const g=a.toString(),d=await this.getCurrentUserHome();if(!d)return decodeURIComponent(a.withScheme("").toString());if(d.isEqualOrParent(a)){const u=d&&d.toString();return decodeURIComponent(g.replace(u,"~"))}return decodeURIComponent(a.withScheme("").toString())}async provideResource(a){const{original:g,modified:d,name:u}=a.getParsedQuery(),E=new o.URI(g),f=new o.URI(d);return this.modifiedToResource.set(f.toString(),a),Promise.all([this.labelService.getIcon(E),this.getReadableTooltip(f)]).then(([c,y])=>{var b;return{name:u,icon:c,uri:a,supportsRevive:(b=this.appConfig.enableDiffRevive)!==null&&b!==void 0?b:!0,metadata:{original:E,modified:f},title:y}})}async shouldCloseResource(a,g){const{modified:d}=a.uri.getParsedQuery(),u=new o.URI(d),E=await this.resourceService.getResource(u);return E?await this.resourceService.shouldCloseResource(E,g):!0}};t.DiffResourceProvider=p,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",l.LabelService)],p.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(_.ResourceService),n.__metadata("design:type",_.ResourceService)],p.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],p.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),n.__decorate([(0,o.OnEvent)(_.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onResourceDecorationChangeEvent",null),t.DiffResourceProvider=p=n.__decorate([(0,r.Injectable)()],p);let s=class{registerResource(a){a.registerResourceProvider(this.diffResourceProvider)}registerEditorComponent(a){a.registerEditorComponentResolver(_.DIFF_SCHEME,(g,d)=>{d.push({type:m.EditorOpenType.diff})})}};t.DefaultDiffEditorContribution=s,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p)],s.prototype,"diffResourceProvider",void 0),t.DefaultDiffEditorContribution=s=n.__decorate([(0,o.Domain)(m.BrowserEditorContribution)],s)},21690:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyDocCacheImpl=void 0;const n=e(85608),r=e(76003);let o=class{hasCache(v){return!1}isFlushed(){return!0}getCache(v){return null}persistCache(v,_){}};t.EmptyDocCacheImpl=o,t.EmptyDocCacheImpl=o=n.__decorate([(0,r.Injectable)()],o)},80487:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(21690),t),n.__exportStar(e(7220),t)},7220:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStorageDocCacheImpl=void 0;const n=e(85608),r=e(76003),o=e(51500),l=e(93107);let v=class{hasCache(m){return!0}isFlushed(){return!0}async getCache(m){const p=this.parseKeyFrom(m);return await this.storageService.getData(p)||null}persistCache(m,p){const s=this.parseKeyFrom(m),h=this.parseCacheFrom(m,p);this.storageService.setData(s,h)}parseCacheFrom(m,p){if(!(!p.dirty||!p.changeMatrix.length))return{path:m.path.toString(),startMD5:p.startMD5,changeMatrix:p.changeMatrix.map(s=>s.map(h=>(0,l.parseCacheValueFrom)(h)))}}parseKeyFrom(m){return`LocalStorageDocCacheImpl_${m.toString()}`}};t.LocalStorageDocCacheImpl=v,n.__decorate([(0,r.Autowired)(o.IWorkspaceStorageService),n.__metadata("design:type",Object)],v.prototype,"storageService",void 0),t.LocalStorageDocCacheImpl=v=n.__decorate([(0,r.Injectable)()],v)},86942:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentError=void 0;var e;(function(n){n.READ_CACHE_ERROR="EditorDocumentError:READ_CACHE_ERROR",n.APPLY_CACHE_TO_DIRTY_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIRTY_DOCUMENT",n.APPLY_CACHE_TO_DIFFERENT_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIFFERENT_DOCUMENT",n.FORMAT_ERROR="EditorDocumentError:FORMAT_ERROR"})(e||(t.EditorDocumentError=e={}))},9519:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentModelServiceImpl=t.EDITOR_DOC_OPTIONS_PREF_KEY=t.EDITOR_DOCUMENT_MODEL_STORAGE=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(96405),v=e(14951),_=e(91249),m=e(96689);t.EDITOR_DOCUMENT_MODEL_STORAGE=new o.URI("editor-doc").withScheme(o.STORAGE_SCHEMA.SCOPE),t.EDITOR_DOC_OPTIONS_PREF_KEY="editor_doc_pref";let p=class extends o.WithEventBus{constructor(){super(),this.editorDocModels=new Map,this.creatingEditorModels=new Map,this._modelsToDispose=new Set,this.preferredModelOptions=new Map,this._ready=this.registerDispose(new o.ReadyEvent),this.modelCreationEventDispatcher=this.registerDispose(new o.Dispatcher),this._modelReferenceManager=new o.ReferenceManager(h=>(this._modelsToDispose.has(h)&&this._modelsToDispose.delete(h),this.getOrCreateModel(h))),this._modelReferenceManager.onReferenceAllDisposed(h=>{this._delete(h)}),this._modelReferenceManager.onInstanceCreated(h=>{this.modelCreationEventDispatcher.dispatch(h.uri.toString()),this.eventBus.fire(new m.EditorDocumentModelCreationEvent({uri:h.uri,languageId:h.languageId,eol:h.eol,encoding:h.encoding,content:h.getText(),readonly:h.readonly,versionId:h.getMonacoModel().getVersionId()}))}),this.addDispose(this.preferenceService.onPreferenceChanged(h=>{h.preferenceName==="editor.detectIndentation"&&this.editorDocModels.forEach(a=>{a.updateOptions({})})}))}onDocumentModelCreated(h,a){return this.modelCreationEventDispatcher.on(h)(a)}_delete(h){const a=this.preferenceService.get("editor.modelDisposeTime",3e3);this._modelsToDispose.add(h.toString());let g=null;const d=this.addDispose({dispose:()=>{g&&clearTimeout(g)}});g=window.setTimeout(()=>{d.dispose(),g=null,this._modelsToDispose.has(h.toString())&&this._doDelete(h.toString())},a)}_doDelete(h){const a=this.editorDocModels.get(h);if(a&&(!a.dirty||a.disposeEvenDirty))return a.dispose(),this.editorDocModels.delete(h),a;this._modelsToDispose.delete(h)}async changeModelOptions(h,a){return this.onceReady(()=>{this.preferredModelOptions.has(h.toString())&&(a={...this.preferredModelOptions.get(h.toString()),...a}),this.preferredModelOptions.set(h.toString(),a);const g=this.getModelReference(h);return g&&(a.encoding&&a.encoding!==g.instance.encoding&&g.instance.updateEncoding(a.encoding),a.languageId&&a.languageId!==g.instance.languageId&&(g.instance.languageId=a.languageId),a.eol&&a.eol!==g.instance.eol&&(g.instance.eol=a.eol),g.dispose()),this.persistOptionsPreference()})}persistOptionsPreference(){return this.storage.set(t.EDITOR_DOC_OPTIONS_PREF_KEY,JSON.stringify((0,o.mapToSerializable)(this.preferredModelOptions)))}async initialize(){if(this.storage=await this.getStorage(t.EDITOR_DOCUMENT_MODEL_STORAGE),this.storage.get(t.EDITOR_DOC_OPTIONS_PREF_KEY))try{this.preferredModelOptions=(0,o.serializableToMap)(JSON.parse(this.storage.get(t.EDITOR_DOC_OPTIONS_PREF_KEY)))}catch(h){this.logger.error(h)}this._ready.ready()}async acceptExternalChange(h){this.hashCalculateService.initialized||await this.hashCalculateService.initialize();const a=this.editorDocModels.get(h.payload.toString());if(a&&!a.dirty){const g=await this.contentRegistry.getProvider(a.uri);if(g)if(g.provideEditorDocumentModelContentMd5)await g.provideEditorDocumentModelContentMd5(a.uri,a.encoding)!==a.getBaseContentMd5()&&a.updateContent(await this.contentRegistry.getContentForUri(a.uri,a.encoding),void 0,!0);else{const d=await this.contentRegistry.getContentForUri(a.uri,a.encoding);this.hashCalculateService.calculate(d)!==a.getBaseContentMd5()&&a.updateContent(d,void 0,!0)}}}createModelReference(h,a){return this._modelReferenceManager.getReference(h.toString(),a)}getModelReference(h,a){return this._modelReferenceManager.getReferenceIfHasInstance(h.toString(),a)}getModelDescription(h,a){const g=this.getModelReference(h,a);if(!g)return null;const d=g.instance,u={alwaysDirty:d.alwaysDirty,closeAutoSave:d.closeAutoSave,disposeEvenDirty:d.disposeEvenDirty,eol:d.eol,encoding:d.encoding,dirty:d.dirty,languageId:d.languageId,readonly:d.readonly,uri:d.uri,id:d.id,savable:d.savable};return g.dispose(),u}getAllModels(){return Array.from(this.editorDocModels.values())}hasLanguage(h){return this.getAllModels().findIndex(a=>a.languageId===h)!==-1}async getOrCreateModel(h,a){return this.editorDocModels.has(h)?this.editorDocModels.get(h):this.createModel(h,a)}get onceReady(){return this.initialize(),this._ready.onceReady.bind(this._ready)}createModel(h,a){if(!this.creatingEditorModels.has(h)){const g=this.doCreateModel(h,a).then(d=>(this.creatingEditorModels.delete(h),d),d=>{throw this.creatingEditorModels.delete(h),d});this.creatingEditorModels.set(h,g)}return this.creatingEditorModels.get(h)}async doCreateModel(h,a){const g=new o.URI(h);let d=await this.contentRegistry.getProvider(g);if(d||await this.fileSystem.shouldWaitProvider(g.scheme)&&(d=await this.contentRegistry.getProvider(g)),!d)throw new Error(`No document provider found for ${g.toString()}`);const[u,E,f,c,y,b]=await Promise.all([d.provideEditorDocumentModelContent(g,a),d.isReadonly?d.isReadonly(g):void 0,d.preferLanguageForUri?d.preferLanguageForUri(g):void 0,d.isAlwaysDirty?d.isAlwaysDirty(g):!1,d.closeAutoSave?d.closeAutoSave(g):!1,d.disposeEvenDirty?d.disposeEvenDirty(g):!1]);let A;d.provideEditorDocumentModelContentSize&&(A=await d.provideEditorDocumentModelContentSize(g)),!a&&d.provideEncoding&&(a=await d.provideEncoding(g));const S=d.provideEOL?await d.provideEOL(g):`
33906
33906
  `,w=!!d.saveDocumentModel,I=this.injector.get(_.EditorDocumentModel,[g,u,{readonly:E,languageId:f,savable:w,eol:S,encoding:a,alwaysDirty:c,closeAutoSave:y,disposeEvenDirty:b,byteSize:A}]);return this.onceReady(()=>{if(this.preferredModelOptions.has(g.toString())){const D=this.preferredModelOptions.get(g.toString());D?.encoding&&I.updateEncoding(D.encoding),D?.eol&&(I.eol=D.eol),D?.languageId&&(I.languageId=D.languageId)}}),this.editorDocModels.set(g.toString(),I),I}async saveEditorDocumentModel(h,a,g,d,u,E,f){const c=await this.contentRegistry.getProvider(h);if(!c)throw new Error(`No document provider found for ${h.toString()}`);if(!c.saveDocumentModel)throw new Error(`The document provider of ${h.toString()} does not have a save method`);return await c.saveDocumentModel(h,a,g,d,u,E,f)}dispose(){super.dispose(),this.getAllModels().forEach(h=>{h.getMonacoModel().dispose()})}};t.EditorDocumentModelServiceImpl=p,n.__decorate([(0,r.Autowired)(m.IEditorDocumentModelContentRegistry),n.__metadata("design:type",Object)],p.prototype,"contentRegistry",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],p.prototype,"getStorage",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(l.IHashCalculateService),n.__metadata("design:type",Object)],p.prototype,"hashCalculateService",void 0),n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],p.prototype,"fileSystem",void 0),n.__decorate([o.memoize,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],p.prototype,"initialize",null),n.__decorate([(0,o.OnEvent)(m.EditorDocumentModelOptionExternalUpdatedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[m.EditorDocumentModelOptionExternalUpdatedEvent]),n.__metadata("design:returntype",Promise)],p.prototype,"acceptExternalChange",null),t.EditorDocumentModelServiceImpl=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},91249:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDocumentModel=void 0;const r=e(85608),o=r.__importDefault(e(12784)),l=e(76003),v=e(41869),_=e(96405),m=e(52902),p=e(68475),s=e(72665),h=e(2261),a=e(44781),g=e(43255),d=e(24347),u=e(23418),E=e(55113),f=e(90915),c=e(82196),y=e(86942),b=e(98469),A=e(96689);let S=n=class extends v.Disposable{constructor(I,D,T={}){super(),this.uri=I,this.saveQueue=new v.Throttler,this._encoding="utf8",this.readonly=!1,this.savable=!1,this.alwaysDirty=!1,this.closeAutoSave=!1,this.disposeEvenDirty=!1,this._originalEncoding=this._encoding,this._persistVersionId=0,this._baseContent="",this.savingTasks=[],this.dirtyChanges=[],this._isInitOption=!0,this.isLargeFile=!1,this._onDidChangeEncoding=new v.Emitter,this.onDidChangeEncoding=this._onDidChangeEncoding.event,this.onDispose(()=>{this.eventBus.fire(new A.EditorDocumentModelRemovalEvent(this.uri))}),T.encoding&&(this._encoding=T.encoding),this.readonly=!!T.readonly,this.savable=!!T.savable,this.alwaysDirty=!!T.alwaysDirty,this.disposeEvenDirty=!!T.disposeEvenDirty,this.closeAutoSave=!!T.closeAutoSave,this.monacoModel=m.monaco.editor.createModel(D,T.languageId,m.URI.parse(I.toString())),this.editorPreferences=(0,f.createEditorPreferenceProxy)(this.preferences,this.uri.toString(),this.languageId);const R=this.editorPreferences["editor.largeFile"];this.editorPreferences["editor.largeFileOptimizations"]!==!1&&typeof T.byteSize=="number"&&T.byteSize>=R&&(this.isLargeFile=!0),this.updateOptions({}),T.eol&&(this.eol=T.eol),this._originalEncoding=this._encoding,this._previousVersionId=this.monacoModel.getVersionId(),this._persistVersionId=this.monacoModel.getAlternativeVersionId(),this.baseContent=D,this._isInitOption=!1,this.listenTo(this.monacoModel),this.readCacheToApply(),this.addDispose(this._onDidChangeEncoding),this.addDispose(this.monacoModel.onDidChangeLanguage(O=>{this.eventBus.fire(new A.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:O.newLanguage}))}))}updateOptions(I){const D={tabSize:this.editorPreferences["editor.tabSize"]||1,insertSpaces:this.editorPreferences["editor.insertSpaces"],detectIndentation:this.editorPreferences["editor.detectIndentation"],...I};D.detectIndentation?this.monacoModel.detectIndentation(D.insertSpaces,D.tabSize):this.monacoModel.updateOptions(D)}listenTo(I){this.addDispose(I.onDidChangeContent(D=>{D.changes&&D.changes.length>0&&this.dirtyChanges.push({fromVersionId:this._previousVersionId,toVersionId:D.versionId,changes:D.changes}),this._previousVersionId=D.versionId,this.notifyChangeEvent(D.changes,D.isRedoing,D.isUndoing)})),this.addDispose(I)}readCacheToApply(){if(!this.cacheProvider.hasCache(this.uri))return;const I=this.cacheProvider.getCache(this.uri,this.encoding);I&&((0,v.isThenable)(I)?I.then(D=>{D&&this.applyCache(D)}).catch(D=>{this.logger.error(`${y.EditorDocumentError.READ_CACHE_ERROR} ${D&&D.message}`)}):this.applyCache(I))}applyCache(I){if(this.dirty){this.logger.error(y.EditorDocumentError.APPLY_CACHE_TO_DIRTY_DOCUMENT);return}if(this.baseContentMd5!==I.startMD5){this.logger.error(y.EditorDocumentError.APPLY_CACHE_TO_DIFFERENT_DOCUMENT);return}const D=T=>{const[R,M,O,x,k]=T;return a.Range.lift({startLineNumber:M,startColumn:O,endLineNumber:x,endColumn:k})};if((0,u.isDocContentCache)(I))this.monacoModel.setValue(I.content);else for(const T of I.changeMatrix){const R=T.map(M=>({range:D(M),text:M[0]}));this.monacoModel.applyEdits(R)}}cleanAndUpdateContent(I){this.monacoModel.setValue(I),this.monacoModel._commandManager.clear(),this._persistVersionId=this.monacoModel.getAlternativeVersionId(),this.savingTasks=[],this.notifyChangeEvent([],!1,!1),this.baseContent=I}async updateEncoding(I){let D=!1;this._encoding!==I&&(D=!0),this._encoding=I,await this.reload(),D&&(this.eventBus.fire(new A.EditorDocumentModelOptionChangedEvent({uri:this.uri,encoding:this._encoding})),this._onDidChangeEncoding.fire())}get encoding(){return this._encoding}set eol(I){this.monacoModel.setEOL(I===`
33907
33907
  `?p.EndOfLineSequence.LF:p.EndOfLineSequence.CRLF),this._isInitOption||this.eventBus.fire(new A.EditorDocumentModelOptionChangedEvent({uri:this.uri,eol:I}))}get eol(){return this.monacoModel.getEOL()}get dirty(){return this.alwaysDirty?!0:!this.savable||this.monacoModel.isDisposed()||this.readonly?!1:this._persistVersionId!==this.monacoModel.getAlternativeVersionId()}set languageId(I){m.monaco.editor.setModelLanguage(this.monacoModel,I),this.eventBus.fire(new A.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:I}))}get languageId(){return this.monacoModel.getLanguageId()}get id(){return this.monacoModel.id}getMonacoModel(){return this.monacoModel}async syncDocumentModelToExtThread(){await this.eventBus.fireAndAwait(new A.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:this.languageId,encoding:this.encoding,eol:this.eol,dirty:this.dirty}))}async save(I=!1,D=u.SaveReason.Manual){if(!this.dirty)return await this.syncDocumentModelToExtThread(),!1;const T=await this.contentRegistry.getProvider(this.uri);if(await T?.isReadonly(this.uri))return!1;const M=async(O=!1,x=u.SaveReason.Manual)=>{if(await this.formatOnSave(x),await this.eventBus.fireAndAwait(new A.EditorDocumentModelWillSaveEvent({uri:this.uri,reason:x,language:this.languageId,dirty:this.dirty})),this.editorPreferences["editor.askIfDiff"]||(O=!0),!this.dirty)return!1;const k=this.monacoModel.getVersionId(),F=this.savingTasks[this.savingTasks.length-1];if(F&&F.versionId===k){F.cancel();const U=this.savingTasks.pop();U?.dispose()}const L=new b.SaveTask(this.uri,k,this.monacoModel.getAlternativeVersionId(),this.getText(),O);this.savingTasks.push(L),this.savingTasks.length>0&&this.initSave();const N=await L.finished;if(N.state===v.SaveTaskResponseState.SUCCESS)return this.monacoModel.pushStackElement(),!0;if(N.state===v.SaveTaskResponseState.ERROR)return N.errorMessage!=="cancel"&&(this.logger.error(N.errorMessage),this.messageService.error((0,v.localize)("doc.saveError.failed")+`
33908
33908
  `+N.errorMessage)),!1;if(N.state===v.SaveTaskResponseState.DIFF){const U=(0,v.localize)("doc.saveError.diffAndSave"),W=(0,v.localize)("doc.saveError.overwrite");return this.messageService.error((0,v.formatLocalize)("doc.saveError.diff",this.uri.toString()),[U,W]).then(j=>{j===U?this.compareAndSave():j===W&&M(!0,x)}),this.logger.error("The file cannot be saved, the version is inconsistent with the disk"),!1}return!1};return this.saveQueue.queue(M.bind(this,I,D))}async compareAndSave(){const I=v.URI.from({scheme:A.ORIGINAL_DOC_SCHEME,query:v.URI.stringifyQuery({target:this.uri.toString()})}),D=this.uri.path.base,T=await this.compareService.compare(I,this.uri,(0,v.formatLocalize)("editor.compareAndSave.title",D,D));T===c.CompareResult.revert?this.revert():T===c.CompareResult.accept&&this.save(!0)}async initSave(){for(;this.savingTasks.length>0;){const I=this.dirtyChanges;this.dirtyChanges=[];const D=await this.savingTasks[0].run(this.service,this.baseContent,I,this.encoding,this.eol);D.state==="success"&&this.savingTasks[0]?(this.baseContent=this.savingTasks[0].content,this.eventBus.fire(new A.EditorDocumentModelSavedEvent(this.uri)),this.setPersist(this.savingTasks[0].alternativeVersionId)):(D.state==="error"&&this.eventBus.fire(new A.EditorDocumentModelSaveErrorEvent({uri:this.uri,errorMessage:D.errorMessage})),this.dirtyChanges.unshift(...I)),this.savingTasks.shift()}}setPersist(I){this._persistVersionId=I,this.notifyChangeEvent([],!1,!1)}async reload(){try{const I=await this.contentRegistry.getContentForUri(this.uri,this._encoding);(0,v.isUndefinedOrNull)(I)||this.cleanAndUpdateContent(I)}catch{this._persistVersionId=this.monacoModel.getAlternativeVersionId()}}async revert(I){I?this._persistVersionId=this.monacoModel.getAlternativeVersionId():await this.updateEncoding(this._originalEncoding)}getText(I){return I?this.monacoModel.getValueInRange(I):this.monacoModel.getValue()}updateContent(I,D,T=!1){D&&(this.eol=D);const R=this.eol===`\r
@@ -33996,7 +33996,7 @@ Tokenizing line: ${R}`);for(let W=0;W<N.tokens.length;W++){const j=N.tokens[W];U
33996
33996
 
33997
33997
  `),this}appendMarkdown(s){return this.value+=s,this}appendCodeblock(s,h){return this.value+="\n```",this.value+=s,this.value+=`
33998
33998
  `,this.value+=h,this.value+="\n```\n",this}}t.MarkdownString=v;function _(p){return p instanceof v?!0:p&&typeof p=="object"?typeof p.value=="string"&&(typeof p.isTrusted=="boolean"||p.isTrusted===void 0)&&(typeof p.supportThemeIcons=="boolean"||p.supportThemeIcons===void 0):!1}function m(p){const s=[],h=p.split("|").map(g=>g.trim());p=h[0];const a=h[1];if(a){const g=/height=(\d+)/.exec(a),d=/width=(\d+)/.exec(a),u=g?g[1]:"",E=d?d[1]:"",f=isFinite(parseInt(E,10)),c=isFinite(parseInt(u,10));f&&s.push(`width="${E}"`),c&&s.push(`height="${u}"`)}return{href:p,dimensions:s}}},53886:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(84811),t),n.__exportStar(e(38677),t),n.__exportStar(e(32112),t),n.__exportStar(e(58063),t),n.__exportStar(e(3484),t),n.__exportStar(e(84569),t),n.__exportStar(e(92771),t),n.__exportStar(e(87330),t),n.__exportStar(e(37070),t),n.__exportStar(e(32504),t),n.__exportStar(e(78941),t),n.__exportStar(e(69403),t)},32112:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},69403:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OverviewRulerLane=void 0;var e;(function(n){n[n.Left=1]="Left",n[n.Center=2]="Center",n[n.Right=4]="Right",n[n.Full=7]="Full"})(e||(t.OverviewRulerLane=e={}))},58063:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3484:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92771:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},51418:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},73294:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50288:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},37846:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.knownProtocols=void 0;const n=e(11431),r=e(46147);t.knownProtocols=new Map,t.knownProtocols.set(r.ExtHostAPIIdentifier.ExtHostDocuments,n.ExtensionDocumentProtocol)},35250:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectIdentifier=void 0;var e;(function(n){n.name="$ident";function r(l,v){return Object.defineProperty(l,n.name,{value:v,enumerable:!0}),l}n.mixin=r;function o(l){return l[n.name]}n.of=o})(e||(t.ObjectIdentifier=e={}))},16363:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},70858:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLittleEndian=v,t.encodeSemanticTokensDto=_,t.decodeSemanticTokensDto=p;function e(s){for(let h=0,a=s.length;h<a;h+=4){const g=s[h+0],d=s[h+1],u=s[h+2],E=s[h+3];s[h+0]=E,s[h+1]=u,s[h+2]=d,s[h+3]=g}}function n(s){const h=new Uint8Array(s.buffer,s.byteOffset,s.length*4);return v()||e(h),h}function r(s){const h=s;if(v()||e(h),h.byteOffset%4===0)return new Uint32Array(h.buffer,h.byteOffset,h.length/4);{const a=new Uint8Array(h.byteLength);return a.set(h),new Uint32Array(a.buffer,a.byteOffset,a.length/4)}}let o=!0,l=!1;function v(){if(!l){l=!0;const s=new Uint8Array(2);s[0]=1,s[1]=2,o=new Uint16Array(s.buffer)[0]===513}return o}function _(s){const h=new Uint32Array(m(s));let a=0;if(h[a++]=s.id,s.type==="full")h[a++]=1,h[a++]=s.data.length,h.set(s.data,a),a+=s.data.length;else{h[a++]=2,h[a++]=s.deltas.length;for(const g of s.deltas)h[a++]=g.start,h[a++]=g.deleteCount,g.data?(h[a++]=g.data.length,h.set(g.data,a),a+=g.data.length):h[a++]=0}return n(h)}function m(s){let h=0;if(h+=2,s.type==="full")h+=1+s.data.length;else{h+=1,h+=3*s.deltas.length;for(const a of s.deltas)a.data&&(h+=a.data.length)}return h}function p(s){const h=r(s);let a=0;const g=h[a++];if(h[a++]===1){const f=h[a++],c=h.subarray(a,a+f);return a+=f,{id:g,type:"full",data:c}}const u=h[a++],E=[];for(let f=0;f<u;f++){const c=h[a++],y=h[a++],b=h[a++];let A;b>0&&(A=h.subarray(a,a+b),a+=b),E[f]={start:c,deleteCount:y,data:A}}return{id:g,type:"delta",deltas:E}}},29490:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89225:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startsWith=e,t.endsWith=n,t.isLowerAsciiLetter=r,t.isUpperAsciiLetter=o,t.equalsIgnoreCase=v,t.escapeRegExpCharacters=m,t.startsWithIgnoreCase=p;function e(s,h){if(s.length<h.length)return!1;if(s===h)return!0;for(let a=0;a<h.length;a++)if(s[a]!==h[a])return!1;return!0}function n(s,h){const a=s.length-h.length;return a>0?s.indexOf(h,a)===a:a===0?s===h:!1}function r(s){return s>=97&&s<=122}function o(s){return s>=65&&s<=90}function l(s){return r(s)||o(s)}function v(s,h){const a=s?s.length:0,g=h?h.length:0;return a!==g?!1:_(s,h)}function _(s,h,a=s.length){if(typeof s!="string"||typeof h!="string")return!1;for(let g=0;g<a;g++){const d=s.charCodeAt(g),u=h.charCodeAt(g);if(d!==u){if(l(d)&&l(u)){const E=Math.abs(d-u);if(E!==0&&E!==32)return!1}else if(String.fromCharCode(d).toLowerCase()!==String.fromCharCode(u).toLowerCase())return!1}}return!0}function m(s){return s.replace(/[-\\{}*+?|^$.[\]()#]/g,"\\$&")}function p(s,h){const a=h.length;return h.length>s.length?!1:_(s,h,a)}},54741:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskFilterDTO=void 0;var e;(function(n){function r(l){return l}n.from=r;function o(l){if(l)return Object.assign(Object.create(null),l)}n.to=o})(e||(t.TaskFilterDTO=e={}))},25535:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},54056:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestItemRootImpl=t.TestItemImpl=t.MixedTestItemController=t.InvalidTestItemError=t.DuplicateTestItemError=t.diffTestItems=t.getPrivateApiFor=t.createPrivateApiFor=void 0;const e=new WeakMap,n=(E,f)=>{const c={controllerId:f};return e.set(E,c),c};t.createPrivateApiFor=n;const r=E=>e.get(E);t.getPrivateApiFor=r;const o=(E,f,c,y)=>{let b=c;return{enumerable:!0,configurable:!1,get(){return b},set(A){var S;if(!y(b,A)){const w=b;b=A,(S=E.listener)===null||S===void 0||S.call(E,{op:3,key:f,value:A,previous:w})}}}},l=(E,f)=>E===f,v={range:(E,f)=>E===f?!0:!E||!f?!1:E.isEqual(f),label:l,description:l,sortText:l,busy:l,error:l,canResolveChildren:l,tags:(E,f)=>!(E.length!==f.length||E.some(c=>!f.find(y=>c.id===y.id)))},_=Object.keys(v),m=(E,f)=>({range:o(E,"range",void 0,v.range),label:o(E,"label",f,v.label),description:o(E,"description",void 0,v.description),sortText:o(E,"sortText",void 0,v.sortText),canResolveChildren:o(E,"canResolveChildren",!1,v.canResolveChildren),busy:o(E,"busy",!1,v.busy),error:o(E,"error",void 0,v.error),tags:o(E,"tags",[],v.tags)}),p=(E,f)=>{const c=new Map;for(const y of _){const b=v[y];b(E[y],f[y])||c.set(y,f[y])}return c};t.diffTestItems=p;class s extends Error{constructor(f){super(`Attempted to insert a duplicate test item ID ${f}`)}}t.DuplicateTestItemError=s;class h extends Error{constructor(f){super(`TestItem with ID "${f}" is invalid. Make sure to create it from the createTestItem method.`)}}t.InvalidTestItemError=h;class a extends Error{constructor(f,c,y){super(`TestItem with ID "${f}" is from controller "${c}" and cannot be added as a child of an item from controller "${y}".`)}}t.MixedTestItemController=a;const g=E=>{const f=(0,t.getPrivateApiFor)(E);let c=new Map;return{get size(){return c.size},forEach(y,b){for(const A of c.values())y.call(b,A,this)},replace(y){var b;const A=new Map,S=new Set(c.keys()),w={op:4,ops:[]};for(const I of y){if(!(I instanceof d))throw new h(I.id);const D=(0,t.getPrivateApiFor)(I).controllerId;if(D!==f.controllerId)throw new a(I.id,D,f.controllerId);if(A.has(I.id))throw new s(I.id);A.set(I.id,I),S.delete(I.id),w.ops.push({op:0,item:I})}for(const I of S.keys())w.ops.push({op:1,id:I});(b=f.listener)===null||b===void 0||b.call(f,w),c=A},add(y){var b;if(!(y instanceof d))throw new h(y.id);c.set(y.id,y),(b=f.listener)===null||b===void 0||b.call(f,{op:0,item:y})},delete(y){var b;c.delete(y)&&((b=f.listener)===null||b===void 0||b.call(f,{op:1,id:y}))},get(y){return c.get(y)},toJSON(){return Array.from(c.values())},[Symbol.iterator](){return c.values()}}};class d{constructor(f,c,y,b){if(c.includes("\0"))throw new Error(`Test IDs may not include the ${JSON.stringify(c)} symbol`);const A=(0,t.createPrivateApiFor)(this,f);Object.defineProperties(this,{id:{value:c,enumerable:!0,writable:!1},uri:{value:b,enumerable:!0,writable:!1},parent:{enumerable:!1,get(){return A.parent instanceof u?void 0:A.parent}},children:{value:g(this),enumerable:!0,writable:!1},...m(A,y)})}invalidateResults(){var f,c;(c=(f=(0,t.getPrivateApiFor)(this)).listener)===null||c===void 0||c.call(f,{op:2})}}t.TestItemImpl=d;class u extends d{constructor(f,c){super(f,f,c,void 0)}}t.TestItemRootImpl=u},82086:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4809:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86162:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeviewsService=t.ITreeViewsService=t.TreeViewSelection=t.TreeViewItem=t.TreeItemCheckboxState=void 0;var e;(function(l){l[l.Unchecked=0]="Unchecked",l[l.Checked=1]="Checked"})(e||(t.TreeItemCheckboxState=e={}));class n{}t.TreeViewItem=n;var r;(function(l){function v(_){return!!_&&typeof _=="object"&&"treeViewId"in _&&"treeItemId"in _}l.is=v})(r||(t.TreeViewSelection=r={})),t.ITreeViewsService=Symbol("ITreeViewsService");class o{constructor(){this._dragOperations=new Map,this._renderedElements=new Map}removeDragOperationTransfer(v){if(v&&this._dragOperations.has(v)){const _=this._dragOperations.get(v);return this._dragOperations.delete(v),_}}addDragOperationTransfer(v,_){this._dragOperations.set(v,_)}getRenderedTreeElement(v){if(this._renderedElements.has(v))return this._renderedElements.get(v)}addRenderedTreeItemElement(v,_){this._renderedElements.set(v,_)}removeRenderedTreeItemElement(v){this._renderedElements.has(v)&&this._renderedElements.delete(v)}}t.TreeviewsService=o},64945:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},43710:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=o,t.mixin=l,t.illegalArgument=v,t.isLocationArray=_,t.isDefinitionLinkArray=m,t.reviveRegExp=p,t.reviveIndentationRule=s,t.reviveOnEnterRule=h,t.reviveOnEnterRules=a,t.serializeEnterRules=g,t.serializeRegExp=d,t.serializeIndentation=u,t.serializeAutoClosingPairs=E;const r=e(85608).__importStar(e(51328));function o(f){return typeof f=="object"&&f!==null&&!Array.isArray(f)&&!(f instanceof RegExp)&&!(f instanceof Date)}function l(f,c,y=!0){return o(f)?(o(c)&&Object.keys(c).forEach(b=>{b in f?y&&(o(f[b])&&o(c[b])?l(f[b],c[b],y):f[b]=c[b]):f[b]=c[b]}),f):c}function v(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}function _(f){return Array.isArray(f)&&f.length>0&&f[0]instanceof r.Location}function m(f){return Array.isArray(f)&&f.length>0&&f[0].hasOwnProperty("targetUri")&&f[0].hasOwnProperty("targetRange")}function p(f){if(!(typeof f>"u"||f===null))return new RegExp(f.pattern,f.flags)}function s(f){if(!(typeof f>"u"||f===null))return{increaseIndentPattern:p(f.increaseIndentPattern),decreaseIndentPattern:p(f.decreaseIndentPattern),indentNextLinePattern:p(f.indentNextLinePattern),unIndentedLinePattern:p(f.unIndentedLinePattern)}}function h(f){return{beforeText:p(f.beforeText),afterText:p(f.afterText),action:f.action,previousLineText:p(f.previousLineText)}}function a(f){if(!(typeof f>"u"||f===null))return f.map(h)}function g(f){if(!(typeof f>"u"||f===null))return f.map(c=>({action:c.action,beforeText:d(c.beforeText),afterText:d(c.afterText),previousLineText:d(c.previousLineText)}))}function d(f){if(!(typeof f>"u"||f===null))return{pattern:f.source,flags:(f.global?"g":"")+(f.ignoreCase?"i":"")+(f.multiline?"m":"")}}function u(f){if(!(typeof f>"u"||f===null))return{increaseIndentPattern:d(f.increaseIndentPattern),decreaseIndentPattern:d(f.decreaseIndentPattern),indentNextLinePattern:d(f.indentNextLinePattern),unIndentedLinePattern:d(f.unIndentedLinePattern)}}function E(f){if(f)return f.map(c=>({open:c.open,close:c.close,notIn:c.notIn?c.notIn.map(y=>r.SyntaxTokenType.toString(y)):void 0}))}},96833:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98116:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebviewViewResolverRegistrationRemovalEvent=t.WebviewViewResolverRegistrationEvent=void 0;const n=e(43718);class r extends n.BasicEvent{}t.WebviewViewResolverRegistrationEvent=r;class o extends n.BasicEvent{}t.WebviewViewResolverRegistrationRemovalEvent=o},55467:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92622:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationTarget=void 0,t.reviveWorkspaceEditDto=o;const n=e(43718);var r;(function(l){l[l.Global=1]="Global",l[l.Workspace=2]="Workspace",l[l.WorkspaceFolder=3]="WorkspaceFolder"})(r||(t.ConfigurationTarget=r={}));function o(l){if(l&&l.edits)for(const v of l.edits)if(typeof v.resource=="object")v.resource=n.URI.from(v.resource),v.options={openDirtyInEditor:!0},v.textEdit=v.textEdit,v.versionId=v.versionId;else{const _=v;_.newResource=v.newResource?n.URI.from(v.newResource):void 0,_.oldResource=v.oldResource?n.URI.from(v.oldResource):void 0,_.options={..._.options,showInEditor:!1}}return l}},57646:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryEditorComponent=void 0;const r=e(85608).__importDefault(e(14041)),o=e(76003),l=e(41869),v=e(37406),_=e(57517),m=e(88819),p=s=>{const h=s.resource.uri.codeUri.fsPath,a=(0,l.useInjectable)(o.INJECTOR_TOKEN),g=(0,l.useInjectable)(l.AppConfig),d=(0,l.useInjectable)(_.WorkbenchEditorService),u=(0,l.useInjectable)(l.IEventBus),E=()=>{const c=d.currentResource;c&&(c.metadata={...c.metadata,skipPreventBinary:!0},u.fire(new _.ResourceOpenTypeChangedEvent(c.uri)))},f=[{label:(0,l.localize)("editor.file.prevent.stillOpen"),onClick:()=>E()}];return g.isElectronRenderer&&f.push({label:(0,l.localize)("editor.openExternal"),onClick:()=>a.get(v.IElectronMainUIService).openPath(h)}),r.default.createElement(m.PreventComponent,{description:(0,l.localize)("editor.cannotOpenBinary"),actions:f})};t.BinaryEditorComponent=p},60387:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalkThroughSnippetSchemeDocumentProvider=t.VscodeSchemeDocumentProvider=t.FileSchemeDocumentProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(96405),v=e(68692),_=e(14951),m=e(80449);let p=class extends v.BaseFileSystemEditorDocumentProvider{handlesUri(g){return g.scheme===o.Schemes.file?20:-1}handlesScheme(){return!1}provideEncoding(g){return super.provideEncoding(g)}preferLanguageForUri(g){if(["settings.json"].includes(g.path.base))return"jsonc"}async saveDocumentModel(g,d,u,E,f,c=!1,y=`
33999
- `,b){const A=this.hashCalculateService.calculate(u);if(d.length>m.FILE_SAVE_BY_CHANGE_THRESHOLD){const S=await this.fileSchemeDocClient.saveByChange(g.toString(),{baseMd5:A,changes:E,eol:y},f,c,b);return S.state===o.SaveTaskResponseState.ERROR&&S.errorMessage==="useByContent"?await this.fileSchemeDocClient.saveByContent(g.toString(),{baseMd5:A,content:d},f,c,b):S}else return await this.fileSchemeDocClient.saveByContent(g.toString(),{baseMd5:A,content:d},f,c,b)}async provideEditorDocumentModelContentMd5(g,d){return this.fileSchemeDocClient.getMd5(g.toString(),d)}};t.FileSchemeDocumentProvider=p,n.__decorate([(0,r.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],p.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(m.IFileSchemeDocClient),n.__metadata("design:type",Object)],p.prototype,"fileSchemeDocClient",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(l.IHashCalculateService),n.__metadata("design:type",Object)],p.prototype,"hashCalculateService",void 0),t.FileSchemeDocumentProvider=p=n.__decorate([(0,r.Injectable)()],p);let s=class{constructor(){this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event,this.listeners={}}isReadonly(g){return!0}handlesScheme(g){return g==="vscode"}async provideEditorDocumentModelContent(g,d){return this.getSchemaContent(g)}getSchemaContent(g){const d=g.toString(),u=this.jsonRegistry.getSchemaContributions().schemas[d];if(u){const E=JSON.stringify(u);if(!this.listeners[d]){const f=o.Disposable.create(()=>{this.jsonRegistry.onDidChangeSchema(c=>{c===d&&this._onDidChangeContent.fire(g)})});this.listeners[d]=f}return E}return"{}"}onDidDisposeModel(g){g.toString()&&(this.listeners[g.toString()].dispose(),delete this.listeners[g.toString()])}};t.VscodeSchemeDocumentProvider=s,n.__decorate([(0,r.Autowired)(o.ISchemaStore),n.__metadata("design:type",Object)],s.prototype,"schemaStore",void 0),n.__decorate([(0,r.Autowired)(o.IJSONSchemaRegistry),n.__metadata("design:type",Object)],s.prototype,"jsonRegistry",void 0),t.VscodeSchemeDocumentProvider=s=n.__decorate([(0,r.Injectable)()],s);let h=class{constructor(){this.documentContentMaps=new Map,this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(g){return g===o.Schemes.walkThroughSnippet}provideEditorDocumentModelContent(g,d){return this.documentContentMaps.has(g.toString())||this.documentContentMaps.set(g.toString(),""),this.documentContentMaps.get(g.toString())}isReadonly(){return!1}preferLanguageForUri(){return"plaintext"}};t.WalkThroughSnippetSchemeDocumentProvider=h,t.WalkThroughSnippetSchemeDocumentProvider=h=n.__decorate([(0,r.Injectable)()],h)},41352:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSchemeDocClientService=void 0;const n=e(85608),r=e(76003),o=e(80449);let l=class{saveByChange(_,m,p,s,h){return this.fileDocBackendService.$saveByChange(_,m,p,s,h)}saveByContent(_,m,p,s,h){return this.fileDocBackendService.$saveByContent(_,m,p,s,h)}getMd5(_,m){return this.fileDocBackendService.$getMd5(_,m)}};t.FileSchemeDocClientService=l,n.__decorate([(0,r.Autowired)(o.FileSchemeDocNodeServicePath),n.__metadata("design:type",Object)],l.prototype,"fileDocBackendService",void 0),t.FileSchemeDocClientService=l=n.__decorate([(0,r.Injectable)()],l)},17276:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemEditorComponentContribution=t.FileSystemEditorResourceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),v=e(57517),_=e(17878),m=e(42933),p=e(57646),s=e(60387),h=e(88819),a=e(99025),g="video-preview",d="image-preview",u="external-file",E="large-file-prevent";let f=class{registerResource(b){b.registerResourceProvider(this.untitledResourceProvider)}registerEditorDocumentModelContentProvider(b){b.registerEditorDocumentModelContentProvider(this.fileSchemeDocumentProvider),b.registerEditorDocumentModelContentProvider(this.vscodeSchemeDocumentProvider),b.registerEditorDocumentModelContentProvider(this.walkThroughSnippetSchemeDocumentProvider),b.registerEditorDocumentModelContentProvider(this.untitledSchemeDocumentProvider)}};t.FileSystemEditorResourceContribution=f,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.FileSchemeDocumentProvider)],f.prototype,"fileSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.VscodeSchemeDocumentProvider)],f.prototype,"vscodeSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.WalkThroughSnippetSchemeDocumentProvider)],f.prototype,"walkThroughSnippetSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",_.UntitledSchemeResourceProvider)],f.prototype,"untitledResourceProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",_.UntitledSchemeDocumentProvider)],f.prototype,"untitledSchemeDocumentProvider",void 0),t.FileSystemEditorResourceContribution=f=n.__decorate([(0,o.Domain)(v.BrowserEditorContribution)],f);let c=class{constructor(){this.cachedFileType=new o.LRUMap(200,100),this.fileServiceClient.onFilesChanged(b=>{b.forEach(A=>{this.cachedFileType.delete(A.uri.toString())})})}registerEditorComponent(b){b.registerEditorComponent({component:a.ImagePreview,uid:d,scheme:o.Schemes.file}),b.registerEditorComponent({component:a.VideoPreview,uid:g,scheme:o.Schemes.file}),b.registerEditorComponent({component:p.BinaryEditorComponent,uid:u,scheme:o.Schemes.file}),b.registerEditorComponent({component:h.LargeFilePrevent,uid:E,scheme:o.Schemes.file}),b.registerEditorComponentResolver(A=>A===o.Schemes.file||this.fileServiceClient.handlesScheme(A)?10:-1,(A,S)=>{S.length===0&&S.push({type:v.EditorOpenType.component,componentId:u})}),b.registerEditorComponentResolver(A=>A===o.Schemes.file||this.fileServiceClient.handlesScheme(A)?10:-1,async(A,S)=>{const w=await this.getFileType(A.uri.toString());switch(w){case"image":{S.push({type:v.EditorOpenType.component,componentId:d});break}case"video":{S.push({type:v.EditorOpenType.component,componentId:g});break}case"binary":case"text":{const{metadata:I,uri:D}=A,T=I||{};if(w==="binary"&&!T.skipPreventBinary)break;const R=await this.fileServiceClient.getFileStat(D.toString());await this.preference.ready;const M=this.preference.getValid("editor.largeFile",4*1024*1024*1024);R&&(R.size||0)>M&&!T.skipPreventTooLarge?S.push({type:v.EditorOpenType.component,componentId:E}):S.push({type:v.EditorOpenType.code,title:(0,o.localize)("editorOpenType.code")});break}}}),b.registerEditorComponentResolver(o.Schemes.untitled,(A,S,w)=>{w([{type:v.EditorOpenType.code,priority:"default"}])})}async getFileType(b){return this.cachedFileType.has(b)||((0,l.getLanguageIdFromMonaco)(new o.URI(b))?this.cachedFileType.set(b,"text"):this.cachedFileType.set(b,await this.getRealFileType(b))),this.cachedFileType.get(b)}async getRealFileType(b){try{return await this.fileServiceClient.getFileType(b)}catch{return"text"}}};t.FileSystemEditorComponentContribution=c,n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],c.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],c.prototype,"preference",void 0),t.FileSystemEditorComponentContribution=c=n.__decorate([(0,o.Domain)(v.BrowserEditorContribution),n.__metadata("design:paramtypes",[])],c)},52568:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSchemeModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(80449),v=e(41352),_=e(17276);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[_.FileSystemEditorResourceContribution,_.FileSystemEditorComponentContribution,{token:l.IFileSchemeDocClient,useClass:v.FileSchemeDocClientService}],this.backServices=[{servicePath:l.FileSchemeDocNodeServicePath}]}};t.FileSchemeModule=m,t.FileSchemeModule=m=n.__decorate([(0,r.Injectable)()],m)},88819:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LargeFilePrevent=t.PreventComponent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(41869),v=e(81878),_=e(54414),m=e(82196),p=n.__importDefault(e(19996)),s=a=>o.default.createElement("div",{className:p.default["error-page"]},o.default.createElement("div",{className:(0,r.default)(p.default.icon,(0,l.getExternalIcon)("warning"))}),o.default.createElement("div",{className:p.default.description},a.description),o.default.createElement("div",{className:p.default["actions-wrapper"]},a.actions.map((g,d)=>o.default.createElement(v.Button,{key:d,onClick:()=>g.onClick(),className:p.default["action-button"]},g.label))));t.PreventComponent=s;const h=()=>{const a=(0,l.useInjectable)(_.WorkbenchEditorService),g=(0,l.useInjectable)(l.IEventBus),d=()=>{const u=a.currentResource;u&&(u.metadata={...u.metadata,skipPreventTooLarge:!0},g.fire(new m.ResourceOpenTypeChangedEvent(u.uri)))};return o.default.createElement(t.PreventComponent,{description:(0,l.localize)("editor.largeFile.prevent"),actions:[{label:(0,l.localize)("editor.file.prevent.stillOpen"),onClick:()=>d()}]})};t.LargeFilePrevent=h},99025:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImagePreview=t.VideoPreview=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),l=e(40827),v=e(14951),_=n.__importDefault(e(19996)),m=h=>{const a=(0,o.useInjectable)(v.IFileServiceClient),[g,d]=r.default.useState(0);return r.default.useEffect(()=>{const u=a.onImageFilesChanged(E=>{E.some(c=>(typeof c.uri=="string"?new o.URI(c.uri):c.uri).isEqual(h.uri))&&d(c=>c+1)});return()=>u.dispose()},[h.uri,a]),{fileChanged:g}},p=h=>{const a=(0,o.useInjectable)(l.StaticResourceService);return{src:r.default.useMemo(()=>a.resolveStaticResource(h.uri).toString(),[h])}};t.VideoPreview=(0,r.memo)(h=>{const{src:a}=p(h.resource);return r.default.createElement("div",{className:_.default.kt_video_preview},r.default.createElement("video",{playsInline:!0,controls:!0,className:_.default.kt_video,src:a}))});const s=h=>{const a=r.default.useRef(),g=r.default.useRef(),{src:d}=p(h.resource),{fileChanged:u}=m(h.resource);return r.default.useEffect(()=>{const E=new o.Disposable;if(a.current)try{const f=new URL(d);f.searchParams.set("_t",u.toString()),a.current.src=f.href}catch{a.current.src=d}return()=>{E.dispose()}},[d,u]),r.default.createElement("div",{className:_.default.kt_image_preview},r.default.createElement("div",{ref:g},r.default.createElement("img",{ref:E=>E&&(a.current=E)})))};t.ImagePreview=s},80449:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeType=t.FileSchemeDocNodeServicePath=t.IFileSchemeDocNodeService=t.IFileSchemeDocClient=t.FILE_SAVE_BY_CHANGE_THRESHOLD=t.FILE_ON_DISK_SCHEME=void 0,t.FILE_ON_DISK_SCHEME="fileOnDisk",t.FILE_SAVE_BY_CHANGE_THRESHOLD=1e5,t.IFileSchemeDocClient=Symbol("IFileSchemeDocClient"),t.IFileSchemeDocNodeService=Symbol("FileSchemeDocNodeService"),t.FileSchemeDocNodeServicePath="FileSchemeDocNodeService";var e;(function(n){n[n.ADDED=1]="ADDED",n[n.REMOVED=2]="REMOVED"})(e||(t.ChangeType=e={}))},15625:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFileSearchService=t.FileSearchServicePath=void 0,t.FileSearchServicePath="FileSearchServicePath",t.IFileSearchService=Symbol("FileSearchService")},84660:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(15625),t)},47720:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(84660),t)},2156:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceClient=t.BrowserFileSystemRegistryImpl=void 0;const n=e(85608),r=e(32852),o=e(76003),l=e(41869),v=e(43718),_=e(37406),m=e(8170),p=e(93062),s=e(41682),h=e(42933),a=e(91813),g=e(81952);let d=class{constructor(){this.providers=new Map}registerFileSystemProvider(f){const c=f.scheme;return this.providers.set(c,f),{dispose:()=>{this.providers.delete(c)}}}};t.BrowserFileSystemRegistryImpl=d,t.BrowserFileSystemRegistryImpl=d=n.__decorate([(0,o.Injectable)()],d);let u=class{get clientId(){return this.applicationService.clientId}constructor(){this.watcherWithSchemaMap=new Map,this.watcherDisposerMap=new Map,this.onFileChangedEmitter=new l.Emitter,this.onFileProviderChangedEmitter=new l.Emitter,this._onFilesChanged=new l.Emitter,this.onFilesChanged=this._onFilesChanged.event,this._onWatcherOverflow=new l.Emitter,this.onWatcherOverflow=this._onWatcherOverflow.event,this._onWatcherFailed=new l.Emitter,this.onWatcherFailed=this._onWatcherFailed.event,this._onImageFilesChanged=new l.Emitter,this.onImageFilesChanged=this._onImageFilesChanged.event,this._onFileProviderChanged=new l.Emitter,this.onFileProviderChanged=this._onFileProviderChanged.event,this._onDidChangeFileSystemProviderRegistrations=new l.Emitter,this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=new l.Emitter,this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=new l.Emitter,this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.filesExcludesMatcherList=[],this.watcherId=0,this.toDisposable=new l.DisposableCollection,this.watchFileExcludes=[],this.watchFileExcludesMatcherList=[],this.filesExcludes=[],this.workspaceRoots=[],this._providerChanged=new Set,this.fsProviders=new Map,this.userHomeDeferred=new l.Deferred,this.options={encoding:"utf8",overwrite:!1,recursive:!0,moveToTrash:!0},this.uriWatcherMap=new Map,this.toDisposable.push(this.onDidChangeFileSystemProviderRegistrations(f=>{f.added&&f.scheme===v.Schemes.file&&this.doGetCurrentUserHome()}))}async initialize(){const f=await this.getProvider(v.Schemes.file);f.initialize&&await f.initialize(this.clientId,this.appConfig.recursiveWatcherBackend)}async doGetCurrentUserHome(){const c=(await this.getProvider(v.Schemes.file)).getCurrentUserHome();this.userHomeDeferred.resolve(c)}handlesScheme(f){return this.registry.providers.has(f)||this.fsProviders.has(f)}dispose(){return this._onImageFilesChanged.dispose(),this.toDisposable.dispose()}async resolveContent(f,c){const y=this.convertUri(f),A=await(await this.getProvider(y.scheme)).readFile(y.codeUri),S=A.data||A;return{content:l.BinaryBuffer.wrap(S instanceof Uint8Array?S:Uint8Array.from(S)).toString(c?.encoding)}}async readFile(f){const c=this.convertUri(f),y=await this.getProvider(c.scheme),b=await this.doReadFile(y,c.codeUri),A=b.data||b;return{content:l.BinaryBuffer.wrap(A instanceof Uint8Array?A:Uint8Array.from(A))}}async readFileStream(f){const c=this.convertUri(f);return await(await this.getProvider(c.scheme)).readFileStream(c.codeUri)}async getFileStat(f,c=!0){const y=this.convertUri(f),b=await this.getProvider(y.scheme);try{const A=await b.stat(y.codeUri);if(!A)throw h.FileSystemError.FileNotFound(y.codeUri.toString(),"File not found.");return this.filterStat(A,c)}catch(A){if(h.FileSystemError.FileNotFound.is(A))return}}async setContent(f,c,y){const b=this.convertUri(f.uri),A=await this.getProvider(b.scheme),S=await A.stat(b.codeUri);if(!S)throw h.FileSystemError.FileNotFound(f.uri,"File not found.");if(S.isDirectory)throw h.FileSystemError.FileIsADirectory(f.uri,"Cannot set the content.");if(!await this.isInSync(f,S))throw this.createOutOfSyncError(f);return await A.writeFile(b.codeUri,typeof c=="string"?l.BinaryBuffer.fromString(c).buffer:c,{create:!1,overwrite:!0,encoding:y?.encoding}),await A.stat(b.codeUri)}async updateContent(f,c,y){const b=this.convertUri(f.uri),A=await this.getProvider(b.scheme),S=await A.stat(b.codeUri);if(!S)throw h.FileSystemError.FileNotFound(f.uri,"File not found.");if(S.isDirectory)throw h.FileSystemError.FileIsADirectory(f.uri,"Cannot set the content.");if(!this.checkInSync(f,S))throw this.createOutOfSyncError(f);if(c.length===0)return S;const w=await A.readFile(b.codeUri),I=this.applyContentChanges(l.BinaryBuffer.wrap(w).toString(y?.encoding),c);await A.writeFile(b.codeUri,l.BinaryBuffer.fromString(I).buffer,{create:!1,overwrite:!0,encoding:y?.encoding});const D=await A.stat(b.codeUri);if(!D)throw h.FileSystemError.FileNotFound(b.codeUri.toString(),"File not found.");return D}async createFile(f,c){const y=this.convertUri(f),b=await this.getProvider(y.scheme),A=l.BinaryBuffer.fromString(c?.content||"").buffer;let S=await b.writeFile(y.codeUri,A,{create:!0,overwrite:c&&c.overwrite||!1,encoding:c?.encoding});return S=S||await b.stat(y.codeUri),S}async createFolder(f){const c=this.convertUri(f),y=await this.getProvider(c.scheme),b=await y.createDirectory(c.codeUri);return b||await y.stat(c.codeUri)}async move(f,c,y){const b=this.convertUri(f),A=this.convertUri(c),S=await this.getProvider(b.scheme),w=await S.rename(b.codeUri,A.codeUri,{overwrite:!!(y&&y.overwrite)});return w||await S.stat(A.codeUri)}async copy(f,c,y){const b=this.convertUri(f),A=this.convertUri(c),S=await this.getProvider(b.scheme),w=await this.doGetOverwrite(y);if(!(0,h.containsExtraFileMethod)(S,"copy"))throw this.getErrorProvideNotSupport(b.scheme,"copy");const I=await S.copy(b.codeUri,A.codeUri,{overwrite:!!w});return I||await S.stat(A.codeUri)}async getFsPath(f){if(f.startsWith("file:/"))return l.FileUri.fsPath(f)}fireFilesChange(f){const c=f.changes.map(b=>({uri:b.uri,type:b.type}));this._onFilesChanged.fire(c),this.eventBus.fire(new l.FilesChangeEvent(c));const y=c.filter(b=>{var A;const w=(A=new l.URI(b.uri).path.ext)===null||A===void 0?void 0:A.toLowerCase().replace(".","");return w&&a.EXT_LIST_IMAGE.has(w)});y.length>0&&this._onImageFilesChanged.fire(y)}fireWatcherOverflow(f){this._onWatcherOverflow.fire(f),this.eventBus.fire(new l.FileWatcherOverflowEvent(f))}fireWatcherFailed(f){this._onWatcherFailed.fire(f),this.eventBus.fire(new l.FileWatcherFailureEvent(f))}async watchFileChanges(f,c){const b=(this.appConfig.pollingWatcherDirectories||[]).some(M=>f.path.toString().startsWith(M)),A=this.convertUri(f.toString());let S=0;const w=await this.getProvider(A.scheme),I=this.watcherWithSchemaMap.get(A.scheme)||[];let D;if(this.uriWatcherMap.has(A.toString())){const M=this.uriWatcherMap.get(A.toString());D=M?.watcher,D&&await D.dispose()}D?S=D.watchId:S=this.watcherId++;const T=await w.watch(A.codeUri,{excludes:c,pollingWatch:b});this.watcherDisposerMap.set(S,{dispose:async()=>{const M=this.uriWatcherMap.get(A.toString()),O=M?.watcher;await Promise.all([w.unwatch&&w.unwatch(T),O&&O.dispose()]),this.uriWatcherMap.delete(A.toString())}}),I.push(S),this.watcherWithSchemaMap.set(A.scheme,I);const R=new g.FileSystemWatcher({fileServiceClient:this,watchId:S,uri:f});return this.uriWatcherMap.set(A.toString(),{watcher:R,excludes:c}),R}async setWatchFileExcludes(f){return await(await this.getProvider(v.Schemes.file)).setWatchFileExcludes(f)}async getWatchFileExcludes(){return await(await this.getProvider(v.Schemes.file)).getWatchFileExcludes()}async setFilesExcludes(f,c){this.filesExcludes=f,this.filesExcludesMatcherList=[],c&&this.setWorkspaceRoots(c),this.updateExcludeMatcher()}async setWorkspaceRoots(f){this.workspaceRoots=f,this.updateExcludeMatcher()}async unwatchFileChanges(f){const c=this.watcherDisposerMap.get(f);if(!(!c||!c.dispose))return this.watcherDisposerMap.delete(f),c.dispose()}async delete(f,c){if(this.appConfig.isElectronRenderer&&c?.moveToTrash!==!1){const A=new l.URI(f);if(A.scheme===v.Schemes.file)return this.injector.get(_.IElectronMainUIService).moveToTrash(A.codeUri.fsPath)}const y=this.convertUri(f),b=await this.getProvider(y.scheme);await b.stat(y.codeUri),await b.delete(y.codeUri,{recursive:!0,moveToTrash:await this.doGetMoveToTrash(c)})}async getEncoding(f){return"utf8"}listCapabilities(){return s.Iterable.map(this.fsProviders,([f,c])=>({scheme:f,capabilities:c.capabilities}))}registerProvider(f,c){if(this.fsProviders.has(f))throw new Error(`The file system provider for \`${f}\` already registered`);const y=[];this.fsProviders.set(f,c),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:f,provider:c}),y.push({dispose:()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:f,provider:c}),this.fsProviders.delete(f),this._providerChanged.add(f)}}),c.onDidChangeFile&&y.push(c.onDidChangeFile(A=>this.fireFilesChange({changes:A}))),c.onDidWatcherOverflow&&y.push(c.onDidWatcherOverflow(A=>this.fireWatcherOverflow(A))),c.onDidWatcherFailed&&y.push(c.onDidWatcherFailed(A=>this.fireWatcherFailed(A))),this.toDisposable.push(c.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:c,scheme:f}))),y.push({dispose:async()=>{const A=[];(this.watcherWithSchemaMap.get(f)||[]).forEach(S=>A.push(this.unwatchFileChanges(S))),await Promise.all(A)}}),this._providerChanged.add(f),this.onFileProviderChangedEmitter.fire(Array.from(this._providerChanged)),this.toDisposable.pushAll(y);const b=new l.DisposableCollection;return b.pushAll(y),this._onFileProviderChanged.fire(Array.from(this._providerChanged)),b}async access(f,c=h.FileAccess.Constants.F_OK){const y=this.convertUri(f),b=await this.getProvider(y.scheme);if(!(0,h.containsExtraFileMethod)(b,"access")){if(c===h.FileAccess.Constants.F_OK)try{return!!await b.stat(y.codeUri)}catch{return!1}throw this.getErrorProvideNotSupport(y.scheme,"access")}return await b.access(y.codeUri,c)}async getFileType(f){const c=this.convertUri(f),y=await this.getProvider(c.scheme);if(!(0,h.containsExtraFileMethod)(y,"getFileType"))throw this.getErrorProvideNotSupport(c.scheme,"getFileType");return await y.getFileType(f)}async getCurrentUserHome(){return this.userHomeDeferred.promise}getErrorProvideNotSupport(f,c){return`Scheme ${f} not support this function: ${c}.`}convertUri(f){const c=new l.URI(f);if(!c.scheme)throw new Error(`Unsupported convert Uri with non-scheme Uri: ${f}`);return c}async doReadFile(f,c){var y;if(await this.shouldUseReadStream(f,c)&&f.readFileStream)try{const A=await f.readFileStream(c);return await this.collectReadableStream(A)}catch(A){(y=this.logger)===null||y===void 0||y.warn("[FileServiceClient] readFileStream failed, fallback to readFile.",A)}return await f.readFile(c)}async shouldUseReadStream(f,c){var y;if(!f.readFileStream||!this.isLargeFileStreamEnabled())return!1;const b=this.getLargeFileStreamThreshold();if(!b)return!1;try{const A=await f.stat(c);if(A&&typeof A.size=="number"&&A.size>=b)return!0}catch(A){(y=this.logger)===null||y===void 0||y.warn("[FileServiceClient] stat failed when deciding readFile strategy, fallback to readFile.",A)}return!1}collectReadableStream(f){return new Promise((c,y)=>{const b=[];let A=0;(0,p.listenReadable)(f,{onData:S=>{const w=S instanceof Uint8Array?S:Uint8Array.from(S);b.push(w),A+=w.byteLength},onError:S=>y(S),onEnd:()=>{if(b.length===0){c(new Uint8Array(0));return}if(b.length===1){c(b[0]);return}const S=new Uint8Array(A);let w=0;for(const I of b)S.set(I,w),w+=I.byteLength;c(S)}})})}getLargeFileStreamThreshold(){var f;const c=(f=this.preference)===null||f===void 0?void 0:f.getValid("editor.largeFile",4294967296);if(typeof c=="number"&&c>0)return c}isLargeFileStreamEnabled(){var f;const c=(f=this.preference)===null||f===void 0?void 0:f.getValid("editor.streamLargeFile",!0);return typeof c>"u"?!0:c}updateExcludeMatcher(){this.filesExcludes.forEach(f=>{this.workspaceRoots.length>0?this.workspaceRoots.forEach(c=>{const b=new l.URI(c).resolve(f).path.toString();this.filesExcludesMatcherList.push((0,l.parseGlob)(b))}):this.filesExcludesMatcherList.push((0,l.parseGlob)(f))})}async shouldWaitProvider(f){const c=await this._onWillActivateFileSystemProvider.fireAndAwait({scheme:f}),{result:y}=c[0];if(y&&y.includes(f)){const b=await l.Event.toPromise(l.Event.filter(this.onFileProviderChanged,A=>A.includes(f)));if(!(0,v.isUndefined)(b))return!0}return!1}async getProvider(f){this._providerChanged.has(f)&&(await this.eventBus.fireAndAwait(new l.ExtensionActivateEvent({topic:"onFileSystem",data:f}),{timeout:3e3}),this._providerChanged.delete(f));const c=this.fsProviders.get(f);if(!c)throw new Error(`Not find ${f} provider.`);return c}async isReadonly(f){try{const c=new l.URI(f);return!!(await(await this.getProvider(c.scheme)).stat(this.convertUri(f).codeUri)).readonly}catch{return!1}}isExclude(f){const c=new l.URI(f);return this.filesExcludesMatcherList.some(y=>y(c.path.toString()))}filterStat(f,c=!0){if(f&&!this.isExclude(f.uri))return f.children&&c&&(f.children=this.filterStatChildren(f.children)),f}filterStatChildren(f){const c=[];return f.forEach(y=>{if(this.isExclude(y.uri))return!1;const b=this.filterStat(y);b&&c.push(b)}),c}applyContentChanges(f,c){let y=r.TextDocument.create("","",1,f);for(const b of c){let A=b.text;if(b.range){const S=y.offsetAt(b.range.start),w=y.offsetAt(b.range.end);A=y.getText().substr(0,S)+b.text+y.getText().substr(w)}y=r.TextDocument.create(y.uri,y.languageId,y.version,A)}return y.getText()}async isInSync(f,c){return!!this.checkInSync(f,c)}checkInSync(f,c){return c.lastModification===f.lastModification&&c.size===f.size}createOutOfSyncError(f){return h.FileSystemError.FileIsOutOfSync(f.uri)}async doGetEncoding(f){return f&&typeof f.encoding<"u"?f.encoding:this.options.encoding}async doGetOverwrite(f){return f&&typeof f.overwrite<"u"?f.overwrite:this.options.overwrite}async doGetRecursive(f){return f&&typeof f.recursive<"u"?f.recursive:this.options.recursive}async doGetMoveToTrash(f){return f&&typeof f.moveToTrash<"u"?f.moveToTrash:this.options.moveToTrash}async reconnect(){const f=await this.getProvider(v.Schemes.file);f.initialize&&await f.initialize(this.clientId,this.appConfig.recursiveWatcherBackend);const y=Array.from(this.uriWatcherMap.keys()).map(async b=>{var A;try{const S=new l.URI(b),w=this.uriWatcherMap.get(b);w?.watcher&&await this.watchFileChanges(S,w.excludes)}catch(S){(A=this.logger)===null||A===void 0||A.error("Error reconnecting watcher for:",b,S)}});await Promise.allSettled(y)}};t.FileServiceClient=u,n.__decorate([(0,o.Autowired)(h.IBrowserFileSystemRegistry),n.__metadata("design:type",d)],u.prototype,"registry",void 0),n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],u.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(v.IEventBus),n.__metadata("design:type",Object)],u.prototype,"eventBus",void 0),n.__decorate([(0,o.Autowired)(l.AppConfig),n.__metadata("design:type",Object)],u.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(m.IApplicationService),n.__metadata("design:type",Object)],u.prototype,"applicationService",void 0),n.__decorate([(0,o.Autowired)(v.ILogger),n.__metadata("design:type",Object)],u.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(l.PreferenceService),n.__metadata("design:type",Object)],u.prototype,"preference",void 0),t.FileServiceClient=u=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],u)},69037:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(42933),v=e(2156);let _=class{constructor(){this._disposables=new o.DisposableStore,this._disposables.add(this.fileSystem.registerProvider(o.Schemes.file,this.diskFileServiceProvider))}async initialize(){const p=this.contributionProvider.getContributions();await Promise.all(p.map(async s=>{s.registerProvider&&await s.registerProvider(this.fileSystem)})),await Promise.all(p.map(async s=>{s.onFileServiceReady&&await s.onFileServiceReady()})),this.fileSystem.initialize&&await this.fileSystem.initialize()}onReconnect(){this.fileServiceClient.reconnect().catch(p=>this.logger.error("Failed to reconnect watchers:",p))}dispose(){this._disposables.dispose()}};t.FileServiceContribution=_,n.__decorate([(0,r.Autowired)(l.IFileServiceClient),n.__metadata("design:type",v.FileServiceClient)],_.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(l.IDiskFileProvider),n.__metadata("design:type",Object)],_.prototype,"diskFileServiceProvider",void 0),n.__decorate([(0,r.Autowired)(o.FsProviderContribution),n.__metadata("design:type",Object)],_.prototype,"contributionProvider",void 0),n.__decorate([(0,r.Autowired)(l.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),t.FileServiceContribution=_=n.__decorate([(0,o.Domain)(o.ClientAppContribution),n.__metadata("design:paramtypes",[])],_)},60476:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiskFsProviderClient=t.CoreFileServiceProviderClient=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(42933);class v{constructor(){this.onDidChangeFileEmitter=new o.Emitter,this.onDidChangeFile=this.onDidChangeFileEmitter.event,this.watcherOverflowEmitter=new o.Emitter,this.onDidWatcherOverflow=this.watcherOverflowEmitter.event,this.watcherFailedEmitter=new o.Emitter,this.onDidWatcherFailed=this.watcherFailedEmitter.event}onWatcherOverflow(p){this.watcherOverflowEmitter.fire(p)}onWatcherFailed(p){this.watcherFailedEmitter.fire(p)}watch(p,s){return this.fileServiceProvider.watch(p,s)}unwatch(p){return this.fileServiceProvider.unwatch&&this.fileServiceProvider.unwatch(p)}async stat(p){return await this.fileServiceProvider.stat(p)}readDirectory(p){return this.fileServiceProvider.readDirectory(p)}createDirectory(p){return this.fileServiceProvider.createDirectory(p)}async readFile(p,s){return s&&(0,o.getDebugLogger)("fileService.fsProvider").warn("encoding option for fsProvider.readFile is deprecated"),await this.fileServiceProvider.readFile(p)}readFileStream(p){if(this.fileServiceProvider.readFileStream)return this.fileServiceProvider.readFileStream(p);throw new Error("readFileStream not supported")}writeFile(p,s,h){return this.fileServiceProvider.writeFile(p,Array.from(s),h)}delete(p,s){return this.fileServiceProvider.delete(p,s)}rename(p,s,h){return this.fileServiceProvider.rename(p,s,h)}}t.CoreFileServiceProviderClient=v,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],v.prototype,"injector",void 0);let _=class extends v{constructor(){super(...arguments),this.onDidChangeCapabilities=o.Event.None}get capabilities(){return this._capabilities||(this._capabilities=12318,o.isLinux&&(this._capabilities|=1024)),this._capabilities}async initialize(p,s){var h,a;if(!((h=this.fileServiceProvider)===null||h===void 0)&&h.initialize)try{await((a=this.fileServiceProvider)===null||a===void 0?void 0:a.initialize(p,s))}catch(g){(0,o.getDebugLogger)("fileService.fsProvider").error("initialize error",g)}}setWatchFileExcludes(p){return this.fileServiceProvider.setWatchFileExcludes(p)}getWatchFileExcludes(){return this.fileServiceProvider.getWatchFileExcludes()}onDidFilesChanged(p){const s=p.changes.map(h=>({uri:h.uri,type:h.type}));this.onDidChangeFileEmitter.fire(s)}copy(p,s,h){return this.fileServiceProvider.copy(p,s,h)}access(p,s){return this.fileServiceProvider.access(p,s)}getCurrentUserHome(){return this.fileServiceProvider.getCurrentUserHome()}getFileType(p){return this.fileServiceProvider.getFileType(p)}};t.DiskFsProviderClient=_,n.__decorate([(0,r.Autowired)(l.DiskFileServicePath),n.__metadata("design:type",Object)],_.prototype,"fileServiceProvider",void 0),n.__decorate([(0,o.debounce)(100),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Array]),n.__metadata("design:returntype",void 0)],_.prototype,"setWatchFileExcludes",null),t.DiskFsProviderClient=_=n.__decorate([(0,r.Injectable)()],_)},96708:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceClientModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(42933),v=e(70671),_=e(2156),m=e(69037),p=e(60476),s=e(23188);let h=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:l.IFileServiceClient,useClass:_.FileServiceClient},{token:l.IBrowserFileSystemRegistry,useClass:_.BrowserFileSystemRegistryImpl},{token:l.IDiskFileProvider,useClass:p.DiskFsProviderClient},{token:l.IShadowFileProvider,useClass:s.ShadowFileSystemProvider},m.FileServiceContribution],this.backServices=[{servicePath:l.DiskFileServicePath,clientToken:l.IDiskFileProvider,protocol:v.DiskFileServiceProtocol}]}};t.FileServiceClientModule=h,t.FileServiceClientModule=h=n.__decorate([(0,r.Injectable)()],h)},23188:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowFileSystemProvider=void 0;const n=e(85608),r=e(76003),o=e(41869);let l=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.readonly=!0,this.shadowFiles=new Map,this.fileChangeEmitter=new o.Emitter,this.onDidChangeFile=this.fileChangeEmitter.event}unwatch(_){throw new Error("Method not implemented.")}readFileStream(_){throw new Error("Method not implemented.")}watch(_,m){throw new Error("Method not implemented.")}stat(_){return Promise.resolve({uri:_.toString(),lastModification:0})}readDirectory(_){throw new Error("Method not implemented.")}createDirectory(_){throw new Error("Method not implemented.")}readFile(_){return this.shadowFiles.get(_.toString())||o.BinaryBuffer.fromString("no available").buffer}writeFile(_,m,p){this.shadowFiles.set(_.toString(),m)}delete(_,m){throw new Error("Method not implemented.")}rename(_,m,p){throw new Error("Method not implemented.")}copy(_,m,p){throw new Error("Method not implemented.")}exists(_){throw new Error("Method not implemented.")}access(_,m){throw new Error("Method not implemented.")}};t.ShadowFileSystemProvider=l,t.ShadowFileSystemProvider=l=n.__decorate([(0,r.Injectable)()],l)},81952:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcher=void 0;const n=e(43718);function r(l,v){return l.filter(_=>!!_.uri.startsWith(v))}class o{constructor(v){this.toDispose=new n.DisposableCollection,this.changeEmitter=new n.Emitter,this.toDispose.push(this.changeEmitter),this.fileServiceClient=v.fileServiceClient,this.watchId=v.watchId,this.uri=v.uri,this.fileServiceClient.onFilesChanged(_=>{const m=r(_,this.uri.toString());m&&m.length>0&&this.changeEmitter.fire(m)})}get onFilesChanged(){return this.changeEmitter.event}dispose(){return Promise.all([this.toDispose.dispose(),this.fileServiceClient.unwatchFileChanges(this.watchId)])}isDisposed(){return this.toDispose.disposed}}t.FileSystemWatcher=o},91813:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXT_LIST_TEXT=t.EXT_LIST_IMAGE=t.EXT_LIST_VIDEO=void 0,t.getFileTypeByExt=e,t.EXT_LIST_VIDEO=new Set(["mp4","webm","mkv","mov","mts","flv","avi","wmv"]),t.EXT_LIST_IMAGE=new Set(["png","gif","jpg","jpeg","svg","bmp","avif","cr2","cr3","dng","flif","heic","icns","jxl","jpm","jpx","nef","raf","rw2","tif","orf","webp","apng"]),t.EXT_LIST_TEXT=new Set(["xml"]);function e(n){let r="text";return n&&(t.EXT_LIST_IMAGE.has(n)?r="image":t.EXT_LIST_VIDEO.has(n)?r="video":t.EXT_LIST_TEXT.has(n)?r="text":r="binary"),r}},79929:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IBrowserFileSystemRegistry=t.IFileServiceClient=void 0;const n=e(43718);t.IFileServiceClient=n.IFileServiceClient,t.IBrowserFileSystemRegistry=Symbol("IBrowserFileSystemRegistry")},49818:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemError=t.FileOperationError=t.FileSystemProviderError=t.FileSystemProviderErrorCode=t.FileAccess=t.IFileService=t.IShadowFileProvider=t.IDiskFileProvider=t.FileStat=t.FileType=void 0,t.createFileSystemProviderError=p,t.markAsFileSystemProviderError=s,t.containsExtraFileMethod=a,t.notEmpty=g,t.isErrnoException=d,t.handleError=u;const n=e(85608),r=e(43718);var o=e(31036);Object.defineProperty(t,"FileType",{enumerable:!0,get:function(){return o.FileType}}),Object.defineProperty(t,"FileStat",{enumerable:!0,get:function(){return o.FileStat}}),n.__exportStar(e(11854),t),t.IDiskFileProvider=Symbol("IDiskFileProvider"),t.IShadowFileProvider=Symbol("IShadowFileProvider"),t.IFileService=Symbol("IFileService");var l;(function(E){let f;(function(c){c.F_OK=0,c.R_OK=4,c.W_OK=2,c.X_OK=1})(f=E.Constants||(E.Constants={}))})(l||(t.FileAccess=l={}));var v;(function(E){E.FileExists="EntryExists",E.FileNotFound="EntryNotFound",E.FileNotADirectory="EntryNotADirectory",E.FileIsADirectory="EntryIsADirectory",E.FileIsOutOfSync="FileIsOutOfSync",E.FileExceedsMemoryLimit="EntryExceedsMemoryLimit",E.FileTooLarge="EntryTooLarge",E.FileWriteLocked="EntryWriteLocked",E.NoPermissions="NoPermissions",E.Unavailable="Unavailable",E.Unknown="Unknown"})(v||(t.FileSystemProviderErrorCode=v={}));class _ extends Error{static declare(f,c){return Object.assign((...y)=>p(c(...y),f),{is:y=>{var b;return(b=y.stack)===null||b===void 0?void 0:b.startsWith(f)}})}constructor(f,c){super(f),this.code=c}is(f){return this.name===f.name}}t.FileSystemProviderError=_;class m extends Error{constructor(f,c,y){super(f),this.fileOperationResult=c,this.options=y}static isFileOperationError(f){return f instanceof Error&&!(0,r.isUndefinedOrNull)(f.fileOperationResult)}}t.FileOperationError=m;function p(E,f){const c=new _(E.toString(),f);return s(c,f),c}function s(E,f){return E.name=f?`${f} (FileSystemError)`:"FileSystemError",E}var h;(function(E){E.FileNotFound=_.declare(v.FileNotFound,(f,c)=>`${c?c+" ":""} '${f}' is not found.`),E.FileExists=_.declare(v.FileExists,(f,c)=>`${c?c+" ":""}'${f}' already exists.`),E.FileNotADirectory=_.declare(v.FileNotADirectory,(f,c)=>`${c?c+" ":""}'${f}' is not a directory.`),E.FileIsADirectory=_.declare(v.FileIsADirectory,(f,c)=>`${c?c+" ":""}'${f}' is a directory.`),E.FileIsOutOfSync=_.declare(v.FileIsOutOfSync,(f,c)=>`${c?c+" ":""}'${f}' is out of sync.`),E.FileExceedsMemoryLimit=_.declare(v.FileExceedsMemoryLimit,(f,c)=>`${c?c+" ":""}'${f}' is exceeds memory limit.`),E.FileTooLarge=_.declare(v.FileTooLarge,(f,c)=>`${c?c+" ":""}'${f}' is too large.`),E.FileWriteLocked=_.declare(v.FileWriteLocked,(f,c)=>`${c?c+" ":""}'${f}' is locked.`),E.FileIsNoPermissions=_.declare(v.NoPermissions,(f,c)=>`${c?c+" ":""}'${f}' is no permissions.`),E.Unavailable=_.declare(v.Unavailable,(f,c)=>`${c?c+" ":""}'${f}' is unavailable.`),E.Unknown=_.declare(v.Unknown,(f,c)=>`${c?c+" ":""}'${f}' is unkonw.`)})(h||(t.FileSystemError=h={}));function a(E,f){return(0,r.hasProperty)(E,f)&&(0,r.isFunction)(E[f])}function g(E){return E!==void 0}function d(E){return E.code!==void 0&&E.errno!==void 0}function u(E){var f,c,y,b,A;if(d(E))switch(E.code){case"EEXIST":throw h.FileExists(r.Uri.file((f=E.path)!==null&&f!==void 0?f:""));case"EPERM":case"EACCESS":throw h.FileIsNoPermissions(r.Uri.file((c=E.path)!==null&&c!==void 0?c:""));case"ENOENT":throw h.FileNotFound(r.Uri.file((y=E.path)!==null&&y!==void 0?y:""));case"ENOTDIR":throw h.FileNotADirectory(r.Uri.file((b=E.path)!==null&&b!==void 0?b:""));case"EISDIR":throw h.FileIsADirectory(r.Uri.file((A=E.path)!==null&&A!==void 0?A:""))}throw E}},42933:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79929),t),n.__exportStar(e(49818),t),n.__exportStar(e(28217),t),n.__exportStar(e(91813),t),n.__exportStar(e(50295),t)},70671:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiskFileServiceProtocol=void 0;const n=e(26387),r=e(52890),o=e(50295);t.DiskFileServiceProtocol={name:o.DiskFileServicePath,methods:[{method:"readFile",request:[{name:"uri",type:r.UriComponentsProto}],response:{type:n.Type.binary()}}]}},50295:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileExtServicePath=t.FileWatcherServicePath=t.ShadowFileServicePath=t.DiskFileServicePath=t.FileServicePath=void 0,t.FileServicePath="FileService",t.DiskFileServicePath="DiskFileService",t.ShadowFileServicePath="ShadowFileService",t.FileWatcherServicePath="FileWatcherService",t.FileExtServicePath="FileExtServicePath"},28217:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatcherProcessManagerProxy=t.WatcherServiceProxy=t.WATCHER_INIT_DATA_KEY=t.SUMI_WATCHER_PROCESS_SOCK_KEY=t.INsfw=void 0;const n=e(86058);var r;(function(o){let l;(function(v){v[v.CREATED=0]="CREATED",v[v.DELETED=1]="DELETED",v[v.MODIFIED=2]="MODIFIED",v[v.RENAMED=3]="RENAMED"})(l=o.actions||(o.actions={}))})(r||(t.INsfw=r={})),t.SUMI_WATCHER_PROCESS_SOCK_KEY="sumi-watcher-process-sock",t.WATCHER_INIT_DATA_KEY="sumi-watcher-init-data",t.WatcherServiceProxy=new n.ProxyIdentifier("WatcherHostServiceImpl"),t.WatcherProcessManagerProxy=new n.ProxyIdentifier("WatcherProcessManagerProxy")},14951:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(42933),t)},57942:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDialogModel=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(26542),m=e(6250),p=e(2812),s=r.__importDefault(e(89200)),h=e(9018);let a=n=class{static createContainer(d,u){return d.createChild([{token:m.IFileDialogTreeService,useValue:u},{token:m.IFileDialogModel,useClass:n}])}static createModel(d,u){return n.createContainer(d,u).get(m.IFileDialogModel)}constructor(){this.selectedDecoration=new l.Decoration(s.default.mod_selected),this.focusedDecoration=new l.Decoration(s.default.mod_focused),this.loadingDecoration=new l.Decoration(s.default.mod_loading),this.cutDecoration=new l.Decoration(s.default.mod_cut),this._selectedFiles=[],this.disposableCollection=new v.DisposableCollection,this.onDidFocusedFileChangeEmitter=new v.Emitter,this.onDidSelectedFileChangeEmitter=new v.Emitter,this.clearFileSelectedDecoration=()=>{this._selectedFiles.forEach(d=>{this.selectedDecoration.removeTarget(d)}),this._selectedFiles=[],this.onDidSelectedFileChangeEmitter.fire([])},this.activeFileDecoration=(d,u=!0)=>{d!==this.treeModel.root&&(this.preContextMenuFocusedFile&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile),this.preContextMenuFocusedFile=null),d&&(this.selectedFiles.length>0&&this.selectedFiles.forEach(E=>{this.selectedDecoration.removeTarget(E)}),this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.selectedDecoration.addTarget(d),this.focusedDecoration.addTarget(d),this._focusedFile=d,this._selectedFiles=[d],this.onDidFocusedFileChangeEmitter.fire(d.uri),this.onDidSelectedFileChangeEmitter.fire([d.uri]),u&&this.treeModel.dispatchChange()))},this.selectFileDecoration=(d,u=!0)=>{d!==this.treeModel.root&&(this.preContextMenuFocusedFile&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile),this.preContextMenuFocusedFile=null),d&&(this.selectedFiles.length>0&&this.selectedFiles.forEach(E=>{this.selectedDecoration.removeTarget(E)}),this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.selectedDecoration.addTarget(d),this._selectedFiles=[d],this.onDidSelectedFileChangeEmitter.fire([d.uri]),u&&this.treeModel.dispatchChange()))},this.activeFileFocusedDecoration=(d,u=!1)=>{d!==this.treeModel.root&&(this.focusedFile!==d&&(u?(this.preContextMenuFocusedFile?(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile)):this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.preContextMenuFocusedFile=d):this.focusedFile&&(this.preContextMenuFocusedFile=null,this.focusedDecoration.removeTarget(this.focusedFile)),d&&(this.selectedDecoration.addTarget(d),this.focusedDecoration.addTarget(d),this._focusedFile=d,this._selectedFiles.push(d),this.onDidFocusedFileChangeEmitter.fire(d.uri),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(E=>E.uri)))),this.treeModel.dispatchChange())},this.activeFileSelectedDecoration=d=>{this._selectedFiles.indexOf(d)>-1||(this._selectedFiles.push(d),this.selectedDecoration.addTarget(d),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(u=>u.uri)),this.treeModel.dispatchChange())},this.activeFileDecorationByRange=(d,u)=>{for(this.clearFileSelectedDecoration(),this.preContextMenuFocusedFile=null;d<=u;d++){const E=this.treeModel.root.getTreeNodeAtIndex(d);E&&(this._selectedFiles.push(E),this.selectedDecoration.addTarget(E))}this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(E=>E.uri)),this.treeModel.dispatchChange()},this.enactiveFileDecoration=()=>{this.focusedFile&&(this.focusedDecoration.removeTarget(this.focusedFile),this.onDidFocusedFileChangeEmitter.fire(),this.treeModel.dispatchChange()),this._focusedFile=void 0},this.toggleDirectory=async d=>{d.expanded?this.fileTreeHandle.collapseNode(d):this.fileTreeHandle.expandNode(d)},this.handleTreeBlur=()=>{this.enactiveFileDecoration()},this.handleTreeFocus=()=>{},this.handleItemRangeClick=(d,u)=>{if(!this.focusedFile)this.handleItemClick(d,u);else if(this.focusedFile&&this.focusedFile!==d){const E=this.treeModel.root.getIndexAtTreeNode(d),f=this.treeModel.root.getIndexAtTreeNode(this.focusedFile);f>E?this.activeFileDecorationByRange(E,f):f<E&&this.activeFileDecorationByRange(f,E)}},this.handleItemToggleClick=(d,u)=>{u!==l.TreeNodeType.CompositeTreeNode&&u!==l.TreeNodeType.TreeNode||(this.selectedFiles.indexOf(d)>-1?this.focusedFile===d?this.enactiveFileDecoration():this.activeFileFocusedDecoration(d):this.activeFileSelectedDecoration(d))},this.handleItemClick=(d,u)=>{this.clickTimes++,(u===l.TreeNodeType.CompositeTreeNode||u===l.TreeNodeType.TreeNode)&&this.activeFileDecoration(d),u===l.TreeNodeType.CompositeTreeNode&&this.corePreferences["workbench.list.openMode"]==="singleClick"&&this.toggleDirectory(d),this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=setTimeout(()=>{this.clickTimes>1&&u!==l.TreeNodeType.TreeNode&&this.corePreferences["workbench.list.openMode"]==="doubleClick"&&this.toggleDirectory(d),this.clickTimes=0},200)},this.getDirectoryList=()=>this.fileTreeDialogService.getDirectoryList(),this._whenReady=this.initTreeModel()}get onDidFocusedFileChange(){return this.onDidFocusedFileChangeEmitter.event}get onDidSelectedFileChange(){return this.onDidSelectedFileChangeEmitter.event}get fileTreeHandle(){return this._fileTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get whenReady(){return this._whenReady}get focusedFile(){return this._focusedFile}get selectedFiles(){return this._selectedFiles}async initTreeModel(){const d=(await this.fileTreeDialogService.resolveChildren())[0];this._treeModel=this.injector.get(p.FileTreeModel,[d]),this.initDecorations(d),this.disposableCollection.push(this._decorations),this.disposableCollection.push(this.labelService.onDidChange(()=>{this.treeModel.dispatchChange()})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,u=>{this.loadingDecoration.addTarget(u)})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,u=>{this.loadingDecoration.removeTarget(u)}))}async updateTreeModel(d){const u=await this.fileTreeDialogService.resolveRoot(d);if(u&&u.length>0){const E=u[0];this._treeModel=this.injector.get(p.FileTreeModel,[E]),this.clearFileSelectedDecoration(),this.initDecorations(E)}}initDecorations(d){this._decorations&&this._decorations.dispose(),this._decorations=new l.DecorationsManager(d),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.cutDecoration),this._decorations.addDecoration(this.loadingDecoration)}handleTreeHandler(d){this._fileTreeHandle=d}dispose(){this.disposableCollection.dispose()}};t.FileTreeDialogModel=a,a.FILE_TREE_SNAPSHOT_KEY="FILE_TREE_SNAPSHOT",a.DEFAULT_LOCATION_FLUSH_DELAY=500,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],a.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(m.IFileDialogTreeService),r.__metadata("design:type",h.FileTreeDialogService)],a.prototype,"fileTreeDialogService",void 0),r.__decorate([(0,o.Autowired)(_.LabelService),r.__metadata("design:type",_.LabelService)],a.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(v.CorePreferences),r.__metadata("design:type",Object)],a.prototype,"corePreferences",void 0),t.FileTreeDialogModel=a=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],a)},69748:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_TREE_BADGE_LIMIT=t.FILE_TREE_NODE_HEIGHT=t.FileTreeDialogNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=e(41869),_=e(69959),m=n.__importDefault(e(89200)),p=({item:s,onClick:h,itemType:a,labelService:g,leftPadding:d=8,onTwistierClick:u,decorations:E,defaultLeftPadding:f=8,template:c})=>{const y=a===l.TreeNodeType.RenamePrompt,b=a===l.TreeNodeType.NewPrompt,A=y||b,S=(0,v.useDesignStyles)(m.default.expansion_toggle,"expansion_toggle"),w=(0,v.useDesignStyles)(m.default.file_tree_node,"file_tree_node"),I=W=>{(a===l.TreeNodeType.TreeNode||a===l.TreeNodeType.CompositeTreeNode)&&h(W,s,a)},D=W=>{(a===l.TreeNodeType.TreeNode||a===l.TreeNodeType.CompositeTreeNode)&&(u?u(W,s,a):h(W,s,a))},T=a===l.TreeNodeType.CompositeTreeNode;let R;A?b?R=`${f+(s.parent.depth+1||0)*(d||0)}px`:R=`${f+(s.target.depth||0)*(d||0)}px`:R=T?`${f+(s.depth||0)*(d||0)}px`:`${f+(s.depth||0)*(d||0)+8}px`;const M={height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`,paddingLeft:R},O=(W,j)=>{if(E&&E?.classlist.indexOf(m.default.mod_loading)>-1)return o.default.createElement(l.Loading,null);if(A&&W instanceof l.PromptHandle){let Q=!1;if(y?Q=W.target.type===l.TreeNodeType.CompositeTreeNode:Q=W.type===l.TreeNodeType.CompositeTreeNode,Q)return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,S,(0,v.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:b||!(y&&W.target.type===l.TreeNodeType.CompositeTreeNode&&W.target.expanded)})})}else return o.default.createElement("div",{onClick:j,className:(0,r.default)(m.default.file_tree_node_segment,S,(0,v.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:!W.expanded})})},x=W=>{let j,Q;A&&W instanceof l.PromptHandle?W instanceof l.RenamePromptHandle?(j=W.target.uri.resolve(W.$.value),Q=_.Directory.is(W.target)):(j=W.parent.uri.resolve(W.$.value),Q=W.type===l.TreeNodeType.CompositeTreeNode):(j=W.uri,Q=W.filestat.isDirectory);const G=g.getIcon(j,{isDirectory:Q});return o.default.createElement("div",{className:(0,r.default)(m.default.file_icon,G,{expanded:Q&&W.expanded}),style:{height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`}})},k=W=>c?o.default.createElement(c,null):A&&W instanceof l.PromptHandle?o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",m.default.file_tree_node_prompt_box)},o.default.createElement(W.ProxiedInput,{wrapperStyle:{height:t.FILE_TREE_NODE_HEIGHT,padding:"0 5px"}}))):o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_displayname)},W.name),F=()=>o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_tail)},L()),L=()=>null,N=W=>{if(T)return O(W,D);if(A)return O(W,()=>{})},U=()=>s.tooltip||s.name;return o.default.createElement("div",{key:s.id,onClick:I,title:U(),className:(0,r.default)(w,E?E.classlist:null),style:M,draggable:a===l.TreeNodeType.TreeNode||a===l.TreeNodeType.CompositeTreeNode},o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_content)},N(s),x(s),o.default.createElement("div",{className:A?m.default.file_tree_node_prompt_wrap:m.default.file_tree_node_overflow_wrap},k(s)),F()))};t.FileTreeDialogNode=p,t.FILE_TREE_NODE_HEIGHT=22,t.FILE_TREE_BADGE_LIMIT=99},68195:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialogContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(66e3);let v=class{initScopedContext(m){this._contextKeyService=this.globalContextKeyService.createScoped(m),this.fileDialogViewVisibleContext=l.FileDialogViewVisibleContext.bind(this._contextKeyService)}get service(){return this._contextKeyService}};t.FileDialogContextKey=v,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],v.prototype,"globalContextKeyService",void 0),t.FileDialogContextKey=v=n.__decorate([(0,r.Injectable)()],v)},9018:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDialogService=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(41869),v=e(26542),_=e(54414),m=e(14951),p=e(72665),s=e(51500),h=e(6250),a=e(57781),g=e(97738),d=e(68195);let u=class extends o.Tree{constructor(f){super(),this._whenReady=this.resolveWorkspaceRoot(f)}get whenReady(){return this._whenReady}async resolveWorkspaceRoot(f){if(f){const c=new l.URI(f).withScheme(l.Schemes.file),y=await this.fileTreeAPI.resolveFileStat(c);y&&(this.workspaceRoot=y)}}async resolveChildren(f){if(f){if(f.uri){const{children:c}=await this.fileTreeAPI.resolveChildren(this,f.uri.toString(),f);return c}}else{this.workspaceRoot||(this.workspaceRoot=(await this.workspaceService.roots)[0]);const{children:c}=await this.fileTreeAPI.resolveChildren(this,this.workspaceRoot);return this.root=c[0],c}return[]}async resolveRoot(f){let c;/^file:\/\//.test(f)&&(c=new l.URI(f)),c=l.URI.file(f);const y=await this.fileTreeAPI.resolveFileStat(c);if(y){const{children:b}=await this.fileTreeAPI.resolveChildren(this,y);return this.root=b[0],b}}getDirectoryList(){const f=[];if(!this.root)return f;let c=new l.URI(this.workspaceRoot.uri);if(c&&c.parent)for(;c.parent;){const y=c.codeUri.fsPath;if(f.indexOf(y)>=0)break;f.push(y),c=c.parent}else f.push(c.codeUri.fsPath.toString());return f}sortComparator(f,c){return f.constructor===c.constructor?f.name.startsWith(".")&&!c.name.startsWith(".")?1:!f.name.startsWith(".")&&c.name.startsWith(".")?-1:f.name.localeCompare(c.name,"kn",{numeric:!0}):f.type===o.TreeNodeType.CompositeTreeNode?-1:c.type===o.TreeNodeType.CompositeTreeNode?1:0}initContextKey(f){f&&this.fileDialogContextKey.initScopedContext(f)}get contextKey(){return this.fileDialogContextKey}async saveAs(f){const{oldFilePath:c,newFilePath:y}=f;if(!c||!y)throw new Error("oldFilePath and newFilePath are required");await this.createFile(f);try{const b=l.URI.file(f.newFilePath),A={preview:!1,focus:!0,replace:!0,forceClose:!0,disableNavigate:!1};await this.workbenchEditorService.open(b,A),await this.fileTreeModelService.clearFileSelectedDecoration();const S=this.fileTreeService.getNodeByPathOrUri(b);S&&await this.fileTreeModelService.activeFileDecoration(S)}catch(b){throw new Error(`Failed to open saveAs file: ${b.message}`)}}async createFile(f){try{const{oldFilePath:c,newFilePath:y}=f;if(!await this.fileServiceClient.getFileStat(c))throw new Error(`Source file not found: ${c}`);const{content:A}=await this.fileServiceClient.readFile(c);await this.fileServiceClient.createFile(y,{content:A.toString(),encoding:"utf8",overwrite:!0})}catch(c){throw new Error(`Failed to create file: ${c.message}`)}}renderCustomMsg(){return null}async getDefaultFilePath(f,c){return c}dispose(){super.dispose()}};t.FileTreeDialogService=u,n.__decorate([(0,r.Autowired)(h.IFileTreeAPI),n.__metadata("design:type",Object)],u.prototype,"fileTreeAPI",void 0),n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],u.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(v.LabelService),n.__metadata("design:type",v.LabelService)],u.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(d.FileDialogContextKey),n.__metadata("design:type",d.FileDialogContextKey)],u.prototype,"fileDialogContextKey",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],u.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],u.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(p.IDialogService),n.__metadata("design:type",Object)],u.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(g.FileTreeModelService),n.__metadata("design:type",g.FileTreeModelService)],u.prototype,"fileTreeModelService",void 0),n.__decorate([(0,r.Autowired)(h.IFileTreeService),n.__metadata("design:type",a.FileTreeService)],u.prototype,"fileTreeService",void 0),t.FileTreeDialogService=u=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[String])],u)},51888:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialog=t.FILE_TREE_DIALOG_HEIGHT=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(41869),v=e(68974),_=e(72665),m=e(69748),p=n.__importDefault(e(13294));t.FILE_TREE_DIALOG_HEIGHT=22;const s=({options:h,model:a,isOpenDialog:g,fileService:d})=>{const u=(0,l.useInjectable)(_.IDialogService),E=(0,r.useRef)(null),[f,c]=(0,r.useState)(h.defaultFileName||""),[y,b]=(0,r.useState)(!1),[A,S]=(0,r.useState)(""),[w,I]=(0,r.useState)([]),D=(0,r.useRef)(h.defaultFileName||"");(0,r.useEffect)(()=>{var oe;return a&&(b(!1),O(),(oe=d.contextKey.fileDialogViewVisibleContext)===null||oe===void 0||oe.set(!0)),()=>{a.dispose()}},[a]),(0,r.useEffect)(()=>{h.defaultFileName&&(c(h.defaultFileName||""),D.current=h.defaultFileName||"")},[h]),(0,r.useEffect)(()=>{if(y){const oe=a.getDirectoryList();I(oe)}},[y]);const T=(0,r.useCallback)(()=>{const oe=a.selectedFiles.map(ie=>ie.uri.path.toString());if(D.current&&h.showNameInput&&(oe?.length===1||h.defaultUri)){const ie=oe?.length===1?oe[0]:h.defaultUri.path.toString();h?.saveAs&&d.saveAs({oldFilePath:l.path.join(ie,h?.defaultFileName||""),newFilePath:l.path.join(ie,D.current)}),u.hide([l.path.join(ie,D.current)])}else oe.length>0?u.hide(oe):A?u.hide([A]):h.defaultUri?u.hide([h.defaultUri.path.toString()]):a.treeModel&&a.treeModel.root?u.hide([a.treeModel.root.uri.path.toString()]):u.hide([]);b(!1),d.contextKey.fileDialogViewVisibleContext.set(!1)},[y,u,a,h,A]),R=async oe=>{let ie=oe.treeModel.root.uri.codeUri.fsPath;return d.getDefaultFilePath&&(ie=await d.getDefaultFilePath(oe,ie)),ie},M=(0,r.useCallback)(()=>{b(!1),u.hide(),d.contextKey.fileDialogViewVisibleContext.set(!1)},[y,u]),O=(0,r.useCallback)(async()=>{await a.whenReady,await a.treeModel.ensureReady;const oe=await R(a);S(oe),b(!0)},[a,A,y]),x=!g,k=(0,r.useCallback)(oe=>{a.handleTreeHandler({...oe,getModel:()=>a.treeModel})},[a]),F=(0,r.useCallback)((oe,ie)=>{oe.stopPropagation();const{toggleDirectory:he}=a;he(ie)},[a]),L=(0,r.useCallback)(oe=>N(oe)?!1:oe.shiftKey,[]),N=(0,r.useCallback)(oe=>{const{metaKey:ie,ctrlKey:he}=oe;return l.isMacintosh&&ie||he},[]),U=(0,r.useCallback)((oe,ie,he)=>{var me;oe.stopPropagation();const{handleItemClick:q,handleItemToggleClick:be,handleItemRangeClick:fe}=a;if(!ie)return;const te=L(event),ge=N(event);if(te&&!x&&h.canSelectMany)fe(ie,he);else if(ge&&!x&&h.canSelectMany)be(ie,he);else if(x)he===o.TreeNodeType.CompositeTreeNode&&q(ie,he);else if(h.canSelectFiles&&he===o.TreeNodeType.TreeNode){const Re=new Set(Object.values((me=h.filters)!==null&&me!==void 0?me:{}).flat().map(Oe=>`.${Oe}`));if(Re.size>0){const Oe=l.URI.parse(ie.filestat.uri).path.ext;Re.has(Oe)&&q(ie,he)}else q(ie,he)}else h.canSelectFolders&&he===o.TreeNodeType.CompositeTreeNode&&q(ie,he)},[a,x,h]),W=(0,r.useCallback)(async oe=>{b(!1),S(oe),await a.updateTreeModel(oe),b(!0)},[a,y,A]),j=(0,r.useCallback)(async oe=>{b(!1),S(oe),await a.updateTreeModel(oe),b(!0)},[a,y,A,w]),Q=(0,r.useCallback)(()=>d.renderCustomMsg?d.renderCustomMsg():null,[d.renderCustomMsg]),G=(0,r.useCallback)(oe=>r.default.createElement(m.FileTreeDialogNode,{item:oe.item,itemType:oe.itemType,labelService:a.labelService,decorations:a.decorations.getDecorations(oe.item),onClick:U,onTwistierClick:F,defaultLeftPadding:8,leftPadding:8}),[a.treeModel]),X=(0,r.useCallback)(()=>{if(y){if(a.treeModel)return r.default.createElement(o.RecycleTree,{height:300,itemHeight:t.FILE_TREE_DIALOG_HEIGHT,onReady:k,model:a.treeModel},G)}else return r.default.createElement(v.Progress,{loading:!0})},[y,a]),$=(0,r.useMemo)(()=>d.showFilePathSearch!==!1,[d.showFilePathSearch]),V=(0,r.useCallback)(()=>{if(w.length>0)return r.default.createElement(o.Select,{onChange:W,onSearchChange:j,className:p.default.select_control,size:"large",searchPlaceholder:A,value:A,showSearch:$},w.map((oe,ie)=>r.default.createElement(o.Option,{value:oe,key:`${ie} - ${oe}`},oe)))},[w,A]),H=(0,r.useCallback)(oe=>{const{key:ie}=l.KeyCode.createKeyCode(oe),he=oe.shiftKey||oe.metaKey||oe.altKey||oe.ctrlKey;ie&&l.Key.ENTER.keyCode===ie.keyCode&&!he&&T()},[T]);(0,r.useEffect)(()=>{var oe;return E.current&&(d.initContextKey(E.current),d.contextKey.fileDialogViewVisibleContext.set(!0),(oe=E.current)===null||oe===void 0||oe.addEventListener("keyup",H)),()=>{var ie;(ie=E.current)===null||ie===void 0||ie.removeEventListener("keyup",H)}},[]);const K=(0,r.useMemo)(()=>r.default.createElement(r.default.Fragment,null,Q(),r.default.createElement("div",{className:p.default.file_dialog_directory},V()),r.default.createElement("div",{className:p.default.file_dialog_content},X())),[V,X]),Y=(0,r.useMemo)(()=>r.default.createElement("div",{className:p.default.file_dialog_buttons},r.default.createElement(o.Button,{onClick:M,type:"ghost",className:p.default.button},(0,l.localize)("dialog.file.close")),r.default.createElement(o.Button,{onClick:T,type:"primary",className:p.default.button,disabled:x&&h.showNameInput&&f.length===0},g&&h.openLabel||(0,l.localize)("dialog.file.ok"))),[M,T,x,g,f,h]),Z=(0,r.useCallback)(oe=>{c(oe.target.value),D.current=oe.target.value},[f]);return r.default.createElement("div",{className:p.default.file_dialog_wrapper,ref:E},r.default.createElement("div",{className:p.default.file_dialog_directory_title},g?h.title||(0,l.localize)("dialog.file.openLabel"):h.saveLabel||(0,l.localize)("dialog.file.saveLabel")),K,!g&&h.showNameInput&&r.default.createElement("div",{className:p.default.file_dialog_file_container},r.default.createElement("span",{className:p.default.file_dialog_file_name},(0,l.localize)("dialog.file.name"),": "),r.default.createElement(o.Input,{size:"small",value:f,autoFocus:!0,selection:{start:0,end:f.indexOf(".")||f.length},onChange:Z})),Y)};t.FileDialog=s},89508:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowDialogServiceImpl=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),l=e(41869),v=e(37406),_=e(14951),m=e(72665),p=e(57942),s=n.__importDefault(e(13294)),h=e(9018),a=e(51888);let g=class{constructor(){this.idx=1,this._whenReady=this.init()}async init(){this.recentGlobalStorage=await this.storageProvider(l.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA);const u=await this.recentGlobalStorage.get("RECENT_DIALOG_DEFAULT_URI");if(u)this._defaultUri=new l.URI(u);else{const E=await this.fileServiceClient.getCurrentUserHome();this._defaultUri=new l.URI(E.uri)}}get defaultUri(){return this._defaultUri}get whenReady(){return this._whenReady}async updateRecentDefaultUri(u){this.recentGlobalStorage.set("RECENT_DIALOG_DEFAULT_URI",u.toString()),this._defaultUri=u}async showOpenDialog(u={}){this.dialogService.reset(),await this.whenReady;const E={canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1};if(this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const f=this.injector.get(v.IElectronMainUIService),c=[];u.canSelectFiles&&c.push("openFile"),u.canSelectFolders&&c.push("openDirectory"),u.canSelectMany&&c.push("multiSelections"),l.isMacintosh&&c.push("treatPackageAsDirectory","createDirectory");const y=u.defaultUri||this.defaultUri,b=await f.showOpenDialog(l.electronEnv.currentWindowId,{defaultPath:y.codeUri.fsPath,title:u.title,buttonLabel:u.openLabel,properties:c});if(b&&b.length>0){const A=b.map(S=>l.URI.file(S));return this.updateRecentDefaultUri(A[0].parent),A}else return}else{u.defaultUri||(u.defaultUri=this.defaultUri);let f;u.defaultUri?f=this.injector.get(h.FileTreeDialogService,[u.defaultUri.toString()]):f=this.injector.get(h.FileTreeDialogService),await f.whenReady;const c=p.FileTreeDialogModel.createModel(this.injector,f),y=await this.dialogService.open({message:r.default.createElement(a.FileDialog,{key:this.idx++,fileService:f,model:c,options:{...E,...u},isOpenDialog:!0}),type:l.MessageType.Empty,buttons:[],closable:!0,props:{className:s.default.file_dialog_wrapper}});if(this.dialogService.reset(),y&&y.length>0){const b=y.map(A=>l.URI.file(A));return this.updateRecentDefaultUri(b[0].parent),b}else return}}async showSaveDialog(u={}){if(await this.whenReady,this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const E=u.defaultUri||this.defaultUri,c=await this.injector.get(v.IElectronMainUIService).showSaveDialog(l.electronEnv.currentWindowId,{defaultPath:E.resolve(u.defaultFileName||"").codeUri.fsPath,title:u.saveLabel,message:u.saveLabel});if(c){const y=l.URI.file(c);return this.updateRecentDefaultUri(y.parent),y}else return}else{u.defaultUri||(u.defaultUri=this.defaultUri);let E;u.defaultUri?E=this.injector.get(h.FileTreeDialogService,[u.defaultUri.toString()]):E=this.injector.get(h.FileTreeDialogService),await E.whenReady;const f=p.FileTreeDialogModel.createModel(this.injector,E),c=await this.dialogService.open({message:r.default.createElement(a.FileDialog,{key:this.idx++,fileService:E,model:f,options:u,isOpenDialog:!1}),type:l.MessageType.Empty,buttons:[],closable:!0,props:{className:s.default.file_dialog_wrapper}});if(this.dialogService.reset(),c&&c.length>0){const y=l.URI.file(c[0]);return this.updateRecentDefaultUri(y.parent),y}else return}}};t.WindowDialogServiceImpl=g,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],g.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(m.IDialogService),n.__metadata("design:type",Object)],g.prototype,"dialogService",void 0),n.__decorate([(0,o.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],g.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(l.StorageProvider),n.__metadata("design:type",Function)],g.prototype,"storageProvider",void 0),n.__decorate([(0,o.Autowired)(l.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),t.WindowDialogServiceImpl=g=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],g)},88014:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(16413);let v=class{constructor(){this.explorerResourceIsFolder=l.ExplorerResourceIsFolderContext.bind(this.globalContextKeyService),this.explorerViewletVisibleContext=l.ExplorerViewletVisibleContext.bind(this.globalContextKeyService)}initScopedContext(m){this._contextKeyService=this.globalContextKeyService.createScoped(m),this.explorerFocused=l.ExplorerFocusedContext.bind(this._contextKeyService),this.explorerResourceCut=l.ExplorerResourceCut.bind(this._contextKeyService),this.filesExplorerFocused=l.FilesExplorerFocusedContext.bind(this._contextKeyService),this.filesExplorerInputFocused=l.FilesExplorerInputFocusedContext.bind(this._contextKeyService),this.filesExplorerFilteredContext=l.FilesExplorerFilteredContext.bind(this._contextKeyService),this.explorerCompressedFocusContext=l.ExplorerCompressedFocusContext.bind(this._contextKeyService),this.explorerCompressedFirstFocusContext=l.ExplorerCompressedFirstFocusContext.bind(this._contextKeyService),this.explorerCompressedLastFocusContext=l.ExplorerCompressedLastFocusContext.bind(this._contextKeyService)}get service(){return this._contextKeyService}};t.FileContextKey=v,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],v.prototype,"globalContextKeyService",void 0),t.FileContextKey=v=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],v)},40439:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(16413),v=e(93899),_=e(68969),m=e(98295),p=e(41893),s=e(54414),h=e(32595),a=e(63067),g=e(58296),d=e(72665),u=e(55121),E=e(51500),f=e(6250),c=e(69959),y=e(56384),b=e(57781),A=e(97738),S=e(4446);let w=class{constructor(){this._disposables=new o.DisposableStore,this.isRendered=!1,this.deleteThrottler=new o.Throttler,this.willDeleteUris=[]}initialize(){this.workspaceService.initFileServiceExclude().then(async()=>{await this.fileTreeService.init(),this.fileTreeModelService.initTreeModel()}),this.progressService.registerProgressIndicator(h.EXPLORER_CONTAINER_ID)}async onStart(){this.viewsRegistry.registerViewWelcomeContent(f.RESOURCE_VIEW_ID,{content:(0,o.formatLocalize)("welcome-view.noFolderHelp",o.FILE_COMMANDS.OPEN_FOLDER.id),group:g.ViewContentGroups.Open,order:1}),this.mainLayoutService.collectViewComponent({id:f.RESOURCE_VIEW_ID,name:this.getWorkspaceTitle(),weight:3,priority:9,collapsed:!1,component:y.FileTree},h.EXPLORER_CONTAINER_ID),this._disposables.add(this.workspaceService.onWorkspaceLocationChanged(()=>{const D=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);D&&D.updateViewTitle(f.RESOURCE_VIEW_ID,this.getWorkspaceTitle())}))}onDidStart(){const D=this.injector.get(S.SymlinkDecorationsProvider,[this.fileTreeService]);this.decorationService.registerDecorationsProvider(D)}onDidRender(){this.isRendered=!0;const D=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);D&&(this.fileTreeModelService.whenReady.then(()=>{this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(D.isActivated())}),D.onActivate(()=>{this.fileTreeModelService.performLocationOnHandleShow(),this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(!0)}),D.onInActivate(()=>{this.fileTreeModelService.handleTreeBlur(),this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(!1)}))}getWorkspaceTitle(){let D=(0,o.localize)("file.empty.defaultTitle");const T=this.workspaceService.workspace;return T&&(D=new o.URI(T.uri).displayName,!T.isDirectory&&D.endsWith(`.${this.workspaceService.workspaceSuffixName}`)&&(D=D.slice(0,D.lastIndexOf(".")),D===E.UNTITLED_WORKSPACE))?(0,o.localize)("file.workspace.defaultTip"):D}revealFile(D){if(D)if(this.isRendered){const T=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);!T||!T.isVisible||T.isCollapsed(f.RESOURCE_VIEW_ID)?this.fileTreeModelService.locationOnShow(D):this.fileTreeModelService.location(D)}else this.fileTreeModelService.locationOnShow(D)}registerMenus(D){D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.NEW_FILE.id,label:(0,o.localize)("file.new")},order:1,group:"0_new"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.NEW_FOLDER.id,label:(0,o.localize)("file.folder.new")},order:2,group:"0_new"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.addFolderToWorkspace")},order:1,group:"0_workspace",when:"config.workspace.supportMultiRootWorkspace"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.WORKSPACE_COMMANDS.REMOVE_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.removeFolderFromWorkspace")},order:1,group:"0_workspace",when:"config.workspace.supportMultiRootWorkspace"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_RESOURCES.id,label:(0,o.localize)("file.open")},order:1,group:"1_open"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TO_THE_SIDE.id,label:(0,o.localize)("file.open.side")},order:2,group:"1_open"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TYPE_WITH.id,label:(0,o.localize)("file.open.type")},order:3,group:"1_open"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TERMINAL_WITH_PATH.id,label:(0,o.localize)("file.filetree.openTerminalWithPath")},when:"workbench.panel.terminal",order:4,group:"1_open"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.SEARCH_ON_FOLDER.id,label:(0,o.localize)("file.search.folder")},order:1,group:"2_search"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.DELETE_FILE.id,label:(0,o.localize)("file.delete")},order:1,group:"7_modification"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.RENAME_FILE.id,label:(0,o.localize)("file.rename")},order:3,group:"7_modification"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COMPARE_SELECTED.id,label:(0,o.localize)("file.compare")},order:2,group:"3_compare"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_FILE.id,label:(0,o.localize)("file.copy.file")},order:1,group:"5_cutcopypaste"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.CUT_FILE.id,label:(0,o.localize)("file.cut.file")},order:2,group:"5_cutcopypaste"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.PASTE_FILE.id,label:(0,o.localize)("file.paste.file")},order:3,group:"5_cutcopypaste"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_PATH.id,label:(0,o.localize)("file.copy.path")},group:"6_copypath"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_RELATIVE_PATH.id,label:(0,o.localize)("file.copy.relativepath")},group:"6_copypath"})}registerCommands(D){const T=()=>{this.fileTreeService.filterMode&&this.fileTreeService.toggleFilterMode()};D.registerCommand(o.FILE_COMMANDS.OPEN_TERMINAL_WITH_PATH,{execute:M=>{let O=M;if(!O)return;const x=this.fileTreeService.getNodeByPathOrUri(O);x&&!x.filestat.isDirectory&&(O=x.uri.parent),this.commandService.executeCommand(o.TERMINAL_COMMANDS.OPEN_WITH_PATH.id,O)}}),D.registerCommand(o.FILE_COMMANDS.SEARCH_ON_FOLDER,{execute:async M=>{var O;let x=M;if(x||(this.fileTreeModelService.focusedFile?x=this.fileTreeModelService.focusedFile.uri:this.fileTreeModelService.selectedFiles.length>0&&(x=(O=this.fileTreeModelService.selectedFiles[0])===null||O===void 0?void 0:O.uri)),!x)return;let k;if(this.fileTreeService.isMultipleWorkspace)for(const F of await this.workspaceService.roots){const L=new o.URI(F.uri);if(L.isEqualOrParent(x)){k=`./${L.relative(x).toString()}`;break}}else if(this.workspaceService.workspace){const F=new o.URI(this.workspaceService.workspace.uri);F.isEqualOrParent(x)&&(k=`./${F.relative(x).toString()}`)}this.commandService.executeCommand(o.SEARCH_COMMANDS.OPEN_SEARCH.id,{includeValue:k+"/"})},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&c.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.LOCATION,{execute:M=>{M?this.revealFile(M):this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0&&this.revealFile(this.fileTreeModelService.selectedFiles[0].uri)}}),D.registerCommand(o.FILE_COMMANDS.LOCATION_WITH_EDITOR,{execute:()=>{var M,O,x;((O=(M=this.workbenchEditorService.currentEditor)===null||M===void 0?void 0:M.currentUri)===null||O===void 0?void 0:O.scheme)===o.Schemes.file&&this.revealFile((x=this.workbenchEditorService.currentEditor)===null||x===void 0?void 0:x.currentUri)}}),D.registerCommand(o.FILE_COMMANDS.COLLAPSE_ALL,{execute:()=>{const M=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);!M||!M.isVisible||this.fileTreeModelService.collapseAll()}}),D.registerCommand(o.FILE_COMMANDS.REFRESH_ALL,{execute:async()=>{const M=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);!M||!M.isVisible||await this.fileTreeService.refresh()}}),D.registerCommand(o.FILE_COMMANDS.DELETE_FILE,{execute:(M,O)=>{if(T(),O?this.willDeleteUris=this.willDeleteUris.concat(O):this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0?this.willDeleteUris=this.willDeleteUris.concat(this.fileTreeModelService.selectedFiles.map(x=>x.uri)):this.fileTreeModelService.focusedFile&&this.willDeleteUris.push(this.fileTreeModelService.focusedFile.uri),this.willDeleteUris.length!==0)return this.deleteThrottler.queue(this.doDelete.bind(this))},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.RENAME_FILE,{execute:M=>{if(T(),!M)if(this.fileTreeModelService.contextMenuFile)M=this.fileTreeModelService.contextMenuFile.uri;else if(this.fileTreeModelService.focusedFile)M=this.fileTreeModelService.focusedFile.uri;else return;this.fileTreeModelService.renamePrompt(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.NEW_FILE,{execute:async M=>{var O;if(T(),M)this.fileTreeModelService.newFilePrompt(M);else if(this.fileTreeService.isCompactMode&&this.fileTreeModelService.activeUri)this.fileTreeModelService.newFilePrompt(this.fileTreeModelService.activeUri);else if(this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0)this.fileTreeModelService.newFilePrompt(this.fileTreeModelService.selectedFiles[0].uri);else{let x;this.fileTreeService.isMultipleWorkspace?x=new o.URI((await this.workspaceService.roots)[0].uri):x=new o.URI((O=this.workspaceService.workspace)===null||O===void 0?void 0:O.uri),this.fileTreeModelService.newFilePrompt(x)}}}),D.registerCommand(o.FILE_COMMANDS.NEW_FOLDER,{execute:async M=>{var O;if(T(),M)this.fileTreeModelService.newDirectoryPrompt(M);else if(this.fileTreeService.isCompactMode&&this.fileTreeModelService.activeUri)this.fileTreeModelService.newDirectoryPrompt(this.fileTreeModelService.activeUri);else if(this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0)this.fileTreeModelService.newDirectoryPrompt(this.fileTreeModelService.selectedFiles[0].uri);else{let x;this.fileTreeService.isMultipleWorkspace?x=new o.URI((await this.workspaceService.roots)[0].uri):x=new o.URI((O=this.workspaceService.workspace)===null||O===void 0?void 0:O.uri),this.fileTreeModelService.newDirectoryPrompt(x)}}}),D.registerCommand(o.FILE_COMMANDS.COMPARE_SELECTED,{execute:(M,O)=>{if(O&&O.length){const x=this.workbenchEditorService.currentEditor;x&&x.currentUri&&this.fileTreeService.compare(O[0],x.currentUri)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!c.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.OPEN_RESOURCES,{execute:M=>{this.fileTreeService.openAndFixedFile(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!c.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.OPEN_TO_THE_SIDE,{execute:M=>{this.fileTreeService.openToTheSide(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!c.Directory.is(this.fileTreeModelService.contextMenuFile)});const R=(M,O)=>{const{availableOpenTypes:x,currentOpenType:k}=this.workbenchEditorService.currentEditorGroup;if(!(x&&M&&k))return{items:[],selectIndex:-1};const F=this.preferenceService.get("workbench.editorAssociations"),L=[],N=(Q,G)=>G.type===s.EditorOpenType.code?Q.type===s.EditorOpenType.code:G.type===s.EditorOpenType.component&&Q.type===s.EditorOpenType.component?Q.componentId===G.componentId:!1,U=(Q,G)=>(Q?Q+=(0,o.localize)("file.open.type.detail.and")+G:Q=G,Q);let W,j;if(F){const Q=Object.keys(F).find(G=>(0,o.match)(G,M.path.toString().toLowerCase())||(0,o.match)(G,M.path.base.toLowerCase()));W=Q&&F[Q]}return x.forEach((Q,G)=>{var X;const $={label:Q.title||Q.componentId||Q.type,detail:Q.title,run:V=>O(V,Q)};N(k,Q)&&($.description=U($.description,(0,o.localize)("file.open.type.detail.active")),j=G),W&&(!((X=Q.componentId)===null||X===void 0)&&X.endsWith(W))&&($.description=U($.description,(0,o.localize)("file.open.type.detail.default"))),L.push(new o.QuickOpenItem($))}),{items:L,selectIndex:j}};D.registerCommand(o.FILE_COMMANDS.OPEN_TYPE_WITH,{execute:M=>{const O=(L,N)=>{var U,W;return L===o.Mode.OPEN?((U=this.workbenchEditorService.currentEditorGroup)===null||U===void 0||U.changeOpenType((W=N.componentId)!==null&&W!==void 0?W:N.type),!0):!1},{items:x,selectIndex:k}=R(M,O);if(x.length===0||typeof k>"u")return;const F=L=>{this.quickOpenService.open({onType:(N,U)=>U(L)},{fuzzyMatchLabel:!0,ignoreFocusOut:!1,placeholder:(0,o.formatLocalize)("file.open.type.placeholder",M.path.base),selectIndex:()=>k})};x.push(new o.QuickOpenItem({label:(0,o.formatLocalize)("file.open.type.preference.default",`*${M.path.ext}`),showBorder:!0,run:L=>{if(L===o.Mode.OPEN){const N=(j,Q)=>{var G,X,$;if(j===o.Mode.OPEN){const V="workbench.editorAssociations",H=this.preferenceService.resolve(V).scope,K=this.preferenceService.get(V);return this.preferenceService.set(V,{...K||{},[`*${M.path.ext}`]:(G=Q.componentId)!==null&&G!==void 0?G:Q.type},H),(X=this.workbenchEditorService.currentEditorGroup)===null||X===void 0||X.changeOpenType(($=Q.componentId)!==null&&$!==void 0?$:Q.type),!0}return!1},{items:U,selectIndex:W}=R(M,N);if(U.length===0||typeof W>"u")return!0;F(U)}return!1}})),F(x)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!c.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.COPY_PATH,{execute:async M=>{if(!M)return;let x=M.path.toString();if(M.scheme===s.DIFF_SCHEME){const F=M.getParsedQuery();x=new o.URI(F.modified).path.toString()}let k=decodeURIComponent(x);await this.appService.backendOS===o.OperatingSystem.Windows&&(k=k.slice(1)),await this.clipboardService.writeText(k)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile}),D.registerCommand(o.FILE_COMMANDS.COPY_RELATIVE_PATH,{execute:async M=>{if(!M)return;if(M.scheme===s.DIFF_SCHEME){const k=M.getParsedQuery();M=new o.URI(k.modified).withScheme("file")}const O=this.fileTreeService.getNodeByPathOrUri(M);if(O&&O.filestat.isInSymbolicDirectory)return await this.clipboardService.writeText(O.path.split(u.Path.separator).slice(2).join(u.Path.separator));let x;if(this.fileTreeService.isMultipleWorkspace)for(const k of await this.workspaceService.roots){if(x=new o.URI(k.uri),x.isEqual(M))return await this.clipboardService.writeText("./");if(x.isEqualOrParent(M))return await this.clipboardService.writeText(decodeURIComponent(x.relative(M).toString()))}else if(this.workspaceService.workspace)return x=new o.URI(this.workspaceService.workspace.uri),x.isEqual(M)?await this.clipboardService.writeText("./"):await this.clipboardService.writeText(decodeURIComponent(x.relative(M).toString()))},isVisible:()=>!!this.fileTreeModelService.contextMenuFile}),D.registerCommand(o.FILE_COMMANDS.COPY_FILE,{execute:(M,O)=>{if(O&&O.length)this.fileTreeModelService.copyFile(O);else{const x=this.fileTreeModelService.selectedFiles.map(k=>k.uri);x&&x.length&&this.fileTreeModelService.copyFile(x)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.SELECT_CURRENT_NODE,{execute:(M,O)=>{if(O&&O.length)this.fileTreeModelService.selectChildNode(O);else{const x=this.fileTreeModelService.selectedFiles.map(k=>k.uri);x&&x.length&&this.fileTreeModelService.selectChildNode(x)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.CUT_FILE,{execute:(M,O)=>{if(O&&O.length)this.fileTreeModelService.cutFile(O);else{const x=this.fileTreeModelService.selectedFiles.map(k=>k.uri);x&&x.length&&this.fileTreeModelService.cutFile(x)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.PASTE_FILE,{execute:M=>{if(T(),M)this.fileTreeModelService.pasteFile(M);else if(this.fileTreeModelService.focusedFile){let O;this.fileTreeModelService.activeUri?O=this.fileTreeModelService.activeUri:O=this.fileTreeModelService.focusedFile.uri,this.fileTreeModelService.pasteFile(O)}},isEnabled:()=>this.fileTreeModelService.pasteStore&&this.fileTreeModelService.pasteStore.type!==f.PasteTypes.NONE||this.appConfig.isElectronRenderer}),D.registerCommand(o.FILE_COMMANDS.VSCODE_OPEN_FOLDER,{execute:(M,O)=>{const x=this.injector.get(o.IWindowService),k={newWindow:!0};return typeof O=="boolean"?k.newWindow=O:k.newWindow=typeof O?.forceNewWindow=="boolean"?O.forceNewWindow:!0,M?x.openWorkspace(M,k):this.commandService.executeCommand(o.FILE_COMMANDS.OPEN_FOLDER.id,k)},isVisible:()=>{const M=this.preferenceService.get("application.supportsOpenFolder");return M??!1}}),D.registerCommand(o.FILE_COMMANDS.OPEN_FOLDER,{execute:M=>{const O=this.injector.get(o.IWindowService);this.appConfig.isElectronRenderer?this.injector.get(o.IElectronNativeDialogService).showOpenDialog({title:(0,o.localize)("workspace.openDirectory"),properties:["openDirectory"]}).then(k=>{k&&k.length>0&&O.openWorkspace(o.URI.file(k[0]),M||{newWindow:!0})}):this.injector.get(d.IWindowDialogService).showOpenDialog({title:(0,o.localize)("workspace.openDirectory"),canSelectFiles:!1,canSelectFolders:!0}).then(k=>{var F;k&&k.length>0&&this.injector.get(E.IWorkspaceService).open(k[0],{preserveWindow:(F=M?.newWindow)!==null&&F!==void 0?F:!1})})},isVisible:()=>{const M=this.preferenceService.get("application.supportsOpenFolder");return M??!1}}),D.registerCommand(o.FILE_COMMANDS.OPEN_WORKSPACE,{execute:M=>{if(!this.preferenceService.get("application.supportsOpenWorkspace"))return;const x=this.injector.get(o.IWindowService);this.appConfig.isElectronRenderer?this.injector.get(o.IElectronNativeDialogService).showOpenDialog({title:(0,o.localize)("workspace.openWorkspace"),properties:["openFile"],filters:[{name:(0,o.localize)("workspace.openWorkspaceTitle"),extensions:[this.workspaceService.workspaceSuffixName]}]}).then(F=>{F&&F.length>0&&x.openWorkspace(o.URI.file(F[0]),M||{newWindow:!0})}):this.injector.get(d.IWindowDialogService).showOpenDialog({title:(0,o.localize)("workspace.openWorkspace"),canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,filters:{workspace:[this.workspaceService.workspaceSuffixName]}}).then(F=>{var L;F&&F.length>0&&this.injector.get(E.IWorkspaceService).open(F[0],{preserveWindow:(L=M?.newWindow)!==null&&L!==void 0?L:!1})})},isVisible:()=>{const M=this.preferenceService.get("application.supportsOpenWorkspace");return M??!1}}),D.registerCommand(o.FILE_COMMANDS.REVEAL_IN_EXPLORER,{execute:M=>{var O;let x=M instanceof o.URI?M:M?.uri;const k=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);k&&!k.isVisible&&(k.activate(),setTimeout(()=>{k.setCollapsed(f.RESOURCE_VIEW_ID,!1)},200)),!x&&(!((O=this.workbenchEditorService.currentEditor)===null||O===void 0)&&O.currentUri)&&(x=this.workbenchEditorService.currentEditor.currentUri),x&&this.revealFile(o.URI.parse(x.toString()))}}),D.registerCommand(o.FILE_COMMANDS.FOCUS_FILES,{execute:()=>{const M=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);M&&M.activate()}}),D.registerCommand(o.FILE_COMMANDS.OPEN_FILE,{execute:M=>this.windowDialogService.showOpenDialog(M)}),D.registerCommand(o.FILE_COMMANDS.SAVE_FILE,{execute:M=>this.windowDialogService.showSaveDialog(M)}),D.registerCommand(o.FILE_COMMANDS.FILTER_TOGGLE,{execute:()=>this.fileTreeService.toggleFilterMode()}),D.registerCommand(o.FILE_COMMANDS.FILTER_OPEN,{execute:()=>{if(!this.fileTreeService.filterMode)return this.fileTreeService.toggleFilterMode()}}),D.registerCommand(o.FILE_COMMANDS.FILTER_CLOSE,{execute:()=>{this.fileTreeService.filterMode&&this.fileTreeService.toggleFilterMode()}}),D.registerCommand(o.FILE_COMMANDS.NEXT,{execute:()=>{this.fileTreeModelService.moveToNext()}}),D.registerCommand(o.FILE_COMMANDS.PREV,{execute:()=>{this.fileTreeModelService.moveToPrev()}}),D.registerCommand(o.FILE_COMMANDS.COLLAPSE,{execute:()=>{this.fileTreeModelService.collapseCurrentFile()}}),D.registerCommand(o.FILE_COMMANDS.EXPAND,{execute:()=>{this.fileTreeModelService.expandCurrentFile()}}),D.registerCommand(o.FILE_COMMANDS.TOGGLE_OR_OPEN,{execute:()=>{this.fileTreeModelService.toggleOrOpenCurrentFile()}}),D.registerCommand(o.WORKSPACE_COMMANDS.REMOVE_WORKSPACE_FOLDER,{execute:async(M,O)=>{if(T(),!O.length||!this.workspaceService.isMultiRootWorkspaceOpened)return;const x=await this.workspaceService.roots,k=O.filter(F=>x.find(L=>L.uri===F.toString()));k.length>0&&await this.workspaceService.removeRoots(k)},isVisible:()=>this.workspaceService.isMultiRootWorkspaceOpened&&!!this.fileTreeModelService.contextMenuFile&&!!this.workspaceService.tryGetRoots().find(M=>{var O;return M.uri===((O=this.fileTreeModelService.contextMenuFile)===null||O===void 0?void 0:O.uri.toString())})})}registerKeybindings(D){D.registerKeybinding({command:o.FILE_COMMANDS.COPY_FILE.id,keybinding:"ctrlcmd+c",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.PASTE_FILE.id,keybinding:"ctrlcmd+v",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.CUT_FILE.id,keybinding:"ctrlcmd+x",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.SELECT_CURRENT_NODE.id,keybinding:"ctrlcmd+a",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.RENAME_FILE.id,keybinding:"enter",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.DELETE_FILE.id,keybinding:"ctrlcmd+backspace",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.FILTER_OPEN.id,keybinding:"ctrlcmd+f",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.FILTER_CLOSE.id,keybinding:"esc",when:`${l.FilesExplorerFocusedContext.raw} && ${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.NEXT.id,keybinding:"down",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.PREV.id,keybinding:"up",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.EXPAND.id,keybinding:"right",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.COLLAPSE.id,keybinding:"left",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.TOGGLE_OR_OPEN.id,keybinding:"space",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`})}registerToolbarItems(D){D.registerItem({id:o.FILE_COMMANDS.LOCATION_WITH_EDITOR.id,command:o.FILE_COMMANDS.LOCATION_WITH_EDITOR.id,label:(0,o.localize)("file.location"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !config.explorer.autoReveal && !${l.FilesExplorerFilteredContext.raw}`,order:0}),D.registerItem({id:o.FILE_COMMANDS.NEW_FILE.id,command:o.FILE_COMMANDS.NEW_FILE.id,label:(0,o.localize)("file.new"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !${l.FilesExplorerFilteredContext.raw}`,order:1}),D.registerItem({id:o.FILE_COMMANDS.NEW_FOLDER.id,command:o.FILE_COMMANDS.NEW_FOLDER.id,label:(0,o.localize)("file.folder.new"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !${l.FilesExplorerFilteredContext.raw}`,order:2}),D.registerItem({id:o.FILE_COMMANDS.FILTER_TOGGLE.id,command:o.FILE_COMMANDS.FILTER_TOGGLE.id,label:(0,o.localize)("file.filetree.filter"),viewId:f.RESOURCE_VIEW_ID,toggledWhen:`${l.FilesExplorerFilteredContext.raw}`,order:3}),D.registerItem({id:o.FILE_COMMANDS.REFRESH_ALL.id,command:o.FILE_COMMANDS.REFRESH_ALL.id,label:(0,o.localize)("file.refresh"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !${l.FilesExplorerFilteredContext.raw}`,order:4}),D.registerItem({id:o.FILE_COMMANDS.COLLAPSE_ALL.id,command:o.FILE_COMMANDS.COLLAPSE_ALL.id,label:(0,o.localize)("file.collapse"),viewId:f.RESOURCE_VIEW_ID,order:5}),D.registerItem({id:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,command:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.addFolderToWorkspace"),viewId:f.RESOURCE_VIEW_ID,order:0,group:"file_explore_workspace",when:"config.workspace.supportMultiRootWorkspace"})}doDelete(){const D=this.willDeleteUris.slice();return this.willDeleteUris=[],this.fileTreeModelService.deleteFileByUris(D)}dispose(){this._disposables.dispose()}};t.FileTreeContribution=w,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],w.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(f.IFileTreeService),n.__metadata("design:type",b.FileTreeService)],w.prototype,"fileTreeService",void 0),n.__decorate([(0,r.Autowired)(a.IMainLayoutService),n.__metadata("design:type",Object)],w.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(_.IProgressService),n.__metadata("design:type",Object)],w.prototype,"progressService",void 0),n.__decorate([(0,r.Autowired)(E.IWorkspaceService),n.__metadata("design:type",Object)],w.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(A.FileTreeModelService),n.__metadata("design:type",A.FileTreeModelService)],w.prototype,"fileTreeModelService",void 0),n.__decorate([(0,r.Autowired)(p.IDecorationsService),n.__metadata("design:type",p.IDecorationsService)],w.prototype,"decorationService",void 0),n.__decorate([(0,r.Autowired)(s.WorkbenchEditorService),n.__metadata("design:type",s.WorkbenchEditorService)],w.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],w.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(d.IWindowDialogService),n.__metadata("design:type",Object)],w.prototype,"windowDialogService",void 0),n.__decorate([(0,r.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],w.prototype,"clipboardService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],w.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.QuickOpenService),n.__metadata("design:type",Object)],w.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(a.IViewsRegistry),n.__metadata("design:type",Object)],w.prototype,"viewsRegistry",void 0),n.__decorate([(0,r.Autowired)(o.IApplicationService),n.__metadata("design:type",Object)],w.prototype,"appService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],w.prototype,"appConfig",void 0),t.FileTreeContribution=w=n.__decorate([(0,m.Domain)(v.MenuContribution,o.CommandContribution,o.KeybindingContribution,o.TabBarToolbarContribution,o.ClientAppContribution,a.MainLayoutContribution)],w)},2812:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeModel=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(69959),m=e(93239);let p=n=class extends l.TreeModel{constructor(h){super(),this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(h)}init(h){this.root=h,this.root.watcher.on(l.TreeNodeEvent.BranchDidUpdate,this.doDispatchChange.bind(this)),this.decorationService.onDidChange(this.doDispatchChange.bind(this))}doDispatchChange(){this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})}};t.FileTreeModel=p,p.DEFAULT_FLUSH_DELAY=100,r.__decorate([(0,o.Autowired)(m.FileTreeDecorationService),r.__metadata("design:type",m.FileTreeDecorationService)],p.prototype,"decorationService",void 0),t.FileTreeModel=p=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[_.Directory])],p)},46377:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_TREE_BADGE_LIMIT=t.FILE_TREE_NODE_HEIGHT=t.FileTreeNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=e(41869),_=e(69959),m=n.__importDefault(e(89200)),{Path:p}=v.path,s=({item:h,onClick:a,onDoubleClick:g,onContextMenu:d,dndService:u,itemType:E,decorationService:f,labelService:c,leftPadding:y=8,onTwistierClick:b,decorations:A,defaultLeftPadding:S=8,template:w,hasFolderIcons:I,hasFileIcons:D,hidesExplorerArrows:T,hasPrompt:R,iconService:M})=>{const[O,x]=o.default.useState(-1),k=E===l.TreeNodeType.RenamePrompt,F=E===l.TreeNodeType.NewPrompt,L=k||F,N=!L&&h.name.indexOf(p.separator)>=0,U=(0,v.useDesignStyles)(m.default.expansion_toggle,"expansion_toggle"),W=(0,v.useDesignStyles)(m.default.file_tree_node,"file_tree_node"),j=L?null:f.getDecoration(h.uri,_.Directory.is(h)),Q=Oe=>{(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&(N&&x(h.name.split(p.separator).length-1),a(Oe,h,E))},G=Oe=>{(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&(N&&x(h.name.split(p.separator).length-1),g(Oe,h,E))},X=Oe=>{(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&(b?b(Oe,h,E):a(Oe,h,E))},$=o.default.useCallback(Oe=>{Oe.nativeEvent.which!==0&&(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&d(Oe,h,E)},[d,h]),V=o.default.useCallback(Oe=>{const{handleDragStart:Le}=u;(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&Le(Oe,h)},[u,h]),H=o.default.useCallback(Oe=>{const{handleDragLeave:Le}=u;(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&Le(Oe,h)},[u,h]),K=o.default.useCallback(Oe=>{const{handleDragEnter:Le}=u;(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&Le(Oe,h)},[u,h]),Y=o.default.useCallback(Oe=>{const{handleDrop:Le}=u;(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&Le(Oe,h)},[u,h]),Z=o.default.useCallback(Oe=>{const{handleDragOver:Le}=u;(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&Le(Oe,h)},[u,h]);let oe=E===l.TreeNodeType.CompositeTreeNode,ie;L?F?(oe=h.type===l.TreeNodeType.CompositeTreeNode,ie=`${S+(h.parent.depth+1||0)*(y||0)+(oe?0:I?T?0:20:0)}px`):(oe=h.target.type===l.TreeNodeType.CompositeTreeNode,ie=`${S+(h.target.depth||0)*(y||0)+(oe?0:I?T?0:20:0)}px`):ie=`${S+(h.depth||0)*(y||0)+(oe?0:I?T?0:20:0)}px`;const he={color:j?j.color:"",height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`,paddingLeft:ie,opacity:R&&!L?".6":"1"},me=(Oe,Le)=>{if(A&&A?.classlist.indexOf(m.default.mod_loading)>-1)return o.default.createElement(l.Loading,null);if(L&&Oe instanceof l.PromptHandle){let Ne=!1;if(k?Ne=Oe.target.type===l.TreeNodeType.CompositeTreeNode:Ne=Oe.type===l.TreeNodeType.CompositeTreeNode,Ne)return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,U,(0,v.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:F||!(k&&Oe.target.type===l.TreeNodeType.CompositeTreeNode&&Oe.target.expanded)})})}else return o.default.createElement("div",{onClick:Le,className:(0,r.default)(m.default.file_tree_node_segment,U,(0,v.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:!Oe.expanded})})},q=Oe=>{let Le,Ne;L&&Oe instanceof l.PromptHandle?Oe instanceof l.RenamePromptHandle?(Le=Oe.target.uri.resolve(Oe.$.value),Ne=_.Directory.is(Oe.target)):(Le=Oe.parent.uri.resolve(Oe.$.value),Ne=Oe.type===l.TreeNodeType.CompositeTreeNode):(Le=Oe.uri,Ne=Oe.filestat.isDirectory);const De=c.getIcon(Le,{isDirectory:Ne,isOpenedDirectory:Ne&&Oe.expanded});return Ne&&!I||!Ne&&!D?null:o.default.createElement("div",{className:(0,r.default)(m.default.file_icon,De,{expanded:Ne&&Oe.expanded}),style:{height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`}})},be=Oe=>{if(w)return o.default.createElement(w,null);if(L&&Oe instanceof l.PromptHandle)return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",m.default.file_tree_node_prompt_box)},o.default.createElement(Oe.ProxiedInput,{wrapperStyle:{height:t.FILE_TREE_NODE_HEIGHT,padding:"0 5px"}})));if(N){const Le=Oe.displayName.split(p.separator),Ne=Le.map((De,Ce)=>{const ke=Le.slice(0,Ce+1).join(p.separator),Te=Ue=>{Ue.stopPropagation(),x(Ce);const Ye=h.parent.uri.resolve(Le.slice(0,Ce+1).join(p.separator));a(Ue,h,E,Ye)},We=Ue=>{Ue.stopPropagation(),x(Ce);const Ye=h.parent.uri.resolve(Le.slice(0,Ce+1).join(p.separator));d(Ue,h,E,Ye)},pe=Ue=>{Ue.stopPropagation(),Ue.preventDefault(),O!==Ce&&(x(Ce),u.handleDragOver(Ue,h))},re=Ue=>{Ue.stopPropagation(),Ue.preventDefault(),x(-1)},ue=Ue=>{Ue.stopPropagation(),O!==Ce&&x(Ce);const Ye=h.parent.uri.resolve(Le.slice(0,Ce+1).join(p.separator));u.handleDragStart(Ue,h,Ye)},Se=Ue=>{const Ye=h.parent.uri.resolve(Le.slice(0,Ce+1).join(p.separator));u.handleDrop(Ue,h,Ye)},ye=(0,r.default)(O===Ce&&m.default.active,m.default.compact_name);return o.default.createElement("span",{key:ke},o.default.createElement("a",{className:ye,draggable:!0,onContextMenu:We,onDragStart:ue,onDragOver:pe,onDragLeave:re,onDrop:Se,onClick:Te},De),Ce!==Le.length-1?o.default.createElement("span",{className:m.default.compact_name_separator},p.separator):null)});return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_displayname)},Ne)}return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_displayname)},c.getName(Oe.uri)||Oe.displayName)},fe=()=>o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_tail)},te()),te=()=>j?o.default.createElement("div",{className:m.default.file_tree_node_status},(0,v.transformLabelWithCodicon)(j.badge.slice(),{color:"inherit"},M.fromString.bind(M))):null,ge=Oe=>{if(T)return null;if(oe)return me(Oe,X);if(L)return me(Oe,()=>{})},Re=()=>{let Oe=h.tooltip;return j&&j.badge&&(Oe+=` \u2022 ${j.tooltip}`),Oe};return o.default.createElement("div",{key:h.id,onClick:Q,onDoubleClick:G,onContextMenu:$,onDragStart:V,onDragOver:Z,onDragEnter:K,onDragLeave:H,onDrop:Y,title:Re(),className:(0,r.default)(W,A?A.classlist:null),style:he,draggable:E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode,"data-id":h.id},o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_content)},ge(h),q(h),o.default.createElement("div",{className:L?m.default.file_tree_node_prompt_wrap:m.default.file_tree_node_overflow_wrap},be(h)),fe()))};t.FileTreeNode=s,t.FILE_TREE_NODE_HEIGHT=22,t.FILE_TREE_BADGE_LIMIT=99},56384:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTree=t.FILE_TREE_FILTER_DELAY=t.FILTER_AREA_HEIGHT=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),v=e(41869),_=e(68974),m=e(24429),p=e(87420),s=e(6250),h=e(46377),a=n.__importDefault(e(2613)),g=e(97738);t.FILTER_AREA_HEIGHT=30,t.FILE_TREE_FILTER_DELAY=500;const d=(0,l.RecycleTreeFilterDecorator)(l.RecycleTree),u=({viewState:f})=>{const[c,y]=(0,o.useState)(!1),[b,A]=(0,o.useState)(!0),[S,w]=(0,o.useState)(!1),[I,D]=(0,o.useState)(!1),[T,R]=(0,o.useState)(),M=(0,o.useRef)(null),O=(0,o.useRef)(new v.DisposableCollection),{height:x}=f,k=(0,v.useInjectable)(s.IFileTreeService),{iconService:F,locationToCurrentFile:L,filterMode:N,indent:U,baseIndent:W}=k,j=(0,v.useInjectable)(g.FileTreeModelService),[Q,G]=(0,o.useState)({indent:U,baseIndent:W}),[X,$]=(0,o.useState)(N),[V,H]=(0,o.useState)(F.currentTheme||{hasFolderIcons:!0,hasFileIcons:!0,hidesExplorerArrows:!0}),K=(0,o.useCallback)(ke=>Y(ke)?!1:ke.shiftKey,[]),Y=(0,o.useCallback)(ke=>{const{metaKey:Te,ctrlKey:We}=ke;return v.isOSX&&Te||We},[]),Z=(0,o.useCallback)((ke,Te,We,pe)=>{ke.stopPropagation();const{handleItemClick:re,handleItemToggleClick:ue,handleItemRangeClick:Se}=j;if(!Te)return;const ye=K(ke),Ue=Y(ke);ye?Se(Te,We):Ue?ue(Te,We):re(Te,We,pe)},[]),oe=(0,o.useCallback)((ke,Te,We)=>{ke.stopPropagation();const{handleItemDoubleClick:pe}=j;Te&&pe(Te,We)},[]),ie=(0,o.useCallback)((ke,Te)=>{ke.stopPropagation();const{toggleDirectory:We}=j;We(Te)},[]);(0,o.useEffect)(()=>{c&&j.onFileTreeModelChange(async ke=>{A(!0),ke&&(await ke.ensureReady,M.current&&k.initContextKey(M.current)),R(ke),A(!1)})},[c,M.current,k]),(0,o.useEffect)(()=>{var ke,Te,We;const pe=new v.CancellationTokenSource;return q(pe.token),(ke=O.current)===null||ke===void 0||ke.push(F.onThemeChange(re=>{H(re)})),(Te=O.current)===null||Te===void 0||Te.push(k.onTreeIndentChange(({indent:re,baseIndent:ue})=>{G({indent:re,baseIndent:ue})})),(We=O.current)===null||We===void 0||We.push(k.onFilterModeChange(re=>{$(re)})),()=>{var re;pe.cancel(),(re=O.current)===null||re===void 0||re.dispose()}},[]);const he=(0,o.useCallback)((ke,Te)=>{let We;if(ke&&Te)for(We=ke.parentNode;We;){if(Te===We)return!0;We=We.parentNode}return!1},[]),me=(0,o.useCallback)(ke=>{he(ke.relatedTarget,M.current)||!ke.relatedTarget||(w(!1),j.handleTreeBlur())},[M.current]);(0,o.useEffect)(()=>{X||(j.fileTreeHandle&&j.fileTreeHandle.clearFilter(),j.selectedFiles.length===1&&j.location(j.selectedFiles[0].uri))},[X]),(0,o.useEffect)(()=>{const ke=new v.DisposableCollection;return T&&(ke.push(j.onDidFocusedFileChange(Te=>{Te?Te.isEqual((T?.root).uri)?S||w(!S):S&&w(!S):Te||S&&w(!S)})),ke.push(j.onDidContextMenuFileChange(Te=>{Te?Te.isEqual((T?.root).uri)?S||w(!S):S&&w(!S):Te||S&&w(!S)}))),()=>{ke.dispose()}},[T,S]);const q=(0,o.useCallback)(async ke=>{var Te;if(await j.whenReady,!ke.isCancellationRequested){if(j.treeModel){if(await j.treeModel.ensureReady,R(j.treeModel),ke.isCancellationRequested)return;M.current&&k.initContextKey(M.current)}A(!1),!((Te=O.current)===null||Te===void 0)&&Te.disposed||y(!0)}},[j,O.current]),be=(0,o.useCallback)(ke=>{j.handleTreeHandler({...ke,getModel:()=>j.treeModel,hasDirectFocus:()=>M.current===document.activeElement})},[M.current,T]),fe=(0,o.useCallback)(()=>{const{handleItemClick:ke}=j;ke()},[]),te=(0,o.useCallback)(()=>{j.handleDblClick()},[]),ge=(0,o.useCallback)(()=>{const{handleTreeFocus:ke}=j;ke()},[]),Re=(0,o.useCallback)(ke=>{const{handleContextMenu:Te}=j;Te(ke)},[]),Oe=(0,o.useCallback)(ke=>{ke.stopPropagation(),ke.preventDefault()},[]),Le=(0,o.useCallback)(ke=>{ke.preventDefault(),D(!0)},[]),Ne=(0,o.useCallback)(()=>{D(!1)},[]),De=(0,o.useCallback)(ke=>{const{handleDrop:Te}=j.dndService;D(!1),Te(ke)},[]),Ce=(0,o.useCallback)((ke,Te,We,pe)=>{const{handleContextMenu:re}=j;re(ke,Te,pe)},[]);return o.default.createElement("div",{className:(0,r.default)(a.default.file_tree,I&&a.default.outer_drag_over,S&&a.default.outer_active),tabIndex:-1,ref:M,onClick:fe,onDoubleClick:te,onFocus:ge,onBlur:me,onContextMenu:Re,draggable:!0,onDragStart:Oe,onDragLeave:Ne,onDragOver:Le,onDrop:De},o.default.createElement(E,{isLoading:b,isReady:c,height:x,model:T,iconTheme:V,treeIndent:Q,filterMode:X,locationToCurrentFile:L,onTreeReady:be,onContextMenu:Ce,onItemClick:Z,onItemDoubleClick:oe,onTwistierClick:ie}))};t.FileTree=u;const E=(0,o.memo)(({isReady:f,isLoading:c,height:y,model:b,filterMode:A,treeIndent:S,iconTheme:w,onTreeReady:I,onItemClick:D,onItemDoubleClick:T,onContextMenu:R,onTwistierClick:M})=>{const O=(0,v.useInjectable)(s.IFileTreeService),x=(0,v.useInjectable)(p.IIconService),{decorationService:k,labelService:F,locationToCurrentFile:L}=O,N=(0,v.useInjectable)(g.FileTreeModelService),U=(0,o.useCallback)(W=>o.default.createElement(h.FileTreeNode,{item:W.item,itemType:W.itemType,template:W.template,decorationService:k,labelService:F,iconService:x,dndService:N.dndService,decorations:N.decorations.getDecorations(W.item),onClick:D,onDoubleClick:T,onTwistierClick:M,onContextMenu:R,defaultLeftPadding:S.baseIndent,leftPadding:S.indent,hasPrompt:W.hasPrompt,hasFolderIcons:w.hasFolderIcons,hasFileIcons:w.hasFileIcons,hidesExplorerArrows:w.hidesExplorerArrows}),[b,S,w]);return f?c?o.default.createElement(_.Progress,{loading:!0}):b?o.default.createElement(d,{height:y,itemHeight:h.FILE_TREE_NODE_HEIGHT,onReady:I,model:b,filterEnabled:A,filterAfterClear:L,filterAutoFocus:!0,leaveBottomBlank:!0},U):o.default.createElement(m.WelcomeView,{viewId:s.FILE_EXPLORER_WELCOME_ID}):o.default.createElement(_.Progress,{loading:!0})});E.displayName="FileTreeView"},57781:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeService=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(41869),v=e(18193),_=e(26542),m=e(42933),p=e(52416),s=e(51500),h=e(6250),a=e(69959),g=e(88014),d=e(93239),{Path:u}=l.path;let E=class extends o.Tree{constructor(){super(...arguments),this._fileServiceWatchers=new Map,this._symbolicFiles=new Map,this._changeEventDispatchQueue=new Set,this._readyToWatch=!1,this._watchRootsQueue=[],this.effectedNodes=[],this.onWorkspaceChangeEmitter=new l.Emitter,this.onTreeIndentChangeEmitter=new l.Emitter,this.onFilterModeChangeEmitter=new l.Emitter,this.onNodeRefreshedEmitter=new l.Emitter,this._filterMode=!1,this._refreshable=!0,this.refreshEffectNode=()=>{const c=this.effectedNodes.slice(0);if(this.effectedNodes=[],c.find(b=>a.Directory.isRoot(b)))this.refresh();else for(const b of c)this.refresh(b)},this.flushEventQueue=async()=>{if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.size===0)return;const c=Array.from(this._changeEventDispatchQueue),y=this.sortPaths(c);(!this.refreshCancelToken||this.refreshCancelToken.token.isCancellationRequested)&&(this.refreshCancelToken=new l.CancellationTokenSource);const b=(0,l.pSeries)(y.map(A=>async()=>{a.Directory.is(A.node)&&await A.node.refresh(this.refreshCancelToken)}));return this._changeEventDispatchQueue.clear(),await b},this.locationToCurrentFile=()=>{this.commandService.executeCommand(l.FILE_COMMANDS.LOCATION.id)}}get onNodeRefreshed(){return this.onNodeRefreshedEmitter.event}get refreshable(){return this._refreshable}get filterMode(){return this._filterMode}get baseIndent(){return this._baseIndent}get indent(){return this._indent}get onWorkspaceChange(){return this.onWorkspaceChangeEmitter.event}get onTreeIndentChange(){return this.onTreeIndentChangeEmitter.event}get onFilterModeChange(){return this.onFilterModeChangeEmitter.event}get isCompactMode(){return this._isCompactMode}get contextKey(){return this.fileContextKey}async init(){this._roots=await this.workspaceService.roots,await this.preferenceService.ready,this._baseIndent=this.preferenceService.getValid("explorer.fileTree.baseIndent",8),this._indent=this.preferenceService.getValid("explorer.fileTree.indent",8),this._isCompactMode=this.preferenceService.getValid("explorer.compactFolders",!0),this.toDispose.push(this.workspaceService.onWorkspaceChanged(c=>{this._roots=c;const y=new l.URI(c[0].uri),b=new a.Directory(this,void 0,y,y.displayName,c[0],this.fileTreeAPI.getReadableTooltip(y));this.root=b,this.onWorkspaceChangeEmitter.fire(b),this.refresh()})),this.toDispose.push(this.workspaceService.onWorkspaceFileExcludeChanged(()=>{this.refresh()})),this.toDispose.push(l.Disposable.create(()=>{var c;(c=this._root)===null||c===void 0||c.dispose(),this._roots=null})),this.toDispose.push(this.corePreferences.onPreferenceChanged(c=>{c.preferenceName==="explorer.fileTree.baseIndent"?(this._baseIndent=c.newValue||8,this.onTreeIndentChangeEmitter.fire({indent:this.indent,baseIndent:this.baseIndent})):c.preferenceName==="explorer.fileTree.indent"?(this._indent=c.newValue||8,this.onTreeIndentChangeEmitter.fire({indent:this.indent,baseIndent:this.baseIndent})):c.preferenceName==="explorer.compactFolders"&&(this._isCompactMode=c.newValue,this.refresh())}))}initContextKey(c){this.fileContextKey.initScopedContext(c)}startWatchFileEvent(){return this._readyToWatch=!0,Promise.all(this._watchRootsQueue.map(c=>this.watchFilesChange(c)))}async resolveChildren(c){var y,b,A,S;let w=[];if(c){if(a.Directory.isRoot(c)&&this.isMultipleWorkspace){const I=await this.workspaceService.roots;for(const D of I){const T=this.fileTreeAPI.toNode(this,D,c,this.workspaceService.getWorkspaceName(new l.URI(D.uri)));this.watchFilesChange(new l.URI(D.uri)),w=w.concat(T),(T.filestat.isSymbolicLink||T.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(T.filestat.uri,T)}return w}if(c.uri){const I=await this.fileTreeAPI.resolveChildren(this,c.uri.toString(),c,this.isCompactMode&&!a.Directory.isRoot(c));w=I.children,w.forEach(T=>{(T.filestat.isSymbolicLink||T.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(T.filestat.uri,T)});const D=I.filestat;if(D&&this.isCompactMode&&!a.Directory.isRoot(c)){const T=new l.URI(D.uri),R=c.parent;if(c&&R){let M=c.name;if(c.filestat.isSymbolicLink){const O=(b=new l.URI(c.filestat.realUri).relative(T))===null||b===void 0?void 0:b.toString();O&&(M=O,M=[c.uri.displayName].concat(M.split(u.separator)).join(u.separator))}else R.filestat.isSymbolicLink?M=(A=new l.URI(R.filestat.realUri).relative(T))===null||A===void 0?void 0:A.toString():M=(S=R.uri.relative(T))===null||S===void 0?void 0:S.toString();M&&M!==c.name&&c.updateMetaData({name:M,uri:T,tooltip:this.fileTreeAPI.getReadableTooltip(T),fileStat:D})}}return w}}else if(this._roots||(this._roots=await this.workspaceService.roots),this.isMultipleWorkspace){const I=new l.URI((y=this.workspaceService.workspace)===null||y===void 0?void 0:y.uri);let D=I.displayName;D=D.slice(0,D.lastIndexOf("."));const T={...this.workspaceService.workspace,isDirectory:!0},R=new a.Directory(this,void 0,I,D,T,this.fileTreeAPI.getReadableTooltip(I));return this.root=R,[R]}else if(this._roots.length>0)return w=await(await this.fileTreeAPI.resolveChildren(this,this._roots[0])).children,w.forEach(I=>{const D=this.workspaceService.getWorkspaceName(I.uri);D&&D!==I.name&&I.updateMetaData({name:D}),(I.filestat.isSymbolicLink||I.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(I.filestat.uri,I)}),this.watchFilesChange(new l.URI(this._roots[0].uri)),this.root=w[0],w;return[]}async watchFilesChange(c){if(!this._readyToWatch){this._watchRootsQueue.push(c);return}const y=await this.fileServiceClient.watchFileChanges(c);this.toDispose.push(y),this.toDispose.push(y.onFilesChanged(b=>{this.onFilesChanged(b)})),this._fileServiceWatchers.set(c.toString(),y)}updateRefreshable(c){var y;c!==this.refreshable&&(this._refreshable=c,this._refreshable?this.doHandleQueueChange():(y=this.refreshCancelToken)===null||y===void 0||y.cancel())}isContentFile(c){return!!c&&"filestat"in c&&!c.filestat.isDirectory}isFileContentChanged(c){return c.type===m.FileChangeType.UPDATED&&this.isContentFile(this.getNodeByPathOrUri(c.uri))}getAffectedChanges(c){const y=[];for(const b of c)this.isFileContentChanged(b)||y.push(b);return y}isRootAffected(c){return this._roots?c.some(y=>y.type>m.FileChangeType.UPDATED&&this._roots&&this._roots.find(b=>y.uri.indexOf(b.uri)>=0)):!1}async onFilesChanged(c){const y=await this.getAffectedNodes(this.getAffectedChanges(c));return y.length>0?this.effectedNodes=this.effectedNodes.concat(y):!(y.length>0)&&this.isRootAffected(c)&&this.effectedNodes.push(this.root),this.refreshEffectNode()}async getFileTreeNodePathByUri(c){var y,b,A,S,w,I;if(!c)return;let D;if(this.isMultipleWorkspace){if(this._roots||(this._roots=await this.workspaceService.roots),D=(S=this._roots.find(T=>new l.URI(T.uri).isEqualOrParent(c)))===null||S===void 0?void 0:S.uri,D){const T=new l.URI(D);if(T.isEqualOrParent(c))return new u(((w=this.root)===null||w===void 0?void 0:w.path)||"/").join(T.displayName).join(((I=T.relative(c))===null||I===void 0?void 0:I.toString())||"").toString()}}else if(D=(y=this.workspaceService.workspace)===null||y===void 0?void 0:y.uri,D){const T=new l.URI(D);if(T.isEqualOrParent(c))return new u(((b=this.root)===null||b===void 0?void 0:b.path)||"").join(((A=T.relative(c))===null||A===void 0?void 0:A.toString())||"").toString()}}async moveNodeByPath(c,y,b,A,S=o.TreeNodeType.TreeNode){const w=new u(c.path).join(b).toString(),I=new u(y.path).join(A).toString();if(w&&I&&I!==w){const D=c.moveNode(w,I);return D&&a.File.is(D)&&(D.updateMetaData({uri:y.uri.resolve(A),fileStat:{...y.filestat,uri:y.uri.resolve(A).toString(),isDirectory:S!==o.TreeNodeType.TreeNode},tooltip:this.fileTreeAPI.getReadableTooltip(y.uri.resolve(A))}),a.Directory.is(D)&&this.updateChildren(D)),D}}async updateChildren(c){const y=c.children;if(!(!y||y.length===0)){for(const b of y)if(a.File.is(b)){const A=c.uri.resolve(b.uri.displayName);b.updateMetaData({uri:A,fileStat:{...b.filestat,uri:A.toString(),isDirectory:!!a.Directory.is(b)},tooltip:this.fileTreeAPI.getReadableTooltip(A)}),a.Directory.is(b)&&this.updateChildren(b)}}}async addNode(c,y,b){let A,S;const w=u.splitPath(y);if(w.length>1){let D=c.uri;for(const T of w)D=D.resolve(T);!this.isCompactMode||a.Directory.isRoot(c)?S=w[0]:b===o.TreeNodeType.CompositeTreeNode?S=y:S=w.slice(0,w.length-1).join(u.separator)}else S=y;A={uri:c.uri.resolve(S).toString(),isDirectory:b===o.TreeNodeType.CompositeTreeNode||w.length>1,isSymbolicLink:!1,lastModification:new Date().getTime()};const I=await this.fileTreeAPI.toNode(this,A,c,S);return I&&c.addNode(I),I}async deleteAffectedNodeByPath(c,y){var b,A;const S=this.getNodeByPathOrUri(c);S&&S.parent&&(this.isCompactMode&&!y?((b=S.parent.children)===null||b===void 0?void 0:b.length)===2?this.refresh((A=S.parent)===null||A===void 0?void 0:A.parent):this.refresh(S.parent):S.parent.removeNode(S.path))}async deleteAffectedNodes(c,y=[]){const b=[];for(const A of c){const S=this.getNodeByPathOrUri(A);S&&a.File.is(S)&&b.push(S)}for(const A of b)!A?.parent||this._changeEventDispatchQueue.has(A?.parent.path)||await this.deleteAffectedNodeByPath(A.path);return y.filter(A=>A.type!==m.FileChangeType.DELETED)}async getAffectedNodes(c){const y=[];for(const b of c){const A=new l.URI(b.uri),S=this.getNodeByPathOrUri(A.parent);S&&y.push(S)}return y}isFileURI(c){return/^file:\/\//.test(c)}getNodeByPathOrUri(c){var y,b,A,S;let w,I;if(typeof c!="string"?(I=c,c=c.toString()):this.isFileURI(c)?I=new l.URI(c):!this.isFileURI(c)&&typeof c=="string"&&(w=c),this.isFileURI(c)&&I){if(this._symbolicFiles.has(I?.toString()))return this._symbolicFiles.get(I.toString());let D;if(this.isMultipleWorkspace?this._roots&&(D=(b=this._roots.find(T=>new l.URI(T.uri).isEqualOrParent(I)))===null||b===void 0?void 0:b.uri):D=(y=this.workspaceService.workspace)===null||y===void 0?void 0:y.uri,this.root&&D){const T=new l.URI(D);if(T.isEqualOrParent(I)){const R=T.relative(I);R&&(this.isMultipleWorkspace?w=new u(this.root.path).join(T.displayName).join(R.toString()).toString():w=new u(this.root.path).join(R.toString()).toString())}}}if(w){const D=(A=this.root)===null||A===void 0?void 0:A.getTreeNodeByPath(w);if(!D){let T;const R=w.split(u.separator);for(;R.length>=1;){R.pop();const M=R.join(u.separator);if(T=(S=this.root)===null||S===void 0?void 0:S.getTreeNodeByPath(M),T)break}if(T&&a.Directory.is(T)){for(const M of T.children||[])if(M.path.includes(w))return M}}return D}}sortComparator(c,y){return c.constructor===y.constructor?c.name.localeCompare(y.name,"en",{numeric:!0}):c.type===o.TreeNodeType.CompositeTreeNode?-1:y.type===o.TreeNodeType.CompositeTreeNode?1:0}get contextMenuContextKeyService(){return this.fileContextKey?this.fileContextKey.service:this.contextKeyService}get isMultipleWorkspace(){return!!this.workspaceService.workspace&&!this.workspaceService.workspace.isDirectory}getDisplayName(c){return this.workspaceService.getWorkspaceName(c)}async refresh(c=this.root){if(c)return a.Directory.is(c)||a.File.is(c)&&c.parent&&(c=c.parent),this._changeEventDispatchQueue.add(c.path),this.doHandleQueueChange()}async doHandleQueueChange(){if(this.refreshable)try{await this.flushEventQueue()}catch(c){this.logger.error("flush file change event queue error:",c)}finally{this.onNodeRefreshedEmitter.fire()}}sortPaths(c){const b=c.slice().map(S=>({node:this.getNodeByPathOrUri(S),path:S})).filter(S=>S&&!!S.node);c.length>1&&b.sort((S,w)=>{var I,D;const T=((I=S.node)===null||I===void 0?void 0:I.depth)||0,R=((D=w.node)===null||D===void 0?void 0:D.depth)||0;return T-R});const A=[];for(let S=b.length-1;S>=0;S--){const w=b[S];let I=!1;for(let D=0;D<S;D++){const T=b[D];a.Directory.is(T)&&w.node.path.startsWith(T.node.path)&&(I=!0)}I||A.push(w)}return A}openFile(c){const y=this.preferenceService.get("editor.previewMode");this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,c,{disableNavigate:!0,preview:y})}openAndFixedFile(c){this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,c,{disableNavigate:!0,preview:!1,focus:!0})}openToTheSide(c){this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,c,{disableNavigate:!0,split:4})}compare(c,y){this.commandService.executeCommand(l.EDITOR_COMMANDS.COMPARE.id,{original:c,modified:y})}toggleFilterMode(){var c;this._filterMode=!this.filterMode,this.onFilterModeChangeEmitter.fire(this.filterMode),(c=this.fileContextKey)===null||c===void 0||c.filesExplorerFilteredContext.set(this.filterMode),this.filterMode===!1&&this.commandService.executeCommand(l.FILE_COMMANDS.LOCATION.id)}};t.FileTreeService=E,n.__decorate([(0,r.Autowired)(h.IFileTreeAPI),n.__metadata("design:type",Object)],E.prototype,"fileTreeAPI",void 0),n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],E.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(l.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],E.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(v.CorePreferences),n.__metadata("design:type",Object)],E.prototype,"corePreferences",void 0),n.__decorate([(0,r.Autowired)(l.PreferenceService),n.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(_.LabelService),n.__metadata("design:type",_.LabelService)],E.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(d.FileTreeDecorationService),n.__metadata("design:type",d.FileTreeDecorationService)],E.prototype,"decorationService",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],E.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(p.IIconService),n.__metadata("design:type",Object)],E.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(g.FileContextKey),n.__metadata("design:type",g.FileContextKey)],E.prototype,"fileContextKey",void 0),t.FileTreeService=E=n.__decorate([(0,r.Injectable)()],E)},83709:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeNextModule=void 0;const n=e(85608),r=e(41869),o=e(72665),l=e(41103),v=e(6250),_=e(89508),m=e(40439),p=e(57781),s=e(88808),h=e(93239),a=e(97738),g=e(24861);let d=class extends r.BrowserModule{constructor(){super(...arguments),this.providers=[{token:v.IFileTreeAPI,useClass:s.FileTreeAPI},{token:h.FileTreeDecorationService,useClass:h.FileTreeDecorationService},{token:v.IFileTreeService,useClass:p.FileTreeService},{token:a.FileTreeModelService,useClass:a.FileTreeModelService},{token:o.IWindowDialogService,useClass:_.WindowDialogServiceImpl},m.FileTreeContribution]}};t.FileTreeNextModule=d,t.FileTreeNextModule=d=n.__decorate([(0,r.Domain)(g.name),(0,r.ModuleDependencies)([l.WorkspaceModule])],d)},88808:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeAPI=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),v=e(42933),_=e(72665),m=e(26199),p=e(69959);let s=class{constructor(){this.onDidResolveChildrenEmitter=new l.Emitter,this.onDidResolveChildren=this.onDidResolveChildrenEmitter.event}async resolveChildren(a,g,d,u){var E;let f;if(!this.userhomePath){const c=await this.fileServiceClient.getCurrentUserHome();c&&(this.userhomePath=new l.URI(c.uri))}if(typeof g=="string"?f=await this.fileServiceClient.getFileStat(g):f=await this.fileServiceClient.getFileStat(g.uri),f){if(this.onDidResolveChildrenEmitter.fire(f.uri.toString()),((E=f.children)===null||E===void 0?void 0:E.length)===1&&f.children[0].isDirectory&&u)return await this.resolveChildren(a,f.children[0].uri,d,u);{const c={...f,isInSymbolicDirectory:d?.filestat.isSymbolicLink||d?.filestat.isInSymbolicDirectory};return{children:this.toNodes(a,c,d),filestat:c}}}else return{children:[],filestat:null}}async resolveNodeByPath(a,g,d){const u=await this.fileServiceClient.getFileStat(g);if(u)return this.toNode(a,u,d)}async resolveFileStat(a){return await this.fileServiceClient.getFileStat(a.toString())}toNodes(a,g,d){if(d){if(g.children)return g.children.map(u=>this.toNode(a,u,d))}else return[this.toNode(a,g,d)];return[]}toNode(a,g,d,u){var E;const f=new l.URI(g.uri),c=u||f.displayName;let y;return g.isInSymbolicDirectory=(E=d?.filestat.isSymbolicLink)!==null&&E!==void 0?E:d?.filestat.isInSymbolicDirectory,g.isDirectory?y=new p.Directory(a,d,f,c,g,this.getReadableTooltip(f)):y=new p.File(a,d,f,c,g,this.getReadableTooltip(f)),y}async mvFiles(a,g){const d=[];for(const f of a)if(f.url.isEqualOrParent(g))return;const u=a.sort((f,c)=>f.toString().length-c.toString().length),E=[];for(const f of u)E.length>0&&E.find(c=>c.url.isEqualOrParent(f.url))||E.push(f);if(this.corePreferences["explorer.confirmMove"]){const f=(0,l.localize)("file.confirm.move.ok"),c=(0,l.localize)("file.confirm.move.cancel");if(await this.dialogService.warning((0,l.formatLocalize)("file.confirm.move",`[ ${E.map(b=>b.url.displayName).join(",")} ]`,g.displayName),[c,f])!==f)return}for(const f of E){const c=await this.mv(f.url,g.resolve(f.url.displayName),f.isDirectory);c&&d.push(c)}return d}async mv(a,g,d=!1){try{await this.workspaceEditService.apply({edits:[{newResource:g,oldResource:a,options:{isDirectory:d,overwrite:!0}}]})}catch(u){return u.message}}async createFile(a,g){try{await this.workspaceEditService.apply({edits:[{newResource:a,options:{content:g}}]})}catch(d){return d.message}this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,focus:!0})}async createDirectory(a){try{await this.workspaceEditService.apply({edits:[{newResource:a,options:{isDirectory:!0}}]})}catch(g){return g.message}}async delete(a){try{await this.workspaceEditService.apply({edits:[{oldResource:a,options:{}}]});return}catch(g){return g.message}}async copyFile(a,g){let d=1,u;try{u=await this.fileServiceClient.access(g.toString())}catch(E){return E.message}for(;u;){const E=g.displayName.replace(/\Wcopy\W\d+/,""),f=l.path.extname(E),y=`${l.path.basename(E,f)} copy ${d}${f}`;g=g.parent.resolve(y),d++;try{u=await this.fileServiceClient.access(g.toString())}catch{return}}try{return await this.fileServiceClient.copy(a.toString(),g.toString())}catch(E){return E.message}}getReadableTooltip(a){const g=a.toString(),d=this.userhomePath&&this.userhomePath.toString();return this.userhomePath&&this.userhomePath.isEqualOrParent(a)?decodeURIComponent(g.replace(d,"~")):decodeURIComponent(a.withScheme("").toString())}};t.FileTreeAPI=s,n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(m.IWorkspaceEditService),n.__metadata("design:type",Object)],s.prototype,"workspaceEditService",void 0),n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],s.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.CorePreferences),n.__metadata("design:type",Object)],s.prototype,"corePreferences",void 0),n.__decorate([(0,r.Autowired)(_.IDialogService),n.__metadata("design:type",Object)],s.prototype,"dialogService",void 0),t.FileTreeAPI=s=n.__decorate([(0,r.Injectable)()],s)},93239:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDecorationService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(41893),v=e(52416);let _=class{constructor(){this.disposeCollection=new o.DisposableCollection,this.onDidChangeEmitter=new o.Emitter,this.cacheDecorations=new Map,this.disposeCollection.pushAll([this.decorationsService.onDidChangeDecorations(p=>{var s,h,a;const g=(h=(s=p._data)===null||s===void 0?void 0:s._iter)===null||h===void 0?void 0:h._value;if(g){const d=new o.URI(g),u=this.getDecoration(d);this.cacheDecorations.has(g)?((a=this.cacheDecorations.get(g))===null||a===void 0?void 0:a.tooltip)!==u?.tooltip&&this.onDidChangeEmitter.fire():(this.cacheDecorations.set(g,u),this.onDidChangeEmitter.fire())}}),this.themeService.onThemeChange(()=>{this.onDidChangeEmitter.fire()})])}get onDidChange(){return this.onDidChangeEmitter.event}getDecoration(p,s=!1){p instanceof o.URI&&(p=o.Uri.parse(p.toString()));const h=this.decorationsService.getDecoration(p,s);return h?{...h,color:this.themeService.getColor({id:h.color})}:{color:"",tooltip:"",badge:""}}dispose(){this.disposeCollection.dispose()}};t.FileTreeDecorationService=_,n.__decorate([(0,r.Autowired)(l.IDecorationsService),n.__metadata("design:type",l.IDecorationsService)],_.prototype,"decorationsService",void 0),n.__decorate([(0,r.Autowired)(v.IThemeService),n.__metadata("design:type",Object)],_.prototype,"themeService",void 0),t.FileTreeDecorationService=_=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],_)},30577:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DragAndDropService=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(53622),m=e(14951),p=e(72665),s=e(51500),h=e(6250),a=e(69959),g=r.__importDefault(e(89200)),d=r.__importDefault(e(2613)),u=e(57781),E=e(97738);let f=n=class extends v.WithEventBus{constructor(y){super(),this.model=y,this.toCancelNodeExpansion=new v.DisposableCollection,this.beingDraggedDec=new l.Decoration(g.default.mod_dragging),this.draggedOverDec=new l.Decoration(g.default.mod_dragover),this.beingDraggedNodes=[],this.dragOverTrigger=new v.ThrottledDelayer(n.MS_TILL_DRAGGED_OVER_EXPANDS),this.handleDragStart=(b,A,S)=>{b.stopPropagation();const w=R=>{this.handleDragEnd(R,A)};b.currentTarget.addEventListener("dragend",w,!1);let I=this.model.selectedFiles,D=!1;for(const R of I)R&&R.id===A.id&&(D=!0);D||(I=[A]),this.beingDraggedNodes=I,this.beingDraggedActiveUri=S;const T=I.find(R=>!a.Directory.is(R));if(T&&b.dataTransfer.setData("uri",T.uri.toString()),b.dataTransfer.setData("beingDraggedNodes",JSON.stringify(this.beingDraggedNodes.map(R=>R.uri.toString()))),T){const R=T;R.uri.scheme==="file"&&b.dataTransfer.setData("DownloadURL",`application/octet-stream:${R.displayName}:data:application/octet-stream;base64,${(0,v.encodeBase64)(v.BinaryBuffer.fromString(R.filestat.uri))}`)}if(I.forEach(R=>{this.beingDraggedDec.addTarget(R,l.TargetMatchMode.Self)}),b.dataTransfer){let R;I.length===1?R=S?S.displayName:typeof A.name=="string"?A.name:"":R=String(I.length);const M=document.createElement("div");M.className=d.default.file_tree_drag_image,M.textContent=R,document.body.appendChild(M),b.dataTransfer.setDragImage(M,-10,-10),setTimeout(()=>document.body.removeChild(M),0)}},this.handleDragEnter=(b,A)=>{b.stopPropagation(),b.preventDefault()},this.handleDragLeave=(b,A)=>{b.preventDefault(),b.stopPropagation(),this.toCancelNodeExpansion.dispose(),this.potentialParent&&(this.draggedOverDec.removeTarget(this.potentialParent),this.model.treeModel.dispatchChange())},this.handleDragOver=(b,A)=>{if(b.preventDefault(),b.stopPropagation(),!this.toCancelNodeExpansion.disposed||this.beingDraggedNodes.indexOf(A)>=0)return;this.draggedOverNode=A;const S=a.Directory.is(A)&&A.expanded?A:A.parent;(this.potentialParent!==S||!this.draggedOverDec.hasTarget(S))&&(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=S,this.draggedOverDec.addTarget(this.potentialParent,l.TargetMatchMode.SelfAndChildren),this.model.treeModel.dispatchChange()),this.potentialParent!==A&&a.Directory.is(A)&&(this.dragOverTrigger.trigger(async()=>{A.expanded?(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=A,this.draggedOverDec.addTarget(this.potentialParent,l.TargetMatchMode.SelfAndChildren)):(await A.setExpanded(!0),this.draggedOverNode===A&&(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=A,this.draggedOverDec.addTarget(this.potentialParent,l.TargetMatchMode.SelfAndChildren))),this.model.treeModel.dispatchChange()}),this.toCancelNodeExpansion.push(v.Disposable.create(()=>{this.dragOverTrigger.isTriggered()||this.dragOverTrigger.cancel()})))},this.handleDrop=async(b,A,S)=>{var w,I;this.eventBus.fire(new _.FileTreeDropEvent({event:b.nativeEvent,targetDir:S?S.codeUri.path:A&&A instanceof a.File?(w=A.parent)===null||w===void 0?void 0:w.uri.codeUri.path:A?A.uri.codeUri.path:new v.URI((I=this.workspaceService.workspace)===null||I===void 0?void 0:I.uri).codeUri.path}));try{b.preventDefault(),b.stopPropagation(),b.dataTransfer.dropEffect="copy";let D;const T=!!this.beingDraggedActiveUri;this.fileTreeService.isCompactMode&&S&&!A?.uri.isEqual(S)?D=null:A?D=a.Directory.is(A)?A:A.parent:D=this.root;let R;if(this.beingDraggedActiveUri){const M=this.fileTreeService.getNodeByPathOrUri(this.beingDraggedActiveUri);R=[new a.Directory(this.fileTreeService,M?.parent,this.beingDraggedActiveUri,this.beingDraggedActiveUri.displayName,{uri:this.beingDraggedActiveUri.toString(),isDirectory:!0,lastModification:new Date().getTime()},this.beingDraggedActiveUri.displayName)]}else if(R=this.beingDraggedNodes,!R||R.length===0)try{const M=JSON.parse(b.dataTransfer.getData("beingDraggedNodes"));M&&M.length!==0&&(R=M.map(O=>this.fileTreeService.getNodeByPathOrUri(new v.URI(O))).filter(Boolean),R.length||(R=await Promise.all(M.map(async O=>{const x=new v.URI(O);let k;const F=await this.filesystem.getFileStat(x.toString());return F?.isDirectory?k=new a.Directory(this.fileTreeService,this.root,x,x.displayName,{uri:x.toString(),isDirectory:!0,lastModification:new Date().getTime()},x.displayName):k=new a.File(this.fileTreeService,this.root,x,x.displayName,{uri:x.toString(),isDirectory:!0,lastModification:new Date().getTime()},x.displayName),k}))))}catch{}if(R.length>0){const M=S||D&&D.uri,O=R.filter(x=>x&&x.parent&&(this.beingDraggedActiveUri?!x.parent.uri.isEqual(M):!0));if(O.length>0){const x=await this.fileTreeAPI.mvFiles(O.map(k=>({url:k.uri,isDirectory:k.filestat.isDirectory})),M);if(x&&x.length>0)x.forEach(k=>{this.messageService.error(k)});else if(x){if(D)if(this.fileTreeService.isCompactMode&&T){for(const k of O)this.fileTreeService.refresh(k.parent);this.fileTreeService.refresh(D)}else for(const k of O){const F=D.uri.resolve(k.name);this.fileTreeService.moveNodeByPath(k.parent,D,k.name,k.name,k.type),k.updateMetaData({name:F.displayName,fileStat:{...k.filestat,uri:F.toString()},uri:F,tooltip:this.fileTreeAPI.getReadableTooltip(F)}),a.Directory.is(k)&&this.fileTreeService.refresh(k)}else if(A){if(this.fileTreeService.isCompactMode&&T)for(const k of O)this.fileTreeService.refresh(k.parent);else for(const k of O)this.fileTreeService.deleteAffectedNodeByPath(k.path);this.fileTreeService.refresh(A.parent)}}else return}}A&&this.beingDraggedDec.removeTarget(A),this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(M=>{this.beingDraggedDec.removeTarget(M)}),this.beingDraggedNodes=[],this.beingDraggedActiveUri=void 0,this.potentialParent=null,this.model.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()}catch(D){this.logger.error(D)}},this.handleDragEnd=(b,A)=>{this.beingDraggedDec.removeTarget(A),this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(S=>{this.beingDraggedDec.removeTarget(S)}),this.beingDraggedNodes=[],this.beingDraggedActiveUri=void 0,this.potentialParent=null,this.model.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()},this.model.decorations.addDecoration(this.beingDraggedDec),this.model.decorations.addDecoration(this.draggedOverDec)}get root(){return this.model.treeModel.root}};t.DragAndDropService=f,f.MS_TILL_DRAGGED_OVER_EXPANDS=500,r.__decorate([(0,o.Autowired)(h.IFileTreeAPI),r.__metadata("design:type",Object)],f.prototype,"fileTreeAPI",void 0),r.__decorate([(0,o.Autowired)(v.ILogger),r.__metadata("design:type",Object)],f.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(p.IMessageService),r.__metadata("design:type",Object)],f.prototype,"messageService",void 0),r.__decorate([(0,o.Autowired)(h.IFileTreeService),r.__metadata("design:type",u.FileTreeService)],f.prototype,"fileTreeService",void 0),r.__decorate([(0,o.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],f.prototype,"filesystem",void 0),r.__decorate([(0,o.Autowired)(s.IWorkspaceService),r.__metadata("design:type",Object)],f.prototype,"workspaceService",void 0),t.DragAndDropService=f=n=r.__decorate([(0,o.Injectable)(),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[E.FileTreeModelService])],f)},97738:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeModelService=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(91830),m=e(93899),p=e(26542),s=e(54414),h=e(14951),a=e(63067),g=e(75053),d=e(72665),u=e(6250),E=e(69959),f=e(2812),c=e(46377),y=r.__importDefault(e(89200)),b=e(57781),A=e(30577),{Path:S,isValidBasename:w}=v.path,{coalesce:I}=v.arrays,{trim:D,rtrim:T}=v.strings;let R=n=class{constructor(){this._isDisposed=!1,this._whenReady=new v.Deferred,this.selectedDecoration=new l.Decoration(y.default.mod_selected),this.focusedDecoration=new l.Decoration(y.default.mod_focused),this.contextMenuDecoration=new l.Decoration(y.default.mod_actived),this.loadingDecoration=new l.Decoration(y.default.mod_loading),this.cutDecoration=new l.Decoration(y.default.mod_cut),this._selectedFiles=[],this.disposableCollection=new v.DisposableCollection,this._isMultiSelected=!1,this.refreshedActionDelayer=new v.ThrottledDelayer(n.DEFAULT_REFRESHED_ACTION_DELAY),this.labelChangedDelayer=new v.ThrottledDelayer(n.DEFAULT_LABEL_CHANGED_DELAY),this.locationThrottler=new v.Throttler,this.onDidFocusedFileChangeEmitter=new v.Emitter,this.onDidContextMenuFileChangeEmitter=new v.Emitter,this.onDidSelectedFileChangeEmitter=new v.Emitter,this.onFileTreeModelChangeEmitter=new v.Emitter,this._initTreeModelReady=!1,this.clearFileSelectedDecoration=()=>{this.selectedDecoration.clearAppliedTarget(),this._selectedFiles=[]},this.activeFileDecoration=(O,x=!0)=>{this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),O&&(this.selectedFiles.length>0&&this.selectedDecoration.clearAppliedTarget(),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.selectedDecoration.addTarget(O),this.focusedDecoration.addTarget(O),this.focusedFile=O,this.selectedFiles=[O],x&&this.treeModel.dispatchChange())},this.selectFileDecoration=(O,x=!0)=>{O!==this.treeModel.root&&(this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),O&&(this.selectedFiles.length>0&&this.selectedDecoration.clearAppliedTarget(),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.selectedDecoration.addTarget(O),this._selectedFiles=[O],x&&this.treeModel.dispatchChange()))},this.activateFileActivedDecoration=O=>{this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),this.focusedFile&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this.contextMenuDecoration.addTarget(O),this.contextMenuFile=O,this.treeModel.dispatchChange()},this.activateFileFocusedDecoration=O=>{this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),this.focusedDecoration.addTarget(O),this.focusedFile=O,this.treeModel.dispatchChange()},this.activeFileFocusedDecoration=(O,x=!1)=>{O!==this.treeModel.root&&(this.focusedFile!==O&&(x?(this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.contextMenuFile=O):this.focusedFile&&(this.contextMenuFile=void 0,this.focusedDecoration.clearAppliedTarget()),O&&(this._selectedFiles.indexOf(O)<0&&(this.selectedDecoration.addTarget(O),this._selectedFiles.push(O),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri))),this.focusedDecoration.addTarget(O),this.focusedFile=O)),this.treeModel.dispatchChange())},this.toggleFileSelectedDecoration=O=>{const x=this._selectedFiles.indexOf(O);x>-1?(this.focusedFile===O&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this._selectedFiles.splice(x,1),this.selectedDecoration.clearAppliedTarget()):(this._selectedFiles.push(O),this.selectedDecoration.addTarget(O),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.focusedFile=O,this.focusedDecoration.addTarget(O)),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri)),this.treeModel.dispatchChange()},this.activeFileDecorationByRange=(O,x)=>{for(this.clearFileSelectedDecoration(),this.contextMenuFile=void 0;O<=x;O++){const k=this.treeModel.root.getTreeNodeAtIndex(O);k&&(this._selectedFiles.push(k),this.selectedDecoration.addTarget(k))}this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri)),this.treeModel.dispatchChange()},this.deactivateFileDecoration=()=>{var O;this.focusedFile&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this.contextMenuFile&&this.contextMenuDecoration.removeTarget(this.contextMenuFile),(O=this.treeModel)===null||O===void 0||O.dispatchChange()},this.toggleDirectory=async O=>{O.expanded?this.fileTreeHandle.collapseNode(O):this.fileTreeHandle.expandNode(O)},this.handleDblClick=()=>{this.commandService.executeCommand(v.FILE_COMMANDS.NEW_FILE.id)},this.handleContextMenu=(O,x,k)=>{var F;O.stopPropagation(),O.preventDefault();let L,N;x?(N=x,this._isMultiSelected?this.selectedFiles.indexOf(N)>=0?L=this.selectedFiles:L=[N]:L=[N]):(L=[this.treeModel.root],N=this.treeModel.root),this.activateFileActivedDecoration(N),this.setFileTreeContextKey(N),this.fileTreeService.isCompactMode&&k?(this._activeUri=k,(F=this.contextKey)===null||F===void 0||F.explorerResourceIsFolder.set(!0)):k||(this._activeUri=null);const U=this.contextMenuService.createMenu({id:m.MenuId.ExplorerContext,contextKeyService:this.fileTreeService.contextMenuContextKeyService}),W=U.getMergedMenuNodes();U.dispose(),this.updateExplorerCompressedContextKey(N,k);const{x:j,y:Q}=O.nativeEvent;this.ctxMenuRenderer.show({anchor:{x:j,y:Q},menuNodes:W,args:k?[k,[k]]:[N.uri,L.map(G=>G.uri)]})},this.handleTreeBlur=()=>{var O,x,k;this._isDisposed||((x=(O=this.contextKey)===null||O===void 0?void 0:O.filesExplorerFocused)===null||x===void 0||x.set(!1),this.deactivateFileDecoration(),(k=this.contextKey)===null||k===void 0||k.explorerResourceIsFolder.set(!1))},this.handleTreeFocus=()=>{var O,x;(x=(O=this.contextKey)===null||O===void 0?void 0:O.filesExplorerFocused)===null||x===void 0||x.set(!0)},this.handleItemRangeClick=(O,x)=>{if(this.selectedFiles.length===1&&E.Directory.isRoot(this.selectedFiles[0])&&this.clearFileSelectedDecoration(),!this.focusedFile)this.handleItemClick(O,x);else if(this.focusedFile&&this.focusedFile!==O){this._isMultiSelected=!0;const k=this.treeModel.root.getIndexAtTreeNode(O),F=this.treeModel.root.getIndexAtTreeNode(this.focusedFile);F>k?this.activeFileDecorationByRange(k,F):F<k&&this.activeFileDecorationByRange(F,k)}},this.handleItemToggleClick=(O,x)=>{this._isMultiSelected=!0,!(x!==l.TreeNodeType.CompositeTreeNode&&x!==l.TreeNodeType.TreeNode)&&(this.selectedFiles.length===1&&E.Directory.isRoot(this.selectedFiles[0])&&this.clearFileSelectedDecoration(),this.toggleFileSelectedDecoration(O))},this.handleItemClick=(O,x=this.fileTreeService.isMultipleWorkspace?l.TreeNodeType.TreeNode:l.TreeNodeType.CompositeTreeNode,k)=>{var F,L,N,U;if(this.treeModel&&(O||(O=this.treeModel.root),this.updateExplorerCompressedContextKey(O,k),this._isMultiSelected=!1,(x===l.TreeNodeType.CompositeTreeNode||x===l.TreeNodeType.TreeNode)&&this.activeFileDecoration(O),this.fileTreeService.isCompactMode&&k?(this._activeUri=k,(F=this.contextKey)===null||F===void 0||F.explorerResourceIsFolder.set(!0)):k||(this._activeUri=null,(L=this.contextKey)===null||L===void 0||L.explorerResourceIsFolder.set(x===l.TreeNodeType.CompositeTreeNode)),this.corePreferences["workbench.list.openMode"]==="singleClick")){if(x===l.TreeNodeType.CompositeTreeNode){if((N=this.contextKey)===null||N===void 0||N.explorerResourceIsFolder.set(!0),O===this.treeModel.root)return;this.toggleDirectory(O)}else if(x===l.TreeNodeType.TreeNode){if((U=this.contextKey)===null||U===void 0||U.explorerResourceIsFolder.set(!1),O===this.treeModel.root)return;this.fileTreeService.openFile(O.uri),this.mainlayoutService.bottomExpanded&&this.commandService.executeCommand(g.RETRACT_PANEL_COMMAND.id)}}},this.handleItemDoubleClick=(O,x)=>{x===l.TreeNodeType.TreeNode?this.fileTreeService.openAndFixedFile(O.uri):this.corePreferences["workbench.list.openMode"]==="doubleClick"&&this.toggleDirectory(O)},this.validateFileName=(O,x)=>{var k;if(x=this.getWellFormedFileName(x),!x||x.length===0||/^\s+$/.test(x))return{message:(0,v.localize)("validate.tree.emptyFileNameError"),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:x};if(x[0]==="/"||x[0]==="\\")return{message:(0,v.localize)("validate.tree.fileNameStartsWithSlashError"),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:x};if(x[0]===" "||x[x.length-1]===" ")return{message:(0,v.localize)("validate.tree.fileNameFollowOrStartWithSpaceWarning"),type:l.PROMPT_VALIDATE_TYPE.WARNING,value:x};let F;if(O.target){const N=O.target;if(x===N.name)return null;F=N.parent}else F=O.parent;return F&&!(O instanceof l.RenamePromptHandle&&O.target.displayName.indexOf(S.separator)>0)&&((k=F.children)===null||k===void 0?void 0:k.find(W=>W.name===x))?{message:(0,v.formatLocalize)("validate.tree.fileNameExistsError",x),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:x}:I(x.split(/[\\/]/)).some(N=>!w(N))?{message:(0,v.formatLocalize)("validate.tree.invalidFileNameError",this.trimLongName(x)),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:x}:null},this.proxyPrompt=O=>{let x=!1;const k=async G=>{const X=await this.fileTreeService.getNodeByPathOrUri(G);X&&(E.Directory.is(X)?this.selectFileDecoration(X):this.location(X.uri))},F=async G=>{var X,$,V;if(this.validateMessage=void 0,O instanceof l.RenamePromptHandle){const H=O.target,K=O.target.displayName.split(S.separator),Y=H.name.indexOf(S.separator)>0;if(Y&&this.activeUri&&!O.target.uri.toString().includes(this.activeUri.toString()))return!1;const Z=this.activeUri?K.length-O.target.uri.toString().replace(this.activeUri.toString(),"").split(S.separator).length:-1,oe=Z===-1?[]:K.slice(0,Z).concat(G);let ie=H.uri,he=H.parent.uri.resolve(G);if(Y&&((X=this.activeUri)===null||X===void 0?void 0:X.displayName)===G||!Y&&G===H.name)return!0;O.addAddonAfter("loading_indicator"),Y&&oe.length>0&&E.Directory.is(H.parent)&&(ie=H.parent.uri.resolve(K.slice(0,Z+1).join(S.separator)),he=H.parent.uri.resolve(oe.concat().join(S.separator)));const me=await this.fileTreeAPI.mv(ie,he,H.type===l.TreeNodeType.CompositeTreeNode);if(me)return this.validateMessage={type:l.PROMPT_VALIDATE_TYPE.ERROR,message:me,value:G},this.fileTreeService.updateRefreshable(!0),O.addValidateMessage(this.validateMessage),!1;if(this.fileTreeService.updateRefreshable(!1),O.removeAddonAfter(),!Y&&H.parent){const q=await this.fileTreeService.moveNodeByPath(H.parent,H.parent,H.name,G,H.type);q&&this.selectFileDecoration(q,!1),this.fileTreeService.updateRefreshable(!0)}else if(E.Directory.is(H)&&!E.Directory.isRoot(H)){H.updateMetaData({name:oe.concat(K.slice(Z+1)).join(S.separator),uri:he,fileStat:{...H.filestat,uri:he.toString()},tooltip:this.fileTreeAPI.getReadableTooltip(he)}),this.treeModel.dispatchChange();let q;E.Directory.is(H.parent)&&(!(($=H.parent.children)===null||$===void 0)&&$.find(be=>H.path.indexOf(be.path)>=0))?q=this.fileTreeService.refresh(H.parent):q=this.fileTreeService.refresh(H),q.then(()=>{k(he)})}O.removeAddonAfter()}else if(O instanceof l.NewPromptHandle){const H=O.parent,K=H.uri.resolve(G);let Y;if(O.addAddonAfter("loading_indicator"),this.fileTreeService.updateRefreshable(!0),O.type===l.TreeNodeType.CompositeTreeNode?Y=await this.fileTreeAPI.createDirectory(K):Y=await this.fileTreeAPI.createFile(K),O.removeAddonAfter(),Y)return this.validateMessage={type:l.PROMPT_VALIDATE_TYPE.ERROR,message:Y,value:G},this.fileTreeService.updateRefreshable(!1),O.addValidateMessage(this.validateMessage),!1;if(G.includes(S.separator)&&this.fileTreeService.refresh(H).then(()=>{k(H.uri.resolve(G))}),this.fileTreeService.isCompactMode)if(O.type===l.TreeNodeType.CompositeTreeNode)if((!H.children||H.children.length===0)&&!E.Directory.isRoot(H)){const oe=H.uri.resolve(G),ie=[H.name].concat(G).join(S.separator);H.updateMetaData({name:ie,uri:oe,fileStat:{...H.filestat,uri:oe.toString()},tooltip:this.fileTreeAPI.getReadableTooltip(oe)}),k(oe)}else await this.fileTreeService.addNode(H,G,O.type),k(H.uri.resolve(G));else await this.fileTreeService.addNode(H,G,O.type),k(H.uri.resolve(G));else await this.fileTreeService.addNode(H,G,O.type),k(H.uri.resolve(G))}return(V=this.contextKey)===null||V===void 0||V.filesExplorerInputFocused.set(!1),!0},L=async G=>{var X,$,V,H;if(this.validateMessage&&this.validateMessage.type===l.PROMPT_VALIDATE_TYPE.ERROR)return this.validateMessage=void 0,!0;if(x)return!1;if(!G){(X=this.contextKey)===null||X===void 0||X.explorerCompressedFocusContext.set(!1),($=this.contextKey)===null||$===void 0||$.explorerCompressedFirstFocusContext.set(!1),(V=this.contextKey)===null||V===void 0||V.explorerCompressedLastFocusContext.set(!1),this.fileTreeService.isCompactMode&&O instanceof l.NewPromptHandle&&this.fileTreeService.refresh(O.parent);return}return(H=this.contextKey)===null||H===void 0||H.filesExplorerInputFocused.set(!1),await F(G),!0},N=async G=>{if(x=!0,this.validateMessage&&this.validateMessage.type===l.PROMPT_VALIDATE_TYPE.ERROR)return!1;if(G.trim()===""||this.validateMessage&&this.validateMessage.type!==l.PROMPT_VALIDATE_TYPE.ERROR)return this.validateMessage=void 0,!0;const X=await F(G);return x=!1,!!X},U=async()=>{var G;(G=this.contextKey)===null||G===void 0||G.filesExplorerInputFocused.set(!0)},W=()=>{var G;this.fileTreeService.updateRefreshable(!0),(G=this.contextKey)===null||G===void 0||G.filesExplorerInputFocused.set(!1),this.contextMenuFile&&this.selectFileDecoration(this.contextMenuFile,!0)},j=()=>{var G;(G=this.contextKey)===null||G===void 0||G.filesExplorerInputFocused.set(!1),this.fileTreeService.isCompactMode&&O instanceof l.NewPromptHandle&&this.fileTreeService.refresh(O.parent)},Q=G=>{const X=this.validateFileName(O,G);X?(this.validateMessage=X,O.addValidateMessage(X)):!X&&this.validateMessage&&this.validateMessage.value!==G&&(this.validateMessage=void 0,O.removeValidateMessage())};O.destroyed||(this.fileTreeService.updateRefreshable(!1),O.onChange(Q),O.onCommit(N),O.onBlur(L),O.onFocus(U),O.onDestroy(W),O.onCancel(j))},this.copyFile=async O=>{var x;this.pasteStore&&this.pasteStore.type===u.PasteTypes.CUT&&(this._pasteStore.files.forEach(F=>{F&&this.cutDecoration.removeTarget(F)}),(x=this.contextKey)===null||x===void 0||x.explorerResourceCut.set(!1)),this.treeModel.dispatchChange();const k=[];for(const F of O){const L=this.fileTreeService.getNodeByPathOrUri(F);L&&k.push(L)}this._pasteStore={files:k,type:u.PasteTypes.COPY},this.clipboardService.writeResources(O)},this.pasteFile=async O=>{var x,k;let F=!1,L=this.fileTreeService.getNodeByPathOrUri(O.toString());if(!L)return;let N=this.pasteStore,U=!1;if(!N){const W=await this.clipboardService.readResources();if(!W||!W.length)return;N={files:[],type:u.PasteTypes.COPY,crossFiles:W},U=!0}if(N){if(E.Directory.is(L)||(F=!0,L=L.parent),U){const W=(0,v.localize)("file.confirm.paste.ok"),j=(0,v.localize)("file.confirm.paste.cancel");if(await this.dialogService.warning((0,v.formatLocalize)("file.confirm.paste",`[ ${(x=N.crossFiles)===null||x===void 0?void 0:x.map(G=>G.displayName).join(",")} ]`,E.Directory.isRoot(L)?L.uri.displayName:L.displayName),[j,W])!==W)return}if(N.type===u.PasteTypes.CUT){for(const j of N.files)j&&this.cutDecoration.removeTarget(j),L.expanded||await L.setExpanded(!0);const W=await this.fileTreeAPI.mvFiles(N.crossFiles?N.crossFiles.map(j=>{var Q;return{url:j,isDirectory:((Q=this.fileTreeService.getNodeByPathOrUri(j))===null||Q===void 0?void 0:Q.filestat.isDirectory)||!1}}):N.files.map(j=>({url:j.uri,isDirectory:j.filestat.isDirectory})),L.uri);W&&W.length>0&&(W.forEach(j=>{this.messageService.error(j)}),this.fileTreeService.refresh()),(k=this.contextKey)===null||k===void 0||k.explorerResourceCut.set(!1),this.treeModel.dispatchChange(),this._pasteStore={files:[],type:u.PasteTypes.NONE,crossFiles:void 0}}else if(N.type===u.PasteTypes.COPY){const W=N.crossFiles?N.crossFiles:N.files.map(j=>j.uri);for(const j of W){L.uri.isEqual(j)&&!F&&(L=L.parent);const Q=L.uri.resolve(j.displayName);L.expanded||await L.setExpanded(!0);const G=await this.fileTreeAPI.copyFile(j,Q);if(G)if(G.uri){const X=new v.URI(G.uri),$=await this.filesystem.getFileStat(j.toString());this.fileTreeService.addNode(L,X.displayName,$?.isDirectory?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode)}else this.messageService.error(`Error when copy file: ${j.toString()}, ${G}`)}}}},this.cutFile=async O=>{var x;O.length>0&&((x=this.contextKey)===null||x===void 0||x.explorerResourceCut.set(!0)),this._pasteStore&&this._pasteStore.type===u.PasteTypes.CUT&&this._pasteStore.files.forEach(F=>{this.cutDecoration.removeTarget(F)});const k=[];for(const F of O){const L=this.fileTreeService.getNodeByPathOrUri(F);L&&k.push(L)}this._pasteStore={files:k,type:u.PasteTypes.CUT};for(const F of k)F&&this.cutDecoration.addTarget(F);this.treeModel.dispatchChange()},this.location=async O=>{if(await this.whenReady,!this.fileTreeService.filterMode)return this._fileToLocation=O,this.locationThrottler.queue(this.doLocation)},this.doLocation=async()=>{if(!this._fileToLocation)return;const O=this._fileToLocation;let x;if(typeof O=="string"?x=O:x=await this.fileTreeService.getFileTreeNodePathByUri(O),x){if(!this.fileTreeHandle)return;const k=await this.fileTreeHandle.ensureVisible(x,"center",!0);k&&this.selectFileDecoration(k)}this._fileToLocation=void 0},this.locationOnShow=O=>{this._nextLocationTarget=O},this.performLocationOnHandleShow=async()=>{this._nextLocationTarget&&(await this.location(this._nextLocationTarget),this._nextLocationTarget=void 0)}}get onDidFocusedFileChange(){return this.onDidFocusedFileChangeEmitter.event}get onDidContextMenuFileChange(){return this.onDidContextMenuFileChangeEmitter.event}get onDidSelectedFileChange(){return this.onDidSelectedFileChangeEmitter.event}get onFileTreeModelChange(){return this.onFileTreeModelChangeEmitter.event}get fileTreeHandle(){return this._fileTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get dndService(){return this._dndService}get whenReady(){return this._whenReady.promise}get focusedFile(){return this._focusedFile}set focusedFile(O){this.onDidFocusedFileChangeEmitter.fire(O?O.uri:void 0),this._focusedFile=O}get contextMenuFile(){return this._contextMenuFile}set contextMenuFile(O){this.onDidContextMenuFileChangeEmitter.fire(O?O.uri:void 0),this._contextMenuFile=O}get selectedFiles(){return this._selectedFiles}set selectedFiles(O){this.onDidSelectedFileChangeEmitter.fire(O?O.map(x=>x.uri):[]),this._selectedFiles=O}get activeUri(){return this._activeUri}get pasteStore(){return this._pasteStore}get explorerStorage(){return this._explorerStorage}get currentRelativeUriContextKey(){return this._currentRelativeUriContextKey||(this._currentRelativeUriContextKey=this.fileTreeService.contextMenuContextKeyService.createKey("filetreeContextRelativeUri","")),this._currentRelativeUriContextKey}get currentContextUriContextKey(){return this._currentContextUriContextKey||(this._currentContextUriContextKey=this.fileTreeService.contextMenuContextKeyService.createKey("filetreeContextUri","")),this._currentContextUriContextKey}get contextMenuResourceContext(){return this._contextMenuResourceContext||(this._contextMenuResourceContext=new _.ResourceContextKey(this.fileTreeService.contextMenuContextKeyService)),this._contextMenuResourceContext}get contextKey(){return this.fileTreeService.contextKey}get initTreeModelReady(){return this._initTreeModelReady}async initTreeModel(){this._initTreeModelReady=!1;const O=(await this.fileTreeService.resolveChildren())[0];if(!O){this._whenReady.resolve();return}this._treeModel=this.injector.get(f.FileTreeModel,[O]),this.initDecorations(O),this._dndService=this.injector.get(A.DragAndDropService,[this]),this.treeStateWatcher=this._treeModel.getTreeStateWatcher(!0),this.disposableCollection.push(this.fileTreeService.onNodeRefreshed(()=>{this.initTreeModelReady&&(this.refreshedActionDelayer.isTriggered()||this.refreshedActionDelayer.cancel(),this.refreshedActionDelayer.trigger(async()=>{if(this.selectedFiles.length===0){const k=this.editorService.currentEditor;k&&k.currentUri&&this.location(k.currentUri)}this.fileTreeService.isCompactMode||(this._activeUri=null)}))})),this.disposableCollection.push(this.fileTreeService.onWorkspaceChange(()=>{this.disposableCollection.dispose(),this.initTreeModel()})),this.disposableCollection.push(this.labelService.onDidChange(async()=>{this.initTreeModelReady&&(this.labelChangedDelayer.isTriggered()||this.labelChangedDelayer.cancel(),this.labelChangedDelayer.trigger(async()=>{this.fileTreeService.refresh()}))})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,k=>{this.loadingDecoration.addTarget(k),this.treeModel.dispatchChange()})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,k=>{this.loadingDecoration.clearAppliedTarget(),this.treeModel.dispatchChange()})),this._explorerStorage=await this.storageProvider(v.STORAGE_NAMESPACE.EXPLORER);const x=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY);x&&await this.loadFileTreeSnapshot(x),this.disposableCollection.push(this.treeStateWatcher.onDidChange(()=>{if(!this._initTreeModelReady)return;const k=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),F=this.treeStateWatcher.snapshot();this.explorerStorage.set(n.FILE_TREE_SNAPSHOT_KEY,{...k,...F})})),this.fileTreeService.startWatchFileEvent(),this.onFileTreeModelChangeEmitter.fire(this._treeModel),this._whenReady.resolve(),this._initTreeModelReady=!0}initDecorations(O){this._decorations=new l.DecorationsManager(O),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.cutDecoration),this._decorations.addDecoration(this.loadingDecoration)}setFileTreeContextKey(O){var x;this.currentContextUriContextKey.set(O.uri.toString()),this.currentRelativeUriContextKey.set((this.treeModel.root.uri.relative(O.uri)||"").toString()),this.contextMenuResourceContext.set(O.uri),(x=this.contextKey)===null||x===void 0||x.explorerResourceIsFolder.set(O&&O.type===l.TreeNodeType.CompositeTreeNode)}async loadFileTreeSnapshot(O){await this._treeModel.loadTreeState(O)}updateExplorerCompressedContextKey(O,x){var k,F,L,N,U,W,j,Q,G,X,$,V,H,K,Y,Z;if(O&&x){(k=this.contextKey)===null||k===void 0||k.explorerCompressedFocusContext.set(!0);const oe=new S(O.name);oe.name===x.displayName?((F=this.contextKey)===null||F===void 0||F.explorerCompressedLastFocusContext.set(!0),(L=this.contextKey)===null||L===void 0||L.explorerCompressedFirstFocusContext.set(!1)):oe.root&&oe.root.name===x.displayName?((N=this.contextKey)===null||N===void 0||N.explorerCompressedLastFocusContext.set(!1),(U=this.contextKey)===null||U===void 0||U.explorerCompressedFirstFocusContext.set(!0)):((W=this.contextKey)===null||W===void 0||W.explorerCompressedLastFocusContext.set(!1),(j=this.contextKey)===null||j===void 0||j.explorerCompressedFirstFocusContext.set(!1))}else O?O.name.indexOf(S.separator)>0?((Q=this.contextKey)===null||Q===void 0||Q.explorerCompressedFocusContext.set(!0),(G=this.contextKey)===null||G===void 0||G.explorerCompressedFirstFocusContext.set(!1),(X=this.contextKey)===null||X===void 0||X.explorerCompressedLastFocusContext.set(!0)):(($=this.contextKey)===null||$===void 0||$.explorerCompressedFocusContext.set(!1),(V=this.contextKey)===null||V===void 0||V.explorerCompressedFirstFocusContext.set(!1),(H=this.contextKey)===null||H===void 0||H.explorerCompressedLastFocusContext.set(!1)):((K=this.contextKey)===null||K===void 0||K.explorerCompressedFocusContext.set(!1),(Y=this.contextKey)===null||Y===void 0||Y.explorerCompressedFirstFocusContext.set(!1),(Z=this.contextKey)===null||Z===void 0||Z.explorerCompressedLastFocusContext.set(!1))}handleTreeHandler(O){this._fileTreeHandle=O}toggleOrOpenCurrentFile(){let O;this.focusedFile?O=this.focusedFile:this.contextMenuFile&&(O=this.contextMenuFile),O&&(this.activeFileDecoration(O),E.Directory.is(O)?this.toggleDirectory(O):this.fileTreeService.openFile(O.uri))}moveToNext(){let O;if(this.focusedFile?O=this.focusedFile:this.contextMenuFile&&(O=this.contextMenuFile),!O)return;const k=this.treeModel.root.getIndexAtTreeNode(O)+1,F=this.treeModel.root.getTreeNodeAtIndex(k),L=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),N=(k+1)*c.FILE_TREE_NODE_HEIGHT-(L.scrollPosition||0),{height:U}=this.fileTreeHandle.getCurrentSize();F&&(this.activateFileFocusedDecoration(F),N>U&&this.fileTreeHandle.ensureVisible(F,"end"))}moveToPrev(){let O;if(this.focusedFile?O=this.focusedFile:this.contextMenuFile&&(O=this.contextMenuFile),!O)return;const x=this.treeModel.root.getIndexAtTreeNode(O);if(x===0)return;const k=x-1,F=this.treeModel.root.getTreeNodeAtIndex(k);if(!F)return;const L=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),N=k*c.FILE_TREE_NODE_HEIGHT;this.activateFileFocusedDecoration(F),(L.scrollPosition||0)>N&&this.fileTreeHandle.ensureVisible(F,"start")}async collapseCurrentFile(){let O;this.focusedFile?(O=this.focusedFile,this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0):this.contextMenuFile&&(O=this.contextMenuFile,this.focusedDecoration.removeTarget(this.contextMenuFile),this.contextMenuFile=void 0);const x=this.selectedFiles.indexOf(O);x>=0&&(this.selectedFiles.splice(x,1),this.selectedDecoration.removeTarget(O));let k;if(E.Directory.is(O)&&O.expanded)k=O;else if(O)E.Directory.isRoot(O.parent)?k=O:k=O.parent;else return;this.focusedFile=k,k&&k.expanded&&(await this.fileTreeHandle.collapseNode(k),this.activeFileFocusedDecoration(k,!0))}async expandCurrentFile(){let O;this.focusedFile?(O=this.focusedFile,this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0):this.contextMenuFile&&(O=this.contextMenuFile,this.focusedDecoration.removeTarget(this.contextMenuFile),this.contextMenuFile=void 0);const x=this.selectedFiles.indexOf(O);x>=0&&(this.selectedFiles.splice(x,1),this.selectedDecoration.removeTarget(O)),this.focusedFile=O,E.Directory.is(O)&&(O.expanded||await this.fileTreeHandle.expandNode(O))}async collapseAll(){await this.treeModel.root.collapsedAll();const O=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY);O&&this.explorerStorage.set(n.FILE_TREE_SNAPSHOT_KEY,{...O,expandedDirectories:{atSurface:[],buried:[]}})}async deleteFileByUris(O){var x;if(O.length===0)return;if(this.corePreferences["explorer.confirmDelete"]){const N=this.applicationService.backendOS===v.OperatingSystem.Linux,U=N?(0,v.localize)("file.confirm.delete.ok"):(0,v.localize)("file.confirm.moveToTrash.ok"),W=(0,v.localize)("file.confirm.delete.cancel"),j=10;let Q=O.slice(0,j).map(X=>X.displayName).join(`
33999
+ `,b){const A=this.hashCalculateService.calculate(u);if(d.length>m.FILE_SAVE_BY_CHANGE_THRESHOLD){const S=await this.fileSchemeDocClient.saveByChange(g.toString(),{baseMd5:A,changes:E,eol:y},f,c,b);return S.state===o.SaveTaskResponseState.ERROR&&S.errorMessage==="useByContent"?await this.fileSchemeDocClient.saveByContent(g.toString(),{baseMd5:A,content:d},f,c,b):S}else return await this.fileSchemeDocClient.saveByContent(g.toString(),{baseMd5:A,content:d},f,c,b)}async provideEditorDocumentModelContentMd5(g,d){return this.fileSchemeDocClient.getMd5(g.toString(),d)}};t.FileSchemeDocumentProvider=p,n.__decorate([(0,r.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],p.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(m.IFileSchemeDocClient),n.__metadata("design:type",Object)],p.prototype,"fileSchemeDocClient",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(l.IHashCalculateService),n.__metadata("design:type",Object)],p.prototype,"hashCalculateService",void 0),t.FileSchemeDocumentProvider=p=n.__decorate([(0,r.Injectable)()],p);let s=class{constructor(){this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event,this.listeners={}}isReadonly(g){return!0}handlesScheme(g){return g==="vscode"}async provideEditorDocumentModelContent(g,d){return this.getSchemaContent(g)}getSchemaContent(g){const d=g.toString(),u=this.jsonRegistry.getSchemaContributions().schemas[d];if(u){const E=JSON.stringify(u);if(!this.listeners[d]){const f=o.Disposable.create(()=>{this.jsonRegistry.onDidChangeSchema(c=>{c===d&&this._onDidChangeContent.fire(g)})});this.listeners[d]=f}return E}return"{}"}onDidDisposeModel(g){g.toString()&&(this.listeners[g.toString()].dispose(),delete this.listeners[g.toString()])}};t.VscodeSchemeDocumentProvider=s,n.__decorate([(0,r.Autowired)(o.ISchemaStore),n.__metadata("design:type",Object)],s.prototype,"schemaStore",void 0),n.__decorate([(0,r.Autowired)(o.IJSONSchemaRegistry),n.__metadata("design:type",Object)],s.prototype,"jsonRegistry",void 0),t.VscodeSchemeDocumentProvider=s=n.__decorate([(0,r.Injectable)()],s);let h=class{constructor(){this.documentContentMaps=new Map,this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(g){return g===o.Schemes.walkThroughSnippet}provideEditorDocumentModelContent(g,d){return this.documentContentMaps.has(g.toString())||this.documentContentMaps.set(g.toString(),""),this.documentContentMaps.get(g.toString())}isReadonly(){return!1}preferLanguageForUri(){return"plaintext"}};t.WalkThroughSnippetSchemeDocumentProvider=h,t.WalkThroughSnippetSchemeDocumentProvider=h=n.__decorate([(0,r.Injectable)()],h)},41352:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSchemeDocClientService=void 0;const n=e(85608),r=e(76003),o=e(80449);let l=class{saveByChange(_,m,p,s,h){return this.fileDocBackendService.$saveByChange(_,m,p,s,h)}saveByContent(_,m,p,s,h){return this.fileDocBackendService.$saveByContent(_,m,p,s,h)}getMd5(_,m){return this.fileDocBackendService.$getMd5(_,m)}};t.FileSchemeDocClientService=l,n.__decorate([(0,r.Autowired)(o.FileSchemeDocNodeServicePath),n.__metadata("design:type",Object)],l.prototype,"fileDocBackendService",void 0),t.FileSchemeDocClientService=l=n.__decorate([(0,r.Injectable)()],l)},17276:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemEditorComponentContribution=t.FileSystemEditorResourceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),v=e(57517),_=e(17878),m=e(42933),p=e(57646),s=e(60387),h=e(88819),a=e(99025),g="video-preview",d="image-preview",u="external-file",E="large-file-prevent";let f=class{registerResource(b){b.registerResourceProvider(this.untitledResourceProvider)}registerEditorDocumentModelContentProvider(b){b.registerEditorDocumentModelContentProvider(this.fileSchemeDocumentProvider),b.registerEditorDocumentModelContentProvider(this.vscodeSchemeDocumentProvider),b.registerEditorDocumentModelContentProvider(this.walkThroughSnippetSchemeDocumentProvider),b.registerEditorDocumentModelContentProvider(this.untitledSchemeDocumentProvider)}};t.FileSystemEditorResourceContribution=f,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.FileSchemeDocumentProvider)],f.prototype,"fileSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.VscodeSchemeDocumentProvider)],f.prototype,"vscodeSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.WalkThroughSnippetSchemeDocumentProvider)],f.prototype,"walkThroughSnippetSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",_.UntitledSchemeResourceProvider)],f.prototype,"untitledResourceProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",_.UntitledSchemeDocumentProvider)],f.prototype,"untitledSchemeDocumentProvider",void 0),t.FileSystemEditorResourceContribution=f=n.__decorate([(0,o.Domain)(v.BrowserEditorContribution)],f);let c=class{constructor(){this.cachedFileType=new o.LRUMap(200,100),this.fileServiceClient.onFilesChanged(b=>{b.forEach(A=>{this.cachedFileType.delete(A.uri.toString())})})}registerEditorComponent(b){b.registerEditorComponent({component:a.ImagePreview,uid:d,scheme:o.Schemes.file}),b.registerEditorComponent({component:a.VideoPreview,uid:g,scheme:o.Schemes.file}),b.registerEditorComponent({component:p.BinaryEditorComponent,uid:u,scheme:o.Schemes.file}),b.registerEditorComponent({component:h.LargeFilePrevent,uid:E,scheme:o.Schemes.file}),b.registerEditorComponentResolver(A=>A===o.Schemes.file||this.fileServiceClient.handlesScheme(A)?10:-1,(A,S)=>{S.length===0&&S.push({type:v.EditorOpenType.component,componentId:u})}),b.registerEditorComponentResolver(A=>A===o.Schemes.file||this.fileServiceClient.handlesScheme(A)?10:-1,async(A,S)=>{const w=await this.getFileType(A.uri.toString());switch(w){case"image":{S.push({type:v.EditorOpenType.component,componentId:d});break}case"video":{S.push({type:v.EditorOpenType.component,componentId:g});break}case"binary":case"text":{const{metadata:I,uri:D}=A,T=I||{};if(w==="binary"&&!T.skipPreventBinary)break;const R=await this.fileServiceClient.getFileStat(D.toString());await this.preference.ready;const M=this.preference.getValid("editor.largeFile",4*1024*1024*1024);R&&(R.size||0)>M&&!T.skipPreventTooLarge?S.push({type:v.EditorOpenType.component,componentId:E}):S.push({type:v.EditorOpenType.code,title:(0,o.localize)("editorOpenType.code")});break}}}),b.registerEditorComponentResolver(o.Schemes.untitled,(A,S,w)=>{w([{type:v.EditorOpenType.code,priority:"default"}])})}async getFileType(b){return this.cachedFileType.has(b)||((0,l.getLanguageIdFromMonaco)(new o.URI(b))?this.cachedFileType.set(b,"text"):this.cachedFileType.set(b,await this.getRealFileType(b))),this.cachedFileType.get(b)}async getRealFileType(b){try{return await this.fileServiceClient.getFileType(b)}catch{return"text"}}};t.FileSystemEditorComponentContribution=c,n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],c.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],c.prototype,"preference",void 0),t.FileSystemEditorComponentContribution=c=n.__decorate([(0,o.Domain)(v.BrowserEditorContribution),n.__metadata("design:paramtypes",[])],c)},52568:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSchemeModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(80449),v=e(41352),_=e(17276);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[_.FileSystemEditorResourceContribution,_.FileSystemEditorComponentContribution,{token:l.IFileSchemeDocClient,useClass:v.FileSchemeDocClientService}],this.backServices=[{servicePath:l.FileSchemeDocNodeServicePath}]}};t.FileSchemeModule=m,t.FileSchemeModule=m=n.__decorate([(0,r.Injectable)()],m)},88819:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LargeFilePrevent=t.PreventComponent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(41869),v=e(81878),_=e(54414),m=e(82196),p=n.__importDefault(e(19996)),s=a=>o.default.createElement("div",{className:p.default["error-page"]},o.default.createElement("div",{className:(0,r.default)(p.default.icon,(0,l.getExternalIcon)("warning"))}),o.default.createElement("div",{className:p.default.description},a.description),o.default.createElement("div",{className:p.default["actions-wrapper"]},a.actions.map((g,d)=>o.default.createElement(v.Button,{key:d,onClick:()=>g.onClick(),className:p.default["action-button"]},g.label))));t.PreventComponent=s;const h=()=>{const a=(0,l.useInjectable)(_.WorkbenchEditorService),g=(0,l.useInjectable)(l.IEventBus),d=()=>{const u=a.currentResource;u&&(u.metadata={...u.metadata,skipPreventTooLarge:!0},g.fire(new m.ResourceOpenTypeChangedEvent(u.uri)))};return o.default.createElement(t.PreventComponent,{description:(0,l.localize)("editor.largeFile.prevent"),actions:[{label:(0,l.localize)("editor.file.prevent.stillOpen"),onClick:()=>d()}]})};t.LargeFilePrevent=h},99025:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImagePreview=t.VideoPreview=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),l=e(40827),v=e(14951),_=n.__importDefault(e(19996)),m=h=>{const a=(0,o.useInjectable)(v.IFileServiceClient),[g,d]=r.default.useState(0);return r.default.useEffect(()=>{const u=a.onImageFilesChanged(E=>{E.some(c=>(typeof c.uri=="string"?new o.URI(c.uri):c.uri).isEqual(h.uri))&&d(c=>c+1)});return()=>u.dispose()},[h.uri,a]),{fileChanged:g}},p=h=>{const a=(0,o.useInjectable)(l.StaticResourceService);return{src:r.default.useMemo(()=>a.resolveStaticResource(h.uri).toString(),[h])}};t.VideoPreview=(0,r.memo)(h=>{const{src:a}=p(h.resource);return r.default.createElement("div",{className:_.default.kt_video_preview},r.default.createElement("video",{playsInline:!0,controls:!0,className:_.default.kt_video,src:a}))});const s=h=>{const a=r.default.useRef(),g=r.default.useRef(),{src:d}=p(h.resource),{fileChanged:u}=m(h.resource);return r.default.useEffect(()=>{const E=new o.Disposable;if(a.current)try{const f=new URL(d);f.searchParams.set("_t",u.toString()),a.current.src=f.href}catch{a.current.src=d}return()=>{E.dispose()}},[d,u]),r.default.createElement("div",{className:_.default.kt_image_preview},r.default.createElement("div",{ref:g},r.default.createElement("img",{ref:E=>E&&(a.current=E)})))};t.ImagePreview=s},80449:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeType=t.FileSchemeDocNodeServicePath=t.IFileSchemeDocNodeService=t.IFileSchemeDocClient=t.FILE_SAVE_BY_CHANGE_THRESHOLD=t.FILE_ON_DISK_SCHEME=void 0,t.FILE_ON_DISK_SCHEME="fileOnDisk",t.FILE_SAVE_BY_CHANGE_THRESHOLD=1e5,t.IFileSchemeDocClient=Symbol("IFileSchemeDocClient"),t.IFileSchemeDocNodeService=Symbol("FileSchemeDocNodeService"),t.FileSchemeDocNodeServicePath="FileSchemeDocNodeService";var e;(function(n){n[n.ADDED=1]="ADDED",n[n.REMOVED=2]="REMOVED"})(e||(t.ChangeType=e={}))},15625:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFileSearchService=t.FileSearchServicePath=void 0,t.FileSearchServicePath="FileSearchServicePath",t.IFileSearchService=Symbol("FileSearchService")},84660:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(15625),t)},47720:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(84660),t)},2156:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceClient=t.BrowserFileSystemRegistryImpl=void 0;const n=e(85608),r=e(32852),o=e(76003),l=e(41869),v=e(43718),_=e(37406),m=e(8170),p=e(93062),s=e(41682),h=e(42933),a=e(91813),g=e(81952);let d=class{constructor(){this.providers=new Map}registerFileSystemProvider(f){const c=f.scheme;return this.providers.set(c,f),{dispose:()=>{this.providers.delete(c)}}}};t.BrowserFileSystemRegistryImpl=d,t.BrowserFileSystemRegistryImpl=d=n.__decorate([(0,o.Injectable)()],d);let u=class{get clientId(){return this.applicationService.clientId}constructor(){this.watcherWithSchemaMap=new Map,this.watcherDisposerMap=new Map,this.onFileChangedEmitter=new l.Emitter,this.onFileProviderChangedEmitter=new l.Emitter,this._onFilesChanged=new l.Emitter,this.onFilesChanged=this._onFilesChanged.event,this._onWatcherOverflow=new l.Emitter,this.onWatcherOverflow=this._onWatcherOverflow.event,this._onWatcherFailed=new l.Emitter,this.onWatcherFailed=this._onWatcherFailed.event,this._onImageFilesChanged=new l.Emitter,this.onImageFilesChanged=this._onImageFilesChanged.event,this._onFileProviderChanged=new l.Emitter,this.onFileProviderChanged=this._onFileProviderChanged.event,this._onDidChangeFileSystemProviderRegistrations=new l.Emitter,this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=new l.Emitter,this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=new l.Emitter,this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.filesExcludesMatcherList=[],this.watcherId=0,this.toDisposable=new l.DisposableCollection,this.watchFileExcludes=[],this.watchFileExcludesMatcherList=[],this.filesExcludes=[],this.workspaceRoots=[],this._providerChanged=new Set,this.fsProviders=new Map,this.userHomeDeferred=new l.Deferred,this.options={encoding:"utf8",overwrite:!1,recursive:!0,moveToTrash:!0},this.uriWatcherMap=new Map,this.toDisposable.push(this.onDidChangeFileSystemProviderRegistrations(f=>{f.added&&f.scheme===v.Schemes.file&&this.doGetCurrentUserHome()}))}async initialize(){const f=await this.getProvider(v.Schemes.file);f.initialize&&await f.initialize(this.clientId,this.appConfig.recursiveWatcherBackend)}async doGetCurrentUserHome(){const c=(await this.getProvider(v.Schemes.file)).getCurrentUserHome();this.userHomeDeferred.resolve(c)}handlesScheme(f){return this.registry.providers.has(f)||this.fsProviders.has(f)}dispose(){return this._onImageFilesChanged.dispose(),this.toDisposable.dispose()}async resolveContent(f,c){const y=this.convertUri(f),A=await(await this.getProvider(y.scheme)).readFile(y.codeUri),S=A.data||A;return{content:l.BinaryBuffer.wrap(S instanceof Uint8Array?S:Uint8Array.from(S)).toString(c?.encoding)}}async readFile(f){const c=this.convertUri(f),y=await this.getProvider(c.scheme),b=await this.doReadFile(y,c.codeUri),A=b.data||b;return{content:l.BinaryBuffer.wrap(A instanceof Uint8Array?A:Uint8Array.from(A))}}async readFileStream(f){const c=this.convertUri(f);return await(await this.getProvider(c.scheme)).readFileStream(c.codeUri)}async getFileStat(f,c=!0){const y=this.convertUri(f),b=await this.getProvider(y.scheme);try{const A=await b.stat(y.codeUri);if(!A)throw h.FileSystemError.FileNotFound(y.codeUri.toString(),"File not found.");return this.filterStat(A,c)}catch(A){if(h.FileSystemError.FileNotFound.is(A))return}}async setContent(f,c,y){const b=this.convertUri(f.uri),A=await this.getProvider(b.scheme),S=await A.stat(b.codeUri);if(!S)throw h.FileSystemError.FileNotFound(f.uri,"File not found.");if(S.isDirectory)throw h.FileSystemError.FileIsADirectory(f.uri,"Cannot set the content.");if(!await this.isInSync(f,S))throw this.createOutOfSyncError(f);return await A.writeFile(b.codeUri,typeof c=="string"?l.BinaryBuffer.fromString(c).buffer:c,{create:!1,overwrite:!0,encoding:y?.encoding}),await A.stat(b.codeUri)}async updateContent(f,c,y){const b=this.convertUri(f.uri),A=await this.getProvider(b.scheme),S=await A.stat(b.codeUri);if(!S)throw h.FileSystemError.FileNotFound(f.uri,"File not found.");if(S.isDirectory)throw h.FileSystemError.FileIsADirectory(f.uri,"Cannot set the content.");if(!this.checkInSync(f,S))throw this.createOutOfSyncError(f);if(c.length===0)return S;const w=await A.readFile(b.codeUri),I=this.applyContentChanges(l.BinaryBuffer.wrap(w).toString(y?.encoding),c);await A.writeFile(b.codeUri,l.BinaryBuffer.fromString(I).buffer,{create:!1,overwrite:!0,encoding:y?.encoding});const D=await A.stat(b.codeUri);if(!D)throw h.FileSystemError.FileNotFound(b.codeUri.toString(),"File not found.");return D}async createFile(f,c){const y=this.convertUri(f),b=await this.getProvider(y.scheme),A=l.BinaryBuffer.fromString(c?.content||"").buffer;let S=await b.writeFile(y.codeUri,A,{create:!0,overwrite:c&&c.overwrite||!1,encoding:c?.encoding});return S=S||await b.stat(y.codeUri),S}async createFolder(f){const c=this.convertUri(f),y=await this.getProvider(c.scheme),b=await y.createDirectory(c.codeUri);return b||await y.stat(c.codeUri)}async move(f,c,y){const b=this.convertUri(f),A=this.convertUri(c),S=await this.getProvider(b.scheme),w=await S.rename(b.codeUri,A.codeUri,{overwrite:!!(y&&y.overwrite)});return w||await S.stat(A.codeUri)}async copy(f,c,y){const b=this.convertUri(f),A=this.convertUri(c),S=await this.getProvider(b.scheme),w=await this.doGetOverwrite(y);if(!(0,h.containsExtraFileMethod)(S,"copy"))throw this.getErrorProvideNotSupport(b.scheme,"copy");const I=await S.copy(b.codeUri,A.codeUri,{overwrite:!!w});return I||await S.stat(A.codeUri)}async getFsPath(f){if(f.startsWith("file:/"))return l.FileUri.fsPath(f)}fireFilesChange(f){const c=f.changes.map(b=>({uri:b.uri,type:b.type}));this._onFilesChanged.fire(c),this.eventBus.fire(new l.FilesChangeEvent(c));const y=c.filter(b=>{var A;const w=(A=new l.URI(b.uri).path.ext)===null||A===void 0?void 0:A.toLowerCase().replace(".","");return w&&a.EXT_LIST_IMAGE.has(w)});y.length>0&&this._onImageFilesChanged.fire(y)}fireWatcherOverflow(f){this._onWatcherOverflow.fire(f),this.eventBus.fire(new l.FileWatcherOverflowEvent(f))}fireWatcherFailed(f){this._onWatcherFailed.fire(f),this.eventBus.fire(new l.FileWatcherFailureEvent(f))}async watchFileChanges(f,c){const b=(this.appConfig.pollingWatcherDirectories||[]).some(M=>f.path.toString().startsWith(M)),A=this.convertUri(f.toString());let S=0;const w=await this.getProvider(A.scheme),I=this.watcherWithSchemaMap.get(A.scheme)||[];let D;if(this.uriWatcherMap.has(A.toString())){const M=this.uriWatcherMap.get(A.toString());D=M?.watcher,D&&await D.dispose()}D?S=D.watchId:S=this.watcherId++;const T=await w.watch(A.codeUri,{excludes:c,pollingWatch:b});this.watcherDisposerMap.set(S,{dispose:async()=>{const M=this.uriWatcherMap.get(A.toString()),O=M?.watcher;await Promise.all([w.unwatch&&w.unwatch(T),O&&O.dispose()]),this.uriWatcherMap.delete(A.toString())}}),I.push(S),this.watcherWithSchemaMap.set(A.scheme,I);const R=new g.FileSystemWatcher({fileServiceClient:this,watchId:S,uri:f});return this.uriWatcherMap.set(A.toString(),{watcher:R,excludes:c}),R}async setWatchFileExcludes(f){return await(await this.getProvider(v.Schemes.file)).setWatchFileExcludes(f)}async getWatchFileExcludes(){return await(await this.getProvider(v.Schemes.file)).getWatchFileExcludes()}async setFilesExcludes(f,c){this.filesExcludes=f,this.filesExcludesMatcherList=[],c&&this.setWorkspaceRoots(c),this.updateExcludeMatcher()}async setWorkspaceRoots(f){this.workspaceRoots=f,this.updateExcludeMatcher()}async unwatchFileChanges(f){const c=this.watcherDisposerMap.get(f);if(!(!c||!c.dispose))return this.watcherDisposerMap.delete(f),c.dispose()}async delete(f,c){if(this.appConfig.isElectronRenderer&&c?.moveToTrash!==!1){const A=new l.URI(f);if(A.scheme===v.Schemes.file)return this.injector.get(_.IElectronMainUIService).moveToTrash(A.codeUri.fsPath)}const y=this.convertUri(f),b=await this.getProvider(y.scheme);await b.stat(y.codeUri),await b.delete(y.codeUri,{recursive:!0,moveToTrash:await this.doGetMoveToTrash(c)})}async getEncoding(f){return"utf8"}listCapabilities(){return s.Iterable.map(this.fsProviders,([f,c])=>({scheme:f,capabilities:c.capabilities}))}registerProvider(f,c){if(this.fsProviders.has(f))throw new Error(`The file system provider for \`${f}\` already registered`);const y=[];this.fsProviders.set(f,c),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:f,provider:c}),y.push({dispose:()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:f,provider:c}),this.fsProviders.delete(f),this._providerChanged.add(f)}}),c.onDidChangeFile&&y.push(c.onDidChangeFile(A=>this.fireFilesChange({changes:A}))),c.onDidWatcherOverflow&&y.push(c.onDidWatcherOverflow(A=>this.fireWatcherOverflow(A))),c.onDidWatcherFailed&&y.push(c.onDidWatcherFailed(A=>this.fireWatcherFailed(A))),this.toDisposable.push(c.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:c,scheme:f}))),y.push({dispose:async()=>{const A=[];(this.watcherWithSchemaMap.get(f)||[]).forEach(S=>A.push(this.unwatchFileChanges(S))),await Promise.all(A)}}),this._providerChanged.add(f),this.onFileProviderChangedEmitter.fire(Array.from(this._providerChanged)),this.toDisposable.pushAll(y);const b=new l.DisposableCollection;return b.pushAll(y),this._onFileProviderChanged.fire(Array.from(this._providerChanged)),b}async access(f,c=h.FileAccess.Constants.F_OK){const y=this.convertUri(f),b=await this.getProvider(y.scheme);if(!(0,h.containsExtraFileMethod)(b,"access")){if(c===h.FileAccess.Constants.F_OK)try{return!!await b.stat(y.codeUri)}catch{return!1}throw this.getErrorProvideNotSupport(y.scheme,"access")}return await b.access(y.codeUri,c)}async getFileType(f){const c=this.convertUri(f),y=await this.getProvider(c.scheme);if(!(0,h.containsExtraFileMethod)(y,"getFileType"))throw this.getErrorProvideNotSupport(c.scheme,"getFileType");return await y.getFileType(f)}async getCurrentUserHome(){return this.userHomeDeferred.promise}getErrorProvideNotSupport(f,c){return`Scheme ${f} not support this function: ${c}.`}convertUri(f){const c=new l.URI(f);if(!c.scheme)throw new Error(`Unsupported convert Uri with non-scheme Uri: ${f}`);return c}async doReadFile(f,c){var y;if(await this.shouldUseReadStream(f,c)&&f.readFileStream)try{const A=await f.readFileStream(c);return await this.collectReadableStream(A)}catch(A){(y=this.logger)===null||y===void 0||y.warn("[FileServiceClient] readFileStream failed, fallback to readFile.",A)}return await f.readFile(c)}async shouldUseReadStream(f,c){var y;if(!f.readFileStream||!this.isLargeFileStreamEnabled())return!1;const b=this.getLargeFileStreamThreshold();if(!b)return!1;try{const A=await f.stat(c);if(A&&typeof A.size=="number"&&A.size>=b)return!0}catch(A){(y=this.logger)===null||y===void 0||y.warn("[FileServiceClient] stat failed when deciding readFile strategy, fallback to readFile.",A)}return!1}collectReadableStream(f){return new Promise((c,y)=>{const b=[];let A=0;(0,p.listenReadable)(f,{onData:S=>{const w=S instanceof Uint8Array?S:Uint8Array.from(S);b.push(w),A+=w.byteLength},onError:S=>y(S),onEnd:()=>{if(b.length===0){c(new Uint8Array(0));return}if(b.length===1){c(b[0]);return}const S=new Uint8Array(A);let w=0;for(const I of b)S.set(I,w),w+=I.byteLength;c(S)}})})}getLargeFileStreamThreshold(){var f;const c=(f=this.preference)===null||f===void 0?void 0:f.getValid("editor.largeFile",4294967296);if(typeof c=="number"&&c>0)return c}isLargeFileStreamEnabled(){var f;const c=(f=this.preference)===null||f===void 0?void 0:f.getValid("editor.streamLargeFile",!0);return typeof c>"u"?!0:c}updateExcludeMatcher(){this.filesExcludes.forEach(f=>{this.workspaceRoots.length>0?this.workspaceRoots.forEach(c=>{const b=new l.URI(c).resolve(f).path.toString();this.filesExcludesMatcherList.push((0,l.parseGlob)(b))}):this.filesExcludesMatcherList.push((0,l.parseGlob)(f))})}async shouldWaitProvider(f){const c=await this._onWillActivateFileSystemProvider.fireAndAwait({scheme:f}),{result:y}=c[0];if(y&&y.includes(f)){const b=await l.Event.toPromise(l.Event.filter(this.onFileProviderChanged,A=>A.includes(f)));if(!(0,v.isUndefined)(b))return!0}return!1}async getProvider(f){this._providerChanged.has(f)&&(await this.eventBus.fireAndAwait(new l.ExtensionActivateEvent({topic:"onFileSystem",data:f}),{timeout:3e3}),this._providerChanged.delete(f));const c=this.fsProviders.get(f);if(!c)throw new Error(`Not find ${f} provider.`);return c}async isReadonly(f){try{const c=new l.URI(f);return!!(await(await this.getProvider(c.scheme)).stat(this.convertUri(f).codeUri)).readonly}catch{return!1}}isExclude(f){const c=new l.URI(f);return this.filesExcludesMatcherList.some(y=>y(c.path.toString()))}filterStat(f,c=!0){if(f&&!this.isExclude(f.uri))return f.children&&c&&(f.children=this.filterStatChildren(f.children)),f}filterStatChildren(f){const c=[];return f.forEach(y=>{if(this.isExclude(y.uri))return!1;const b=this.filterStat(y);b&&c.push(b)}),c}applyContentChanges(f,c){let y=r.TextDocument.create("","",1,f);for(const b of c){let A=b.text;if(b.range){const S=y.offsetAt(b.range.start),w=y.offsetAt(b.range.end);A=y.getText().substr(0,S)+b.text+y.getText().substr(w)}y=r.TextDocument.create(y.uri,y.languageId,y.version,A)}return y.getText()}async isInSync(f,c){return!!this.checkInSync(f,c)}checkInSync(f,c){return c.lastModification===f.lastModification&&c.size===f.size}createOutOfSyncError(f){return h.FileSystemError.FileIsOutOfSync(f.uri)}async doGetEncoding(f){return f&&typeof f.encoding<"u"?f.encoding:this.options.encoding}async doGetOverwrite(f){return f&&typeof f.overwrite<"u"?f.overwrite:this.options.overwrite}async doGetRecursive(f){return f&&typeof f.recursive<"u"?f.recursive:this.options.recursive}async doGetMoveToTrash(f){return f&&typeof f.moveToTrash<"u"?f.moveToTrash:this.options.moveToTrash}async reconnect(){const f=await this.getProvider(v.Schemes.file);f.initialize&&await f.initialize(this.clientId,this.appConfig.recursiveWatcherBackend);const y=Array.from(this.uriWatcherMap.keys()).map(async b=>{var A;try{const S=new l.URI(b),w=this.uriWatcherMap.get(b);w?.watcher&&await this.watchFileChanges(S,w.excludes)}catch(S){(A=this.logger)===null||A===void 0||A.error("Error reconnecting watcher for:",b,S)}});await Promise.allSettled(y)}};t.FileServiceClient=u,n.__decorate([(0,o.Autowired)(h.IBrowserFileSystemRegistry),n.__metadata("design:type",d)],u.prototype,"registry",void 0),n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],u.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(v.IEventBus),n.__metadata("design:type",Object)],u.prototype,"eventBus",void 0),n.__decorate([(0,o.Autowired)(l.AppConfig),n.__metadata("design:type",Object)],u.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(m.IApplicationService),n.__metadata("design:type",Object)],u.prototype,"applicationService",void 0),n.__decorate([(0,o.Autowired)(v.ILogger),n.__metadata("design:type",Object)],u.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(l.PreferenceService),n.__metadata("design:type",Object)],u.prototype,"preference",void 0),t.FileServiceClient=u=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],u)},69037:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(42933),v=e(2156);let _=class{constructor(){this._disposables=new o.DisposableStore,this._disposables.add(this.fileSystem.registerProvider(o.Schemes.file,this.diskFileServiceProvider))}async initialize(){const p=this.contributionProvider.getContributions();await Promise.all(p.map(async s=>{s.registerProvider&&await s.registerProvider(this.fileSystem)})),await Promise.all(p.map(async s=>{s.onFileServiceReady&&await s.onFileServiceReady()})),this.fileSystem.initialize&&await this.fileSystem.initialize()}onReconnect(){this.fileServiceClient.reconnect().catch(p=>this.logger.error("Failed to reconnect watchers:",p))}dispose(){this._disposables.dispose()}};t.FileServiceContribution=_,n.__decorate([(0,r.Autowired)(l.IFileServiceClient),n.__metadata("design:type",v.FileServiceClient)],_.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(l.IDiskFileProvider),n.__metadata("design:type",Object)],_.prototype,"diskFileServiceProvider",void 0),n.__decorate([(0,r.Autowired)(o.FsProviderContribution),n.__metadata("design:type",Object)],_.prototype,"contributionProvider",void 0),n.__decorate([(0,r.Autowired)(l.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),t.FileServiceContribution=_=n.__decorate([(0,o.Domain)(o.ClientAppContribution),n.__metadata("design:paramtypes",[])],_)},60476:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiskFsProviderClient=t.CoreFileServiceProviderClient=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(42933);class v{constructor(){this.onDidChangeFileEmitter=new o.Emitter,this.onDidChangeFile=this.onDidChangeFileEmitter.event,this.watcherOverflowEmitter=new o.Emitter,this.onDidWatcherOverflow=this.watcherOverflowEmitter.event,this.watcherFailedEmitter=new o.Emitter,this.onDidWatcherFailed=this.watcherFailedEmitter.event}onWatcherOverflow(p){this.watcherOverflowEmitter.fire(p)}onWatcherFailed(p){this.watcherFailedEmitter.fire(p)}watch(p,s){return this.fileServiceProvider.watch(p,s)}unwatch(p){return this.fileServiceProvider.unwatch&&this.fileServiceProvider.unwatch(p)}async stat(p){return await this.fileServiceProvider.stat(p)}readDirectory(p){return this.fileServiceProvider.readDirectory(p)}createDirectory(p){return this.fileServiceProvider.createDirectory(p)}async readFile(p,s){return s&&(0,o.getDebugLogger)("fileService.fsProvider").warn("encoding option for fsProvider.readFile is deprecated"),await this.fileServiceProvider.readFile(p)}readFileStream(p){if(this.fileServiceProvider.readFileStream)return this.fileServiceProvider.readFileStream(p);throw new Error("readFileStream not supported")}writeFile(p,s,h){return this.fileServiceProvider.writeFile(p,Array.from(s),h)}delete(p,s){return this.fileServiceProvider.delete(p,s)}rename(p,s,h){return this.fileServiceProvider.rename(p,s,h)}}t.CoreFileServiceProviderClient=v,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],v.prototype,"injector",void 0);let _=class extends v{constructor(){super(...arguments),this.onDidChangeCapabilities=o.Event.None}get capabilities(){return this._capabilities||(this._capabilities=12318,o.isLinux&&(this._capabilities|=1024)),this._capabilities}async initialize(p,s){var h,a;if(!((h=this.fileServiceProvider)===null||h===void 0)&&h.initialize)try{await((a=this.fileServiceProvider)===null||a===void 0?void 0:a.initialize(p,s))}catch(g){(0,o.getDebugLogger)("fileService.fsProvider").error("initialize error",g)}}setWatchFileExcludes(p){return this.fileServiceProvider.setWatchFileExcludes(p)}getWatchFileExcludes(){return this.fileServiceProvider.getWatchFileExcludes()}onDidFilesChanged(p){const s=p.changes.map(h=>({uri:h.uri,type:h.type}));this.onDidChangeFileEmitter.fire(s)}copy(p,s,h){return this.fileServiceProvider.copy(p,s,h)}access(p,s){return this.fileServiceProvider.access(p,s)}getCurrentUserHome(){return this.fileServiceProvider.getCurrentUserHome()}getFileType(p){return this.fileServiceProvider.getFileType(p)}};t.DiskFsProviderClient=_,n.__decorate([(0,r.Autowired)(l.DiskFileServicePath),n.__metadata("design:type",Object)],_.prototype,"fileServiceProvider",void 0),n.__decorate([(0,o.debounce)(100),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Array]),n.__metadata("design:returntype",void 0)],_.prototype,"setWatchFileExcludes",null),t.DiskFsProviderClient=_=n.__decorate([(0,r.Injectable)()],_)},96708:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceClientModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(42933),v=e(70671),_=e(2156),m=e(69037),p=e(60476),s=e(23188);let h=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:l.IFileServiceClient,useClass:_.FileServiceClient},{token:l.IBrowserFileSystemRegistry,useClass:_.BrowserFileSystemRegistryImpl},{token:l.IDiskFileProvider,useClass:p.DiskFsProviderClient},{token:l.IShadowFileProvider,useClass:s.ShadowFileSystemProvider},m.FileServiceContribution],this.backServices=[{servicePath:l.DiskFileServicePath,clientToken:l.IDiskFileProvider,protocol:v.DiskFileServiceProtocol}]}};t.FileServiceClientModule=h,t.FileServiceClientModule=h=n.__decorate([(0,r.Injectable)()],h)},23188:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowFileSystemProvider=void 0;const n=e(85608),r=e(76003),o=e(41869);let l=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.readonly=!0,this.shadowFiles=new Map,this.fileChangeEmitter=new o.Emitter,this.onDidChangeFile=this.fileChangeEmitter.event}unwatch(_){throw new Error("Method not implemented.")}readFileStream(_){throw new Error("Method not implemented.")}watch(_,m){throw new Error("Method not implemented.")}stat(_){return Promise.resolve({uri:_.toString(),lastModification:0})}readDirectory(_){throw new Error("Method not implemented.")}createDirectory(_){throw new Error("Method not implemented.")}readFile(_){return this.shadowFiles.get(_.toString())||o.BinaryBuffer.fromString("no available").buffer}writeFile(_,m,p){this.shadowFiles.set(_.toString(),m)}delete(_,m){throw new Error("Method not implemented.")}rename(_,m,p){throw new Error("Method not implemented.")}copy(_,m,p){throw new Error("Method not implemented.")}exists(_){throw new Error("Method not implemented.")}access(_,m){throw new Error("Method not implemented.")}};t.ShadowFileSystemProvider=l,t.ShadowFileSystemProvider=l=n.__decorate([(0,r.Injectable)()],l)},81952:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcher=void 0;const n=e(43718);function r(l,v){return l.filter(_=>!!_.uri.startsWith(v))}class o{constructor(v){this.toDispose=new n.DisposableCollection,this.changeEmitter=new n.Emitter,this.toDispose.push(this.changeEmitter),this.fileServiceClient=v.fileServiceClient,this.watchId=v.watchId,this.uri=v.uri,this.fileServiceClient.onFilesChanged(_=>{const m=r(_,this.uri.toString());m&&m.length>0&&this.changeEmitter.fire(m)})}get onFilesChanged(){return this.changeEmitter.event}dispose(){return Promise.all([this.toDispose.dispose(),this.fileServiceClient.unwatchFileChanges(this.watchId)])}isDisposed(){return this.toDispose.disposed}}t.FileSystemWatcher=o},91813:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXT_LIST_TEXT=t.EXT_LIST_IMAGE=t.EXT_LIST_VIDEO=void 0,t.getFileTypeByExt=e,t.EXT_LIST_VIDEO=new Set(["mp4","webm","mkv","mov","mts","flv","avi","wmv"]),t.EXT_LIST_IMAGE=new Set(["png","gif","jpg","jpeg","svg","bmp","avif","cr2","cr3","dng","flif","heic","icns","jxl","jpm","jpx","nef","raf","rw2","tif","orf","webp","apng"]),t.EXT_LIST_TEXT=new Set(["xml"]);function e(n){let r="text";return n&&(t.EXT_LIST_IMAGE.has(n)?r="image":t.EXT_LIST_VIDEO.has(n)?r="video":t.EXT_LIST_TEXT.has(n)?r="text":r="binary"),r}},79929:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IBrowserFileSystemRegistry=t.IFileServiceClient=void 0;const n=e(43718);t.IFileServiceClient=n.IFileServiceClient,t.IBrowserFileSystemRegistry=Symbol("IBrowserFileSystemRegistry")},49818:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemError=t.FileOperationError=t.FileSystemProviderError=t.FileSystemProviderErrorCode=t.FileAccess=t.IFileService=t.IShadowFileProvider=t.IDiskFileProvider=t.FileStat=t.FileType=void 0,t.createFileSystemProviderError=p,t.markAsFileSystemProviderError=s,t.containsExtraFileMethod=a,t.notEmpty=g,t.isErrnoException=d,t.handleError=u;const n=e(85608),r=e(43718);var o=e(31036);Object.defineProperty(t,"FileType",{enumerable:!0,get:function(){return o.FileType}}),Object.defineProperty(t,"FileStat",{enumerable:!0,get:function(){return o.FileStat}}),n.__exportStar(e(11854),t),t.IDiskFileProvider=Symbol("IDiskFileProvider"),t.IShadowFileProvider=Symbol("IShadowFileProvider"),t.IFileService=Symbol("IFileService");var l;(function(E){let f;(function(c){c.F_OK=0,c.R_OK=4,c.W_OK=2,c.X_OK=1})(f=E.Constants||(E.Constants={}))})(l||(t.FileAccess=l={}));var v;(function(E){E.FileExists="EntryExists",E.FileNotFound="EntryNotFound",E.FileNotADirectory="EntryNotADirectory",E.FileIsADirectory="EntryIsADirectory",E.FileIsOutOfSync="FileIsOutOfSync",E.FileExceedsMemoryLimit="EntryExceedsMemoryLimit",E.FileTooLarge="EntryTooLarge",E.FileWriteLocked="EntryWriteLocked",E.NoPermissions="NoPermissions",E.Unavailable="Unavailable",E.Unknown="Unknown"})(v||(t.FileSystemProviderErrorCode=v={}));class _ extends Error{static declare(f,c){return Object.assign((...y)=>p(c(...y),f),{is:y=>{var b;return(b=y.stack)===null||b===void 0?void 0:b.startsWith(f)}})}constructor(f,c){super(f),this.code=c}is(f){return this.name===f.name}}t.FileSystemProviderError=_;class m extends Error{constructor(f,c,y){super(f),this.fileOperationResult=c,this.options=y}static isFileOperationError(f){return f instanceof Error&&!(0,r.isUndefinedOrNull)(f.fileOperationResult)}}t.FileOperationError=m;function p(E,f){const c=new _(E.toString(),f);return s(c,f),c}function s(E,f){return E.name=f?`${f} (FileSystemError)`:"FileSystemError",E}var h;(function(E){E.FileNotFound=_.declare(v.FileNotFound,(f,c)=>`${c?c+" ":""} '${f}' is not found.`),E.FileExists=_.declare(v.FileExists,(f,c)=>`${c?c+" ":""}'${f}' already exists.`),E.FileNotADirectory=_.declare(v.FileNotADirectory,(f,c)=>`${c?c+" ":""}'${f}' is not a directory.`),E.FileIsADirectory=_.declare(v.FileIsADirectory,(f,c)=>`${c?c+" ":""}'${f}' is a directory.`),E.FileIsOutOfSync=_.declare(v.FileIsOutOfSync,(f,c)=>`${c?c+" ":""}'${f}' is out of sync.`),E.FileExceedsMemoryLimit=_.declare(v.FileExceedsMemoryLimit,(f,c)=>`${c?c+" ":""}'${f}' is exceeds memory limit.`),E.FileTooLarge=_.declare(v.FileTooLarge,(f,c)=>`${c?c+" ":""}'${f}' is too large.`),E.FileWriteLocked=_.declare(v.FileWriteLocked,(f,c)=>`${c?c+" ":""}'${f}' is locked.`),E.FileIsNoPermissions=_.declare(v.NoPermissions,(f,c)=>`${c?c+" ":""}'${f}' is no permissions.`),E.Unavailable=_.declare(v.Unavailable,(f,c)=>`${c?c+" ":""}'${f}' is unavailable.`),E.Unknown=_.declare(v.Unknown,(f,c)=>`${c?c+" ":""}'${f}' is unkonw.`)})(h||(t.FileSystemError=h={}));function a(E,f){return(0,r.hasProperty)(E,f)&&(0,r.isFunction)(E[f])}function g(E){return E!==void 0}function d(E){return E.code!==void 0&&E.errno!==void 0}function u(E){var f,c,y,b,A;if(d(E))switch(E.code){case"EEXIST":throw h.FileExists(r.Uri.file((f=E.path)!==null&&f!==void 0?f:""));case"EPERM":case"EACCESS":throw h.FileIsNoPermissions(r.Uri.file((c=E.path)!==null&&c!==void 0?c:""));case"ENOENT":throw h.FileNotFound(r.Uri.file((y=E.path)!==null&&y!==void 0?y:""));case"ENOTDIR":throw h.FileNotADirectory(r.Uri.file((b=E.path)!==null&&b!==void 0?b:""));case"EISDIR":throw h.FileIsADirectory(r.Uri.file((A=E.path)!==null&&A!==void 0?A:""))}throw E}},42933:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79929),t),n.__exportStar(e(49818),t),n.__exportStar(e(28217),t),n.__exportStar(e(91813),t),n.__exportStar(e(50295),t)},70671:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiskFileServiceProtocol=void 0;const n=e(26387),r=e(52890),o=e(50295);t.DiskFileServiceProtocol={name:o.DiskFileServicePath,methods:[{method:"readFile",request:[{name:"uri",type:r.UriComponentsProto}],response:{type:n.Type.binary()}}]}},50295:(P,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileExtServicePath=t.FileWatcherServicePath=t.ShadowFileServicePath=t.DiskFileServicePath=t.FileServicePath=void 0,t.FileServicePath="FileService",t.DiskFileServicePath="DiskFileService",t.ShadowFileServicePath="ShadowFileService",t.FileWatcherServicePath="FileWatcherService",t.FileExtServicePath="FileExtServicePath"},28217:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatcherProcessManagerProxy=t.WatcherServiceProxy=t.WATCHER_INIT_DATA_KEY=t.SUMI_WATCHER_PROCESS_SOCK_KEY=t.INsfw=void 0;const n=e(86058);var r;(function(o){let l;(function(v){v[v.CREATED=0]="CREATED",v[v.DELETED=1]="DELETED",v[v.MODIFIED=2]="MODIFIED",v[v.RENAMED=3]="RENAMED"})(l=o.actions||(o.actions={}))})(r||(t.INsfw=r={})),t.SUMI_WATCHER_PROCESS_SOCK_KEY="sumi-watcher-process-sock",t.WATCHER_INIT_DATA_KEY="sumi-watcher-init-data",t.WatcherServiceProxy=new n.ProxyIdentifier("WatcherHostServiceImpl"),t.WatcherProcessManagerProxy=new n.ProxyIdentifier("WatcherProcessManagerProxy")},14951:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(42933),t)},57942:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDialogModel=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(26542),m=e(6250),p=e(2812),s=r.__importDefault(e(89200)),h=e(9018);let a=n=class{static createContainer(d,u){return d.createChild([{token:m.IFileDialogTreeService,useValue:u},{token:m.IFileDialogModel,useClass:n}])}static createModel(d,u){return n.createContainer(d,u).get(m.IFileDialogModel)}constructor(){this.selectedDecoration=new l.Decoration(s.default.mod_selected),this.focusedDecoration=new l.Decoration(s.default.mod_focused),this.loadingDecoration=new l.Decoration(s.default.mod_loading),this.cutDecoration=new l.Decoration(s.default.mod_cut),this._selectedFiles=[],this.disposableCollection=new v.DisposableCollection,this.onDidFocusedFileChangeEmitter=new v.Emitter,this.onDidSelectedFileChangeEmitter=new v.Emitter,this.clearFileSelectedDecoration=()=>{this._selectedFiles.forEach(d=>{this.selectedDecoration.removeTarget(d)}),this._selectedFiles=[],this.onDidSelectedFileChangeEmitter.fire([])},this.activeFileDecoration=(d,u=!0)=>{d!==this.treeModel.root&&(this.preContextMenuFocusedFile&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile),this.preContextMenuFocusedFile=null),d&&(this.selectedFiles.length>0&&this.selectedFiles.forEach(E=>{this.selectedDecoration.removeTarget(E)}),this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.selectedDecoration.addTarget(d),this.focusedDecoration.addTarget(d),this._focusedFile=d,this._selectedFiles=[d],this.onDidFocusedFileChangeEmitter.fire(d.uri),this.onDidSelectedFileChangeEmitter.fire([d.uri]),u&&this.treeModel.dispatchChange()))},this.selectFileDecoration=(d,u=!0)=>{d!==this.treeModel.root&&(this.preContextMenuFocusedFile&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile),this.preContextMenuFocusedFile=null),d&&(this.selectedFiles.length>0&&this.selectedFiles.forEach(E=>{this.selectedDecoration.removeTarget(E)}),this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.selectedDecoration.addTarget(d),this._selectedFiles=[d],this.onDidSelectedFileChangeEmitter.fire([d.uri]),u&&this.treeModel.dispatchChange()))},this.activeFileFocusedDecoration=(d,u=!1)=>{d!==this.treeModel.root&&(this.focusedFile!==d&&(u?(this.preContextMenuFocusedFile?(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile)):this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.preContextMenuFocusedFile=d):this.focusedFile&&(this.preContextMenuFocusedFile=null,this.focusedDecoration.removeTarget(this.focusedFile)),d&&(this.selectedDecoration.addTarget(d),this.focusedDecoration.addTarget(d),this._focusedFile=d,this._selectedFiles.push(d),this.onDidFocusedFileChangeEmitter.fire(d.uri),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(E=>E.uri)))),this.treeModel.dispatchChange())},this.activeFileSelectedDecoration=d=>{this._selectedFiles.indexOf(d)>-1||(this._selectedFiles.push(d),this.selectedDecoration.addTarget(d),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(u=>u.uri)),this.treeModel.dispatchChange())},this.activeFileDecorationByRange=(d,u)=>{for(this.clearFileSelectedDecoration(),this.preContextMenuFocusedFile=null;d<=u;d++){const E=this.treeModel.root.getTreeNodeAtIndex(d);E&&(this._selectedFiles.push(E),this.selectedDecoration.addTarget(E))}this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(E=>E.uri)),this.treeModel.dispatchChange()},this.enactiveFileDecoration=()=>{this.focusedFile&&(this.focusedDecoration.removeTarget(this.focusedFile),this.onDidFocusedFileChangeEmitter.fire(),this.treeModel.dispatchChange()),this._focusedFile=void 0},this.toggleDirectory=async d=>{d.expanded?this.fileTreeHandle.collapseNode(d):this.fileTreeHandle.expandNode(d)},this.handleTreeBlur=()=>{this.enactiveFileDecoration()},this.handleTreeFocus=()=>{},this.handleItemRangeClick=(d,u)=>{if(!this.focusedFile)this.handleItemClick(d,u);else if(this.focusedFile&&this.focusedFile!==d){const E=this.treeModel.root.getIndexAtTreeNode(d),f=this.treeModel.root.getIndexAtTreeNode(this.focusedFile);f>E?this.activeFileDecorationByRange(E,f):f<E&&this.activeFileDecorationByRange(f,E)}},this.handleItemToggleClick=(d,u)=>{u!==l.TreeNodeType.CompositeTreeNode&&u!==l.TreeNodeType.TreeNode||(this.selectedFiles.indexOf(d)>-1?this.focusedFile===d?this.enactiveFileDecoration():this.activeFileFocusedDecoration(d):this.activeFileSelectedDecoration(d))},this.handleItemClick=(d,u)=>{this.clickTimes++,(u===l.TreeNodeType.CompositeTreeNode||u===l.TreeNodeType.TreeNode)&&this.activeFileDecoration(d),u===l.TreeNodeType.CompositeTreeNode&&this.corePreferences["workbench.list.openMode"]==="singleClick"&&this.toggleDirectory(d),this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=setTimeout(()=>{this.clickTimes>1&&u!==l.TreeNodeType.TreeNode&&this.corePreferences["workbench.list.openMode"]==="doubleClick"&&this.toggleDirectory(d),this.clickTimes=0},200)},this.getDirectoryList=()=>this.fileTreeDialogService.getDirectoryList(),this._whenReady=this.initTreeModel()}get onDidFocusedFileChange(){return this.onDidFocusedFileChangeEmitter.event}get onDidSelectedFileChange(){return this.onDidSelectedFileChangeEmitter.event}get fileTreeHandle(){return this._fileTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get whenReady(){return this._whenReady}get focusedFile(){return this._focusedFile}get selectedFiles(){return this._selectedFiles}async initTreeModel(){const d=(await this.fileTreeDialogService.resolveChildren())[0];this._treeModel=this.injector.get(p.FileTreeModel,[d]),this.initDecorations(d),this.disposableCollection.push(this._decorations),this.disposableCollection.push(this.labelService.onDidChange(()=>{this.treeModel.dispatchChange()})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,u=>{this.loadingDecoration.addTarget(u)})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,u=>{this.loadingDecoration.removeTarget(u)}))}async updateTreeModel(d){const u=await this.fileTreeDialogService.resolveRoot(d);if(u&&u.length>0){const E=u[0];this._treeModel=this.injector.get(p.FileTreeModel,[E]),this.clearFileSelectedDecoration(),this.initDecorations(E)}}initDecorations(d){this._decorations&&this._decorations.dispose(),this._decorations=new l.DecorationsManager(d),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.cutDecoration),this._decorations.addDecoration(this.loadingDecoration)}handleTreeHandler(d){this._fileTreeHandle=d}dispose(){this.disposableCollection.dispose()}};t.FileTreeDialogModel=a,a.FILE_TREE_SNAPSHOT_KEY="FILE_TREE_SNAPSHOT",a.DEFAULT_LOCATION_FLUSH_DELAY=500,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],a.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(m.IFileDialogTreeService),r.__metadata("design:type",h.FileTreeDialogService)],a.prototype,"fileTreeDialogService",void 0),r.__decorate([(0,o.Autowired)(_.LabelService),r.__metadata("design:type",_.LabelService)],a.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(v.CorePreferences),r.__metadata("design:type",Object)],a.prototype,"corePreferences",void 0),t.FileTreeDialogModel=a=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],a)},69748:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_TREE_BADGE_LIMIT=t.FILE_TREE_NODE_HEIGHT=t.FileTreeDialogNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=e(41869),_=e(69959),m=n.__importDefault(e(89200)),p=({item:s,onClick:h,itemType:a,labelService:g,leftPadding:d=8,onTwistierClick:u,decorations:E,defaultLeftPadding:f=8,template:c})=>{const y=a===l.TreeNodeType.RenamePrompt,b=a===l.TreeNodeType.NewPrompt,A=y||b,S=(0,v.useDesignStyles)(m.default.expansion_toggle,"expansion_toggle"),w=(0,v.useDesignStyles)(m.default.file_tree_node,"file_tree_node"),I=W=>{(a===l.TreeNodeType.TreeNode||a===l.TreeNodeType.CompositeTreeNode)&&h(W,s,a)},D=W=>{(a===l.TreeNodeType.TreeNode||a===l.TreeNodeType.CompositeTreeNode)&&(u?u(W,s,a):h(W,s,a))},T=a===l.TreeNodeType.CompositeTreeNode;let R;A?b?R=`${f+(s.parent.depth+1||0)*(d||0)}px`:R=`${f+(s.target.depth||0)*(d||0)}px`:R=T?`${f+(s.depth||0)*(d||0)}px`:`${f+(s.depth||0)*(d||0)+8}px`;const M={height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`,paddingLeft:R},O=(W,j)=>{if(E&&E?.classlist.indexOf(m.default.mod_loading)>-1)return o.default.createElement(l.Loading,null);if(A&&W instanceof l.PromptHandle){let Q=!1;if(y?Q=W.target.type===l.TreeNodeType.CompositeTreeNode:Q=W.type===l.TreeNodeType.CompositeTreeNode,Q)return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,S,(0,v.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:b||!(y&&W.target.type===l.TreeNodeType.CompositeTreeNode&&W.target.expanded)})})}else return o.default.createElement("div",{onClick:j,className:(0,r.default)(m.default.file_tree_node_segment,S,(0,v.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:!W.expanded})})},x=W=>{let j,Q;A&&W instanceof l.PromptHandle?W instanceof l.RenamePromptHandle?(j=W.target.uri.resolve(W.$.value),Q=_.Directory.is(W.target)):(j=W.parent.uri.resolve(W.$.value),Q=W.type===l.TreeNodeType.CompositeTreeNode):(j=W.uri,Q=W.filestat.isDirectory);const G=g.getIcon(j,{isDirectory:Q});return o.default.createElement("div",{className:(0,r.default)(m.default.file_icon,G,{expanded:Q&&W.expanded}),style:{height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`}})},k=W=>c?o.default.createElement(c,null):A&&W instanceof l.PromptHandle?o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",m.default.file_tree_node_prompt_box)},o.default.createElement(W.ProxiedInput,{wrapperStyle:{height:t.FILE_TREE_NODE_HEIGHT,padding:"0 5px"}}))):o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_displayname)},W.name),F=()=>o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_tail)},L()),L=()=>null,N=W=>{if(T)return O(W,D);if(A)return O(W,()=>{})},U=()=>s.tooltip||s.name;return o.default.createElement("div",{key:s.id,onClick:I,title:U(),className:(0,r.default)(w,E?E.classlist:null),style:M,draggable:a===l.TreeNodeType.TreeNode||a===l.TreeNodeType.CompositeTreeNode},o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_content)},N(s),x(s),o.default.createElement("div",{className:A?m.default.file_tree_node_prompt_wrap:m.default.file_tree_node_overflow_wrap},k(s)),F()))};t.FileTreeDialogNode=p,t.FILE_TREE_NODE_HEIGHT=22,t.FILE_TREE_BADGE_LIMIT=99},68195:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialogContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(66e3);let v=class{initScopedContext(m){this._contextKeyService=this.globalContextKeyService.createScoped(m),this.fileDialogViewVisibleContext=l.FileDialogViewVisibleContext.bind(this._contextKeyService)}get service(){return this._contextKeyService}};t.FileDialogContextKey=v,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],v.prototype,"globalContextKeyService",void 0),t.FileDialogContextKey=v=n.__decorate([(0,r.Injectable)()],v)},9018:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDialogService=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(41869),v=e(26542),_=e(54414),m=e(14951),p=e(72665),s=e(51500),h=e(6250),a=e(57781),g=e(97738),d=e(68195);let u=class extends o.Tree{constructor(f){super(),this._whenReady=this.resolveWorkspaceRoot(f)}get whenReady(){return this._whenReady}async resolveWorkspaceRoot(f){if(f){const c=new l.URI(f).withScheme(l.Schemes.file),y=await this.fileTreeAPI.resolveFileStat(c);y&&(this.workspaceRoot=y)}}async resolveChildren(f){if(f){if(f.uri){const{children:c}=await this.fileTreeAPI.resolveChildren(this,f.uri.toString(),f);return c}}else{this.workspaceRoot||(this.workspaceRoot=(await this.workspaceService.roots)[0]);const{children:c}=await this.fileTreeAPI.resolveChildren(this,this.workspaceRoot);return this.root=c[0],c}return[]}async resolveRoot(f){let c;/^file:\/\//.test(f)&&(c=new l.URI(f)),c=l.URI.file(f);const y=await this.fileTreeAPI.resolveFileStat(c);if(y){const{children:b}=await this.fileTreeAPI.resolveChildren(this,y);return this.root=b[0],b}}getDirectoryList(){const f=[];if(!this.root)return f;let c=new l.URI(this.workspaceRoot.uri);if(c&&c.parent)for(;c.parent;){const y=c.codeUri.fsPath;if(f.indexOf(y)>=0)break;f.push(y),c=c.parent}else f.push(c.codeUri.fsPath.toString());return f}sortComparator(f,c){return f.constructor===c.constructor?f.name.startsWith(".")&&!c.name.startsWith(".")?1:!f.name.startsWith(".")&&c.name.startsWith(".")?-1:f.name.localeCompare(c.name,"kn",{numeric:!0}):f.type===o.TreeNodeType.CompositeTreeNode?-1:c.type===o.TreeNodeType.CompositeTreeNode?1:0}initContextKey(f){f&&this.fileDialogContextKey.initScopedContext(f)}get contextKey(){return this.fileDialogContextKey}async saveAs(f){const{oldFilePath:c,newFilePath:y}=f;if(!c||!y)throw new Error("oldFilePath and newFilePath are required");await this.createFile(f);try{const b=l.URI.file(f.newFilePath),A={preview:!1,focus:!0,replace:!0,forceClose:!0,disableNavigate:!1};await this.workbenchEditorService.open(b,A),await this.fileTreeModelService.clearFileSelectedDecoration();const S=this.fileTreeService.getNodeByPathOrUri(b);S&&await this.fileTreeModelService.activeFileDecoration(S)}catch(b){throw new Error(`Failed to open saveAs file: ${b.message}`)}}async createFile(f){try{const{oldFilePath:c,newFilePath:y}=f;if(!await this.fileServiceClient.getFileStat(c))throw new Error(`Source file not found: ${c}`);const{content:A}=await this.fileServiceClient.readFile(c);await this.fileServiceClient.createFile(y,{content:A.toString(),encoding:"utf8",overwrite:!0})}catch(c){throw new Error(`Failed to create file: ${c.message}`)}}renderCustomMsg(){return null}async getDefaultFilePath(f,c){return c}dispose(){super.dispose()}};t.FileTreeDialogService=u,n.__decorate([(0,r.Autowired)(h.IFileTreeAPI),n.__metadata("design:type",Object)],u.prototype,"fileTreeAPI",void 0),n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],u.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(v.LabelService),n.__metadata("design:type",v.LabelService)],u.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(d.FileDialogContextKey),n.__metadata("design:type",d.FileDialogContextKey)],u.prototype,"fileDialogContextKey",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],u.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],u.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(p.IDialogService),n.__metadata("design:type",Object)],u.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(g.FileTreeModelService),n.__metadata("design:type",g.FileTreeModelService)],u.prototype,"fileTreeModelService",void 0),n.__decorate([(0,r.Autowired)(h.IFileTreeService),n.__metadata("design:type",a.FileTreeService)],u.prototype,"fileTreeService",void 0),t.FileTreeDialogService=u=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[String])],u)},51888:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialog=t.FILE_TREE_DIALOG_HEIGHT=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(41869),v=e(68974),_=e(72665),m=e(69748),p=n.__importDefault(e(13294));t.FILE_TREE_DIALOG_HEIGHT=22;const s=({options:h,model:a,isOpenDialog:g,fileService:d})=>{const u=(0,l.useInjectable)(_.IDialogService),E=(0,r.useRef)(null),[f,c]=(0,r.useState)(h.defaultFileName||""),[y,b]=(0,r.useState)(!1),[A,S]=(0,r.useState)(""),[w,I]=(0,r.useState)([]),D=(0,r.useRef)(h.defaultFileName||"");(0,r.useEffect)(()=>{var oe;return a&&(b(!1),O(),(oe=d.contextKey.fileDialogViewVisibleContext)===null||oe===void 0||oe.set(!0)),()=>{a.dispose()}},[a]),(0,r.useEffect)(()=>{h.defaultFileName&&(c(h.defaultFileName||""),D.current=h.defaultFileName||"")},[h]),(0,r.useEffect)(()=>{if(y){const oe=a.getDirectoryList();I(oe)}},[y]);const T=(0,r.useCallback)(()=>{const oe=a.selectedFiles.map(ie=>ie.uri.path.toString());if(D.current&&h.showNameInput&&(oe?.length===1||h.defaultUri)){const ie=oe?.length===1?oe[0]:h.defaultUri.path.toString();h?.saveAs&&d.saveAs({oldFilePath:l.path.join(ie,h?.defaultFileName||""),newFilePath:l.path.join(ie,D.current)}),u.hide([l.path.join(ie,D.current)])}else oe.length>0?u.hide(oe):A?u.hide([A]):h.defaultUri?u.hide([h.defaultUri.path.toString()]):a.treeModel&&a.treeModel.root?u.hide([a.treeModel.root.uri.path.toString()]):u.hide([]);b(!1),d.contextKey.fileDialogViewVisibleContext.set(!1)},[y,u,a,h,A]),R=async oe=>{let ie=oe.treeModel.root.uri.codeUri.fsPath;return d.getDefaultFilePath&&(ie=await d.getDefaultFilePath(oe,ie)),ie},M=(0,r.useCallback)(()=>{b(!1),u.hide(),d.contextKey.fileDialogViewVisibleContext.set(!1)},[y,u]),O=(0,r.useCallback)(async()=>{await a.whenReady,await a.treeModel.ensureReady;const oe=await R(a);S(oe),b(!0)},[a,A,y]),x=!g,k=(0,r.useCallback)(oe=>{a.handleTreeHandler({...oe,getModel:()=>a.treeModel})},[a]),F=(0,r.useCallback)((oe,ie)=>{oe.stopPropagation();const{toggleDirectory:he}=a;he(ie)},[a]),L=(0,r.useCallback)(oe=>N(oe)?!1:oe.shiftKey,[]),N=(0,r.useCallback)(oe=>{const{metaKey:ie,ctrlKey:he}=oe;return l.isMacintosh&&ie||he},[]),U=(0,r.useCallback)((oe,ie,he)=>{var me;oe.stopPropagation();const{handleItemClick:q,handleItemToggleClick:be,handleItemRangeClick:fe}=a;if(!ie)return;const te=L(event),ge=N(event);if(te&&!x&&h.canSelectMany)fe(ie,he);else if(ge&&!x&&h.canSelectMany)be(ie,he);else if(x)he===o.TreeNodeType.CompositeTreeNode&&q(ie,he);else if(h.canSelectFiles&&he===o.TreeNodeType.TreeNode){const Re=new Set(Object.values((me=h.filters)!==null&&me!==void 0?me:{}).flat().map(Oe=>`.${Oe}`));if(Re.size>0){const Oe=l.URI.parse(ie.filestat.uri).path.ext;Re.has(Oe)&&q(ie,he)}else q(ie,he)}else h.canSelectFolders&&he===o.TreeNodeType.CompositeTreeNode&&q(ie,he)},[a,x,h]),W=(0,r.useCallback)(async oe=>{b(!1),S(oe),await a.updateTreeModel(oe),b(!0)},[a,y,A]),j=(0,r.useCallback)(async oe=>{b(!1),S(oe),await a.updateTreeModel(oe),b(!0)},[a,y,A,w]),Q=(0,r.useCallback)(()=>d.renderCustomMsg?d.renderCustomMsg():null,[d.renderCustomMsg]),G=(0,r.useCallback)(oe=>r.default.createElement(m.FileTreeDialogNode,{item:oe.item,itemType:oe.itemType,labelService:a.labelService,decorations:a.decorations.getDecorations(oe.item),onClick:U,onTwistierClick:F,defaultLeftPadding:8,leftPadding:8}),[a.treeModel]),X=(0,r.useCallback)(()=>{if(y){if(a.treeModel)return r.default.createElement(o.RecycleTree,{height:300,itemHeight:t.FILE_TREE_DIALOG_HEIGHT,onReady:k,model:a.treeModel},G)}else return r.default.createElement(v.Progress,{loading:!0})},[y,a]),$=(0,r.useMemo)(()=>d.showFilePathSearch!==!1,[d.showFilePathSearch]),V=(0,r.useCallback)(()=>{if(w.length>0)return r.default.createElement(o.Select,{onChange:W,onSearchChange:j,className:p.default.select_control,size:"large",searchPlaceholder:A,value:A,showSearch:$},w.map((oe,ie)=>r.default.createElement(o.Option,{value:oe,key:`${ie} - ${oe}`},oe)))},[w,A]),H=(0,r.useCallback)(oe=>{const{key:ie}=l.KeyCode.createKeyCode(oe),he=oe.shiftKey||oe.metaKey||oe.altKey||oe.ctrlKey;ie&&l.Key.ENTER.keyCode===ie.keyCode&&!he&&T()},[T]);(0,r.useEffect)(()=>{var oe;return E.current&&(d.initContextKey(E.current),d.contextKey.fileDialogViewVisibleContext.set(!0),(oe=E.current)===null||oe===void 0||oe.addEventListener("keyup",H)),()=>{var ie;(ie=E.current)===null||ie===void 0||ie.removeEventListener("keyup",H)}},[]);const K=(0,r.useMemo)(()=>r.default.createElement(r.default.Fragment,null,Q(),r.default.createElement("div",{className:p.default.file_dialog_directory},V()),r.default.createElement("div",{className:p.default.file_dialog_content},X())),[V,X]),Y=(0,r.useMemo)(()=>r.default.createElement("div",{className:p.default.file_dialog_buttons},r.default.createElement(o.Button,{onClick:M,type:"ghost",className:p.default.button},(0,l.localize)("dialog.file.close")),r.default.createElement(o.Button,{onClick:T,type:"primary",className:p.default.button,disabled:x&&h.showNameInput&&f.length===0},g&&h.openLabel||(0,l.localize)("dialog.file.ok"))),[M,T,x,g,f,h]),Z=(0,r.useCallback)(oe=>{c(oe.target.value),D.current=oe.target.value},[f]);return r.default.createElement("div",{className:p.default.file_dialog_wrapper,ref:E},r.default.createElement("div",{className:p.default.file_dialog_directory_title},g?h.title||(0,l.localize)("dialog.file.openLabel"):h.saveLabel||(0,l.localize)("dialog.file.saveLabel")),K,!g&&h.showNameInput&&r.default.createElement("div",{className:p.default.file_dialog_file_container},r.default.createElement("span",{className:p.default.file_dialog_file_name},(0,l.localize)("dialog.file.name"),": "),r.default.createElement(o.Input,{size:"small",value:f,autoFocus:!0,selection:{start:0,end:f.indexOf(".")||f.length},onChange:Z})),Y)};t.FileDialog=s},89508:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowDialogServiceImpl=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),l=e(41869),v=e(37406),_=e(14951),m=e(72665),p=e(57942),s=n.__importDefault(e(13294)),h=e(9018),a=e(51888);let g=class{constructor(){this.idx=1,this._whenReady=this.init()}async init(){this.recentGlobalStorage=await this.storageProvider(l.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA);const u=await this.recentGlobalStorage.get("RECENT_DIALOG_DEFAULT_URI");if(u)this._defaultUri=new l.URI(u);else{const E=await this.fileServiceClient.getCurrentUserHome();this._defaultUri=new l.URI(E.uri)}}get defaultUri(){return this._defaultUri}get whenReady(){return this._whenReady}async updateRecentDefaultUri(u){this.recentGlobalStorage.set("RECENT_DIALOG_DEFAULT_URI",u.toString()),this._defaultUri=u}async showOpenDialog(u={}){this.dialogService.reset(),await this.whenReady;const E={canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1};if(this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const f=this.injector.get(v.IElectronMainUIService),c=[];u.canSelectFiles&&c.push("openFile"),u.canSelectFolders&&c.push("openDirectory"),u.canSelectMany&&c.push("multiSelections"),l.isMacintosh&&c.push("treatPackageAsDirectory","createDirectory");const y=u.defaultUri||this.defaultUri,b=await f.showOpenDialog(l.electronEnv.currentWindowId,{defaultPath:y.codeUri.fsPath,title:u.title,buttonLabel:u.openLabel,properties:c});if(b&&b.length>0){const A=b.map(S=>l.URI.file(S));return this.updateRecentDefaultUri(A[0].parent),A}else return}else{u.defaultUri||(u.defaultUri=this.defaultUri);let f;u.defaultUri?f=this.injector.get(h.FileTreeDialogService,[u.defaultUri.toString()]):f=this.injector.get(h.FileTreeDialogService),await f.whenReady;const c=p.FileTreeDialogModel.createModel(this.injector,f),y=await this.dialogService.open({message:r.default.createElement(a.FileDialog,{key:this.idx++,fileService:f,model:c,options:{...E,...u},isOpenDialog:!0}),type:l.MessageType.Empty,buttons:[],closable:!0,props:{className:s.default.file_dialog_wrapper}});if(this.dialogService.reset(),y&&y.length>0){const b=y.map(A=>l.URI.file(A));return this.updateRecentDefaultUri(b[0].parent),b}else return}}async showSaveDialog(u={}){if(await this.whenReady,this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const E=u.defaultUri||this.defaultUri,c=await this.injector.get(v.IElectronMainUIService).showSaveDialog(l.electronEnv.currentWindowId,{defaultPath:E.resolve(u.defaultFileName||"").codeUri.fsPath,title:u.saveLabel,message:u.saveLabel});if(c){const y=l.URI.file(c);return this.updateRecentDefaultUri(y.parent),y}else return}else{u.defaultUri||(u.defaultUri=this.defaultUri);let E;u.defaultUri?E=this.injector.get(h.FileTreeDialogService,[u.defaultUri.toString()]):E=this.injector.get(h.FileTreeDialogService),await E.whenReady;const f=p.FileTreeDialogModel.createModel(this.injector,E),c=await this.dialogService.open({message:r.default.createElement(a.FileDialog,{key:this.idx++,fileService:E,model:f,options:u,isOpenDialog:!1}),type:l.MessageType.Empty,buttons:[],closable:!0,props:{className:s.default.file_dialog_wrapper}});if(this.dialogService.reset(),c&&c.length>0){const y=l.URI.file(c[0]);return this.updateRecentDefaultUri(y.parent),y}else return}}};t.WindowDialogServiceImpl=g,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],g.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(m.IDialogService),n.__metadata("design:type",Object)],g.prototype,"dialogService",void 0),n.__decorate([(0,o.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],g.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(l.StorageProvider),n.__metadata("design:type",Function)],g.prototype,"storageProvider",void 0),n.__decorate([(0,o.Autowired)(l.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),t.WindowDialogServiceImpl=g=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],g)},88014:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(16413);let v=class{constructor(){this.explorerResourceIsFolder=l.ExplorerResourceIsFolderContext.bind(this.globalContextKeyService),this.explorerViewletVisibleContext=l.ExplorerViewletVisibleContext.bind(this.globalContextKeyService)}initScopedContext(m){this._contextKeyService=this.globalContextKeyService.createScoped(m),this.explorerFocused=l.ExplorerFocusedContext.bind(this._contextKeyService),this.explorerResourceCut=l.ExplorerResourceCut.bind(this._contextKeyService),this.filesExplorerFocused=l.FilesExplorerFocusedContext.bind(this._contextKeyService),this.filesExplorerInputFocused=l.FilesExplorerInputFocusedContext.bind(this._contextKeyService),this.filesExplorerFilteredContext=l.FilesExplorerFilteredContext.bind(this._contextKeyService),this.explorerCompressedFocusContext=l.ExplorerCompressedFocusContext.bind(this._contextKeyService),this.explorerCompressedFirstFocusContext=l.ExplorerCompressedFirstFocusContext.bind(this._contextKeyService),this.explorerCompressedLastFocusContext=l.ExplorerCompressedLastFocusContext.bind(this._contextKeyService)}get service(){return this._contextKeyService}};t.FileContextKey=v,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],v.prototype,"globalContextKeyService",void 0),t.FileContextKey=v=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],v)},40439:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(16413),v=e(93899),_=e(68969),m=e(98295),p=e(41893),s=e(54414),h=e(32595),a=e(63067),g=e(58296),d=e(72665),u=e(55121),E=e(51500),f=e(6250),c=e(69959),y=e(56384),b=e(57781),A=e(97738),S=e(4446);let w=class{constructor(){this._disposables=new o.DisposableStore,this.isRendered=!1,this.deleteThrottler=new o.Throttler,this.willDeleteUris=[]}initialize(){this.workspaceService.initFileServiceExclude().then(async()=>{await this.fileTreeService.init(),this.fileTreeModelService.initTreeModel()}),this.progressService.registerProgressIndicator(h.EXPLORER_CONTAINER_ID)}async onStart(){this.viewsRegistry.registerViewWelcomeContent(f.RESOURCE_VIEW_ID,{content:(0,o.formatLocalize)("welcome-view.noFolderHelp",o.FILE_COMMANDS.OPEN_FOLDER.id),group:g.ViewContentGroups.Open,order:1}),this.mainLayoutService.collectViewComponent({id:f.RESOURCE_VIEW_ID,name:this.getWorkspaceTitle(),weight:3,priority:9,collapsed:!1,component:y.FileTree},h.EXPLORER_CONTAINER_ID),this._disposables.add(this.workspaceService.onWorkspaceLocationChanged(()=>{const D=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);D&&D.updateViewTitle(f.RESOURCE_VIEW_ID,this.getWorkspaceTitle())}))}onDidStart(){const D=this.injector.get(S.SymlinkDecorationsProvider,[this.fileTreeService]);this.decorationService.registerDecorationsProvider(D)}onDidRender(){this.isRendered=!0;const D=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);D&&(this.fileTreeModelService.whenReady.then(()=>{this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(D.isActivated())}),D.onActivate(()=>{this.fileTreeModelService.performLocationOnHandleShow(),this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(!0)}),D.onInActivate(()=>{this.fileTreeModelService.handleTreeBlur(),this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(!1)}))}getWorkspaceTitle(){let D=(0,o.localize)("file.empty.defaultTitle");const T=this.workspaceService.workspace;return T&&(D=new o.URI(T.uri).displayName,!T.isDirectory&&D.endsWith(`.${this.workspaceService.workspaceSuffixName}`)&&(D=D.slice(0,D.lastIndexOf(".")),D===E.UNTITLED_WORKSPACE))?(0,o.localize)("file.workspace.defaultTip"):D}getExplorerTargetUri(D){var T,R,M,O;return D||this.fileTreeModelService.activeUri||((T=this.fileTreeModelService.focusedFile)===null||T===void 0?void 0:T.uri)||((M=(R=this.fileTreeModelService.selectedFiles)===null||R===void 0?void 0:R[0])===null||M===void 0?void 0:M.uri)||((O=this.fileTreeModelService.contextMenuFile)===null||O===void 0?void 0:O.uri)}revealFile(D){if(D)if(this.isRendered){const T=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);!T||!T.isVisible||T.isCollapsed(f.RESOURCE_VIEW_ID)?this.fileTreeModelService.locationOnShow(D):this.fileTreeModelService.location(D)}else this.fileTreeModelService.locationOnShow(D)}registerMenus(D){D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.NEW_FILE.id,label:(0,o.localize)("file.new")},order:1,group:"0_new"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.NEW_FOLDER.id,label:(0,o.localize)("file.folder.new")},order:2,group:"0_new"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.addFolderToWorkspace")},order:1,group:"0_workspace",when:"config.workspace.supportMultiRootWorkspace"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.WORKSPACE_COMMANDS.REMOVE_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.removeFolderFromWorkspace")},order:1,group:"0_workspace",when:"config.workspace.supportMultiRootWorkspace"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_RESOURCES.id,label:(0,o.localize)("file.open")},order:1,group:"1_open"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TO_THE_SIDE.id,label:(0,o.localize)("file.open.side")},order:2,group:"1_open"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TYPE_WITH.id,label:(0,o.localize)("file.open.type")},order:3,group:"1_open"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TERMINAL_WITH_PATH.id,label:(0,o.localize)("file.filetree.openTerminalWithPath")},when:"workbench.panel.terminal",order:4,group:"1_open"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.SEARCH_ON_FOLDER.id,label:(0,o.localize)("file.search.folder")},order:1,group:"2_search"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.DELETE_FILE.id,label:(0,o.localize)("file.delete")},order:1,group:"7_modification"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.RENAME_FILE.id,label:(0,o.localize)("file.rename")},order:3,group:"7_modification"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COMPARE_SELECTED.id,label:(0,o.localize)("file.compare")},order:2,group:"3_compare"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_FILE.id,label:(0,o.localize)("file.copy.file")},order:1,group:"5_cutcopypaste"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.CUT_FILE.id,label:(0,o.localize)("file.cut.file")},order:2,group:"5_cutcopypaste"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.PASTE_FILE.id,label:(0,o.localize)("file.paste.file")},order:3,group:"5_cutcopypaste"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_PATH.id,label:(0,o.localize)("file.copy.path")},group:"6_copypath"}),D.registerMenuItem(v.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_RELATIVE_PATH.id,label:(0,o.localize)("file.copy.relativepath")},group:"6_copypath"})}registerCommands(D){const T=()=>{this.fileTreeService.filterMode&&this.fileTreeService.toggleFilterMode()};D.registerCommand(o.FILE_COMMANDS.OPEN_TERMINAL_WITH_PATH,{execute:M=>{let O=M;if(!O)return;const x=this.fileTreeService.getNodeByPathOrUri(O);x&&!x.filestat.isDirectory&&(O=x.uri.parent),this.commandService.executeCommand(o.TERMINAL_COMMANDS.OPEN_WITH_PATH.id,O)}}),D.registerCommand(o.FILE_COMMANDS.SEARCH_ON_FOLDER,{execute:async M=>{var O;let x=M;if(x||(this.fileTreeModelService.focusedFile?x=this.fileTreeModelService.focusedFile.uri:this.fileTreeModelService.selectedFiles.length>0&&(x=(O=this.fileTreeModelService.selectedFiles[0])===null||O===void 0?void 0:O.uri)),!x)return;let k;if(this.fileTreeService.isMultipleWorkspace)for(const F of await this.workspaceService.roots){const L=new o.URI(F.uri);if(L.isEqualOrParent(x)){k=`./${L.relative(x).toString()}`;break}}else if(this.workspaceService.workspace){const F=new o.URI(this.workspaceService.workspace.uri);F.isEqualOrParent(x)&&(k=`./${F.relative(x).toString()}`)}this.commandService.executeCommand(o.SEARCH_COMMANDS.OPEN_SEARCH.id,{includeValue:k+"/"})},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&c.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.LOCATION,{execute:M=>{M?this.revealFile(M):this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0&&this.revealFile(this.fileTreeModelService.selectedFiles[0].uri)}}),D.registerCommand(o.FILE_COMMANDS.LOCATION_WITH_EDITOR,{execute:()=>{var M,O,x;((O=(M=this.workbenchEditorService.currentEditor)===null||M===void 0?void 0:M.currentUri)===null||O===void 0?void 0:O.scheme)===o.Schemes.file&&this.revealFile((x=this.workbenchEditorService.currentEditor)===null||x===void 0?void 0:x.currentUri)}}),D.registerCommand(o.FILE_COMMANDS.COLLAPSE_ALL,{execute:()=>{const M=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);!M||!M.isVisible||this.fileTreeModelService.collapseAll()}}),D.registerCommand(o.FILE_COMMANDS.REFRESH_ALL,{execute:async()=>{const M=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);!M||!M.isVisible||await this.fileTreeService.refresh()}}),D.registerCommand(o.FILE_COMMANDS.DELETE_FILE,{execute:(M,O)=>{if(T(),O?this.willDeleteUris=this.willDeleteUris.concat(O):this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0?this.willDeleteUris=this.willDeleteUris.concat(this.fileTreeModelService.selectedFiles.map(x=>x.uri)):this.fileTreeModelService.focusedFile&&this.willDeleteUris.push(this.fileTreeModelService.focusedFile.uri),this.willDeleteUris.length!==0)return this.deleteThrottler.queue(this.doDelete.bind(this))},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.RENAME_FILE,{execute:M=>{if(T(),!M)if(this.fileTreeModelService.contextMenuFile)M=this.fileTreeModelService.contextMenuFile.uri;else if(this.fileTreeModelService.focusedFile)M=this.fileTreeModelService.focusedFile.uri;else return;this.fileTreeModelService.renamePrompt(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.NEW_FILE,{execute:async M=>{var O;if(T(),M)this.fileTreeModelService.newFilePrompt(M);else if(this.fileTreeService.isCompactMode&&this.fileTreeModelService.activeUri)this.fileTreeModelService.newFilePrompt(this.fileTreeModelService.activeUri);else if(this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0)this.fileTreeModelService.newFilePrompt(this.fileTreeModelService.selectedFiles[0].uri);else{let x;this.fileTreeService.isMultipleWorkspace?x=new o.URI((await this.workspaceService.roots)[0].uri):x=new o.URI((O=this.workspaceService.workspace)===null||O===void 0?void 0:O.uri),this.fileTreeModelService.newFilePrompt(x)}}}),D.registerCommand(o.FILE_COMMANDS.NEW_FOLDER,{execute:async M=>{var O;if(T(),M)this.fileTreeModelService.newDirectoryPrompt(M);else if(this.fileTreeService.isCompactMode&&this.fileTreeModelService.activeUri)this.fileTreeModelService.newDirectoryPrompt(this.fileTreeModelService.activeUri);else if(this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0)this.fileTreeModelService.newDirectoryPrompt(this.fileTreeModelService.selectedFiles[0].uri);else{let x;this.fileTreeService.isMultipleWorkspace?x=new o.URI((await this.workspaceService.roots)[0].uri):x=new o.URI((O=this.workspaceService.workspace)===null||O===void 0?void 0:O.uri),this.fileTreeModelService.newDirectoryPrompt(x)}}}),D.registerCommand(o.FILE_COMMANDS.COMPARE_SELECTED,{execute:(M,O)=>{if(O&&O.length){const x=this.workbenchEditorService.currentEditor;x&&x.currentUri&&this.fileTreeService.compare(O[0],x.currentUri)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!c.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.OPEN_RESOURCES,{execute:M=>{this.fileTreeService.openAndFixedFile(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!c.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.OPEN_TO_THE_SIDE,{execute:M=>{this.fileTreeService.openToTheSide(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!c.Directory.is(this.fileTreeModelService.contextMenuFile)});const R=(M,O)=>{const{availableOpenTypes:x,currentOpenType:k}=this.workbenchEditorService.currentEditorGroup;if(!(x&&M&&k))return{items:[],selectIndex:-1};const F=this.preferenceService.get("workbench.editorAssociations"),L=[],N=(Q,G)=>G.type===s.EditorOpenType.code?Q.type===s.EditorOpenType.code:G.type===s.EditorOpenType.component&&Q.type===s.EditorOpenType.component?Q.componentId===G.componentId:!1,U=(Q,G)=>(Q?Q+=(0,o.localize)("file.open.type.detail.and")+G:Q=G,Q);let W,j;if(F){const Q=Object.keys(F).find(G=>(0,o.match)(G,M.path.toString().toLowerCase())||(0,o.match)(G,M.path.base.toLowerCase()));W=Q&&F[Q]}return x.forEach((Q,G)=>{var X;const $={label:Q.title||Q.componentId||Q.type,detail:Q.title,run:V=>O(V,Q)};N(k,Q)&&($.description=U($.description,(0,o.localize)("file.open.type.detail.active")),j=G),W&&(!((X=Q.componentId)===null||X===void 0)&&X.endsWith(W))&&($.description=U($.description,(0,o.localize)("file.open.type.detail.default"))),L.push(new o.QuickOpenItem($))}),{items:L,selectIndex:j}};D.registerCommand(o.FILE_COMMANDS.OPEN_TYPE_WITH,{execute:M=>{const O=(L,N)=>{var U,W;return L===o.Mode.OPEN?((U=this.workbenchEditorService.currentEditorGroup)===null||U===void 0||U.changeOpenType((W=N.componentId)!==null&&W!==void 0?W:N.type),!0):!1},{items:x,selectIndex:k}=R(M,O);if(x.length===0||typeof k>"u")return;const F=L=>{this.quickOpenService.open({onType:(N,U)=>U(L)},{fuzzyMatchLabel:!0,ignoreFocusOut:!1,placeholder:(0,o.formatLocalize)("file.open.type.placeholder",M.path.base),selectIndex:()=>k})};x.push(new o.QuickOpenItem({label:(0,o.formatLocalize)("file.open.type.preference.default",`*${M.path.ext}`),showBorder:!0,run:L=>{if(L===o.Mode.OPEN){const N=(j,Q)=>{var G,X,$;if(j===o.Mode.OPEN){const V="workbench.editorAssociations",H=this.preferenceService.resolve(V).scope,K=this.preferenceService.get(V);return this.preferenceService.set(V,{...K||{},[`*${M.path.ext}`]:(G=Q.componentId)!==null&&G!==void 0?G:Q.type},H),(X=this.workbenchEditorService.currentEditorGroup)===null||X===void 0||X.changeOpenType(($=Q.componentId)!==null&&$!==void 0?$:Q.type),!0}return!1},{items:U,selectIndex:W}=R(M,N);if(U.length===0||typeof W>"u")return!0;F(U)}return!1}})),F(x)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!c.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.COPY_PATH,{execute:async M=>{const O=this.getExplorerTargetUri(M);if(!O)return;let k=O.path.toString();if(O.scheme===s.DIFF_SCHEME){const L=O.getParsedQuery();k=new o.URI(L.modified).path.toString()}let F=decodeURIComponent(k);await this.appService.backendOS===o.OperatingSystem.Windows&&(F=F.slice(1)),await this.clipboardService.writeText(F)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile}),D.registerCommand(o.FILE_COMMANDS.COPY_RELATIVE_PATH,{execute:async M=>{let O=this.getExplorerTargetUri(M);if(!O)return;if(O.scheme===s.DIFF_SCHEME){const F=O.getParsedQuery();O=new o.URI(F.modified).withScheme("file")}const x=this.fileTreeService.getNodeByPathOrUri(O);if(x&&x.filestat.isInSymbolicDirectory)return await this.clipboardService.writeText(x.path.split(u.Path.separator).slice(2).join(u.Path.separator));let k;if(this.fileTreeService.isMultipleWorkspace)for(const F of await this.workspaceService.roots){if(k=new o.URI(F.uri),k.isEqual(O))return await this.clipboardService.writeText("./");if(k.isEqualOrParent(O))return await this.clipboardService.writeText(decodeURIComponent(k.relative(O).toString()))}else if(this.workspaceService.workspace)return k=new o.URI(this.workspaceService.workspace.uri),k.isEqual(O)?await this.clipboardService.writeText("./"):await this.clipboardService.writeText(decodeURIComponent(k.relative(O).toString()))},isVisible:()=>!!this.fileTreeModelService.contextMenuFile}),D.registerCommand(o.FILE_COMMANDS.COPY_FILE,{execute:(M,O)=>{if(O&&O.length)this.fileTreeModelService.copyFile(O);else{const x=this.fileTreeModelService.selectedFiles.map(k=>k.uri);x&&x.length&&this.fileTreeModelService.copyFile(x)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.SELECT_CURRENT_NODE,{execute:(M,O)=>{if(O&&O.length)this.fileTreeModelService.selectChildNode(O);else{const x=this.fileTreeModelService.selectedFiles.map(k=>k.uri);x&&x.length&&this.fileTreeModelService.selectChildNode(x)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.CUT_FILE,{execute:(M,O)=>{if(O&&O.length)this.fileTreeModelService.cutFile(O);else{const x=this.fileTreeModelService.selectedFiles.map(k=>k.uri);x&&x.length&&this.fileTreeModelService.cutFile(x)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.PASTE_FILE,{execute:M=>{if(T(),M)this.fileTreeModelService.pasteFile(M);else if(this.fileTreeModelService.focusedFile){let O;this.fileTreeModelService.activeUri?O=this.fileTreeModelService.activeUri:O=this.fileTreeModelService.focusedFile.uri,this.fileTreeModelService.pasteFile(O)}},isEnabled:()=>this.fileTreeModelService.pasteStore&&this.fileTreeModelService.pasteStore.type!==f.PasteTypes.NONE||this.appConfig.isElectronRenderer}),D.registerCommand(o.FILE_COMMANDS.VSCODE_OPEN_FOLDER,{execute:(M,O)=>{const x=this.injector.get(o.IWindowService),k={newWindow:!0};return typeof O=="boolean"?k.newWindow=O:k.newWindow=typeof O?.forceNewWindow=="boolean"?O.forceNewWindow:!0,M?x.openWorkspace(M,k):this.commandService.executeCommand(o.FILE_COMMANDS.OPEN_FOLDER.id,k)},isVisible:()=>{const M=this.preferenceService.get("application.supportsOpenFolder");return M??!1}}),D.registerCommand(o.FILE_COMMANDS.OPEN_FOLDER,{execute:M=>{const O=this.injector.get(o.IWindowService);this.appConfig.isElectronRenderer?this.injector.get(o.IElectronNativeDialogService).showOpenDialog({title:(0,o.localize)("workspace.openDirectory"),properties:["openDirectory"]}).then(k=>{k&&k.length>0&&O.openWorkspace(o.URI.file(k[0]),M||{newWindow:!0})}):this.injector.get(d.IWindowDialogService).showOpenDialog({title:(0,o.localize)("workspace.openDirectory"),canSelectFiles:!1,canSelectFolders:!0}).then(k=>{var F;k&&k.length>0&&this.injector.get(E.IWorkspaceService).open(k[0],{preserveWindow:(F=M?.newWindow)!==null&&F!==void 0?F:!1})})},isVisible:()=>{const M=this.preferenceService.get("application.supportsOpenFolder");return M??!1}}),D.registerCommand(o.FILE_COMMANDS.OPEN_WORKSPACE,{execute:M=>{if(!this.preferenceService.get("application.supportsOpenWorkspace"))return;const x=this.injector.get(o.IWindowService);this.appConfig.isElectronRenderer?this.injector.get(o.IElectronNativeDialogService).showOpenDialog({title:(0,o.localize)("workspace.openWorkspace"),properties:["openFile"],filters:[{name:(0,o.localize)("workspace.openWorkspaceTitle"),extensions:[this.workspaceService.workspaceSuffixName]}]}).then(F=>{F&&F.length>0&&x.openWorkspace(o.URI.file(F[0]),M||{newWindow:!0})}):this.injector.get(d.IWindowDialogService).showOpenDialog({title:(0,o.localize)("workspace.openWorkspace"),canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,filters:{workspace:[this.workspaceService.workspaceSuffixName]}}).then(F=>{var L;F&&F.length>0&&this.injector.get(E.IWorkspaceService).open(F[0],{preserveWindow:(L=M?.newWindow)!==null&&L!==void 0?L:!1})})},isVisible:()=>{const M=this.preferenceService.get("application.supportsOpenWorkspace");return M??!1}}),D.registerCommand(o.FILE_COMMANDS.REVEAL_IN_EXPLORER,{execute:M=>{var O;let x=M instanceof o.URI?M:M?.uri;const k=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);k&&!k.isVisible&&(k.activate(),setTimeout(()=>{k.setCollapsed(f.RESOURCE_VIEW_ID,!1)},200)),!x&&(!((O=this.workbenchEditorService.currentEditor)===null||O===void 0)&&O.currentUri)&&(x=this.workbenchEditorService.currentEditor.currentUri),x&&this.revealFile(o.URI.parse(x.toString()))}}),D.registerCommand(o.FILE_COMMANDS.FOCUS_FILES,{execute:()=>{const M=this.mainLayoutService.getTabbarHandler(h.EXPLORER_CONTAINER_ID);M&&M.activate()}}),D.registerCommand(o.FILE_COMMANDS.OPEN_FILE,{execute:M=>this.windowDialogService.showOpenDialog(M)}),D.registerCommand(o.FILE_COMMANDS.SAVE_FILE,{execute:M=>this.windowDialogService.showSaveDialog(M)}),D.registerCommand(o.FILE_COMMANDS.FILTER_TOGGLE,{execute:()=>this.fileTreeService.toggleFilterMode()}),D.registerCommand(o.FILE_COMMANDS.FILTER_OPEN,{execute:()=>{if(!this.fileTreeService.filterMode)return this.fileTreeService.toggleFilterMode()}}),D.registerCommand(o.FILE_COMMANDS.FILTER_CLOSE,{execute:()=>{this.fileTreeService.filterMode&&this.fileTreeService.toggleFilterMode()}}),D.registerCommand(o.FILE_COMMANDS.NEXT,{execute:()=>{this.fileTreeModelService.moveToNext()}}),D.registerCommand(o.FILE_COMMANDS.PREV,{execute:()=>{this.fileTreeModelService.moveToPrev()}}),D.registerCommand(o.FILE_COMMANDS.COLLAPSE,{execute:()=>{this.fileTreeModelService.collapseCurrentFile()}}),D.registerCommand(o.FILE_COMMANDS.EXPAND,{execute:()=>{this.fileTreeModelService.expandCurrentFile()}}),D.registerCommand(o.FILE_COMMANDS.TOGGLE_OR_OPEN,{execute:()=>{this.fileTreeModelService.toggleOrOpenCurrentFile()}}),D.registerCommand(o.WORKSPACE_COMMANDS.REMOVE_WORKSPACE_FOLDER,{execute:async(M,O)=>{if(T(),!O.length||!this.workspaceService.isMultiRootWorkspaceOpened)return;const x=await this.workspaceService.roots,k=O.filter(F=>x.find(L=>L.uri===F.toString()));k.length>0&&await this.workspaceService.removeRoots(k)},isVisible:()=>this.workspaceService.isMultiRootWorkspaceOpened&&!!this.fileTreeModelService.contextMenuFile&&!!this.workspaceService.tryGetRoots().find(M=>{var O;return M.uri===((O=this.fileTreeModelService.contextMenuFile)===null||O===void 0?void 0:O.uri.toString())})})}registerKeybindings(D){D.registerKeybinding({command:o.FILE_COMMANDS.COPY_FILE.id,keybinding:"ctrlcmd+c",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.PASTE_FILE.id,keybinding:"ctrlcmd+v",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.CUT_FILE.id,keybinding:"ctrlcmd+x",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.SELECT_CURRENT_NODE.id,keybinding:"ctrlcmd+a",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.RENAME_FILE.id,keybinding:"enter",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.DELETE_FILE.id,keybinding:"ctrlcmd+backspace",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.FILTER_OPEN.id,keybinding:"ctrlcmd+f",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.FILTER_CLOSE.id,keybinding:"esc",when:`${l.FilesExplorerFocusedContext.raw} && ${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.NEXT.id,keybinding:"down",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.PREV.id,keybinding:"up",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.EXPAND.id,keybinding:"right",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.COLLAPSE.id,keybinding:"left",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.TOGGLE_OR_OPEN.id,keybinding:"space",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`})}registerToolbarItems(D){D.registerItem({id:o.FILE_COMMANDS.LOCATION_WITH_EDITOR.id,command:o.FILE_COMMANDS.LOCATION_WITH_EDITOR.id,label:(0,o.localize)("file.location"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !config.explorer.autoReveal && !${l.FilesExplorerFilteredContext.raw}`,order:0}),D.registerItem({id:o.FILE_COMMANDS.NEW_FILE.id,command:o.FILE_COMMANDS.NEW_FILE.id,label:(0,o.localize)("file.new"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !${l.FilesExplorerFilteredContext.raw}`,order:1}),D.registerItem({id:o.FILE_COMMANDS.NEW_FOLDER.id,command:o.FILE_COMMANDS.NEW_FOLDER.id,label:(0,o.localize)("file.folder.new"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !${l.FilesExplorerFilteredContext.raw}`,order:2}),D.registerItem({id:o.FILE_COMMANDS.FILTER_TOGGLE.id,command:o.FILE_COMMANDS.FILTER_TOGGLE.id,label:(0,o.localize)("file.filetree.filter"),viewId:f.RESOURCE_VIEW_ID,toggledWhen:`${l.FilesExplorerFilteredContext.raw}`,order:3}),D.registerItem({id:o.FILE_COMMANDS.REFRESH_ALL.id,command:o.FILE_COMMANDS.REFRESH_ALL.id,label:(0,o.localize)("file.refresh"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !${l.FilesExplorerFilteredContext.raw}`,order:4}),D.registerItem({id:o.FILE_COMMANDS.COLLAPSE_ALL.id,command:o.FILE_COMMANDS.COLLAPSE_ALL.id,label:(0,o.localize)("file.collapse"),viewId:f.RESOURCE_VIEW_ID,order:5}),D.registerItem({id:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,command:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.addFolderToWorkspace"),viewId:f.RESOURCE_VIEW_ID,order:0,group:"file_explore_workspace",when:"config.workspace.supportMultiRootWorkspace"})}doDelete(){const D=this.willDeleteUris.slice();return this.willDeleteUris=[],this.fileTreeModelService.deleteFileByUris(D)}dispose(){this._disposables.dispose()}};t.FileTreeContribution=w,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],w.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(f.IFileTreeService),n.__metadata("design:type",b.FileTreeService)],w.prototype,"fileTreeService",void 0),n.__decorate([(0,r.Autowired)(a.IMainLayoutService),n.__metadata("design:type",Object)],w.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(_.IProgressService),n.__metadata("design:type",Object)],w.prototype,"progressService",void 0),n.__decorate([(0,r.Autowired)(E.IWorkspaceService),n.__metadata("design:type",Object)],w.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(A.FileTreeModelService),n.__metadata("design:type",A.FileTreeModelService)],w.prototype,"fileTreeModelService",void 0),n.__decorate([(0,r.Autowired)(p.IDecorationsService),n.__metadata("design:type",p.IDecorationsService)],w.prototype,"decorationService",void 0),n.__decorate([(0,r.Autowired)(s.WorkbenchEditorService),n.__metadata("design:type",s.WorkbenchEditorService)],w.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],w.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(d.IWindowDialogService),n.__metadata("design:type",Object)],w.prototype,"windowDialogService",void 0),n.__decorate([(0,r.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],w.prototype,"clipboardService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],w.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.QuickOpenService),n.__metadata("design:type",Object)],w.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(a.IViewsRegistry),n.__metadata("design:type",Object)],w.prototype,"viewsRegistry",void 0),n.__decorate([(0,r.Autowired)(o.IApplicationService),n.__metadata("design:type",Object)],w.prototype,"appService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],w.prototype,"appConfig",void 0),t.FileTreeContribution=w=n.__decorate([(0,m.Domain)(v.MenuContribution,o.CommandContribution,o.KeybindingContribution,o.TabBarToolbarContribution,o.ClientAppContribution,a.MainLayoutContribution)],w)},2812:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeModel=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(69959),m=e(93239);let p=n=class extends l.TreeModel{constructor(h){super(),this.flushDispatchChangeDelayer=new v.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(h)}init(h){this.root=h,this.root.watcher.on(l.TreeNodeEvent.BranchDidUpdate,this.doDispatchChange.bind(this)),this.decorationService.onDidChange(this.doDispatchChange.bind(this))}doDispatchChange(){this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})}};t.FileTreeModel=p,p.DEFAULT_FLUSH_DELAY=100,r.__decorate([(0,o.Autowired)(m.FileTreeDecorationService),r.__metadata("design:type",m.FileTreeDecorationService)],p.prototype,"decorationService",void 0),t.FileTreeModel=p=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[_.Directory])],p)},46377:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_TREE_BADGE_LIMIT=t.FILE_TREE_NODE_HEIGHT=t.FileTreeNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),v=e(41869),_=e(69959),m=n.__importDefault(e(89200)),{Path:p}=v.path,s=({item:h,onClick:a,onDoubleClick:g,onContextMenu:d,dndService:u,itemType:E,decorationService:f,labelService:c,leftPadding:y=8,onTwistierClick:b,decorations:A,defaultLeftPadding:S=8,template:w,hasFolderIcons:I,hasFileIcons:D,hidesExplorerArrows:T,hasPrompt:R,iconService:M})=>{const[O,x]=o.default.useState(-1),k=E===l.TreeNodeType.RenamePrompt,F=E===l.TreeNodeType.NewPrompt,L=k||F,N=!L&&h.name.indexOf(p.separator)>=0,U=(0,v.useDesignStyles)(m.default.expansion_toggle,"expansion_toggle"),W=(0,v.useDesignStyles)(m.default.file_tree_node,"file_tree_node"),j=L?null:f.getDecoration(h.uri,_.Directory.is(h)),Q=Oe=>{(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&(N&&x(h.name.split(p.separator).length-1),a(Oe,h,E))},G=Oe=>{(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&(N&&x(h.name.split(p.separator).length-1),g(Oe,h,E))},X=Oe=>{(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&(b?b(Oe,h,E):a(Oe,h,E))},$=o.default.useCallback(Oe=>{Oe.nativeEvent.which!==0&&(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&d(Oe,h,E)},[d,h]),V=o.default.useCallback(Oe=>{const{handleDragStart:Le}=u;(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&Le(Oe,h)},[u,h]),H=o.default.useCallback(Oe=>{const{handleDragLeave:Le}=u;(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&Le(Oe,h)},[u,h]),K=o.default.useCallback(Oe=>{const{handleDragEnter:Le}=u;(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&Le(Oe,h)},[u,h]),Y=o.default.useCallback(Oe=>{const{handleDrop:Le}=u;(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&Le(Oe,h)},[u,h]),Z=o.default.useCallback(Oe=>{const{handleDragOver:Le}=u;(E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode)&&Le(Oe,h)},[u,h]);let oe=E===l.TreeNodeType.CompositeTreeNode,ie;L?F?(oe=h.type===l.TreeNodeType.CompositeTreeNode,ie=`${S+(h.parent.depth+1||0)*(y||0)+(oe?0:I?T?0:20:0)}px`):(oe=h.target.type===l.TreeNodeType.CompositeTreeNode,ie=`${S+(h.target.depth||0)*(y||0)+(oe?0:I?T?0:20:0)}px`):ie=`${S+(h.depth||0)*(y||0)+(oe?0:I?T?0:20:0)}px`;const he={color:j?j.color:"",height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`,paddingLeft:ie,opacity:R&&!L?".6":"1"},me=(Oe,Le)=>{if(A&&A?.classlist.indexOf(m.default.mod_loading)>-1)return o.default.createElement(l.Loading,null);if(L&&Oe instanceof l.PromptHandle){let Ne=!1;if(k?Ne=Oe.target.type===l.TreeNodeType.CompositeTreeNode:Ne=Oe.type===l.TreeNodeType.CompositeTreeNode,Ne)return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,U,(0,v.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:F||!(k&&Oe.target.type===l.TreeNodeType.CompositeTreeNode&&Oe.target.expanded)})})}else return o.default.createElement("div",{onClick:Le,className:(0,r.default)(m.default.file_tree_node_segment,U,(0,v.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:!Oe.expanded})})},q=Oe=>{let Le,Ne;L&&Oe instanceof l.PromptHandle?Oe instanceof l.RenamePromptHandle?(Le=Oe.target.uri.resolve(Oe.$.value),Ne=_.Directory.is(Oe.target)):(Le=Oe.parent.uri.resolve(Oe.$.value),Ne=Oe.type===l.TreeNodeType.CompositeTreeNode):(Le=Oe.uri,Ne=Oe.filestat.isDirectory);const De=c.getIcon(Le,{isDirectory:Ne,isOpenedDirectory:Ne&&Oe.expanded});return Ne&&!I||!Ne&&!D?null:o.default.createElement("div",{className:(0,r.default)(m.default.file_icon,De,{expanded:Ne&&Oe.expanded}),style:{height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`}})},be=Oe=>{if(w)return o.default.createElement(w,null);if(L&&Oe instanceof l.PromptHandle)return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",m.default.file_tree_node_prompt_box)},o.default.createElement(Oe.ProxiedInput,{wrapperStyle:{height:t.FILE_TREE_NODE_HEIGHT,padding:"0 5px"}})));if(N){const Le=Oe.displayName.split(p.separator),Ne=Le.map((De,Ce)=>{const ke=Le.slice(0,Ce+1).join(p.separator),Te=Ue=>{Ue.stopPropagation(),x(Ce);const Ye=h.parent.uri.resolve(Le.slice(0,Ce+1).join(p.separator));a(Ue,h,E,Ye)},We=Ue=>{Ue.stopPropagation(),x(Ce);const Ye=h.parent.uri.resolve(Le.slice(0,Ce+1).join(p.separator));d(Ue,h,E,Ye)},pe=Ue=>{Ue.stopPropagation(),Ue.preventDefault(),O!==Ce&&(x(Ce),u.handleDragOver(Ue,h))},re=Ue=>{Ue.stopPropagation(),Ue.preventDefault(),x(-1)},ue=Ue=>{Ue.stopPropagation(),O!==Ce&&x(Ce);const Ye=h.parent.uri.resolve(Le.slice(0,Ce+1).join(p.separator));u.handleDragStart(Ue,h,Ye)},Se=Ue=>{const Ye=h.parent.uri.resolve(Le.slice(0,Ce+1).join(p.separator));u.handleDrop(Ue,h,Ye)},ye=(0,r.default)(O===Ce&&m.default.active,m.default.compact_name);return o.default.createElement("span",{key:ke},o.default.createElement("a",{className:ye,draggable:!0,onContextMenu:We,onDragStart:ue,onDragOver:pe,onDragLeave:re,onDrop:Se,onClick:Te},De),Ce!==Le.length-1?o.default.createElement("span",{className:m.default.compact_name_separator},p.separator):null)});return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_displayname)},Ne)}return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_displayname)},c.getName(Oe.uri)||Oe.displayName)},fe=()=>o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_tail)},te()),te=()=>j?o.default.createElement("div",{className:m.default.file_tree_node_status},(0,v.transformLabelWithCodicon)(j.badge.slice(),{color:"inherit"},M.fromString.bind(M))):null,ge=Oe=>{if(T)return null;if(oe)return me(Oe,X);if(L)return me(Oe,()=>{})},Re=()=>{let Oe=h.tooltip;return j&&j.badge&&(Oe+=` \u2022 ${j.tooltip}`),Oe};return o.default.createElement("div",{key:h.id,onClick:Q,onDoubleClick:G,onContextMenu:$,onDragStart:V,onDragOver:Z,onDragEnter:K,onDragLeave:H,onDrop:Y,title:Re(),className:(0,r.default)(W,A?A.classlist:null),style:he,draggable:E===l.TreeNodeType.TreeNode||E===l.TreeNodeType.CompositeTreeNode,"data-id":h.id},o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_content)},ge(h),q(h),o.default.createElement("div",{className:L?m.default.file_tree_node_prompt_wrap:m.default.file_tree_node_overflow_wrap},be(h)),fe()))};t.FileTreeNode=s,t.FILE_TREE_NODE_HEIGHT=22,t.FILE_TREE_BADGE_LIMIT=99},56384:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTree=t.FILE_TREE_FILTER_DELAY=t.FILTER_AREA_HEIGHT=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),v=e(41869),_=e(68974),m=e(24429),p=e(87420),s=e(6250),h=e(46377),a=n.__importDefault(e(2613)),g=e(97738);t.FILTER_AREA_HEIGHT=30,t.FILE_TREE_FILTER_DELAY=500;const d=(0,l.RecycleTreeFilterDecorator)(l.RecycleTree),u=({viewState:f})=>{const[c,y]=(0,o.useState)(!1),[b,A]=(0,o.useState)(!0),[S,w]=(0,o.useState)(!1),[I,D]=(0,o.useState)(!1),[T,R]=(0,o.useState)(),M=(0,o.useRef)(null),O=(0,o.useRef)(new v.DisposableCollection),{height:x}=f,k=(0,v.useInjectable)(s.IFileTreeService),{iconService:F,locationToCurrentFile:L,filterMode:N,indent:U,baseIndent:W}=k,j=(0,v.useInjectable)(g.FileTreeModelService),[Q,G]=(0,o.useState)({indent:U,baseIndent:W}),[X,$]=(0,o.useState)(N),[V,H]=(0,o.useState)(F.currentTheme||{hasFolderIcons:!0,hasFileIcons:!0,hidesExplorerArrows:!0}),K=(0,o.useCallback)(ke=>Y(ke)?!1:ke.shiftKey,[]),Y=(0,o.useCallback)(ke=>{const{metaKey:Te,ctrlKey:We}=ke;return v.isOSX&&Te||We},[]),Z=(0,o.useCallback)((ke,Te,We,pe)=>{ke.stopPropagation();const{handleItemClick:re,handleItemToggleClick:ue,handleItemRangeClick:Se}=j;if(!Te)return;const ye=K(ke),Ue=Y(ke);ye?Se(Te,We):Ue?ue(Te,We):re(Te,We,pe)},[]),oe=(0,o.useCallback)((ke,Te,We)=>{ke.stopPropagation();const{handleItemDoubleClick:pe}=j;Te&&pe(Te,We)},[]),ie=(0,o.useCallback)((ke,Te)=>{ke.stopPropagation();const{toggleDirectory:We}=j;We(Te)},[]);(0,o.useEffect)(()=>{c&&j.onFileTreeModelChange(async ke=>{A(!0),ke&&(await ke.ensureReady,M.current&&k.initContextKey(M.current)),R(ke),A(!1)})},[c,M.current,k]),(0,o.useEffect)(()=>{var ke,Te,We;const pe=new v.CancellationTokenSource;return q(pe.token),(ke=O.current)===null||ke===void 0||ke.push(F.onThemeChange(re=>{H(re)})),(Te=O.current)===null||Te===void 0||Te.push(k.onTreeIndentChange(({indent:re,baseIndent:ue})=>{G({indent:re,baseIndent:ue})})),(We=O.current)===null||We===void 0||We.push(k.onFilterModeChange(re=>{$(re)})),()=>{var re;pe.cancel(),(re=O.current)===null||re===void 0||re.dispose()}},[]);const he=(0,o.useCallback)((ke,Te)=>{let We;if(ke&&Te)for(We=ke.parentNode;We;){if(Te===We)return!0;We=We.parentNode}return!1},[]),me=(0,o.useCallback)(ke=>{he(ke.relatedTarget,M.current)||!ke.relatedTarget||(w(!1),j.handleTreeBlur())},[M.current]);(0,o.useEffect)(()=>{X||(j.fileTreeHandle&&j.fileTreeHandle.clearFilter(),j.selectedFiles.length===1&&j.location(j.selectedFiles[0].uri))},[X]),(0,o.useEffect)(()=>{const ke=new v.DisposableCollection;return T&&(ke.push(j.onDidFocusedFileChange(Te=>{Te?Te.isEqual((T?.root).uri)?S||w(!S):S&&w(!S):Te||S&&w(!S)})),ke.push(j.onDidContextMenuFileChange(Te=>{Te?Te.isEqual((T?.root).uri)?S||w(!S):S&&w(!S):Te||S&&w(!S)}))),()=>{ke.dispose()}},[T,S]);const q=(0,o.useCallback)(async ke=>{var Te;if(await j.whenReady,!ke.isCancellationRequested){if(j.treeModel){if(await j.treeModel.ensureReady,R(j.treeModel),ke.isCancellationRequested)return;M.current&&k.initContextKey(M.current)}A(!1),!((Te=O.current)===null||Te===void 0)&&Te.disposed||y(!0)}},[j,O.current]),be=(0,o.useCallback)(ke=>{j.handleTreeHandler({...ke,getModel:()=>j.treeModel,hasDirectFocus:()=>M.current===document.activeElement})},[M.current,T]),fe=(0,o.useCallback)(()=>{const{handleItemClick:ke}=j;ke()},[]),te=(0,o.useCallback)(()=>{j.handleDblClick()},[]),ge=(0,o.useCallback)(()=>{const{handleTreeFocus:ke}=j;ke()},[]),Re=(0,o.useCallback)(ke=>{const{handleContextMenu:Te}=j;Te(ke)},[]),Oe=(0,o.useCallback)(ke=>{ke.stopPropagation(),ke.preventDefault()},[]),Le=(0,o.useCallback)(ke=>{ke.preventDefault(),D(!0)},[]),Ne=(0,o.useCallback)(()=>{D(!1)},[]),De=(0,o.useCallback)(ke=>{const{handleDrop:Te}=j.dndService;D(!1),Te(ke)},[]),Ce=(0,o.useCallback)((ke,Te,We,pe)=>{const{handleContextMenu:re}=j;re(ke,Te,pe)},[]);return o.default.createElement("div",{className:(0,r.default)(a.default.file_tree,I&&a.default.outer_drag_over,S&&a.default.outer_active),tabIndex:-1,ref:M,onClick:fe,onDoubleClick:te,onFocus:ge,onBlur:me,onContextMenu:Re,draggable:!0,onDragStart:Oe,onDragLeave:Ne,onDragOver:Le,onDrop:De},o.default.createElement(E,{isLoading:b,isReady:c,height:x,model:T,iconTheme:V,treeIndent:Q,filterMode:X,locationToCurrentFile:L,onTreeReady:be,onContextMenu:Ce,onItemClick:Z,onItemDoubleClick:oe,onTwistierClick:ie}))};t.FileTree=u;const E=(0,o.memo)(({isReady:f,isLoading:c,height:y,model:b,filterMode:A,treeIndent:S,iconTheme:w,onTreeReady:I,onItemClick:D,onItemDoubleClick:T,onContextMenu:R,onTwistierClick:M})=>{const O=(0,v.useInjectable)(s.IFileTreeService),x=(0,v.useInjectable)(p.IIconService),{decorationService:k,labelService:F,locationToCurrentFile:L}=O,N=(0,v.useInjectable)(g.FileTreeModelService),U=(0,o.useCallback)(W=>o.default.createElement(h.FileTreeNode,{item:W.item,itemType:W.itemType,template:W.template,decorationService:k,labelService:F,iconService:x,dndService:N.dndService,decorations:N.decorations.getDecorations(W.item),onClick:D,onDoubleClick:T,onTwistierClick:M,onContextMenu:R,defaultLeftPadding:S.baseIndent,leftPadding:S.indent,hasPrompt:W.hasPrompt,hasFolderIcons:w.hasFolderIcons,hasFileIcons:w.hasFileIcons,hidesExplorerArrows:w.hidesExplorerArrows}),[b,S,w]);return f?c?o.default.createElement(_.Progress,{loading:!0}):b?o.default.createElement(d,{height:y,itemHeight:h.FILE_TREE_NODE_HEIGHT,onReady:I,model:b,filterEnabled:A,filterAfterClear:L,filterAutoFocus:!0,leaveBottomBlank:!0},U):o.default.createElement(m.WelcomeView,{viewId:s.FILE_EXPLORER_WELCOME_ID}):o.default.createElement(_.Progress,{loading:!0})});E.displayName="FileTreeView"},57781:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeService=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(41869),v=e(18193),_=e(26542),m=e(42933),p=e(52416),s=e(51500),h=e(6250),a=e(69959),g=e(88014),d=e(93239),{Path:u}=l.path;let E=class extends o.Tree{constructor(){super(...arguments),this._fileServiceWatchers=new Map,this._symbolicFiles=new Map,this._changeEventDispatchQueue=new Set,this._readyToWatch=!1,this._watchRootsQueue=[],this.effectedNodes=[],this.onWorkspaceChangeEmitter=new l.Emitter,this.onTreeIndentChangeEmitter=new l.Emitter,this.onFilterModeChangeEmitter=new l.Emitter,this.onNodeRefreshedEmitter=new l.Emitter,this._filterMode=!1,this._refreshable=!0,this.refreshEffectNode=()=>{const c=this.effectedNodes.slice(0);if(this.effectedNodes=[],c.find(b=>a.Directory.isRoot(b)))this.refresh();else for(const b of c)this.refresh(b)},this.flushEventQueue=async()=>{if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.size===0)return;const c=Array.from(this._changeEventDispatchQueue),y=this.sortPaths(c);(!this.refreshCancelToken||this.refreshCancelToken.token.isCancellationRequested)&&(this.refreshCancelToken=new l.CancellationTokenSource);const b=(0,l.pSeries)(y.map(A=>async()=>{a.Directory.is(A.node)&&await A.node.refresh(this.refreshCancelToken)}));return this._changeEventDispatchQueue.clear(),await b},this.locationToCurrentFile=()=>{this.commandService.executeCommand(l.FILE_COMMANDS.LOCATION.id)}}get onNodeRefreshed(){return this.onNodeRefreshedEmitter.event}get refreshable(){return this._refreshable}get filterMode(){return this._filterMode}get baseIndent(){return this._baseIndent}get indent(){return this._indent}get onWorkspaceChange(){return this.onWorkspaceChangeEmitter.event}get onTreeIndentChange(){return this.onTreeIndentChangeEmitter.event}get onFilterModeChange(){return this.onFilterModeChangeEmitter.event}get isCompactMode(){return this._isCompactMode}get contextKey(){return this.fileContextKey}async init(){this._roots=await this.workspaceService.roots,await this.preferenceService.ready,this._baseIndent=this.preferenceService.getValid("explorer.fileTree.baseIndent",8),this._indent=this.preferenceService.getValid("explorer.fileTree.indent",8),this._isCompactMode=this.preferenceService.getValid("explorer.compactFolders",!0),this.toDispose.push(this.workspaceService.onWorkspaceChanged(c=>{this._roots=c;const y=new l.URI(c[0].uri),b=new a.Directory(this,void 0,y,y.displayName,c[0],this.fileTreeAPI.getReadableTooltip(y));this.root=b,this.onWorkspaceChangeEmitter.fire(b),this.refresh()})),this.toDispose.push(this.workspaceService.onWorkspaceFileExcludeChanged(()=>{this.refresh()})),this.toDispose.push(l.Disposable.create(()=>{var c;(c=this._root)===null||c===void 0||c.dispose(),this._roots=null})),this.toDispose.push(this.corePreferences.onPreferenceChanged(c=>{c.preferenceName==="explorer.fileTree.baseIndent"?(this._baseIndent=c.newValue||8,this.onTreeIndentChangeEmitter.fire({indent:this.indent,baseIndent:this.baseIndent})):c.preferenceName==="explorer.fileTree.indent"?(this._indent=c.newValue||8,this.onTreeIndentChangeEmitter.fire({indent:this.indent,baseIndent:this.baseIndent})):c.preferenceName==="explorer.compactFolders"&&(this._isCompactMode=c.newValue,this.refresh())}))}initContextKey(c){this.fileContextKey.initScopedContext(c)}startWatchFileEvent(){return this._readyToWatch=!0,Promise.all(this._watchRootsQueue.map(c=>this.watchFilesChange(c)))}async resolveChildren(c){var y,b,A,S;let w=[];if(c){if(a.Directory.isRoot(c)&&this.isMultipleWorkspace){const I=await this.workspaceService.roots;for(const D of I){const T=this.fileTreeAPI.toNode(this,D,c,this.workspaceService.getWorkspaceName(new l.URI(D.uri)));this.watchFilesChange(new l.URI(D.uri)),w=w.concat(T),(T.filestat.isSymbolicLink||T.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(T.filestat.uri,T)}return w}if(c.uri){const I=await this.fileTreeAPI.resolveChildren(this,c.uri.toString(),c,this.isCompactMode&&!a.Directory.isRoot(c));w=I.children,w.forEach(T=>{(T.filestat.isSymbolicLink||T.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(T.filestat.uri,T)});const D=I.filestat;if(D&&this.isCompactMode&&!a.Directory.isRoot(c)){const T=new l.URI(D.uri),R=c.parent;if(c&&R){let M=c.name;if(c.filestat.isSymbolicLink){const O=(b=new l.URI(c.filestat.realUri).relative(T))===null||b===void 0?void 0:b.toString();O&&(M=O,M=[c.uri.displayName].concat(M.split(u.separator)).join(u.separator))}else R.filestat.isSymbolicLink?M=(A=new l.URI(R.filestat.realUri).relative(T))===null||A===void 0?void 0:A.toString():M=(S=R.uri.relative(T))===null||S===void 0?void 0:S.toString();M&&M!==c.name&&c.updateMetaData({name:M,uri:T,tooltip:this.fileTreeAPI.getReadableTooltip(T),fileStat:D})}}return w}}else if(this._roots||(this._roots=await this.workspaceService.roots),this.isMultipleWorkspace){const I=new l.URI((y=this.workspaceService.workspace)===null||y===void 0?void 0:y.uri);let D=I.displayName;D=D.slice(0,D.lastIndexOf("."));const T={...this.workspaceService.workspace,isDirectory:!0},R=new a.Directory(this,void 0,I,D,T,this.fileTreeAPI.getReadableTooltip(I));return this.root=R,[R]}else if(this._roots.length>0)return w=await(await this.fileTreeAPI.resolveChildren(this,this._roots[0])).children,w.forEach(I=>{const D=this.workspaceService.getWorkspaceName(I.uri);D&&D!==I.name&&I.updateMetaData({name:D}),(I.filestat.isSymbolicLink||I.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(I.filestat.uri,I)}),this.watchFilesChange(new l.URI(this._roots[0].uri)),this.root=w[0],w;return[]}async watchFilesChange(c){if(!this._readyToWatch){this._watchRootsQueue.push(c);return}const y=await this.fileServiceClient.watchFileChanges(c);this.toDispose.push(y),this.toDispose.push(y.onFilesChanged(b=>{this.onFilesChanged(b)})),this._fileServiceWatchers.set(c.toString(),y)}updateRefreshable(c){var y;c!==this.refreshable&&(this._refreshable=c,this._refreshable?this.doHandleQueueChange():(y=this.refreshCancelToken)===null||y===void 0||y.cancel())}isContentFile(c){return!!c&&"filestat"in c&&!c.filestat.isDirectory}isFileContentChanged(c){return c.type===m.FileChangeType.UPDATED&&this.isContentFile(this.getNodeByPathOrUri(c.uri))}getAffectedChanges(c){const y=[];for(const b of c)this.isFileContentChanged(b)||y.push(b);return y}isRootAffected(c){return this._roots?c.some(y=>y.type>m.FileChangeType.UPDATED&&this._roots&&this._roots.find(b=>y.uri.indexOf(b.uri)>=0)):!1}async onFilesChanged(c){const y=await this.getAffectedNodes(this.getAffectedChanges(c));return y.length>0?this.effectedNodes=this.effectedNodes.concat(y):!(y.length>0)&&this.isRootAffected(c)&&this.effectedNodes.push(this.root),this.refreshEffectNode()}async getFileTreeNodePathByUri(c){var y,b,A,S,w,I;if(!c)return;let D;if(this.isMultipleWorkspace){if(this._roots||(this._roots=await this.workspaceService.roots),D=(S=this._roots.find(T=>new l.URI(T.uri).isEqualOrParent(c)))===null||S===void 0?void 0:S.uri,D){const T=new l.URI(D);if(T.isEqualOrParent(c))return new u(((w=this.root)===null||w===void 0?void 0:w.path)||"/").join(T.displayName).join(((I=T.relative(c))===null||I===void 0?void 0:I.toString())||"").toString()}}else if(D=(y=this.workspaceService.workspace)===null||y===void 0?void 0:y.uri,D){const T=new l.URI(D);if(T.isEqualOrParent(c))return new u(((b=this.root)===null||b===void 0?void 0:b.path)||"").join(((A=T.relative(c))===null||A===void 0?void 0:A.toString())||"").toString()}}async moveNodeByPath(c,y,b,A,S=o.TreeNodeType.TreeNode){const w=new u(c.path).join(b).toString(),I=new u(y.path).join(A).toString();if(w&&I&&I!==w){const D=c.moveNode(w,I);return D&&a.File.is(D)&&(D.updateMetaData({uri:y.uri.resolve(A),fileStat:{...y.filestat,uri:y.uri.resolve(A).toString(),isDirectory:S!==o.TreeNodeType.TreeNode},tooltip:this.fileTreeAPI.getReadableTooltip(y.uri.resolve(A))}),a.Directory.is(D)&&this.updateChildren(D)),D}}async updateChildren(c){const y=c.children;if(!(!y||y.length===0)){for(const b of y)if(a.File.is(b)){const A=c.uri.resolve(b.uri.displayName);b.updateMetaData({uri:A,fileStat:{...b.filestat,uri:A.toString(),isDirectory:!!a.Directory.is(b)},tooltip:this.fileTreeAPI.getReadableTooltip(A)}),a.Directory.is(b)&&this.updateChildren(b)}}}async addNode(c,y,b){let A,S;const w=u.splitPath(y);if(w.length>1){let D=c.uri;for(const T of w)D=D.resolve(T);!this.isCompactMode||a.Directory.isRoot(c)?S=w[0]:b===o.TreeNodeType.CompositeTreeNode?S=y:S=w.slice(0,w.length-1).join(u.separator)}else S=y;A={uri:c.uri.resolve(S).toString(),isDirectory:b===o.TreeNodeType.CompositeTreeNode||w.length>1,isSymbolicLink:!1,lastModification:new Date().getTime()};const I=await this.fileTreeAPI.toNode(this,A,c,S);return I&&c.addNode(I),I}async deleteAffectedNodeByPath(c,y){var b,A;const S=this.getNodeByPathOrUri(c);S&&S.parent&&(this.isCompactMode&&!y?((b=S.parent.children)===null||b===void 0?void 0:b.length)===2?this.refresh((A=S.parent)===null||A===void 0?void 0:A.parent):this.refresh(S.parent):S.parent.removeNode(S.path))}async deleteAffectedNodes(c,y=[]){const b=[];for(const A of c){const S=this.getNodeByPathOrUri(A);S&&a.File.is(S)&&b.push(S)}for(const A of b)!A?.parent||this._changeEventDispatchQueue.has(A?.parent.path)||await this.deleteAffectedNodeByPath(A.path);return y.filter(A=>A.type!==m.FileChangeType.DELETED)}async getAffectedNodes(c){const y=[];for(const b of c){const A=new l.URI(b.uri),S=this.getNodeByPathOrUri(A.parent);S&&y.push(S)}return y}isFileURI(c){return/^file:\/\//.test(c)}getNodeByPathOrUri(c){var y,b,A,S;let w,I;if(typeof c!="string"?(I=c,c=c.toString()):this.isFileURI(c)?I=new l.URI(c):!this.isFileURI(c)&&typeof c=="string"&&(w=c),this.isFileURI(c)&&I){if(this._symbolicFiles.has(I?.toString()))return this._symbolicFiles.get(I.toString());let D;if(this.isMultipleWorkspace?this._roots&&(D=(b=this._roots.find(T=>new l.URI(T.uri).isEqualOrParent(I)))===null||b===void 0?void 0:b.uri):D=(y=this.workspaceService.workspace)===null||y===void 0?void 0:y.uri,this.root&&D){const T=new l.URI(D);if(T.isEqualOrParent(I)){const R=T.relative(I);R&&(this.isMultipleWorkspace?w=new u(this.root.path).join(T.displayName).join(R.toString()).toString():w=new u(this.root.path).join(R.toString()).toString())}}}if(w){const D=(A=this.root)===null||A===void 0?void 0:A.getTreeNodeByPath(w);if(!D){let T;const R=w.split(u.separator);for(;R.length>=1;){R.pop();const M=R.join(u.separator);if(T=(S=this.root)===null||S===void 0?void 0:S.getTreeNodeByPath(M),T)break}if(T&&a.Directory.is(T)){for(const M of T.children||[])if(M.path.includes(w))return M}}return D}}sortComparator(c,y){return c.constructor===y.constructor?c.name.localeCompare(y.name,"en",{numeric:!0}):c.type===o.TreeNodeType.CompositeTreeNode?-1:y.type===o.TreeNodeType.CompositeTreeNode?1:0}get contextMenuContextKeyService(){return this.fileContextKey?this.fileContextKey.service:this.contextKeyService}get isMultipleWorkspace(){return!!this.workspaceService.workspace&&!this.workspaceService.workspace.isDirectory}getDisplayName(c){return this.workspaceService.getWorkspaceName(c)}async refresh(c=this.root){if(c)return a.Directory.is(c)||a.File.is(c)&&c.parent&&(c=c.parent),this._changeEventDispatchQueue.add(c.path),this.doHandleQueueChange()}async doHandleQueueChange(){if(this.refreshable)try{await this.flushEventQueue()}catch(c){this.logger.error("flush file change event queue error:",c)}finally{this.onNodeRefreshedEmitter.fire()}}sortPaths(c){const b=c.slice().map(S=>({node:this.getNodeByPathOrUri(S),path:S})).filter(S=>S&&!!S.node);c.length>1&&b.sort((S,w)=>{var I,D;const T=((I=S.node)===null||I===void 0?void 0:I.depth)||0,R=((D=w.node)===null||D===void 0?void 0:D.depth)||0;return T-R});const A=[];for(let S=b.length-1;S>=0;S--){const w=b[S];let I=!1;for(let D=0;D<S;D++){const T=b[D];a.Directory.is(T)&&w.node.path.startsWith(T.node.path)&&(I=!0)}I||A.push(w)}return A}openFile(c){const y=this.preferenceService.get("editor.previewMode");this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,c,{disableNavigate:!0,preview:y})}openAndFixedFile(c){this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,c,{disableNavigate:!0,preview:!1,focus:!0})}openToTheSide(c){this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,c,{disableNavigate:!0,split:4})}compare(c,y){this.commandService.executeCommand(l.EDITOR_COMMANDS.COMPARE.id,{original:c,modified:y})}toggleFilterMode(){var c;this._filterMode=!this.filterMode,this.onFilterModeChangeEmitter.fire(this.filterMode),(c=this.fileContextKey)===null||c===void 0||c.filesExplorerFilteredContext.set(this.filterMode),this.filterMode===!1&&this.commandService.executeCommand(l.FILE_COMMANDS.LOCATION.id)}};t.FileTreeService=E,n.__decorate([(0,r.Autowired)(h.IFileTreeAPI),n.__metadata("design:type",Object)],E.prototype,"fileTreeAPI",void 0),n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],E.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(l.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],E.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(v.CorePreferences),n.__metadata("design:type",Object)],E.prototype,"corePreferences",void 0),n.__decorate([(0,r.Autowired)(l.PreferenceService),n.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(_.LabelService),n.__metadata("design:type",_.LabelService)],E.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(d.FileTreeDecorationService),n.__metadata("design:type",d.FileTreeDecorationService)],E.prototype,"decorationService",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],E.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(p.IIconService),n.__metadata("design:type",Object)],E.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(g.FileContextKey),n.__metadata("design:type",g.FileContextKey)],E.prototype,"fileContextKey",void 0),t.FileTreeService=E=n.__decorate([(0,r.Injectable)()],E)},83709:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeNextModule=void 0;const n=e(85608),r=e(41869),o=e(72665),l=e(41103),v=e(6250),_=e(89508),m=e(40439),p=e(57781),s=e(88808),h=e(93239),a=e(97738),g=e(24861);let d=class extends r.BrowserModule{constructor(){super(...arguments),this.providers=[{token:v.IFileTreeAPI,useClass:s.FileTreeAPI},{token:h.FileTreeDecorationService,useClass:h.FileTreeDecorationService},{token:v.IFileTreeService,useClass:p.FileTreeService},{token:a.FileTreeModelService,useClass:a.FileTreeModelService},{token:o.IWindowDialogService,useClass:_.WindowDialogServiceImpl},m.FileTreeContribution]}};t.FileTreeNextModule=d,t.FileTreeNextModule=d=n.__decorate([(0,r.Domain)(g.name),(0,r.ModuleDependencies)([l.WorkspaceModule])],d)},88808:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeAPI=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),v=e(42933),_=e(72665),m=e(26199),p=e(69959);let s=class{constructor(){this.onDidResolveChildrenEmitter=new l.Emitter,this.onDidResolveChildren=this.onDidResolveChildrenEmitter.event}async resolveChildren(a,g,d,u){var E;let f;if(!this.userhomePath){const c=await this.fileServiceClient.getCurrentUserHome();c&&(this.userhomePath=new l.URI(c.uri))}if(typeof g=="string"?f=await this.fileServiceClient.getFileStat(g):f=await this.fileServiceClient.getFileStat(g.uri),f){if(this.onDidResolveChildrenEmitter.fire(f.uri.toString()),((E=f.children)===null||E===void 0?void 0:E.length)===1&&f.children[0].isDirectory&&u)return await this.resolveChildren(a,f.children[0].uri,d,u);{const c={...f,isInSymbolicDirectory:d?.filestat.isSymbolicLink||d?.filestat.isInSymbolicDirectory};return{children:this.toNodes(a,c,d),filestat:c}}}else return{children:[],filestat:null}}async resolveNodeByPath(a,g,d){const u=await this.fileServiceClient.getFileStat(g);if(u)return this.toNode(a,u,d)}async resolveFileStat(a){return await this.fileServiceClient.getFileStat(a.toString())}toNodes(a,g,d){if(d){if(g.children)return g.children.map(u=>this.toNode(a,u,d))}else return[this.toNode(a,g,d)];return[]}toNode(a,g,d,u){var E;const f=new l.URI(g.uri),c=u||f.displayName;let y;return g.isInSymbolicDirectory=(E=d?.filestat.isSymbolicLink)!==null&&E!==void 0?E:d?.filestat.isInSymbolicDirectory,g.isDirectory?y=new p.Directory(a,d,f,c,g,this.getReadableTooltip(f)):y=new p.File(a,d,f,c,g,this.getReadableTooltip(f)),y}async mvFiles(a,g){const d=[];for(const f of a)if(f.url.isEqualOrParent(g))return;const u=a.sort((f,c)=>f.toString().length-c.toString().length),E=[];for(const f of u)E.length>0&&E.find(c=>c.url.isEqualOrParent(f.url))||E.push(f);if(this.corePreferences["explorer.confirmMove"]){const f=(0,l.localize)("file.confirm.move.ok"),c=(0,l.localize)("file.confirm.move.cancel");if(await this.dialogService.warning((0,l.formatLocalize)("file.confirm.move",`[ ${E.map(b=>b.url.displayName).join(",")} ]`,g.displayName),[c,f])!==f)return}for(const f of E){const c=await this.mv(f.url,g.resolve(f.url.displayName),f.isDirectory);c&&d.push(c)}return d}async mv(a,g,d=!1){try{await this.workspaceEditService.apply({edits:[{newResource:g,oldResource:a,options:{isDirectory:d,overwrite:!0}}]})}catch(u){return u.message}}async createFile(a,g){try{await this.workspaceEditService.apply({edits:[{newResource:a,options:{content:g}}]})}catch(d){return d.message}this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,focus:!0})}async createDirectory(a){try{await this.workspaceEditService.apply({edits:[{newResource:a,options:{isDirectory:!0}}]})}catch(g){return g.message}}async delete(a){try{await this.workspaceEditService.apply({edits:[{oldResource:a,options:{}}]});return}catch(g){return g.message}}async copyFile(a,g){let d=1,u;try{u=await this.fileServiceClient.access(g.toString())}catch(E){return E.message}for(;u;){const E=g.displayName.replace(/\Wcopy\W\d+/,""),f=l.path.extname(E),y=`${l.path.basename(E,f)} copy ${d}${f}`;g=g.parent.resolve(y),d++;try{u=await this.fileServiceClient.access(g.toString())}catch{return}}try{return await this.fileServiceClient.copy(a.toString(),g.toString())}catch(E){return E.message}}getReadableTooltip(a){const g=a.toString(),d=this.userhomePath&&this.userhomePath.toString();return this.userhomePath&&this.userhomePath.isEqualOrParent(a)?decodeURIComponent(g.replace(d,"~")):decodeURIComponent(a.withScheme("").toString())}};t.FileTreeAPI=s,n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(m.IWorkspaceEditService),n.__metadata("design:type",Object)],s.prototype,"workspaceEditService",void 0),n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],s.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.CorePreferences),n.__metadata("design:type",Object)],s.prototype,"corePreferences",void 0),n.__decorate([(0,r.Autowired)(_.IDialogService),n.__metadata("design:type",Object)],s.prototype,"dialogService",void 0),t.FileTreeAPI=s=n.__decorate([(0,r.Injectable)()],s)},93239:(P,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDecorationService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(41893),v=e(52416);let _=class{constructor(){this.disposeCollection=new o.DisposableCollection,this.onDidChangeEmitter=new o.Emitter,this.cacheDecorations=new Map,this.disposeCollection.pushAll([this.decorationsService.onDidChangeDecorations(p=>{var s,h,a;const g=(h=(s=p._data)===null||s===void 0?void 0:s._iter)===null||h===void 0?void 0:h._value;if(g){const d=new o.URI(g),u=this.getDecoration(d);this.cacheDecorations.has(g)?((a=this.cacheDecorations.get(g))===null||a===void 0?void 0:a.tooltip)!==u?.tooltip&&this.onDidChangeEmitter.fire():(this.cacheDecorations.set(g,u),this.onDidChangeEmitter.fire())}}),this.themeService.onThemeChange(()=>{this.onDidChangeEmitter.fire()})])}get onDidChange(){return this.onDidChangeEmitter.event}getDecoration(p,s=!1){p instanceof o.URI&&(p=o.Uri.parse(p.toString()));const h=this.decorationsService.getDecoration(p,s);return h?{...h,color:this.themeService.getColor({id:h.color})}:{color:"",tooltip:"",badge:""}}dispose(){this.disposeCollection.dispose()}};t.FileTreeDecorationService=_,n.__decorate([(0,r.Autowired)(l.IDecorationsService),n.__metadata("design:type",l.IDecorationsService)],_.prototype,"decorationsService",void 0),n.__decorate([(0,r.Autowired)(v.IThemeService),n.__metadata("design:type",Object)],_.prototype,"themeService",void 0),t.FileTreeDecorationService=_=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],_)},30577:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DragAndDropService=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(53622),m=e(14951),p=e(72665),s=e(51500),h=e(6250),a=e(69959),g=r.__importDefault(e(89200)),d=r.__importDefault(e(2613)),u=e(57781),E=e(97738);let f=n=class extends v.WithEventBus{constructor(y){super(),this.model=y,this.toCancelNodeExpansion=new v.DisposableCollection,this.beingDraggedDec=new l.Decoration(g.default.mod_dragging),this.draggedOverDec=new l.Decoration(g.default.mod_dragover),this.beingDraggedNodes=[],this.dragOverTrigger=new v.ThrottledDelayer(n.MS_TILL_DRAGGED_OVER_EXPANDS),this.handleDragStart=(b,A,S)=>{b.stopPropagation();const w=R=>{this.handleDragEnd(R,A)};b.currentTarget.addEventListener("dragend",w,!1);let I=this.model.selectedFiles,D=!1;for(const R of I)R&&R.id===A.id&&(D=!0);D||(I=[A]),this.beingDraggedNodes=I,this.beingDraggedActiveUri=S;const T=I.find(R=>!a.Directory.is(R));if(T&&b.dataTransfer.setData("uri",T.uri.toString()),b.dataTransfer.setData("beingDraggedNodes",JSON.stringify(this.beingDraggedNodes.map(R=>R.uri.toString()))),T){const R=T;R.uri.scheme==="file"&&b.dataTransfer.setData("DownloadURL",`application/octet-stream:${R.displayName}:data:application/octet-stream;base64,${(0,v.encodeBase64)(v.BinaryBuffer.fromString(R.filestat.uri))}`)}if(I.forEach(R=>{this.beingDraggedDec.addTarget(R,l.TargetMatchMode.Self)}),b.dataTransfer){let R;I.length===1?R=S?S.displayName:typeof A.name=="string"?A.name:"":R=String(I.length);const M=document.createElement("div");M.className=d.default.file_tree_drag_image,M.textContent=R,document.body.appendChild(M),b.dataTransfer.setDragImage(M,-10,-10),setTimeout(()=>document.body.removeChild(M),0)}},this.handleDragEnter=(b,A)=>{b.stopPropagation(),b.preventDefault()},this.handleDragLeave=(b,A)=>{b.preventDefault(),b.stopPropagation(),this.toCancelNodeExpansion.dispose(),this.potentialParent&&(this.draggedOverDec.removeTarget(this.potentialParent),this.model.treeModel.dispatchChange())},this.handleDragOver=(b,A)=>{if(b.preventDefault(),b.stopPropagation(),!this.toCancelNodeExpansion.disposed||this.beingDraggedNodes.indexOf(A)>=0)return;this.draggedOverNode=A;const S=a.Directory.is(A)&&A.expanded?A:A.parent;(this.potentialParent!==S||!this.draggedOverDec.hasTarget(S))&&(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=S,this.draggedOverDec.addTarget(this.potentialParent,l.TargetMatchMode.SelfAndChildren),this.model.treeModel.dispatchChange()),this.potentialParent!==A&&a.Directory.is(A)&&(this.dragOverTrigger.trigger(async()=>{A.expanded?(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=A,this.draggedOverDec.addTarget(this.potentialParent,l.TargetMatchMode.SelfAndChildren)):(await A.setExpanded(!0),this.draggedOverNode===A&&(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=A,this.draggedOverDec.addTarget(this.potentialParent,l.TargetMatchMode.SelfAndChildren))),this.model.treeModel.dispatchChange()}),this.toCancelNodeExpansion.push(v.Disposable.create(()=>{this.dragOverTrigger.isTriggered()||this.dragOverTrigger.cancel()})))},this.handleDrop=async(b,A,S)=>{var w,I;this.eventBus.fire(new _.FileTreeDropEvent({event:b.nativeEvent,targetDir:S?S.codeUri.path:A&&A instanceof a.File?(w=A.parent)===null||w===void 0?void 0:w.uri.codeUri.path:A?A.uri.codeUri.path:new v.URI((I=this.workspaceService.workspace)===null||I===void 0?void 0:I.uri).codeUri.path}));try{b.preventDefault(),b.stopPropagation(),b.dataTransfer.dropEffect="copy";let D;const T=!!this.beingDraggedActiveUri;this.fileTreeService.isCompactMode&&S&&!A?.uri.isEqual(S)?D=null:A?D=a.Directory.is(A)?A:A.parent:D=this.root;let R;if(this.beingDraggedActiveUri){const M=this.fileTreeService.getNodeByPathOrUri(this.beingDraggedActiveUri);R=[new a.Directory(this.fileTreeService,M?.parent,this.beingDraggedActiveUri,this.beingDraggedActiveUri.displayName,{uri:this.beingDraggedActiveUri.toString(),isDirectory:!0,lastModification:new Date().getTime()},this.beingDraggedActiveUri.displayName)]}else if(R=this.beingDraggedNodes,!R||R.length===0)try{const M=JSON.parse(b.dataTransfer.getData("beingDraggedNodes"));M&&M.length!==0&&(R=M.map(O=>this.fileTreeService.getNodeByPathOrUri(new v.URI(O))).filter(Boolean),R.length||(R=await Promise.all(M.map(async O=>{const x=new v.URI(O);let k;const F=await this.filesystem.getFileStat(x.toString());return F?.isDirectory?k=new a.Directory(this.fileTreeService,this.root,x,x.displayName,{uri:x.toString(),isDirectory:!0,lastModification:new Date().getTime()},x.displayName):k=new a.File(this.fileTreeService,this.root,x,x.displayName,{uri:x.toString(),isDirectory:!0,lastModification:new Date().getTime()},x.displayName),k}))))}catch{}if(R.length>0){const M=S||D&&D.uri,O=R.filter(x=>x&&x.parent&&(this.beingDraggedActiveUri?!x.parent.uri.isEqual(M):!0));if(O.length>0){const x=await this.fileTreeAPI.mvFiles(O.map(k=>({url:k.uri,isDirectory:k.filestat.isDirectory})),M);if(x&&x.length>0)x.forEach(k=>{this.messageService.error(k)});else if(x){if(D)if(this.fileTreeService.isCompactMode&&T){for(const k of O)this.fileTreeService.refresh(k.parent);this.fileTreeService.refresh(D)}else for(const k of O){const F=D.uri.resolve(k.name);this.fileTreeService.moveNodeByPath(k.parent,D,k.name,k.name,k.type),k.updateMetaData({name:F.displayName,fileStat:{...k.filestat,uri:F.toString()},uri:F,tooltip:this.fileTreeAPI.getReadableTooltip(F)}),a.Directory.is(k)&&this.fileTreeService.refresh(k)}else if(A){if(this.fileTreeService.isCompactMode&&T)for(const k of O)this.fileTreeService.refresh(k.parent);else for(const k of O)this.fileTreeService.deleteAffectedNodeByPath(k.path);this.fileTreeService.refresh(A.parent)}}else return}}A&&this.beingDraggedDec.removeTarget(A),this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(M=>{this.beingDraggedDec.removeTarget(M)}),this.beingDraggedNodes=[],this.beingDraggedActiveUri=void 0,this.potentialParent=null,this.model.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()}catch(D){this.logger.error(D)}},this.handleDragEnd=(b,A)=>{this.beingDraggedDec.removeTarget(A),this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(S=>{this.beingDraggedDec.removeTarget(S)}),this.beingDraggedNodes=[],this.beingDraggedActiveUri=void 0,this.potentialParent=null,this.model.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()},this.model.decorations.addDecoration(this.beingDraggedDec),this.model.decorations.addDecoration(this.draggedOverDec)}get root(){return this.model.treeModel.root}};t.DragAndDropService=f,f.MS_TILL_DRAGGED_OVER_EXPANDS=500,r.__decorate([(0,o.Autowired)(h.IFileTreeAPI),r.__metadata("design:type",Object)],f.prototype,"fileTreeAPI",void 0),r.__decorate([(0,o.Autowired)(v.ILogger),r.__metadata("design:type",Object)],f.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(p.IMessageService),r.__metadata("design:type",Object)],f.prototype,"messageService",void 0),r.__decorate([(0,o.Autowired)(h.IFileTreeService),r.__metadata("design:type",u.FileTreeService)],f.prototype,"fileTreeService",void 0),r.__decorate([(0,o.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],f.prototype,"filesystem",void 0),r.__decorate([(0,o.Autowired)(s.IWorkspaceService),r.__metadata("design:type",Object)],f.prototype,"workspaceService",void 0),t.DragAndDropService=f=n=r.__decorate([(0,o.Injectable)(),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[E.FileTreeModelService])],f)},97738:(P,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeModelService=void 0;const r=e(85608),o=e(76003),l=e(97267),v=e(41869),_=e(91830),m=e(93899),p=e(26542),s=e(54414),h=e(14951),a=e(63067),g=e(75053),d=e(72665),u=e(6250),E=e(69959),f=e(2812),c=e(46377),y=r.__importDefault(e(89200)),b=e(57781),A=e(30577),{Path:S,isValidBasename:w}=v.path,{coalesce:I}=v.arrays,{trim:D,rtrim:T}=v.strings;let R=n=class{constructor(){this._isDisposed=!1,this._whenReady=new v.Deferred,this.selectedDecoration=new l.Decoration(y.default.mod_selected),this.focusedDecoration=new l.Decoration(y.default.mod_focused),this.contextMenuDecoration=new l.Decoration(y.default.mod_actived),this.loadingDecoration=new l.Decoration(y.default.mod_loading),this.cutDecoration=new l.Decoration(y.default.mod_cut),this._selectedFiles=[],this.disposableCollection=new v.DisposableCollection,this._isMultiSelected=!1,this.refreshedActionDelayer=new v.ThrottledDelayer(n.DEFAULT_REFRESHED_ACTION_DELAY),this.labelChangedDelayer=new v.ThrottledDelayer(n.DEFAULT_LABEL_CHANGED_DELAY),this.locationThrottler=new v.Throttler,this.onDidFocusedFileChangeEmitter=new v.Emitter,this.onDidContextMenuFileChangeEmitter=new v.Emitter,this.onDidSelectedFileChangeEmitter=new v.Emitter,this.onFileTreeModelChangeEmitter=new v.Emitter,this._initTreeModelReady=!1,this.clearFileSelectedDecoration=()=>{this.selectedDecoration.clearAppliedTarget(),this._selectedFiles=[]},this.activeFileDecoration=(O,x=!0)=>{this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),O&&(this.selectedFiles.length>0&&this.selectedDecoration.clearAppliedTarget(),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.selectedDecoration.addTarget(O),this.focusedDecoration.addTarget(O),this.focusedFile=O,this.selectedFiles=[O],x&&this.treeModel.dispatchChange())},this.selectFileDecoration=(O,x=!0)=>{O!==this.treeModel.root&&(this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),O&&(this.selectedFiles.length>0&&this.selectedDecoration.clearAppliedTarget(),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.selectedDecoration.addTarget(O),this._selectedFiles=[O],x&&this.treeModel.dispatchChange()))},this.activateFileActivedDecoration=O=>{this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),this.focusedFile&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this.contextMenuDecoration.addTarget(O),this.contextMenuFile=O,this.treeModel.dispatchChange()},this.activateFileFocusedDecoration=O=>{this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),this.focusedDecoration.addTarget(O),this.focusedFile=O,this.treeModel.dispatchChange()},this.activeFileFocusedDecoration=(O,x=!1)=>{O!==this.treeModel.root&&(this.focusedFile!==O&&(x?(this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.contextMenuFile=O):this.focusedFile&&(this.contextMenuFile=void 0,this.focusedDecoration.clearAppliedTarget()),O&&(this._selectedFiles.indexOf(O)<0&&(this.selectedDecoration.addTarget(O),this._selectedFiles.push(O),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri))),this.focusedDecoration.addTarget(O),this.focusedFile=O)),this.treeModel.dispatchChange())},this.toggleFileSelectedDecoration=O=>{const x=this._selectedFiles.indexOf(O);x>-1?(this.focusedFile===O&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this._selectedFiles.splice(x,1),this.selectedDecoration.clearAppliedTarget()):(this._selectedFiles.push(O),this.selectedDecoration.addTarget(O),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.focusedFile=O,this.focusedDecoration.addTarget(O)),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri)),this.treeModel.dispatchChange()},this.activeFileDecorationByRange=(O,x)=>{for(this.clearFileSelectedDecoration(),this.contextMenuFile=void 0;O<=x;O++){const k=this.treeModel.root.getTreeNodeAtIndex(O);k&&(this._selectedFiles.push(k),this.selectedDecoration.addTarget(k))}this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri)),this.treeModel.dispatchChange()},this.deactivateFileDecoration=()=>{var O;this.focusedFile&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this.contextMenuFile&&this.contextMenuDecoration.removeTarget(this.contextMenuFile),(O=this.treeModel)===null||O===void 0||O.dispatchChange()},this.toggleDirectory=async O=>{O.expanded?this.fileTreeHandle.collapseNode(O):this.fileTreeHandle.expandNode(O)},this.handleDblClick=()=>{this.commandService.executeCommand(v.FILE_COMMANDS.NEW_FILE.id)},this.handleContextMenu=(O,x,k)=>{var F;O.stopPropagation(),O.preventDefault();let L,N;x?(N=x,this._isMultiSelected?this.selectedFiles.indexOf(N)>=0?L=this.selectedFiles:L=[N]:L=[N]):(L=[this.treeModel.root],N=this.treeModel.root),this.activateFileActivedDecoration(N),this.setFileTreeContextKey(N),this.fileTreeService.isCompactMode&&k?(this._activeUri=k,(F=this.contextKey)===null||F===void 0||F.explorerResourceIsFolder.set(!0)):k||(this._activeUri=null);const U=this.contextMenuService.createMenu({id:m.MenuId.ExplorerContext,contextKeyService:this.fileTreeService.contextMenuContextKeyService}),W=U.getMergedMenuNodes();U.dispose(),this.updateExplorerCompressedContextKey(N,k);const{x:j,y:Q}=O.nativeEvent;this.ctxMenuRenderer.show({anchor:{x:j,y:Q},menuNodes:W,args:k?[k,[k]]:[N.uri,L.map(G=>G.uri)]})},this.handleTreeBlur=()=>{var O,x,k;this._isDisposed||((x=(O=this.contextKey)===null||O===void 0?void 0:O.filesExplorerFocused)===null||x===void 0||x.set(!1),this.deactivateFileDecoration(),(k=this.contextKey)===null||k===void 0||k.explorerResourceIsFolder.set(!1))},this.handleTreeFocus=()=>{var O,x;(x=(O=this.contextKey)===null||O===void 0?void 0:O.filesExplorerFocused)===null||x===void 0||x.set(!0)},this.handleItemRangeClick=(O,x)=>{if(this.selectedFiles.length===1&&E.Directory.isRoot(this.selectedFiles[0])&&this.clearFileSelectedDecoration(),!this.focusedFile)this.handleItemClick(O,x);else if(this.focusedFile&&this.focusedFile!==O){this._isMultiSelected=!0;const k=this.treeModel.root.getIndexAtTreeNode(O),F=this.treeModel.root.getIndexAtTreeNode(this.focusedFile);F>k?this.activeFileDecorationByRange(k,F):F<k&&this.activeFileDecorationByRange(F,k)}},this.handleItemToggleClick=(O,x)=>{this._isMultiSelected=!0,!(x!==l.TreeNodeType.CompositeTreeNode&&x!==l.TreeNodeType.TreeNode)&&(this.selectedFiles.length===1&&E.Directory.isRoot(this.selectedFiles[0])&&this.clearFileSelectedDecoration(),this.toggleFileSelectedDecoration(O))},this.handleItemClick=(O,x=this.fileTreeService.isMultipleWorkspace?l.TreeNodeType.TreeNode:l.TreeNodeType.CompositeTreeNode,k)=>{var F,L,N,U;if(this.treeModel&&(O||(O=this.treeModel.root),this.updateExplorerCompressedContextKey(O,k),this._isMultiSelected=!1,(x===l.TreeNodeType.CompositeTreeNode||x===l.TreeNodeType.TreeNode)&&this.activeFileDecoration(O),this.fileTreeService.isCompactMode&&k?(this._activeUri=k,(F=this.contextKey)===null||F===void 0||F.explorerResourceIsFolder.set(!0)):k||(this._activeUri=null,(L=this.contextKey)===null||L===void 0||L.explorerResourceIsFolder.set(x===l.TreeNodeType.CompositeTreeNode)),this.corePreferences["workbench.list.openMode"]==="singleClick")){if(x===l.TreeNodeType.CompositeTreeNode){if((N=this.contextKey)===null||N===void 0||N.explorerResourceIsFolder.set(!0),O===this.treeModel.root)return;this.toggleDirectory(O)}else if(x===l.TreeNodeType.TreeNode){if((U=this.contextKey)===null||U===void 0||U.explorerResourceIsFolder.set(!1),O===this.treeModel.root)return;this.fileTreeService.openFile(O.uri),this.mainlayoutService.bottomExpanded&&this.commandService.executeCommand(g.RETRACT_PANEL_COMMAND.id)}}},this.handleItemDoubleClick=(O,x)=>{x===l.TreeNodeType.TreeNode?this.fileTreeService.openAndFixedFile(O.uri):this.corePreferences["workbench.list.openMode"]==="doubleClick"&&this.toggleDirectory(O)},this.validateFileName=(O,x)=>{var k;if(x=this.getWellFormedFileName(x),!x||x.length===0||/^\s+$/.test(x))return{message:(0,v.localize)("validate.tree.emptyFileNameError"),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:x};if(x[0]==="/"||x[0]==="\\")return{message:(0,v.localize)("validate.tree.fileNameStartsWithSlashError"),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:x};if(x[0]===" "||x[x.length-1]===" ")return{message:(0,v.localize)("validate.tree.fileNameFollowOrStartWithSpaceWarning"),type:l.PROMPT_VALIDATE_TYPE.WARNING,value:x};let F;if(O.target){const N=O.target;if(x===N.name)return null;F=N.parent}else F=O.parent;return F&&!(O instanceof l.RenamePromptHandle&&O.target.displayName.indexOf(S.separator)>0)&&((k=F.children)===null||k===void 0?void 0:k.find(W=>W.name===x))?{message:(0,v.formatLocalize)("validate.tree.fileNameExistsError",x),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:x}:I(x.split(/[\\/]/)).some(N=>!w(N))?{message:(0,v.formatLocalize)("validate.tree.invalidFileNameError",this.trimLongName(x)),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:x}:null},this.proxyPrompt=O=>{let x=!1;const k=async G=>{const X=await this.fileTreeService.getNodeByPathOrUri(G);X&&(E.Directory.is(X)?this.selectFileDecoration(X):this.location(X.uri))},F=async G=>{var X,$,V;if(this.validateMessage=void 0,O instanceof l.RenamePromptHandle){const H=O.target,K=O.target.displayName.split(S.separator),Y=H.name.indexOf(S.separator)>0;if(Y&&this.activeUri&&!O.target.uri.toString().includes(this.activeUri.toString()))return!1;const Z=this.activeUri?K.length-O.target.uri.toString().replace(this.activeUri.toString(),"").split(S.separator).length:-1,oe=Z===-1?[]:K.slice(0,Z).concat(G);let ie=H.uri,he=H.parent.uri.resolve(G);if(Y&&((X=this.activeUri)===null||X===void 0?void 0:X.displayName)===G||!Y&&G===H.name)return!0;O.addAddonAfter("loading_indicator"),Y&&oe.length>0&&E.Directory.is(H.parent)&&(ie=H.parent.uri.resolve(K.slice(0,Z+1).join(S.separator)),he=H.parent.uri.resolve(oe.concat().join(S.separator)));const me=await this.fileTreeAPI.mv(ie,he,H.type===l.TreeNodeType.CompositeTreeNode);if(me)return this.validateMessage={type:l.PROMPT_VALIDATE_TYPE.ERROR,message:me,value:G},this.fileTreeService.updateRefreshable(!0),O.addValidateMessage(this.validateMessage),!1;if(this.fileTreeService.updateRefreshable(!1),O.removeAddonAfter(),!Y&&H.parent){const q=await this.fileTreeService.moveNodeByPath(H.parent,H.parent,H.name,G,H.type);q&&this.selectFileDecoration(q,!1),this.fileTreeService.updateRefreshable(!0)}else if(E.Directory.is(H)&&!E.Directory.isRoot(H)){H.updateMetaData({name:oe.concat(K.slice(Z+1)).join(S.separator),uri:he,fileStat:{...H.filestat,uri:he.toString()},tooltip:this.fileTreeAPI.getReadableTooltip(he)}),this.treeModel.dispatchChange();let q;E.Directory.is(H.parent)&&(!(($=H.parent.children)===null||$===void 0)&&$.find(be=>H.path.indexOf(be.path)>=0))?q=this.fileTreeService.refresh(H.parent):q=this.fileTreeService.refresh(H),q.then(()=>{k(he)})}O.removeAddonAfter()}else if(O instanceof l.NewPromptHandle){const H=O.parent,K=H.uri.resolve(G);let Y;if(O.addAddonAfter("loading_indicator"),this.fileTreeService.updateRefreshable(!0),O.type===l.TreeNodeType.CompositeTreeNode?Y=await this.fileTreeAPI.createDirectory(K):Y=await this.fileTreeAPI.createFile(K),O.removeAddonAfter(),Y)return this.validateMessage={type:l.PROMPT_VALIDATE_TYPE.ERROR,message:Y,value:G},this.fileTreeService.updateRefreshable(!1),O.addValidateMessage(this.validateMessage),!1;if(G.includes(S.separator)&&this.fileTreeService.refresh(H).then(()=>{k(H.uri.resolve(G))}),this.fileTreeService.isCompactMode)if(O.type===l.TreeNodeType.CompositeTreeNode)if((!H.children||H.children.length===0)&&!E.Directory.isRoot(H)){const oe=H.uri.resolve(G),ie=[H.name].concat(G).join(S.separator);H.updateMetaData({name:ie,uri:oe,fileStat:{...H.filestat,uri:oe.toString()},tooltip:this.fileTreeAPI.getReadableTooltip(oe)}),k(oe)}else await this.fileTreeService.addNode(H,G,O.type),k(H.uri.resolve(G));else await this.fileTreeService.addNode(H,G,O.type),k(H.uri.resolve(G));else await this.fileTreeService.addNode(H,G,O.type),k(H.uri.resolve(G))}return(V=this.contextKey)===null||V===void 0||V.filesExplorerInputFocused.set(!1),!0},L=async G=>{var X,$,V,H;if(this.validateMessage&&this.validateMessage.type===l.PROMPT_VALIDATE_TYPE.ERROR)return this.validateMessage=void 0,!0;if(x)return!1;if(!G){(X=this.contextKey)===null||X===void 0||X.explorerCompressedFocusContext.set(!1),($=this.contextKey)===null||$===void 0||$.explorerCompressedFirstFocusContext.set(!1),(V=this.contextKey)===null||V===void 0||V.explorerCompressedLastFocusContext.set(!1),this.fileTreeService.isCompactMode&&O instanceof l.NewPromptHandle&&this.fileTreeService.refresh(O.parent);return}return(H=this.contextKey)===null||H===void 0||H.filesExplorerInputFocused.set(!1),await F(G),!0},N=async G=>{if(x=!0,this.validateMessage&&this.validateMessage.type===l.PROMPT_VALIDATE_TYPE.ERROR)return!1;if(G.trim()===""||this.validateMessage&&this.validateMessage.type!==l.PROMPT_VALIDATE_TYPE.ERROR)return this.validateMessage=void 0,!0;const X=await F(G);return x=!1,!!X},U=async()=>{var G;(G=this.contextKey)===null||G===void 0||G.filesExplorerInputFocused.set(!0)},W=()=>{var G;this.fileTreeService.updateRefreshable(!0),(G=this.contextKey)===null||G===void 0||G.filesExplorerInputFocused.set(!1),this.contextMenuFile&&this.selectFileDecoration(this.contextMenuFile,!0)},j=()=>{var G;(G=this.contextKey)===null||G===void 0||G.filesExplorerInputFocused.set(!1),this.fileTreeService.isCompactMode&&O instanceof l.NewPromptHandle&&this.fileTreeService.refresh(O.parent)},Q=G=>{const X=this.validateFileName(O,G);X?(this.validateMessage=X,O.addValidateMessage(X)):!X&&this.validateMessage&&this.validateMessage.value!==G&&(this.validateMessage=void 0,O.removeValidateMessage())};O.destroyed||(this.fileTreeService.updateRefreshable(!1),O.onChange(Q),O.onCommit(N),O.onBlur(L),O.onFocus(U),O.onDestroy(W),O.onCancel(j))},this.copyFile=async O=>{var x;this.pasteStore&&this.pasteStore.type===u.PasteTypes.CUT&&(this._pasteStore.files.forEach(F=>{F&&this.cutDecoration.removeTarget(F)}),(x=this.contextKey)===null||x===void 0||x.explorerResourceCut.set(!1)),this.treeModel.dispatchChange();const k=[];for(const F of O){const L=this.fileTreeService.getNodeByPathOrUri(F);L&&k.push(L)}this._pasteStore={files:k,type:u.PasteTypes.COPY},this.clipboardService.writeResources(O)},this.pasteFile=async O=>{var x,k;let F=!1,L=this.fileTreeService.getNodeByPathOrUri(O.toString());if(!L)return;let N=this.pasteStore,U=!1;if(!N){const W=await this.clipboardService.readResources();if(!W||!W.length)return;N={files:[],type:u.PasteTypes.COPY,crossFiles:W},U=!0}if(N){if(E.Directory.is(L)||(F=!0,L=L.parent),U){const W=(0,v.localize)("file.confirm.paste.ok"),j=(0,v.localize)("file.confirm.paste.cancel");if(await this.dialogService.warning((0,v.formatLocalize)("file.confirm.paste",`[ ${(x=N.crossFiles)===null||x===void 0?void 0:x.map(G=>G.displayName).join(",")} ]`,E.Directory.isRoot(L)?L.uri.displayName:L.displayName),[j,W])!==W)return}if(N.type===u.PasteTypes.CUT){for(const j of N.files)j&&this.cutDecoration.removeTarget(j),L.expanded||await L.setExpanded(!0);const W=await this.fileTreeAPI.mvFiles(N.crossFiles?N.crossFiles.map(j=>{var Q;return{url:j,isDirectory:((Q=this.fileTreeService.getNodeByPathOrUri(j))===null||Q===void 0?void 0:Q.filestat.isDirectory)||!1}}):N.files.map(j=>({url:j.uri,isDirectory:j.filestat.isDirectory})),L.uri);W&&W.length>0&&(W.forEach(j=>{this.messageService.error(j)}),this.fileTreeService.refresh()),(k=this.contextKey)===null||k===void 0||k.explorerResourceCut.set(!1),this.treeModel.dispatchChange(),this._pasteStore={files:[],type:u.PasteTypes.NONE,crossFiles:void 0}}else if(N.type===u.PasteTypes.COPY){const W=N.crossFiles?N.crossFiles:N.files.map(j=>j.uri);for(const j of W){L.uri.isEqual(j)&&!F&&(L=L.parent);const Q=L.uri.resolve(j.displayName);L.expanded||await L.setExpanded(!0);const G=await this.fileTreeAPI.copyFile(j,Q);if(G)if(G.uri){const X=new v.URI(G.uri),$=await this.filesystem.getFileStat(j.toString());this.fileTreeService.addNode(L,X.displayName,$?.isDirectory?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode)}else this.messageService.error(`Error when copy file: ${j.toString()}, ${G}`)}}}},this.cutFile=async O=>{var x;O.length>0&&((x=this.contextKey)===null||x===void 0||x.explorerResourceCut.set(!0)),this._pasteStore&&this._pasteStore.type===u.PasteTypes.CUT&&this._pasteStore.files.forEach(F=>{this.cutDecoration.removeTarget(F)});const k=[];for(const F of O){const L=this.fileTreeService.getNodeByPathOrUri(F);L&&k.push(L)}this._pasteStore={files:k,type:u.PasteTypes.CUT};for(const F of k)F&&this.cutDecoration.addTarget(F);this.treeModel.dispatchChange()},this.location=async O=>{if(await this.whenReady,!this.fileTreeService.filterMode)return this._fileToLocation=O,this.locationThrottler.queue(this.doLocation)},this.doLocation=async()=>{if(!this._fileToLocation)return;const O=this._fileToLocation;let x;if(typeof O=="string"?x=O:x=await this.fileTreeService.getFileTreeNodePathByUri(O),x){if(!this.fileTreeHandle)return;const k=await this.fileTreeHandle.ensureVisible(x,"center",!0);k&&this.selectFileDecoration(k)}this._fileToLocation=void 0},this.locationOnShow=O=>{this._nextLocationTarget=O},this.performLocationOnHandleShow=async()=>{this._nextLocationTarget&&(await this.location(this._nextLocationTarget),this._nextLocationTarget=void 0)}}get onDidFocusedFileChange(){return this.onDidFocusedFileChangeEmitter.event}get onDidContextMenuFileChange(){return this.onDidContextMenuFileChangeEmitter.event}get onDidSelectedFileChange(){return this.onDidSelectedFileChangeEmitter.event}get onFileTreeModelChange(){return this.onFileTreeModelChangeEmitter.event}get fileTreeHandle(){return this._fileTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get dndService(){return this._dndService}get whenReady(){return this._whenReady.promise}get focusedFile(){return this._focusedFile}set focusedFile(O){this.onDidFocusedFileChangeEmitter.fire(O?O.uri:void 0),this._focusedFile=O}get contextMenuFile(){return this._contextMenuFile}set contextMenuFile(O){this.onDidContextMenuFileChangeEmitter.fire(O?O.uri:void 0),this._contextMenuFile=O}get selectedFiles(){return this._selectedFiles}set selectedFiles(O){this.onDidSelectedFileChangeEmitter.fire(O?O.map(x=>x.uri):[]),this._selectedFiles=O}get activeUri(){return this._activeUri}get pasteStore(){return this._pasteStore}get explorerStorage(){return this._explorerStorage}get currentRelativeUriContextKey(){return this._currentRelativeUriContextKey||(this._currentRelativeUriContextKey=this.fileTreeService.contextMenuContextKeyService.createKey("filetreeContextRelativeUri","")),this._currentRelativeUriContextKey}get currentContextUriContextKey(){return this._currentContextUriContextKey||(this._currentContextUriContextKey=this.fileTreeService.contextMenuContextKeyService.createKey("filetreeContextUri","")),this._currentContextUriContextKey}get contextMenuResourceContext(){return this._contextMenuResourceContext||(this._contextMenuResourceContext=new _.ResourceContextKey(this.fileTreeService.contextMenuContextKeyService)),this._contextMenuResourceContext}get contextKey(){return this.fileTreeService.contextKey}get initTreeModelReady(){return this._initTreeModelReady}async initTreeModel(){this._initTreeModelReady=!1;const O=(await this.fileTreeService.resolveChildren())[0];if(!O){this._whenReady.resolve();return}this._treeModel=this.injector.get(f.FileTreeModel,[O]),this.initDecorations(O),this._dndService=this.injector.get(A.DragAndDropService,[this]),this.treeStateWatcher=this._treeModel.getTreeStateWatcher(!0),this.disposableCollection.push(this.fileTreeService.onNodeRefreshed(()=>{this.initTreeModelReady&&(this.refreshedActionDelayer.isTriggered()||this.refreshedActionDelayer.cancel(),this.refreshedActionDelayer.trigger(async()=>{if(this.selectedFiles.length===0){const k=this.editorService.currentEditor;k&&k.currentUri&&this.location(k.currentUri)}this.fileTreeService.isCompactMode||(this._activeUri=null)}))})),this.disposableCollection.push(this.fileTreeService.onWorkspaceChange(()=>{this.disposableCollection.dispose(),this.initTreeModel()})),this.disposableCollection.push(this.labelService.onDidChange(async()=>{this.initTreeModelReady&&(this.labelChangedDelayer.isTriggered()||this.labelChangedDelayer.cancel(),this.labelChangedDelayer.trigger(async()=>{this.fileTreeService.refresh()}))})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,k=>{this.loadingDecoration.addTarget(k),this.treeModel.dispatchChange()})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,k=>{this.loadingDecoration.clearAppliedTarget(),this.treeModel.dispatchChange()})),this._explorerStorage=await this.storageProvider(v.STORAGE_NAMESPACE.EXPLORER);const x=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY);x&&await this.loadFileTreeSnapshot(x),this.disposableCollection.push(this.treeStateWatcher.onDidChange(()=>{if(!this._initTreeModelReady)return;const k=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),F=this.treeStateWatcher.snapshot();this.explorerStorage.set(n.FILE_TREE_SNAPSHOT_KEY,{...k,...F})})),this.fileTreeService.startWatchFileEvent(),this.onFileTreeModelChangeEmitter.fire(this._treeModel),this._whenReady.resolve(),this._initTreeModelReady=!0}initDecorations(O){this._decorations=new l.DecorationsManager(O),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.cutDecoration),this._decorations.addDecoration(this.loadingDecoration)}setFileTreeContextKey(O){var x;this.currentContextUriContextKey.set(O.uri.toString()),this.currentRelativeUriContextKey.set((this.treeModel.root.uri.relative(O.uri)||"").toString()),this.contextMenuResourceContext.set(O.uri),(x=this.contextKey)===null||x===void 0||x.explorerResourceIsFolder.set(O&&O.type===l.TreeNodeType.CompositeTreeNode)}async loadFileTreeSnapshot(O){await this._treeModel.loadTreeState(O)}updateExplorerCompressedContextKey(O,x){var k,F,L,N,U,W,j,Q,G,X,$,V,H,K,Y,Z;if(O&&x){(k=this.contextKey)===null||k===void 0||k.explorerCompressedFocusContext.set(!0);const oe=new S(O.name);oe.name===x.displayName?((F=this.contextKey)===null||F===void 0||F.explorerCompressedLastFocusContext.set(!0),(L=this.contextKey)===null||L===void 0||L.explorerCompressedFirstFocusContext.set(!1)):oe.root&&oe.root.name===x.displayName?((N=this.contextKey)===null||N===void 0||N.explorerCompressedLastFocusContext.set(!1),(U=this.contextKey)===null||U===void 0||U.explorerCompressedFirstFocusContext.set(!0)):((W=this.contextKey)===null||W===void 0||W.explorerCompressedLastFocusContext.set(!1),(j=this.contextKey)===null||j===void 0||j.explorerCompressedFirstFocusContext.set(!1))}else O?O.name.indexOf(S.separator)>0?((Q=this.contextKey)===null||Q===void 0||Q.explorerCompressedFocusContext.set(!0),(G=this.contextKey)===null||G===void 0||G.explorerCompressedFirstFocusContext.set(!1),(X=this.contextKey)===null||X===void 0||X.explorerCompressedLastFocusContext.set(!0)):(($=this.contextKey)===null||$===void 0||$.explorerCompressedFocusContext.set(!1),(V=this.contextKey)===null||V===void 0||V.explorerCompressedFirstFocusContext.set(!1),(H=this.contextKey)===null||H===void 0||H.explorerCompressedLastFocusContext.set(!1)):((K=this.contextKey)===null||K===void 0||K.explorerCompressedFocusContext.set(!1),(Y=this.contextKey)===null||Y===void 0||Y.explorerCompressedFirstFocusContext.set(!1),(Z=this.contextKey)===null||Z===void 0||Z.explorerCompressedLastFocusContext.set(!1))}handleTreeHandler(O){this._fileTreeHandle=O}toggleOrOpenCurrentFile(){let O;this.focusedFile?O=this.focusedFile:this.contextMenuFile&&(O=this.contextMenuFile),O&&(this.activeFileDecoration(O),E.Directory.is(O)?this.toggleDirectory(O):this.fileTreeService.openFile(O.uri))}moveToNext(){let O;if(this.focusedFile?O=this.focusedFile:this.contextMenuFile&&(O=this.contextMenuFile),!O)return;const k=this.treeModel.root.getIndexAtTreeNode(O)+1,F=this.treeModel.root.getTreeNodeAtIndex(k),L=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),N=(k+1)*c.FILE_TREE_NODE_HEIGHT-(L.scrollPosition||0),{height:U}=this.fileTreeHandle.getCurrentSize();F&&(this.activateFileFocusedDecoration(F),N>U&&this.fileTreeHandle.ensureVisible(F,"end"))}moveToPrev(){let O;if(this.focusedFile?O=this.focusedFile:this.contextMenuFile&&(O=this.contextMenuFile),!O)return;const x=this.treeModel.root.getIndexAtTreeNode(O);if(x===0)return;const k=x-1,F=this.treeModel.root.getTreeNodeAtIndex(k);if(!F)return;const L=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),N=k*c.FILE_TREE_NODE_HEIGHT;this.activateFileFocusedDecoration(F),(L.scrollPosition||0)>N&&this.fileTreeHandle.ensureVisible(F,"start")}async collapseCurrentFile(){let O;this.focusedFile?(O=this.focusedFile,this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0):this.contextMenuFile&&(O=this.contextMenuFile,this.focusedDecoration.removeTarget(this.contextMenuFile),this.contextMenuFile=void 0);const x=this.selectedFiles.indexOf(O);x>=0&&(this.selectedFiles.splice(x,1),this.selectedDecoration.removeTarget(O));let k;if(E.Directory.is(O)&&O.expanded)k=O;else if(O)E.Directory.isRoot(O.parent)?k=O:k=O.parent;else return;this.focusedFile=k,k&&k.expanded&&(await this.fileTreeHandle.collapseNode(k),this.activeFileFocusedDecoration(k,!0))}async expandCurrentFile(){let O;this.focusedFile?(O=this.focusedFile,this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0):this.contextMenuFile&&(O=this.contextMenuFile,this.focusedDecoration.removeTarget(this.contextMenuFile),this.contextMenuFile=void 0);const x=this.selectedFiles.indexOf(O);x>=0&&(this.selectedFiles.splice(x,1),this.selectedDecoration.removeTarget(O)),this.focusedFile=O,E.Directory.is(O)&&(O.expanded||await this.fileTreeHandle.expandNode(O))}async collapseAll(){await this.treeModel.root.collapsedAll();const O=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY);O&&this.explorerStorage.set(n.FILE_TREE_SNAPSHOT_KEY,{...O,expandedDirectories:{atSurface:[],buried:[]}})}async deleteFileByUris(O){var x;if(O.length===0)return;if(this.corePreferences["explorer.confirmDelete"]){const N=this.applicationService.backendOS===v.OperatingSystem.Linux,U=N?(0,v.localize)("file.confirm.delete.ok"):(0,v.localize)("file.confirm.moveToTrash.ok"),W=(0,v.localize)("file.confirm.delete.cancel"),j=10;let Q=O.slice(0,j).map(X=>X.displayName).join(`
34000
34000
  `);if(O.length>j&&(Q+=`
34001
34001
  ...`),N||(Q+=`
34002
34002